Chapter 6 Instruction and Flag List
XBC E-Type Main Unit 6-242 Ve r. 1
6.34.6 DABCD, DABCDP, DDABCD, DDABCDP
Instruction
Step
P M K F L T C S Z D.x
R.x
U N D R
DABCD(P)
DDABCD(P)
2~4 O - -
Address where decimal ASCII data to convert to BCD is saved
D Address to save operation result in BCD
[Flag Setting]
Flag Description Device Number
Error
If ASCII string exceeds BCD range(0~9, h30 ~ h39 in ASCII)
If ASCII string length exceeds 4(DABCD)/8(DDABCD)
F110
1) DABCD (Decimal ASCII to BCD)
(1) Converts decimal value saved in ASCII to BCD and saves in D.
(2) Data D will be saved as unsigned.
(3) In DABCD, operation range is h0000 ~ h9999.
S+1
S+2
h37 (7)
h38 (8)
h35 (5)
h36 (6)
h00 (NULL)
S
b15 b0b8 b7
S
b15 b0b8 b4
b12 b11 b3b7
8 7 6 5
2) DDABCD (Double Decimal ASCII to BCD)
(1) Converts decimal value saved in ASCII to BCD and saves in D.
(2) Data D will be saved as unsigned.
(3) In DDABCD, operation range is h00000000 ~ h99999999.
10000000-digit ASCII code