Submitted by Steve Fewell
Routine:areciple
Name: Floating-Point Reciple
Starting Address: &A5E9
Entry criteria: The FWA Contains a Floating-Point value.
Exit: The FWA contains the value of FWA = 1 / FWA.
Description:
Set argp to point to the Floating-Point Constant at &BF92 which contains the value 1.0.
This value is stored in the Floating-Point Constant table.
Jump to the Floating-Point divide routine to set the FWA to: FWA = argp / FWA.
The FWA will now contain the reciple value of the previous value in the FWA.
A5E9 | 169 146 | A9 92 | LDA#&92 | |
A5EB | 032 139 165 | 20 8B A5 | JSR &A58B | |
A5EE | ...Floating-Point Divide |
A589 | . | 169 046 | A9 2E | LDA#&2E |
A58B | J | 133 074 | 85 4A | STA &4A |
A58D | 169 191 | A9 BF | LDA#&BF | |
A58F | K | 133 075 | 85 4B | STA &4B |
A591 | ` | 096 | 60 | RTS |