Change segment order to make o65 layout valid

VECTORS was messing things up
This commit is contained in:
Byron Lathi
2023-08-22 20:49:07 -07:00
parent c5b1a47c8e
commit 8bccfed867
7 changed files with 55 additions and 28 deletions

View File

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

View File

@@ -11,13 +11,12 @@ MEMORY
SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
STARTUP: load = KERNEL, type = ro;
CODE: load = KERNEL, type = ro;
ONCE: load = KERNEL, type = ro, optional = yes;
CODE: load = KERNEL, type = ro;
RODATA: load = KERNEL, type = ro;
DATA: load = KERNEL, type = rw, define = yes;
BSS: load = KERNEL, type = rw, define = yes;
HEAP: load = KERNEL, type = rw, define = yes, optional = yes;
RODATA: load = KERNEL, type = ro;
VECTORS: load = ROM, type = ro, start = $FFFA;
}
FILES
@@ -27,7 +26,7 @@ FILES
FORMATS
{
o65: os = super, version = 0, type = small,
o65: os = lunix, version = 0, type = small,
export = _init;
}

View File

@@ -1,16 +0,0 @@
.segment "VECTORS"
.addr _nmi_int ; NMI vector
.addr _na ; Reset vector (Doesn't matter, will go back to ROM)
.addr _irq_int ; IRQ/BRK vector
.segment "CODE"
_na:
rti
_nmi_int:
rti
_irq_int:
rti