diff --git a/include/crt.c b/include/crt.c index 0e9d268..9461770 100644 --- a/include/crt.c +++ b/include/crt.c @@ -173,6 +173,9 @@ bcode: __asm bcexec { +#ifdef OSCAR_NATIVE_ALL + jmp (accu) +#else lda ip pha lda ip + 1 @@ -197,9 +200,16 @@ bdone: nop pla sta ip rts +#endif +} + +__asm jmpaddr +{ + jmp (addr) } #pragma runtime(bcexec, bcexec) +#pragma runtime(jmpaddr, jmpaddr) __asm negaccu { diff --git a/oscar64/Compiler.cpp b/oscar64/Compiler.cpp index 77111d0..4bac454 100644 --- a/oscar64/Compiler.cpp +++ b/oscar64/Compiler.cpp @@ -206,6 +206,7 @@ bool Compiler::GenerateCode(void) RegisterRuntime(loc, Ident::Unique("ffromi")); RegisterRuntime(loc, Ident::Unique("fcmp")); RegisterRuntime(loc, Ident::Unique("bcexec")); + RegisterRuntime(loc, Ident::Unique("jmpaddr")); RegisterRuntime(loc, Ident::Unique("mul32")); RegisterRuntime(loc, Ident::Unique("divs32")); RegisterRuntime(loc, Ident::Unique("mods32"));