Prev: B97E Up: Map Next: B9BC
B983: shift FCAtemp << A+8 times
Used by the routine at BA28.
B983 A2 25 LDX #$25 set the offset to FACtemp
B985 B4 04 LDY $04,X get FACX mantissa 4
B987 84 70 STY $70 save as FAC1 rounding byte
B989 B4 03 LDY $03,X get FACX mantissa 3
B98B 94 04 STY $04,X save FACX mantissa 4
B98D B4 02 LDY $02,X get FACX mantissa 2
B98F 94 03 STY $03,X save FACX mantissa 3
B991 B4 01 LDY $01,X get FACX mantissa 1
B993 94 02 STY $02,X save FACX mantissa 2
B995 A4 68 LDY $68 get FAC1 overflow byte
B997 94 01 STY $01,X save FACX mantissa 1
This entry point is used by the routines at B862 and BC9B.
shift FACX -A times right (> 8 shifts)
B999 69 08 ADC #$08 add 8 to shift count
B99B 30 E8 BMI $B985 go do 8 shift if still -ve
B99D F0 E6 BEQ $B985 go do 8 shift if zero
B99F E9 08 SBC #$08 else subtract 8 again
B9A1 A8 TAY save count to Y
B9A2 A5 70 LDA $70 get FAC1 rounding byte
B9A4 B0 14 BCS $B9BA
B9A6 16 01 ASL $01,X shift FACX mantissa 1
B9A8 90 02 BCC $B9AC branch if +ve
B9AA F6 01 INC $01,X this sets b7 eventually
B9AC 76 01 ROR $01,X shift FACX mantissa 1 (correct for ASL)
B9AE 76 01 ROR $01,X shift FACX mantissa 1 (put carry in b7)
This entry point is used by the routines at B86A and BCBB.
shift FACX Y times right
B9B0 76 02 ROR $02,X shift FACX mantissa 2
B9B2 76 03 ROR $03,X shift FACX mantissa 3
B9B4 76 04 ROR $04,X shift FACX mantissa 4
B9B6 6A ROR A shift FACX rounding byte
B9B7 C8 INY increment exponent diff
B9B8 D0 EC BNE $B9A6 branch if range adjust not complete
B9BA 18 CLC just clear it
B9BB 60 RTS
Prev: B97E Up: Map Next: B9BC