Absolute And Relocatable Values; Symbols; Expres'ions - Xerox 530 Language And Operations Reference Manual

Table of Contents

Advertisement

program. This table is temporary and may be erased and re-
establ ished with new symbols by a subsequent LOCAL directive.
The procedure-local symbol t(lble contains symbols that are
declared to be local to a particular plIOcedure (see
II
Proce-
dures
ll
,
Chapter 7). Each symbol in a local directive within
a procedure causes the previous definition of that symbol to
be temporari Iy suspended, and the symbol is set as unde-
fined in the current procedure local sY'mbol table. At the
end of the procedure, the last' previously suspended local or
procedure-local definition of the syst,em is reactivated.
When the assembler encounters a symbol in the label field,
it refers to the last active local or procedure-local symbol
table (if assembl i ng a local or procedure-local regi on, re-
spectively); if necessary, it then refers to the nonlocal sym-
bol table.
If
I'he symbol is not in an active table, the symbol,
its value, and control information are entered in the appro-
priate table. Atthispoint, the symbol is completelydefined.
If the symbol is found in
0
table, one of the following con-
trol conditions applies and is indicated in the symbol's con-
trol information.
1.
2.
3.
4.
Symbol Control
Local or procedure-local
and not previously defined.
Previously defined in the
approprial'e table.
Dec lared external to pro--
gram being assembled by
REF or SREF.
Dec I a red externa I by DE F;
defi ned wi thin this program.
5.
Previously referenced but
not defi ned.
Result
The symbol becomes
defined.
Symbol is taggedasmulti-
defined and retains the
fi rst address va
I
ue - an
error condition.
Provides information in
object program for loader
to complete linkages.
Defi nes the symbol and
provides object program
information tor the loader.
Provides control i nforma-
tion for completion of
references in generation
pass.
The symbol is de-
fined at this point.
When the assemblerenc:ounters a symbol in an argument field
it refers to the last active locol or procedure-local symbol
table (if assembling a local or procedure-local symbol region,
respectively); if necessalY, it then reFers to the nonlocal
symbol table to determine if the symbol has already been
defined.
If it has, the assembler obtcdns information about
the symbol from the table and is then able to assemble the
appropriate object program information.
(Actual assembly
occurs during the generation pass; entries into symbol tables
occur during the definition).
If the !iymbol is not in any
active symbol
t~ble,
the assembler enters its name and con-
trol information in the appropriate table but does not assign
an address value until the symbol is defined in the label
field.
Symbols are entered in the nonlocal table unless
they have been declared as locol by use of the LOCAL
directive. Symbols dec:lared
CIS
local ore entered in either
the active local or the active procedL,re-local symbol table.
If
any undefined symbols remain in the nonlocal symbol table
at the end of an assembly, their definitions are declared
'unknown ' and appropriate messages are produced.
Error
messages are not produced for undefined local or procedure-
local symbols that are not referenced within that region.
ABSOLUTE AND RELOCATABLE VALUES
The value of a symbol or expression may be absolute, re-
locatable, or common relocatable. An absolute value,
which is assigned at assembly time, is the same value that
wi
II
be used by the program at execution time. A relocat-
able or common relocatable value may be altered by the
loader at execution time.
SYMBOLS
A symbol is assigned an absolute value by one of the
following methods:
1.
By equating the symbol to an absolute numeric quantity.
2.
3.
SUM
EQU
2
SUM is assigned the absolute value
2.
By equating the symbol to an absolut,e expression.
A
B
ANSWER
EQU
RES
EQU
EQU
$
10
$
A - B
ANSWER is assigned the absolute value
-10.
By using the symbol as a label entry in absolute pro-
gram or program secti on (see Chapter 5).
The value of an absolute symbol does not change, even if
it is part of a relocatable program (a program that can be
executed anywhere in memory).
A symbol has a relocatable value unless declared absolute
as described above.
The value of a relocatable symbol may
be altered by the loader when the symbol is a part of a
relocatable program; i. e.
I
the loader wi II add the reloca-
tion bias to each symbol used as a label entry in a re-
locatable program or program section (see Chapter 5).
A symbol is common relocatable if it appeared in the label
field of a COMMON directive.
, EXPRESSIONS
The value of a single-term expression has the same attributes
(absolute, relocatable, or common relocatable) as the single
symbol or constant of which it is composed.
The value of a multi-termed expression will be absolute
if only absolute terms are used in the expression.
All op-
erators in Table 1 may be used to combine absolute terms.
Absolute and Relocatable Values
11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sigma 3Sigma 2

Table of Contents