Date: Sun, 6 Mar 2016 20:26:22 +0000 (+0100)
Subject: Renamed INITBSS to INIT and INIT to ONCE.
X-Git-Tag: V2.16~174
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=419eb700b5cd730ecf425ed8a597e9cf41ad7208;p=cc65
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.
---
diff --git a/cfg/apple2-overlay.cfg b/cfg/apple2-overlay.cfg
index 244e4582f..ef9103b49 100644
--- a/cfg/apple2-overlay.cfg
+++ b/cfg/apple2-overlay.cfg
@@ -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__,
diff --git a/cfg/apple2-system.cfg b/cfg/apple2-system.cfg
index f07208e45..52cad960f 100644
--- a/cfg/apple2-system.cfg
+++ b/cfg/apple2-system.cfg
@@ -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__,
diff --git a/cfg/apple2.cfg b/cfg/apple2.cfg
index 27eb706c4..8e63090f5 100644
--- a/cfg/apple2.cfg
+++ b/cfg/apple2.cfg
@@ -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__,
diff --git a/cfg/apple2enh-overlay.cfg b/cfg/apple2enh-overlay.cfg
index 244e4582f..ef9103b49 100644
--- a/cfg/apple2enh-overlay.cfg
+++ b/cfg/apple2enh-overlay.cfg
@@ -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__,
diff --git a/cfg/apple2enh-system.cfg b/cfg/apple2enh-system.cfg
index f07208e45..52cad960f 100644
--- a/cfg/apple2enh-system.cfg
+++ b/cfg/apple2enh-system.cfg
@@ -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__,
diff --git a/cfg/apple2enh.cfg b/cfg/apple2enh.cfg
index 27eb706c4..8e63090f5 100644
--- a/cfg/apple2enh.cfg
+++ b/cfg/apple2enh.cfg
@@ -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__,
diff --git a/cfg/atari-cart.cfg b/cfg/atari-cart.cfg
index 58457c606..09bf86761 100644
--- a/cfg/atari-cart.cfg
+++ b/cfg/atari-cart.cfg
@@ -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__,
diff --git a/cfg/atari-cassette.cfg b/cfg/atari-cassette.cfg
index 80b5c695f..ad68bb8b4 100644
--- a/cfg/atari-cassette.cfg
+++ b/cfg/atari-cassette.cfg
@@ -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__,
diff --git a/cfg/atari-overlay.cfg b/cfg/atari-overlay.cfg
index b3abad988..b14a93a39 100644
--- a/cfg/atari-overlay.cfg
+++ b/cfg/atari-overlay.cfg
@@ -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__,
diff --git a/cfg/atari.cfg b/cfg/atari.cfg
index 97b289d7e..7460a0f66 100644
--- a/cfg/atari.cfg
+++ b/cfg/atari.cfg
@@ -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__,
diff --git a/cfg/atari5200.cfg b/cfg/atari5200.cfg
index 4a90303cf..3db8765d6 100644
--- a/cfg/atari5200.cfg
+++ b/cfg/atari5200.cfg
@@ -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__,
diff --git a/cfg/atarixl-largehimem.cfg b/cfg/atarixl-largehimem.cfg
index f96096995..a1ec5cf08 100644
--- a/cfg/atarixl-largehimem.cfg
+++ b/cfg/atarixl-largehimem.cfg
@@ -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__,
diff --git a/cfg/atarixl-overlay.cfg b/cfg/atarixl-overlay.cfg
index 7356fc03e..b0b4f3b88 100644
--- a/cfg/atarixl-overlay.cfg
+++ b/cfg/atarixl-overlay.cfg
@@ -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__,
diff --git a/cfg/atarixl.cfg b/cfg/atarixl.cfg
index 84992a205..2f9523c59 100644
--- a/cfg/atarixl.cfg
+++ b/cfg/atarixl.cfg
@@ -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__,
diff --git a/cfg/atmos.cfg b/cfg/atmos.cfg
index a1f935efa..a0f7e1c3d 100644
--- a/cfg/atmos.cfg
+++ b/cfg/atmos.cfg
@@ -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__,
diff --git a/cfg/bbc.cfg b/cfg/bbc.cfg
index 6304c309b..98779b6fd 100644
--- a/cfg/bbc.cfg
+++ b/cfg/bbc.cfg
@@ -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__,
diff --git a/cfg/c128-overlay.cfg b/cfg/c128-overlay.cfg
index f2cc3c40c..771bd290b 100644
--- a/cfg/c128-overlay.cfg
+++ b/cfg/c128-overlay.cfg
@@ -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__,
diff --git a/cfg/c128.cfg b/cfg/c128.cfg
index ef2aa4184..0ea6066ad 100644
--- a/cfg/c128.cfg
+++ b/cfg/c128.cfg
@@ -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__,
diff --git a/cfg/c16.cfg b/cfg/c16.cfg
index efb42991f..b4b5ccaf7 100644
--- a/cfg/c16.cfg
+++ b/cfg/c16.cfg
@@ -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__,
diff --git a/cfg/c64-overlay.cfg b/cfg/c64-overlay.cfg
index 522a6d1a6..872fdd775 100644
--- a/cfg/c64-overlay.cfg
+++ b/cfg/c64-overlay.cfg
@@ -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__,
diff --git a/cfg/c64.cfg b/cfg/c64.cfg
index 8ff7db03c..3735a0a65 100644
--- a/cfg/c64.cfg
+++ b/cfg/c64.cfg
@@ -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__,
diff --git a/cfg/cbm510.cfg b/cfg/cbm510.cfg
index d0775b6f2..8b01dff0b 100644
--- a/cfg/cbm510.cfg
+++ b/cfg/cbm510.cfg
@@ -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__,
diff --git a/cfg/cbm610.cfg b/cfg/cbm610.cfg
index ae66f4c4a..6df9f1f5a 100644
--- a/cfg/cbm610.cfg
+++ b/cfg/cbm610.cfg
@@ -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__,
diff --git a/cfg/gamate.cfg b/cfg/gamate.cfg
index 90ced1ea5..f0f669f27 100644
--- a/cfg/gamate.cfg
+++ b/cfg/gamate.cfg
@@ -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__;
}
diff --git a/cfg/geos-apple.cfg b/cfg/geos-apple.cfg
index 746e1f2bf..ee8b61aec 100644
--- a/cfg/geos-apple.cfg
+++ b/cfg/geos-apple.cfg
@@ -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__,
diff --git a/cfg/geos-cbm.cfg b/cfg/geos-cbm.cfg
index ddef00a99..42cbe9a48 100644
--- a/cfg/geos-cbm.cfg
+++ b/cfg/geos-cbm.cfg
@@ -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__,
diff --git a/cfg/lunix.cfg b/cfg/lunix.cfg
index 1342c390b..aabacbeb2 100644
--- a/cfg/lunix.cfg
+++ b/cfg/lunix.cfg
@@ -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__,
diff --git a/cfg/lynx-bll.cfg b/cfg/lynx-bll.cfg
index 21967752f..fcf6d4c60 100644
--- a/cfg/lynx-bll.cfg
+++ b/cfg/lynx-bll.cfg
@@ -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__,
diff --git a/cfg/lynx-coll.cfg b/cfg/lynx-coll.cfg
index b7fd787e7..d40c18237 100644
--- a/cfg/lynx-coll.cfg
+++ b/cfg/lynx-coll.cfg
@@ -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__,
diff --git a/cfg/lynx-uploader.cfg b/cfg/lynx-uploader.cfg
index 740a18b0a..fe6d6133d 100644
--- a/cfg/lynx-uploader.cfg
+++ b/cfg/lynx-uploader.cfg
@@ -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__,
diff --git a/cfg/lynx.cfg b/cfg/lynx.cfg
index 2c9e76207..4d41c1bbf 100644
--- a/cfg/lynx.cfg
+++ b/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__,
diff --git a/cfg/module.cfg b/cfg/module.cfg
index 452491eb4..be312585c 100644
--- a/cfg/module.cfg
+++ b/cfg/module.cfg
@@ -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;
diff --git a/cfg/nes.cfg b/cfg/nes.cfg
index 3e2f408cc..f68330425 100644
--- a/cfg/nes.cfg
+++ b/cfg/nes.cfg
@@ -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__,
diff --git a/cfg/none.cfg b/cfg/none.cfg
index 49409a82c..54ae54eb4 100644
--- a/cfg/none.cfg
+++ b/cfg/none.cfg
@@ -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__,
diff --git a/cfg/osic1p-asm.cfg b/cfg/osic1p-asm.cfg
index 4000890be..ac2e76dc9 100644
--- a/cfg/osic1p-asm.cfg
+++ b/cfg/osic1p-asm.cfg
@@ -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;
}
diff --git a/cfg/osic1p.cfg b/cfg/osic1p.cfg
index fd9aa604e..314eac0b9 100644
--- a/cfg/osic1p.cfg
+++ b/cfg/osic1p.cfg
@@ -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__,
diff --git a/cfg/pce.cfg b/cfg/pce.cfg
index 9128eb727..219cbdec3 100644
--- a/cfg/pce.cfg
+++ b/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__,
diff --git a/cfg/pet.cfg b/cfg/pet.cfg
index 80d89ee50..aad3f579e 100644
--- a/cfg/pet.cfg
+++ b/cfg/pet.cfg
@@ -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__,
diff --git a/cfg/plus4.cfg b/cfg/plus4.cfg
index 6eeddf12e..16e9d12c8 100644
--- a/cfg/plus4.cfg
+++ b/cfg/plus4.cfg
@@ -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__,
diff --git a/cfg/sim6502.cfg b/cfg/sim6502.cfg
index edb630d7f..8e78fceb2 100644
--- a/cfg/sim6502.cfg
+++ b/cfg/sim6502.cfg
@@ -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__,
diff --git a/cfg/sim65c02.cfg b/cfg/sim65c02.cfg
index edb630d7f..8e78fceb2 100644
--- a/cfg/sim65c02.cfg
+++ b/cfg/sim65c02.cfg
@@ -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__,
diff --git a/cfg/supervision-128k.cfg b/cfg/supervision-128k.cfg
index ce835db50..3cfdf1276 100644
--- a/cfg/supervision-128k.cfg
+++ b/cfg/supervision-128k.cfg
@@ -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;
diff --git a/cfg/supervision-16k.cfg b/cfg/supervision-16k.cfg
index e38948d5f..2e96b9a72 100644
--- a/cfg/supervision-16k.cfg
+++ b/cfg/supervision-16k.cfg
@@ -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__,
diff --git a/cfg/supervision-64k.cfg b/cfg/supervision-64k.cfg
index fd5370fa5..63338d1e3 100644
--- a/cfg/supervision-64k.cfg
+++ b/cfg/supervision-64k.cfg
@@ -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;
diff --git a/cfg/supervision.cfg b/cfg/supervision.cfg
index 66fb4cfad..b7ae207b8 100644
--- a/cfg/supervision.cfg
+++ b/cfg/supervision.cfg
@@ -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__,
diff --git a/cfg/vic20-32k.cfg b/cfg/vic20-32k.cfg
index 23cd718df..a1b609106 100644
--- a/cfg/vic20-32k.cfg
+++ b/cfg/vic20-32k.cfg
@@ -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__,
diff --git a/cfg/vic20.cfg b/cfg/vic20.cfg
index 9a5ce9a63..693b356a3 100644
--- a/cfg/vic20.cfg
+++ b/cfg/vic20.cfg
@@ -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__,
diff --git a/doc/atari.sgml b/doc/atari.sgml
index 47ce050e1..f37b43929 100644
--- a/doc/atari.sgml
+++ b/doc/atari.sgml
@@ -743,7 +743,7 @@ segments should go above $7FFF.
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).
@@ -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.
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).
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
Low data and high code example
-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):
@@ -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__;
diff --git a/doc/customizing.sgml b/doc/customizing.sgml
index 0a0b8c87e..e502f2e9d 100644
--- a/doc/customizing.sgml
+++ b/doc/customizing.sgml
@@ -78,15 +78,15 @@ vectors at the proper memory locations. The segment definition is:
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;
}
@@ -97,7 +97,7 @@ The meaning of each of these segments is as follows.
BSS: Uninitialized data stored in RAM (used for variable storage)
HEAP: Uninitialized C-level heap storage in RAM, optional
STARTUP: The program initialization code, stored in ROM
-
INIT: The code needed to initialize the system, stored in ROM
+
ONCE: The code run once to initialize the system, stored in ROM
CODE: The program code, stored in ROM
RODATA: Initialized data that cannot be modified by the program, stored in ROM
VECTORS: The interrupt vector table, stored in ROM at location $FFFA
diff --git a/doc/ld65.sgml b/doc/ld65.sgml
index 329f975e1..448157ce0 100644
--- a/doc/ld65.sgml
+++ b/doc/ld65.sgml
@@ -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.
-INIT
+ONCE
-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.
LOWCODE
diff --git a/libsrc/apple2/cputc.s b/libsrc/apple2/cputc.s
index 1cadd1f1c..2db2962f9 100644
--- a/libsrc/apple2/cputc.s
+++ b/libsrc/apple2/cputc.s
@@ -14,7 +14,7 @@
.include "apple2.inc"
- .segment "INIT"
+ .segment "ONCE"
.ifdef __APPLE2ENH__
initconio:
diff --git a/libsrc/apple2/crt0.s b/libsrc/apple2/crt0.s
index f061b212b..7eee390fa 100644
--- a/libsrc/apple2/crt0.s
+++ b/libsrc/apple2/crt0.s
@@ -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
diff --git a/libsrc/apple2/dosdetect.s b/libsrc/apple2/dosdetect.s
index 68910e3da..cedb1f3e3 100644
--- a/libsrc/apple2/dosdetect.s
+++ b/libsrc/apple2/dosdetect.s
@@ -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
diff --git a/libsrc/apple2/extra/iobuf-0800.s b/libsrc/apple2/extra/iobuf-0800.s
index 7951ccbb0..2e5d1927e 100644
--- a/libsrc/apple2/extra/iobuf-0800.s
+++ b/libsrc/apple2/extra/iobuf-0800.s
@@ -14,7 +14,7 @@
.include "errno.inc"
.include "../filedes.inc"
- .segment "INIT"
+ .segment "ONCE"
initiobuf:
; Convert end address highbyte to table index
diff --git a/libsrc/apple2/get_ostype.s b/libsrc/apple2/get_ostype.s
index 68ae865ac..cff6af9a3 100644
--- a/libsrc/apple2/get_ostype.s
+++ b/libsrc/apple2/get_ostype.s
@@ -10,7 +10,7 @@
; Identify machine according to:
; Apple II Miscellaneous TechNote #7, Apple II Family Identification
- .segment "INIT"
+ .segment "ONCE"
initostype:
sec
diff --git a/libsrc/apple2/irq.s b/libsrc/apple2/irq.s
index 0b0555695..97a1633b4 100644
--- a/libsrc/apple2/irq.s
+++ b/libsrc/apple2/irq.s
@@ -9,7 +9,7 @@
.include "apple2.inc"
- .segment "INIT"
+ .segment "ONCE"
initirq:
; Check for ProDOS
diff --git a/libsrc/apple2/mainargs.s b/libsrc/apple2/mainargs.s
index 2e809dc56..e3db8bb10 100644
--- a/libsrc/apple2/mainargs.s
+++ b/libsrc/apple2/mainargs.s
@@ -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:
diff --git a/libsrc/apple2/open.s b/libsrc/apple2/open.s
index b1686df70..e47722973 100644
--- a/libsrc/apple2/open.s
+++ b/libsrc/apple2/open.s
@@ -19,7 +19,7 @@
.include "mli.inc"
.include "filedes.inc"
- .segment "INIT"
+ .segment "ONCE"
raisefilelevel:
; Raise file level
diff --git a/libsrc/apple2/read.s b/libsrc/apple2/read.s
index ef994d6aa..14c80b7e2 100644
--- a/libsrc/apple2/read.s
+++ b/libsrc/apple2/read.s
@@ -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
diff --git a/libsrc/apple2/reboot.s b/libsrc/apple2/reboot.s
index 8ee1ba067..e674ea1bc 100644
--- a/libsrc/apple2/reboot.s
+++ b/libsrc/apple2/reboot.s
@@ -10,7 +10,7 @@
_rebootafterexit := return
- .segment "INIT"
+ .segment "ONCE"
initreboot:
; Quit to PWRUP
diff --git a/libsrc/atari/casinit.s b/libsrc/atari/casinit.s
index c91989aad..668f34867 100644
--- a/libsrc/atari/casinit.s
+++ b/libsrc/atari/casinit.s
@@ -13,7 +13,7 @@
.import start
.export _cas_init
-.segment "INIT"
+.segment "ONCE"
_cas_init:
.ifdef DEBUG
diff --git a/libsrc/atari/dosdetect.s b/libsrc/atari/dosdetect.s
index 654da55b5..cac9a6536 100644
--- a/libsrc/atari/dosdetect.s
+++ b/libsrc/atari/dosdetect.s
@@ -11,7 +11,7 @@
; ------------------------------------------------------------------------
; DOS type detection
-.segment "INIT"
+.segment "ONCE"
detect: lda DOS
cmp #'S' ; SpartaDOS
diff --git a/libsrc/atari/getargs.s b/libsrc/atari/getargs.s
index fb3b7bc03..d32c0a268 100644
--- a/libsrc/atari/getargs.s
+++ b/libsrc/atari/getargs.s
@@ -20,7 +20,7 @@ SPACE = 32 ; SPACE char.
; --------------------------------------------------------------------------
; Get command line
-.segment "INIT"
+.segment "ONCE"
initmainargs:
lda #0
diff --git a/libsrc/atari/irq.s b/libsrc/atari/irq.s
index 0a8efe466..1878ea0a2 100644
--- a/libsrc/atari/irq.s
+++ b/libsrc/atari/irq.s
@@ -13,7 +13,7 @@
; ------------------------------------------------------------------------
-.segment "INIT"
+.segment "ONCE"
initirq:
lda VVBLKD
diff --git a/libsrc/atari/mcbpm.s b/libsrc/atari/mcbpm.s
index c5c5dd433..9e6ccc2c5 100644
--- a/libsrc/atari/mcbpm.s
+++ b/libsrc/atari/mcbpm.s
@@ -180,7 +180,7 @@ update_colors:
; ------------------------------------------------------------------------
- .segment "INIT"
+ .segment "ONCE"
pm_init:
lda #0
diff --git a/libsrc/atari/shadow_ram_handlers.s b/libsrc/atari/shadow_ram_handlers.s
index 53a71ab71..d65e6bd68 100644
--- a/libsrc/atari/shadow_ram_handlers.s
+++ b/libsrc/atari/shadow_ram_handlers.s
@@ -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
diff --git a/libsrc/atari5200/conioscreen.s b/libsrc/atari5200/conioscreen.s
index 660276675..2e86001c2 100644
--- a/libsrc/atari5200/conioscreen.s
+++ b/libsrc/atari5200/conioscreen.s
@@ -9,7 +9,7 @@ SCREEN_BUF = $4000 - SCREEN_BUF_SIZE
.export screen_setup_20x24
- .segment "INIT"
+ .segment "ONCE"
screen_setup_20x24:
diff --git a/libsrc/atari5200/irq.s b/libsrc/atari5200/irq.s
index 720113f82..263805d02 100644
--- a/libsrc/atari5200/irq.s
+++ b/libsrc/atari5200/irq.s
@@ -9,7 +9,7 @@
; ------------------------------------------------------------------------
-.segment "INIT"
+.segment "ONCE"
initirq:
lda VVBLKD
diff --git a/libsrc/atmos/capslock.s b/libsrc/atmos/capslock.s
index 0ed6e70da..91c484250 100644
--- a/libsrc/atmos/capslock.s
+++ b/libsrc/atmos/capslock.s
@@ -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.
diff --git a/libsrc/atmos/cgetc.s b/libsrc/atmos/cgetc.s
index e4ea15ac6..64d597bc6 100644
--- a/libsrc/atmos/cgetc.s
+++ b/libsrc/atmos/cgetc.s
@@ -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
diff --git a/libsrc/atmos/irq.s b/libsrc/atmos/irq.s
index ed443caae..751c860f2 100644
--- a/libsrc/atmos/irq.s
+++ b/libsrc/atmos/irq.s
@@ -9,7 +9,7 @@
; ------------------------------------------------------------------------
-.segment "INIT"
+.segment "ONCE"
initirq:
lda IRQVec
diff --git a/libsrc/atmos/mainargs.s b/libsrc/atmos/mainargs.s
index d6d9ed1ef..8b57d9855 100644
--- a/libsrc/atmos/mainargs.s
+++ b/libsrc/atmos/mainargs.s
@@ -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
diff --git a/libsrc/atmos/read.s b/libsrc/atmos/read.s
index 324ac789e..edf9d161d 100644
--- a/libsrc/atmos/read.s
+++ b/libsrc/atmos/read.s
@@ -69,7 +69,7 @@ L9: lda ptr3
;--------------------------------------------------------------------------
; initstdin: Reset the stdin console.
-.segment "INIT"
+.segment "ONCE"
initstdin:
ldx #<-1
diff --git a/libsrc/c128/cgetc.s b/libsrc/c128/cgetc.s
index 46f13d197..7cb4c159e 100644
--- a/libsrc/c128/cgetc.s
+++ b/libsrc/c128/cgetc.s
@@ -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
diff --git a/libsrc/c128/crt0.s b/libsrc/c128/crt0.s
index 4c6a0f7d9..5891bacf3 100644
--- a/libsrc/c128/crt0.s
+++ b/libsrc/c128/crt0.s
@@ -108,7 +108,7 @@ L2: lda zpsave,x
; ------------------------------------------------------------------------
; Data
-.segment "INITBSS"
+.segment "INIT"
zpsave: .res zpspace
diff --git a/libsrc/c128/irq.s b/libsrc/c128/irq.s
index 79aa8faaa..9f6d0c6d1 100644
--- a/libsrc/c128/irq.s
+++ b/libsrc/c128/irq.s
@@ -9,7 +9,7 @@
; ------------------------------------------------------------------------
-.segment "INIT"
+.segment "ONCE"
initirq:
lda IRQVec
diff --git a/libsrc/c128/mainargs.s b/libsrc/c128/mainargs.s
index dcd5a11bd..f53ceafa0 100644
--- a/libsrc/c128/mainargs.s
+++ b/libsrc/c128/mainargs.s
@@ -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 #