Add abs_and_normal_FAC1
This commit is contained in:
1 parent
81eb67adb8
commit
a83aecad0a
3 files changed
+25
-1
No files matched your search
@@ -210,6 +210,7 @@ Floating point mathematical routines - not official, but well known and broadly
|
|||||||
| `$B862` | `add_align_exponents` | DONE | |
|
| `$B862` | `add_align_exponents` | DONE | |
|
||||||
| `$B867` | `add_MEM_FAC1` | DONE | |
|
| `$B867` | `add_MEM_FAC1` | DONE | |
|
||||||
| `$B86A` | `add_FAC2_FAC1` | DONE | |
|
| `$B86A` | `add_FAC2_FAC1` | DONE | |
|
||||||
|
| `$B8D2` | `abs_and_normal_FAC` | DONE | From the Microsoft BASIC, original name: FADFLT |
|
||||||
| `$B8FE` | `normal_FAC1` | DONE | |
|
| `$B8FE` | `normal_FAC1` | DONE | |
|
||||||
| `$B947` | `inv_FAC1_mantissa` | DONE | From the Microsoft BASIC, original name: NEGFAC |
|
| `$B947` | `inv_FAC1_mantissa` | DONE | From the Microsoft BASIC, original name: NEGFAC |
|
||||||
| `$B96F` | `inc_FAC1` | DONE | From the Microsoft BASIC, original name: INCFAC |
|
| `$B96F` | `inc_FAC1` | DONE | From the Microsoft BASIC, original name: INCFAC |
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
;; #LAYOUT# STD * #TAKE
|
||||||
|
;; #LAYOUT# X16 BASIC_0 #TAKE-OFFSET 2000
|
||||||
|
;; #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 - abs and noramlize FAC1
|
||||||
|
;
|
||||||
|
; Input:
|
||||||
|
; CF - Sign of number
|
||||||
|
;
|
||||||
|
; This is verified to be identical to the original Microsoft implementation where it was named FADFLT.
|
||||||
|
;
|
||||||
|
|
||||||
|
abs_and_normal_FAC1:
|
||||||
|
|
||||||
|
bcs normal_FAC1 ; If CF set only normalize
|
||||||
|
jsr inv_FAC1
|
||||||
|
|
||||||
|
; Fallthrough to normal_FAC1
|
||||||
+2
-1
@@ -20,10 +20,11 @@ int matches[MAX_SIZE];
|
|||||||
|
|
||||||
int phase_mask[MAX_SIZE+MAX_SIZE];
|
int phase_mask[MAX_SIZE+MAX_SIZE];
|
||||||
|
|
||||||
#define NUM_CHUNKS 7
|
#define NUM_CHUNKS 8
|
||||||
// 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] = {
|
||||||
0xB849, 0xB84F,
|
0xB849, 0xB84F,
|
||||||
|
0xB8D2, 0xB8D5,
|
||||||
0xB947, 0xB97D,
|
0xB947, 0xB97D,
|
||||||
0xB983, 0xB9BB,
|
0xB983, 0xB9BB,
|
||||||
0xBBA2, 0xBC1A,
|
0xBBA2, 0xBC1A,
|
||||||
|
|||||||
Reference in new issue
Block a user