Forward Reference Problem and Future Symbol Problem in 8086
Forward Reference Problem and Future Symbol Problem in 8086
Forward Reference Problem
A typical line in a program could be
BEGIN:MOV AX,SUM
In this example BEGIN is a label which corresponds to the address that line of code is stored.A label when defined is called symbol.There will be a memory address corresponding to all symbols.
All current assemblers allow the use of labels rather than numeric addresses of memory locations.However finally the labels must be translated to memory addresses.As such an important issue that an assembler will have to sort out what is called Forward Reference Problem
Future Symbol Problem
take a look at this code
BEGIN: MOV AX,BX
JMP AGAIN
......................
......................
......................
......................
AGAIN:.....................
in the second line the assembler encounters a problem that AGAIN label is undefined.The assembler has no knowlege of it,but the value of the symbol AGAIN is needed before it can be defined .It is called Future Symbol Problem
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------
Comments
Post a Comment