9 8
B A
1 0
3 2
H 4241
H 3938
H 3332
H 3130
H 89AB
H 0123
DT0
DT101
DT1
DT2
DT3
(characters)
[S2]…DT0
[D]…DT100
[S2]
DT4
[i]…US
[S1]…"%4x"
[N]…H
DT100
DT102
Converts hexadecimal ASCII data (4-digit) to 16-bit data
① ASCII data (reverse direction)
:
:
00020001
② Conversion starting position (0) → [S2]+0 byte
③ Amount of conversion data (2) → Converts two 4-digit data
[D]
② Conversion starting position = +0 byte
③ Amount of data to be converted = 2
DT0 to DT1: "0123" → DT100: H 0123
DT2 to DT3: "89AB" → DT101: H 89AB
Example 2) Converting two hexadecimal ASCII data (6 digits) to two 32-bit binary
data (hexadecimal)
The conversion starts from the low byte of DT0. It is converted in forward direction (the high
word side of [S2] is considered as high-order numerical data). For empty digits of the storage
area, zeros (0) are inserted.
H 4241 B A
D C
9 8
3 2
1 0
0 0
H 3938
H 3332
H 4443
H 3030
H 3130
DT0
DT1
DT2
DT3
(characters)
[S2]…DT0
[D]…DT100
[S2]
DT4
[i]…UL
[S1]…"%6x"
[N]…H
DT5
Converts hexadecimal ASCII data (6-digit) to 32-bit data
① ASCII data (forward direction)
:
:
00020000
② Conversion starting position (0) → [S2]+0 byte
② Conversion starting position = + 0 byte
③ Amount of data to be converted = 2
DT0 to DT2: "000123" → DT100: H 0000 0123
DT3 to DT5: "89ABCD" → DT101: H 0089 ABCD
DT6
DT100
[D]
DT101
DT102
DT103
DT104
H 0000
H ABCD
H 89ABCD
H 123
H 0089
H 0123
* When the number of characters is smaller than
the number of converted bits, the portions that are
lacking are padded with “0”.
③ Amount of conversion data (2) → Converts two 6-digit data
14.11 ATOB (Conversion: ASCII → BIN)
WUME-FP7CPUPGR-12 14-49