Add Binary Top of Stack (ADDBS)
Add Binary Top of Stack instruction is a 32-bit
230
instruction that adds the binary value in the accumulator
240
with the binary value in the first level of the accumulator
250-1
stack. The result resides in the accumulator. The value in
the first level of the accumulator stack is removed and all
260
stack values are moved up one level.
Discrete Bit Flags
SP63
SP66
SP67
SP70
SP73
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 and V1401 will be loaded into
the accumulator using the Load Double instruction. The value in V1420 and V1421 is
DS
Used
loaded into the accumulator using the Load Double instruction, pushing the value previously
HPP Used
loaded in the accumulator onto the accumulator stack. The binary value in the first level of
the accumulator stack is added with the binary value in the accumulator using the Add Stack
instruction. The value in the accumulator is copied to V1500 and V1501 using the Out
Double instruction.
DirectSOFT
X1
LDD
LDD
ADDBS
OUTD
Handheld Programmer Keystrokes
$
B
STR
1
L
D
SHFT
ANDST
3
L
D
SHFT
ANDST
3
D
A
SHFT
0
3
GX
D
SHFT
OUT
3
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 signed addition or subtraction results in a incorrect sign bit.
Load the value in V1400 and
V1401 into the accumulator
V1400
Load the value in V1420 and
V1421 into the accumulator
V1420
Add the binary value in the
accumulator with the binary
value in the first level of the
accumulator stack
Copy the value in the
accumulator to V1500
V1500
and V1501
ENT
B
E
A
A
D
3
1
4
0
D
B
E
C
A
3
1
4
2
D
B
S
ENT
3
1
RST
B
F
A
A
1
5
0
0
Chapter 5: Standard RLL Instructions - Math
Description
V1401
V1400
0
0
3
A
5
0
C
6
0
0
3
A
5
0
C
6
Acc.
V1421
V1420
0
0
1
7
B
0
5
F
0
0
1
7
B 0
5
F
Acc.
0
0
5
2
0
1
2
5
Acc.
0
0
5
2
0
1
2
5
ENT
0
ENT
0
ENT
DL205 User Manual, 4th Edition, Rev. B
ADDBS
Accumulator stack
after 1st LDD
Level 1
X
X
X
X X
X
X
X
Level 2
X
X
X
X X
X
X
X
Level 3
X
X
X
X X
X
X
X
Level 4
X
X
X
X X
X
X
X
Level 5
X
X
X
X X
X
X
X
Level 6
X
X
X
X X
X
X
X
Level 7
X
X
X
X X
X
X
X
Level 8
X
X
X
X X
X
X
X
Accumulator stack
after 2nd LDD
Level 1
0
0
3
A 5
0
C
6
X
X
X
X X
X
X
X
Level 2
Level 3
X
X
X
X X
X
X
X
X
X
X
X X
X
X
X
Level 4
Level 5
X
X
X
X X
X
X
X
X
X
X
X X
X
X
X
Level 6
Level 7
X
X
X
X X
X
X
X
X
X
X
X X
X
X
X
Level 8
5–117
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?