Update FINLOG
This commit is contained in:
1 parent
eaa517f302
commit
7eda12aa34
3 files changed
+17
-9
No files matched your search
@@ -249,7 +249,7 @@ Floating point mathematical routines - not official, but well known and broadly
|
||||
| `$BCCC` | `int_FAC1` | DONE | From the Microsoft BASIC, original name: INT |
|
||||
| `$BCE9` | `clear_FAC1` | DONE | From the Microsoft BASIC, original name: CLRFAC |
|
||||
| `$BCF3` | `FIN` | PARTIAL | Only for 38k memory model + not fully tested yet |
|
||||
| `$BD7E` | `FINLOG` | DONE | |
|
||||
| `$BD7E` | `FINLOG` | DONE | From the Microsoft BASIC, original name: FINLOG |
|
||||
| `$BDDD` | `FOUT` | NOT DONE | outputs FAC1 to string at $0100 |
|
||||
| `$BF71` | `sqr_FAC1` | PARTIAL | needs `sqr_FAC2` |
|
||||
| `$BF74` | `sqr_FAC2` | NOT DONE | |
|
||||
|
||||
@@ -3,17 +3,24 @@
|
||||
;; #LAYOUT# * BASIC_0 #TAKE
|
||||
;; #LAYOUT# * * #IGNORE
|
||||
|
||||
;
|
||||
; This file is under the MIT license, it contains code released by Microsoft Corporation.
|
||||
; See LICENSE for more information.
|
||||
|
||||
; Math package - add an ASCII digit in A that has been converted to a signed integer to FAC1
|
||||
;
|
||||
; This is verified to be identical to the original Microsoft implementation where it was named FINLOG.
|
||||
;
|
||||
; See also:
|
||||
; - [CM64] Computes Mapping the Commodore 64 - page 113
|
||||
;
|
||||
|
||||
FINLOG:
|
||||
pha
|
||||
jsr mov_FAC1_FAC2
|
||||
pla
|
||||
jsr convert_A_to_FAC1
|
||||
jsr add_FAC2_FAC1
|
||||
rts
|
||||
pha
|
||||
jsr mov_r_FAC1_FAC2
|
||||
pla
|
||||
jsr convert_A_to_FAC1
|
||||
lda FAC2_sign
|
||||
eor FAC1_sign
|
||||
sta ARISGN ; Resultant sign
|
||||
ldx FAC1_exponent ; Set signs on thing to add
|
||||
jmp add_FAC2_FAC1
|
||||
+2
-1
@@ -20,7 +20,7 @@ int matches[MAX_SIZE];
|
||||
|
||||
int phase_mask[MAX_SIZE+MAX_SIZE];
|
||||
|
||||
#define NUM_CHUNKS 6
|
||||
#define NUM_CHUNKS 7
|
||||
// Pairs of start, end memory addresses of known exact similarity with the open source Microsoft BASIC
|
||||
unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
|
||||
0xB391, 0xB39D,
|
||||
@@ -28,6 +28,7 @@ unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
|
||||
0xB849, 0xB97D,
|
||||
0xB983, 0xB9BB,
|
||||
0xBA28, 0xBCF2,
|
||||
0xBD7E, 0xBD90,
|
||||
0xBFB4, 0xBFBE,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user