edited by
4,490 views
17 votes
17 votes

Mention the pass number for each of the following activities that occur in a two pass assembler:

  1. object code generation
  2. literals added to literal table
  3. listing printed
  4. address resolution of local symbols
edited by

2 Answers

Best answer
22 votes
22 votes
  1. $2$
  2. $1$
  3. $2$
  4. $1$


P.S. : In first pass, symbol table is created and In second pass, machine code is generated. Listing of final machine code is done after $2^{\text{nd}}$ pass only.

edited by
0 votes
0 votes

In a two-pass assembler, the typical sequence of activities and the corresponding pass numbers are as follows:

  1. 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.
  2. 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

 

 

 

 

 

 

Related questions

7 votes
7 votes
1 answer
1
16 votes
16 votes
4 answers
2
Kathleen asked Sep 12, 2014
3,481 views
The purpose of instruction location counter in an assembler is _______
9 votes
9 votes
2 answers
3
Kathleen asked Sep 13, 2014
3,432 views
Start and stop bits do not contain any "information" but are used in serial communication forError detectionError correctionSynchronizationSlowing down the communications...
23 votes
23 votes
3 answers
4
Kathleen asked Sep 13, 2014
4,549 views
Assume that the last element of the set is used as partition element in Quicksort. If $n$ distinct elements from the set $\left[1\dots n\right]$ are to be sorted, give an...