Save two bytes in pushax and popptr1

It's not because Y must equal zero on rts that we should'nt spare one byte
and one cycle.
This commit is contained in:
Colin Leroy-Mira
2024-01-19 21:14:47 +01:00
parent 166a4b25f7
commit b23a7ec407
2 changed files with 14 additions and 2 deletions

View File

@@ -7,6 +7,8 @@
.export push0, pusha0, pushax
.importzp sp
.macpack cpu
push0: lda #0
pusha0: ldx #0
@@ -29,7 +31,11 @@ pusha0: ldx #0
sta (sp),y ; (27)
pla ; (31)
dey ; (33)
.if (.cpu .bitand ::CPU_ISET_65SC02)
sta (sp) ; (37)
.else
sta (sp),y ; (38)
rts ; (44)
.endif
rts ; (44/43)
.endproc