From: cuz Date: Mon, 30 Oct 2000 21:02:49 +0000 (+0000) Subject: Squeeze 2 bytes out of the startup code X-Git-Tag: V2.12.0~3113 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=00e858c9de612acefd54e63b76ae926c1486b5e6;p=cc65 Squeeze 2 bytes out of the startup code git-svn-id: svn://svn.cc65.org/cc65/trunk@413 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/c128/crt0.s b/libsrc/c128/crt0.s index eaad29ed4..404bb8427 100644 --- a/libsrc/c128/crt0.s +++ b/libsrc/c128/crt0.s @@ -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 diff --git a/libsrc/plus4/crt0.s b/libsrc/plus4/crt0.s index bdba66793..b33ff667a 100644 --- a/libsrc/plus4/crt0.s +++ b/libsrc/plus4/crt0.s @@ -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