* 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:
uz
2009-12-09 12:42:24 +00:00
parent 1fae13274e
commit 60bc009991
17 changed files with 98 additions and 71 deletions

View File

@@ -18,17 +18,13 @@
; ------------------------------------------------------------------------
; Constants
IRQInd = $2FD ; JMP $0000 - used as indirect IRQ vector
IRQInd = $2FD ; JMP $0000 - used as indirect IRQ vector
; ------------------------------------------------------------------------
; Place the startup code in a special segment to cope with the quirks of
; c128 banking.
.segment "STARTUP"
; BASIC header with a SYS call
.org $1BFF
.segment "EXEHDR"
.word Head ; Load address
Head: .word @Next
.word .version ; Line number
@@ -39,14 +35,17 @@ Head: .word @Next
.byte <(((Start / 1) .mod 10) + $30)
.byte $00 ; End of BASIC line
@Next: .word 0 ; BASIC end marker
.reloc
; ------------------------------------------------------------------------
; Actual code
; Startup code
.segment "STARTUP"
Start:
; Close open files
Start: jsr CLRCH
jsr CLRCH
; Switch to the second charset