2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 29.12.1999
|
2017-03-12 22:21:43 +00:00
|
|
|
; Christian Krueger, 11-Mar-2017, added 65SC02 optimization
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; CC65 runtime: long pop
|
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export popeax
|
|
|
|
.import incsp4
|
|
|
|
.importzp sp, sreg
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2017-03-12 22:21:43 +00:00
|
|
|
.macpack cpu
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
popeax: ldy #3
|
|
|
|
lda (sp),y
|
|
|
|
sta sreg+1
|
|
|
|
dey
|
|
|
|
lda (sp),y
|
|
|
|
sta sreg
|
|
|
|
dey
|
|
|
|
lda (sp),y
|
|
|
|
tax
|
2017-03-12 22:21:43 +00:00
|
|
|
.if (.cpu .bitand ::CPU_ISET_65SC02)
|
|
|
|
lda (sp)
|
2022-04-17 14:06:22 +00:00
|
|
|
.else
|
2013-05-09 11:56:54 +00:00
|
|
|
dey
|
|
|
|
lda (sp),y
|
2017-03-12 22:21:43 +00:00
|
|
|
.endif
|
2013-05-09 11:56:54 +00:00
|
|
|
jmp incsp4
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
|