6F3B0250
Basic Hardware and Function
179
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.
F
0
F
8 7
0
D0100
H0123
D0220
“1” (H31)
“0” (H30)
D0101
H4567
Converted
D0221
“3” (H33)
“2” (H32)
D0102
H89AB
D0222
“5” (H35)
“4” (H34)
D0103
HCDEF
D0223
“7” (H37)
“6” (H36)
D0224
“9” (H39)
“8” (H38)
D0225
“B” (H42)
“A” (H41)
D0226
“D” (H44)
“C” (H43)
D0227
“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.
T1S only
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: [email protected]