]> git.sur5r.net Git - cc65/commitdiff
Squeeze 2 bytes out of the startup code
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 30 Oct 2000 21:02:49 +0000 (21:02 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Mon, 30 Oct 2000 21:02:49 +0000 (21:02 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@413 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/c128/crt0.s
libsrc/plus4/crt0.s

index eaad29ed45a06e3231f9bba9723b6f921d56ec7b..404bb8427c7f4210c711051b5590da964c799398 100644 (file)
@@ -54,10 +54,10 @@ Head:   .word   @Next
 ; ------------------------------------------------------------------------
 ; Actual code
 
-       ldy     #zpspace-1
-L1:    lda     sp,y
-       sta     zpsave,y        ; save the zero page locations we need
-       dey
+               ldx     #zpspace-1
+L1:    lda     sp,x
+       sta     zpsave,x        ; save the zero page locations we need
+       dex
                bpl     L1
 
 ; Close open files
@@ -126,10 +126,10 @@ _exit:    jsr     doatexit        ; call exit functions
 
 ; Copy back the zero page stuff
 
-       ldy     #zpspace-1
-L2:    lda     zpsave,y
-       sta     sp,y
-       dey
+       ldx     #zpspace-1
+L2:    lda     zpsave,x
+       sta     sp,x
+       dex
        bpl     L2
 
 ; Done
index bdba66793ba89623477ddd55c0bf3476a87632cb..b33ff667a285bcb33d1288b8a5e58ac41ecb7f1c 100644 (file)
@@ -54,10 +54,10 @@ Head:   .word   @Next
 ; ------------------------------------------------------------------------
 ; Actual code
 
-       ldy     #zpspace-1
-L1:    lda     sp,y
-       sta     zpsave,y        ; save the zero page locations we need
-       dey
+               ldx     #zpspace-1
+L1:    lda     sp,x
+       sta     zpsave,x        ; save the zero page locations we need
+       dex
                bpl     L1
 
 ; Close open files
@@ -115,10 +115,10 @@ _exit:    jsr     doatexit        ; call exit functions
 
 ; Copy back the zero page stuff
 
-       ldy     #zpspace-1
-L2:    lda     zpsave,y
-       sta     sp,y
-       dey
+       ldx     #zpspace-1
+L2:    lda     zpsave,x
+       sta     sp,x
+       dex
                bpl     L2
 
 ; Reset changed vectors