6F3B0253

7. Instructions

FUN 063

ATOH

ASCII to Hex conversion

Expression

Input [ A ATOH (n) B ]Output

Function

When the input is ON, the ASCII characters stored in n registers starting with A is converted into hexadecimal data and stored in B and after. The lower byte of source A is stored as uppermost digit of destination B, and followed in this order. The allowable ASCII character in the source table is “0” (H30) to “9” (H39) and “A” (H41) to “F” (H46). The allowablenger of n is 1 to 64.

Execution condition

Input

Operation

Output

ERF

OFF

No execution

OFF

ON

Normal execution

ON

 

Conversion data error (no execution)

OFF

Set

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 - 64

 

B

Destination

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example

When R011 is ON, the ASCII characters stored in 8 words of D0300 to D0307 are converted into hexadecimal data, and stored in 4 words registers starting with RW040.

D0300

D0301

D0302

D0303

D0304

D0305

D0306

D0307

F

8 7

0

 

 

F

0

 

“1” (H31)

“0” (H30)

 

RW040

 

H0123

 

“3” (H33)

“2” (H32)

Converted

RW041

 

H4567

 

“5” (H35)

“4” (H34)

 

RW042

 

H89AB

 

“7” (H37)

“6” (H36)

 

RW043

 

HCDEF

 

“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.

If n is odd number, lower 2 digits of the last converted data will not be fixed, Use even for n.

162 T1-16S User’s Manual

Page 164
Image 164
Toshiba 6F3B0253 user manual Atoh, Ascii to Hex conversion