From 84eded300ce2206a7bc30ad7fafdae036742b786 Mon Sep 17 00:00:00 2001 From: Rikard Nordgren Date: Wed, 15 Apr 2026 18:50:58 +0200 Subject: [PATCH] Update pwr_FAC2_MEM --- STATUS.md | 2 +- src/basic/math_trans/bf78.pwr_FAC2_MEM.s | 6 +++++- tools/similarity.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/STATUS.md b/STATUS.md index e8d1a783..84d399ac 100644 --- a/STATUS.md +++ b/STATUS.md @@ -253,7 +253,7 @@ Floating point mathematical routines - not official, but well known and broadly | `$BDDD` | `FOUT` | DONE | From the Microsoft BASIC, original name: FOUT | | `$BF71` | `sqr_FAC1` | DONE | From the Microsoft BASIC, original name: SQR | | `$BF74` | `sqr_FAC2` | DONE | From the Microsoft BASIC, no label | -| `$BF78` | `pwr_FAC2_MEM` | PARTIAL | needs `pwr_FAC2_FAC1` | +| `$BF78` | `pwr_FAC2_MEM` | DONE | From the Microsoft BASIC, no label | | `$BF7B` | `pwr_FAC2_FAC1` | NOT DONE | | | `$BFB4` | `toggle_sign_FAC1` | DONE | From the Microsoft BASIC, original name: NEGOP | | `$BFED` | `exp_FAC1` | NOT DONE | | diff --git a/src/basic/math_trans/bf78.pwr_FAC2_MEM.s b/src/basic/math_trans/bf78.pwr_FAC2_MEM.s index be384011..396de292 100644 --- a/src/basic/math_trans/bf78.pwr_FAC2_MEM.s +++ b/src/basic/math_trans/bf78.pwr_FAC2_MEM.s @@ -3,9 +3,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 - set FAC1 as RAM raised to the power of FAC2 ; +; This is verified to be identical to the original Microsoft implementation where it had no name. +; ; Input: ; - .A - address low byte ; - .Y - address high byte diff --git a/tools/similarity.c b/tools/similarity.c index ec251c1c..1232d187 100644 --- a/tools/similarity.c +++ b/tools/similarity.c @@ -31,7 +31,7 @@ unsigned short microsoft_basic_chunks[NUM_CHUNKS * 2] = { 0xBD7E, 0xBD90, 0xBDB3, 0xBDC1, 0xBDDD, 0xBF51, - 0xBF71, 0xBF77, + 0xBF71, 0xBF7A, 0xBFB4, 0xBFEC, 0xE043, 0xE08C, 0xE264, 0xE2C2, // Two byte gap here is an optimization