mirror of
https://github.com/cc65/cc65.git
synced 2025-01-14 16:33:00 +00:00
Added LOWCODE and STARTUP segments
git-svn-id: svn://svn.cc65.org/cc65/trunk@1600 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
4f93a1c99f
commit
fe75b5c3f3
@ -1,4 +1,4 @@
|
|||||||
;
|
;
|
||||||
; Startup code for cc65 (C64 version)
|
; Startup code for cc65 (C64 version)
|
||||||
;
|
;
|
||||||
; This must be the *first* file on the linker command line
|
; This must be the *first* file on the linker command line
|
||||||
@ -15,19 +15,24 @@
|
|||||||
.include "c64.inc"
|
.include "c64.inc"
|
||||||
|
|
||||||
|
|
||||||
.code
|
; ------------------------------------------------------------------------
|
||||||
|
; Create an empty LOWCODE segment to avoid linker warnings
|
||||||
|
|
||||||
|
.segment "LOWCODE"
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
|
; Place the startup code in a special segment.
|
||||||
|
|
||||||
|
.segment "STARTUP"
|
||||||
|
|
||||||
; BASIC header with a SYS call
|
; BASIC header with a SYS call
|
||||||
|
|
||||||
.org $7FF
|
|
||||||
.word Head ; Load address
|
.word Head ; Load address
|
||||||
Head: .word @Next
|
Head: .word @Next
|
||||||
.word 1000 ; Line number
|
.word 1000 ; Line number
|
||||||
.byte $9E,"2061" ; SYS 2061
|
.byte $9E,"2061" ; SYS 2061
|
||||||
.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
|
|
||||||
|
|
||||||
; ------------------------------------------------------------------------
|
; ------------------------------------------------------------------------
|
||||||
; Actual code
|
; Actual code
|
||||||
@ -103,6 +108,9 @@ L2: lda zpsave,x
|
|||||||
jmp RESTOR
|
jmp RESTOR
|
||||||
|
|
||||||
|
|
||||||
|
; ------------------------------------------------------------------------
|
||||||
|
; Data
|
||||||
|
|
||||||
.data
|
.data
|
||||||
|
|
||||||
zpsave: .res zpspace
|
zpsave: .res zpspace
|
||||||
|
@ -3,6 +3,8 @@ MEMORY {
|
|||||||
RAM: start = $7FF, size = $c801, define = yes, file = %O;
|
RAM: start = $7FF, size = $c801, define = yes, file = %O;
|
||||||
}
|
}
|
||||||
SEGMENTS {
|
SEGMENTS {
|
||||||
|
STARTUP: load = RAM, type = wprot;
|
||||||
|
LOWCODE: 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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user