Apple ii Battery Charger User Manual


 
- 3 81 A0 00 00
- 4 81 80 00 00
- 5 82 B0 00 00
- 7 82 90 00 00
-12 83 A0 00 00
-15 83 88 00 00
-17 84 BC 00 00
-20 84 B0 00 00
-60 85 88 00 00
FLOATING POINT SUBROUTINE DESCRIPTIONS
FCOMPL subroutine (address $F4A4)
Purpose: FCOMPL is used to negate floating point numbers.
Entry: A normalized or unnormalized value is in FP1 (floating point
accumulator 1).
Uses: NORM, RTLOG.
Exit: The value in FP1 is negated and then normalized to retain precision.
The 3-byte FP1 extension, E, may also be altered but FP2 and SIGN are not
disturbed. The 6502 A-REG is altered and the X-REG is cleared. The Y-REG
is not disturbed.
Caution: Attempting to negate -2^128 will result in an overflow since
+2^128 is not representable, and a jump to location $3F5 will be executed,
with the following contents in FP1.
_____ _____ _____ _____
| | | | | | | |
FP1: | 0 | | $80 | | 0 | | 0 |
|_____| |_____| |_____| |_____|
X1 M1
Example: Prior to calling FCOMPL, FP1 contains +15.
_____ _____ _____ _____
| | | | | | | |
FP1: | $83 | | $78 | | 0 | | 0 | (+15)
|_____| |_____| |_____| |_____|
X1 M1
After calling FCOMPL as a subroutine, FP1 contains -15.
_____ _____ _____ _____
| | | | | | | |
FP1: | $83 | | $88 | | 0 | | 0 | (+15)
|_____| |_____| |_____| |_____|
X1 M1