COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
On the number of strings/life reacts
|
|
Code segment to be defined after data segment
|
|
On unconditional rump
|
|
None of these
|
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: -A forward reference occurs when a label is used as an operand, for example as a branch target, earlier in the code than the definition of the label. The assembler cannot know the address of the forward reference label until it reads the definition of the label.
Detailed explanation-3: -Forward References Problem-The assembler specifies the symbols should be declared anywhere in the in the program. There may be a chances of using a symbol before its declaration which gives rise to a forward reference problem. The solution for forward references problem is having an assembler of two pass.