Assembling, Linking, and Executing A Program: The Steps of Preparing A Program For Execution
Assembling, Linking, and Executing A Program: The Steps of Preparing A Program For Execution
Assembling, Linking, and Executing A Program: The Steps of Preparing A Program For Execution
Both TASM and MASM are two-pass assemblers. Two pass assemblers are used to resolve forward
references of addresses not yet encountered in the program. During pass 1, the assembler reads the
entire source program and constructs a symbol table of names and labels used in the program, that is,
names of data fields and program labels and their relative locations(offsets) within the segment. Pass 1
also determines the amount of code to be generated for each instruction.
2
Note: MASM starts generating code in pass 1, whereas TASM does it in pass 2.
During pass 2 the assembler uses the symbol table that is constructed in pass 1. From pass 1, the
assembler knows the length and relative of position of each data field and instruction, it can complete
the object code for each instruction.
With MASM, there is a potential problem with forward references. Since it begins generating object
code in pass one (Page 80 of TEXT.)