GATE 1993
March 17, 2025Compiler-Design
March 17, 2025GATE 1993
|
Question 31
|
A simple two-pass assembler does the following in the first pass:
|
It allocates space for the literals.
|
|
|
It computes the total length of the program
|
|
|
It builds the symbol table for the symbols and their values.
|
|
|
It generates code for all the load and store register instructions.
|
|
|
A, B and C
|
Question 31 Explanation:
Pass 1:
1) Assign address to all statements in the program.
2) Save the values assigned to all tables for use in pass 2.
3) Perform some processing of assembler directives.
1) Assign address to all statements in the program.
2) Save the values assigned to all tables for use in pass 2.
3) Perform some processing of assembler directives.
Correct Answer: E
Question 31 Explanation:
Pass 1:
1) Assign address to all statements in the program.
2) Save the values assigned to all tables for use in pass 2.
3) Perform some processing of assembler directives.
1) Assign address to all statements in the program.
2) Save the values assigned to all tables for use in pass 2.
3) Perform some processing of assembler directives.
