From d35e3011030538db2b48850c811076a0da934149 Mon Sep 17 00:00:00 2001 From: Rikard Nordgren Date: Mon, 26 Jan 2026 19:16:00 +0100 Subject: [PATCH] Update mov_r_FAC1_VAR --- STATUS.md | 2 +- src/basic/math_mov/bbd0.mov_r_FAC1_VAR.s | 9 +++++++-- tools/similarity.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/STATUS.md b/STATUS.md index ccb1b8b4..99c892ad 100644 --- a/STATUS.md +++ b/STATUS.md @@ -225,7 +225,7 @@ Floating point mathematical routines - not official, but well known and broadly | `$BBA6` | `get_FAC1_via_INDEX` | DONE | | | `$BBC7` | `mov_r_FAC1_TMP2` | PARTIAL | not fully tested yet | | `$BBCA` | `mov_r_FAC1_TMP1` | PARTIAL | not fully tested yet | -| `$BBD0` | `mov_r_FAC1_VAR` | PARTIAL | not fully tested yet | +| `$BBD0` | `mov_r_FAC1_VAR` | DONE | From the Microsoft BASIC, original name: MOVVF | | `$BBD4` | `mov_r_FAC1_MEM` | DONE | From the Microsoft BASIC, original name: MOVMF | | `$BBFC` | `mov_FAC2_FAC1` | DONE | From the Microsoft BASIC, original name: MOVFA | | `$BC0C` | `mov_r_FAC1_FAC2` | DONE | From the Microsoft BASIC, original name: MOVAF | diff --git a/src/basic/math_mov/bbd0.mov_r_FAC1_VAR.s b/src/basic/math_mov/bbd0.mov_r_FAC1_VAR.s index 9de76027..6330dd3b 100644 --- a/src/basic/math_mov/bbd0.mov_r_FAC1_VAR.s +++ b/src/basic/math_mov/bbd0.mov_r_FAC1_VAR.s @@ -3,9 +3,14 @@ ;; #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 - move FAC1 (rounds) to memory variable ; +; This is verified to be identical to the original Microsoft implementation where it was named MOVVF. +; ; Input: ; - FORPNT ($49/$4A) - variable address ; @@ -15,7 +20,7 @@ mov_r_FAC1_VAR: - ldy #FORPNT+1 ldx #FORPNT+0 + ldy #FORPNT+1 ; FALLTROUGH to mov_r_FAC1_MEM diff --git a/tools/similarity.c b/tools/similarity.c index 5b62e59b..2108dd72 100644 --- a/tools/similarity.c +++ b/tools/similarity.c @@ -24,7 +24,7 @@ int phase_mask[MAX_SIZE+MAX_SIZE]; // Pairs of start, end memory addresses of known exact similarity with the open source Microsoft BASIC unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = { 0xB849, 0xB84F, - 0xBBD4, 0xBC1A + 0xBBD0, 0xBC1A };