changeset 104:eecb576c76c6

Make normalization use the extra precision in the fp accumulator
author William Astle <lost@l-w.ca>
date Mon, 30 Oct 2023 22:25:04 -0600
parents 2f97bfecffab
children 65cb0a0297b3
files src/fps.s
diffstat 1 files changed, 14 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- 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