H 412C
H 3842
8 B
H 3130
H 3332
␣␣
A
␣ 0
3 2
1 0
0 ␣
H 2030
H 2039
H 2020
H 3020
H 0123
DT100
DT101
DT102
DT103
(characters)
[S2]…DT0
[D]…DT100
[D]
DT104
[i]…US
[S1]…"%8.5X, "
[N]…H
DT0
DT105
DT106
DT107
Convert 16-bit data into hexadecimal ASCII data (8 digits)
① ASCII data (forward direction)
:
:
00020000
② Storage start position (0) [D]+0 bytes
③ Conversion data amount (2) Convert [S2] and [S2]+1
[S2]
[S2]+1
[S2]
② Storage start position = +0 bytes③ Conversion data amount = 2
DT0: H 0123 → DT100 to DT104: "2301␣ 0␣␣ ,"
DT1: H 89AB → DT104 to DT108: "AB89␣ 0␣␣ ,"
, ␣
H 2C20
DT108
DT109
H 89AB
DT1
DT2
,
H 123
H 89AB
␣ 9
Example 8) Converting unsigned 32-bit binary data (2 data) to hexadecimal ASCII
data (8 digits x 2)
The low byte of DT100 is set as the beginning of the storage area. It is stored right-aligned
(high word side) for 6 significant figures. The characters "0x" that represent Hex data are
added.
H 7830
H 3938
H ABCD
H 3332
H 3130
x 0
0 0
x 0
1 0
3 2
H 7830
H 3030
H 0089
H 0123
DT100
DT3
DT101
DT102
DT103
(characters)
[S2]…DT0
[D]…DT100
[D]
DT104
[i]…UL
[S1]…"%#8.6x"
[N]…H
DT0
DT4
DT105
DT106
DT107
H 123
Convert 32-bit data into hexadecimal ASCII data (8 digits) (add "0x")
① ASCII data (reverse direction)
:
:
00020001
② Storage start position (0) [D]+0 bytes
③ Conversion data amount (2) Convert [S2] and [S2]+2
[S2]
② Storage start position = +0 bytes③ Conversion data amount = 2
DT0 to DT1: H 0123 → DT100 to DT103: "0x000123"
DT2 to DT3: H 89AB → DT104 to DT107: "0x89abcd"
9 8
b a
d c
H 6463
H 6261
DT108
H 0000
DT2
DT1
H 89ABCD
[S2]
[S2+1]
[S2+2]
[S2+3]
14.9 BTOA (Conversion: BIN → ASCII)
WUME-FP7CPUPGR-12 14-39