.ifpc02
lda (sp)
.else
- ldy #0
- lda (sp),y ; Read byte
+ ldy #0 ; (2)
+ lda (sp),y ; (7) Read byte
.endif
- inc sp
- beq @L1
- rts
+ inc sp ; (12)
+ beq @L1 ; (14)
+ rts ; (20)
@L1: inc sp+1
rts
ldy #$00
pushaysp:
lda (sp),y
-pusha: ldy sp
- beq @L1
- dec sp
+pusha: ldy sp ; (3)
+ beq @L1 ; (6)
+ dec sp ; (11)
.ifpc02
sta (sp)
.else
- ldy #0
- sta (sp),y
+ ldy #0 ; (13)
+ sta (sp),y ; (19)
.endif
- rts
+ rts ; (25)
-@L1: dec sp+1
- dec sp
- sta (sp),y
- rts
+@L1: dec sp+1 ; (11)
+ dec sp ; (16)
+ sta (sp),y ; (22)
+ rts ; (28)
.proc pushax
- pha
- lda sp
- sec
- sbc #2
+ pha ; (3)
+ lda sp ; (6)
+ sec ; (8)
+ sbc #2 ; (10)
sta sp ; (13)
- bcs @L1
- dec sp+1
-@L1: ldy #1
- txa ; (20)
- sta (sp),y
- pla
- dey
+ bcs @L1 ; (17)
+ dec sp+1 ; (+5)
+@L1: ldy #1 ; (19)
+ txa ; (21)
+ sta (sp),y ; (27)
+ pla ; (31)
+ dey ; (33)
sta (sp),y ; (38)
- rts
+ rts ; (44)
.endproc