13-02-2016, 10:48 AM
Pass 1 (define symbols)
Assign addresses to all statements in the program
Save the addresses assigned to all labels for use in Pass 2
Perform assembler directives, including those for address assignment, such as BYTE and RESW
Pass 2 (assemble instructions and generate object program)
Assemble instructions (generate opcode and look up addresses)
Generate data values defined by BYTE, WORD
Perform processing of assembler directives not done during Pass 1
Write the object program and the assembly listing
OPTAB
Contents:
Mnemonic operation codes
Machine language equivalents
Instruction format and length
During pass 1:
Validate operation codes
Find the instruction length to increase LOCCTR
During pass 2:
Determine the instruction format
Translate the operation codes to their machine language equivalents
Implementation: a static hash table