Renamed RAM to MAIN for all disk based targets.

The name RAM doesn't make much sense in general for a memeory area because i.e. the zero page is for sure RAM but is not part of the memory area named RAM.

For disk based targets it makes sense to put the disk file more into focus and here MAIN means the main part of the file - in contrast to some header.

Only for ROM based targets the name RAM is kept as it makes sense to focus on the difference between RAM and ROM.
This commit is contained in:
Oliver Schmidt 2016-03-07 01:28:55 +01:00
parent 419eb700b5
commit d8c31cf1d3
52 changed files with 530 additions and 531 deletions

View file

@ -10,13 +10,13 @@ SYMBOLS {
MEMORY { MEMORY {
ZP: start = $0080, size = $001A, define = yes; ZP: start = $0080, size = $001A, define = yes;
HEADER: file = %O, start = $0000, size = $0004; HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S, size = $C000 - %S; MAIN: file = %O, start = %S, size = $C000 - %S;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes; ZEROPAGE: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro, optional = yes; EXEHDR: load = HEADER, type = ro, optional = yes;
CODE: load = RAM, type = rw, optional = yes, define = yes; CODE: load = MAIN, type = rw, optional = yes, define = yes;
RODATA: load = RAM, type = ro, optional = yes; RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = RAM, type = rw, optional = yes; DATA: load = MAIN, type = rw, optional = yes;
BSS: load = RAM, type = bss, optional = yes, define = yes; BSS: load = MAIN, type = bss, optional = yes, define = yes;
} }

View file

@ -24,7 +24,7 @@ SYMBOLS {
MEMORY { MEMORY {
ZP: define = yes, start = $0080, size = $001A; ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004; HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S; MAIN: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF; MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__; LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__; OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
@ -40,14 +40,14 @@ MEMORY {
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, define = yes; INIT: load = MAIN, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
ONCE: load = MOVE, run = RAM, type = ro, define = yes, optional = yes; ONCE: load = MOVE, run = MAIN, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes; LC: load = MOVE, run = LC, type = ro, optional = yes;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;

View file

@ -10,19 +10,19 @@ SYMBOLS {
} }
MEMORY { MEMORY {
ZP: define = yes, start = $0080, size = $001A; ZP: define = yes, start = $0080, size = $001A;
RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__; MAIN: file = %O, start = $2000, size = $9F00 - __STACKSIZE__;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF; MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__; LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, define = yes; INIT: load = MAIN, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
ONCE: load = MOVE, run = RAM, type = ro, define = yes, optional = yes; ONCE: load = MOVE, run = RAM, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes; LC: load = MOVE, run = LC, type = ro, optional = yes;
} }

View file

@ -16,21 +16,21 @@ SYMBOLS {
MEMORY { MEMORY {
ZP: define = yes, start = $0080, size = $001A; ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004; HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; MAIN: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF; MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__; LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, define = yes; INIT: load = MAIN, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
ONCE: load = MOVE, run = RAM, type = ro, define = yes, optional = yes; ONCE: load = MOVE, run = MAIN, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes; LC: load = MOVE, run = LC, type = ro, optional = yes;
} }
FEATURES { FEATURES {

View file

@ -9,12 +9,12 @@ SYMBOLS {
} }
MEMORY { MEMORY {
HEADER: file = %O, start = $0000, size = $0004; HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S, size = $C000 - %S; MAIN: file = %O, start = %S, size = $C000 - %S;
} }
SEGMENTS { SEGMENTS {
EXEHDR: load = HEADER, type = ro, optional = yes; EXEHDR: load = HEADER, type = ro, optional = yes;
CODE: load = RAM, type = rw, optional = yes, define = yes; CODE: load = MAIN, type = rw, optional = yes, define = yes;
RODATA: load = RAM, type = ro, optional = yes; RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = RAM, type = rw, optional = yes; DATA: load = MAIN, type = rw, optional = yes;
BSS: load = RAM, type = bss, optional = yes, define = yes; BSS: load = MAIN, type = bss, optional = yes, define = yes;
} }

View file

@ -24,7 +24,7 @@ SYMBOLS {
MEMORY { MEMORY {
ZP: define = yes, start = $0080, size = $001A; ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004; HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S; MAIN: file = %O, start = %S + __OVERLAYSIZE__, size = __HIMEM__ - __STACKSIZE__ - __OVERLAYSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF; MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__; LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__; OVL1: file = "%O.1", start = %S, size = __OVERLAYSIZE__;
@ -40,14 +40,14 @@ MEMORY {
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, define = yes; INIT: load = MAIN, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
ONCE: load = MOVE, run = RAM, type = ro, define = yes, optional = yes; ONCE: load = MOVE, run = MAIN, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes; LC: load = MOVE, run = LC, type = ro, optional = yes;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;

View file

@ -10,20 +10,20 @@ SYMBOLS {
} }
MEMORY { MEMORY {
ZP: define = yes, start = $0080, size = $001A; ZP: define = yes, start = $0080, size = $001A;
RAM: file = %O, start = $2000, size = $9F00 - __STACKSIZE__; MAIN: file = %O, start = $2000, size = $9F00 - __STACKSIZE__;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF; MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__; LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, define = yes; INIT: load = MAIN, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
ONCE: load = MOVE, run = RAM, type = ro, define = yes, optional = yes; ONCE: load = MOVE, run = MAIN, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes; LC: load = MOVE, run = LC, type = ro, optional = yes;
} }
FEATURES { FEATURES {

View file

@ -16,21 +16,21 @@ SYMBOLS {
MEMORY { MEMORY {
ZP: define = yes, start = $0080, size = $001A; ZP: define = yes, start = $0080, size = $001A;
HEADER: file = %O, start = $0000, size = $0004; HEADER: file = %O, start = $0000, size = $0004;
RAM: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; MAIN: file = %O, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
MOVE: file = %O, define = yes, start = $0000, size = $FFFF; MOVE: file = %O, define = yes, start = $0000, size = $FFFF;
LC: define = yes, start = __LCADDR__, size = __LCSIZE__; LC: define = yes, start = __LCADDR__, size = __LCSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, define = yes; INIT: load = MAIN, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
ONCE: load = MOVE, run = RAM, type = ro, define = yes, optional = yes; ONCE: load = MOVE, run = MAIN, type = ro, define = yes, optional = yes;
LC: load = MOVE, run = LC, type = ro, optional = yes; LC: load = MOVE, run = LC, type = ro, optional = yes;
} }
FEATURES { FEATURES {

View file

@ -14,17 +14,17 @@ MEMORY {
# "main program" load chunk # "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004; MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S, size = $BC20 - %S; MAIN: file = %O, define = yes, start = %S, size = $BC20 - %S;
TRAILER: file = %O, start = $0000, size = $0006; TRAILER: file = %O, start = $0000, size = $0006;
} }
SEGMENTS { SEGMENTS {
EXEHDR: load = HEADER, type = ro, optional = yes;
MAINHDR: load = MAINHDR, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes, optional = yes;
RODATA: load = RAM, type = ro optional = yes;
DATA: load = RAM, type = rw optional = yes;
BSS: load = RAM, type = bss, define = yes, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes; ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes; # to enable modules to be able to link to C and assembler programs EXTZP: load = ZP, type = zp, optional = yes; # to enable modules to be able to link to C and assembler programs
EXEHDR: load = HEADER, type = ro, optional = yes;
MAINHDR: load = MAINHDR, type = ro, optional = yes;
CODE: load = MAIN, type = ro, define = yes, optional = yes;
RODATA: load = MAIN, type = ro optional = yes;
DATA: load = MAIN, type = rw optional = yes;
BSS: load = MAIN, type = bss, define = yes, optional = yes;
AUTOSTRT: load = TRAILER, type = ro, optional = yes; AUTOSTRT: load = TRAILER, type = ro, optional = yes;
} }

View file

@ -11,7 +11,7 @@ SYMBOLS {
} }
MEMORY { MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E; ZP: file = "", define = yes, start = $0082, size = $007E;
RAM: file = "", define = yes, start = %S, size = __CARTSIZE__; MAIN: file = "", define = yes, start = %S, size = __CARTSIZE__;
ROM: file = %O, define = yes, start = $C000 - __CARTSIZE__, size = __CARTSIZE__ - 6, fill = yes, fillval = $FF; ROM: file = %O, define = yes, start = $C000 - __CARTSIZE__, size = __CARTSIZE__ - 6, fill = yes, fillval = $FF;
CARTID: file = %O, start = $BFFA, size = $0006; CARTID: file = %O, start = $BFFA, size = $0006;
} }
@ -23,9 +23,9 @@ SEGMENTS {
ONCE: load = ROM, type = ro, optional = yes; ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro, define = yes; CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, optional = yes; RODATA: load = ROM, type = ro, optional = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes; DATA: load = ROM, run = MAIN, type = rw, define = yes, optional = yes;
INIT: load = RAM, type = bss, optional = yes; INIT: load = MAIN, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes, optional = yes; BSS: load = MAIN, type = bss, define = yes, optional = yes;
CARTHDR: load = CARTID, type = ro; CARTHDR: load = CARTID, type = ro;
} }
FEATURES { FEATURES {

View file

@ -9,20 +9,20 @@ SYMBOLS {
} }
MEMORY { MEMORY {
ZP: file = "", define = yes, start = $0082, size = $007E; ZP: file = "", define = yes, start = $0082, size = $007E;
RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S; MAIN: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes; ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes; EXTZP: load = ZP, type = zp, optional = yes;
CASHDR: load = RAM, type = ro; CASHDR: load = MAIN, type = ro;
STARTUP: load = RAM, type = ro, define = yes, optional = yes; STARTUP: load = MAIN, type = ro, define = yes, optional = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, optional = yes; ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro, optional = yes; RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = RAM, type = rw, optional = yes; DATA: load = MAIN, type = rw, optional = yes;
INIT: load = RAM, type = bss, optional = yes; INIT: load = MAIN, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes, optional = yes; BSS: load = MAIN, type = bss, define = yes, optional = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -23,7 +23,7 @@ MEMORY {
# "main program" load chunk # "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004; MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S + __OVERLAYSIZE__, MAIN: file = %O, define = yes, start = %S + __OVERLAYSIZE__,
size = $BC20 - __OVERLAYSIZE__ - __STACKSIZE__ - __RESERVED_MEMORY__ - %S; size = $BC20 - __OVERLAYSIZE__ - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
TRAILER: file = %O, start = $0000, size = $0006; TRAILER: file = %O, start = $0000, size = $0006;
@ -45,14 +45,14 @@ SEGMENTS {
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, optional = yes; ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, optional = yes; INIT: load = MAIN, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes; OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;

View file

@ -22,7 +22,7 @@ MEMORY {
# "main program" load chunk # "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004; MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S; MAIN: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
TRAILER: file = %O, start = $0000, size = $0006; TRAILER: file = %O, start = $0000, size = $0006;
} }
SEGMENTS { SEGMENTS {
@ -33,14 +33,14 @@ SEGMENTS {
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes; SYSCHKTRL: load = SYSCHKTRL, type = ro, optional = yes;
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, optional = yes; ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, optional = yes; INIT: load = MAIN, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
} }
FEATURES { FEATURES {

View file

@ -33,7 +33,7 @@ MEMORY {
# "main program" load chunk # "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004; MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S + MAIN: file = %O, define = yes, start = %S +
__LOWBSS_SIZE__, size = $D000 - __LOWBSS_SIZE__, size = $D000 -
__STACKSIZE__ - __STACKSIZE__ -
%S - %S -
@ -67,14 +67,14 @@ SEGMENTS {
SRPREPTRL: load = SRPREPTRL, type = ro; SRPREPTRL: load = SRPREPTRL, type = ro;
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, optional = yes; ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, optional = yes; INIT: load = MAIN, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
} }
FEATURES { FEATURES {

View file

@ -29,7 +29,7 @@ MEMORY {
# "main program" load chunk # "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004; MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S + MAIN: file = %O, define = yes, start = %S +
__OVERLAYSIZE__ + __OVERLAYSIZE__ +
__LOWBSS_SIZE__, size = $D000 - __LOWBSS_SIZE__, size = $D000 -
__STACKSIZE__ - __STACKSIZE__ -
@ -79,14 +79,14 @@ SEGMENTS {
SRPREPTRL: load = SRPREPTRL, type = ro; SRPREPTRL: load = SRPREPTRL, type = ro;
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, optional = yes; ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, optional = yes; INIT: load = MAIN, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;

View file

@ -28,7 +28,7 @@ MEMORY {
# "main program" load chunk # "main program" load chunk
MAINHDR: file = %O, start = $0000, size = $0004; MAINHDR: file = %O, start = $0000, size = $0004;
RAM: file = %O, define = yes, start = %S + MAIN: file = %O, define = yes, start = %S +
__LOWBSS_SIZE__, size = $D000 - __LOWBSS_SIZE__, size = $D000 -
__STACKSIZE__ - __STACKSIZE__ -
%S - %S -
@ -65,14 +65,14 @@ SEGMENTS {
SRPREPTRL: load = SRPREPTRL, type = ro; SRPREPTRL: load = SRPREPTRL, type = ro;
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, optional = yes; ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss, optional = yes; INIT: load = MAIN, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
} }
FEATURES { FEATURES {

View file

@ -11,21 +11,21 @@ MEMORY {
ZP: file = "", define = yes, start = $00E2, size = $001A; ZP: file = "", define = yes, start = $00E2, size = $001A;
TAPEHDR: file = %O, type = ro, start = $0000, size = $001F; TAPEHDR: file = %O, type = ro, start = $0000, size = $001F;
BASHEAD: file = %O, define = yes, start = $0501, size = $000D; BASHEAD: file = %O, define = yes, start = $0501, size = $000D;
RAM: file = %O, define = yes, start = __BASHEAD_LAST__, size = __RAMEND__ - __RAM_START__ - __STACKSIZE__; MAIN: file = %O, define = yes, start = __BASHEAD_LAST__, size = __RAMEND__ - __RAM_START__ - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
TAPEHDR: load = TAPEHDR, type = ro; TAPEHDR: load = TAPEHDR, type = ro;
BASHDR: load = BASHEAD, type = ro, define = yes, optional = yes; BASHDR: load = BASHEAD, type = ro, define = yes, optional = yes;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
ZPSAVE1: load = RAM, type = rw, define = yes; # ZPSAVE1, ZPSAVE2 must be together ZPSAVE1: load = MAIN, type = rw, define = yes; # ZPSAVE1, ZPSAVE2 must be together
ZPSAVE2: load = RAM, type = bss; # see "libsrc/atmos/crt0.s" ZPSAVE2: load = MAIN, type = bss; # see "libsrc/atmos/crt0.s"
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -3,17 +3,17 @@ SYMBOLS {
} }
MEMORY { MEMORY {
ZP: file = "", define = yes, start = $0070, size = $0020; ZP: file = "", define = yes, start = $0070, size = $0020;
RAM: file = %O, start = $0E00, size = $7200 - __STACKSIZE__; MAIN: file = %O, start = $0E00, size = $7200 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -9,7 +9,7 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A; ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $1BFF, size = $0002; LOADADDR: file = %O, start = $1BFF, size = $0002;
HEADER: file = %O, start = $1C01, size = $000C; HEADER: file = %O, start = $1C01, size = $000C;
RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __OVERLAYSIZE__ - __STACKSIZE__; MAIN: file = %O, define = yes, start = $1C0D, size = $A3F3 - __OVERLAYSIZE__ - __STACKSIZE__;
OVL1ADDR: file = "%O.1", start = $BFFE - __OVERLAYSIZE__, size = $0002; OVL1ADDR: file = "%O.1", start = $BFFE - __OVERLAYSIZE__, size = $0002;
OVL1: file = "%O.1", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; OVL1: file = "%O.1", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
OVL2ADDR: file = "%O.2", start = $BFFE - __OVERLAYSIZE__, size = $0002; OVL2ADDR: file = "%O.2", start = $BFFE - __OVERLAYSIZE__, size = $0002;
@ -33,14 +33,14 @@ SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro; LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss; INIT: load = MAIN, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
OVL1ADDR: load = OVL1ADDR, type = ro; OVL1ADDR: load = OVL1ADDR, type = ro;
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes; OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
OVL2ADDR: load = OVL2ADDR, type = ro; OVL2ADDR: load = OVL2ADDR, type = ro;

View file

@ -7,20 +7,20 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A; ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $1BFF, size = $0002; LOADADDR: file = %O, start = $1BFF, size = $0002;
HEADER: file = %O, start = $1C01, size = $000C; HEADER: file = %O, start = $1C01, size = $000C;
RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro; LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss; INIT: load = MAIN, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -7,20 +7,20 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A; ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $0FFF, size = $0002; LOADADDR: file = %O, start = $0FFF, size = $0002;
HEADER: file = %O, start = $1001, size = $000C; HEADER: file = %O, start = $1001, size = $000C;
RAM: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__; MAIN: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro; LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss; INIT: load = MAIN, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -7,14 +7,14 @@ SYMBOLS {
MEMORY { MEMORY {
ZP: file = "", start = $0002, size = $001A, define = yes; ZP: file = "", start = $0002, size = $001A, define = yes;
LOADADDR: file = %O, start = %S - 2, size = $0002; LOADADDR: file = %O, start = %S - 2, size = $0002;
RAM: file = %O, start = %S, size = $D000 - %S; MAIN: file = %O, start = %S, size = $D000 - %S;
} }
SEGMENTS { SEGMENTS {
LOADADDR: load = LOADADDR, type = ro; LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = RAM, type = ro, optional = yes; EXEHDR: load = MAIN, type = ro, optional = yes;
CODE: load = RAM, type = rw, optional = yes; CODE: load = MAIN, type = rw, optional = yes;
RODATA: load = RAM, type = ro, optional = yes; RODATA: load = MAIN, type = ro, optional = yes;
DATA: load = RAM, type = rw, optional = yes; DATA: load = MAIN, type = rw, optional = yes;
BSS: load = RAM, type = bss, optional = yes; BSS: load = MAIN, type = bss, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes; ZEROPAGE: load = ZP, type = zp, optional = yes;
} }

View file

@ -8,24 +8,24 @@ MEMORY {
STARTUP: file = %O, start = $00FE, size = $0102, fill = yes; STARTUP: file = %O, start = $00FE, size = $0102, fill = yes;
PAGE2: file = %O, start = $0200, size = $0100, fill = yes; PAGE2: file = %O, start = $0200, size = $0100, fill = yes;
PAGE3: file = %O, start = $0300, size = $0100, fill = yes; PAGE3: file = %O, start = $0300, size = $0100, fill = yes;
RAM: file = %O, start = $0400, size = $DC00; MAIN: file = %O, start = $0400, size = $DC00;
CHARRAM: file = "", define = yes, start = $E000, size = $1000; CHARRAM: file = "", define = yes, start = $E000, size = $1000;
VIDRAM: file = "", define = yes, start = $F000, size = $0400; VIDRAM: file = "", define = yes, start = $F000, size = $0400;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
EXEHDR: load = HEADER, type = rw; EXEHDR: load = HEADER, type = rw;
STARTUP: load = STARTUP, type = rw; STARTUP: load = STARTUP, type = rw;
PAGE2: load = PAGE2, type = rw; PAGE2: load = PAGE2, type = rw;
PAGE3: load = PAGE3, type = rw; PAGE3: load = PAGE3, type = rw;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss; INIT: load = MAIN, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -7,22 +7,22 @@ MEMORY {
STARTUP: file = %O, start = $00FE, size = $0102, fill = yes; STARTUP: file = %O, start = $00FE, size = $0102, fill = yes;
PAGE2: file = %O, start = $0200, size = $0100, fill = yes; PAGE2: file = %O, start = $0200, size = $0100, fill = yes;
PAGE3: file = %O, start = $0300, size = $0100, fill = yes; PAGE3: file = %O, start = $0300, size = $0100, fill = yes;
RAM: file = %O, start = $0400, size = $FECB - __STACKSIZE__; MAIN: file = %O, start = $0400, size = $FECB - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
EXEHDR: load = HEADER, type = rw; EXEHDR: load = HEADER, type = rw;
STARTUP: load = STARTUP, type = rw; STARTUP: load = STARTUP, type = rw;
PAGE2: load = PAGE2, type = rw; PAGE2: load = PAGE2, type = rw;
PAGE3: load = PAGE3, type = rw; PAGE3: load = PAGE3, type = rw;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss; INIT: load = MAIN, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -9,9 +9,9 @@ MEMORY {
# 0000-03ff is RAM # 0000-03ff is RAM
# FIXME: what zp range can we actually use? # FIXME: what zp range can we actually use?
# $0a-$11 is used by IRQ/NMI, $e8 is used by NMI # $0a-$11 is used by IRQ/NMI, $e8 is used by NMI
ZP: start = $0012, size = $e8 - $12; ZP: start = $0012, size = $00E8 - $0012;
CPUSTACK: start = $0100, size =$100; CPUSTACK: start = $0100, size = $0100;
RAM: start = $0200, size = $200 - __STACKSIZE__, define = yes; RAM: start = $0200, size = $0200 - __STACKSIZE__, define = yes;
CARTHEADER: file = %O, define = yes, start = %S, size = $0029; CARTHEADER: file = %O, define = yes, start = %S, size = $0029;
# 6000-e000 can be (Cartridge) ROM # 6000-e000 can be (Cartridge) ROM
@ -19,7 +19,7 @@ MEMORY {
#ROM: start = $6000, size = $1000, fill = yes, fillval = $00, file = %O, define = yes; #ROM: start = $6000, size = $1000, fill = yes, fillval = $00, file = %O, define = yes;
#ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes; #ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes;
# for images that have code >$6fff we must calculate the checksum! # for images that have code >$6fff we must calculate the checksum!
ROM: start = $6000 + $29, size = $8000 - $29, fill = yes, fillval = $00, file = %O, define = yes; ROM: start = $6000 + $0029, size = $8000 - $0029, fill = yes, fillval = $00, file = %O, define = yes;
} }
SEGMENTS { SEGMENTS {

View file

@ -6,17 +6,17 @@ SYMBOLS {
} }
MEMORY { MEMORY {
ZP: start = $0080, size = $0040; ZP: start = $0080, size = $0040;
RAM: start = %S, size = $7600 - __STACKSIZE__; MAIN: start = %S, size = $7600 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers
STARTUP: load = RAM, type = ro; # First initialization code STARTUP: load = MAIN, type = ro; # First initialization code
LOWCODE: load = RAM, type = ro, optional = yes; # Legacy from other platforms LOWCODE: load = MAIN, type = ro, optional = yes; # Legacy from other platforms
ONCE: load = RAM, type = ro, define = yes, optional = yes; # Library initialization code ONCE: load = MAIN, type = ro, define = yes, optional = yes; # Library initialization code
CODE: load = RAM, type = ro; # Program CODE: load = MAIN, type = ro; # Program
RODATA: load = RAM, type = ro; # Literals, constants RODATA: load = MAIN, type = ro; # Literals, constants
DATA: load = RAM, type = rw; # Initialized variables DATA: load = MAIN, type = rw; # Initialized variables
BSS: load = RAM, type = bss, define = yes; # Uninitialized variables BSS: load = MAIN, type = bss, define = yes; # Uninitialized variables
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -7,20 +7,20 @@ SYMBOLS {
MEMORY { MEMORY {
ZP: file = "", define = yes, start = $0000, size = $0100; ZP: file = "", define = yes, start = $0000, size = $0100;
HEADER: file = %O, start = $0000, size = $000a; HEADER: file = %O, start = $0000, size = $000a;
RAM: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes; EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes; APPZP: load = ZP, type = zp, optional = yes;
BLLHDR: load = HEADER, type = ro; BLLHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes; RODATA: load = MAIN, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes; DATA: load = MAIN, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -11,7 +11,7 @@ MEMORY {
HEADER: file = %O, start = $0000, size = $0040; HEADER: file = %O, start = $0000, size = $0040;
BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__;
DIR: file = %O, start = $0000, size = 8; DIR: file = %O, start = $0000, size = 8;
RAM: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
@ -20,13 +20,13 @@ SEGMENTS {
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
BOOTLDR: load = BOOT, type = ro; BOOTLDR: load = BOOT, type = ro;
DIRECTORY: load = DIR, type = ro; DIRECTORY: load = DIR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes; RODATA: load = MAIN, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes; DATA: load = MAIN, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -12,7 +12,7 @@ MEMORY {
HEADER: file = %O, start = $0000, size = $0040; HEADER: file = %O, start = $0000, size = $0040;
BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__;
DIR: file = %O, start = $0000, size = 8; DIR: file = %O, start = $0000, size = 8;
RAM: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $0200, size = $BD38 - __STACKSIZE__;
UPLDR: file = %O, define = yes, start = $BFDC, size = $005C; UPLDR: file = %O, define = yes, start = $BFDC, size = $005C;
} }
SEGMENTS { SEGMENTS {
@ -22,13 +22,13 @@ SEGMENTS {
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
BOOTLDR: load = BOOT, type = ro; BOOTLDR: load = BOOT, type = ro;
DIRECTORY:load = DIR, type = ro; DIRECTORY:load = DIR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes; RODATA: load = MAIN, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes; DATA: load = MAIN, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
UPCODE: load = UPLDR, type = ro, define = yes; UPCODE: load = UPLDR, type = ro, define = yes;
UPDATA: load = UPLDR, type = rw, define = yes; UPDATA: load = UPLDR, type = rw, define = yes;
} }

View file

@ -11,7 +11,7 @@ MEMORY {
HEADER: file = %O, start = $0000, size = $0040; HEADER: file = %O, start = $0000, size = $0040;
BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__; BOOT: file = %O, start = $0200, size = __STARTOFDIRECTORY__;
DIR: file = %O, start = $0000, size = 8; DIR: file = %O, start = $0000, size = 8;
RAM: file = %O, define = yes, start = $0200, size = $BE38 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $0200, size = $BE38 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
@ -20,13 +20,13 @@ SEGMENTS {
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
BOOTLDR: load = BOOT, type = ro; BOOTLDR: load = BOOT, type = ro;
DIRECTORY: load = DIR, type = ro; DIRECTORY: load = DIR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = MAIN, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = MAIN, type = ro, define = yes, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = MAIN, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes; RODATA: load = MAIN, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes; DATA: load = MAIN, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -3,16 +3,16 @@ SYMBOLS {
} }
MEMORY { MEMORY {
ZP: file = "", define = yes, start = $0000, size = $0001F; ZP: file = "", define = yes, start = $0000, size = $0001F;
RAM: file = %O, start = %S, size = $10000 - __STACKSIZE__; MAIN: file = %O, start = %S, size = $10000 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = rw; CODE: load = MAIN, type = rw;
RODATA: load = RAM, type = rw; RODATA: load = MAIN, type = rw;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -12,14 +12,14 @@ MEMORY {
# for size of ZP, see runtime/zeropage.s and c1p/extzp.s # for size of ZP, see runtime/zeropage.s and c1p/extzp.s
ZP: file = "", define = yes, start = $0002, size = $001A + $0006; ZP: file = "", define = yes, start = $0002, size = $001A + $0006;
HEAD: file = %O, start = $0000, size = $00B6; HEAD: file = %O, start = $0000, size = $00B6;
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
BOOT: load = HEAD, type = ro, optional = yes; BOOT: load = HEAD, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = rw; CODE: load = MAIN, type = rw;
RODATA: load = RAM, type = rw; RODATA: load = MAIN, type = rw;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }

View file

@ -12,19 +12,19 @@ MEMORY {
# for size of ZP, see runtime/zeropage.s and c1p/extzp.s # for size of ZP, see runtime/zeropage.s and c1p/extzp.s
ZP: file = "", define = yes, start = $0002, size = $001A + $0020; ZP: file = "", define = yes, start = $0002, size = $001A + $0020;
HEAD: file = %O, start = $0000, size = $00B6; HEAD: file = %O, start = $0000, size = $00B6;
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, define = yes, optional = yes; EXTZP: load = ZP, type = zp, define = yes, optional = yes;
BOOT: load = HEAD, type = ro, optional = yes; BOOT: load = HEAD, type = ro, optional = yes;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = rw; CODE: load = MAIN, type = rw;
RODATA: load = RAM, type = rw; RODATA: load = MAIN, type = rw;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -7,20 +7,20 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A; ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $0FFF, size = $0002; LOADADDR: file = %O, start = $0FFF, size = $0002;
HEADER: file = %O, start = $1001, size = $000C; HEADER: file = %O, start = $1001, size = $000C;
RAM: file = %O, define = yes, start = $100D, size = $ECF3 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $100D, size = $ECF3 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro; LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss; INIT: load = MAIN, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -5,18 +5,18 @@ SYMBOLS {
MEMORY { MEMORY {
ZP: file = "", start = $0000, size = $001A; ZP: file = "", start = $0000, size = $001A;
HEADER: file = %O, start = $0000, size = $0001; HEADER: file = %O, start = $0000, size = $0001;
RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -5,18 +5,18 @@ SYMBOLS {
MEMORY { MEMORY {
ZP: file = "", start = $0000, size = $001A; ZP: file = "", start = $0000, size = $001A;
HEADER: file = %O, start = $0000, size = $0001; HEADER: file = %O, start = $0000, size = $0001;
RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -9,20 +9,20 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A; ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $11FF, size = $0002; LOADADDR: file = %O, start = $11FF, size = $0002;
HEADER: file = %O, start = $1201, size = $000C; HEADER: file = %O, start = $1201, size = $000C;
RAM: file = %O, define = yes, start = $120D, size = $6DF3 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $120D, size = $6DF3 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro; LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss; INIT: load = MAIN, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -7,20 +7,20 @@ MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A; ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $0FFF, size = $0002; LOADADDR: file = %O, start = $0FFF, size = $0002;
HEADER: file = %O, start = $1001, size = $000C; HEADER: file = %O, start = $1001, size = $000C;
RAM: file = %O, define = yes, start = $100D, size = $0DF3 - __STACKSIZE__; MAIN: file = %O, define = yes, start = $100D, size = $0DF3 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro; LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro; STARTUP: load = MAIN, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = MAIN, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = RAM, type = rw; DATA: load = MAIN, type = rw;
INIT: load = RAM, type = bss; INIT: load = MAIN, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,

View file

@ -148,7 +148,7 @@ Special locations:
($58). ($58).
<tag/Stack/ <tag/Stack/
The C runtime stack is located at end of the RAM memory area (&dollar;CFFF) The C runtime stack is located at end of the MAIN memory area (&dollar;CFFF)
and grows downwards. and grows downwards.
<tag/Heap/ <tag/Heap/
@ -561,7 +561,7 @@ The contents of this chunk come from the SYSCHKCHNK memory area of the linker co
<item>main program&nl; <item>main program&nl;
This load chunk is loaded at the selected program start address (default &dollar;2000) and This load chunk is loaded at the selected program start address (default &dollar;2000) and
contains all of the code and data of the program.&nl; contains all of the code and data of the program.&nl;
The contents of this chunk come from the RAM memory area of the linker config file. The contents of this chunk come from the MAIN memory area of the linker config file.
</enum> </enum>

View file

@ -14,7 +14,7 @@
.import initlib, donelib .import initlib, donelib
.import callmain, zerobss .import callmain, zerobss
.import __RESERVED_MEMORY__ .import __RESERVED_MEMORY__
.import __RAM_START__, __RAM_SIZE__ .import __MAIN_START__, __MAIN_SIZE__
.ifdef __ATARIXL__ .ifdef __ATARIXL__
.import __STACKSIZE__ .import __STACKSIZE__
.import sram_init .import sram_init
@ -55,10 +55,10 @@ start:
.ifdef __ATARIXL__ .ifdef __ATARIXL__
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta sp sta sp
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) stx sp+1
sta sp+1
.else .else

View file

@ -1,11 +1,11 @@
; This file defines the EXE header and main chunk load header for Atari executables ; This file defines the EXE header and main chunk load header for Atari executables
.export __EXEHDR__: absolute = 1 .export __EXEHDR__: absolute = 1
.import __RAM_START__, __BSS_LOAD__ .import __MAIN_START__, __BSS_LOAD__
.segment "EXEHDR" .segment "EXEHDR"
.word $FFFF .word $FFFF
.segment "MAINHDR" .segment "MAINHDR"
.word __RAM_START__ .word __MAIN_START__
.word __BSS_LOAD__ - 1 .word __BSS_LOAD__ - 1

View file

@ -9,7 +9,7 @@
.export __STARTUP__ : absolute = 1 ; Mark as startup .export __STARTUP__ : absolute = 1 ; Mark as startup
.import initlib, donelib .import initlib, donelib
.import callmain, zerobss .import callmain, zerobss
.import __RAM_START__, __RAM_SIZE__, __STACKSIZE__ .import __MAIN_START__, __MAIN_SIZE__, __STACKSIZE__
.include "zeropage.inc" .include "zeropage.inc"
.include "atmos.inc" .include "atmos.inc"
@ -44,10 +44,10 @@ L1: lda sp,x
tsx tsx
stx spsave ; Save system stk ptr stx spsave ; Save system stk ptr
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta sp sta sp
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) stx sp+1 ; Set argument stack ptr
sta sp+1 ; Set argument stack ptr
; Call the module constructors. ; Call the module constructors.

View file

@ -8,7 +8,7 @@
.import zerobss .import zerobss
.import push0, callmain .import push0, callmain
.import RESTOR, BSOUT, CLRCH .import RESTOR, BSOUT, CLRCH
.import __RAM_START__, __RAM_SIZE__, __STACKSIZE__ .import __MAIN_START__, __MAIN_SIZE__, __STACKSIZE__
.importzp ST .importzp ST
.include "zeropage.inc" .include "zeropage.inc"
@ -56,10 +56,10 @@ L1: lda sp,x
tsx tsx
stx spsave ; Save the system stack pointer stx spsave ; Save the system stack pointer
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta sp sta sp
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) stx sp+1 ; Set argument stack ptr
sta sp+1 ; Set argument stack ptr
; Call the module constructors. ; Call the module constructors.

View file

@ -33,9 +33,9 @@ Start:
; setup the stack ; setup the stack
lda #<(__RAM_START__+__RAM_SIZE__) lda #<(__RAM_START__+__RAM_SIZE__)
ldx #>(__RAM_START__+__RAM_SIZE__)
sta sp sta sp
lda #>(__RAM_START__+__RAM_SIZE__) stx sp + 1
sta sp + 1
; Call module constructors ; Call module constructors
jsr initlib jsr initlib

View file

@ -4,7 +4,7 @@
; This header is required for BLL builds. ; This header is required for BLL builds.
; ;
.import __BSS_LOAD__ .import __BSS_LOAD__
.import __RAM_START__ .import __MAIN_START__
.export __BLLHDR__: absolute = 1 .export __BLLHDR__: absolute = 1
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
@ -12,8 +12,7 @@
.segment "BLLHDR" .segment "BLLHDR"
.word $0880 .word $0880
.dbyt __RAM_START__ .dbyt __MAIN_START__
.dbyt __BSS_LOAD__ - __RAM_START__ + 10 .dbyt __BSS_LOAD__ - __MAIN_START__ + 10
.byte $42,$53 .byte $42,$53
.byte $39,$33 .byte $39,$33

View file

@ -22,7 +22,7 @@
.import zerobss .import zerobss
.import callmain .import callmain
.import _main .import _main
.import __RAM_START__, __RAM_SIZE__, __STACKSIZE__ .import __MAIN_START__, __MAIN_SIZE__, __STACKSIZE__
.include "zeropage.inc" .include "zeropage.inc"
.include "extzp.inc" .include "extzp.inc"
@ -79,10 +79,10 @@ MikeyInitData: .byte $9e,$18,$68,$1f,$00,$00,$00,$00,$00,$ff,$1a,$1b,$04,$0d,$2
; Set up the stack. ; Set up the stack.
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta sp sta sp
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) stx sp+1
sta sp+1
; Init Mickey. ; Init Mickey.

View file

@ -5,7 +5,7 @@
; ;
.include "lynx.inc" .include "lynx.inc"
.import __STARTOFDIRECTORY__ .import __STARTOFDIRECTORY__
.import __RAM_START__ .import __MAIN_START__
.import __CODE_SIZE__, __DATA_SIZE__, __RODATA_SIZE__ .import __CODE_SIZE__, __DATA_SIZE__, __RODATA_SIZE__
.import __STARTUP_SIZE__, __ONCE_SIZE__, __LOWCODE_SIZE__ .import __STARTUP_SIZE__, __ONCE_SIZE__, __LOWCODE_SIZE__
.import __BLOCKSIZE__ .import __BLOCKSIZE__
@ -25,6 +25,6 @@ len0 = __STARTUP_SIZE__ + __ONCE_SIZE__ + __CODE_SIZE__ + __DATA_SIZE__ + __RODA
.byte <block0 .byte <block0
.word off0 & (__BLOCKSIZE__ - 1) .word off0 & (__BLOCKSIZE__ - 1)
.byte $88 .byte $88
.word __RAM_START__ .word __MAIN_START__
.word len0 .word len0
__DIRECTORY_END__: __DIRECTORY_END__:

View file

@ -6,16 +6,16 @@
; add "-u __BOOT__" to the cl65/ld65 command line. Then, the linker ; add "-u __BOOT__" to the cl65/ld65 command line. Then, the linker
; will import this symbol name; and, link this module at the front ; will import this symbol name; and, link this module at the front
; of your program file. ; of your program file.
;
.export __BOOT__:abs = 1
.import __RAM_START__, __RAM_SIZE__, __BSS_RUN__ .export __BOOT__ : abs = 1
.import __MAIN_START__, __MAIN_SIZE__, __BSS_RUN__
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
load_addr := __RAM_START__ load_addr := __MAIN_START__
load_size = __BSS_RUN__ - __RAM_START__ load_size = __BSS_RUN__ - __MAIN_START__
ram_top := __RAM_START__ + __RAM_SIZE__ ram_top := __MAIN_START__ + __MAIN_SIZE__
.segment "BOOT" .segment "BOOT"

View file

@ -8,7 +8,7 @@
.import _main .import _main
.export __STARTUP__ : absolute = 1 ; Mark as startup .export __STARTUP__ : absolute = 1 ; Mark as startup
.import __RAM_START__, __RAM_SIZE__ ; Linker generated .import __MAIN_START__, __MAIN_SIZE__ ; Linker generated
.import __STACKSIZE__ .import __STACKSIZE__
.import zerobss, initlib, donelib .import zerobss, initlib, donelib
@ -32,10 +32,10 @@ _init: ldx #$FF ; Initialize stack pointer to $01FF
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
; Set cc65 argument stack pointer ; Set cc65 argument stack pointer
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta sp sta sp
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) stx sp+1
sta sp+1
; --------------------------------------------------------------------------- ; ---------------------------------------------------------------------------
; Initialize memory storage ; Initialize memory storage

View file

@ -9,7 +9,7 @@
.import callirq_y, initlib, donelib .import callirq_y, initlib, donelib
.import callmain, zerobss .import callmain, zerobss
.import __INTERRUPTOR_COUNT__ .import __INTERRUPTOR_COUNT__
.import __RAM_START__, __RAM_SIZE__ ; Linker generated .import __MAIN_START__, __MAIN_SIZE__ ; Linker generated
.import __STACKSIZE__ ; Linker generated .import __STACKSIZE__ ; Linker generated
.importzp ST .importzp ST
@ -50,12 +50,12 @@ L1: lda sp,x
; of the usable RAM. ; of the usable RAM.
tsx tsx
stx spsave ; save system stk ptr stx spsave ; Save system stk ptr
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta sp sta sp
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) stx sp+1
sta sp+1
; Set up the IRQ vector in the banked RAM; and, switch off the ROM. ; Set up the IRQ vector in the banked RAM; and, switch off the ROM.

View file

@ -9,7 +9,7 @@
.import zerobss, callmain .import zerobss, callmain
.import initlib, donelib .import initlib, donelib
.import exit .import exit
.import __RAM_START__, __RAM_SIZE__ ; Linker generated .import __MAIN_START__, __MAIN_SIZE__ ; Linker generated
.import __STACKSIZE__ ; Linker generated .import __STACKSIZE__ ; Linker generated
.include "zeropage.inc" .include "zeropage.inc"
@ -19,8 +19,8 @@
cld cld
ldx #$FF ldx #$FF
txs txs
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
ldx #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta sp sta sp
stx sp+1 stx sp+1
jsr zerobss jsr zerobss

View file

@ -8,7 +8,7 @@
.import zerobss, push0 .import zerobss, push0
.import callmain .import callmain
.import RESTOR, BSOUT, CLRCH .import RESTOR, BSOUT, CLRCH
.import __RAM_START__, __RAM_SIZE__ ; Linker generated .import __MAIN_START__, __MAIN_SIZE__ ; Linker generated
.import __STACKSIZE__ ; Linker generated .import __STACKSIZE__ ; Linker generated
.importzp ST .importzp ST
@ -44,10 +44,10 @@ L1: lda sp,x
tsx tsx
stx spsave ; Save the system stack ptr stx spsave ; Save the system stack ptr
lda #<(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta sp sta sp
lda #>(__RAM_START__ + __RAM_SIZE__ + __STACKSIZE__) stx sp+1 ; Set argument stack ptr
sta sp+1 ; Set argument stack ptr
; Call the module constructors. ; Call the module constructors.