Example 3) 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 reverse direction (the low
word side of [S2] is considered as high-order numerical data). For empty digits of the storage
area, zeros (0) are inserted.
③ Amount of conversion data (2) → Converts two 6-digit data
H 4241
B A
9 8
D C
0 0
1 0
3 2
H 4443
H 3030
H 3938
H 3332
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 (reverse direction)
:
:
00020001
② 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”.
Example 4) Converting two hexadecimal ASCII data (separated by commas) to two
10-bit binary data (decimal)
The conversion starts from the high byte of DT0. If there is no specification for the number of
digits, it is processed considering commas as the data delimiter. It is converted in reverse
direction (the low word side of [S2] is considered as high-order numerical data).
14.11 ATOB (Conversion: ASCII → BIN)
14-50 WUME-FP7CPUPGR-12