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
This commit is contained in:
uz
2010-12-29 10:37:57 +00:00
parent 4a92522c82
commit d993b332a4
10 changed files with 447 additions and 1 deletions

34
libsrc/lynx/exec.s Normal file
View File

@@ -0,0 +1,34 @@
;
; 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