]> git.sur5r.net Git - cc65/blob - src/ld65/cfg/c128-overlay.cfg
0ca4a62ea90074a1ea7146e3877e4dd014a876a3
[cc65] / src / ld65 / cfg / c128-overlay.cfg
1 SYMBOLS {
2     __LOADADDR__:    type = import;
3     __EXEHDR__:      type = import;
4     __STACKSIZE__:   type = weak, value = $0800; # 2k stack
5     __OVERLAYSIZE__: type = weak, value = $1000; # 4k overlay
6 }
7 MEMORY {
8     ZP:       file = "", define = yes, start = $0002,                   size = $001A;
9     LOADADDR: file = %O,               start = $1BFF,                   size = $0002;
10     HEADER:   file = %O,               start = $1C01,                   size = $000C;
11     RAM:      file = %O, define = yes, start = $1C0D,                   size = $A3F3 - __OVERLAYSIZE__ - __STACKSIZE__;
12     OVL1:     file = "%O.1",           start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
13     OVL2:     file = "%O.2",           start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
14     OVL3:     file = "%O.3",           start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
15     OVL4:     file = "%O.4",           start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
16     OVL5:     file = "%O.5",           start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
17     OVL6:     file = "%O.6",           start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
18     OVL7:     file = "%O.7",           start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
19     OVL8:     file = "%O.8",           start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
20     OVL9:     file = "%O.9",           start = $C000 - __OVERLAYSIZE__, size = __OVERLAYSIZE__;
21 }
22 SEGMENTS {
23     LOADADDR: load = LOADADDR, type = ro;
24     EXEHDR:   load = HEADER,   type = ro;
25     STARTUP:  load = RAM,      type = ro;
26     LOWCODE:  load = RAM,      type = ro,                optional = yes;
27     INIT:     load = RAM,      type = ro,  define = yes, optional = yes;
28     CODE:     load = RAM,      type = ro;
29     RODATA:   load = RAM,      type = ro;
30     DATA:     load = RAM,      type = rw;
31     ZPSAVE:   load = RAM,      type = bss;
32     BSS:      load = RAM,      type = bss, define = yes;
33     ZEROPAGE: load = ZP,       type = zp;
34     OVERLAY1: load = OVL1,     type = ro,  define = yes, optional = yes;
35     OVERLAY2: load = OVL2,     type = ro,  define = yes, optional = yes;
36     OVERLAY3: load = OVL3,     type = ro,  define = yes, optional = yes;
37     OVERLAY4: load = OVL4,     type = ro,  define = yes, optional = yes;
38     OVERLAY5: load = OVL5,     type = ro,  define = yes, optional = yes;
39     OVERLAY6: load = OVL6,     type = ro,  define = yes, optional = yes;
40     OVERLAY7: load = OVL7,     type = ro,  define = yes, optional = yes;
41     OVERLAY8: load = OVL8,     type = ro,  define = yes, optional = yes;
42     OVERLAY9: load = OVL9,     type = ro,  define = yes, optional = yes;
43 }
44 FEATURES {
45     CONDES: segment = INIT,
46             type    = constructor,
47             label   = __CONSTRUCTOR_TABLE__,
48             count   = __CONSTRUCTOR_COUNT__;
49     CONDES: segment = RODATA,
50             type    = destructor,
51             label   = __DESTRUCTOR_TABLE__,
52             count   = __DESTRUCTOR_COUNT__;
53     CONDES: segment = RODATA,
54             type    = interruptor,
55             label   = __INTERRUPTOR_TABLE__,
56             count   = __INTERRUPTOR_COUNT__,
57             import  = __CALLIRQ__;
58 }