mirror of
https://github.com/cc65/cc65.git
synced 2024-11-01 11:04:34 +00:00
e3cbc7e8b8
Make the same changes to the Apple II that were done with 0ee9b2e446
to the C64.
Notes:
- The startup code deliberately doesn't make use of symbols defined for the LC segment as that segment is optional.
- The <...>-asm.cfg configs move the segment BSS to an own memory area BSS although this doesn't seem necessary. However the benefit is that the size of the memeory area MAIN is identical to the number of bytes loaded from disk into RAM. To keep this an invariant for all Apple II configs allows to simplify the EXEHDR to just refer to the symbols defined for MAIN.
48 lines
1.9 KiB
INI
48 lines
1.9 KiB
INI
# Default configuration (allowing for 3KB in LC)
|
|
|
|
FEATURES {
|
|
STARTADDRESS: default = $0803;
|
|
}
|
|
SYMBOLS {
|
|
__EXEHDR__: type = import;
|
|
__STACKSIZE__: type = weak, value = $0800; # 2k stack
|
|
__HIMEM__: type = weak, value = $9600; # Presumed RAM end
|
|
__LCADDR__: type = weak, value = $D400; # Behind quit code
|
|
__LCSIZE__: type = weak, value = $0C00; # Rest of bank two
|
|
}
|
|
MEMORY {
|
|
ZP: file = "", define = yes, start = $0080, size = $001A;
|
|
HEADER: file = %O, start = %S - 4, size = $0004;
|
|
MAIN: file = %O, define = yes, start = %S, size = __HIMEM__ - %S;
|
|
BSS: file = "", start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
|
|
LC: file = "", define = yes, start = __LCADDR__, size = __LCSIZE__;
|
|
}
|
|
SEGMENTS {
|
|
ZEROPAGE: load = ZP, type = zp;
|
|
EXEHDR: load = HEADER, type = ro;
|
|
STARTUP: load = MAIN, type = ro;
|
|
LOWCODE: load = MAIN, type = ro, optional = yes;
|
|
CODE: load = MAIN, type = ro;
|
|
RODATA: load = MAIN, type = ro;
|
|
DATA: load = MAIN, type = rw;
|
|
INIT: load = MAIN, type = rw;
|
|
ONCE: load = MAIN, type = ro, define = yes;
|
|
LC: load = MAIN, run = LC, type = ro, optional = yes;
|
|
BSS: load = BSS, type = bss, define = yes;
|
|
}
|
|
FEATURES {
|
|
CONDES: type = constructor,
|
|
label = __CONSTRUCTOR_TABLE__,
|
|
count = __CONSTRUCTOR_COUNT__,
|
|
segment = ONCE;
|
|
CONDES: type = destructor,
|
|
label = __DESTRUCTOR_TABLE__,
|
|
count = __DESTRUCTOR_COUNT__,
|
|
segment = RODATA;
|
|
CONDES: type = interruptor,
|
|
label = __INTERRUPTOR_TABLE__,
|
|
count = __INTERRUPTOR_COUNT__,
|
|
segment = RODATA,
|
|
import = __CALLIRQ__;
|
|
}
|