Submitted by Steve Fewell
Description:
Call routine &96DA to obtain the Floating-point value (at the BASIC text pointer location) and convert iy to a Float
value (if it was an Integer) and store it in the FWA.
If the FWA Number is zero then exit with FWA = 0.0 and A = #&FF (to indicate a Floating-Point result).
If the FWA value is negative then clear the FWA sign byte (to make the value positive), call the ATN calculation routine,
set the results (FWA) sign byte to #&FF (to make the value negative) [as after the ATN calculation, A = #&FF]
and exit.
Otherwise (FWA value is positive), jump to the ATN calculation routine and exit.
[&A8D5] The ATN Calculation routine:
If the FWA exponent is less than #&81 (i.e. the FWA value is less than 1) then jump to &A8EA to calculate ATN result
for an argument in the range 0.0 - 1.0) and exit.
A8C3 | 032 218 150 | 20 DA 96 | JSR &96DA Get and Check Float (convert if Int) | |
A8C6 | 032 242 163 | 20 F2 A3 | JSR &A3F2 Obtain Sign of the FWA Floating-Point value | |
A8C9 | [ | 240 091 | F0 5B | BEQ 91 --> &A926 Set A to #&FF and exit |
A8CB | 016 008 | 10 08 | BPL 8 --> &A8D5 | |
A8CD | d. | 100 046 | 64 2E | STZ &2E |
A8CF | 032 213 168 | 20 D5 A8 | JSR &A8D5 | |
A8D2 | . | 133 046 | 85 2E | STA &2E |
A8D4 | ` | 096 | 60 | RTS |
A8D5 | 0 | 165 048 | A5 30 | LDA &30 |
A8D7 | 201 129 | C9 81 | CMP#&81 | |
A8D9 | 144 015 | 90 0F | BCC 15 --> &A8EA | |
A8DB | 032 233 165 | 20 E9 A5 | JSR &A5E9 Floating-Point Reciple (FWA=1/FWA) | |
A8DE | 032 234 168 | 20 EA A8 | JSR &A8EA | |
A8E1 | 032 137 165 | 20 89 A5 | JSR &A589 Set argp to &BF2E | |
A8E4 | 032 138 166 | 20 8A A6 | JSR &A68A Floating-Point Subtraction [FWA=argp-FWA] | |
A8E7 | 169 255 | A9 FF | LDA#&FF | |
A8E9 | ` | 096 | 60 | RTS |
A8EA | 0 | 165 048 | A5 30 | LDA &30 |
A8EC | s | 201 115 | C9 73 | CMP#&73 |
A8EE | 6 | 144 054 | 90 36 | BCC 54 --> &A926 Set A to #&FF and exit |
A8F0 | 032 013 165 | 20 0D A5 | JSR &A50D Store FWA to &0476 and set argp to &0476 | |
A8F3 | v | 032 118 165 | 20 76 A5 | JSR &A576 Clear FWB Mantissa bytes 2 to 5 |
A8F6 | 169 128 | A9 80 | LDA#&80 | |
A8F8 | < | 133 060 | 85 3C | STA &3C |
A8FA | = | 133 061 | 85 3D | STA &3D |
A8FC | ; | 133 059 | 85 3B | STA &3B |
A8FE | 032 146 166 | 20 92 A6 | JSR &A692 FWA = FWA + FWB | |
A901 | 162 151 | A2 97 | LDX#&97 | |
A903 | 169 201 | A9 C9 | LDA#&C9 | |
A905 | 160 004 | A0 04 | LDY#&04 | |
A907 | a | 032 097 168 | 20 61 A8 | JSR &A861 Evaluate continued-fraction expansion series |
A90A | L | 076 159 169 | 4C 9F A9 | JMP &A99F Multiply FWA by variable at &0476 |