]> git.sur5r.net Git - cc65/commitdiff
Added some cycle counts
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 12 Apr 2003 20:50:58 +0000 (20:50 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 12 Apr 2003 20:50:58 +0000 (20:50 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2043 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/runtime/popa.s
libsrc/runtime/pusha.s
libsrc/runtime/pushax.s

index 37bbc7b685a3545e947a0a331f00b4e216da2e7b..81e18089c98a8a614642d7836499be141204d9f9 100644 (file)
 .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
index dc5e546974bffa70b92dd843745460d22f19be02..e3d2ba2eeaf519f760fb05afc131956b766426e0 100644 (file)
@@ -13,19 +13,19 @@ pusha0sp:
        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)
 
index 22b71e0596794d8c4f9cf1594b00264665c6ff1e..d9efe7c0e636f4b52000c472b9ca410b66f04152 100644 (file)
@@ -17,19 +17,19 @@ pusha0:     ldx     #0
 
 .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