1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-10 23:29:05 +00:00

Squeeze 2 bytes out of the startup code

git-svn-id: svn://svn.cc65.org/cc65/trunk@414 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2000-10-30 21:46:45 +00:00
parent 00e858c9de
commit 7c436aec1d
3 changed files with 25 additions and 26 deletions

View File

@ -46,10 +46,10 @@ zpspace = * - zpstart ; Zero page space allocated
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Actual code ; Actual code
ldy #zpspace-1 ldx #zpspace-1
L1: lda sp,y L1: lda sp,x
sta zpsave,y ; Save the zero page locations we need sta zpsave,x ; Save the zero page locations we need
dey dex
bpl L1 bpl L1
; Clear the BSS data ; Clear the BSS data
@ -89,8 +89,7 @@ L1: lda sp,y
; fall thru to exit... ; fall thru to exit...
_exit: _exit: lda #$ff
lda #$ff
sta TEXTTYP sta TEXTTYP
jsr doatexit ; call exit functions jsr doatexit ; call exit functions
@ -100,10 +99,10 @@ _exit:
; Copy back the zero page stuff ; Copy back the zero page stuff
ldy #zpspace-1 ldx #zpspace-1
L2: lda zpsave,y L2: lda zpsave,x
sta sp,y sta sp,x
dey dex
bpl L2 bpl L2
; Reset changed vectors, back to basic ; Reset changed vectors, back to basic

View File

@ -70,10 +70,10 @@ zpspace = * - zpstart ; Zero page space allocated
; Save the zero page locations we need ; Save the zero page locations we need
ldy #zpspace-1 ldx #zpspace-1
L1: lda sp,y L1: lda sp,x
sta zpsave,y sta zpsave,x
dey dex
bpl L1 bpl L1
; Clear the BSS data ; Clear the BSS data
@ -175,10 +175,10 @@ _exit: jsr doatexit ; call exit functions
; Copy back the zero page stuff ; Copy back the zero page stuff
ldy #zpspace-1 ldx #zpspace-1
L2: lda zpsave,y L2: lda zpsave,x
sta sp,y sta sp,x
dey dex
bpl L2 bpl L2
; Back to DOS ; Back to DOS

View File

@ -54,10 +54,10 @@ Head: .word @Next
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Actual code ; Actual code
ldy #zpspace-1 ldx #zpspace-1
L1: lda sp,y L1: lda sp,x
sta zpsave,y ; Save the zero page locations we need sta zpsave,x ; Save the zero page locations we need
dey dex
bpl L1 bpl L1
; Close open files ; Close open files
@ -109,10 +109,10 @@ _exit: jsr doatexit ; call exit functions
; Copy back the zero page stuff ; Copy back the zero page stuff
ldy #zpspace-1 ldx #zpspace-1
L2: lda zpsave,y L2: lda zpsave,x
sta sp,y sta sp,x
dey dex
bpl L2 bpl L2
; Back to basic ; Back to basic