Expressions Using And - Operators Expressions Using Miscellaneous Operators; Expressions Using + - Xerox 530 Language And Operations Reference Manual

Table of Contents

Advertisement

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
Expression:
R 1+R2-Cl-R3+C2j
Legal, program
Common count:
o
0
-1
-1 0
Relocatable count: 1
2.
2
1 1
relocatable
Expression:
-R1+Al+R2
)
Common count:
0
0
0
Legal, absolute
Relocatable count:
-1 -1
0
Expr ess ion:
Rl+A1+C1
)
Illegal, diag-
Common count:
0
0
1
Relocatable count: 1 1
nostic error
Expression:
R1+A 1+R2
I
Illegal, diag-
Common count:
0
0
0
Relocatable count: 1
1
2
nosti c error
Expression:
A1±A2
jlegal, absolute
Common count:
0
a
Relocatable count: 0
0
Example 3.
Expressions Using Miscellaneous Operators
R 1, R2, R3, C
1,
C2, A
1
and A2 have the same mean-
ings as in Example 2, above.
Expression
Al
*
A2
A 1
*
(R 1-R2)
(C1-C2)/A 1
R1
*
A1
C1-C2/A 1
A1 &A2
A 1
**
(A2-R1+R2)
-A1
Result
) legal, absolute
} Illegal, diagnostic error
-,(C l-C2+A 1)
Legal, absolute
R1....,=R2
C1 > C2
A 1 > (R2 > R3)
A1 & R1
-R1
R1
<
=
C1
A 1> R2> R3
C1
**
A 1
R1
<
R2
<
R3
Page 12

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sigma 3Sigma 2

Table of Contents