Standard
RLL Instructions
5–74
Standard RLL Instructions
Math Instructions
SUBB
A aaa
Subtract Binary is a 16 bit instruction that
subtracts the unsigned 2–s complement
binary value (Aaaa), which is either a V
memory location or a 16-bit 2’s
complement binary value, from the binary
value in the accumulator. The result
resides in the accumulator.
Operand Data Type DL05 Range
A aaa
Vmemory V All (See p. 4–28)
Pointer P All (See p. 4–28)
Constant K 0–FFFF
Discrete Bit Flags Description
SP63 On when the result of the instruction causes the value in the accumulator to be zero.
SP64 On when the 16 bit subtraction instruction results in a borrow.
SP65 On when the 32 bit subtraction instruction results in a borrow.
SP70 On anytime the value in the accumulator is negative.
NOTE: Status flags are valid only until another instruction uses the same flag.
In the following example, when X1 is on, the value in V1400 will be loaded into the
accumulator using the Load instruction. The binary value in V1420 is subtracted
from the binary value in the accumulator using the Subtract Binary instruction. The
value in the accumulator is copied to V1500 using the Out instruction.
DirectSOFT Display
Handheld Programmer Keystrokes
LD
V1400
X1
Load the value in V1400 into the
lower 16 bits of the accumulator
SUBB
V1420
The binary value in V1420 is
subtracted from the value in
the accumulator
OUT
V1500
Copy the value in the lower 16
bits of the accumulator to V1500
V1500
(V1420)
0
y
1
(Accumulator)
0
1
0
0
V1400
024
619
000 024
A0B
Acc.
619
The unused accumulator
bits are set to zero
STR
$
SHFT
ANDST
L
3
D
SHFT
RST
S
ISG
U
OUT
GX
SHFT
1
B
ENT
4
E
2
C
0
A
ENTSHFT
1
B
1
B
1
B
3
D
5
F
0
A
0
A
ENT
1
B
4
E
0
A
0
A
ENT
1
B
Subtract Binary
(SUBB)