Chapter 6 Applied Instructions API 2105 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 b3 b4 b7 b8 b11 b12 D S+1 Thousands place Hundreds place Tens place Units place If the ASCII code in S ~ S +1 is 8765, the conversion result is as follows.
S b15 b0 b15 b0 b7 b8 b3 b4 b7 b8 b11 b12 D S+1 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”.
6-455 Instruction code Operand Function 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 S D Pulse instruction 16-bit instruction (5-11 steps) 32-bit instruction (5-11 steps) AH500 AH500 AH500 ASCII code in the hundreds place ASCII code in the thousands place ASCII code in the units place ASCII code in the tens place 16#37(7) 16#38(8) 16#35(5) 16#36(6) 8 7 6 5