floating point multiplication fix
This commit is contained in:
1 parent
54a1c6addd
commit
f51a712556
2 files changed
+3
-4
No files matched your search
@@ -199,7 +199,7 @@ Floating point mathematical routines - not official, but well known and broadly
|
|||||||
| `$B947` | `inv_FAC1_mantissa` | NOT DONE | |
|
| `$B947` | `inv_FAC1_mantissa` | NOT DONE | |
|
||||||
| `$B9EA` | `log_FAC1` | NOT DONE | |
|
| `$B9EA` | `log_FAC1` | NOT DONE | |
|
||||||
| `$BA28` | `mul_MEM_FAC1` | 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 | |
|
| `$BA8C` | `mov_MEM_FAC2` | DONE | |
|
||||||
| `$BA90` | `get_FAC2_via_INDEX` | NOT DONE | |
|
| `$BA90` | `get_FAC2_via_INDEX` | NOT DONE | |
|
||||||
| `$BAE2` | `mul10_FAC1` | DONE | |
|
| `$BAE2` | `mul10_FAC1` | DONE | |
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ mul_FAC2_FAC1:
|
|||||||
eor FAC2_sign
|
eor FAC2_sign
|
||||||
sta FAC1_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
|
jsr muldiv_RESHO_set_0
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@ mul_FAC2_FAC1:
|
|||||||
jsr muldiv_RESHO_01_add_A
|
jsr muldiv_RESHO_01_add_A
|
||||||
|
|
||||||
lda RESHO+0
|
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
|
sta RESHO+0
|
||||||
bcs !+
|
bcs !+
|
||||||
lda RESHO+1
|
lda RESHO+1
|
||||||
@@ -126,7 +126,6 @@ mul_FAC2_FAC1:
|
|||||||
adc #$08
|
adc #$08
|
||||||
bcs_16 set_FAC1_max // branch if overflow
|
bcs_16 set_FAC1_max // branch if overflow
|
||||||
sta FAC1_exponent
|
sta FAC1_exponent
|
||||||
|
|
||||||
jmp normal_FAC1
|
jmp normal_FAC1
|
||||||
|
|
||||||
mul_FAC2_FAC1_by_A:
|
mul_FAC2_FAC1_by_A:
|
||||||
|
|||||||
Reference in new issue
Block a user