Related articles |
---|
1-pass Assembler Design marvl@fusionmm.com (Marv Luse) (1998-08-13) |
Re: 1-pass Assembler Design leichter@smarts.com (Jerry Leichter) (1998-08-16) |
Re: 1-pass Assembler Design gkasten@auco.com (Glenn Kasten) (1998-08-16) |
Re: 1-pass Assembler Design nr@labrador.cs.virginia.edu (Norman Ramsey) (1998-08-16) |
Re: 1-pass Assembler Design ian@cygnus.com (1998-08-16) |
Re: 1-pass Assembler Design adrian@dcs.rhbnc.ac.uk (1998-08-17) |
Re: 1-pass Assembler Design meissner@cygnus.com (Michael Meissner) (1998-08-17) |
Re: 1-pass Assembler Design kochenbu@khe.scn.de (1998-08-19) |
Re: 1-pass Assembler Design jcrens@magicnet.net (Jack W. Crenshaw) (1998-08-19) |
Re: 1-pass Assembler Design nr@labrador.cs.virginia.edu (Norman Ramsey) (1998-08-20) |
From: | kochenbu@khe.scn.de (Andreas Kochenburger) |
Newsgroups: | comp.compilers |
Date: | 19 Aug 1998 16:16:41 -0400 |
Organization: | Compilers Central |
References: | 98-08-096 |
Keywords: | assembler, comment |
If you can restrict your assembler to structured control flows you can
introduce a control flow stack CFS of label addresses. In principle
begin \ compile a jump, push here to CFS
...
until \ compile a conditional jump, pop old address from CFS and
calculate distance
Structures like IF..ELSE..ENDIF or counted loops all work the same
way. Unstructured jumps to LABELs are possible if you put in some
restrictions by checking the CFS depth.
The fastest way towards productivity however is not to reinvent the
wheel but to use Forth. See the FAQ in comp.lang.forth.
Andreas
[A standard trick is to chain the list of backpatches through the
references to the symbol in the output file. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.