Assembler

Question 1
 
A
1, 2, 1, 2
B
2, 1, 2, 1
C
2, 1, 1, 2
D
1, 2, 2, 2
       Compiler-Design       Assembler       Gate-1996
Question 1 Explanation: 
The functionalities from pass 1 and pass 2 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 assembling listing.
Question 2
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
       Computer-Organization       Assembler       Gate-1993
Question 2 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.
Question 3
   
A
a-2, b-1, c-2, d-1
       Computer-Organization       Assembler       Gate-1992
Question 3 Explanation: 
Two pass assembler.
Pass 1:
→ Assign addresses to all statements.
→ Save the values assigned to all labels for use in pass 2.
→ Perform some processing of assembler directives.
Pass 2:
→ Assembler instructions by translating opcode and symbolic operands.
→ Generate data values defined by BYTE, WORD.
→ Perform processing of assembler directives not done in pass 1.
→ Write the object program and the assembly listing.
There are 3 questions to complete.
PHP Code Snippets Powered By : XYZScripts.com