642
Floating-point Math Instructions Section 3-15
• The content of C+1 (Total characters) specifies the number of ASCII char-
acters after conversion including the sign symbol, numbers, decimal point
and spaces.
• The content of C+2 (Fractional digits) specifies the number of digits (char-
acters) below the decimal point.
The ASCII text is stored in D and subsequent words in the following order:
leftmost byte of D, rightmost byte of D, leftmost byte of D+1, rightmost byte of
D+1, etc.
S
S+1
2D 20 20 31 2E 32 33 34 35 36
(−) (SP)(SP) (1) (,) (2) (3) (4) (5) (6)
15 87 0
2D 20 31 2E 32 33 45 2B 30 31
(−) (SP) (1) (,) (2) (3) (E) (+) (0) (0)
15 87 0
D: 20
31
32
34
00
2D
20
2E
33
00
20
2E
33
2B
30
00
2D
31
32
45
30
00
Decimal notation (C=0000 hex)
−1.23456
Example:
−1.23456
Floating-point
data
Scientific notation (C=0001 hex)
− 1.23E+00
Conversion to
ASCII text
Conversion to
ASCII text
Rounded off
(SP represents a space.)
(SP represents a space.)
Stored in destination words beginning with D.
Total characters = 8 (C+1 = 0008 hex)
Fractional digits = 3 (C+2 = 0003 hex)
ASCII characters are stored in order.
(Leftmost byte
→ rightmost byte)
Stored in destination words beginning with D.
Total characters = 10 (C+1 = 000A hex)
Fractional digits = 2 (C+2 = 0002 hex)
ASCII characters are stored in order.
(Leftmost byte
→ rightmost byte)