floating point multiplication fix

This commit is contained in:
FeralChild64 committed 2020-03-08 13:22:44 +01:00
1 parent 54a1c6addd
commit f51a712556
2 files changed
+3 -4

No files matched your search

+1 -1
View File
@@ -199,7 +199,7 @@ Floating point mathematical routines - not official, but well known and broadly
| `$B947` | `inv_FAC1_mantissa` | NOT DONE | |
| `$B9EA` | `log_FAC1` | NOT DONE | |
| `$BA28` | `mul_MEM_FAC1` | DONE | |
| `$BA2B` | `mul_FAC2_FAC1` | PARTIAL | needs retest after rework |
| `$BA2B` | `mul_FAC2_FAC1` | DONE | |
| `$BA8C` | `mov_MEM_FAC2` | DONE | |
| `$BA90` | `get_FAC2_via_INDEX` | NOT DONE | |
| `$BAE2` | `mul10_FAC1` | DONE | |
+2 -3
View File
@@ -44,7 +44,7 @@ mul_FAC2_FAC1:
eor FAC2_sign
sta FAC1_sign
// Add the exponents (subtract the bias) XXX subroutines should be common with DIV
// Add the exponents (subtract the bias) - XXX can this be optimized somehow?
jsr muldiv_RESHO_set_0
@@ -55,7 +55,7 @@ mul_FAC2_FAC1:
jsr muldiv_RESHO_01_add_A
lda RESHO+0
sbc #($80 - $08) // we need to correct double BIAS and shifted mantissa
sbc #$80 // we need to correct double BIAS
sta RESHO+0
bcs !+
lda RESHO+1
@@ -126,7 +126,6 @@ mul_FAC2_FAC1:
adc #$08
bcs_16 set_FAC1_max // branch if overflow
sta FAC1_exponent
jmp normal_FAC1
mul_FAC2_FAC1_by_A: