1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-24 11:31:31 +00:00

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
This commit is contained in:
cuz 2005-04-21 02:10:56 +00:00
parent deab71739a
commit fa3e713cc7
23 changed files with 82 additions and 7 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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__,

View File

@ -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

View File

@ -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__,

View File

@ -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;
}

View File

@ -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__,

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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__,

View File

@ -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__;
}

View File

@ -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;
}

View File

@ -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__;
}

View File

@ -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;
}

View File

@ -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__,