2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 11.04.1999
|
|
|
|
;
|
|
|
|
; CC65 runtime: Load an unsigned char indirect from pointer somewhere in stack
|
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export ldau00sp, ldau0ysp
|
|
|
|
.importzp sp, ptr1
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2003-10-10 17:52:12 +00:00
|
|
|
.macpack cpu
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
ldau00sp:
|
2013-05-09 11:56:54 +00:00
|
|
|
ldy #1
|
2000-05-28 13:40:48 +00:00
|
|
|
ldau0ysp:
|
2013-05-09 11:56:54 +00:00
|
|
|
lda (sp),y
|
|
|
|
sta ptr1+1
|
|
|
|
dey
|
|
|
|
lda (sp),y
|
|
|
|
sta ptr1
|
|
|
|
ldx #0
|
2003-10-10 17:52:12 +00:00
|
|
|
.if (.cpu .bitand CPU_ISET_65SC02)
|
2013-05-09 11:56:54 +00:00
|
|
|
lda (ptr1) ; Save one cycle for the C02
|
2000-11-27 22:59:03 +00:00
|
|
|
.else
|
2013-05-09 11:56:54 +00:00
|
|
|
lda (ptr1,x)
|
2000-11-27 22:59:03 +00:00
|
|
|
.endif
|
2013-05-09 11:56:54 +00:00
|
|
|
rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|