1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

Merge pull request #599 from greg-king5/pce-point-func

Fix how the PC-Engine calls functions through pointers.
This commit is contained in:
Oliver Schmidt 2018-03-01 16:50:40 +00:00 committed by GitHub
commit 298fe25281
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

16
libsrc/pce/call.s Normal file
View File

@ -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

14
libsrc/pce/callptr4.s Normal file
View File

@ -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)