mirror of
https://github.com/cc65/cc65.git
synced 2025-08-12 02:25:03 +00:00
Prepare VIC20 startup for different start addresses
git-svn-id: svn://svn.cc65.org/cc65/trunk@1390 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -14,23 +14,27 @@
|
|||||||
.include "vic20.inc"
|
.include "vic20.inc"
|
||||||
.include "../cbm/cbm.inc"
|
.include "../cbm/cbm.inc"
|
||||||
|
|
||||||
.code
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; BASIC header with a SYS call
|
; BASIC header with a SYS call
|
||||||
|
|
||||||
.org $FFF
|
.segment "EXEHDR"
|
||||||
.word Head ; Load address
|
.word Head ; Load address
|
||||||
Head: .word @Next
|
Head: .word @Next
|
||||||
.word 1000 ; Line number
|
.word 1000 ; Line number
|
||||||
.byte $9E,"4109" ; SYS 4109
|
.byte $9E ; SYS token
|
||||||
|
.byte <(((@Start / 1000) .mod 10) + $30)
|
||||||
|
.byte <(((@Start / 100) .mod 10) + $30)
|
||||||
|
.byte <(((@Start / 10) .mod 10) + $30)
|
||||||
|
.byte <(((@Start / 1) .mod 10) + $30)
|
||||||
.byte $00 ; End of BASIC line
|
.byte $00 ; End of BASIC line
|
||||||
@Next: .word 0 ; BASIC end marker
|
@Next: .word 0 ; BASIC end marker
|
||||||
.reloc
|
@Start:
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Actual code
|
; Actual code
|
||||||
|
|
||||||
|
.code
|
||||||
|
|
||||||
ldx #zpspace-1
|
ldx #zpspace-1
|
||||||
L1: lda sp,x
|
L1: lda sp,x
|
||||||
sta zpsave,x ; Save the zero page locations we need
|
sta zpsave,x ; Save the zero page locations we need
|
||||||
|
@@ -3,6 +3,7 @@ MEMORY {
|
|||||||
RAM: start = $FFF, size = $0E01, define = yes, file = %O;
|
RAM: start = $FFF, size = $0E01, define = yes, file = %O;
|
||||||
}
|
}
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
|
EXEHDR: load = RAM , type = wprot;
|
||||||
CODE: load = RAM, type = wprot;
|
CODE: load = RAM, type = wprot;
|
||||||
RODATA: load = RAM, type = wprot;
|
RODATA: load = RAM, type = wprot;
|
||||||
DATA: load = RAM, type = rw;
|
DATA: load = RAM, type = rw;
|
||||||
|
Reference in New Issue
Block a user