]> git.sur5r.net Git - cc65/blobdiff - cfg/geos-cbm.cfg
Replace hard returns with an "else", add an error for non-IDENT tokens, and test...
[cc65] / cfg / geos-cbm.cfg
index ddef00a99f3b66b68ef9008bfcd813257603f382..4bf33fdf566045c08ddd3dfe0fb5ae57b75f5b5a 100644 (file)
@@ -1,14 +1,18 @@
+FEATURES {
+    STARTADDRESS: default = $0400;
+}
 SYMBOLS {
     __BACKBUFSIZE__: type = weak, value = $2000;
+    __HIMEM__:       type = weak, value = $8000 - __BACKBUFSIZE__;
     __OVERLAYSIZE__: type = weak, value = $0000;
-    __OVERLAYADDR__: type = weak, value = $8000 - __BACKBUFSIZE__ - __OVERLAYSIZE__;
-    __STACKSIZE__:   type = weak, value = $0400;
+    __OVERLAYADDR__: type = weak, value = __HIMEM__ - __OVERLAYSIZE__;
+    __STACKSIZE__:   type = weak, value = $0400; # 1k stack
     __STACKADDR__:   type = weak, value = __OVERLAYADDR__ - __STACKSIZE__;
 }
 MEMORY {
     CVT:    file   = %O,  start = $0,              size = $40000;
     ZP:     define = yes, start = $58,             size = $1A + $06;
-    VLIR0:  define = yes, start = $0400,           size = __STACKADDR__ - $0400;
+    VLIR0:  define = yes, start = %S,              size = __STACKADDR__ - %S;
     VLIR1:  define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
     VLIR2:  define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
     VLIR3:  define = yes, start = __OVERLAYADDR__, size = __OVERLAYSIZE__;
@@ -31,17 +35,18 @@ MEMORY {
 }
 SEGMENTS {
     ZEROPAGE:  type = zp,  load = ZP;
-    EXTZP:     type = zp,  load = ZP,                 optional   = yes;
+    EXTZP:     type = zp,  load = ZP,                                   optional = yes;
     DIRENTRY:  type = ro,                 load = CVT, align      = $FE;
     FILEINFO:  type = ro,                 load = CVT, align      = $FE;
     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,                   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;
     OVERLAY1:  type = ro,  run  = VLIR1,  load = CVT, align_load = $FE, optional = yes;
     OVERLAY2:  type = ro,  run  = VLIR2,  load = CVT, align_load = $FE, optional = yes;
     OVERLAY3:  type = ro,  run  = VLIR3,  load = CVT, align_load = $FE, optional = yes;
@@ -66,7 +71,7 @@ FEATURES {
     CONDES: type    = constructor,
             label   = __CONSTRUCTOR_TABLE__,
             count   = __CONSTRUCTOR_COUNT__,
-            segment = INIT;
+            segment = ONCE;
     CONDES: type    = destructor,
             label   = __DESTRUCTOR_TABLE__,
             count   = __DESTRUCTOR_COUNT__,