15 Instruction Set Reference
15 –10
[IF condition]
AR
=
xop
AND
yop
;
AF
OR
constant
XOR
[IF condition]
AR
=
TSTBIT n OF xop
;
AF
SETBIT n OF xop
CLRBIT n OF xop
TGLBIT n OF xop
[IF condition]
AR
=
PASS
xop
;
AF
yop
constant
[IF condition]
AR
=
–
xop
;
AF
yop
[IF condition]
AR
=
NOT
xop
;
AF
yop
[IF condition]
AR
=
ABS
xop
;
AF
[IF condition]
AR
=
yop
+ 1
;
AF
[IF condition]
AR
=
yop
– 1
;
AF
DIVS yop, xop ;
DIVQ xop ;
NONE = <ALU> ;
Table 15.3 ALU Instructions
15.5.2
MAC Group
Here is an example of one of the MAC instructions, Multiply/Accumulate:
IF NOT MV MR=MR+MX0*MY0(UU);
The conditional expression, IF NOT MV, tests the MAC overflow bit. If the
condition is not true, a NOP is executed. The expression
MR=MR+MX0*MY0 is the multiply/accumulate operation: the multiplier
result register (MR) gets the value of itself plus the product of the X and Y
input registers selected. The modifier in parentheses (UU) treats the
operands as unsigned. There can be only one such modifier selected from
the available set. (SS) means both are signed, while (US) and (SU) mean
that either the first or second operand is signed; (RND) means to round
the (implicitly signed) result.