Xerox 530 Language And Operations Reference Manual page 13

Table of Contents

Advertisement

The value represented by a multitermed expression must not
exceed the 16-bit capacity of one computer word.
The operators that may appear in an expression are shown
in Table 1.
Multitermed expressions are evaluated as follows:
1.
Each term is evaluated and replaced by its internal
value.
2.
Arithmetic operations are performed from left to right.
Those with the highest"binding strength" are performed
fi rst .
For examp
Ie:
A+B<C*D+E
is evaluated as if it were
(A
+
B)
<
((C * D) + E)
3.
Division always yields an integer result; any fractional
portion is truncated.
An expression preceded by an asterisk (*) usually denotes
indirect addressing.
Used as a prefix in this way, the
asterisk does not affect the evaluation of the expression. If
an asterisk precedes a subexpression, it is interpreted as a
multiplication operator.
Table 1. Extended Symbol Operators
Binding
Operators
Strength
Function
--,
7
Unary not
-
7
Unary minus
+
7
Unary plus
**
6
Logical binary shift
(I eft sh i ft if secand operand
is positive, right shift if
second operand is negative)
*
5
Integer multiply
/
5
Integer di vi de
+
4
Integer add
-
4
Integer subtract
<
3
Less than
>
3
Greater than
<=
3
Less than or equa I
>=
3
Greater than or equa
I
--
3
Equal
--,=
3
Not equal
&
2
Logical AND
II
1
Exclusive logical OR
I
1
Inclusive logical OR
6
Language Elements
Logical Operators
The logical NOT (-,), or complement operator, causes a
l's complement of its operand:
Value
3
10
Hexadecimal
Equiv_~L~
00 ... 0011
00 ... 1010
l's Complement
- - - - - -
11
1100
11 ... 0101
The binary logical shift operator
C';*)
determines the direc-
tion of shift from the sign of the second operand: a negative
operand denotes a right shift and a positive operand denotes
a left shift.
For example:
5** -
3
results in a logical right shift of three bit positions for the
value
5,
producing a result of zero.
The result of any of the comparisons produced by the com-
parison operators is
a
if "false"
1 if "true"
so that
Expre:sion
Result
3 > 4
a
3
is not greater than
4.
-,3=-4
a
the 16-bit value
-,3
is equal to
11 ..• 1100 and is not equal to
4;
(i.e., 00 ... 0100).
3-,:=: 4
3
is not equal to
4.
-, (3:'-4)
11 ... 11
3
is not equal to
4,
so the
resu~t
of the comparison is
a
which,
when complemented, becomes
a 16-bit value (all l's).
The logical operators & (AND),
I
(OR), and
II
(Exclusive
OR) perform as follows:
AND
First Operond:
0011
Second Operand:
0101
Result of & Operation:
0001
OR
First Operand:
0011
Second Operand:
0101
Result of
I
Operation:
0111
Exclusive OR
First
Operanc~;
0011
Second Operand:
0101
Result of
II
Operation:
0110

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sigma 3Sigma 2

Table of Contents