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); }