Add Double (ADDD)
Add Double is a 32-bit instruction that adds the BCD
230
value in the accumulator with a BCD value (Aaaa), which
240
is either two consecutive V-memory locations or an
250-1
8–digit (max.) BCD constant. The result resides in the
260
accumulator.
Operand Data Type
DS
Used
HPP Used
V-memory
Pointer
Constant
Discrete Bit Flags
SP63
SP66
SP67
SP70
SP75
NOTE: The status flags are only valid until another instruction that uses the same flags is executed.
In the following example, when X1 is on, the value in V2000 and V2001 will be loaded into
the accumulator using the Load Double instruction. The value in the accumulator is added
with the value in V2006 and V2007 using the Add Double instruction. The value in the
accumulator is copied to V2010 and V2011 using the Out Double instruction.
DirectSOFT
X1
Handheld Programmer Keystrokes
$
STR
L
SHFT
ANDST
A
SHFT
0
GX
SHFT
OUT
DL230 Range DL240 Range DL250-1 Range DL260 Range
A
aaa
All
V
See memory map
P
-
K
0-99999999
On when the result of the instruction causes the value in the accumulator to be zero
On when the 16 bit addition instruction results in a carry
On when the 32 bit addition instruction results in a carry
On anytime the value in the accumulator is negative
On when a BCD instruction is executed and a NON-BCD number is encountered
LDD
V2000
Load the value in V2000 and
V2001 into the accumulator
ADDD
V2006
Add the value in the
accumulator with the value
in V2006 and V2007
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
B
ENT
1
D
D
C
3
3
2
D
D
D
3
3
3
D
V
SHFT
3
AND
Chapter 5: Standard RLL Instructions - Math
aaa
All
See memory map
See memory map
All V-memory.
See memory map
See memory map
0-99999999
Description
V2001
V2000
6
7
3
9
5
0
2
6
7
3
9
5
0
2
2
0
0
0
4
0
4
+
Acc.
8
7
3
9
9
0
7
8
7
3
9
9
0
7
V2011
V2010
A
A
A
ENT
0
0
0
C
A
A
G
2
0
0
6
C
A
B
A
2
0
1
0
DL205 User Manual, 4th Edition, Rev. B
ADDD
A aaa
aaa
aaa
All
All
See memory map
All V-memory.
All V-memory.
See memory map
0-99999999
0-99999999
6
(Accumulator)
6
6
(V2006 and V2007)
2
2
ENT
ENT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
5–89
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?