DL205 User Manual, 4th Edition, Rev. D
5-133
Chapter 5: Standard RLL Instructions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Ten’s Complement (BCDCPL)
The Ten’s Complement instruction takes the 10’s complement
(BCD) of the 8-digit accumulator. The result resides in the
accumulator. The calculation for this instruction is :
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.
230
240
250-1
260
BCDCPL
3
D
Handheld Programmer Keystrokes
DirectSOFT
LDD
V2000
X1
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
Acc.
V2000
0087
0000 0087
V2001
0000
V2010
Acc.
9913
9999 9913
V2011
9999
STR
$
1
B
ENT
SHFT
ANDST
L
3
D
3
D
2
C
0
A
0
A
0
A
ENT
SHFT
ENT
OUT
GX
SHFT
2
C
0
A
1
B
0
A
ENT
1
B
2
C
3
D
2
C
CV
P
ANDST
L
100000000
— accumulator value
10’s complement value
DS Used
HPP Used