From: Greg King Date: Thu, 8 Oct 2015 10:11:37 +0000 (-0400) Subject: Reduced c64-overlay.cfg's size by factoring out a different common expression. X-Git-Tag: V2.16~215^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8b89f4f5a6f58763826f378da8cbf20e4a74d999;p=cc65 Reduced c64-overlay.cfg's size by factoring out a different common expression. --- diff --git a/cfg/c64-overlay.cfg b/cfg/c64-overlay.cfg index a95c1f6ef..07ce9e4b6 100644 --- a/cfg/c64-overlay.cfg +++ b/cfg/c64-overlay.cfg @@ -1,39 +1,39 @@ FEATURES { - STARTADDRESS: default = $0801; + STARTADDRESS: default = $0801; } SYMBOLS { - __LOADADDR__: type = import; - __EXEHDR__: type = import; - __OVERLAYADDR__: type = import; - __STACKSIZE__: type = weak, value = $0800; # 2k stack - __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay - __HIMEM__: type = weak, value = $D000; - __HIMEM2__: type = export, value = __HIMEM__ - 2; + __LOADADDR__: type = import; + __EXEHDR__: type = import; + __OVERLAYADDR__: type = import; + __STACKSIZE__: type = weak, value = $0800; # 2k stack + __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay + __HIMEM__: type = weak, value = $D000; + __OVERLAYSTART__: type = export, value = __HIMEM__ - __OVERLAYSIZE__; } MEMORY { - ZP: file = "", define = yes, start = $0002, size = $001A; - LOADADDR: file = %O, start = %S - 2, size = $0002; - HEADER: file = %O, define = yes, start = %S, size = $000D; - RAM: file = %O, define = yes, start = __HEADER_LAST__, size = __HIMEM__ - __OVERLAYSIZE__ - __STACKSIZE__ - __HEADER_LAST__; - MOVE: file = %O, start = __ZPSAVE_LOAD__, size = __HIMEM__ - __INIT_RUN__; - OVL1ADDR: file = "%O.1", start = __HIMEM2__ - __OVERLAYSIZE__, size = $0002; - OVL1: file = "%O.1", start = __HIMEM__ - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL2ADDR: file = "%O.2", start = __HIMEM2__ - __OVERLAYSIZE__, size = $0002; - OVL2: file = "%O.2", start = __HIMEM__ - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL3ADDR: file = "%O.3", start = __HIMEM2__ - __OVERLAYSIZE__, size = $0002; - OVL3: file = "%O.3", start = __HIMEM__ - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL4ADDR: file = "%O.4", start = __HIMEM2__ - __OVERLAYSIZE__, size = $0002; - OVL4: file = "%O.4", start = __HIMEM__ - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL5ADDR: file = "%O.5", start = __HIMEM2__ - __OVERLAYSIZE__, size = $0002; - OVL5: file = "%O.5", start = __HIMEM__ - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL6ADDR: file = "%O.6", start = __HIMEM2__ - __OVERLAYSIZE__, size = $0002; - OVL6: file = "%O.6", start = __HIMEM__ - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL7ADDR: file = "%O.7", start = __HIMEM2__ - __OVERLAYSIZE__, size = $0002; - OVL7: file = "%O.7", start = __HIMEM__ - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL8ADDR: file = "%O.8", start = __HIMEM2__ - __OVERLAYSIZE__, size = $0002; - OVL8: file = "%O.8", start = __HIMEM__ - __OVERLAYSIZE__, size = __OVERLAYSIZE__; - OVL9ADDR: file = "%O.9", start = __HIMEM2__ - __OVERLAYSIZE__, size = $0002; - OVL9: file = "%O.9", start = __HIMEM__ - __OVERLAYSIZE__, size = __OVERLAYSIZE__; + ZP: file = "", define = yes, start = $0002, size = $001A; + LOADADDR: file = %O, start = %S - 2, size = $0002; + HEADER: file = %O, define = yes, start = %S, size = $000D; + RAM: file = %O, define = yes, start = __HEADER_LAST__, size = __OVERLAYSTART__ - __STACKSIZE__ - __HEADER_LAST__; + MOVE: file = %O, start = __ZPSAVE_LOAD__, size = __HIMEM__ - __INIT_RUN__; + OVL1ADDR: file = "%O.1", start = __OVERLAYSTART__ - 2, size = $0002; + OVL1: file = "%O.1", start = __OVERLAYSTART__, size = __OVERLAYSIZE__; + OVL2ADDR: file = "%O.2", start = __OVERLAYSTART__ - 2, size = $0002; + OVL2: file = "%O.2", start = __OVERLAYSTART__, size = __OVERLAYSIZE__; + OVL3ADDR: file = "%O.3", start = __OVERLAYSTART__ - 2, size = $0002; + OVL3: file = "%O.3", start = __OVERLAYSTART__, size = __OVERLAYSIZE__; + OVL4ADDR: file = "%O.4", start = __OVERLAYSTART__ - 2, size = $0002; + OVL4: file = "%O.4", start = __OVERLAYSTART__, size = __OVERLAYSIZE__; + OVL5ADDR: file = "%O.5", start = __OVERLAYSTART__ - 2, size = $0002; + OVL5: file = "%O.5", start = __OVERLAYSTART__, size = __OVERLAYSIZE__; + OVL6ADDR: file = "%O.6", start = __OVERLAYSTART__ - 2, size = $0002; + OVL6: file = "%O.6", start = __OVERLAYSTART__, size = __OVERLAYSIZE__; + OVL7ADDR: file = "%O.7", start = __OVERLAYSTART__ - 2, size = $0002; + OVL7: file = "%O.7", start = __OVERLAYSTART__, size = __OVERLAYSIZE__; + OVL8ADDR: file = "%O.8", start = __OVERLAYSTART__ - 2, size = $0002; + OVL8: file = "%O.8", start = __OVERLAYSTART__, size = __OVERLAYSIZE__; + OVL9ADDR: file = "%O.9", start = __OVERLAYSTART__ - 2, size = $0002; + OVL9: file = "%O.9", start = __OVERLAYSTART__, size = __OVERLAYSIZE__; } SEGMENTS { ZEROPAGE: load = ZP, type = zp;