• edited by
18,416 views
43 43 votes

The pass numbers for each of the following activities

  1. object code generation

  2. literals added to literal table

  3. listing printed

  4. address resolution of local symbols that occur in a two pass assembler

respectively are

  1. $1, 2, 1, 2$

  2. $2, 1, 2, 1$

  3. $2, 1, 1, 2$

  4. $1, 2, 2, 2$

2 Answers

Best answer
48 48 votes

Correct Option: B

The functions performed in pass $1$ and pass $2$ in $2$ pass assembler are

Pass $1$

  1. Assign addresses to all statements in the program.
  2. Save the values assigned to all labels for use in pass $2$
  3. Perform some processing of assembler directives.

Pass $2$

  1. Assemble instructions.
  2. Generate data values defined by BYTE, WORD etc.
  3. Perform processing of assembler directives not done during pass $1$.
  4. Write the program and the assembling listing
• edited by
8 8 votes
i think ans should be B.

literals added to literal table is done in lexical analysis phase, so possible in 1 pass.

and a is back end activity so can not in 1 pass.

d is back end activity but it is in 2 pass assembler. so only 1 pass required.

hence B
• edited by
Answer:
Position:
Show:

Related questions

24 24 votes
3 answers 3 answers
6.2k
6.2k views
Kathleen asked Oct 9, 2014
6,168 views
Consider the syntax-directed translation schema (SDTS) shown below:$E\rightarrow E + E$ {print “+”}$E\rightarrow E * E$ {print “.”}$E\rightarrow id$ {print id.name}$E\rig...
43 43 votes
6 answers 6 answers
12.7k
12.7k views
Kathleen asked Oct 9, 2014
12,672 views
Let $G$ be a context-free grammar where $G=(\{S, A, B, C\}, \{a, b, d\}, P, S)$ with the productions in $P$ given below.$S \rightarrow ABAC$$A \rightarrow aA \mid \vareps...
12 12 votes
2 answers 2 answers
5.6k
5.6k views
Kathleen asked Oct 9, 2014
5,554 views
Which of the following macros can put a macro assembler into an infinite loop?.MACRO M1, X .IF EQ, X ;if X=0 then M1 X + 1 .ENDC .IF NE, X ;if X ≠ O then .WORD X ;address...
39 39 votes
1 answers 1 answer
9.0k
9.0k views
Kathleen asked Oct 9, 2014
9,033 views
The grammar whose productions are$\langle\text{stmt}\rangle \to\text{ if id then } \langle\text{stmt}\rangle$$\langle\text{stmt}\rangle\to\text{ if id then } \langle\text...