]> git.sur5r.net Git - cc65/commitdiff
Made two indirect jumps through the zero-page go through page $20 on the PC-Engine. 599/head
authorGreg King <gregdk@users.sf.net>
Wed, 28 Feb 2018 19:59:52 +0000 (14:59 -0500)
committerGreg King <gregdk@users.sf.net>
Wed, 28 Feb 2018 19:59:52 +0000 (14:59 -0500)
libsrc/pce/call.s [new file with mode: 0644]
libsrc/pce/callptr4.s [new file with mode: 0644]

diff --git a/libsrc/pce/call.s b/libsrc/pce/call.s
new file mode 100644 (file)
index 0000000..f998798
--- /dev/null
@@ -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 (file)
index 0000000..7829cdb
--- /dev/null
@@ -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)