Post by g***@gmail.comPost by Scott LurndalWriting that in assembler would take decades, and it would be impossible
to support
Right! That's the point. There's some stuff that cannot be done in asm.
Not because of any Turing-related principles, just because
in the real world, bugs exist, and a programmer's brain can only get so
hot before it parachutes out of his head.
is just stringing together a bunch of small modules. Admittedly I don’t
write much assembler these days. It used to be my language of choice on IBM
mainframes.
Post by g***@gmail.comYep, emulators are a good example of something that suits asm, at least
of 8-bit game consoles. It's emulating hardware, that is
well defined and constant. Lots of little modules doing their thing, then
reporting back. Well 4 or 5 modules, anyway. They're
actually way faster than they need to be on modern hardware, he may as
well have written them in Javascript (and people have!).
With emulating, the console's hardware is the final arbiter, carved in
stone. There's only one right way to do things, and you
have lists of which addresses do what. So less ambiguity, which is poisonous to computers.
There are also ancient family relationships between the x86 and the Z80,
say, or the souped-up 8080 in the Gameboy that Nocash is
most famous for emulating. So you can take advantage of that sometimes,
effectively running Gameboy code on the PC's CPU, at least
a few instructions' worth. The flags are in some cases the same. Back in
the day, emulators had to be coded extremely well to run
at 100% speed, even for things like the SNES. 100% speed was a target on
programmers' aims list. So, tight, simple code in a
controlled environment might be a good thing to do in assembler,
particularly if it needs to be as fast as possible. Then again,
these days you'd be lucky to beat a C compiler, unless you know tricks that it doesn't.
------------------------------------------------------------------------
if love is a drug, then, ideally, it's a healing, healthful drug... it's
kind of like prozac is supposed to work (without the sexual side
effects and long-term damage to the brain and psyche)