DL205 User Manual, 4th Edition, Rev. B
5–133
Chapter 5: Standard RLL Instructions - Number Conversion
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
Direct
SOFT
L
DD
V2000
X1
L
oad the
v
al
u
e
i
n
V2000
and
V2001
i
nto the a
ccu
m
u
lator
BC
D
C
P
L
T
akes a
10’
s
c
om
p
lement o
f
the
v
al
u
e
i
n the a
ccu
m
u
lator
OUT
D
V2010
C
o
p
y the
v
al
u
e
i
n the
a
ccu
m
u
lator to
V2010
and
V2011
Acc.
V2000
0 0 8 7
0 0 0 0
0 0 8 7
V2001
0 0 0 0
V2010
Acc.
9 9 1
3
9 9 9 9
9 9 1
3
V2011
9 9 9 9
STR
$
1
B
ENT
S
H
FT
AN
D
ST
L
3
D
3
D
2
C
0
A
0
A
0
A
ENT
S
H
FT
ENT
OUT
GX
S
H
FT
2
C
0
A
1
B
0
A
ENT
1
B
2
C
3
D
2
C
CV
P
AN
D
ST
L
100000000
— accumulator value
10’s compliment value
DS
Used
HPP Used