]> git.sur5r.net Git - cc65/blob - src/ld65/cfg/apple2.cfg
Move zpsave into its own segment to decrease the executable size.
[cc65] / src / ld65 / cfg / apple2.cfg
1 FEATURES {
2     STARTADDRESS: default = $0803;
3 }
4 MEMORY {
5     ZP:     start = $0080, size = $001A,                 define = yes;
6     HEADER: start = $0000, size = $0004,      file = %O;
7     RAM:    start = %S,    size = $9600 - %S, file = %O, define = yes;
8     MOVE:   start = $0000, size = $FFFF,      file = %O, define = yes;
9     LC:     start = $D400, size = $0C00,                 define = yes;
10 }
11 SEGMENTS {
12     ZEROPAGE: load = ZP,              type = zp;
13     EXEHDR:   load = HEADER,          type = ro;
14     STARTUP:  load = RAM,             type = ro;
15     LOWCODE:  load = RAM,             type = ro;
16     CODE:     load = RAM,             type = ro;
17     RODATA:   load = RAM,             type = ro;
18     DATA:     load = RAM,             type = rw;
19     ZPSAVE:   load = RAM,             type = bss, define   = yes;
20     BSS:      load = RAM,             type = bss, define   = yes;
21     INIT:     load = MOVE, run = RAM, type = ro,  define   = yes;
22     HIGHCODE: load = MOVE, run = LC,  type = ro,  optional = yes;
23 }
24 FEATURES {
25     CONDES: segment = INIT,
26             type    = constructor,
27             label   = __CONSTRUCTOR_TABLE__,
28             count   = __CONSTRUCTOR_COUNT__;
29     CONDES: segment = RODATA,
30             type    = destructor,
31             label   = __DESTRUCTOR_TABLE__,
32             count   = __DESTRUCTOR_COUNT__;
33     CONDES: type    = interruptor,
34             segment = RODATA,
35             label   = __INTERRUPTOR_TABLE__,
36             count   = __INTERRUPTOR_COUNT__;
37 }
38 SYMBOLS {
39     __STACKSIZE__ = $0800; # 2k stack
40 }