Mercurial > hg > index.cgi
diff src/int.s @ 108:b1958992a66a
Properly initialize result for integer multiplication
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 03 Dec 2023 14:57:19 -0700 |
parents | b375a38b2b1a |
children | b10f6c8979a5 |
line wrap: on
line diff
--- a/src/int.s Mon Oct 30 22:26:44 2023 -0600 +++ b/src/int.s Sun Dec 03 14:57:19 2023 -0700 @@ -204,8 +204,9 @@ ; ; The agorithm is simply this: zero out the result, then multiply fpa0 by each byte of fpa1 and then add the result ; to the result location. This yields a 64 bit product which is somewhat wasteful. -util_mul32 ldd zero ;* zero out result bits; low 16 bits don't need to be cleared and - stb fpaextra+3 ;* upper 24 bits also don't +util_mul32 ldd zero ;* zero out result bits; low 16 bits don't need to be cleared + std fpaextra + std fpaextra+2 std fpaextra+4 ldb fpa1+fpa.sig+3 ; multiply by low byte of fpa1 - no carries possible for this iteration lda fpa0+fpa.sig+3