10,728 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$

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?

is two pass assmbler in the syllabus?
What does it mean by "listing printed ".
address resolution of local symbols in compiler is done where?

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
by

Thank you for nice explanation!
someone, please explain option 4(address resolution), Why is it pass 1 and not pass 2

@srestha mam

what is listing printed???Schemantic actions??

2 pass assembler property

See ans line

1. Write the program and the assembling listing
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

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