Ten's Complement (BCDCPL)
The Ten's Complement instruction takes the 10's complement
230
(BCD) of the 8-digit accumulator. The result resides in the
240
accumulator. The calculation for this instruction is :
250-1
260
DS
Used
HPP Used
In the following example when X1 is on, the value in V2000 and V2001 is loaded into the
accumulator. The 10's complement is taken for the 8-digit accumulator using the Ten's
Complement instruction. The value in the accumulator is copied to V2010 and V2011 using
the Out Double instruction.
DirectSOFT
X1
Handheld Programmer Keystrokes
$
STR
SHFT
SHFT
GX
OUT
Chapter 5: Standard RLL Instructions - Number Conversion
100000000
— accumulator value
10's compliment value
LDD
V2000
Load the value in V2000 and
V2001 into the accumulator
BCDCPL
Takes a 10's complement of
the value in the accumulator
OUTD
V2010
Copy the value in the
accumulator to V2010 and
V2011
B
ENT
1
L
D
D
ANDST
3
3
B
C
D
C
1
2
3
2
D
C
SHFT
3
2
V2001
0
0
0
0
Acc.
9
9
Acc.
9
9
V2011
C
A
A
2
0
0
P
L
ENT
CV
ANDST
A
B
A
0
1
0
DL205 User Manual, 4th Edition, Rev. B
BCDCPL
V2000
0
0
0
0
8
7
0
0
0
0
8
7
9
9
9
9
1
3
9
9
9
9
1
3
V2010
A
ENT
0
ENT
5–133
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?