1# Configuration for ProDOS 8 system programs (allowing for 3KB in LC)
2
3SYMBOLS {
4    __EXEHDR__:    type = import;
5    __FILETYPE__:  type = weak, value = $00FF; # ProDOS file type
6    __STACKSIZE__: type = weak, value = $0800; # 2k stack
7    __LCADDR__:    type = weak, value = $D400; # Behind quit code
8    __LCSIZE__:    type = weak, value = $0C00; # Rest of bank two
9}
10MEMORY {
11    ZP:     file = "", define = yes, start = $0080,         size = $001A;
12    HEADER: file = %O,               start = $2000 - $003A, size = $003A;
13    MAIN:   file = %O, define = yes, start = $2000,         size = $BF00 - $2000;
14    BSS:    file = "",               start = __ONCE_RUN__,  size = $BF00 - __STACKSIZE__ - __ONCE_RUN__;
15    LC:     file = "", define = yes, start = __LCADDR__,    size = __LCSIZE__;
16}
17SEGMENTS {
18    ZEROPAGE: load = ZP,             type = zp;
19    EXEHDR:   load = HEADER,         type = ro,  optional = yes;
20    STARTUP:  load = MAIN,           type = ro;
21    LOWCODE:  load = MAIN,           type = ro,  optional = yes;
22    CODE:     load = MAIN,           type = ro;
23    RODATA:   load = MAIN,           type = ro;
24    DATA:     load = MAIN,           type = rw;
25    INIT:     load = MAIN,           type = rw;
26    ONCE:     load = MAIN,           type = ro,  define   = yes;
27    LC:       load = MAIN, run = LC, type = ro,  optional = yes;
28    BSS:      load = BSS,            type = bss, define   = yes;
29}
30FEATURES {
31    CONDES: type    = constructor,
32            label   = __CONSTRUCTOR_TABLE__,
33            count   = __CONSTRUCTOR_COUNT__,
34            segment = ONCE;
35    CONDES: type    = destructor,
36            label   = __DESTRUCTOR_TABLE__,
37            count   = __DESTRUCTOR_COUNT__,
38            segment = RODATA;
39    CONDES: type    = interruptor,
40            label   = __INTERRUPTOR_TABLE__,
41            count   = __INTERRUPTOR_COUNT__,
42            segment = RODATA,
43            import  = __CALLIRQ__;
44}
45