Re: 1-pass Assembler Design

Michael Meissner <meissner@cygnus.com>
17 Aug 1998 20:37:21 -0400

          From comp.compilers

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)
| List of all articles for this month |

From: Michael Meissner <meissner@cygnus.com>
Newsgroups: comp.compilers
Date: 17 Aug 1998 20:37:21 -0400
Organization: Cygnus Solutions
References: 98-08-096 98-08-112
Keywords: assembler

In comp.compilers "Marv Luse" <marvl@fusionmm.com> writes:
> >I have been pondering the design of a 1-pass assembler and have been
> >considering schemes for dealing with forward references (i.e., jump to
> >label not yet found in source code). Does anyone have any suggestions
> >for a practical scheme for doing this? I have devised several
> >approaches, but have limited time for investigation, so if someone
> >could suggest an approach that would be great.


ian@cygnus.com writes:
> The GNU assembler is a 1-pass assembler. It uses a fairly
> straightforward scheme that I believe is due to Richard Stallman.


It may be a matter of semantics as to what a pass is, but I always
thought gas was a 2+ pass assembler. The way I count it, the first
pass reads the source and creates the frags. The second pass then
goes over the frags and fixes up the branches, and writes out the
object file.
--
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com, 617-354-5416 (office), 617-354-7161 (fax)
[True, on that basis you could call the original PDP-11 Unix assembler
one-pass, since it only read its input once, and created a tokenized
intermediate file that it re-read. It was really fast. -John]




--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.