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
@ -15,19 +15,24 @@
|
||||
.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
|
||||
@ -103,6 +108,9 @@ L2: lda zpsave,x
|
||||
jmp RESTOR
|
||||
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
; Data
|
||||
|
||||
.data
|
||||
|
||||
zpsave: .res zpspace
|
||||
|
@ -3,6 +3,8 @@ MEMORY {
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user