2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 21.08.1998
|
|
|
|
;
|
|
|
|
; CC65 runtime: Load effective address with offset in Y relative to SP
|
|
|
|
;
|
|
|
|
|
2000-06-11 16:49:00 +00:00
|
|
|
.export leaasp, pleaasp
|
2000-06-10 16:13:50 +00:00
|
|
|
.import pushax
|
|
|
|
.importzp sp
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2000-06-10 16:11:27 +00:00
|
|
|
leaasp: ldx sp+1 ; Get high byte
|
2000-06-10 16:13:50 +00:00
|
|
|
clc
|
|
|
|
adc sp
|
|
|
|
bcc @L1
|
|
|
|
inx
|
|
|
|
@L1: rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|
2000-06-10 16:13:50 +00:00
|
|
|
pleaasp:
|
2000-05-28 13:40:48 +00:00
|
|
|
ldx sp+1 ; Get high byte
|
|
|
|
clc
|
|
|
|
adc sp
|
|
|
|
bcc L9
|
|
|
|
inx
|
|
|
|
L9: jmp pushax
|
|
|
|
|
|
|
|
|
|
|
|
|