6 5
H 3635
3 2
0 ␣
0 0
1 0
H 2020
H 3020
H 3456
H 3130
H 3030
␣␣
␣␣
H 3332
H 2020
H 3020
H 0012
H 0123
DT100
DT3
DT101
DT102
DT103
(characters)
[S2]…DT0
[D]…DT100
[D]
DT104
[i]…UL
[S1]…"%10.7b"
[N]…H
DT0
DT4
DT105
DT106
DT107
H 123
Convert 32-bit BCD data into decimal ASCII data (10 digits)
① 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 0000 0123 → DT100 to DT104: "␣␣ ␣ 0000123"
DT2 to DT3: H 0012 3456 → DT105 to DT109: "␣␣ ␣ 0123456"
0 ␣
2 1
4 3
H 3433
H 3231
DT108
DT109
DT110
H 0000
DT2
DT1
H 123456
[S2]
[S2+1]
[S2+2]
[S2+3]
Example 11) Converting 32-bit single-precision floating point real number data (2
data) to floating point ASCII data (8 digits x 2)
The high byte of DT100 is set as the beginning of the storage area. It is stored right-aligned
(high word side). A decimal point is added followed by no digit.
2E
**
.2EH 20
H 2020
␣ ␣
H 2020
H 20
3 2
- ␣
2 1
␣
␣ ␣
1 ␣
H 3231
H 2D20
H 3332
H 3120
123.4567
DT100
DT101
DT102
DT103
(characters)
[S2]…DT0
[D]…DT100
[D]
DT104
[i]…SF
[S1]…"%#8.0f"
[N]…H
DT0
DT105
DT106
DT107
Convert 32-bit single precision real number data into floating point ASCII data (8 digits)
① ASCII data (reverse direction)
:
:
00020101
② Storage start position (1) [D]+1 bytes
③ Conversion data amount (2) Convert [S2] and [S2]+2
[S2]
② Storage start position = +1 bytes③ Conversion data amount = 2
DT0 to DT3: 123.4567 → DT100 to DT104: "␣␣ ␣ ␣ 123."
DT4 to DT7: -12.34567 → DT104 to DT108: "␣␣ ␣ ␣ -12."
.
DT108
DT109
-12.34567
DT2
DT4
␣
**
H **
**
DT1
DT3
DT5
[S2]
[S2+1]
[S2+2]
[S2+3]
14.9 BTOA (Conversion: BIN → ASCII)
WUME-FP7CPUPGR-12 14-41