mirror of
https://github.com/cc65/cc65.git
synced 2025-01-23 13:30:01 +00:00
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:
parent
ab1600b346
commit
419eb700b5
@ -18,7 +18,7 @@ SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
__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__;
|
||||
}
|
||||
MEMORY {
|
||||
@ -45,9 +45,9 @@ SEGMENTS {
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
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;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
@ -63,7 +63,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -5,7 +5,7 @@ SYMBOLS {
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__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__;
|
||||
}
|
||||
MEMORY {
|
||||
@ -21,16 +21,16 @@ SEGMENTS {
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,7 +10,7 @@ SYMBOLS {
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__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__;
|
||||
}
|
||||
MEMORY {
|
||||
@ -28,16 +28,16 @@ SEGMENTS {
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -18,7 +18,7 @@ SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
|
||||
__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__;
|
||||
}
|
||||
MEMORY {
|
||||
@ -45,9 +45,9 @@ SEGMENTS {
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
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;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
@ -63,7 +63,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -5,7 +5,7 @@ SYMBOLS {
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__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__;
|
||||
}
|
||||
MEMORY {
|
||||
@ -21,16 +21,16 @@ SEGMENTS {
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,7 +10,7 @@ SYMBOLS {
|
||||
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
__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__;
|
||||
}
|
||||
MEMORY {
|
||||
@ -28,16 +28,16 @@ SEGMENTS {
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -16,23 +16,23 @@ MEMORY {
|
||||
CARTID: file = %O, start = $BFFA, size = $0006;
|
||||
}
|
||||
SEGMENTS {
|
||||
STARTUP: load = ROM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, optional = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes;
|
||||
INITBSS: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes, optional = yes;
|
||||
CARTHDR: load = CARTID, type = ro;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
STARTUP: load = ROM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = ROM, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, optional = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes, optional = yes;
|
||||
CARTHDR: load = CARTID, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -12,23 +12,23 @@ MEMORY {
|
||||
RAM: file = %O, define = yes, start = %S, size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
CASHDR: load = RAM, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
INIT: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, optional = yes;
|
||||
DATA: load = RAM, type = rw, optional = yes;
|
||||
INITBSS: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
CASHDR: load = RAM, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = yes, optional = yes;
|
||||
LOWCODE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
ONCE: load = RAM, type = ro, optional = yes;
|
||||
CODE: load = RAM, type = ro, define = yes;
|
||||
RODATA: load = RAM, type = ro, optional = yes;
|
||||
DATA: load = RAM, type = rw, optional = yes;
|
||||
INIT: load = RAM, type = bss, optional = yes;
|
||||
BSS: load = RAM, type = bss, define = yes, optional = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -38,6 +38,8 @@ MEMORY {
|
||||
OVL9: file = "%O.9", start = %S, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
|
||||
@ -45,14 +47,12 @@ SEGMENTS {
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVERLAY2: load = OVL2, type = ro, define = yes, optional = yes;
|
||||
@ -68,7 +68,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -26,6 +26,8 @@ MEMORY {
|
||||
TRAILER: file = %O, start = $0000, size = $0006;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
SYSCHK: load = SYSCHKCHNK, type = rw, define = yes, optional = yes;
|
||||
@ -33,21 +35,19 @@ SEGMENTS {
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -13,9 +13,11 @@ MEMORY {
|
||||
CARTENTRY: file = %O, start = $BFFE, size = $0002;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, optional = yes;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
STARTUP: 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;
|
||||
RODATA: load = ROM, type = ro, 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;
|
||||
CARTYEAR: load = CARTYEAR, 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 {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -50,6 +50,9 @@ MEMORY {
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
@ -66,21 +69,19 @@ SEGMENTS {
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -62,6 +62,9 @@ MEMORY {
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
@ -78,14 +81,12 @@ SEGMENTS {
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
@ -102,7 +103,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -48,6 +48,9 @@ MEMORY {
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
|
||||
SYSCHKHDR: load = SYSCHKHDR, type = ro, optional = yes;
|
||||
@ -64,21 +67,19 @@ SEGMENTS {
|
||||
MAINHDR: load = MAINHDR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
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;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
AUTOSTRT: load = TRAILER, type = ro;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -21,7 +21,7 @@ SEGMENTS {
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
CODE: 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;
|
||||
ZPSAVE1: load = RAM, type = rw, define = yes; # ZPSAVE1, ZPSAVE2 must be together
|
||||
ZPSAVE2: load = RAM, type = bss; # see "libsrc/atmos/crt0.s"
|
||||
@ -31,7 +31,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -6,20 +6,20 @@ MEMORY {
|
||||
RAM: file = %O, start = $0E00, size = $7200 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -30,17 +30,17 @@ MEMORY {
|
||||
OVL9: file = "%O.9", start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
OVL1ADDR: load = OVL1ADDR, type = ro;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVL2ADDR: load = OVL2ADDR, type = ro;
|
||||
@ -64,7 +64,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,23 +10,23 @@ MEMORY {
|
||||
RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,23 +10,23 @@ MEMORY {
|
||||
RAM: file = %O, start = $100D, size = $6FF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -44,9 +44,9 @@ SEGMENTS {
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INITBSS: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
INIT: load = INIT, type = ro;
|
||||
ONCE: load = INIT, type = ro;
|
||||
OVL1ADDR: load = OVL1ADDR, type = ro;
|
||||
OVERLAY1: load = OVL1, type = ro, define = yes, optional = yes;
|
||||
OVL2ADDR: load = OVL2ADDR, type = ro;
|
||||
@ -70,7 +70,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -23,15 +23,15 @@ SEGMENTS {
|
||||
CODE: load = MAIN, type = ro;
|
||||
RODATA: load = MAIN, type = ro;
|
||||
DATA: load = MAIN, type = rw;
|
||||
INITBSS: load = MAIN, type = rw;
|
||||
INIT: load = MAIN, type = rw;
|
||||
BSS: load = MAIN, type = bss, define = yes;
|
||||
INIT: load = INIT, type = ro, define = yes;
|
||||
ONCE: load = INIT, type = ro, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -18,11 +18,11 @@ SEGMENTS {
|
||||
PAGE2: load = PAGE2, type = rw;
|
||||
PAGE3: load = PAGE3, type = rw;
|
||||
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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = rw, define = yes;
|
||||
@ -31,7 +31,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -15,11 +15,11 @@ SEGMENTS {
|
||||
PAGE2: load = PAGE2, type = rw;
|
||||
PAGE3: load = PAGE3, type = rw;
|
||||
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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = rw, define = yes;
|
||||
@ -28,7 +28,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -1,41 +1,51 @@
|
||||
# linker config to produce simple Gamate cartridge (.bin)
|
||||
|
||||
SYMBOLS {
|
||||
__STARTUP__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0080; # 1 page stack
|
||||
__STARTUP__: type = import;
|
||||
__STACKSIZE__: type = weak, value = $0080; # 1 page stack
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
# 0000-03ff is RAM
|
||||
# FIXME: what zp range can we actually use?
|
||||
# $0a-$11 is used by IRQ/NMI, $e8 is used by NMI
|
||||
ZP: start = $0012, size = $e8 - $12;
|
||||
CPUSTACK: start = $0100, size =$100;
|
||||
RAM: start = $0200, size = $200 - __STACKSIZE__, define = yes;
|
||||
# 0000-03ff is RAM
|
||||
# FIXME: what zp range can we actually use?
|
||||
# $0a-$11 is used by IRQ/NMI, $e8 is used by NMI
|
||||
ZP: start = $0012, size = $e8 - $12;
|
||||
CPUSTACK: start = $0100, size =$100;
|
||||
RAM: start = $0200, size = $200 - __STACKSIZE__, define = yes;
|
||||
|
||||
CARTHEADER: file = %O, define = yes, start = %S, size = $0029;
|
||||
# 6000-e000 can be (Cartridge) ROM
|
||||
# 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;
|
||||
#ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes;
|
||||
# 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;
|
||||
CARTHEADER: file = %O, define = yes, start = %S, size = $0029;
|
||||
# 6000-e000 can be (Cartridge) ROM
|
||||
# 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;
|
||||
#ROMFILL: start = $7000, size = $7000, fill = yes, fillval = $00, file = %O, define = yes;
|
||||
# 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;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
STARTUP: load = CARTHEADER, type = ro, define=yes;
|
||||
INIT: load = ROM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM, type = ro, define=yes;
|
||||
RODATA: load = ROM, type = ro, define=yes;
|
||||
DATA: load = ROM, run=RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
STARTUP: load = CARTHEADER, type = ro, define = yes;
|
||||
ONCE: load = ROM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM, type = ro, define = yes;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
|
||||
FEATURES {
|
||||
CONDES: segment = RODATA, type = constructor, label = __CONSTRUCTOR_TABLE__, count = __CONSTRUCTOR_COUNT__;
|
||||
CONDES: segment = RODATA, type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__;
|
||||
CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__, import = __CALLIRQ__;
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
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__;
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ SEGMENTS {
|
||||
VLIRIDX0: type = ro, load = CVT, align = $200, optional = yes;
|
||||
STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $200, define = 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;
|
||||
RODATA: type = ro, run = VLIR0, load = CVT;
|
||||
DATA: type = rw, run = VLIR0, load = CVT;
|
||||
@ -88,7 +88,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -37,7 +37,7 @@ SEGMENTS {
|
||||
RECORDS: type = ro, load = CVT, align = $FE, optional = yes;
|
||||
STARTUP: type = ro, run = VLIR0, load = CVT, align_load = $FE, define = 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;
|
||||
RODATA: type = ro, run = VLIR0, load = CVT;
|
||||
DATA: type = rw, run = VLIR0, load = CVT;
|
||||
@ -66,7 +66,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -12,7 +12,7 @@ SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers
|
||||
STARTUP: load = RAM, type = ro; # First initialization code
|
||||
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
|
||||
RODATA: load = RAM, type = ro; # Literals, constants
|
||||
DATA: load = RAM, type = rw; # Initialized variables
|
||||
@ -22,7 +22,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,23 +10,23 @@ MEMORY {
|
||||
RAM: file = %O, define = yes, start = $0400, size = $BC38 - __STACKSIZE__;
|
||||
}
|
||||
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;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, 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 {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -14,25 +14,25 @@ MEMORY {
|
||||
RAM: file = %O, define = yes, start = $0200, size = $9E58 - __STACKSIZE__;
|
||||
}
|
||||
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;
|
||||
BOOTLDR: load = BOOT, type = ro;
|
||||
DIRECTORY: load = DIR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, 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 {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -16,27 +16,27 @@ MEMORY {
|
||||
UPLDR: file = %O, define = yes, start = $BFDC, size = $005C;
|
||||
}
|
||||
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;
|
||||
BOOTLDR: load = BOOT, type = ro;
|
||||
DIRECTORY:load = DIR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
UPCODE: load = UPLDR, type = ro, 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 {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
10
cfg/lynx.cfg
10
cfg/lynx.cfg
@ -14,25 +14,25 @@ MEMORY {
|
||||
RAM: file = %O, define = yes, start = $0200, size = $BE38 - __STACKSIZE__;
|
||||
}
|
||||
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;
|
||||
BOOTLDR: load = BOOT, type = ro;
|
||||
DIRECTORY: load = DIR, type = ro;
|
||||
STARTUP: load = RAM, type = ro, define = 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;
|
||||
RODATA: load = RAM, type = ro, define = yes;
|
||||
DATA: load = RAM, type = rw, 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 {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -6,7 +6,7 @@ SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, optional = yes;
|
||||
HEADER: load = COMBINED, type = ro;
|
||||
INIT: load = COMBINED, type = ro, optional = yes;
|
||||
ONCE: load = COMBINED, type = ro, optional = yes;
|
||||
CODE: load = COMBINED, type = ro;
|
||||
RODATA: load = COMBINED, type = ro;
|
||||
DATA: load = COMBINED, type = rw;
|
||||
|
@ -33,23 +33,23 @@ MEMORY {
|
||||
RAM: file = "", start = $6000, size = $2000, define = yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
HEADER: load = HEADER, type = ro;
|
||||
STARTUP: load = ROM0, type = ro, define = 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;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run = RAM, type = rw, define = yes;
|
||||
VECTORS: load = ROMV, type = rw;
|
||||
CHARS: load = ROM2, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -6,19 +6,19 @@ MEMORY {
|
||||
RAM: file = %O, start = %S, size = $10000 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
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;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -15,11 +15,11 @@ MEMORY {
|
||||
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
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;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
|
@ -15,22 +15,22 @@ MEMORY {
|
||||
RAM: file = %O, define = yes, start = %S, size = __HIMEM__ - __STACKSIZE__ - %S;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
BOOT: load = HEAD, type = ro, optional = yes;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
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;
|
||||
RODATA: load = RAM, type = rw;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
38
cfg/pce.cfg
38
cfg/pce.cfg
@ -1,39 +1,39 @@
|
||||
# linker config to produce simple NEC PC-Engine cartridge (.pce)
|
||||
|
||||
SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
||||
__STACKSIZE__: type = weak, value = $0300; # 3 pages stack
|
||||
}
|
||||
|
||||
MEMORY {
|
||||
# FIXME: is this correct? the first 3? bytes cant be used?
|
||||
ZP: start = $03, size = $fd, type = rw, define = yes;
|
||||
# FIXME: is this correct? the first 3? bytes cant be used?
|
||||
ZP: file = "", start = $0003, size = $00FD, type = rw, define = yes;
|
||||
|
||||
# reset-bank and hardware vectors
|
||||
ROM0: start = $e000, size = $1ff6, file = %O ,fill = yes, define = yes;
|
||||
ROMV: start = $fff6, size = $a, file = %O,fill = yes;
|
||||
# reset-bank and hardware vectors
|
||||
ROM0: file = %O, start = $E000, size = $1FF6, fill = yes, define = yes;
|
||||
ROMV: file = %O, start = $FFF6, size = $000A, fill = yes;
|
||||
|
||||
# first RAM page (also contains stack and zeropage)
|
||||
RAM: start = $2200, size = $1e00, define = yes;
|
||||
# first RAM page (also contains stack and zeropage)
|
||||
RAM: file = "", start = $2200, size = $1e00, define = yes;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
INIT: load = ROM0, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM0, type = ro, define = yes;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run= RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTORS: load = ROMV, type = rw, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
EXTZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
APPZP: load = ZP, type = zp, define = yes, optional = yes;
|
||||
STARTUP: load = ROM0, type = ro, define = yes;
|
||||
ONCE: load = ROM0, type = ro, define = yes, optional = yes;
|
||||
CODE: load = ROM0, type = ro, define = yes;
|
||||
RODATA: load = ROM0, type = ro, define = yes;
|
||||
DATA: load = ROM0, run = RAM, type = rw, define = yes;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
VECTORS: load = ROMV, type = rw, define = yes;
|
||||
}
|
||||
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,23 +10,23 @@ MEMORY {
|
||||
RAM: file = %O, start = $040D, size = $7BF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,23 +10,23 @@ MEMORY {
|
||||
RAM: file = %O, define = yes, start = $100D, size = $ECF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -3,26 +3,26 @@ SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0001;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
|
||||
ZP: file = "", start = $0000, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0001;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -3,26 +3,26 @@ SYMBOLS {
|
||||
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
||||
}
|
||||
MEMORY {
|
||||
ZP: file = "", start = $0000, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0001;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
|
||||
ZP: file = "", start = $0000, size = $001A;
|
||||
HEADER: file = %O, start = $0000, size = $0001;
|
||||
RAM: file = %O, define = yes, start = $0200, size = $FDF0 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
INIT: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
LOWCODE: load = RAM, type = ro, optional = yes;
|
||||
ONCE: load = RAM, type = ro, define = yes, optional = yes;
|
||||
CODE: load = RAM, type = ro;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -21,7 +21,7 @@ MEMORY {
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
BANK1: load = BANKROM1, type = ro;
|
||||
BANK2: load = BANKROM2, type = ro;
|
||||
|
@ -14,21 +14,21 @@ MEMORY {
|
||||
ROM: file = %O, start = $C000, size = $4000, fill = yes, fillval = $ff, define=yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = 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;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
||||
FFF0: load = ROM, type = ro, offset = $3FF0;
|
||||
VECTOR: load = ROM, type = ro, offset = $3FFA;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -17,7 +17,7 @@ MEMORY {
|
||||
}
|
||||
SEGMENTS {
|
||||
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;
|
||||
RODATA: load = ROM, type = ro;
|
||||
BANK1: load = BANKROM1, type = ro;
|
||||
|
@ -10,21 +10,21 @@ MEMORY {
|
||||
ROM: file = %O, start = $8000, size = $8000, fill = yes, fillval = $FF, define = yes;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = 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;
|
||||
RODATA: load = ROM, type = ro, define = yes;
|
||||
DATA: load = ROM, run = RAM, type = rw, define = yes;
|
||||
FFF0: load = ROM, type = ro, offset = $7FF0;
|
||||
VECTOR: load = ROM, type = ro, offset = $7FFA;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -16,11 +16,11 @@ SEGMENTS {
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
@ -28,7 +28,7 @@ FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -10,23 +10,23 @@ MEMORY {
|
||||
RAM: file = %O, define = yes, start = $100D, size = $0DF3 - __STACKSIZE__;
|
||||
}
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
LOADADDR: load = LOADADDR, type = ro;
|
||||
EXEHDR: load = HEADER, type = ro;
|
||||
STARTUP: load = RAM, type = ro;
|
||||
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;
|
||||
RODATA: load = RAM, type = ro;
|
||||
DATA: load = RAM, type = rw;
|
||||
INITBSS: load = RAM, type = bss;
|
||||
INIT: load = RAM, type = bss;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = zp;
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__,
|
||||
segment = INIT;
|
||||
segment = ONCE;
|
||||
CONDES: type = destructor,
|
||||
label = __DESTRUCTOR_TABLE__,
|
||||
count = __DESTRUCTOR_COUNT__,
|
||||
|
@ -743,7 +743,7 @@ segments should go above $7FFF.
|
||||
<p>
|
||||
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
|
||||
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"
|
||||
load chunk here).
|
||||
<p>
|
||||
@ -796,7 +796,7 @@ SEGMENTS {
|
||||
NEXEHDR: load = FSTHDR, type = ro; # first load chunk
|
||||
STARTUP: load = RAMLO, type = ro, define = 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;
|
||||
|
||||
CHKHDR: load = SECHDR, type = ro; # second load chunk
|
||||
@ -808,7 +808,7 @@ SEGMENTS {
|
||||
AUTOSTRT: load = RAM, type = ro; # defines program entry point
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: segment = RODATA,
|
||||
CONDES: segment = ONCE,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
@ -827,7 +827,7 @@ the MAINHDR segment get discarded.
|
||||
<p>
|
||||
The newly added NEXEHDR segment defines the correct chunk header for the
|
||||
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).
|
||||
<p>
|
||||
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>
|
||||
|
||||
|
||||
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):
|
||||
|
||||
<tscreen><verb>
|
||||
@ -893,7 +893,7 @@ SEGMENTS {
|
||||
|
||||
CHKHDR: load = SECHDR, type = ro; # second load chunk
|
||||
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;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
|
||||
@ -901,7 +901,7 @@ SEGMENTS {
|
||||
AUTOSTRT: load = RAM, type = ro; # defines program entry point
|
||||
}
|
||||
FEATURES {
|
||||
CONDES: segment = RODATA,
|
||||
CONDES: segment = ONCE,
|
||||
type = constructor,
|
||||
label = __CONSTRUCTOR_TABLE__,
|
||||
count = __CONSTRUCTOR_COUNT__;
|
||||
|
@ -78,15 +78,15 @@ vectors at the proper memory locations. The segment definition is:
|
||||
|
||||
<tscreen><code>
|
||||
SEGMENTS {
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
DATA: load = ROM, type = rw, define = yes, run = RAM;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
HEAP: load = RAM, type = bss, optional = yes;
|
||||
STARTUP: load = ROM, type = ro;
|
||||
INIT: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro;
|
||||
RODATA: load = ROM, type = ro;
|
||||
VECTORS: load = ROM, type = ro, start = $FFFA;
|
||||
ZEROPAGE: load = ZP, type = zp, define = yes;
|
||||
DATA: load = ROM, type = rw, define = yes, run = RAM;
|
||||
BSS: load = RAM, type = bss, define = yes;
|
||||
HEAP: load = RAM, type = bss, optional = yes;
|
||||
STARTUP: load = ROM, type = ro;
|
||||
ONCE: load = ROM, type = ro, optional = yes;
|
||||
CODE: load = ROM, type = ro;
|
||||
RODATA: load = ROM, type = ro;
|
||||
VECTORS: load = ROM, type = ro, start = $FFFA;
|
||||
}
|
||||
</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> HEAP: </tt>Uninitialized C-level heap storage in RAM, optional
|
||||
<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> 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
|
||||
|
@ -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
|
||||
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
|
||||
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.
|
||||
|
||||
<sect1>LOWCODE<p>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
.include "apple2.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.ifdef __APPLE2ENH__
|
||||
initconio:
|
||||
|
@ -10,8 +10,8 @@
|
||||
.import initlib, donelib
|
||||
.import callmain
|
||||
.import __LC_START__, __LC_LAST__ ; Linker generated
|
||||
.import __INIT_RUN__, __INIT_SIZE__ ; Linker generated
|
||||
.import __INITBSS_RUN__ ; Linker generated
|
||||
.import __ONCE_RUN__, __ONCE_SIZE__ ; Linker generated
|
||||
.import __INIT_RUN__ ; Linker generated
|
||||
|
||||
.include "zeropage.inc"
|
||||
.include "apple2.inc"
|
||||
@ -29,14 +29,14 @@
|
||||
bit $C081
|
||||
|
||||
; Set the source start address.
|
||||
lda #<(__INITBSS_RUN__ + __INIT_SIZE__)
|
||||
ldy #>(__INITBSS_RUN__ + __INIT_SIZE__)
|
||||
lda #<(__INIT_RUN__ + __ONCE_SIZE__)
|
||||
ldy #>(__INIT_RUN__ + __ONCE_SIZE__)
|
||||
sta $9B
|
||||
sty $9C
|
||||
|
||||
; Set the source last address.
|
||||
lda #<(__INITBSS_RUN__ + __INIT_SIZE__ + __LC_LAST__ - __LC_START__)
|
||||
ldy #>(__INITBSS_RUN__ + __INIT_SIZE__ + __LC_LAST__ - __LC_START__)
|
||||
lda #<(__INIT_RUN__ + __ONCE_SIZE__ + __LC_LAST__ - __LC_START__)
|
||||
ldy #>(__INIT_RUN__ + __ONCE_SIZE__ + __LC_LAST__ - __LC_START__)
|
||||
sta $96
|
||||
sty $97
|
||||
|
||||
@ -51,25 +51,25 @@
|
||||
jsr $D39A ; BLTU2
|
||||
|
||||
; Set the source start address.
|
||||
lda #<__INITBSS_RUN__
|
||||
ldy #>__INITBSS_RUN__
|
||||
lda #<__INIT_RUN__
|
||||
ldy #>__INIT_RUN__
|
||||
sta $9B
|
||||
sty $9C
|
||||
|
||||
; Set the source last address.
|
||||
lda #<(__INITBSS_RUN__ + __INIT_SIZE__)
|
||||
ldy #>(__INITBSS_RUN__ + __INIT_SIZE__)
|
||||
lda #<(__INIT_RUN__ + __ONCE_SIZE__)
|
||||
ldy #>(__INIT_RUN__ + __ONCE_SIZE__)
|
||||
sta $96
|
||||
sty $97
|
||||
|
||||
; Set the destination last address.
|
||||
lda #<(__INIT_RUN__ + __INIT_SIZE__)
|
||||
ldy #>(__INIT_RUN__ + __INIT_SIZE__)
|
||||
lda #<(__ONCE_RUN__ + __ONCE_SIZE__)
|
||||
ldy #>(__ONCE_RUN__ + __ONCE_SIZE__)
|
||||
sta $94
|
||||
sty $95
|
||||
|
||||
; 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
|
||||
|
||||
; Delegate all further processing, to keep the STARTUP segment small.
|
||||
@ -109,7 +109,7 @@ exit: ldx #$02
|
||||
; We're done
|
||||
jmp done
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
; Save the zero-page locations that we need.
|
||||
init: ldx #zpspace-1
|
||||
@ -201,7 +201,7 @@ q_param:.byte $04 ; param_count
|
||||
; Final jump when we're done
|
||||
done: jmp DOSWARM ; Potentially patched at runtime
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
zpsave: .res zpspace
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
; - Apple II ProDOS 8 TechNote #23, ProDOS 8 Changes and Minutia
|
||||
; - ProDOS TechRefMan, chapter 5.2.4
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initdostype:
|
||||
lda $BF00
|
||||
|
@ -14,7 +14,7 @@
|
||||
.include "errno.inc"
|
||||
.include "../filedes.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initiobuf:
|
||||
; Convert end address highbyte to table index
|
||||
|
@ -10,7 +10,7 @@
|
||||
; Identify machine according to:
|
||||
; Apple II Miscellaneous TechNote #7, Apple II Family Identification
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initostype:
|
||||
sec
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
.include "apple2.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
; Check for ProDOS
|
||||
|
@ -46,10 +46,10 @@ FNAM_LEN = $280
|
||||
FNAM = $281
|
||||
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.
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmainargs:
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
.include "mli.inc"
|
||||
.include "filedes.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
raisefilelevel:
|
||||
; Raise file level
|
||||
|
@ -16,7 +16,7 @@
|
||||
.include "filedes.inc"
|
||||
.include "apple2.inc"
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initprompt:
|
||||
; Set prompt <> ']' to let DOS 3.3 know that we're
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
_rebootafterexit := return
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initreboot:
|
||||
; Quit to PWRUP
|
||||
|
@ -13,7 +13,7 @@
|
||||
.import start
|
||||
.export _cas_init
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
_cas_init:
|
||||
.ifdef DEBUG
|
||||
|
@ -11,7 +11,7 @@
|
||||
; ------------------------------------------------------------------------
|
||||
; DOS type detection
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
detect: lda DOS
|
||||
cmp #'S' ; SpartaDOS
|
||||
|
@ -20,7 +20,7 @@ SPACE = 32 ; SPACE char.
|
||||
; --------------------------------------------------------------------------
|
||||
; Get command line
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmainargs:
|
||||
lda #0
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
lda VVBLKD
|
||||
|
@ -180,7 +180,7 @@ update_colors:
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
pm_init:
|
||||
lda #0
|
||||
|
@ -26,7 +26,7 @@ SHRAM_HANDLERS = 1
|
||||
BUFSZ = 128 ; bounce buffer size
|
||||
BUFSZ_SIO = 256
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
; Turn off ROMs, install system and interrupt wrappers, set new chargen pointer
|
||||
|
||||
|
@ -9,7 +9,7 @@ SCREEN_BUF = $4000 - SCREEN_BUF_SIZE
|
||||
|
||||
.export screen_setup_20x24
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
screen_setup_20x24:
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
lda VVBLKD
|
||||
|
@ -17,7 +17,7 @@
|
||||
;--------------------------------------------------------------------------
|
||||
; Put this constructor into a segment that can be re-used by programs.
|
||||
;
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
; Turn the capitals lock off.
|
||||
|
||||
|
@ -55,10 +55,10 @@
|
||||
.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.
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initcgetc:
|
||||
lsr STATUS
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
lda IRQVec
|
||||
|
@ -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
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.proc initmainargs
|
||||
|
||||
|
@ -69,7 +69,7 @@ L9: lda ptr3
|
||||
;--------------------------------------------------------------------------
|
||||
; initstdin: Reset the stdin console.
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initstdin:
|
||||
ldx #<-1
|
||||
|
@ -42,7 +42,7 @@ L2: jsr KBDREAD ; Read char and return in A
|
||||
.bss
|
||||
keyvec: .res 2
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
initcgetc:
|
||||
|
||||
; Save the old vector
|
||||
|
@ -108,7 +108,7 @@ L2: lda zpsave,x
|
||||
; ------------------------------------------------------------------------
|
||||
; Data
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
zpsave: .res zpspace
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
lda IRQVec
|
||||
|
@ -32,10 +32,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
|
||||
REM = $8f ; BASIC token-code
|
||||
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
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmainargs:
|
||||
|
||||
@ -127,7 +127,7 @@ done: lda #<argv
|
||||
stx __argv + 1
|
||||
rts
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
term: .res 1
|
||||
name: .res NAME_LEN + 1
|
||||
|
@ -29,7 +29,7 @@ VIC_SPR_Y = (VIC_SPR0_Y + 2*MOUSE_SPR) ; Sprite Y register
|
||||
; --------------------------------------------------------------------------
|
||||
; Initialize the mouse sprite.
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmcb:
|
||||
|
||||
|
@ -63,7 +63,7 @@ BCD2dec:tax
|
||||
; 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
|
||||
; and write it again, ignoring a possible change in between.
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.proc initsystime
|
||||
|
||||
|
@ -56,7 +56,7 @@ L2: jsr KBDREAD ; Read char and return in A
|
||||
.constructor initkbd
|
||||
.destructor donekbd
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.proc initkbd
|
||||
|
||||
|
@ -90,7 +90,7 @@ L2: lda zpsave,x
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
zpsave: .res zpspace
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
lda IRQVec
|
||||
|
@ -32,10 +32,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
|
||||
REM = $8f ; BASIC token-code
|
||||
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
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmainargs:
|
||||
|
||||
@ -126,7 +126,7 @@ done: lda #<argv
|
||||
stx __argv + 1
|
||||
rts
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
term: .res 1
|
||||
name: .res NAME_LEN + 1
|
||||
|
@ -34,7 +34,7 @@ Start:
|
||||
tsx
|
||||
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.
|
||||
|
||||
jsr init
|
||||
@ -79,7 +79,7 @@ L2: lda zpsave,x
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
init:
|
||||
|
||||
@ -111,7 +111,7 @@ L1: lda sp,x
|
||||
; ------------------------------------------------------------------------
|
||||
; Data
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
mmusave:.res 1
|
||||
spsave: .res 1
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
; ------------------------------------------------------------------------
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initirq:
|
||||
lda IRQVec
|
||||
|
@ -32,10 +32,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
|
||||
REM = $8f ; BASIC token-code
|
||||
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
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmainargs:
|
||||
|
||||
@ -125,7 +125,7 @@ done: lda #<argv
|
||||
stx __argv + 1
|
||||
rts
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
term: .res 1
|
||||
name: .res NAME_LEN + 1
|
||||
|
@ -30,7 +30,7 @@ VIC_SPR_Y = (VIC_SPR0_Y + 2*MOUSE_SPR) ; Sprite Y register
|
||||
; --------------------------------------------------------------------------
|
||||
; Initialize the mouse sprite.
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmcb:
|
||||
|
||||
|
@ -43,7 +43,7 @@
|
||||
|
||||
.export soft80_charset
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
soft80_charset:
|
||||
.byte $0f,$03,$0f,$00,$0f,$07,$05,$0e
|
||||
.byte $0f,$05,$0e,$0b,$0f,$0b,$0f,$0f
|
||||
|
@ -56,7 +56,7 @@ soft80_shutdown:
|
||||
sta CIA2_PRA
|
||||
jmp $FF5B ; Initialize video I/O
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
firstinit:
|
||||
; copy charset to RAM under I/O
|
||||
sei
|
||||
@ -146,7 +146,7 @@ soft80_bitmapyhi_data:
|
||||
soft80_tables_data_end:
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
soft80_internal_cellcolor:
|
||||
.res 1
|
||||
soft80_internal_bgcolor:
|
||||
|
@ -60,7 +60,7 @@ soft80mono_shutdown:
|
||||
sta VIC_VIDEO_ADR
|
||||
rts
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
firstinit:
|
||||
; copy charset to RAM under I/O
|
||||
sei
|
||||
@ -150,7 +150,7 @@ soft80_bitmapyhi_data:
|
||||
soft80_tables_data_end:
|
||||
|
||||
;-------------------------------------------------------------------------------
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
soft80mono_internal_cellcolor:
|
||||
.res 1
|
||||
soft80mono_internal_bgcolor:
|
||||
|
@ -63,7 +63,7 @@ BCD2dec:tax
|
||||
; 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
|
||||
; and write it again, ignoring a possible change in between.
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.proc initsystime
|
||||
|
||||
|
@ -9,13 +9,13 @@
|
||||
.importzp devnum
|
||||
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
curunit:
|
||||
.res 1
|
||||
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.proc initcurunit
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
.export _mouse_def_pointercolor
|
||||
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
_mouse_def_pointercolor:
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
.export _mouse_def_pointershape
|
||||
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
_mouse_def_pointershape:
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
;--------------------------------------------------------------------------
|
||||
; initstdin: Open the stdin file descriptors for the keyboard
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.proc initstdin
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
;--------------------------------------------------------------------------
|
||||
; initstdout: Open the stdout and stderr file descriptors for the screen.
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
.proc initstdout
|
||||
|
||||
|
@ -35,10 +35,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
|
||||
REM = $8f ; BASIC token-code
|
||||
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.
|
||||
;
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmainargs:
|
||||
|
||||
@ -144,7 +144,7 @@ done: lda #<argv
|
||||
stx __argv + 1
|
||||
rts
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
term: .res 1
|
||||
name: .res NAME_LEN + 1
|
||||
|
@ -31,7 +31,7 @@ VIC_SPR_Y = (VIC_SPR0_Y + 2*MOUSE_SPR) ; Sprite Y register
|
||||
; --------------------------------------------------------------------------
|
||||
; Initialize the mouse sprite.
|
||||
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmcb:
|
||||
|
||||
|
@ -35,10 +35,10 @@ MAXARGS = 10 ; Maximum number of arguments allowed
|
||||
REM = $8f ; BASIC token-code
|
||||
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.
|
||||
;
|
||||
.segment "INIT"
|
||||
.segment "ONCE"
|
||||
|
||||
initmainargs:
|
||||
|
||||
@ -142,7 +142,7 @@ done: lda #<argv
|
||||
stx __argv + 1
|
||||
rts
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
term: .res 1
|
||||
name: .res NAME_LEN + 1
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
cwd_init := initcwd
|
||||
|
||||
.segment "INITBSS"
|
||||
.segment "INIT"
|
||||
|
||||
__cwd: .res __cwd_buf_size
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user