2009-08-31 12:15:51 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 2009-08-31
|
|
|
|
;
|
|
|
|
; CC65 runtime: Load effective address with offset in A/X relative to SP
|
|
|
|
;
|
|
|
|
|
2013-05-09 13:56:54 +02:00
|
|
|
.export leaaxsp, leaa0sp
|
|
|
|
.importzp sp
|
2009-08-31 12:15:51 +00:00
|
|
|
|
2009-08-31 12:22:13 +00:00
|
|
|
leaa0sp:
|
|
|
|
ldx #$00
|
|
|
|
leaaxsp:
|
2009-08-31 12:15:51 +00:00
|
|
|
clc
|
|
|
|
adc sp
|
|
|
|
pha
|
|
|
|
txa
|
|
|
|
adc sp+1
|
|
|
|
tax
|
|
|
|
pla
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
|
|
|