|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|
|7 6 5 4 3 2 1 0|7 6.5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|
| | | | |
| BYTE N | BYTE N+1 | BYTE N+2 | BYTE N+3 |
| | | | |
| | MOST SIG BYTE | | LEAST SIG BYTE|
| | MANTISSA | | MANTISSA |
| | | | |
|<- EXPONENT ->|<--- THREE BYTE MANTISSA --->|
| (TWOS COMPLEMENT REPRESENTATION) |
|<---- FOUR-BYTE FLOATING POINT OPERAND ---->|
The exponent byte is a binary scaling factor for the
Mantissa. The exponent is a standard two's comple-
ment representation except that the sign bit is comple-
mented and runs from +128 to +127. For example:
$00 is -128
$01 is -127
*
*
$7F is -1
$80 is 0
$81 is -1
*
*
$FF is 127
The mantissa is standard two's complement repre-
sentation with the sign bit in the most significant bit of
the high order byte. The assumed decimal point is be-
tween bits 6 and 7 of the most significant byte. Thus the
normalized mantissa ranges in absolute value from 1 to
2. Except when the exponent has a value of +128 the
mantissa is normalized to retain maximum precision.
The mantissa is normalized if the upper two bits of the
high-order mantissa byte are unequal. Thus a normal-
ized mantissa is of the following form:
01.xxxxxx positive mantissa (high byte)
10.xxxxxx negative mantissa (high byte)
Assumed binary point
Some sample floating point numbers in hex
83 50 00 00 10.
80 40 00 00 1.
7C 66 66 66 .1
00 00 00 00 0.
FC 99 99 9A -.1
7F 80 00 00 -1.
83 B0 00 00 -10.
The routines are all entered using a JSR instruction.
Base page locations $004-$007 are referred to as
exp/mant2 while $0008-000b are referred to as exp/