From 8c35b844ab298da55eb502235be5afdcef79dee7 Mon Sep 17 00:00:00 2001 From: nick-less Date: Fri, 13 Feb 2026 02:33:47 +0100 Subject: [PATCH 1/3] fix(type): fixed an issue where the ptr is passed in rc2/rc3 but is exspected in a/x --- lib/screen.S | 2 +- lib/screen.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/screen.S b/lib/screen.S index a3a88c5c..3aacdf3b 100644 --- a/lib/screen.S +++ b/lib/screen.S @@ -48,7 +48,7 @@ zproc screen_putchar, .text.screen_putchar jmp _call_screen zendproc -zproc screen_putstring, .text.screen_putstring +zproc _screen_putstring, .text.screen_putstring ldy #SCREEN_PUTSTRING jmp _call_screen zendproc diff --git a/lib/screen.h b/lib/screen.h index eec24937..6ec331dc 100644 --- a/lib/screen.h +++ b/lib/screen.h @@ -14,6 +14,7 @@ extern void _screen_setcursor(uint16_t c); extern uint16_t _screen_getcursor(void); extern void screen_putchar(char c); extern void screen_putstring(const char* s); +extern void _screen_putstring(uint16_t s); extern uint16_t screen_getchar(uint16_t timeout_cs); extern uint8_t screen_waitchar(void); extern void screen_scrollup(void); @@ -22,6 +23,9 @@ extern void screen_clear_to_eol(void); extern void screen_setstyle(uint8_t style); extern void screen_showcursor(uint8_t show); +#define screen_putstring(x) \ + _screen_putstring((uint16_t)x) + #define screen_setcursor(x, y) \ _screen_setcursor((x) | ((y)<<8)) From 1d929216a3d3a2bd0e4fc4b0d8fe968d8a947f21 Mon Sep 17 00:00:00 2001 From: nick-less Date: Fri, 13 Feb 2026 02:36:53 +0100 Subject: [PATCH 2/3] fix(misc): replaced constant value with their most likely counterpart --- src/arch/commodore/pet.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arch/commodore/pet.S b/src/arch/commodore/pet.S index 427059dc..0d83f746 100644 --- a/src/arch/commodore/pet.S +++ b/src/arch/commodore/pet.S @@ -421,15 +421,15 @@ zproc screen_putchar zendproc zproc screen_putstring - sta 1f+1 - stx 1f+2 + sta ptr1+0 + stx ptr1+1 IO_ON jsr calculate_cursor_address ldx #0 zloop 1: - lda 0xffff, x + lda (ptr1), y zbreakif eq jsr convert_ascii_to_screencode From 9c0fdc72af412756f190c88a3fcad2498beb31f8 Mon Sep 17 00:00:00 2001 From: nick-less Date: Fri, 13 Feb 2026 08:42:28 +0100 Subject: [PATCH 3/3] Revert "fix(misc): replaced constant value with their most likely counterpart" This reverts commit 1d929216a3d3a2bd0e4fc4b0d8fe968d8a947f21. --- src/arch/commodore/pet.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/arch/commodore/pet.S b/src/arch/commodore/pet.S index 0d83f746..427059dc 100644 --- a/src/arch/commodore/pet.S +++ b/src/arch/commodore/pet.S @@ -421,15 +421,15 @@ zproc screen_putchar zendproc zproc screen_putstring - sta ptr1+0 - stx ptr1+1 + sta 1f+1 + stx 1f+2 IO_ON jsr calculate_cursor_address ldx #0 zloop 1: - lda (ptr1), y + lda 0xffff, x zbreakif eq jsr convert_ascii_to_screencode