# HG changeset patch # User William Astle # Date 1698726304 21600 # Node ID eecb576c76c6454388c791567ed4bd64ca0fe6af # Parent 2f97bfecffab9f642f99f246880622ac9468dcdd Make normalization use the extra precision in the fp accumulator diff -r 2f97bfecffab -r eecb576c76c6 src/fps.s --- a/src/fps.s Mon Oct 30 22:20:06 2023 -0600 +++ b/src/fps.s Mon Oct 30 22:25:04 2023 -0600 @@ -355,17 +355,17 @@ sta fpa0+fpa.sig+2 lda fpa0+fpa.sig+4 sta fpa0+fpa.sig+3 - lda fpaextra + lda fpa0+fpa.extra sta fpa0+fpa.sig+4 - lda fpaextra+1 - sta fpaextra - lda fpaextra+2 - sta fpaextra+1 - lda fpaextra+3 - sta fpaextra+2 - lda fpaextra+4 - sta fpaextra+3 - clr fpaextra+4 + lda fpa0+fpa.extra+1 + sta fpa0+fpa.extra + lda fpa0+fpa.extra+2 + sta fpa0+fpa.extra+1 + lda fpa0+fpa.extra+3 + sta fpa0+fpa.extra+2 + lda fpa0+fpa.extra+4 + sta fpa0+fpa.extra+3 + clr fpa0+fpa.extra+4 subb #2 ; account for two digit positions cmpb #-10 ; have we shifted the whole set of digits (assumes originally normalized) bgt fps_normalize0 ; brif not @@ -374,25 +374,25 @@ fps_normalize5 rts fps_normalize1 bita #0xf0 ; is the high digit zero? bne fps_normalize3 ; brif not - lsl fpaextra ; only need to shift one extra position here since there won't be more shifts + lsl fpa0+fpa.extra ; only need to shift one extra position here since there won't be more shifts rol fpa0+fpa.sig+4 rol fpa0+fpa.sig+3 rol fpa0+fpa.sig+2 rol fpa0+fpa.sig+1 rol fpa0+fpa.sig - lsl fpaextra + lsl fpa0+fpa.extra rol fpa0+fpa.sig+4 rol fpa0+fpa.sig+3 rol fpa0+fpa.sig+2 rol fpa0+fpa.sig+1 rol fpa0+fpa.sig - lsl fpaextra + lsl fpa0+fpa.extra rol fpa0+fpa.sig+4 rol fpa0+fpa.sig+3 rol fpa0+fpa.sig+2 rol fpa0+fpa.sig+1 rol fpa0+fpa.sig - lsl fpaextra + lsl fpa0+fpa.extra rol fpa0+fpa.sig+4 rol fpa0+fpa.sig+3 rol fpa0+fpa.sig+2