From 4b689107a4cb2a4d75827f294cde3a1646814890 Mon Sep 17 00:00:00 2001 From: "ol.sc" Date: Sun, 21 Mar 2010 17:10:17 +0000 Subject: [PATCH] - No more HEAP segment - RAM reduced by __STACKSIZE__ - Unified formatting git-svn-id: svn://svn.cc65.org/cc65/trunk@4633 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ld65/cfg/apple2-dos33.cfg | 20 +++++----- src/ld65/cfg/apple2-loader.cfg | 20 +++++----- src/ld65/cfg/apple2-reboot.cfg | 20 +++++----- src/ld65/cfg/apple2-system.cfg | 20 +++++----- src/ld65/cfg/apple2.cfg | 20 +++++----- src/ld65/cfg/apple2enh-dos33.cfg | 20 +++++----- src/ld65/cfg/apple2enh-loader.cfg | 20 +++++----- src/ld65/cfg/apple2enh-reboot.cfg | 20 +++++----- src/ld65/cfg/apple2enh-system.cfg | 20 +++++----- src/ld65/cfg/apple2enh.cfg | 20 +++++----- src/ld65/cfg/atari.cfg | 29 +++++++------- src/ld65/cfg/atmos.cfg | 40 +++++++++---------- src/ld65/cfg/bbc.cfg | 39 +++++++++---------- src/ld65/cfg/c128.cfg | 35 ++++++++--------- src/ld65/cfg/c16.cfg | 37 +++++++++--------- src/ld65/cfg/c64.cfg | 37 ++++++++---------- src/ld65/cfg/cbm510.cfg | 65 +++++++++++++++---------------- src/ld65/cfg/cbm610.cfg | 61 ++++++++++++++--------------- src/ld65/cfg/geos.cfg | 37 +++++++++--------- src/ld65/cfg/lunix.cfg | 52 +++++++++++++------------ src/ld65/cfg/lynx.cfg | 39 +++++++++---------- src/ld65/cfg/module.cfg | 5 +-- src/ld65/cfg/nes.cfg | 44 +++++++++------------ src/ld65/cfg/none.cfg | 35 ++++++++--------- src/ld65/cfg/pet.cfg | 38 +++++++++--------- src/ld65/cfg/plus4.cfg | 35 ++++++++--------- src/ld65/cfg/supervision-128k.cfg | 6 +-- src/ld65/cfg/supervision-16k.cfg | 22 +++++------ src/ld65/cfg/supervision-64k.cfg | 6 +-- src/ld65/cfg/supervision.cfg | 25 ++++++------ src/ld65/cfg/vic20-32k.cfg | 36 ++++++++--------- src/ld65/cfg/vic20.cfg | 39 ++++++++----------- 32 files changed, 461 insertions(+), 501 deletions(-) diff --git a/src/ld65/cfg/apple2-dos33.cfg b/src/ld65/cfg/apple2-dos33.cfg index 22168e4b2..8e532b2b7 100644 --- a/src/ld65/cfg/apple2-dos33.cfg +++ b/src/ld65/cfg/apple2-dos33.cfg @@ -3,12 +3,15 @@ FEATURES { STARTADDRESS: default = $0803; } +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = %O; - RAM: start = %S, size = $9600 - %S, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D000, size = $3000, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, define = yes, start = %S, size = $9600 - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D000, size = $3000; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -32,11 +35,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/apple2-loader.cfg b/src/ld65/cfg/apple2-loader.cfg index f79e0a8c0..51db3f7ad 100644 --- a/src/ld65/cfg/apple2-loader.cfg +++ b/src/ld65/cfg/apple2-loader.cfg @@ -3,12 +3,15 @@ FEATURES { STARTADDRESS: default = $0800; } +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = %O; - RAM: start = %S, size = $BF00 - %S, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D400, size = $0C00, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, define = yes, start = %S, size = $BF00 - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D400, size = $0C00; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -32,11 +35,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/apple2-reboot.cfg b/src/ld65/cfg/apple2-reboot.cfg index f49c74ec2..824ef264b 100644 --- a/src/ld65/cfg/apple2-reboot.cfg +++ b/src/ld65/cfg/apple2-reboot.cfg @@ -4,12 +4,15 @@ FEATURES { STARTADDRESS: default = $0800; } +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = %O; - RAM: start = %S, size = $BF00 - %S, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D000, size = $1000, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, define = yes, start = %S, size = $BF00 - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D000, size = $1000; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -33,11 +36,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/apple2-system.cfg b/src/ld65/cfg/apple2-system.cfg index 9a59946a0..7bf2f39b6 100644 --- a/src/ld65/cfg/apple2-system.cfg +++ b/src/ld65/cfg/apple2-system.cfg @@ -1,11 +1,14 @@ # Configuration for ProDOS 8 system programs (without the header) +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = ""; - RAM: start = $2000, size = $9F00, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D400, size = $0C00, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = "", start = $0000, size = $0004; + RAM: file = %O, define = yes, start = $2000, size = $9F00 - __STACKSIZE__; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D400, size = $0C00; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -29,11 +32,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/apple2.cfg b/src/ld65/cfg/apple2.cfg index 577caab1b..68c76502e 100644 --- a/src/ld65/cfg/apple2.cfg +++ b/src/ld65/cfg/apple2.cfg @@ -3,12 +3,15 @@ FEATURES { STARTADDRESS: default = $0803; } +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = %O; - RAM: start = %S, size = $9600 - %S, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D400, size = $0C00, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, define = yes, start = %S, size = $9600 - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D400, size = $0C00; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -32,11 +35,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/apple2enh-dos33.cfg b/src/ld65/cfg/apple2enh-dos33.cfg index 22168e4b2..8e532b2b7 100644 --- a/src/ld65/cfg/apple2enh-dos33.cfg +++ b/src/ld65/cfg/apple2enh-dos33.cfg @@ -3,12 +3,15 @@ FEATURES { STARTADDRESS: default = $0803; } +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = %O; - RAM: start = %S, size = $9600 - %S, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D000, size = $3000, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, define = yes, start = %S, size = $9600 - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D000, size = $3000; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -32,11 +35,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/apple2enh-loader.cfg b/src/ld65/cfg/apple2enh-loader.cfg index f79e0a8c0..51db3f7ad 100644 --- a/src/ld65/cfg/apple2enh-loader.cfg +++ b/src/ld65/cfg/apple2enh-loader.cfg @@ -3,12 +3,15 @@ FEATURES { STARTADDRESS: default = $0800; } +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = %O; - RAM: start = %S, size = $BF00 - %S, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D400, size = $0C00, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, define = yes, start = %S, size = $BF00 - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D400, size = $0C00; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -32,11 +35,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/apple2enh-reboot.cfg b/src/ld65/cfg/apple2enh-reboot.cfg index f49c74ec2..824ef264b 100644 --- a/src/ld65/cfg/apple2enh-reboot.cfg +++ b/src/ld65/cfg/apple2enh-reboot.cfg @@ -4,12 +4,15 @@ FEATURES { STARTADDRESS: default = $0800; } +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = %O; - RAM: start = %S, size = $BF00 - %S, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D000, size = $1000, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, define = yes, start = %S, size = $BF00 - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D000, size = $1000; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -33,11 +36,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/apple2enh-system.cfg b/src/ld65/cfg/apple2enh-system.cfg index 9a59946a0..7bf2f39b6 100644 --- a/src/ld65/cfg/apple2enh-system.cfg +++ b/src/ld65/cfg/apple2enh-system.cfg @@ -1,11 +1,14 @@ # Configuration for ProDOS 8 system programs (without the header) +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = ""; - RAM: start = $2000, size = $9F00, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D400, size = $0C00, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = "", start = $0000, size = $0004; + RAM: file = %O, define = yes, start = $2000, size = $9F00 - __STACKSIZE__; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D400, size = $0C00; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -29,11 +32,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/apple2enh.cfg b/src/ld65/cfg/apple2enh.cfg index 577caab1b..68c76502e 100644 --- a/src/ld65/cfg/apple2enh.cfg +++ b/src/ld65/cfg/apple2enh.cfg @@ -3,12 +3,15 @@ FEATURES { STARTADDRESS: default = $0803; } +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0080, size = $001A, define = yes; - HEADER: start = $0000, size = $0004, file = %O; - RAM: start = %S, size = $9600 - %S, file = %O, define = yes; - MOVE: start = $0000, size = $FFFF, file = %O, define = yes; - LC: start = $D400, size = $0C00, define = yes; + ZP: define = yes, start = $0080, size = $001A; + HEADER: file = %O, start = $0000, size = $0004; + RAM: file = %O, define = yes, start = %S, size = $9600 - __STACKSIZE__ - %S; + MOVE: file = %O, define = yes, start = $0000, size = $FFFF; + LC: define = yes, start = $D400, size = $0C00; } SEGMENTS { ZEROPAGE: load = ZP, type = zp; @@ -32,11 +35,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, + CONDES: segment = RODATA, + type = interruptor, label = __INTERRUPTOR_TABLE__, count = __INTERRUPTOR_COUNT__; } -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack -} diff --git a/src/ld65/cfg/atari.cfg b/src/ld65/cfg/atari.cfg index 1b8ee8b2a..88757512c 100644 --- a/src/ld65/cfg/atari.cfg +++ b/src/ld65/cfg/atari.cfg @@ -6,10 +6,10 @@ SYMBOLS { __RESERVED_MEMORY__: value = $0000, weak = yes; } MEMORY { - ZP: start = $0082, size = $007E, type = rw, define = yes; - HEADER: start = $0000, size = $0006, file = %O; - RAM: start = %S, size = $BC20 - __STACKSIZE__ - %S, file = %O; - TRAILER: start = $0000, size = $0006, file = %O; + ZP: define = yes, start = $0082, size = $007E; + HEADER: file = %O, start = $0000, size = $0006; + RAM: file = %O, start = %S, size = $BC20 - __STACKSIZE__ - %S; + TRAILER: file = %O, start = $0000, size = $0006; } SEGMENTS { EXEHDR: load = HEADER, type = ro; @@ -21,22 +21,21 @@ SEGMENTS { DATA: load = RAM, type = rw; ZPSAVE: load = RAM, type = bss, define = yes; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; EXTZP: load = ZP, type = zp, optional = yes; AUTOSTRT: load = TRAILER, type = ro; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/atmos.cfg b/src/ld65/cfg/atmos.cfg index b6a3704d5..a71fca5a2 100644 --- a/src/ld65/cfg/atmos.cfg +++ b/src/ld65/cfg/atmos.cfg @@ -1,38 +1,34 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $00E2, size = $001A, type = rw, define = yes; - TAPEHDR: start = $0000, size = $000E, type = ro, file = %O; - RAM: start = $0500, size = $9300, file = %O, define = yes; + ZP: define = yes, start = $00E2, size = $001A; + TAPEHDR: file = %O, type = ro, start = $0000, size = $000E; + RAM: file = %O, define = yes, start = $0500, size = $9300 - __STACKSIZE__; } SEGMENTS { TAPEHDR: load = TAPEHDR, type = ro; STARTUP: load = RAM, type = ro; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; + 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; ZPSAVE: load = RAM, type = bss; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } - - - diff --git a/src/ld65/cfg/bbc.cfg b/src/ld65/cfg/bbc.cfg index fa3069e65..f0d608f24 100644 --- a/src/ld65/cfg/bbc.cfg +++ b/src/ld65/cfg/bbc.cfg @@ -1,34 +1,31 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0070, size = $0020, type = rw, define = yes; - RAM: start = $0E00, size = $7200, file = %O; + ZP: define = yes, start = $0070, size = $0020; + RAM: file = %O, start = $0E00, size = $7200 - __STACKSIZE__; } SEGMENTS { - STARTUP: load = RAM, type = ro, define = yes; - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; + STARTUP: load = RAM, type = ro, define = yes; + 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; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } - - diff --git a/src/ld65/cfg/c128.cfg b/src/ld65/cfg/c128.cfg index 71c11cffd..9b0e7c754 100644 --- a/src/ld65/cfg/c128.cfg +++ b/src/ld65/cfg/c128.cfg @@ -1,35 +1,34 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0002, size = $001A, type = rw, define = yes; - HEADER: start = $1BFF, size = $000E, file = %O; - RAM: start = $1C0D, size = $A3F3, file = %O, define = yes; + ZP: define = yes, start = $0002, size = $001A; + HEADER: file = %O, start = $1BFF, size = $000E; + RAM: file = %O, define = yes, start = $1C0D, size = $A3F3 - __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; + 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; ZPSAVE: load = RAM, type = bss; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/c16.cfg b/src/ld65/cfg/c16.cfg index d2700fa37..7386b34cc 100644 --- a/src/ld65/cfg/c16.cfg +++ b/src/ld65/cfg/c16.cfg @@ -1,35 +1,34 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0002, size = $001A, type = rw, define = yes; - HEADER: start = $0FFF, size = $000E, file = %O; - RAM: start = $100D, size = $6FF3, file = %O; + ZP: define = yes, start = $0002, size = $001A; + HEADER: file = %O, start = $0FFF, size = $000E; + RAM: file = %O, start = $100D, size = $6FF3 - __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; + 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; ZPSAVE: load = RAM, type = bss; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/c64.cfg b/src/ld65/cfg/c64.cfg index 2ce94b6fe..f7a126e08 100644 --- a/src/ld65/cfg/c64.cfg +++ b/src/ld65/cfg/c64.cfg @@ -1,37 +1,34 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0002, size = $001A, type = rw, define = yes; - HEADER: start = $07FF, size = $000E, file = %O; - RAM: start = $080D, size = $C7F3, file = %O, define = yes; + ZP: define = yes, start = $0002, size = $001A; + HEADER: file = %O, start = $07FF, size = $000E; + RAM: file = %O, define = yes, start = $080D, size = $C7F3 - __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; + 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; ZPSAVE: load = RAM, type = bss; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } - - diff --git a/src/ld65/cfg/cbm510.cfg b/src/ld65/cfg/cbm510.cfg index 9c9d373f2..7a77930bf 100644 --- a/src/ld65/cfg/cbm510.cfg +++ b/src/ld65/cfg/cbm510.cfg @@ -1,42 +1,41 @@ +SYMBOLS { + __STACKSIZE__: value = $0781, weak = yes; # ~2k stack +} MEMORY { - HEADER: start = $0001, size = $0050, fill = yes, fillval = 0, type = rw, file = %O; - ZP: start = $0051, size = $00AD, fill = yes, fillval = 0, type = rw, file = %O, define = yes; - STARTUP: start = $00FE, size = $0102, fill = yes, fillval = 0, file = %O; - PAGE2: start = $0200, size = $0100, fill = yes, fillval = 0, file = %O; - PAGE3: start = $0300, size = $0100, fill = yes, fillval = 0, file = %O; - RAM: start = $0400, size = $DC00, file = %O; - CHARRAM: start = $E000, size = $1000, define = yes, file = ""; - VIDRAM: start = $F000, size = $0400, define = yes, file = ""; + HEADER: file = %O, start = $0001, size = $0050, fill = yes; + ZP: file = %O, define = yes, start = $0051, size = $00AD, fill = yes; + STARTUP: file = %O, start = $00FE, size = $0102, fill = yes; + PAGE2: file = %O, start = $0200, size = $0100, fill = yes; + PAGE3: file = %O, start = $0300, size = $0100, fill = yes; + RAM: file = %O, start = $0400, size = $DC00 - __STACKSIZE__; + CHARRAM: file = "", define = yes, start = $E000, size = $1000; + VIDRAM: file = "", define = yes, start = $F000, size = $0400; } SEGMENTS { - EXEHDR: load = HEADER, type = rw; - STARTUP: load = STARTUP, type = rw; - 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; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = rw, define = yes; + EXEHDR: load = HEADER, type = rw; + STARTUP: load = STARTUP, type = rw; + 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; + 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; + EXTZP: load = ZP, type = rw, define = yes; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0781, weak = yes; # ~2k stack + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/cbm610.cfg b/src/ld65/cfg/cbm610.cfg index 79dd77580..7df52e845 100644 --- a/src/ld65/cfg/cbm610.cfg +++ b/src/ld65/cfg/cbm610.cfg @@ -1,40 +1,39 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - HEADER: start = $0001, size = $0050, type = rw, fill = yes, fillval = 0, file = %O; - ZP: start = $0051, size = $00AD, type = rw, define = yes, fill = yes, fillval = 0, file = %O; - STARTUP: start = $00FE, size = $0102, fill = yes, fillval = 0, file = %O; - PAGE2: start = $0200, size = $0100, fill = yes, fillval = 0, file = %O; - PAGE3: start = $0300, size = $0100, fill = yes, fillval = 0, file = %O; - RAM: start = $0400, size = $FAAE, file = %O; + HEADER: file = %O, start = $0001, size = $0050, fill = yes; + ZP: file = %O, define = yes, start = $0051, size = $00AD, fill = yes; + STARTUP: file = %O, start = $00FE, size = $0102, fill = yes; + PAGE2: file = %O, start = $0200, size = $0100, fill = yes; + PAGE3: file = %O, start = $0300, size = $0100, fill = yes; + RAM: file = %O, start = $0400, size = $FAAE - __STACKSIZE__; } SEGMENTS { - EXEHDR: load = HEADER, type = rw; - STARTUP: load = STARTUP, type = rw; - 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; - CODE: load = RAM, type = ro; - RODATA: load = RAM, type = ro; - DATA: load = RAM, type = rw; - BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack - ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = rw, define = yes; + EXEHDR: load = HEADER, type = rw; + STARTUP: load = STARTUP, type = rw; + 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; + 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; + EXTZP: load = ZP, type = rw, define = yes; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/geos.cfg b/src/ld65/cfg/geos.cfg index 05673385d..d38153b8f 100644 --- a/src/ld65/cfg/geos.cfg +++ b/src/ld65/cfg/geos.cfg @@ -1,35 +1,34 @@ +SYMBOLS { + __STACKSIZE__: value = $0400, weak = yes; # 1k stack +} MEMORY { - ZP: start = $0058, size = $0028, type = rw, define = yes; - HEADER: start = $0204, size = $01FC, file = %O; - RAM: start = $0400, size = $5C00, define = yes, file = %O; + ZP: define = yes, start = $0058, size = $0028; + HEADER: file = %O, start = $0204, size = $01FC; + RAM: file = %O, define = yes, start = $0400, size = $5C00 - __STACKSIZE__; } SEGMENTS { HEADER: 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; + 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; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; EXTZP: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0400, weak = yes; # 1k stack + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/lunix.cfg b/src/ld65/cfg/lunix.cfg index 946e405f6..8e29d634d 100644 --- a/src/ld65/cfg/lunix.cfg +++ b/src/ld65/cfg/lunix.cfg @@ -1,41 +1,43 @@ # ld65 Linker-configuration for LUnix, Next Generation. + +SYMBOLS { + __HEAPSIZE__: value = $2000, weak = yes; # 8k heap [temporary, until LUnix malloc() exists] + __STACKSIZE__: value = $0400, weak = yes; # 1k stack (do typical LUnix apps. need 2k?) +} MEMORY { - ZP: start = $0080, size = $0040; # userzp buffer - RAM: start = %S, size = $7600; + ZP: start = $0080, size = $0040; + RAM: start = %S, size = $7600 - __STACKSIZE__; } SEGMENTS { - ZEROPAGE: load = ZP, type = zp, define = yes; # Pseudo-registers - STARTUP: load = RAM, type = ro; # First initiation code - LOWCODE: load = RAM, type = ro, optional = yes; # Legacy from other platforms - INIT: load = RAM, type = ro, define = yes, optional = yes; - CODE: load = RAM, type = ro; # Program - RODATA: load = RAM, type = ro; # Literals, constants - DATA: load = RAM, type = rw; # Initialized variables - BSS: load = RAM, type = bss, define = yes; # Uninitialized variables + 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 + CODE: load = RAM, type = ro; # Program + RODATA: load = RAM, type = ro; # Literals, constants + DATA: load = RAM, type = rw; # Initialized variables + BSS: load = RAM, type = bss, define = yes; # Uninitialized variables } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } FILES { %O: format = o65; } FORMATS { - o65: os = lunix, type = small, + o65: os = lunix, + type = small, export = main, # Program entry-point import = LUNIXKERNEL; # Kernel entry-points } -SYMBOLS { - __HEAPSIZE__: value = $2000, weak = yes; # 8k heap [temporary, until LUnix malloc() exists] - __STACKSIZE__: value = $0400, weak = yes; # 1k stack (do typical LUnix apps. need 2k?) -} diff --git a/src/ld65/cfg/lynx.cfg b/src/ld65/cfg/lynx.cfg index 8aee49f2c..c60482472 100644 --- a/src/ld65/cfg/lynx.cfg +++ b/src/ld65/cfg/lynx.cfg @@ -1,36 +1,35 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0000, size = $0100, type = rw, define = yes; - HEADER: start = $0000, size = $000A, file = %O; - RAM: start = $0400, size = $BC38, define = yes, file = %O; + ZP: define = yes, start = $0000, size = $0100; + HEADER: file = %O, start = $0000, size = $000A; + RAM: file = %O, define = yes, start = $0400, size = $BC38 - __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; + 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; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; - EXTZP: load = ZP, type = zp, optional = yes; - APPZP: load = ZP, type = zp, optional = yes; + EXTZP: load = ZP, type = zp, optional = yes; + APPZP: load = ZP, type = zp, optional = yes; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/module.cfg b/src/ld65/cfg/module.cfg index e36bc5f96..72db8c79b 100644 --- a/src/ld65/cfg/module.cfg +++ b/src/ld65/cfg/module.cfg @@ -16,7 +16,6 @@ FILES { %O: format = o65; } FORMATS { - o65: os = cc65, type = small; + o65: os = cc65, + type = small; } - - diff --git a/src/ld65/cfg/nes.cfg b/src/ld65/cfg/nes.cfg index 2e2bb108e..be9ee94b5 100644 --- a/src/ld65/cfg/nes.cfg +++ b/src/ld65/cfg/nes.cfg @@ -1,37 +1,37 @@ +SYMBOLS { + __STACKSIZE__: value = $0300, weak = yes; # 3 pages stack +} MEMORY { - - ZP: start = $02, size = $1A, type = rw, define = yes; + ZP: start = $0002, size = $001A, type = rw, define = yes; # INES Cartridge Header - HEADER: start = $0, size = $10, file = %O ,fill = yes; + HEADER: start = $0000, size = $0010, file = %O, fill = yes; # 2 16K ROM Banks # - startup # - code # - rodata # - data (load) - ROM0: start = $8000, size = $7ff4, file = %O ,fill = yes, define = yes; + ROM0: start = $8000, size = $7FF4, file = %O, fill = yes, define = yes; # Hardware Vectors at End of 2nd 8K ROM - ROMV: start = $fff6, size = $c, file = %O, fill = yes; + ROMV: start = $FFF6, size = $000C, file = %O, fill = yes; # 1 8k CHR Bank - ROM2: start = $0000, size = $2000, file = %O, fill = yes; + ROM2: start = $0000, size = $2000, file = %O, fill = yes; # standard 2k SRAM (-zeropage) # $0100-$0200 cpu stack # $0200-$0500 3 pages for ppu memory write buffer # $0500-$0800 3 pages for cc65 parameter stack - SRAM: start = $0500, size = $0300, define = yes; + SRAM: start = $0500, size = __STACKSIZE__, define = yes; # additional 8K SRAM Bank # - data (run) # - bss # - heap RAM: start = $6000, size = $2000, define = yes; - } - SEGMENTS { HEADER: load = HEADER, type = ro; STARTUP: load = ROM0, type = ro, define = yes; @@ -43,25 +43,19 @@ SEGMENTS { VECTORS: load = ROMV, type = rw; CHARS: load = ROM2, type = rw; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; ZEROPAGE: load = ZP, type = zp; } - FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} - -SYMBOLS { - __STACKSIZE__: value = $0300, weak = yes; # 3 pages stack + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/none.cfg b/src/ld65/cfg/none.cfg index 7d89bcf6c..3cbc2d700 100644 --- a/src/ld65/cfg/none.cfg +++ b/src/ld65/cfg/none.cfg @@ -1,31 +1,30 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0000, size = $0001F, type = rw, define = yes; - RAM: start = %S, size = $10000, file = %O; + ZP: define = yes, start = $0000, size = $0001F; + RAM: file = %O, start = %S, size = $10000 - __STACKSIZE__; } SEGMENTS { - LOWCODE: load = RAM, type = ro, optional = yes; - INIT: load = RAM, type = ro, define = yes, optional = yes; + LOWCODE: load = RAM, type = ro, optional = yes; + INIT: 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; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/pet.cfg b/src/ld65/cfg/pet.cfg index 33990c4f4..6d224604e 100644 --- a/src/ld65/cfg/pet.cfg +++ b/src/ld65/cfg/pet.cfg @@ -1,36 +1,34 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0055, size = $001A, type = rw, define = yes; - HEADER: start = $03FF, size = $000E, file = %O; - RAM: start = $040D, size = $7BF3, file = %O; + ZP: define = yes, start = $0055, size = $001A; + HEADER: file = %O, start = $03FF, size = $000E; + RAM: file = %O, start = $040D, size = $7BF3 - __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; + 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; ZPSAVE: load = RAM, type = bss; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } - diff --git a/src/ld65/cfg/plus4.cfg b/src/ld65/cfg/plus4.cfg index 4b098cc79..903a9debb 100644 --- a/src/ld65/cfg/plus4.cfg +++ b/src/ld65/cfg/plus4.cfg @@ -1,35 +1,34 @@ +SYMBOLS { + __STACKSIZE__: value = $0800, weak = yes; # 2k stack +} MEMORY { - ZP: start = $0002, size = $001A, type = rw, define = yes; - HEADER: start = $0FFF, size = $000E, file = %O; - RAM: start = $100D, size = $ECF3, file = %O; + ZP: define = yes, start = $0002, size = $001A; + HEADER: file = %O, start = $0FFF, size = $000E; + RAM: file = %O, start = $100D, size = $ECF3 - __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; + 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; ZPSAVE: load = RAM, type = bss; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0800, weak = yes; # 2k stack + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/supervision-128k.cfg b/src/ld65/cfg/supervision-128k.cfg index fe0b4e39c..7f3ee51cc 100644 --- a/src/ld65/cfg/supervision-128k.cfg +++ b/src/ld65/cfg/supervision-128k.cfg @@ -16,7 +16,6 @@ MEMORY { BANKROM7: start = $8000, size = $4000, fill = yes, fillval = $FF, file = %O; ROM: start = $c000, size = $4000, fill = yes, fillval = $FF, file = %O; } - SEGMENTS { LOWCODE: load = ROM, type = ro, optional = yes; INIT: load = ROM, type = ro, define = yes, optional = yes; @@ -29,8 +28,7 @@ SEGMENTS { BANK6: load = BANKROM6, type = ro; BANK7: load = BANKROM7, type = ro; ZEROPAGE: load = RAM, type = bss, define = yes; - DATA: load = RAM, type = bss, offset = $0200, define = yes; + DATA: load = RAM, type = bss, define = yes, offset = $0200; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack - VECTOR: load = ROM, type = ro, offset = $3FFA; + VECTOR: load = ROM, type = ro, offset = $3FFA; } diff --git a/src/ld65/cfg/supervision-16k.cfg b/src/ld65/cfg/supervision-16k.cfg index 1dbb8b520..5ec5db54e 100644 --- a/src/ld65/cfg/supervision-16k.cfg +++ b/src/ld65/cfg/supervision-16k.cfg @@ -19,21 +19,19 @@ SEGMENTS { FFF0: load = ROM, type = ro, offset = $3FF0; VECTOR: load = ROM, type = ro, offset = $3FFA; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp, define = yes; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } - diff --git a/src/ld65/cfg/supervision-64k.cfg b/src/ld65/cfg/supervision-64k.cfg index d8eadb693..4cafdecae 100644 --- a/src/ld65/cfg/supervision-64k.cfg +++ b/src/ld65/cfg/supervision-64k.cfg @@ -12,7 +12,6 @@ MEMORY { BANKROM3: start = $8000, size = $4000, fill = yes, fillval = $FF, file = %O; ROM: start = $C000, size = $4000, fill = yes, fillval = $FF, file = %O; } - SEGMENTS { LOWCODE: load = ROM, type = ro, optional = yes; INIT: load = ROM, type = ro, define = yes, optional = yes; @@ -22,8 +21,7 @@ SEGMENTS { BANK2: load = BANKROM2, type = ro; BANK3: load = BANKROM3, type = ro; ZEROPAGE: load = RAM, type = bss, define = yes; - DATA: load = RAM, type = bss, offset = $0200, define = yes; + DATA: load = RAM, type = bss, define = yes, offset = $0200; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack - VECTOR: load = ROM, type = ro, offset = $3FFA; + VECTOR: load = ROM, type = ro, offset = $3FFA; } diff --git a/src/ld65/cfg/supervision.cfg b/src/ld65/cfg/supervision.cfg index 19c5572ff..22bfa446e 100644 --- a/src/ld65/cfg/supervision.cfg +++ b/src/ld65/cfg/supervision.cfg @@ -7,9 +7,8 @@ MEMORY { CPUSTACK: start = $0100, size = $0100; RAM: start = $0200, size = $1E00, define = yes; VRAM: start = $4000, size = $2000; - ROM: start = $8000, size = $8000, fill = yes, fillval = $ff, file = %O, define = yes; + ROM: start = $8000, size = $8000, fill = yes, fillval = $FF, file = %O, define = yes; } - SEGMENTS { LOWCODE: load = ROM, type = ro, optional = yes; INIT: load = ROM, type = ro, define = yes, optional = yes; @@ -19,21 +18,19 @@ SEGMENTS { FFF0: load = ROM, type = ro, offset = $7FF0; VECTOR: load = ROM, type = ro, offset = $7FFA; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp, define = yes; } - FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; + CONDES: segment = RODATA, + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; - CONDES: type = interruptor, - segment = RODATA, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/vic20-32k.cfg b/src/ld65/cfg/vic20-32k.cfg index 666cd15ea..1aeffcc88 100644 --- a/src/ld65/cfg/vic20-32k.cfg +++ b/src/ld65/cfg/vic20-32k.cfg @@ -1,37 +1,37 @@ # Memory configuration for the VIC-20 with 32K RAM Cartridge # Contributed by Stefan Haubenthal + +SYMBOLS { + __STACKSIZE__: value = $0400, weak = yes; # 1k stack +} MEMORY { - ZP: start = $0002, size = $001A, type = rw, define = yes; - HEADER: start = $11FF, size = $000E, file = %O; - RAM: start = $120D, size = $6DF3, file = %O, define = yes; + ZP: define = yes, start = $0002, size = $001A; + HEADER: file = %O, start = $11FF, size = $000E; + RAM: file = %O, define = yes, start = $120D, size = $6DF3 - __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; + 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; ZPSAVE: load = RAM, type = bss; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0400, weak = yes; # 1k stack + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/vic20.cfg b/src/ld65/cfg/vic20.cfg index 03eba699d..e4afc6fab 100644 --- a/src/ld65/cfg/vic20.cfg +++ b/src/ld65/cfg/vic20.cfg @@ -1,39 +1,34 @@ +SYMBOLS { + __STACKSIZE__: value = $0400, weak = yes; # 1k stack +} MEMORY { - ZP: start = $0002, size = $001A, type = rw, define = yes; - HEADER: start = $0FFF, size = $000E, file = %O; - RAM: start = $100D, size = $0DF3, file = %O, define = yes; + ZP: define = yes, start = $0002, size = $001A; + HEADER: file = %O, start = $0FFF, size = $000E; + RAM: file = %O, define = yes, start = $100D, size = $0DF3 - __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; + 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; ZPSAVE: load = RAM, type = bss; BSS: load = RAM, type = bss, define = yes; - HEAP: load = RAM, type = bss, optional = yes; # must sit just below stack ZEROPAGE: load = ZP, type = zp; } FEATURES { CONDES: segment = INIT, - type = constructor, - label = __CONSTRUCTOR_TABLE__, - count = __CONSTRUCTOR_COUNT__; + type = constructor, + label = __CONSTRUCTOR_TABLE__, + count = __CONSTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = destructor, - label = __DESTRUCTOR_TABLE__, - count = __DESTRUCTOR_COUNT__; + type = destructor, + label = __DESTRUCTOR_TABLE__, + count = __DESTRUCTOR_COUNT__; CONDES: segment = RODATA, - type = interruptor, - label = __INTERRUPTOR_TABLE__, - count = __INTERRUPTOR_COUNT__; -} -SYMBOLS { - __STACKSIZE__: value = $0400, weak = yes; # 1k stack - + type = interruptor, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } - - - -- 2.39.5