From: cuz Date: Thu, 21 Apr 2005 02:10:56 +0000 (+0000) Subject: Interruptor support for all systems. X-Git-Tag: V2.12.0~360 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fa3e713cc7a7b3f745e6787452557732d36a26d3;p=cc65 Interruptor support for all systems. New HEAP segment. Both changes by Greg King. git-svn-id: svn://svn.cc65.org/cc65/trunk@3481 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ld65/cfg/apple2-tgi.cfg b/src/ld65/cfg/apple2-tgi.cfg index 63f0cdbbf..22d1233b4 100644 --- a/src/ld65/cfg/apple2-tgi.cfg +++ b/src/ld65/cfg/apple2-tgi.cfg @@ -12,6 +12,7 @@ SEGMENTS { 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 { @@ -23,6 +24,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__ = $800; # 2K stack diff --git a/src/ld65/cfg/apple2.cfg b/src/ld65/cfg/apple2.cfg index 0aeb52aa2..fef2b4e79 100644 --- a/src/ld65/cfg/apple2.cfg +++ b/src/ld65/cfg/apple2.cfg @@ -12,6 +12,7 @@ SEGMENTS { 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 { @@ -23,6 +24,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__ = $800; # 2K stack diff --git a/src/ld65/cfg/atari.cfg b/src/ld65/cfg/atari.cfg index 4b90adb48..37a0c4431 100644 --- a/src/ld65/cfg/atari.cfg +++ b/src/ld65/cfg/atari.cfg @@ -11,6 +11,7 @@ SEGMENTS { 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; AUTOSTRT: load = RAM, type = ro; } @@ -23,6 +24,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__ = $800; # 2K stack diff --git a/src/ld65/cfg/atmos.cfg b/src/ld65/cfg/atmos.cfg index 76db35cf4..15ef471d5 100644 --- a/src/ld65/cfg/atmos.cfg +++ b/src/ld65/cfg/atmos.cfg @@ -12,6 +12,7 @@ SEGMENTS { 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 { @@ -23,6 +24,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__ = $800; # 2K stack diff --git a/src/ld65/cfg/bbc.cfg b/src/ld65/cfg/bbc.cfg index 1965d55e6..e1b2f771f 100644 --- a/src/ld65/cfg/bbc.cfg +++ b/src/ld65/cfg/bbc.cfg @@ -10,6 +10,7 @@ SEGMENTS { 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 { @@ -21,6 +22,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__ = $800; # 2K stack diff --git a/src/ld65/cfg/c128.cfg b/src/ld65/cfg/c128.cfg index 6e3afe559..295c0b1c5 100644 --- a/src/ld65/cfg/c128.cfg +++ b/src/ld65/cfg/c128.cfg @@ -10,6 +10,7 @@ SEGMENTS { 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 { @@ -21,7 +22,6 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - # condes functions with type 2 are called in the interrupt CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, diff --git a/src/ld65/cfg/c16.cfg b/src/ld65/cfg/c16.cfg index f19f3de07..0f1b35d5b 100644 --- a/src/ld65/cfg/c16.cfg +++ b/src/ld65/cfg/c16.cfg @@ -10,6 +10,7 @@ SEGMENTS { 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 { @@ -21,6 +22,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__ = $800; # 2K stack diff --git a/src/ld65/cfg/c64.cfg b/src/ld65/cfg/c64.cfg index c77de0597..2ed1ede15 100644 --- a/src/ld65/cfg/c64.cfg +++ b/src/ld65/cfg/c64.cfg @@ -10,6 +10,7 @@ SEGMENTS { 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 { @@ -21,7 +22,6 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - # condes functions with type 2 are called in the interrupt CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, diff --git a/src/ld65/cfg/cbm510.cfg b/src/ld65/cfg/cbm510.cfg index 153b10f03..2b15bb926 100644 --- a/src/ld65/cfg/cbm510.cfg +++ b/src/ld65/cfg/cbm510.cfg @@ -19,6 +19,7 @@ SEGMENTS { 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; } diff --git a/src/ld65/cfg/cbm610.cfg b/src/ld65/cfg/cbm610.cfg index a4a2519af..497969e1e 100644 --- a/src/ld65/cfg/cbm610.cfg +++ b/src/ld65/cfg/cbm610.cfg @@ -17,6 +17,7 @@ SEGMENTS { 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; } @@ -29,7 +30,6 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - # condes functions with type 2 are called in the interrupt CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, diff --git a/src/ld65/cfg/geos.cfg b/src/ld65/cfg/geos.cfg index ec2081ad8..53e4e09f6 100644 --- a/src/ld65/cfg/geos.cfg +++ b/src/ld65/cfg/geos.cfg @@ -12,6 +12,7 @@ SEGMENTS { 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; } @@ -24,6 +25,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__ = $400; # 1K stack diff --git a/src/ld65/cfg/lunix.cfg b/src/ld65/cfg/lunix.cfg index ebbf17c9c..84b721d88 100644 --- a/src/ld65/cfg/lunix.cfg +++ b/src/ld65/cfg/lunix.cfg @@ -22,6 +22,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } FILES { %O: format = o65; diff --git a/src/ld65/cfg/lynx.cfg b/src/ld65/cfg/lynx.cfg index 86b68cc9b..6c087c141 100644 --- a/src/ld65/cfg/lynx.cfg +++ b/src/ld65/cfg/lynx.cfg @@ -12,6 +12,7 @@ SEGMENTS { 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; diff --git a/src/ld65/cfg/nes.cfg b/src/ld65/cfg/nes.cfg index 9d2fe8f86..ebbc32bc7 100644 --- a/src/ld65/cfg/nes.cfg +++ b/src/ld65/cfg/nes.cfg @@ -43,6 +43,7 @@ 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; } @@ -55,6 +56,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { diff --git a/src/ld65/cfg/none.cfg b/src/ld65/cfg/none.cfg index f4864c151..79b3d4f88 100644 --- a/src/ld65/cfg/none.cfg +++ b/src/ld65/cfg/none.cfg @@ -9,6 +9,7 @@ SEGMENTS { 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 { @@ -20,6 +21,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__ = $800; # 2K stack diff --git a/src/ld65/cfg/osa65.cfg b/src/ld65/cfg/osa65.cfg index ee4d2e948..c926591c3 100644 --- a/src/ld65/cfg/osa65.cfg +++ b/src/ld65/cfg/osa65.cfg @@ -9,6 +9,7 @@ SEGMENTS { RODATA: load = COMBINED, type = ro; DATA: load = COMBINED, type = rw, define = yes; BSS: load = COMBINED, type = bss, define = yes; + HEAP: load = COMBINED, type = bss, optional = yes; ZEROPAGE: load = ZEROPAGE, type = zp; } FEATURES { @@ -20,12 +21,18 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } FILES { %O: format = o65; } FORMATS { - o65: os = osa65, type = small, extsym = "OSA2KERNAL", extsym = "LIB6502"; + o65: os = osa65, type = small, + import = OSA2KERNAL, + import = LIB6502; } SYMBOLS { __STACKSIZE__ = $800; # 2K stack diff --git a/src/ld65/cfg/pet.cfg b/src/ld65/cfg/pet.cfg index b02fc45ea..45727dcba 100644 --- a/src/ld65/cfg/pet.cfg +++ b/src/ld65/cfg/pet.cfg @@ -10,6 +10,7 @@ SEGMENTS { 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 { @@ -21,6 +22,10 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } SYMBOLS { __STACKSIZE__ = $800; # 2K stack diff --git a/src/ld65/cfg/plus4.cfg b/src/ld65/cfg/plus4.cfg index 0f41a05ae..9c434b714 100644 --- a/src/ld65/cfg/plus4.cfg +++ b/src/ld65/cfg/plus4.cfg @@ -10,6 +10,7 @@ SEGMENTS { 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 { @@ -21,7 +22,6 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - # condes functions with type 2 are called in the interrupt CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__, diff --git a/src/ld65/cfg/supervision.cfg b/src/ld65/cfg/supervision.cfg index 4037d7629..19c5572ff 100644 --- a/src/ld65/cfg/supervision.cfg +++ b/src/ld65/cfg/supervision.cfg @@ -19,6 +19,7 @@ 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; } @@ -31,4 +32,8 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/supervision128.cfg b/src/ld65/cfg/supervision128.cfg index f22aacdaa..fe0b4e39c 100644 --- a/src/ld65/cfg/supervision128.cfg +++ b/src/ld65/cfg/supervision128.cfg @@ -31,5 +31,6 @@ SEGMENTS { ZEROPAGE: load = RAM, type = bss, define = yes; DATA: load = RAM, type = bss, offset = $0200, define = yes; 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; } diff --git a/src/ld65/cfg/supervision16.cfg b/src/ld65/cfg/supervision16.cfg index 1947b8e55..1dbb8b520 100644 --- a/src/ld65/cfg/supervision16.cfg +++ b/src/ld65/cfg/supervision16.cfg @@ -19,6 +19,7 @@ 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 { @@ -30,5 +31,9 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; + CONDES: type = interruptor, + segment = RODATA, + label = __INTERRUPTOR_TABLE__, + count = __INTERRUPTOR_COUNT__; } diff --git a/src/ld65/cfg/supervision64.cfg b/src/ld65/cfg/supervision64.cfg index 3628ad969..d8eadb693 100644 --- a/src/ld65/cfg/supervision64.cfg +++ b/src/ld65/cfg/supervision64.cfg @@ -6,7 +6,7 @@ MEMORY { RAM: start = $0000, size = $2000; - VRAM: start = $4000, size = $2000; + VRAM: start = $4000, size = $2000; BANKROM1: start = $8000, size = $4000, fill = yes, fillval = $FF, file = %O; BANKROM2: start = $8000, size = $4000, fill = yes, fillval = $FF, file = %O; BANKROM3: start = $8000, size = $4000, fill = yes, fillval = $FF, file = %O; @@ -24,5 +24,6 @@ SEGMENTS { ZEROPAGE: load = RAM, type = bss, define = yes; DATA: load = RAM, type = bss, offset = $0200, define = yes; 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; } diff --git a/src/ld65/cfg/vic20.cfg b/src/ld65/cfg/vic20.cfg index c83981974..a31f936b9 100644 --- a/src/ld65/cfg/vic20.cfg +++ b/src/ld65/cfg/vic20.cfg @@ -10,6 +10,7 @@ SEGMENTS { 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 { @@ -21,7 +22,6 @@ FEATURES { type = destructor, label = __DESTRUCTOR_TABLE__, count = __DESTRUCTOR_COUNT__; - # condes functions with type 2 are called in the interrupt CONDES: segment = RODATA, type = interruptor, label = __INTERRUPTOR_TABLE__,