]> git.sur5r.net Git - cc65/blob - cfg/c64.cfg
Adapted, to the c64 target, the INIT-segment overlay scheme from the apple2 targets.
[cc65] / cfg / c64.cfg
1 FEATURES {
2     STARTADDRESS:  default = $0801;
3 }
4 SYMBOLS {
5     __LOADADDR__:  type = import;
6     __EXEHDR__:    type = import;
7     __STACKSIZE__: type = weak, value = $0800; # 2k stack
8     __HIMEM__:     type = weak, value = $D000;
9 }
10 MEMORY {
11     ZP:       file = "", define = yes, start = $0002,           size = $001A;
12     LOADADDR: file = %O,               start = %S - 2,          size = $0002;
13     HEADER:   file = %O, define = yes, start = %S,              size = $000D;
14     RAM:      file = %O,               start = __HEADER_LAST__, size = __HIMEM__ - __STACKSIZE__ - __HEADER_LAST__;
15     MOVE:     file = %O,               start = __ZPSAVE_LOAD__, size = __HIMEM__ - __INIT_RUN__;
16 }
17 SEGMENTS {
18     ZEROPAGE: load = ZP,              type = zp;
19     LOADADDR: load = LOADADDR,        type = ro;
20     EXEHDR:   load = HEADER,          type = ro;
21     STARTUP:  load = RAM,             type = ro;
22     LOWCODE:  load = RAM,             type = ro,                optional = yes;
23     CODE:     load = RAM,             type = ro;
24     RODATA:   load = RAM,             type = ro;
25     DATA:     load = RAM,             type = rw;
26     ZPSAVE:   load = RAM,             type = bss, define = yes;
27     BSS:      load = RAM,             type = bss, define = yes;
28     INIT:     load = MOVE, run = RAM, type = ro,  define = yes, optional = yes;
29 }
30 FEATURES {
31     CONDES: type    = constructor,
32             label   = __CONSTRUCTOR_TABLE__,
33             count   = __CONSTRUCTOR_COUNT__,
34             segment = INIT;
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 }