
6F3B0253
7. Instructions
FUN 062
HTOA
Hex to ASCII conversion
Expression
Input − [ A HTOA (n) B ]− Output
Function
When the input is ON, the hexadecimal data of n registers starting with A is converted into ASCII characters and stored in B and after. The uppermost digit of source A is stored in lower byte of destination B, and followed in this order. The allowable range of n is 1 to 32.
Execution condition
Input |
| Operation | Output |
OFF | No execution |
| OFF |
ON | Execution |
| ON |
Operand
| Name |
|
| Device |
|
|
|
|
|
|
|
| Register |
|
|
|
| Constant | Index | ||
|
| X | Y | R | S | T. | C. | XW | YW | RW | SW | T | C | D | I | J | K |
|
| ||
A | Source |
|
|
|
|
|
| √ | √ | √ | √ |
| √ | √ | √ | √ | √ | √ | √ |
|
|
n | Data size |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 - 32 |
|
B | Destination |
|
|
|
|
|
|
| √ |
| √ | √ | √ | √ | √ |
|
|
|
|
|
|
Example
When R010 is ON, 4 words data of D0100 to D0103 are converted into ASCII characters, and stored in 8 words registers starting with D0200.
D0100
D0101
D0102
D0103
F | 0 |
H0123
H4567
H89AB
HCDEF
D0220
Converted D0221 D0222 D0223 D0224 D0225 D0226 D0227
F | 8 7 | 0 |
|
| “1” (H31) | “0” (H30) |
|
| “3” (H33) | “2” (H32) |
|
| “5” (H35) | “4” (H34) |
|
| “7” (H37) | “6” (H36) |
|
| “9” (H39) | “8” (H38) |
|
| “B” (H42) | “A” (H41) |
|
“D” (H44) | “C” (H43) |
| |
| “F” (H46) | “E” (H45) |
|
Note
•If index register (I, J or K) is used for the operand A, only n = 1 is allowed. Otherwise, boundary error will occur.
Basic Hardware and Function 161