Standard
RLL Instructions
5–73
Standard RLL Instructions
Math Instructions
ADDB
A aaa
Add Binary is a 16 bit instruction that adds
the unsigned 2’s complement binary value
in the lower 16 bits of the accumulator with
an unsigned 2’s complement binary value
(Aaaa), which is either a V memory
location or a 16-bit constant. The result
can be up to 32 bits (unsigned 2’s
complement) and resides in the
accumulator.
Operand Data Type DL05 Range
A aaa
Vmemory V All (See p. 4–28)
Pointer P All V mem (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.
SP66 On when the 16 bit addition instruction results in a carry.
SP67 On when the 32 bit addition instruction results in a carry.
SP70 On anytime the value in the accumulator is negative.
SP73 On when a signed addition or subtraction results in a incorrect sign bit.
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 the accumulator will be
added to the binary value in V1420 using the Add Binary instruction. The value in the
accumulator is copied to V1500 and V1501 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
ADDB
V1420
The binary value in the
accumulator is added to the
binary value in V1420
OUTD
V1500
Copy the value in the lower
16 bits of the accumulator to
V1500 and V1501
V1500
(V1420)+
1
1
(Accumulator)
0
0
1
0
V1400
A05
CC 9
000 A05
2C4
Acc.
CC9
The unused accumulator
bits are set to zero
STR
$
SHFTENT
SHFT
ANDST
L
3
D
4
E
1
B
OUT
GX
0
A
0
A
0
A
1
B
ENT
3
D
3
D
1
B
4
E
2
C
0
A
1
B
ENT SHFT
3
D
5
F
0
A
0
A
1
B
ENT
Add Binary
(ADDB)