From d3895fab166351df6c53ccadbdc97e154a961f5a Mon Sep 17 00:00:00 2001 From: Rikard Nordgren Date: Tue, 18 Mar 2025 21:21:32 +0100 Subject: [PATCH] Add convert_u8_A_to_FAC1 --- STATUS.md | 2 +- src/basic/{,stubs_math => math}/b794.convert_A_to_FAC1.s | 7 ++++--- src/basic/{,stubs_math => math}/b794.interop | 0 strings/208DB420 | 3 +++ strings/4CA2B320 | 3 +++ strings/A84CA2B3 | 3 +++ 6 files changed, 14 insertions(+), 4 deletions(-) rename src/basic/{,stubs_math => math}/b794.convert_A_to_FAC1.s (65%) rename src/basic/{,stubs_math => math}/b794.interop (100%) create mode 100644 strings/208DB420 create mode 100644 strings/4CA2B320 create mode 100644 strings/A84CA2B3 diff --git a/STATUS.md b/STATUS.md index 5e17aebe..f31f395f 100644 --- a/STATUS.md +++ b/STATUS.md @@ -201,7 +201,7 @@ Floating point mathematical routines - not official, but well known and broadly | `$B1BF` | `convert_FAC1_to_s16` | NOT DONE | | | `$B391` | `GIVAYF` | PARTIAL | not fully tested yet | | `$B3A2` | `convert_Y_to_FAC1` | DONE | | -| `$B794` | `convert_A_to_FAC1` | NOT DONE | | +| `$B794` | `convert_u8_A_to_FAC1` | DONE | | | `$B7B5` | `STRVAL` | NOT DONE | imports string to FAC1 | | `$B7F7` | `convert_FAC1_to_ADDR` | NOT DONE | | | `$B849` | `add_HALF_FAC1` | DONE | | diff --git a/src/basic/,stubs_math/b794.convert_A_to_FAC1.s b/src/basic/math/b794.convert_A_to_FAC1.s similarity index 65% rename from src/basic/,stubs_math/b794.convert_A_to_FAC1.s rename to src/basic/math/b794.convert_A_to_FAC1.s index e33d3f30..a29abfb6 100644 --- a/src/basic/,stubs_math/b794.convert_A_to_FAC1.s +++ b/src/basic/math/b794.convert_A_to_FAC1.s @@ -4,10 +4,11 @@ ;; #LAYOUT# * * #IGNORE ; -; Math package - XXX +; Math package - Convert A (uint8) to FAC1 ; ; - https://sta.c64.org/cbm64basconv.html ; -; XXX add name, label, documentation, implement, test - +STUB_IMPLEMENTATION +convert_u8_A_to_FAC1: + tay + jmp convert_Y_to_FAC1 diff --git a/src/basic/,stubs_math/b794.interop b/src/basic/math/b794.interop similarity index 100% rename from src/basic/,stubs_math/b794.interop rename to src/basic/math/b794.interop diff --git a/strings/208DB420 b/strings/208DB420 new file mode 100644 index 00000000..07d61c4a --- /dev/null +++ b/strings/208DB420 @@ -0,0 +1,3 @@ +JSR $B38D + JSR fragment + +Call to address in ROM + fragment diff --git a/strings/4CA2B320 b/strings/4CA2B320 new file mode 100644 index 00000000..81c4a8a0 --- /dev/null +++ b/strings/4CA2B320 @@ -0,0 +1,3 @@ +JMP $B3A2 + JSR fragment + +Call to well known floating point function + fragment diff --git a/strings/A84CA2B3 b/strings/A84CA2B3 new file mode 100644 index 00000000..a60c533b --- /dev/null +++ b/strings/A84CA2B3 @@ -0,0 +1,3 @@ +TAY + JMP $B3A2 + +Transfer to Y + Jump to well known floating point function (that needs its argument in Y)