2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 06.08.1998
|
|
|
|
;
|
|
|
|
; CC65 runtime: long push
|
|
|
|
;
|
|
|
|
|
|
|
|
;
|
|
|
|
; push eax on stack
|
|
|
|
;
|
|
|
|
.export push0ax, pusheax
|
|
|
|
.import decsp4
|
|
|
|
.importzp sp, sreg
|
|
|
|
|
|
|
|
push0ax:
|
|
|
|
ldy #0
|
|
|
|
sty sreg
|
|
|
|
sty sreg+1
|
|
|
|
pusheax:
|
2001-03-24 15:57:32 +00:00
|
|
|
pha ; decsp will destroy A (but not X)
|
2000-05-28 13:40:48 +00:00
|
|
|
jsr decsp4
|
2001-03-24 15:57:32 +00:00
|
|
|
ldy #3
|
|
|
|
lda sreg+1
|
2000-05-28 13:40:48 +00:00
|
|
|
sta (sp),y
|
2001-03-24 15:57:32 +00:00
|
|
|
dey
|
2000-05-28 13:40:48 +00:00
|
|
|
lda sreg
|
|
|
|
sta (sp),y
|
2001-03-24 15:57:32 +00:00
|
|
|
dey
|
|
|
|
txa
|
2000-05-28 13:40:48 +00:00
|
|
|
sta (sp),y
|
2001-03-24 15:57:32 +00:00
|
|
|
dey
|
2000-05-28 13:40:48 +00:00
|
|
|
pla
|
2001-03-24 15:57:32 +00:00
|
|
|
sta (sp),y
|
2000-05-28 13:40:48 +00:00
|
|
|
rts
|
|
|
|
|