Add mov_RES_FAC1 (MOVFR)

This commit is contained in:
Rikard Nordgren authored and FeralChild64 committed 2026-04-12 13:13:18 +02:00
1 parent 9cbbc061ae
commit 7a37b76d10
4 files changed
+27 -2

No files matched your search

+1
View File
@@ -227,6 +227,7 @@ Floating point mathematical routines - not official, but well known and broadly
| `$BAFE` | `div10_FAC1_p` | DONE | |
| `$BB0F` | `div_MEM_FAC1` | DONE | |
| `$BB12` | `div_FAC2_FAC1` | DONE | |
| `$BB8F` | `mov_RES_FAC1` | DONE | From the Microsoft BASIC, original name: MOVFR |
| `$BBA2` | `mov_MEM_FAC1` | DONE | From the Microsoft BASIC, original name: MOVFM |
| `$BBA6` | `get_FAC1_via_INDEX` | DONE | From the Microsoft BASIC, no label |
| `$BBC7` | `mov_r_FAC1_TMP2` | DONE | From the Microsoft BASIC, original name: MOV2F |
+1 -1
View File
@@ -33,7 +33,7 @@
!addr TEMPST = $19 ; $19-$21 temporary string stack descriptors
!addr INDEX = $22 ; $22-$23 INDEX1 vector
!addr INDEX2 = $24 ; $24-$25 INDEX2 vector
!addr RESHO = $26 ; $26-$2A temporary variables, [!] our usage might be different
!addr RESHO = $26 ; $26-$2A floating point result
!addr TXTTAB = $2B ; $2B-$2C start of BASIC code
!addr VARTAB = $2D ; $2D-$2E end of BASIC code, start of variables
!addr ARYTAB = $2F ; $2F-$30 pointer to start of array storage
+24
View File
@@ -0,0 +1,24 @@
;; #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 - Copy RES to FAC1
;
; This is verified to be identical to the original Microsoft implementation where it was named MOVFR.
;
mov_RES_FAC1:
lda RESHO
sta FAC1_mantissa
lda RESHO+1
sta FAC1_mantissa+1
lda RESHO+2
sta FAC1_mantissa+2
lda RESHO+3
sta FAC1_mantissa+3
jmp normal_FAC1
+1 -1
View File
@@ -28,7 +28,7 @@ unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = {
0xB849, 0xB97D,
0xB983, 0xB9BB,
0xBA8C, 0xBAB6,
0xBBA2, 0xBC1A,
0xBB8F, 0xBC1A,
0xBC2B, 0xBCF2,
};