2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 08.08.1998
|
2017-03-12 22:21:43 +00:00
|
|
|
; Christian Krueger, 11-Mar-2017, optimization
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
2017-03-19 19:51:54 +00:00
|
|
|
; CC65 runtime: save eax into temp storage/restore eax from temp storage
|
2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export saveeax, resteax
|
|
|
|
.importzp sreg, regsave
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
saveeax:
|
2013-05-09 11:56:54 +00:00
|
|
|
sta regsave
|
|
|
|
stx regsave+1
|
2017-03-12 22:21:43 +00:00
|
|
|
ldy sreg
|
|
|
|
sty regsave+2
|
|
|
|
ldy sreg+1
|
|
|
|
sty regsave+3
|
2013-05-09 11:56:54 +00:00
|
|
|
rts
|
2000-05-28 13:40:48 +00:00
|
|
|
|
|
|
|
resteax:
|
2013-05-09 11:56:54 +00:00
|
|
|
lda regsave+3
|
|
|
|
sta sreg+1
|
|
|
|
lda regsave+2
|
|
|
|
sta sreg
|
|
|
|
ldx regsave+1
|
|
|
|
lda regsave
|
|
|
|
rts
|