Re: 1-pass Assembler Design

Michael Meissner <>
17 Aug 1998 20:37:21 -0400

          From comp.compilers

Related articles
1-pass Assembler Design (Marv Luse) (1998-08-13)
Re: 1-pass Assembler Design (Jerry Leichter) (1998-08-16)
Re: 1-pass Assembler Design (Glenn Kasten) (1998-08-16)
Re: 1-pass Assembler Design (Norman Ramsey) (1998-08-16)
Re: 1-pass Assembler Design (1998-08-16)
Re: 1-pass Assembler Design (1998-08-17)
Re: 1-pass Assembler Design (Michael Meissner) (1998-08-17)
Re: 1-pass Assembler Design (1998-08-19)
Re: 1-pass Assembler Design (Jack W. Crenshaw) (1998-08-19)
Re: 1-pass Assembler Design (Norman Ramsey) (1998-08-20)
| List of all articles for this month |

From: Michael Meissner <>
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" <> 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. 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, 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.