COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In a single pass assembler, most of the forward references can be avoided by putting the restriction ____
A
On the number of strings/life reacts
B
Code segment to be defined after data segment
C
On unconditional rump
D
None of these
Explanation: 

Detailed explanation-1: -In a single pass assembler, most of the forward references can be avoided by putting the restrictiona)On the number of strings/life reactsb)Code segment to be defined after data segmentc)On unconditional rumpd)None of the mentionedCorrect answer is option ‘B’.

Detailed explanation-2: -The solution for forward references problem is having an assembler of two pass. It creates a number of passes that is necessary to process the definition of symbols.

Detailed explanation-3: -As explained, one-pass assembler cannot resolve forward references of data symbols. It requires all data symbols to be defined prior to being used.

Detailed explanation-4: -Disadvantages of one pass assembler: The Forward reference problem exists in the one-pass assembler. In this problem operands are utilized before the declaration, thus assembler has no information about the operand address that is to be present in the final executable code.

There is 1 question to complete.