|YACC grammar for 8085 assembler. firstname.lastname@example.org (Dale Lyons) (2007-12-13)|
|Re: YACC grammar for 8085 assembler. email@example.com (Bill Cox) (2007-12-14)|
|Re: YACC grammar for 8085 assembler. DrDiettrich1@aol.com (Hans-Peter Diettrich) (2007-12-14)|
|Re: YACC grammar for 8085 assembler. firstname.lastname@example.org (Fred J. Scipione) (2008-01-06)|
|From:||Bill Cox <email@example.com>|
|Date:||Fri, 14 Dec 2007 12:23:11 -0800|
|Posted-Date:||15 Dec 2007 14:08:02 EST|
Dale Lyons wrote:
> I am looking for a YACC grammar for 8085 assembler.
> It does not have to be a perfect working grammar; any "starter" grammar
> which will get me on the right track will do just fine.
> I've search a bit, but couldn't find such a grammar. Help ?
I've written a dozen or more assemblers, and another half dozen with a
specialized YACC-like tool. The tool made the more complex assembly
codes easier to write, but wasn't *necessary* at all. The only part
where I see a grammar helping is in expression parsing. Parsing the
opcodes and arguments, outside of expressions, is very
In more complex languages, like 8086, there is some non-trivial
parsing of the address expressions, and alternate argument patterns.
I'd say, for the 8080, just go for it.
Have you looked at the GNU assembler? It's *very* portable, and might
offer some inspiration. Here's the doc:
In fact, it might be easier to add the 8080/8085 to the GNU assembler,
and we would all benefit from your work. What machine are you hosting
the assembler on? Are there constraints on the output object file
format? If not, I highly recommend ELF format, possibly in a not-yet-
invented16-bit variation, since that's the address size of the 8080.
Return to the
Search the comp.compilers archives again.