GATE 1993
March 17, 2025
Compiler-Design
March 17, 2025
GATE 1993
March 17, 2025
Compiler-Design
March 17, 2025

GATE 1993

Question 31

A simple two-pass assembler does the following in the first pass:

A
It allocates space for the literals.
B
It computes the total length of the program
C
It builds the symbol table for the symbols and their values.
D
It generates code for all the load and store register instructions.
E
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.
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.

Leave a Reply

Your email address will not be published. Required fields are marked *