]> git.sur5r.net Git - cc65/blob - leasp.s
5ec86d3ef355e802364ab15d8570531b7c63e514
[cc65] / 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