Split of the lruntime module
git-svn-id: svn://svn.cc65.org/cc65/trunk@427 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
28
libsrc/runtime/ldeaxysp.s
Normal file
28
libsrc/runtime/ldeaxysp.s
Normal file
@@ -0,0 +1,28 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 22.06.1998
|
||||
;
|
||||
; CC65 runtime: Load a long from somewhere in the stack
|
||||
;
|
||||
; Beware: The optimizer knows about the register contents after calling
|
||||
; this function!
|
||||
;
|
||||
|
||||
|
||||
.export ldeax0sp, ldeaxysp
|
||||
.importzp sreg, sp
|
||||
|
||||
ldeax0sp:
|
||||
ldy #3
|
||||
ldeaxysp:
|
||||
lda (sp),y
|
||||
sta sreg+1
|
||||
dey
|
||||
lda (sp),y
|
||||
sta sreg
|
||||
dey
|
||||
lda (sp),y
|
||||
tax
|
||||
dey
|
||||
lda (sp),y
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user