mirror of
https://github.com/cc65/cc65.git
synced 2024-12-27 15:29:46 +00:00
Squeeze 4 bytes out of the startup code
git-svn-id: svn://svn.cc65.org/cc65/trunk@412 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
72e32b332b
commit
e66b11770f
@ -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
|
||||||
@ -80,7 +80,6 @@ L1: lda sp,y
|
|||||||
|
|
||||||
lda $01
|
lda $01
|
||||||
sta mmusave ; Save the memory configuration
|
sta mmusave ; Save the memory configuration
|
||||||
lda $01
|
|
||||||
and #$F8
|
and #$F8
|
||||||
ora #$06 ; Enable kernal+I/O, disable basic
|
ora #$06 ; Enable kernal+I/O, disable basic
|
||||||
sta $01
|
sta $01
|
||||||
@ -117,10 +116,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
|
||||||
|
|
||||||
; Reset changed vectors, back to basic
|
; Reset changed vectors, back to basic
|
||||||
|
Loading…
Reference in New Issue
Block a user