In a two-pass assembler, the typical sequence of activities and the corresponding pass numbers are as follows:
-
First Pass:
- Literals added to literal table: This occurs during the first pass when the assembler encounters literals in the source code and adds them to the literal table.
- Address resolution of local symbols: The first pass also involves handling local symbols, and their addresses are resolved during this pass.
-
Second Pass:
- Object code generation: The second pass is primarily responsible for generating the actual object code based on the information gathered during the first pass.
- Listing printed: The listing is typically printed during the second pass, showing the source code, assembly instructions, and generated object code.
Therefore, the pass numbers for each activity are as follows:
-
First Pass:
- Literals added to literal table
- Address resolution of local symbols
-
Second Pass:
- Object code generation
- Listing printed