AH500 Programming Manual 
6-454 
API    Instruction code  Operand 
Function 
2105  D  DABCD  P 
S, D 
Converting the ASCII code into the 
binary-coded decimal number 
Device
X  Y  M  S  T  C  HC  D  L  SM  SR  E  PR  K  16#  “$”  DF 
Pulse instruction  16-bit instruction (5-11 steps)
32-bit instruction (5-11 steps)
Symbol: 
S
:
Source value  Word/Double word 
D
:
Device in which the 
conversion result is stored 
Word/Double word 
Explanation: 
1.  The ASCII code in S is converted into the binary-coded decimal number, and the conversion 
result is stored in D. 
2.  The operand S used in the 16-bit instruction occupies two word devices, and the ASCII code in 
S should be within the range between 0000 and 9999. If S is a string, the string should be 
within the range between “0” and “9999”. 
 b15
 b0
 b15
 b0
 b7
 b8
 S
 S+1
 b3
 b4 b7
 b8
 b11
 b12
 D
ASCII code in 
the units place
ASCII code in 
the tens place
ASCII code in 
the hundreds place
ASCII code in 
the thousands place
Units place
Tens place
Hundreds place
Thousands place
 
If the ASCII code in S~S+1 is 8765, the conversion result is as follows. 
 b15
 b0
 b15
 b0
 b7 b8
 S
 S+1
 b3
 b4 b7
 b8
 b11
 b12
 16#37(7)  16#38(8)
 16#35(5)  16#36(6)
 5 6  7
 8
 D
 
3.  The operand S used in the 32-bit instruction occupies four word devices, and the ASCII code 
in S should be within the range between 0000000 and 99999999. If S is a string, the string 
should be within the range between “0” and “99999999”.