High−level Instructions
3 − 168
Conversion Example
The following shows conversion from BCD data to ASCII codes.
Normal direction convertion of 4 bytes (S2 = H0004)
ASCII HEX
code
12 34 56 78
S1+1 S1
BCD data
4 bytes
34 33 36 35
D+1 D
Converted result
Result of S1 + 1
conversion
Result of S1
conversion
D+3 D+2
38 3732 31
43658721
BCD H code
ASCII
character
F73 (BCDA) instruction execution
Reverse direction convertion of 4 bytes (S2 = H1004)
Result of S1 + 1
conversion
Result of S1
conversion
ASCII HEX
code
BCD data
4 bytes
D+1
Converted result
D+3 D+2
BCD H code
ASCII
character
12 34 56 78
S1+1 S1
34 3336 3538 37 32 31
436587 21
D
F73 (BCDA) instruction execution
ASCII HEX code to express BCD character
BCD character ASCII HEX
code
0
1
2
3
4
5
6
7
8
9
H30
H31
H32
H33
H34
H35
H36
H37
H38
H39