Relocatable expression
A relocatable expression is one whose value changes by n if the origin of the control section in which it appears is relocated n bytes.
A relocatable expression can be a single relocatable term. The
assembler reduces a relocatable expression to a single relocatable
value if the expression:
- Is composed of a single relocatable term, or
- Contains relocatable terms, alone or in combination with absolute
terms, and
- All the relocatable terms but one are paired. The unpaired term gives the expression a relocatable value; the paired relocatable terms and other absolute terms constitute increments or decrements to the value of the unpaired term.
- The relocatability attribute of the whole expression is that of the unpaired term.
- The sign preceding the unpaired relocatable term must be positive, after all unary operators have resolved.
The following examples show relocatable expressions.
A
is
an absolute term, W
and X
are relocatable terms
with the same relocatability attribute, and Y
is a relocatable
term with a different relocatability attribute.
Y-32*A W-X+* =F'1234' (literal)
* (reference to W-X+W Y
location counter) W-X+Y A*A+W-W+Y