Update cos_FAC1
This commit is contained in:
1 parent
18e51b855b
commit
113b3cf7c2
3 files changed
+11
-5
No files matched your search
@@ -262,7 +262,7 @@ Floating point mathematical routines - not official, but well known and broadly
|
||||
| `$E097` | `rnd_FAC1` | DONE | |
|
||||
| `$E09A` | `rnd_A` | DONE | |
|
||||
| `$E0BE` | `rnd_generate` | DONE | |
|
||||
| `$E264` | `cos_FAC1` | PARTIAL | not fully tested yet |
|
||||
| `$E264` | `cos_FAC1` | DONE | From the Microsoft BASIC, original name: COS |
|
||||
| `$E26B` | `sin_FAC1` | PARTIAL | not fully tested yet |
|
||||
| `$E2B4` | `tan_FAC1` | PARTIAL | not fully tested yet |
|
||||
| `$E30E` | `atn_FAC1` | DONE | From the Microsoft BASIC, original name: ATN |
|
||||
|
||||
@@ -2,9 +2,13 @@
|
||||
;; #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 - cosine of FAC1 in radians
|
||||
;
|
||||
; This is verified to be identical to the original Microsoft implementation where it was named COS
|
||||
;
|
||||
; Adds pi/2 to FAC1 and falls through to the sine function
|
||||
;
|
||||
; See also:
|
||||
@@ -18,10 +22,11 @@
|
||||
|
||||
|
||||
COS:
|
||||
ldy #>const_HALF_PI
|
||||
|
||||
lda #<const_HALF_PI
|
||||
ldy #>const_HALF_PI
|
||||
jsr add_MEM_FAC1
|
||||
|
||||
|
||||
; FALLTHROUGH to SIN
|
||||
|
||||
|
||||
|
||||
+2
-1
@@ -20,7 +20,7 @@ int matches[MAX_SIZE];
|
||||
|
||||
int phase_mask[MAX_SIZE+MAX_SIZE];
|
||||
|
||||
#define NUM_CHUNKS 10
|
||||
#define NUM_CHUNKS 11
|
||||
// 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,
|
||||
@@ -32,6 +32,7 @@ unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
|
||||
0xBDB3, 0xBDC1,
|
||||
0xBDDD, 0xBF51,
|
||||
0xBFB4, 0xBFEC,
|
||||
0xE264, 0xE26A,
|
||||
0xE30E, 0xE37A,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user