Kaiyi — 6.21.2 Explanation of String Processing Instructions

AH500 Programming Manual Symbol: S : Source value Word/Double word D : Device in which the conversion result is stored Word Explanation: 1. The hexadecimal binary number in S is converted into the ASCII code, and the conversion result is stored in D . 2. The instruction supports SM690, which controls the ending character. 3. The value in S used in the 16-bit instruction should be within the range between 16#0000 and 16#FFFF, and should be a four-digit binary number. The operand D occupies three word devices. The data is converted as follows. b15 b0 b15 b0 b7 b8 S D D +1 +2 16-bit binary number D If SM690 is OFF, 16#0000 is stored in D +2. If SM690 is ON, the value in D +2 is unchanged.

For example, if the value in S is 16#02A6 and SM690 is OFF, the conversion result is as follows. b15 b0 b15 b0 b7 b8 S 16#02A6 4. The value in S used in the 32-bit instruction should be within the range between 16#00000000 and 16#FFFFFFFF, and should be an eight-digit binary number. The operand D occupies five word devices. The data is converted as follows.

b15 b0 b7 b8 D D +1 D +2 D +4 D +3 6-447 API Instruction code Operand Function 2101 D BINHA P S, D Converting the binary hexadecimal number into the hexadecimal ASCII code 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 steps) 32-bit instruction (5 steps) AH AH AH Third AS CII code Fourth ASCII code First ASCII code Second ASCII code Ending character (16#0000 or unchanged) 16#32(2) 16#30(0) 16#36(6) 16#41(A) 16#0000 S +1 S High 16 bits Low 16 bits 32-bit binary number Seventh ASCII code Eighth ASCII code Fifth ASCII code Sixth ASCII code Third AS CII code Fourth ASCII code First ASCII code Second A SCII code Ending character (16#0000 or unchanged)