Assembler is software (program module) which converts assembly language code (source module) into a machine language code.
Types of Assemblers
One Pass Assembler:
- Goes (scans) through the program once
- Can resolve backward reference
- Cannot resolve forward reference
Two Pass Assembler:
- Goes (scans) through the assembly language program twice
- First pass generates the table of the symbol, which consists of labels with addresses assigned to them
- Second pass uses the symbol table generated in the first pass to complete the object code for each instruction thus producing machine code
- It can resolve forward and backward reference both.
Backward
reference
|
Forward
reference
|
L1:
…..
…..
…..
…..
JMP
L1
|
JMP
L1
…..
…..
…..
L1:
…..
|
No comments:
Post a Comment