From 549f09db9c83b4720af04c44b68b324a108849ef Mon Sep 17 00:00:00 2001 From: Greg King Date: Wed, 28 Feb 2018 14:59:52 -0500 Subject: [PATCH] Made two indirect jumps through the zero-page go through page $20 on the PC-Engine. --- libsrc/pce/call.s | 16 ++++++++++++++++ libsrc/pce/callptr4.s | 14 ++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 libsrc/pce/call.s create mode 100644 libsrc/pce/callptr4.s diff --git a/libsrc/pce/call.s b/libsrc/pce/call.s new file mode 100644 index 000000000..f99879866 --- /dev/null +++ b/libsrc/pce/call.s @@ -0,0 +1,16 @@ +; +; CC65 runtime: call function via pointer in ax +; +; 1998-08-06, Ullrich von Bassewitz +; 2018-02-28, Greg King +; + + .export callax + .importzp ptr1 + +callax: sta ptr1 + stx ptr1+1 + +; The PC-Engine puts the zero-page at $2000. + + jmp (ptr1 + $2000) ; go there diff --git a/libsrc/pce/callptr4.s b/libsrc/pce/callptr4.s new file mode 100644 index 000000000..7829cdb8e --- /dev/null +++ b/libsrc/pce/callptr4.s @@ -0,0 +1,14 @@ +; +; CC65 runtime: call function via pointer in ptr4 +; +; 2018-02-28, Greg King +; + + .export callptr4 + .importzp ptr4 + +callptr4: + +; The PC-Engine puts the zero-page at $2000. + + jmp (ptr4 + $2000) -- 2.39.5