Renamed INITBSS to INIT and INIT to ONCE.

The way we want to use the INITBSS segment - and especially the fact that it won't have the type bss on all ROM based targets - means that the name INITBSS is misleading. After all INIT is the best name from my perspective as it serves several purposes and therefore needs a rather generic name.

Unfortunately this means that the current INIT segment needs to be renamed too. Looking for a short (ideally 4 letter) name I came up with ONCE as it contains all code (and data) accessed only once during initialization.
This commit is contained in:
Oliver Schmidt 2016-03-06 21:26:22 +01:00
parent ab1600b346
commit 419eb700b5
132 changed files with 402 additions and 390 deletions

View File

@ -18,7 +18,7 @@ SYMBOLS {
__STACKSIZE__: type = weak, value = $0800; # 2k stack __STACKSIZE__: type = weak, value = $0800; # 2k stack
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__LOADADDR__: type = weak, value = __STARTUP_RUN__; __LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ + __LOADSIZE__: type = weak, value = __INIT_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__; __MOVE_LAST__ - __MOVE_START__;
} }
MEMORY { MEMORY {
@ -45,9 +45,9 @@ SEGMENTS {
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes; INIT: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
INIT: 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;
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;
@ -63,7 +63,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -5,7 +5,7 @@ SYMBOLS {
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two __LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack __STACKSIZE__: type = weak, value = $0800; # 2k stack
__LOADADDR__: type = weak, value = __STARTUP_RUN__; __LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ + __LOADSIZE__: type = weak, value = __INIT_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__; __MOVE_LAST__ - __MOVE_START__;
} }
MEMORY { MEMORY {
@ -21,16 +21,16 @@ SEGMENTS {
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes; INIT: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
INIT: 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;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -10,7 +10,7 @@ SYMBOLS {
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two __LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack __STACKSIZE__: type = weak, value = $0800; # 2k stack
__LOADADDR__: type = weak, value = __STARTUP_RUN__; __LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ + __LOADSIZE__: type = weak, value = __INIT_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__; __MOVE_LAST__ - __MOVE_START__;
} }
MEMORY { MEMORY {
@ -28,16 +28,16 @@ SEGMENTS {
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes; INIT: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
INIT: 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;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -18,7 +18,7 @@ SYMBOLS {
__STACKSIZE__: type = weak, value = $0800; # 2k stack __STACKSIZE__: type = weak, value = $0800; # 2k stack
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
__LOADADDR__: type = weak, value = __STARTUP_RUN__; __LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ + __LOADSIZE__: type = weak, value = __INIT_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__; __MOVE_LAST__ - __MOVE_START__;
} }
MEMORY { MEMORY {
@ -45,9 +45,9 @@ SEGMENTS {
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes; INIT: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
INIT: 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;
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;
@ -63,7 +63,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -5,7 +5,7 @@ SYMBOLS {
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two __LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack __STACKSIZE__: type = weak, value = $0800; # 2k stack
__LOADADDR__: type = weak, value = __STARTUP_RUN__; __LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ + __LOADSIZE__: type = weak, value = __INIT_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__; __MOVE_LAST__ - __MOVE_START__;
} }
MEMORY { MEMORY {
@ -21,16 +21,16 @@ SEGMENTS {
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes; INIT: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
INIT: 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;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -10,7 +10,7 @@ SYMBOLS {
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two __LCSIZE__: type = weak, value = $0C00; # Rest of bank two
__STACKSIZE__: type = weak, value = $0800; # 2k stack __STACKSIZE__: type = weak, value = $0800; # 2k stack
__LOADADDR__: type = weak, value = __STARTUP_RUN__; __LOADADDR__: type = weak, value = __STARTUP_RUN__;
__LOADSIZE__: type = weak, value = __INITBSS_RUN__ - __STARTUP_RUN__ + __LOADSIZE__: type = weak, value = __INIT_RUN__ - __STARTUP_RUN__ +
__MOVE_LAST__ - __MOVE_START__; __MOVE_LAST__ - __MOVE_START__;
} }
MEMORY { MEMORY {
@ -28,16 +28,16 @@ SEGMENTS {
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, define = yes; INIT: load = RAM, type = bss, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
INIT: 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;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -16,23 +16,23 @@ MEMORY {
CARTID: file = %O, start = $BFFA, size = $0006; CARTID: file = %O, start = $BFFA, size = $0006;
} }
SEGMENTS { SEGMENTS {
STARTUP: load = ROM, type = ro, define = yes, optional = yes; ZEROPAGE: load = ZP, type = zp, optional = yes;
LOWCODE: load = ROM, type = ro, define = yes, optional = yes; EXTZP: load = ZP, type = zp, optional = yes;
INIT: load = ROM, type = ro, optional = yes; STARTUP: load = ROM, type = ro, define = yes, optional = yes;
CODE: load = ROM, type = ro, define = yes; LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
RODATA: load = ROM, type = ro, optional = yes; ONCE: load = ROM, type = ro, optional = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes; CODE: load = ROM, type = ro, define = yes;
INITBSS: load = RAM, type = bss, optional = yes; RODATA: load = ROM, type = ro, optional = yes;
BSS: load = RAM, type = bss, define = yes, optional = yes; DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes;
CARTHDR: load = CARTID, type = ro; INIT: load = RAM, type = bss, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes; BSS: load = RAM, type = bss, define = yes, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes; CARTHDR: load = CARTID, type = ro;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -12,23 +12,23 @@ MEMORY {
RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S; RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
} }
SEGMENTS { SEGMENTS {
CASHDR: load = RAM, type = ro; ZEROPAGE: load = ZP, type = zp, optional = yes;
STARTUP: load = RAM, type = ro, define = yes, optional = yes; EXTZP: load = ZP, type = zp, optional = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; CASHDR: load = RAM, type = ro;
INIT: load = RAM, type = ro, optional = yes; STARTUP: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
RODATA: load = RAM, type = ro, optional = yes; ONCE: load = RAM, type = ro, optional = yes;
DATA: load = RAM, type = rw, optional = yes; CODE: load = RAM, type = ro, define = yes;
INITBSS: load = RAM, type = bss, optional = yes; RODATA: load = RAM, type = ro, optional = yes;
BSS: load = RAM, type = bss, define = yes, optional = yes; DATA: load = RAM, type = rw, optional = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes; INIT: load = RAM, type = bss, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes; BSS: load = RAM, type = bss, define = yes, optional = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -38,6 +38,8 @@ MEMORY {
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__; OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
@ -45,14 +47,12 @@ SEGMENTS {
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes; ONCE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes; INIT: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = 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;
@ -68,7 +68,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -26,6 +26,8 @@ MEMORY {
TRAILER: file = %O, start = $0000, size = $0006; TRAILER: file = %O, start = $0000, size = $0006;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes; SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
@ -33,21 +35,19 @@ SEGMENTS {
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes; ONCE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes; INIT: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -13,9 +13,11 @@ MEMORY {
CARTENTRY: file = %O, start = $BFFE, size = $0002; CARTENTRY: file = %O, start = $BFFE, size = $0002;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
STARTUP: load = ROM, type = ro, define = yes, optional = yes; STARTUP: load = ROM, type = ro, define = yes, optional = yes;
LOWCODE: load = ROM, type = ro, define = yes, optional = yes; LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
INIT: 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 = RAM, type = rw, define = yes, optional = yes;
@ -23,14 +25,12 @@ SEGMENTS {
CARTNAME: load = CARTNAME, type = ro, define = yes; CARTNAME: load = CARTNAME, type = ro, define = yes;
CARTYEAR: load = CARTYEAR, type = ro, define = yes; CARTYEAR: load = CARTYEAR, type = ro, define = yes;
CARTENTRY: load = CARTENTRY, type = ro, define = yes; CARTENTRY: load = CARTENTRY, type = ro, define = yes;
ZEROPAGE: load = ZP, type = zp, optional = yes;
EXTZP: load = ZP, type = zp, optional = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -50,6 +50,9 @@ MEMORY {
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
@ -66,21 +69,19 @@ SEGMENTS {
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes; ONCE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes; INIT: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -62,6 +62,9 @@ MEMORY {
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
@ -78,14 +81,12 @@ SEGMENTS {
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes; ONCE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes; INIT: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = 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;
@ -102,7 +103,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -48,6 +48,9 @@ MEMORY {
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes; SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
@ -64,21 +67,19 @@ SEGMENTS {
MAINHDR: load = MAINHDR, type = ro; MAINHDR: load = MAINHDR, type = ro;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, optional = yes; ONCE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss, optional = yes; INIT: load = RAM, type = bss, optional = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
AUTOSTRT: load = TRAILER, type = ro; AUTOSTRT: load = TRAILER, type = ro;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -21,7 +21,7 @@ SEGMENTS {
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
ZPSAVE1: load = RAM, type = rw, define = yes; # ZPSAVE1, ZPSAVE2 must be together ZPSAVE1: load = RAM, type = rw, define = yes; # ZPSAVE1, ZPSAVE2 must be together
ZPSAVE2: load = RAM, type = bss; # see "libsrc/atmos/crt0.s" ZPSAVE2: load = RAM, type = bss; # see "libsrc/atmos/crt0.s"
@ -31,7 +31,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -6,20 +6,20 @@ MEMORY {
RAM: file = %O, start = $0E00, size = $7200 - __STACKSIZE__; RAM: file = %O, start = $0E00, size = $7200 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -30,17 +30,17 @@ MEMORY {
OVL9: file = "%O.9", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__; OVL9: file = "%O.9", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
} }
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 = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss; INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
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;
@ -64,7 +64,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -10,23 +10,23 @@ MEMORY {
RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__; RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __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 = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss; INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -10,23 +10,23 @@ MEMORY {
RAM: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__; RAM: file = %O, start = $100D, size = $6FF3 - __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 = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss; INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -44,9 +44,9 @@ SEGMENTS {
CODE: load = MAIN, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw; DATA: load = MAIN, type = rw;
INITBSS: load = MAIN, type = rw; INIT: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
INIT: load = INIT, type = ro; ONCE: load = INIT, type = ro;
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;
@ -70,7 +70,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -23,15 +23,15 @@ SEGMENTS {
CODE: load = MAIN, type = ro; CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro; RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw; DATA: load = MAIN, type = rw;
INITBSS: load = MAIN, type = rw; INIT: load = MAIN, type = rw;
BSS: load = MAIN, type = bss, define = yes; BSS: load = MAIN, type = bss, define = yes;
INIT: load = INIT, type = ro, define = yes; ONCE: load = INIT, type = ro, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -18,11 +18,11 @@ SEGMENTS {
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 = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss; INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes; EXTZP: load = ZP, type = rw, define = yes;
@ -31,7 +31,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -15,11 +15,11 @@ SEGMENTS {
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 = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss; INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = rw, define = yes; EXTZP: load = ZP, type = rw, define = yes;
@ -28,7 +28,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -1,41 +1,51 @@
# linker config to produce simple Gamate cartridge (.bin) # linker config to produce simple Gamate cartridge (.bin)
SYMBOLS { SYMBOLS {
__STARTUP__: type = import; __STARTUP__: type = import;
__STACKSIZE__: type = weak, value = $0080; # 1 page stack __STACKSIZE__: type = weak, value = $0080; # 1 page stack
} }
MEMORY { 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 = $e8 - $12;
CPUSTACK: start = $0100, size =$100; CPUSTACK: start = $0100, size =$100;
RAM: start = $0200, size = $200 - __STACKSIZE__, define = yes; RAM: start = $0200, size = $200 - __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
# WARNING: fill value must be $00 else it will no more work # WARNING: fill value must be $00 else it will no more work
#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 + $29, size = $8000 - $29, fill = yes, fillval = $00, file = %O, define = yes;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes; ZEROPAGE: load = ZP, type = zp, define = yes;
EXTZP: load = ZP, type = zp, define = yes, optional = yes; EXTZP: load = ZP, type = zp, define = yes, optional = yes;
APPZP: load = ZP, type = zp, define = yes, optional = yes; APPZP: load = ZP, type = zp, define = yes, optional = yes;
STARTUP: load = CARTHEADER, type = ro, define=yes; STARTUP: load = CARTHEADER, type = ro, define = yes;
INIT: load = ROM, type = ro, define = yes, optional = yes; ONCE: load = ROM, type = ro, define = yes, optional = yes;
CODE: load = ROM, type = ro, define=yes; CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define=yes; RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run=RAM, type = rw, define = yes; DATA: load = ROM, run = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: segment = RODATA, type = constructor, label = __CONSTRUCTOR_TABLE__, count = __CONSTRUCTOR_COUNT__; CONDES: type = constructor,
CONDES: segment = RODATA, type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; label = __CONSTRUCTOR_TABLE__,
CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__, import = __CALLIRQ__; count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
} }

View File

@ -40,7 +40,7 @@ SEGMENTS {
VLIRIDX0: type = ro, load = CVT, align = $200, optional = yes; VLIRIDX0: type = ro, load = CVT, align = $200, optional = yes;
STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $200, define = yes; STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $200, define = yes;
LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes; LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes;
INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes; ONCE: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes;
CODE: type = ro, run = VLIR0, load = CVT; CODE: type = ro, run = VLIR0, load = CVT;
RODATA: type = ro, run = VLIR0, load = CVT; RODATA: type = ro, run = VLIR0, load = CVT;
DATA: type = rw, run = VLIR0, load = CVT; DATA: type = rw, run = VLIR0, load = CVT;
@ -88,7 +88,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -37,7 +37,7 @@ SEGMENTS {
RECORDS: type = ro, load = CVT, align = $FE, optional = yes; RECORDS: type = ro, load = CVT, align = $FE, optional = yes;
STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $FE, define = yes; STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $FE, define = yes;
LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes; LOWCODE: type = ro, run = VLIR0, load = CVT, optional = yes;
INIT: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes; ONCE: type = ro, run = VLIR0, load = CVT, define = yes, optional = yes;
CODE: type = ro, run = VLIR0, load = CVT; CODE: type = ro, run = VLIR0, load = CVT;
RODATA: type = ro, run = VLIR0, load = CVT; RODATA: type = ro, run = VLIR0, load = CVT;
DATA: type = rw, run = VLIR0, load = CVT; DATA: type = rw, run = VLIR0, load = CVT;
@ -66,7 +66,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -12,7 +12,7 @@ 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 = RAM, type = ro; # First initialization code
LOWCODE: load = RAM, type = ro, optional = yes; # Legacy from other platforms LOWCODE: load = RAM, type = ro, optional = yes; # Legacy from other platforms
INIT: load = RAM, type = ro, define = yes, optional = yes; # Library initialization code ONCE: load = RAM, type = ro, define = yes, optional = yes; # Library initialization code
CODE: load = RAM, type = ro; # Program CODE: load = RAM, type = ro; # Program
RODATA: load = RAM, type = ro; # Literals, constants RODATA: load = RAM, type = ro; # Literals, constants
DATA: load = RAM, type = rw; # Initialized variables DATA: load = RAM, type = rw; # Initialized variables
@ -22,7 +22,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -10,23 +10,23 @@ MEMORY {
RAM: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__; RAM: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: 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 = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes; RODATA: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes; DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -14,25 +14,25 @@ MEMORY {
RAM: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__; RAM: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
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 = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes; RODATA: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes; DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -16,27 +16,27 @@ MEMORY {
UPLDR: file = %O, define = yes, start = $BFDC, size = $005C; UPLDR: file = %O, define = yes, start = $BFDC, size = $005C;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
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 = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes; RODATA: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes; DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, 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;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -14,25 +14,25 @@ MEMORY {
RAM: file = %O, define = yes, start = $0200, size = $BE38 - __STACKSIZE__; RAM: file = %O, define = yes, start = $0200, size = $BE38 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
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 = RAM, type = ro, define = yes;
LOWCODE: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
RODATA: load = RAM, type = ro, define = yes; RODATA: load = RAM, type = ro, define = yes;
DATA: load = RAM, type = rw, define = yes; DATA: load = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, optional = yes;
APPZP: load = ZP, type = zp, optional = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -6,7 +6,7 @@ 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;
HEADER: load = COMBINED, type = ro; HEADER: load = COMBINED, type = ro;
INIT: load = COMBINED, type = ro, optional = yes; ONCE: load = COMBINED, type = ro, optional = yes;
CODE: load = COMBINED, type = ro; CODE: load = COMBINED, type = ro;
RODATA: load = COMBINED, type = ro; RODATA: load = COMBINED, type = ro;
DATA: load = COMBINED, type = rw; DATA: load = COMBINED, type = rw;

View File

@ -33,23 +33,23 @@ MEMORY {
RAM: file = "", start = $6000, size = $2000, define = yes; RAM: file = "", start = $6000, size = $2000, define = yes;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
HEADER: load = HEADER, type = ro; HEADER: load = HEADER, type = ro;
STARTUP: load = ROM0, type = ro, define = yes; STARTUP: load = ROM0, type = ro, define = yes;
LOWCODE: load = ROM0, type = ro, optional = yes; LOWCODE: load = ROM0, type = ro, optional = yes;
INIT: load = ROM0, type = ro, define = yes, optional = yes; ONCE: load = ROM0, type = ro, define = yes, optional = yes;
CODE: load = ROM0, type = ro, define = yes; CODE: load = ROM0, type = ro, define = yes;
RODATA: load = ROM0, type = ro, define = yes; RODATA: load = ROM0, type = ro, define = yes;
DATA: load = ROM0, run = RAM, type = rw, define = yes; DATA: load = ROM0, run = RAM, type = rw, define = yes;
VECTORS: load = ROMV, type = rw; VECTORS: load = ROMV, type = rw;
CHARS: load = ROM2, type = rw; CHARS: load = ROM2, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -6,19 +6,19 @@ MEMORY {
RAM: file = %O, start = %S, size = $10000 - __STACKSIZE__; RAM: file = %O, start = %S, size = $10000 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = rw; CODE: load = RAM, type = rw;
RODATA: load = RAM, type = rw; RODATA: load = RAM, type = rw;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -15,11 +15,11 @@ MEMORY {
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
BOOT: load = HEAD, type = ro, optional = yes; BOOT: load = HEAD, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = rw; CODE: load = RAM, type = rw;
RODATA: load = RAM, type = rw; RODATA: load = RAM, type = rw;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }

View File

@ -15,22 +15,22 @@ MEMORY {
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S; RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
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 = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = rw; CODE: load = RAM, type = rw;
RODATA: load = RAM, type = rw; RODATA: load = RAM, type = rw;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -1,39 +1,39 @@
# linker config to produce simple NEC PC-Engine cartridge (.pce) # linker config to produce simple NEC PC-Engine cartridge (.pce)
SYMBOLS { SYMBOLS {
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack __STACKSIZE__: type = weak, value = $0300; # 3 pages stack
} }
MEMORY { MEMORY {
# FIXME: is this correct? the first 3? bytes cant be used? # FIXME: is this correct? the first 3? bytes cant be used?
ZP: start = $03, size = $fd, type = rw, define = yes; ZP: file = "", start = $0003, size = $00FD, type = rw, define = yes;
# reset-bank and hardware vectors # reset-bank and hardware vectors
ROM0: start = $e000, size = $1ff6, file = %O ,fill = yes, define = yes; ROM0: file = %O, start = $E000, size = $1FF6, fill = yes, define = yes;
ROMV: start = $fff6, size = $a, file = %O,fill = yes; ROMV: file = %O, start = $FFF6, size = $000A, fill = yes;
# first RAM page (also contains stack and zeropage) # first RAM page (also contains stack and zeropage)
RAM: start = $2200, size = $1e00, define = yes; RAM: file = "", start = $2200, size = $1e00, define = yes;
} }
SEGMENTS { SEGMENTS {
STARTUP: load = ROM0, type = ro, define = yes; ZEROPAGE: load = ZP, type = zp, define = yes;
INIT: load = ROM0, type = ro, define = yes, optional = yes; EXTZP: load = ZP, type = zp, define = yes, optional = yes;
CODE: load = ROM0, type = ro, define = yes; APPZP: load = ZP, type = zp, define = yes, optional = yes;
RODATA: load = ROM0, type = ro, define = yes; STARTUP: load = ROM0, type = ro, define = yes;
DATA: load = ROM0, run= RAM, type = rw, define = yes; ONCE: load = ROM0, type = ro, define = yes, optional = yes;
BSS: load = RAM, type = bss, define = yes; CODE: load = ROM0, type = ro, define = yes;
VECTORS: load = ROMV, type = rw, define = yes; RODATA: load = ROM0, type = ro, define = yes;
ZEROPAGE: load = ZP, type = zp, define = yes; DATA: load = ROM0, run = RAM, type = rw, define = yes;
EXTZP: load = ZP, type = zp, define = yes, optional = yes; BSS: load = RAM, type = bss, define = yes;
APPZP: load = ZP, type = zp, define = yes, optional = yes; VECTORS: load = ROMV, type = rw, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -10,23 +10,23 @@ MEMORY {
RAM: file = %O, start = $040D, size = $7BF3 - __STACKSIZE__; RAM: file = %O, start = $040D, size = $7BF3 - __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 = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss; INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -10,23 +10,23 @@ MEMORY {
RAM: file = %O, define = yes, start = $100D, size = $ECF3 - __STACKSIZE__; RAM: file = %O, define = yes, start = $100D, size = $ECF3 - __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 = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss; INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -3,26 +3,26 @@ SYMBOLS {
__STACKSIZE__: type = weak, value = $0800; # 2k stack __STACKSIZE__: type = weak, value = $0800; # 2k stack
} }
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__; RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
EXEHDR: load = HEADER, type = ro; ZEROPAGE: load = ZP, type = zp;
STARTUP: load = RAM, type = ro; EXEHDR: load = HEADER, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; STARTUP: load = RAM, type = ro;
INIT: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro; ONCE: load = RAM, type = ro, define = yes, optional = yes;
RODATA: load = RAM, type = ro; CODE: load = RAM, type = ro;
DATA: load = RAM, type = rw; RODATA: load = RAM, type = ro;
BSS: load = RAM, type = bss, define = yes; DATA: load = RAM, type = rw;
ZEROPAGE: load = ZP, type = zp; BSS: load = RAM, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -3,26 +3,26 @@ SYMBOLS {
__STACKSIZE__: type = weak, value = $0800; # 2k stack __STACKSIZE__: type = weak, value = $0800; # 2k stack
} }
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__; RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
} }
SEGMENTS { SEGMENTS {
EXEHDR: load = HEADER, type = ro; ZEROPAGE: load = ZP, type = zp;
STARTUP: load = RAM, type = ro; EXEHDR: load = HEADER, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; STARTUP: load = RAM, type = ro;
INIT: load = RAM, type = ro, define = yes, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro; ONCE: load = RAM, type = ro, define = yes, optional = yes;
RODATA: load = RAM, type = ro; CODE: load = RAM, type = ro;
DATA: load = RAM, type = rw; RODATA: load = RAM, type = ro;
BSS: load = RAM, type = bss, define = yes; DATA: load = RAM, type = rw;
ZEROPAGE: load = ZP, type = zp; BSS: load = RAM, type = bss, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -21,7 +21,7 @@ MEMORY {
} }
SEGMENTS { SEGMENTS {
LOWCODE: load = ROM, type = ro, optional = yes; LOWCODE: load = ROM, type = ro, optional = yes;
INIT: load = ROM, type = ro, define = yes, optional = yes; ONCE: load = ROM, type = ro, define = yes, optional = yes;
CODE: load = ROM, type = ro; CODE: load = ROM, type = ro;
BANK1: load = BANKROM1, type = ro; BANK1: load = BANKROM1, type = ro;
BANK2: load = BANKROM2, type = ro; BANK2: load = BANKROM2, type = ro;

View File

@ -14,21 +14,21 @@ MEMORY {
ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $ff, define=yes; ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $ff, define=yes;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
LOWCODE: load = ROM, type = ro, optional = yes; LOWCODE: load = ROM, type = ro, optional = yes;
INIT: load = ROM, type = ro, define = yes, optional = yes; ONCE: load = ROM, type = ro, define = yes, optional = yes;
CODE: load = ROM, type = ro, define = yes; CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes; RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes; DATA: load = ROM, run = RAM, type = rw, define = yes;
FFF0: load = ROM, type = ro, offset = $3FF0; FFF0: load = ROM, type = ro, offset = $3FF0;
VECTOR: load = ROM, type = ro, offset = $3FFA; VECTOR: load = ROM, type = ro, offset = $3FFA;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -17,7 +17,7 @@ MEMORY {
} }
SEGMENTS { SEGMENTS {
LOWCODE: load = ROM, type = ro, optional = yes; LOWCODE: load = ROM, type = ro, optional = yes;
INIT: load = ROM, type = ro, define = yes, optional = yes; ONCE: load = ROM, type = ro, define = yes, optional = yes;
CODE: load = ROM, type = ro; CODE: load = ROM, type = ro;
RODATA: load = ROM, type = ro; RODATA: load = ROM, type = ro;
BANK1: load = BANKROM1, type = ro; BANK1: load = BANKROM1, type = ro;

View File

@ -10,21 +10,21 @@ MEMORY {
ROM: file = %O, start = $8000, size = $8000, fill = yes, fillval = $FF, define = yes; ROM: file = %O, start = $8000, size = $8000, fill = yes, fillval = $FF, define = yes;
} }
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes;
LOWCODE: load = ROM, type = ro, optional = yes; LOWCODE: load = ROM, type = ro, optional = yes;
INIT: load = ROM, type = ro, define = yes, optional = yes; ONCE: load = ROM, type = ro, define = yes, optional = yes;
CODE: load = ROM, type = ro, define = yes; CODE: load = ROM, type = ro, define = yes;
RODATA: load = ROM, type = ro, define = yes; RODATA: load = ROM, type = ro, define = yes;
DATA: load = ROM, run = RAM, type = rw, define = yes; DATA: load = ROM, run = RAM, type = rw, define = yes;
FFF0: load = ROM, type = ro, offset = $7FF0; FFF0: load = ROM, type = ro, offset = $7FF0;
VECTOR: load = ROM, type = ro, offset = $7FFA; VECTOR: load = ROM, type = ro, offset = $7FFA;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp, define = yes;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -16,11 +16,11 @@ SEGMENTS {
EXEHDR: load = HEADER, type = ro; EXEHDR: load = HEADER, type = ro;
STARTUP: load = RAM, type = ro; STARTUP: load = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss; INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp; ZEROPAGE: load = ZP, type = zp;
} }
@ -28,7 +28,7 @@ FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -10,23 +10,23 @@ MEMORY {
RAM: file = %O, define = yes, start = $100D, size = $0DF3 - __STACKSIZE__; RAM: file = %O, define = yes, start = $100D, size = $0DF3 - __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 = RAM, type = ro;
LOWCODE: load = RAM, type = ro, optional = yes; LOWCODE: load = RAM, type = ro, optional = yes;
INIT: load = RAM, type = ro, define = yes, optional = yes; ONCE: load = RAM, type = ro, define = yes, optional = yes;
CODE: load = RAM, type = ro; CODE: load = RAM, type = ro;
RODATA: load = RAM, type = ro; RODATA: load = RAM, type = ro;
DATA: load = RAM, type = rw; DATA: load = RAM, type = rw;
INITBSS: load = RAM, type = bss; INIT: load = RAM, type = bss;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
ZEROPAGE: load = ZP, type = zp;
} }
FEATURES { FEATURES {
CONDES: type = constructor, CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__, count = __CONSTRUCTOR_COUNT__,
segment = INIT; segment = ONCE;
CONDES: type = destructor, CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__, label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__, count = __DESTRUCTOR_COUNT__,

View File

@ -743,7 +743,7 @@ segments should go above $7FFF.
<p> <p>
The main problem is that the EXE header generated by the cc65 runtime The main problem is that the EXE header generated by the cc65 runtime
lib is wrong. It defines a single load chunk with the sizes/addresses lib is wrong. It defines a single load chunk with the sizes/addresses
of the STARTUP, LOWCODE, INIT, CODE, RODATA, and DATA segments, in of the STARTUP, LOWCODE, ONCE, CODE, RODATA, and DATA segments, in
fact, the whole user program (we're disregarding the "system check" fact, the whole user program (we're disregarding the "system check"
load chunk here). load chunk here).
<p> <p>
@ -796,7 +796,7 @@ SEGMENTS {
NEXEHDR: load = FSTHDR, type = ro; # first load chunk NEXEHDR: load = FSTHDR, type = ro; # first load chunk
STARTUP: load = RAMLO, type = ro, define = yes; STARTUP: load = RAMLO, type = ro, define = yes;
LOWCODE: load = RAMLO, type = ro, define = yes, optional = yes; LOWCODE: load = RAMLO, type = ro, define = yes, optional = yes;
INIT: load = RAMLO, type = ro, optional = yes; ONCE: load = RAMLO, type = ro, optional = yes;
CODE: load = RAMLO, type = ro, define = yes; CODE: load = RAMLO, type = ro, define = yes;
CHKHDR: load = SECHDR, type = ro; # second load chunk CHKHDR: load = SECHDR, type = ro; # second load chunk
@ -808,7 +808,7 @@ SEGMENTS {
AUTOSTRT: load = RAM, type = ro; # defines program entry point AUTOSTRT: load = RAM, type = ro; # defines program entry point
} }
FEATURES { FEATURES {
CONDES: segment = RODATA, CONDES: segment = ONCE,
type = constructor, type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__; count = __CONSTRUCTOR_COUNT__;
@ -827,7 +827,7 @@ the MAINHDR segment get discarded.
<p> <p>
The newly added NEXEHDR segment defines the correct chunk header for the The newly added NEXEHDR segment defines the correct chunk header for the
first intended load chunk. It first intended load chunk. It
puts the STARTUP, LOWCODE, INIT, and CODE segments, which are the puts the STARTUP, LOWCODE, ONCE, and CODE segments, which are the
segments containing only code, into load chunk #1 (RAMLO memory area). segments containing only code, into load chunk #1 (RAMLO memory area).
<p> <p>
The header for the second load chunk comes from the new CHKHDR The header for the second load chunk comes from the new CHKHDR
@ -858,7 +858,7 @@ cl65 -t atari -C split.cfg -o prog.com prog.c split.s
<sect2>Low data and high code example<p> <sect2>Low data and high code example<p>
Goal: Put RODATA and DATA into low memory and STARTUP, LOWCODE, INIT, Goal: Put RODATA and DATA into low memory and STARTUP, LOWCODE, ONCE,
CODE, BSS, ZPSAVE into high memory (split2.cfg): CODE, BSS, ZPSAVE into high memory (split2.cfg):
<tscreen><verb> <tscreen><verb>
@ -893,7 +893,7 @@ SEGMENTS {
CHKHDR: load = SECHDR, type = ro; # second load chunk CHKHDR: load = SECHDR, type = ro; # second load chunk
STARTUP: load = RAM, type = ro, define = yes; STARTUP: load = RAM, type = ro, define = yes;
INIT: load = RAM, type = ro, optional = yes; ONCE: load = RAM, type = ro, optional = yes;
CODE: load = RAM, type = ro, define = yes; CODE: load = RAM, type = ro, define = yes;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
@ -901,7 +901,7 @@ SEGMENTS {
AUTOSTRT: load = RAM, type = ro; # defines program entry point AUTOSTRT: load = RAM, type = ro; # defines program entry point
} }
FEATURES { FEATURES {
CONDES: segment = RODATA, CONDES: segment = ONCE,
type = constructor, type = constructor,
label = __CONSTRUCTOR_TABLE__, label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__; count = __CONSTRUCTOR_COUNT__;

View File

@ -78,15 +78,15 @@ vectors at the proper memory locations. The segment definition is:
<tscreen><code> <tscreen><code>
SEGMENTS { SEGMENTS {
ZEROPAGE: load = ZP, type = zp, define = yes; ZEROPAGE: load = ZP, type = zp, define = yes;
DATA: load = ROM, type = rw, define = yes, run = RAM; DATA: load = ROM, type = rw, define = yes, run = RAM;
BSS: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes;
HEAP: load = RAM, type = bss, optional = yes; HEAP: load = RAM, type = bss, optional = yes;
STARTUP: load = ROM, type = ro; STARTUP: load = ROM, type = ro;
INIT: load = ROM, type = ro, optional = yes; ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro; CODE: load = ROM, type = ro;
RODATA: load = ROM, type = ro; RODATA: load = ROM, type = ro;
VECTORS: load = ROM, type = ro, start = $FFFA; VECTORS: load = ROM, type = ro, start = $FFFA;
} }
</code></tscreen> </code></tscreen>
@ -97,7 +97,7 @@ The meaning of each of these segments is as follows.
<p><tt> BSS: </tt>Uninitialized data stored in RAM (used for variable storage) <p><tt> BSS: </tt>Uninitialized data stored in RAM (used for variable storage)
<p><tt> HEAP: </tt>Uninitialized C-level heap storage in RAM, optional <p><tt> HEAP: </tt>Uninitialized C-level heap storage in RAM, optional
<p><tt> STARTUP: </tt>The program initialization code, stored in ROM <p><tt> STARTUP: </tt>The program initialization code, stored in ROM
<p><tt> INIT: </tt>The code needed to initialize the system, stored in ROM <p><tt> ONCE: </tt>The code run once to initialize the system, stored in ROM
<p><tt> CODE: </tt>The program code, stored in ROM <p><tt> CODE: </tt>The program code, stored in ROM
<p><tt> RODATA: </tt>Initialized data that cannot be modified by the program, stored in ROM <p><tt> RODATA: </tt>Initialized data that cannot be modified by the program, stored in ROM
<p><tt> VECTORS: </tt>The interrupt vector table, stored in ROM at location $FFFA <p><tt> VECTORS: </tt>The interrupt vector table, stored in ROM at location $FFFA

View File

@ -1032,11 +1032,11 @@ The builtin config files do contain segments that have a special meaning for
the compiler and the libraries that come with it. If you replace the builtin the compiler and the libraries that come with it. If you replace the builtin
config files, you will need the following information. config files, you will need the following information.
<sect1>INIT<p> <sect1>ONCE<p>
The INIT segment is used for initialization code that may be reused once The ONCE segment is used for initialization code run only once before
execution reaches main() - provided that the program runs in RAM. You execution reaches main() - provided that the program runs in RAM. You
may for example add the INIT segment to the heap in really memory may for example add the ONCE segment to the heap in really memory
constrained systems. constrained systems.
<sect1>LOWCODE<p> <sect1>LOWCODE<p>

View File

@ -14,7 +14,7 @@
.include "apple2.inc" .include "apple2.inc"
.segment "INIT" .segment "ONCE"
.ifdef __APPLE2ENH__ .ifdef __APPLE2ENH__
initconio: initconio:

View File

@ -10,8 +10,8 @@
.import initlib, donelib .import initlib, donelib
.import callmain .import callmain
.import __LC_START__, __LC_LAST__ ; Linker generated .import __LC_START__, __LC_LAST__ ; Linker generated
.import __INIT_RUN__, __INIT_SIZE__ ; Linker generated .import __ONCE_RUN__, __ONCE_SIZE__ ; Linker generated
.import __INITBSS_RUN__ ; Linker generated .import __INIT_RUN__ ; Linker generated
.include "zeropage.inc" .include "zeropage.inc"
.include "apple2.inc" .include "apple2.inc"
@ -29,14 +29,14 @@
bit $C081 bit $C081
; Set the source start address. ; Set the source start address.
lda #<(__INITBSS_RUN__ + __INIT_SIZE__) lda #<(__INIT_RUN__ + __ONCE_SIZE__)
ldy #>(__INITBSS_RUN__ + __INIT_SIZE__) ldy #>(__INIT_RUN__ + __ONCE_SIZE__)
sta $9B sta $9B
sty $9C sty $9C
; Set the source last address. ; Set the source last address.
lda #<(__INITBSS_RUN__ + __INIT_SIZE__ + __LC_LAST__ - __LC_START__) lda #<(__INIT_RUN__ + __ONCE_SIZE__ + __LC_LAST__ - __LC_START__)
ldy #>(__INITBSS_RUN__ + __INIT_SIZE__ + __LC_LAST__ - __LC_START__) ldy #>(__INIT_RUN__ + __ONCE_SIZE__ + __LC_LAST__ - __LC_START__)
sta $96 sta $96
sty $97 sty $97
@ -51,25 +51,25 @@
jsr $D39A ; BLTU2 jsr $D39A ; BLTU2
; Set the source start address. ; Set the source start address.
lda #<__INITBSS_RUN__ lda #<__INIT_RUN__
ldy #>__INITBSS_RUN__ ldy #>__INIT_RUN__
sta $9B sta $9B
sty $9C sty $9C
; Set the source last address. ; Set the source last address.
lda #<(__INITBSS_RUN__ + __INIT_SIZE__) lda #<(__INIT_RUN__ + __ONCE_SIZE__)
ldy #>(__INITBSS_RUN__ + __INIT_SIZE__) ldy #>(__INIT_RUN__ + __ONCE_SIZE__)
sta $96 sta $96
sty $97 sty $97
; Set the destination last address. ; Set the destination last address.
lda #<(__INIT_RUN__ + __INIT_SIZE__) lda #<(__ONCE_RUN__ + __ONCE_SIZE__)
ldy #>(__INIT_RUN__ + __INIT_SIZE__) ldy #>(__ONCE_RUN__ + __ONCE_SIZE__)
sta $94 sta $94
sty $95 sty $95
; Call into Applesoft Block Transfer Up -- which handles moving ; Call into Applesoft Block Transfer Up -- which handles moving
; overlapping blocks upwards well -- to move the INIT segment. ; overlapping blocks upwards well -- to move the ONCE segment.
jsr $D39A ; BLTU2 jsr $D39A ; BLTU2
; Delegate all further processing, to keep the STARTUP segment small. ; Delegate all further processing, to keep the STARTUP segment small.
@ -109,7 +109,7 @@ exit: ldx #$02
; We're done ; We're done
jmp done jmp done
.segment "INIT" .segment "ONCE"
; Save the zero-page locations that we need. ; Save the zero-page locations that we need.
init: ldx #zpspace-1 init: ldx #zpspace-1
@ -201,7 +201,7 @@ q_param:.byte $04 ; param_count
; Final jump when we're done ; Final jump when we're done
done: jmp DOSWARM ; Potentially patched at runtime done: jmp DOSWARM ; Potentially patched at runtime
.segment "INITBSS" .segment "INIT"
zpsave: .res zpspace zpsave: .res zpspace

View File

@ -30,7 +30,7 @@
; - Apple II ProDOS 8 TechNote #23, ProDOS 8 Changes and Minutia ; - Apple II ProDOS 8 TechNote #23, ProDOS 8 Changes and Minutia
; - ProDOS TechRefMan, chapter 5.2.4 ; - ProDOS TechRefMan, chapter 5.2.4
.segment "INIT" .segment "ONCE"
initdostype: initdostype:
lda $BF00 lda $BF00

View File

@ -14,7 +14,7 @@
.include "errno.inc" .include "errno.inc"
.include "../filedes.inc" .include "../filedes.inc"
.segment "INIT" .segment "ONCE"
initiobuf: initiobuf:
; Convert end address highbyte to table index ; Convert end address highbyte to table index

View File

@ -10,7 +10,7 @@
; Identify machine according to: ; Identify machine according to:
; Apple II Miscellaneous TechNote #7, Apple II Family Identification ; Apple II Miscellaneous TechNote #7, Apple II Family Identification
.segment "INIT" .segment "ONCE"
initostype: initostype:
sec sec

View File

@ -9,7 +9,7 @@
.include "apple2.inc" .include "apple2.inc"
.segment "INIT" .segment "ONCE"
initirq: initirq:
; Check for ProDOS ; Check for ProDOS

View File

@ -46,10 +46,10 @@ FNAM_LEN = $280
FNAM = $281 FNAM = $281
REM = $B2 ; BASIC token-code REM = $B2 ; BASIC token-code
; Get possible command-line arguments. Goes into the special INIT segment, ; Get possible command-line arguments. Goes into the special ONCE segment,
; which may be reused after the startup code is run. ; which may be reused after the startup code is run.
.segment "INIT" .segment "ONCE"
initmainargs: initmainargs:

View File

@ -19,7 +19,7 @@
.include "mli.inc" .include "mli.inc"
.include "filedes.inc" .include "filedes.inc"
.segment "INIT" .segment "ONCE"
raisefilelevel: raisefilelevel:
; Raise file level ; Raise file level

View File

@ -16,7 +16,7 @@
.include "filedes.inc" .include "filedes.inc"
.include "apple2.inc" .include "apple2.inc"
.segment "INIT" .segment "ONCE"
initprompt: initprompt:
; Set prompt <> ']' to let DOS 3.3 know that we're ; Set prompt <> ']' to let DOS 3.3 know that we're

View File

@ -10,7 +10,7 @@
_rebootafterexit := return _rebootafterexit := return
.segment "INIT" .segment "ONCE"
initreboot: initreboot:
; Quit to PWRUP ; Quit to PWRUP

View File

@ -13,7 +13,7 @@
.import start .import start
.export _cas_init .export _cas_init
.segment "INIT" .segment "ONCE"
_cas_init: _cas_init:
.ifdef DEBUG .ifdef DEBUG

View File

@ -11,7 +11,7 @@
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; DOS type detection ; DOS type detection
.segment "INIT" .segment "ONCE"
detect: lda DOS detect: lda DOS
cmp #'S' ; SpartaDOS cmp #'S' ; SpartaDOS

View File

@ -20,7 +20,7 @@ SPACE = 32 ; SPACE char.
; -------------------------------------------------------------------------- ; --------------------------------------------------------------------------
; Get command line ; Get command line
.segment "INIT" .segment "ONCE"
initmainargs: initmainargs:
lda #0 lda #0

View File

@ -13,7 +13,7 @@
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INIT" .segment "ONCE"
initirq: initirq:
lda VVBLKD lda VVBLKD

View File

@ -180,7 +180,7 @@ update_colors:
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INIT" .segment "ONCE"
pm_init: pm_init:
lda #0 lda #0

View File

@ -26,7 +26,7 @@ SHRAM_HANDLERS = 1
BUFSZ = 128 ; bounce buffer size BUFSZ = 128 ; bounce buffer size
BUFSZ_SIO = 256 BUFSZ_SIO = 256
.segment "INIT" .segment "ONCE"
; Turn off ROMs, install system and interrupt wrappers, set new chargen pointer ; Turn off ROMs, install system and interrupt wrappers, set new chargen pointer

View File

@ -9,7 +9,7 @@ SCREEN_BUF = $4000 - SCREEN_BUF_SIZE
.export screen_setup_20x24 .export screen_setup_20x24
.segment "INIT" .segment "ONCE"
screen_setup_20x24: screen_setup_20x24:

View File

@ -9,7 +9,7 @@
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INIT" .segment "ONCE"
initirq: initirq:
lda VVBLKD lda VVBLKD

View File

@ -17,7 +17,7 @@
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
; Put this constructor into a segment that can be re-used by programs. ; Put this constructor into a segment that can be re-used by programs.
; ;
.segment "INIT" .segment "ONCE"
; Turn the capitals lock off. ; Turn the capitals lock off.

View File

@ -55,10 +55,10 @@
.endproc .endproc
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Switch the cursor off. Code goes into the INIT segment ; Switch the cursor off. Code goes into the ONCE segment
; which may be reused after it is run. ; which may be reused after it is run.
.segment "INIT" .segment "ONCE"
initcgetc: initcgetc:
lsr STATUS lsr STATUS

View File

@ -9,7 +9,7 @@
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INIT" .segment "ONCE"
initirq: initirq:
lda IRQVec lda IRQVec

View File

@ -17,10 +17,10 @@ REM = $9d ; BASIC token-code
;--------------------------------------------------------------------------- ;---------------------------------------------------------------------------
; Get possible command-line arguments. Goes into the special INIT segment, ; Get possible command-line arguments. Goes into the special ONCE segment,
; which may be reused after the startup code is run ; which may be reused after the startup code is run
.segment "INIT" .segment "ONCE"
.proc initmainargs .proc initmainargs

View File

@ -69,7 +69,7 @@ L9: lda ptr3
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
; initstdin: Reset the stdin console. ; initstdin: Reset the stdin console.
.segment "INIT" .segment "ONCE"
initstdin: initstdin:
ldx #<-1 ldx #<-1

View File

@ -42,7 +42,7 @@ L2: jsr KBDREAD ; Read char and return in A
.bss .bss
keyvec: .res 2 keyvec: .res 2
.segment "INIT" .segment "ONCE"
initcgetc: initcgetc:
; Save the old vector ; Save the old vector

View File

@ -108,7 +108,7 @@ L2: lda zpsave,x
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Data ; Data
.segment "INITBSS" .segment "INIT"
zpsave: .res zpspace zpsave: .res zpspace

View File

@ -9,7 +9,7 @@
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INIT" .segment "ONCE"
initirq: initirq:
lda IRQVec lda IRQVec

View File

@ -32,10 +32,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
REM = $8f ; BASIC token-code REM = $8f ; BASIC token-code
NAME_LEN = 16 ; Maximum length of command-name NAME_LEN = 16 ; Maximum length of command-name
; Get possible command-line arguments. Goes into the special INIT segment, ; Get possible command-line arguments. Goes into the special ONCE segment,
; which may be reused after the startup code is run ; which may be reused after the startup code is run
.segment "INIT" .segment "ONCE"
initmainargs: initmainargs:
@ -127,7 +127,7 @@ done: lda #<argv
stx __argv + 1 stx __argv + 1
rts rts
.segment "INITBSS" .segment "INIT"
term: .res 1 term: .res 1
name: .res NAME_LEN + 1 name: .res NAME_LEN + 1

View File

@ -29,7 +29,7 @@ VIC_SPR_Y = (VIC_SPR0_Y + 2*MOUSE_SPR) ; Sprite Y register
; -------------------------------------------------------------------------- ; --------------------------------------------------------------------------
; Initialize the mouse sprite. ; Initialize the mouse sprite.
.segment "INIT" .segment "ONCE"
initmcb: initmcb:

View File

@ -63,7 +63,7 @@ BCD2dec:tax
; Constructor that writes to the 1/10 sec register of the TOD to kick it ; Constructor that writes to the 1/10 sec register of the TOD to kick it
; into action. If this is not done, the clock hangs. We will read the register ; into action. If this is not done, the clock hangs. We will read the register
; and write it again, ignoring a possible change in between. ; and write it again, ignoring a possible change in between.
.segment "INIT" .segment "ONCE"
.proc initsystime .proc initsystime

View File

@ -56,7 +56,7 @@ L2: jsr KBDREAD ; Read char and return in A
.constructor initkbd .constructor initkbd
.destructor donekbd .destructor donekbd
.segment "INIT" .segment "ONCE"
.proc initkbd .proc initkbd

View File

@ -90,7 +90,7 @@ L2: lda zpsave,x
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INITBSS" .segment "INIT"
zpsave: .res zpspace zpsave: .res zpspace

View File

@ -9,7 +9,7 @@
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INIT" .segment "ONCE"
initirq: initirq:
lda IRQVec lda IRQVec

View File

@ -32,10 +32,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
REM = $8f ; BASIC token-code REM = $8f ; BASIC token-code
NAME_LEN = 16 ; Maximum length of command-name NAME_LEN = 16 ; Maximum length of command-name
; Get possible command-line arguments. Goes into the special INIT segment, ; Get possible command-line arguments. Goes into the special ONCE segment,
; which may be reused after the startup code is run ; which may be reused after the startup code is run
.segment "INIT" .segment "ONCE"
initmainargs: initmainargs:
@ -126,7 +126,7 @@ done: lda #<argv
stx __argv + 1 stx __argv + 1
rts rts
.segment "INITBSS" .segment "INIT"
term: .res 1 term: .res 1
name: .res NAME_LEN + 1 name: .res NAME_LEN + 1

View File

@ -34,7 +34,7 @@ Start:
tsx tsx
stx spsave ; Save the system stack ptr stx spsave ; Save the system stack ptr
; Save space by putting some of the start-up code in the INIT segment, ; Save space by putting some of the start-up code in the ONCE segment,
; which can be re-used by the BSS segment, the heap and the C stack. ; which can be re-used by the BSS segment, the heap and the C stack.
jsr init jsr init
@ -79,7 +79,7 @@ L2: lda zpsave,x
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INIT" .segment "ONCE"
init: init:
@ -111,7 +111,7 @@ L1: lda sp,x
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
; Data ; Data
.segment "INITBSS" .segment "INIT"
mmusave:.res 1 mmusave:.res 1
spsave: .res 1 spsave: .res 1

View File

@ -9,7 +9,7 @@
; ------------------------------------------------------------------------ ; ------------------------------------------------------------------------
.segment "INIT" .segment "ONCE"
initirq: initirq:
lda IRQVec lda IRQVec

View File

@ -32,10 +32,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
REM = $8f ; BASIC token-code REM = $8f ; BASIC token-code
NAME_LEN = 16 ; Maximum length of command-name NAME_LEN = 16 ; Maximum length of command-name
; Get possible command-line arguments. Goes into the special INIT segment, ; Get possible command-line arguments. Goes into the special ONCE segment,
; which may be reused after the startup code is run ; which may be reused after the startup code is run
.segment "INIT" .segment "ONCE"
initmainargs: initmainargs:
@ -125,7 +125,7 @@ done: lda #<argv
stx __argv + 1 stx __argv + 1
rts rts
.segment "INITBSS" .segment "INIT"
term: .res 1 term: .res 1
name: .res NAME_LEN + 1 name: .res NAME_LEN + 1

View File

@ -30,7 +30,7 @@ VIC_SPR_Y = (VIC_SPR0_Y + 2*MOUSE_SPR) ; Sprite Y register
; -------------------------------------------------------------------------- ; --------------------------------------------------------------------------
; Initialize the mouse sprite. ; Initialize the mouse sprite.
.segment "INIT" .segment "ONCE"
initmcb: initmcb:

View File

@ -43,7 +43,7 @@
.export soft80_charset .export soft80_charset
.segment "INIT" .segment "ONCE"
soft80_charset: soft80_charset:
.byte $0f,$03,$0f,$00,$0f,$07,$05,$0e .byte $0f,$03,$0f,$00,$0f,$07,$05,$0e
.byte $0f,$05,$0e,$0b,$0f,$0b,$0f,$0f .byte $0f,$05,$0e,$0b,$0f,$0b,$0f,$0f

View File

@ -56,7 +56,7 @@ soft80_shutdown:
sta CIA2_PRA sta CIA2_PRA
jmp $FF5B ; Initialize video I/O jmp $FF5B ; Initialize video I/O
.segment "INIT" .segment "ONCE"
firstinit: firstinit:
; copy charset to RAM under I/O ; copy charset to RAM under I/O
sei sei
@ -146,7 +146,7 @@ soft80_bitmapyhi_data:
soft80_tables_data_end: soft80_tables_data_end:
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
.segment "INITBSS" .segment "INIT"
soft80_internal_cellcolor: soft80_internal_cellcolor:
.res 1 .res 1
soft80_internal_bgcolor: soft80_internal_bgcolor:

View File

@ -60,7 +60,7 @@ soft80mono_shutdown:
sta VIC_VIDEO_ADR sta VIC_VIDEO_ADR
rts rts
.segment "INIT" .segment "ONCE"
firstinit: firstinit:
; copy charset to RAM under I/O ; copy charset to RAM under I/O
sei sei
@ -150,7 +150,7 @@ soft80_bitmapyhi_data:
soft80_tables_data_end: soft80_tables_data_end:
;------------------------------------------------------------------------------- ;-------------------------------------------------------------------------------
.segment "INITBSS" .segment "INIT"
soft80mono_internal_cellcolor: soft80mono_internal_cellcolor:
.res 1 .res 1
soft80mono_internal_bgcolor: soft80mono_internal_bgcolor:

View File

@ -63,7 +63,7 @@ BCD2dec:tax
; Constructor that writes to the 1/10 sec register of the TOD to kick it ; Constructor that writes to the 1/10 sec register of the TOD to kick it
; into action. If this is not done, the clock hangs. We will read the register ; into action. If this is not done, the clock hangs. We will read the register
; and write it again, ignoring a possible change in between. ; and write it again, ignoring a possible change in between.
.segment "INIT" .segment "ONCE"
.proc initsystime .proc initsystime

View File

@ -9,13 +9,13 @@
.importzp devnum .importzp devnum
.segment "INITBSS" .segment "INIT"
curunit: curunit:
.res 1 .res 1
.segment "INIT" .segment "ONCE"
.proc initcurunit .proc initcurunit

View File

@ -3,7 +3,7 @@
.export _mouse_def_pointercolor .export _mouse_def_pointercolor
.segment "INIT" .segment "ONCE"
_mouse_def_pointercolor: _mouse_def_pointercolor:

View File

@ -3,7 +3,7 @@
.export _mouse_def_pointershape .export _mouse_def_pointershape
.segment "INIT" .segment "ONCE"
_mouse_def_pointershape: _mouse_def_pointershape:

View File

@ -22,7 +22,7 @@
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
; initstdin: Open the stdin file descriptors for the keyboard ; initstdin: Open the stdin file descriptors for the keyboard
.segment "INIT" .segment "ONCE"
.proc initstdin .proc initstdin

View File

@ -20,7 +20,7 @@
;-------------------------------------------------------------------------- ;--------------------------------------------------------------------------
; initstdout: Open the stdout and stderr file descriptors for the screen. ; initstdout: Open the stdout and stderr file descriptors for the screen.
.segment "INIT" .segment "ONCE"
.proc initstdout .proc initstdout

View File

@ -35,10 +35,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
REM = $8f ; BASIC token-code REM = $8f ; BASIC token-code
NAME_LEN = 16 ; Maximum length of command-name NAME_LEN = 16 ; Maximum length of command-name
; Get possible command-line arguments. Goes into the special INIT segment, ; Get possible command-line arguments. Goes into the special ONCE segment,
; which may be reused after the startup code is run. ; which may be reused after the startup code is run.
; ;
.segment "INIT" .segment "ONCE"
initmainargs: initmainargs:
@ -144,7 +144,7 @@ done: lda #<argv
stx __argv + 1 stx __argv + 1
rts rts
.segment "INITBSS" .segment "INIT"
term: .res 1 term: .res 1
name: .res NAME_LEN + 1 name: .res NAME_LEN + 1

View File

@ -31,7 +31,7 @@ VIC_SPR_Y = (VIC_SPR0_Y + 2*MOUSE_SPR) ; Sprite Y register
; -------------------------------------------------------------------------- ; --------------------------------------------------------------------------
; Initialize the mouse sprite. ; Initialize the mouse sprite.
.segment "INIT" .segment "ONCE"
initmcb: initmcb:

View File

@ -35,10 +35,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
REM = $8f ; BASIC token-code REM = $8f ; BASIC token-code
NAME_LEN = 16 ; Maximum length of command-name NAME_LEN = 16 ; Maximum length of command-name
; Get possible command-line arguments. Goes into the special INIT segment, ; Get possible command-line arguments. Goes into the special ONCE segment,
; which may be reused after the startup code is run. ; which may be reused after the startup code is run.
; ;
.segment "INIT" .segment "ONCE"
initmainargs: initmainargs:
@ -142,7 +142,7 @@ done: lda #<argv
stx __argv + 1 stx __argv + 1
rts rts
.segment "INITBSS" .segment "INIT"
term: .res 1 term: .res 1
name: .res NAME_LEN + 1 name: .res NAME_LEN + 1

View File

@ -19,7 +19,7 @@
cwd_init := initcwd cwd_init := initcwd
.segment "INITBSS" .segment "INIT"
__cwd: .res __cwd_buf_size __cwd: .res __cwd_buf_size

Some files were not shown because too many files have changed in this diff Show More