what are the functions of passes used in two-pass


What are the functions of passes used in two-pass assembler?

In an assembly language program, two pass translations can handle forward references early.

The subsequent tasks are performed through the passes of a two pass assembler are as given below:

Pass I:

(i) Separate the symbol, operand fields and mnemonic opcode

(ii) Make the symbol table

(iii) Perform the LC processing

(iv) Constructs intermediate representation.

Pass II: Synthesize the objective program

Pass I uses the subsequent data structures:

OPTAB: A table of associated information and mnemonic opcodes

SYMTAB: It is a symbol table

LITTAB: A table literally utilized in the program

OPTAB consists of the field mnemonic opcode, information and class. The class field shows whether the opcode corresponds to a declaration statement (DL) an imperative statement (IS) or an assembler directive (AD).

SYMTAB entry consists of the fields address and length. A LITTAB entry consists of literals and address.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: what are the functions of passes used in two-pass
Reference No:- TGS0276953

Expected delivery within 24 Hours