Chapter 5 Instruction Words
5 - 14
5.3 Operators
You can describe the following dyadic operations using the operators:
Format Description
<variable 1> = <variable 2> + <variable 3>
<variable 1> = <variable 2> - <variable 3>
<variable 1> = <variable 2> * <variable 3>
<variable 1> = <variable 2> / <variable 3>
<variable 1> = <variable 2> mod <variable 3>
<variable 1> = abs <variable 3>
<variable 1> = <variable 3>
<variable 1> = <variable 2> or <variable 3>
<variable 1> = <variable 2> and <variable 3>
<variable 1> = <variable 2> xor <variable 3>
<variable 1> = not <variable 3>
Addition
Subtraction
Multiplication
Division
Remainder
Absolute value
Substitution
OR (logical addition)
AND (logical product)
XOR (exclusive-OR)
NOT (negation)
Note 1: <variable 2> can be a constant ranging from 0 to 127.
Note 2: <variable 3> can be a constant ranging from -2
31
to 2
31
-1.
5.4 Conditional Expressions
You can use the following conditional expressions (as <condition>) in instruction statements:
Format Description
<variable 1> = <variable 2>
<variable 1> < <variable 2>
<variable 1> <= <variable 2>
<variable 1> > <variable 2>
<variable 1> >= <variable 2>
<variable 1> <> <variable 2>
"True" when <variable 1> is equal to <variable 2>
"True" when <variable 1> is less than <variable 2>
"True" when <variable 1> is not greater than <variable 2>
"True" when <variable 1> is greater than <variable 2>
"True" when <variable 1> is not less than <variable 2>
"True" when <variable 1> is not equal to <variable 2>
Note: <variable 1> and <variable 2> can be constants ranging from 0 to 127.