Page 68 - DCAP507_SYSTEM_SOFTWARE
P. 68
System Software
Notes Machine-op Table for passes 1 and 2
Directive Table
The Symbol Table and Literal Table comprise for each entry the name and assembly-time
address/value fields but also a length field, usage field, and a relative position indicator. The
length field signifies the length (in bytes) of the instruction or data to which the symbol is
connected.
Example: Consider
Symbol Table for pass 1 and pass 2
The relative-location column informs the assembler whether the value of the symbol is absolute
(does not modify if the program is shifted in memory), or relative to the beginning of the
program. If the symbol is defined by equivalence with a constant (e.g., 6) or an absolute symbol,
then the symbol is absolute. Or else, it is a relative symbol. The relative-location field in the
symbol table will have an R in it if the symbol is relative, or an A if the symbol is absolute.
Did u know? In the definite assembler a considerably more multifaceted algorithm is
generally used.
The following assembly program is used to exemplify the use of the variable tables (symbol
table and literal table). We are only regarded with the difficulty of assembling this program; its
particular function is irrelevant.
Sample Assembly Source Program (generic code)
Contd...
62 LOVELY PROFESSIONAL UNIVERSITY