-;
+;
; Startup code for cc65 (C64 version)
;
; This must be the *first* file on the linker command line
.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
- .org $7FF
.word Head ; Load address
Head: .word @Next
.word 1000 ; Line number
.byte $9E,"2061" ; SYS 2061
.byte $00 ; End of BASIC line
@Next: .word 0 ; BASIC end marker
- .reloc
; ------------------------------------------------------------------------
; Actual code
jmp RESTOR
+; ------------------------------------------------------------------------
+; Data
+
.data
zpsave: .res zpspace
RAM: start = $7FF, size = $c801, define = yes, file = %O;
}
SEGMENTS {
+ STARTUP: load = RAM, type = wprot;
+ LOWCODE: load = RAM, type = wprot;
CODE: load = RAM, type = wprot;
RODATA: load = RAM, type = wprot;
DATA: load = RAM, type = rw;