]> git.sur5r.net Git - cc65/blob - libsrc/runtime/leasp.s
fsetpos.o fgetpos.o rewind.o fseek.o ftell.o: new object files
[cc65] / libsrc / runtime / leasp.s
1 ;
2 ; Ullrich von Bassewitz, 21.08.1998
3 ;
4 ; CC65 runtime: Load effective address with offset in Y relative to SP
5 ;
6
7         .export         leaasp, pleaasp
8         .import         pushax
9         .importzp       sp
10
11 leaasp: ldx     sp+1            ; Get high byte
12         clc
13         adc     sp
14         bcc     @L1
15         inx
16 @L1:    rts
17
18
19 pleaasp:
20         ldx     sp+1            ; Get high byte
21         clc
22         adc     sp
23         bcc     L9
24         inx
25 L9:     jmp     pushax
26
27
28