[comp.compilers] Neither Assembler nor Relocatable Output

johnl@ima.UUCP (12/10/87)

There is a compromise between assembler source output and binary relocatable
output.  The compiler can output a sequence of records, each containing an
integer-coded description of the op-codes and operands/labels.  The basic idea
is to make the "programmer's notion" of an assembler instruction a supported
format.  This programmer's notion is common to both compiler and assembler.
This makes the traditional assembler a two part program, one converting
assembler source to the record sequence and one converting the record sequence
to binary relocatable.  The traditional compiler would produce a record
sequence then call phase two of the assembler.  We avoid the expensive parsing
phase of the assembler while simultaneously avoiding the programming cost of
duplicating instruction format selection, address computation, etc. in the
compiler.

Assembler Output Approach:
    hll source [compilation] hll internal [source gen] asm source
    asm source [parsing] asm internal [format, address] relocatable
Relocatable Output Approach:
    hll source [compilation] hll internal [format, address] relocatable
Record Ouput Approach
    hll source [compilation] records
    records [format, address] relocatable

The same execution work is performed in the record approach as in the
relocatable approach, but with the reduced programmer effort of the assembler
approach.  For those who like to read the output of the compiler, a record
format to assembler format conversion program is trivial.
-- 
  Lawrence Crowl		716-275-9499	University of Rochester
		      crowl@cs.rochester.edu	Computer Science Department
...!{allegra,decvax,rutgers}!rochester!crowl	Rochester, New York,  14627
--
Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.ARPA
Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbn}!ima
Please send responses to the originator of the message -- I cannot forward
mail accidentally sent back to compilers.  Meta-mail to ima!compilers-request