]> git.sur5r.net Git - cc65/blob - src/ld65/cfg/atari.cfg
add TRAILER; calculate RAM size depending on start address
[cc65] / src / ld65 / cfg / atari.cfg
1 FEATURES {
2     STARTADDRESS: default = $2E00;
3 }
4 SYMBOLS {
5     __STACKSIZE__ = $800;       # 2K stack
6 }
7 MEMORY {
8     ZP:      start = $0082, size = $007E, type = rw, define = yes;
9     HEADER:  start = $0000, size = $0006, file = %O;
10     RAM:     start = %S,    size = $BC20 - __STACKSIZE__ - %S, file = %O;
11     TRAILER: start = $0000, size = $0006, file = %O;
12 }
13 SEGMENTS {
14     EXEHDR:   load = HEADER,  type = ro;
15     LOWCODE:  load = RAM,     type = ro, define = yes, optional = yes;
16     INIT:     load = RAM,     type = ro,               optional = yes;
17     CODE:     load = RAM,     type = ro;
18     RODATA:   load = RAM,     type = ro;
19     DATA:     load = RAM,     type = rw;
20     BSS:      load = RAM,     type = bss, define = yes;
21     HEAP:     load = RAM,     type = bss, optional = yes; # must sit just below stack
22     ZEROPAGE: load = ZP,      type = zp;
23     EXTZP:    load = ZP,      type = zp,               optional = yes;
24     AUTOSTRT: load = TRAILER, type = ro;
25 }
26 FEATURES {
27     CONDES: segment = INIT,
28             type = constructor,
29             label = __CONSTRUCTOR_TABLE__,
30             count = __CONSTRUCTOR_COUNT__;
31     CONDES: segment = RODATA,
32             type = destructor,
33             label = __DESTRUCTOR_TABLE__,
34             count = __DESTRUCTOR_COUNT__;
35     CONDES: type = interruptor,
36             segment = RODATA,
37             label = __INTERRUPTOR_TABLE__,
38             count = __INTERRUPTOR_COUNT__;
39 }