adding of floating point values works now
This commit is contained in:
1 parent
ad70af9d73
commit
586ee998c6
2 files changed
+16
-9
No files matched your search
@@ -191,22 +191,22 @@ Floating point mathematical routines - not official, but well known and broadly
|
||||
| `$B849` | `add_HALF_FAC1` | NOT DONE | |
|
||||
| `$B850` | `sub_MEM_FAC1` | PARTIAL | needs `add_FAC2_FAC1` |
|
||||
| `$B853` | `sub_FAC2_FAC1` | PARTIAL | needs `add_FAC2_FAC1` |
|
||||
| `$B862` | `add_align_exponents` | PARTIAL | not tested yet |
|
||||
| `$B862` | `add_align_exponents` | DONE | |
|
||||
| `$B867` | `add_MEM_FAC1` | PARTIAL | needs `add_FAC2_FAC1` |
|
||||
| `$B86A` | `add_FAC2_FAC1` | PARTIAL | not tested yet |
|
||||
| `$B8FE` | `normal_FAC1` | PARTIAL | not tested yet |
|
||||
| `$B86A` | `add_FAC2_FAC1` | PARTIAL | aubstration not tested yet |
|
||||
| `$B8FE` | `normal_FAC1` | PARTIAL | not fully tested yet |
|
||||
| `$B947` | `inv_FAC1_mantissa` | NOT DONE | |
|
||||
| `$B983` | `MULSHF` | NOT DONE | |
|
||||
| `$B9EA` | `log_FAC1` | NOT DONE | |
|
||||
| `$BA28` | `mul_MEM_FAC1` | PARTIAL | needs `mul_FAC2_FAC1` |
|
||||
| `$BA2B` | `mul_FAC2_FAC1` | NOT DONE | |
|
||||
| `$BA59` | `MLTPLY` | NOT DONE | |
|
||||
| `$BA8C` | `mov_MEM_FAC2` | PARTIAL | not fully tested yet |
|
||||
| `$BA8C` | `mov_MEM_FAC2` | DONE | |
|
||||
| `$BAE2` | `mul10_FAC1` | NOT DONE | |
|
||||
| `$BAFE` | `div10_FAC1_p` | NOT DONE | |
|
||||
| `$BB0F` | `div_MEM_FAC1` | PARTIAL | needs `div_FAC2_FAC1` |
|
||||
| `$BB12` | `div_FAC2_FAC1` | NOT DONE | |
|
||||
| `$BBA2` | `mov_MEM_FAC1` | PARTIAL | not fully tested yet |
|
||||
| `$BBA2` | `mov_MEM_FAC1` | DONE | |
|
||||
| `$BBC7` | `mov_r_FAC1_TMP2` | PARTIAL | not fully tested yet |
|
||||
| `$BBCA` | `mov_r_FAC1_TMP1` | PARTIAL | not fully tested yet |
|
||||
| `$BBD0` | `mov_r_FAC1_VAR` | PARTIAL | not fully tested yet |
|
||||
|
||||
@@ -62,10 +62,10 @@ add_FAC2_FAC1:
|
||||
adc FAC1_mantissa+0
|
||||
sta FAC1_mantissa+0
|
||||
|
||||
bcc add_FAC2_FAC1_normalize // end if no need to adapt the exponent
|
||||
bcc_16 normal_FAC1 // end if no need to adapt the exponent
|
||||
|
||||
inc FAC1_exponent
|
||||
bne add_FAC2_FAC1_normalize // end if no overflow
|
||||
bne add_FAC2_FAC1_adapt_mantissa // end if no overflow
|
||||
|
||||
lda #$FF
|
||||
sta FAC1_exponent
|
||||
@@ -80,6 +80,13 @@ add_FAC2_FAC1_done:
|
||||
|
||||
rts
|
||||
|
||||
add_FAC2_FAC1_normalize:
|
||||
add_FAC2_FAC1_adapt_mantissa:
|
||||
|
||||
sec
|
||||
ror FAC1_mantissa+0
|
||||
ror FAC1_mantissa+1
|
||||
ror FAC1_mantissa+2
|
||||
ror FAC1_mantissa+3
|
||||
ror FACOV
|
||||
|
||||
jmp normal_FAC1
|
||||
rts
|
||||
Reference in new issue
Block a user