1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 06:31:31 +00:00
cc65/libsrc/lynx/exec.s
uz d993b332a4 Lynx update including file routines that access a file system on a cartridge
by Karri Kaksonen.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4892 b7a2c559-68d2-44c3-8de9-860c34a00d81
2010-12-29 10:37:57 +00:00

35 lines
734 B
ArmAsm

;
; Karri Kaksonen, 2010
;
; lynx_exec(fileno) loads a file into memory but after the read the CPU
; does a jump into the loaded start address.
;
; lynx_exec is often used in compilation carts when you run small demos
; created with various (non-cc65) compilers.
;
; void lynx_exec(int fileno)
;
.importzp _FileDestAddr
.import pushax,ldax0sp,incsp2
.import _lynx_load
.export _lynx_exec
; ---------------------------------------------------------------
; void __near__ __fastcall__ lynx_exec (int)
; ---------------------------------------------------------------
.segment "CODE"
.proc _lynx_exec: near
.segment "CODE"
jsr pushax
jsr ldax0sp
jsr _lynx_load
jsr incsp2
jmp (_FileDestAddr)
.endproc