mirror of
https://github.com/cc65/cc65.git
synced 2024-12-28 22:30:12 +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:
commit
298fe25281
16
libsrc/pce/call.s
Normal file
16
libsrc/pce/call.s
Normal 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
14
libsrc/pce/callptr4.s
Normal 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)
|
Loading…
Reference in New Issue
Block a user