+FEATURES {
+ STARTADDRESS: default = $4000;
+}
SYMBOLS {
__BACKBUFSIZE__: type = weak, value = $2000;
+ __HIMEM__: type = weak, value = $C000 - __BACKBUFSIZE__;
__OVERLAYSIZE__: type = weak, value = $0000;
- __OVERLAYADDR__: type = weak, value = $C000 - __BACKBUFSIZE__ - __OVERLAYSIZE__;
- __STACKSIZE__: type = weak, value = $0400;
+ __OVERLAYADDR__: type = weak, value = __HIMEM__ - __OVERLAYSIZE__;
+ __STACKSIZE__: type = weak, value = $0400; # 1k stack
__STACKADDR__: type = weak, value = $2000 - __STACKSIZE__;
}
MEMORY {
CVT: file = %O, start = $0, size = $20000;
ZP: define = yes, start = $80, size = $1A + $06;
- EXT: define = yes, start = $0C00, size = __STACKADDR__ - $0C00;
- VLIR0: define = yes, start = $4000, size = __OVERLAYADDR__ - $4000;
+ EXT: define = yes, start = $0C00, size = __STACKADDR__ - __EXT_START__;
+ VLIR0: define = yes, start = %S, size = __OVERLAYADDR__ - %S;
VLIR1: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR2: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
VLIR3: define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
}
SEGMENTS {
ZEROPAGE: type = zp, load = ZP;
- EXTZP: type = zp, load = ZP, optional = yes;
+ EXTZP: type = zp, load = ZP, optional = yes;
EXTBSS: type = bss, load = EXT, define = yes, optional = yes;
FILEINFO: type = ro, load = CVT, offset = $002;
RECORDS: type = ro, load = CVT, offset = $100, optional = yes;
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, optional = yes;
CODE: type = ro, run = VLIR0, load = CVT;
RODATA: type = ro, run = VLIR0, load = CVT;
DATA: type = rw, run = VLIR0, load = CVT;
- BSS: type = bss, load = VLIR0, define = yes;
+ INIT: type = bss, load = VLIR0, optional = yes;
+ BSS: type = bss, load = VLIR0, define = yes;
VLIRIDX1: type = ro, load = CVT, align = $200, optional = yes;
OVERLAY1: type = ro, run = VLIR1, load = CVT, align_load = $200, optional = yes;
VLIRIDX2: type = ro, load = CVT, align = $200, optional = yes;
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
- segment = INIT;
+ segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,