]> git.sur5r.net Git - cc65/blob - libsrc/runtime/ldeaxysp.s
goto.c warning fix for implicit truncation
[cc65] / libsrc / runtime / ldeaxysp.s
1 ;
2 ; Ullrich von Bassewitz, 22.06.1998
3 ;
4 ; CC65 runtime: Load a long from somewhere in the stack
5 ;
6 ; Beware: The optimizer knows about the register contents after calling
7 ;         this function!
8 ;
9
10
11         .export         ldeax0sp, ldeaxysp
12         .importzp       sreg, sp
13
14 ldeax0sp:
15         ldy     #3
16 ldeaxysp:
17         lda     (sp),y
18         sta     sreg+1
19         dey
20         lda     (sp),y
21         sta     sreg
22         dey
23         lda     (sp),y
24         tax
25         dey
26         lda     (sp),y
27         rts
28