DL205 User Manual, 4th Edition, Rev. B
5–101
Chapter 5: Standard RLL Instructions - Math
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Add Binary (ADDB)
The Add Binary instruction adds a 16-bit number (Aaaa) to
the value stored in the accumulator. The number in the
accumulator can be up to 32 bits long. The source of the
16-bit operand can be a constant or a data value located in
V-memory. Add Binary performs the addition operation on
the full binary representation of the operands, which distinguishes it from the Add
instruction (see page 5-88), which treats the operands as BCD numbers. Although the
addition operation is performed on the underlying binary values, the native display format is
hexadecimal. For that reason you will need to load constants in hex.
The sum of the Add Binary operation occupies the full 32-bit accumulator and requires an
Out Double to move the sum to V-memory. If the value in the accumulator occupies fewer
than 32 bits, leading zeros are loaded in the left-most empty bit positions.
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 added to the binary
value in the accumulator using the Add Binary instruction. The value in the accumulator is
copied to V1500 - V1501 using the Out Double instruction.
ADDB
A aaa
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 an incorrect sign bit.
Handheld Programmer Keystrokes
LD
X1
+
1
1
(Accumulator)
0
0
1
0 A 0 5
C C 9
0 0 0
A 0 5
2 C 4
Acc.
C C 9
STR
1
D
1
4
0
0
OUT
1
5
0
0
1
4
0
A
2
SHFT
B
The
u
n
u
sed
accumulator
bi
t
s
ar
e se
t to
ze
ro
SHFT
D
E N
T
SHFT
L
EN
T
D
D
EN
T
EN
T
Loa
d
t
he
v
alu
e
in
V
1400
in
to
t
he
lo
w
e
r
1
6
bi
t
s
o
f
t
he
accumulator
LD
BIN
ADD
B
OU
T
D
V
1500
K
25
6
5
U
se
ei
t
he
r
OR
Co
ns
ta
n
t
V-
m
e
mor
y
V
1420
V
1400
(
V
1420)
V
1500
V
1400
The
bin
ar
y v
alu
e
in
t
he
accumulator
is
a
dded
to
t
he
bin
ar
y v
alu
e
in
V
1420
Co
py
t
he
v
alu
e
in
t
he
lo
w
e
r
1
6
bi
t
s
o
f
t
he
accumulator
to
V
1500
a
nd
V
1501
Direct
S
O
F
T
A05
(
H
e
x
)
=
25
6
5
(
de
c
i
mal)
12C4
(
H
e
x
)
=
4
8
04
(
de
c
i
mal)
(Accumulator)
1CC9
(
H
e
x
)
=
73
6
9
(
de
c
i
mal)
Operand Data Type
DL250-1 Range
DL260 Range
A
aaa
aaa
V-memory V
All (See page 3 - 55)
All (See page 3 - 56)
Pointer P
All V mem (See page 3 - 55)
All V mem (See page 3 - 56)
Constant. K
0-FFFF
0-FFFF
ý
ý
þ
þ
230
240
2
5
0
-1
2
6
0
DS
Used
HPP Used