From 77e325507e88fe8b68c7d61b72307956208a1653 Mon Sep 17 00:00:00 2001 From: rumbledethumps <16963588+rumbledethumps@users.noreply.github.com> Date: Sun, 29 Jun 2025 20:16:07 -0700 Subject: [PATCH] settable codepage() on RP6502 --- include/rp6502.h | 2 +- libsrc/rp6502/codepage.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/rp6502.h b/include/rp6502.h index c1f60d89a..5ff7e8995 100644 --- a/include/rp6502.h +++ b/include/rp6502.h @@ -121,7 +121,7 @@ int __cdecl__ xregn (char device, char channel, unsigned char address, unsigned ...); int __cdecl__ xreg (char device, char channel, unsigned char address, ...); int phi2 (void); -int codepage (void); +int codepage (int); long lrand (void); int __fastcall__ stdin_opt (unsigned long ctrl_bits, unsigned char str_length); int __fastcall__ read_xstack (void* buf, unsigned count, int fildes); diff --git a/libsrc/rp6502/codepage.c b/libsrc/rp6502/codepage.c index e28726f04..d6c176347 100644 --- a/libsrc/rp6502/codepage.c +++ b/libsrc/rp6502/codepage.c @@ -1,6 +1,7 @@ #include -int __fastcall__ codepage (void) +int __fastcall__ codepage (int cp) { + ria_set_ax (cp); return ria_call_int (RIA_OP_CODEPAGE); }