* Moved the BASIC stub that calls the compiled program into it's own segment
named EXEHDR. * Renamed BASICHDR to EXEHDR for the PET-II machines. * Moved the call to CHRCH in front of the code that saves the zero page, since open files are sometimes remembered in the zero page, so we need to close them before we grab a copy. git-svn-id: svn://svn.cc65.org/cc65/trunk@4507 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -15,12 +15,10 @@
|
||||
.include "vic20.inc"
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Place the startup code in a special segment.
|
||||
|
||||
.segment "STARTUP"
|
||||
|
||||
; BASIC header with a SYS call
|
||||
|
||||
.segment "EXEHDR"
|
||||
|
||||
.word Head ; Load address
|
||||
Head: .word @Next
|
||||
.word .version ; Line number
|
||||
@@ -33,18 +31,24 @@ Head: .word @Next
|
||||
@Next: .word 0 ; BASIC end marker
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Actual code
|
||||
; Startup code
|
||||
|
||||
Start: ldx #zpspace-1
|
||||
L1: lda sp,x
|
||||
sta zpsave,x ; Save the zero page locations we need
|
||||
dex
|
||||
bpl L1
|
||||
.segment "STARTUP"
|
||||
|
||||
Start:
|
||||
|
||||
; Close open files
|
||||
|
||||
jsr CLRCH
|
||||
|
||||
; Save the zero page locations we need
|
||||
|
||||
ldx #zpspace-1
|
||||
L1: lda sp,x
|
||||
sta zpsave,x
|
||||
dex
|
||||
bpl L1
|
||||
|
||||
; Switch to second charset
|
||||
|
||||
lda #14
|
||||
|
||||
Reference in New Issue
Block a user