From: ol.sc Date: Thu, 14 Jun 2012 20:44:35 +0000 (+0000) Subject: Moved actual computation of DOS 3.3 header to linker configurations: X-Git-Tag: V2.14~352 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=95686b169e9d35c7a5cb37eb07355d2de23c6d9b;p=cc65 Moved actual computation of DOS 3.3 header to linker configurations: - This will allow for different "formulas". - This brings things together in one place. git-svn-id: svn://svn.cc65.org/cc65/trunk@5716 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/apple2/exehdr.s b/libsrc/apple2/exehdr.s index 5ebd6f7f1..f66b14a5c 100644 --- a/libsrc/apple2/exehdr.s +++ b/libsrc/apple2/exehdr.s @@ -6,15 +6,11 @@ ; .export __EXEHDR__ : absolute = 1 ; Linker referenced - .import __RAM_START__, __ZPSAVE_RUN__ ; Linker generated - .import __MOVE_START__, __MOVE_LAST__ ; Linker generated - - .linecont + + .import __LOADADDR__, __LOADSIZE__ ; Linker generated ; ------------------------------------------------------------------------ .segment "EXEHDR" - .addr __RAM_START__ ; Start address - .word __ZPSAVE_RUN__ - __RAM_START__ + \ - __MOVE_LAST__ - __MOVE_START__ ; Size + .addr __LOADADDR__ ; Load address + .word __LOADSIZE__ ; Load length diff --git a/src/ld65/cfg/apple2-dos33.cfg b/src/ld65/cfg/apple2-dos33.cfg index 091406e5c..644b0cc41 100644 --- a/src/ld65/cfg/apple2-dos33.cfg +++ b/src/ld65/cfg/apple2-dos33.cfg @@ -6,6 +6,9 @@ FEATURES { SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A; diff --git a/src/ld65/cfg/apple2-loader.cfg b/src/ld65/cfg/apple2-loader.cfg index 68556a277..8cf2b43f5 100644 --- a/src/ld65/cfg/apple2-loader.cfg +++ b/src/ld65/cfg/apple2-loader.cfg @@ -6,6 +6,9 @@ FEATURES { SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A; diff --git a/src/ld65/cfg/apple2-reboot.cfg b/src/ld65/cfg/apple2-reboot.cfg index 82b2ea59b..e10b0debb 100644 --- a/src/ld65/cfg/apple2-reboot.cfg +++ b/src/ld65/cfg/apple2-reboot.cfg @@ -7,6 +7,9 @@ FEATURES { SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A; diff --git a/src/ld65/cfg/apple2-system.cfg b/src/ld65/cfg/apple2-system.cfg index 187cc7907..51397f096 100644 --- a/src/ld65/cfg/apple2-system.cfg +++ b/src/ld65/cfg/apple2-system.cfg @@ -3,6 +3,9 @@ SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A; diff --git a/src/ld65/cfg/apple2.cfg b/src/ld65/cfg/apple2.cfg index 00d615644..16f6428ce 100644 --- a/src/ld65/cfg/apple2.cfg +++ b/src/ld65/cfg/apple2.cfg @@ -6,6 +6,9 @@ FEATURES { SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A; diff --git a/src/ld65/cfg/apple2enh-dos33.cfg b/src/ld65/cfg/apple2enh-dos33.cfg index 091406e5c..644b0cc41 100644 --- a/src/ld65/cfg/apple2enh-dos33.cfg +++ b/src/ld65/cfg/apple2enh-dos33.cfg @@ -6,6 +6,9 @@ FEATURES { SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A; diff --git a/src/ld65/cfg/apple2enh-loader.cfg b/src/ld65/cfg/apple2enh-loader.cfg index 68556a277..8cf2b43f5 100644 --- a/src/ld65/cfg/apple2enh-loader.cfg +++ b/src/ld65/cfg/apple2enh-loader.cfg @@ -6,6 +6,9 @@ FEATURES { SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A; diff --git a/src/ld65/cfg/apple2enh-reboot.cfg b/src/ld65/cfg/apple2enh-reboot.cfg index 82b2ea59b..e10b0debb 100644 --- a/src/ld65/cfg/apple2enh-reboot.cfg +++ b/src/ld65/cfg/apple2enh-reboot.cfg @@ -7,6 +7,9 @@ FEATURES { SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A; diff --git a/src/ld65/cfg/apple2enh-system.cfg b/src/ld65/cfg/apple2enh-system.cfg index 187cc7907..51397f096 100644 --- a/src/ld65/cfg/apple2enh-system.cfg +++ b/src/ld65/cfg/apple2enh-system.cfg @@ -3,6 +3,9 @@ SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A; diff --git a/src/ld65/cfg/apple2enh.cfg b/src/ld65/cfg/apple2enh.cfg index 00d615644..16f6428ce 100644 --- a/src/ld65/cfg/apple2enh.cfg +++ b/src/ld65/cfg/apple2enh.cfg @@ -6,6 +6,9 @@ FEATURES { SYMBOLS { __EXEHDR__: type = import; __STACKSIZE__: type = weak, value = $0800; # 2k stack + __LOADADDR__: type = weak, value = __RAM_START__; + __LOADSIZE__: type = weak, value = __ZPSAVE_RUN__ - __RAM_START__ + + __MOVE_LAST__ - __MOVE_START__; } MEMORY { ZP: file = "", define = yes, start = $0080, size = $001A;