A Forward Reference Problem & It's Solution
A Forward Reference Problem & It's Solution
solution
A forward reference occurs when a label is used as an operand, for example in MOVEM instruction
,the assembler cannot know the address of the forward reference label until it reads the definition of
the label.
The back patching is a solution to the forward reference problem that occurs in one pass assemblers.
•
Backpatching
• Initially the operand field of an instruction
containing a forwarded reference is left blank.
• A table of instruction containing forwarded
reference is maintained separately called table of
incomplete instruction.(TII).
• This table can be used to fill up the address in
incomplete instruction.
• The address of the forwarded reference symbol is
put in the black field with the help of back
patching list.