Update sqr_FAC1
This commit is contained in:
1 parent
5127e41643
commit
661f93a03d
3 files changed
+10
-5
No files matched your search
@@ -251,7 +251,7 @@ Floating point mathematical routines - not official, but well known and broadly
|
|||||||
| `$BCF3` | `FIN` | PARTIAL | Only for 38k memory model + not fully tested yet |
|
| `$BCF3` | `FIN` | PARTIAL | Only for 38k memory model + not fully tested yet |
|
||||||
| `$BD7E` | `FINLOG` | DONE | From the Microsoft BASIC, original name: FINLOG |
|
| `$BD7E` | `FINLOG` | DONE | From the Microsoft BASIC, original name: FINLOG |
|
||||||
| `$BDDD` | `FOUT` | DONE | From the Microsoft BASIC, original name: FOUT |
|
| `$BDDD` | `FOUT` | DONE | From the Microsoft BASIC, original name: FOUT |
|
||||||
| `$BF71` | `sqr_FAC1` | PARTIAL | needs `sqr_FAC2` |
|
| `$BF71` | `sqr_FAC1` | DONE | From the Microsoft BASIC, original name: SQR |
|
||||||
| `$BF74` | `sqr_FAC2` | NOT DONE | |
|
| `$BF74` | `sqr_FAC2` | NOT DONE | |
|
||||||
| `$BF78` | `pwr_FAC2_MEM` | PARTIAL | needs `pwr_FAC2_FAC1` |
|
| `$BF78` | `pwr_FAC2_MEM` | PARTIAL | needs `pwr_FAC2_FAC1` |
|
||||||
| `$BF7B` | `pwr_FAC2_FAC1` | NOT DONE | |
|
| `$BF7B` | `pwr_FAC2_FAC1` | NOT DONE | |
|
||||||
|
|||||||
@@ -3,9 +3,13 @@
|
|||||||
;; #LAYOUT# * BASIC_0 #TAKE
|
;; #LAYOUT# * BASIC_0 #TAKE
|
||||||
;; #LAYOUT# * * #IGNORE
|
;; #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
;
|
; This file is under the MIT license, it contains code released by Microsoft Corporation.
|
||||||
|
; See LICENSE for more information.
|
||||||
|
|
||||||
; Math package - square root of FAC1
|
; Math package - square root of FAC1
|
||||||
;
|
;
|
||||||
|
; This is verified to be identical to the original Microsoft implementation where it was named SQR.
|
||||||
|
;
|
||||||
; Note:
|
; Note:
|
||||||
; - transfers FAC1 to FAC2 and falls through to SQR2
|
; - transfers FAC1 to FAC2 and falls through to SQR2
|
||||||
;
|
;
|
||||||
@@ -20,9 +24,9 @@
|
|||||||
|
|
||||||
sqr_FAC1:
|
sqr_FAC1:
|
||||||
|
|
||||||
jsr mov_FAC1_FAC2
|
jsr mov_r_FAC1_FAC2
|
||||||
|
|
||||||
; FALLLTROUGH to sqr_FAC2
|
; FALLLTROUGH to sqr_FAC2
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+2
-1
@@ -20,7 +20,7 @@ int matches[MAX_SIZE];
|
|||||||
|
|
||||||
int phase_mask[MAX_SIZE+MAX_SIZE];
|
int phase_mask[MAX_SIZE+MAX_SIZE];
|
||||||
|
|
||||||
#define NUM_CHUNKS 12
|
#define NUM_CHUNKS 13
|
||||||
// Pairs of start, end memory addresses of known exact similarity with the open source Microsoft BASIC
|
// Pairs of start, end memory addresses of known exact similarity with the open source Microsoft BASIC
|
||||||
unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
|
unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
|
||||||
0xB391, 0xB39D,
|
0xB391, 0xB39D,
|
||||||
@@ -31,6 +31,7 @@ unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
|
|||||||
0xBD7E, 0xBD90,
|
0xBD7E, 0xBD90,
|
||||||
0xBDB3, 0xBDC1,
|
0xBDB3, 0xBDC1,
|
||||||
0xBDDD, 0xBF51,
|
0xBDDD, 0xBF51,
|
||||||
|
0xBF71, 0xBF73,
|
||||||
0xBFB4, 0xBFEC,
|
0xBFB4, 0xBFEC,
|
||||||
0xE043, 0xE08C,
|
0xE043, 0xE08C,
|
||||||
0xE264, 0xE2C2, // Two byte gap here is an optimization
|
0xE264, 0xE2C2, // Two byte gap here is an optimization
|
||||||
|
|||||||
Reference in new issue
Block a user