On 4 Jan 2012 at 19:41, David Riley wrote:
On Jan 4, 2012, at 4:51 PM, Fred Cisin wrote:
Does anybody write compilers in assembly any
more? Or ever will,
again? </rant>
Of course, at that point, you can self-host if you want to (a lot of
Forth, Inc.'s implementations used to do that, and I think Chuck
Moore's ColorForth does something similar).
Well, even in the limited resource 8-bit days in the 70s, it didn't
make sense to write a compiler in assembler, even when you were using
assembler to write the code.
You first wrote a macro preprocessor or interpreter that implemented
a bunch of operations to perform lexical operations--and then you
wrote assembler routines to support them.
That's the way a number of outfits did it--including Ryan-McFarland,
for example. You could take the code for one architecture, rewrite
the support routines and the back end code generation and re-host it
on a completely different machine.
What's harder is the runtime support for any particular machine+OS
combination. That was often assembly, due to speed concerns.
--Chuck