Prev: BC5B Up: Map Next: BCBB
BC9B: convert FAC1 floating to fixed
Used by the routines at A9A5, B1B2, B7F7, BCCC and BDDD.
BC9B A5 61 LDA $61 get FAC1 exponent
BC9D F0 4A BEQ $BCE9 if zero go clear FAC1 and return
BC9F 38 SEC set carry for subtract
BCA0 E9 A0 SBC #$A0 subtract maximum integer range exponent
BCA2 24 66 BIT $66 test FAC1 sign (b7)
BCA4 10 09 BPL $BCAF branch if FAC1 +ve
FAC1 was -ve
BCA6 AA TAX copy subtracted exponent
BCA7 A9 FF LDA #$FF overflow for -ve number
BCA9 85 68 STA $68 set FAC1 overflow byte
BCAB 20 4D B9 JSR $B94D twos complement FAC1 mantissa
BCAE 8A TXA restore subtracted exponent
BCAF A2 61 LDX #$61 set index to FAC1
BCB1 C9 F9 CMP #$F9 compare exponent result
BCB3 10 06 BPL $BCBB if < 8 shifts shift FAC1 A times right and return
BCB5 20 99 B9 JSR $B999 shift FAC1 A times right (> 8 shifts)
BCB8 84 68 STY $68 clear FAC1 overflow byte
This entry point is used by the routine at BC5B.
BCBA 60 RTS
Prev: BC5B Up: Map Next: BCBB