The Gateway to Computer Science Excellence
+26 votes
3.6k views

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$

in Compiler Design by Veteran (52.2k points)
edited by | 3.6k views
0

Is it the total no of passes once or twice each of the activities will go through?

or the ith   pass the activity will be in, where i = 1,2?

+2
is two pass assmbler in the syllabus?
+1
What does it mean by "listing printed ".

2 Answers

+32 votes
Best answer

Ans should be (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
by Boss (17.1k points)
edited by
+2
Thank you for nice explanation!
+2
someone, please explain option 4(address resolution), Why is it pass 1 and not pass 2
0

@srestha mam

what is listing printed???Schemantic actions??

+1

2 pass assembler property

See ans line

  1. Write the program and the assembling listing
+7 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
by Loyal (8.1k points)
edited by
+2
address resolution is done by the loader.it not done by assembler

plz explain why option d is done in 1st pass of assembler
0
What is back end activity  ? plz explain.
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,354 answers
198,478 comments
105,248 users