Neither Assembler nor Relocatable Output

harvard!rochester!crowl
Wed, 9 Dec 87 15:15:21 EST

          From comp.compilers

Related articles
Neither Assembler nor Relocatable Output harvard!rochester!crowl (1987-12-09)
| List of all articles for this month |

From: harvard!rochester!crowl
Date: Wed, 9 Dec 87 15:15:21 EST
Newsgroups: comp.compilers
Organization: U of Rochester, CS Dept, Rochester, NY

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
--


Post a followup to this message

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