522
Floating-point Math Instructions Section 3-14
Description FVAL(449) converts the specified ASCII text number (starting at word S) to a
32-bit floating-point number (IEEE754-format) and outputs the result to the
destination words starting at D.
FVAL(449) can convert ASCII text in decimal or scientific notation if it meets
the following conditions:
• Decimal notation
Real numbers expressed with an integer and fractional part.
Example: 124.56
• Scientific notation
Real numbers expressed as an integer part, fractional part, and exponent
part.
Example: 1.2456E-2 (1.2456
×10
-2
)
The data format (decimal or scientific notation) is detected automatically.
The ASCII text must be stored in S and subsequent words in the following
order: leftmost byte of S, rightmost byte of S, leftmost byte of S+1, rightmost
byte of S+1, etc.
Data Registers ---
Index Registers ---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –()IR15
,IR0 to ,IR15
Area S D
2D 20
20 31
32 33
2E 34
35 36
37 38
00 00
−
SP SP 1 2 3 . 4 5 6 7 8
(2D)(20)(20)(31)(32)(33)(2E)(34)(35)(36)(37)(38)
15 87 0
−123.456
1110100101111001
1100001011110110
D
D+1
1110100101111001
1100001011110110
15 0
Decimal notation
Exponent
Spaces are
ignored during
conversion
Sign
32-bit floating-point data
If there are more than 6 digits, the 7th
and higher digits are ignored.
(Digits do not include the sign, decimal
point, and exponent characters.)
Conversion of ASCII text number to
32-bit floating-point data
Stored in D and D+1.
2D 20
20 31
2E 32
33 34
45 2B
30 32
00 00
−
SP SP 1 . 2 3 4 E + 0 2
(2D)(20)(20)(31)(2E)(32)(33)(34)(45)(2D)(31)(38)
15 87 0
−1.234×10
2
1100110011001101
1100001011110110
D
D+1
1100110011001101
1100001011110110
15 0
Scientific notation
Exponent
Spaces are
ignored during
conversion
Sign
32-bit floating-point data
Conversion of ASCII text number
to 32-bit floating-point data
Stored in D and D+1.