Update order for kernel segments

This commit is contained in:
Byron Lathi
2023-08-22 19:27:09 -07:00
parent 851c26e4dd
commit 9972f8cb36
3 changed files with 9 additions and 7 deletions

View File

@@ -96,7 +96,9 @@ _start:
ldx #>_good
jsr _cputs ; otherwise continue on
@3: jmp @3
; Now we need to load it into memory. It cannot be just loaded into memory,
; I think if we have startup be first in the linker script it will always be
; at the beginning? then we can just copy the text/data segments as is...
; parse root directory for kernel.o65
; load first data cluster (we know this is root.)

View File

@@ -17,7 +17,7 @@
; ---------------------------------------------------------------------------
; Place the startup code in a special segment
.segment "STARTUP"
.segment "CODE"
; ---------------------------------------------------------------------------
; A little light 6502 housekeeping

View File

@@ -9,14 +9,14 @@ MEMORY
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
ZEROPAGE: load = ZP, type = zp, define = yes;
STARTUP: load = KERNEL, type = ro;
CODE: load = KERNEL, type = ro;
ONCE: load = KERNEL, type = ro, optional = yes;
DATA: load = KERNEL, type = rw, define = yes;
BSS: load = KERNEL, type = rw, define = yes;
HEAP: load = KERNEL, type = rw, define = yes, optional = yes;
STARTUP: load = KERNEL, type = ro;
ONCE: load = KERNEL, type = ro, optional = yes;
CODE: load = ROM, type = ro;
RODATA: load = ROM, type = ro;
RODATA: load = KERNEL, type = ro;
VECTORS: load = ROM, type = ro, start = $FFFA;
}