A m'i..dti-termed expression may be composed of absolute,
reldcdtdble, and common relocatable terms, subject to the
restrictions itemized below.
IIOperand
ll
refers to a single
symbol or constant, or to the value of a subexpression at
the time it is-combined into the expression with one of the
operators shown in Table
1
(see IIOperators and Expression
Evdl uation
II
edrlier in this chapter) ..
•
The relational operators,
<, <=, >, >=,
=,
and
-'=,
require that both operands be of the same mode (ab-
solute, relocatable, or common relocatable).
•
The operators
*
and / and the logical operators, ...."
**,
&,
I,
and
II
may not be used with a relocatable
or common relocatable operand.
•
In evaluating an expression, the assembler maintains
a count of the number of terms added or subtracted
that are relocatable or common relocatable.
A sep-
arate counter is used for the two relocation types
and each counter is incremented or decremented
by 1 whenever a term of the corresponding relocation
type is added to or subtracted from the expression.
The final value is absolute if both counters are equal
to
O.
If the final Cdunt in one (and only one) of
the relocation counters is equal to +1, the value
of the expression is relocatable or common relocat-
able, depending on which counter is equal to +1.
Any other accumulation in the two relocation coun-
ters is an error and results in a diagnostic frag.
Example 2.
Expressions Using + and - Operators
A's5ume Rf, R2, and R3 are program relocatable terms;
C1' and C2 are common relocatable terms; and A 1 and
- A2 are absolute terms.
Expressi on:
R1±Al
I
Legal, program
Common count:
0
0
Relocatable count: 1
1
relocatable
- Expression
Cl±A1
)
Lega
I,
common
' Comnion
count:
1
1
Relocatcible count:
0
0
relocatable
Absolute and Relocatable Values