changeset 107:1f2f6c2a1fde

Use correct decimal exponent instead of binary for int to float conversion
author William Astle <lost@l-w.ca>
date Mon, 30 Oct 2023 22:26:44 -0600
parents 1396fe221ff7
children b1958992a66a
files src/fps.s
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/fps.s	Mon Oct 30 22:26:25 2023 -0600
+++ b/src/fps.s	Mon Oct 30 22:26:44 2023 -0600
@@ -913,7 +913,7 @@
                 std fpa0+fpa.sig
                 std fpa0+fpa.sig+2
                 sta fpa0+fpa.sig+4
-                ldd #0x5f20                     ; set exponent for decimal right of significand and 32 bit shifts
+                ldd #0x4920                     ; set exponent for decimal right of 10 digit significand
                 sta fpa0+fpa.exp                ; save exponent
                 stb fpa0+fpa.extra+4            ; save counter
                 bra fps_fromint2                ; skip digit check on the first iteration since none need adjustment