Related articles |
---|
Compiler Deisgn. Matthew.Webb@net1.demon.co.uk (Matthew Webb) (1998-05-12) |
Re: Compiler Deisgn. dwight@pentasoft.com (1998-05-15) |
Re: Compiler Deisgn. abbottk@earthlink.net (Kirk Abbott) (1998-05-15) |
Re: Compiler Deisgn. djg@argus.vki.bke.hu (Gabor DEAK JAHN) (1998-05-16) |
Re: Compiler Deisgn. anton@mips.complang.tuwien.ac.at (1998-05-27) |
Re: Compiler Design. td@sysinno.se (Torbjorn Drevin) (1998-05-30) |
Re: Compiler Design. tchannon@black.demon.co.uk (1998-06-03) |
From: | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
Newsgroups: | comp.compilers |
Date: | 27 May 1998 22:06:12 -0400 |
Organization: | Institut fuer Computersprachen, Technische Universitaet Wien |
References: | 98-05-058 98-05-098 |
Keywords: | assembler, design |
Matthew Webb wrote:
>> My diassembler/assembler are bassically just one massive case statment on
>> the bytes or text strings. The look identical but the reversed.
>> Can anyone give another structure other than a case statment please?
Case statements are fine (especially if you have case statements on
strings). What's your problem with them?
Kirk Abbott <abbottk@earthlink.net> writes:
> Years ago I read a paper by Anton Erl of gForth fame on writing fast
> interpreters. He discussed issues similar to what you are asking. He
> suggested different structures which required using some extensions in
> the gnu c compiler.
I don't think this work has much relevance for this question. A
connection between interpreters and disassemblers is that you could
easily rewrite an interpretive emulator for a machine into a
disassembler (keep the decoding framework and replace the code for
executing an instruction with code for outputting the assembly
language).
My work did not really concern itself with interpreters for machines
with a given instruction encoding.
- anton
--
M. Anton Ertl Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.