]> git.sur5r.net Git - cc65/blob - cfg/c64-overlay.cfg
Merge pull request #1 from cc65/master
[cc65] / cfg / c64-overlay.cfg
1 FEATURES {
2     STARTADDRESS:     default = $0801;
3 }
4 SYMBOLS {
5     __LOADADDR__:     type = import;
6     __EXEHDR__:       type = import;
7     __OVERLAYADDR__:  type = import;
8     __STACKSIZE__:    type = weak,   value = $0800; # 2k stack
9     __OVERLAYSIZE__:  type = weak,   value = $1000; # 4k overlay
10     __HIMEM__:        type = weak,   value = $D000;
11     __OVERLAYSTART__: type = export, value = __HIMEM__ - __OVERLAYSIZE__;
12 }
13 MEMORY {
14     ZP:       file = "", define = yes, start = $0002,                size = $001A;
15     LOADADDR: file = %O,               start = %S - 2,               size = $0002;
16     HEADER:   file = %O, define = yes, start = %S,                   size = $000D;
17     MAIN:     file = %O, define = yes, start = __HEADER_LAST__,      size = __OVERLAYSTART__ - __STACKSIZE__ - __HEADER_LAST__;
18     MOVE:     file = %O,               start = __INITBSS_LOAD__,     size = __HIMEM__ - __BSS_RUN__;
19     INIT:     file = "",               start = __BSS_RUN__,          size = __HIMEM__ - __BSS_RUN__;
20     OVL1ADDR: file = "%O.1",           start = __OVERLAYSTART__ - 2, size = $0002;
21     OVL1:     file = "%O.1",           start = __OVERLAYSTART__,     size = __OVERLAYSIZE__;
22     OVL2ADDR: file = "%O.2",           start = __OVERLAYSTART__ - 2, size = $0002;
23     OVL2:     file = "%O.2",           start = __OVERLAYSTART__,     size = __OVERLAYSIZE__;
24     OVL3ADDR: file = "%O.3",           start = __OVERLAYSTART__ - 2, size = $0002;
25     OVL3:     file = "%O.3",           start = __OVERLAYSTART__,     size = __OVERLAYSIZE__;
26     OVL4ADDR: file = "%O.4",           start = __OVERLAYSTART__ - 2, size = $0002;
27     OVL4:     file = "%O.4",           start = __OVERLAYSTART__,     size = __OVERLAYSIZE__;
28     OVL5ADDR: file = "%O.5",           start = __OVERLAYSTART__ - 2, size = $0002;
29     OVL5:     file = "%O.5",           start = __OVERLAYSTART__,     size = __OVERLAYSIZE__;
30     OVL6ADDR: file = "%O.6",           start = __OVERLAYSTART__ - 2, size = $0002;
31     OVL6:     file = "%O.6",           start = __OVERLAYSTART__,     size = __OVERLAYSIZE__;
32     OVL7ADDR: file = "%O.7",           start = __OVERLAYSTART__ - 2, size = $0002;
33     OVL7:     file = "%O.7",           start = __OVERLAYSTART__,     size = __OVERLAYSIZE__;
34     OVL8ADDR: file = "%O.8",           start = __OVERLAYSTART__ - 2, size = $0002;
35     OVL8:     file = "%O.8",           start = __OVERLAYSTART__,     size = __OVERLAYSIZE__;
36     OVL9ADDR: file = "%O.9",           start = __OVERLAYSTART__ - 2, size = $0002;
37     OVL9:     file = "%O.9",           start = __OVERLAYSTART__,     size = __OVERLAYSIZE__;
38 }
39 SEGMENTS {
40     ZEROPAGE: load = ZP,               type = zp;
41     LOADADDR: load = LOADADDR,         type = ro;
42     EXEHDR:   load = HEADER,           type = ro;
43     STARTUP:  load = MAIN,             type = ro;
44     LOWCODE:  load = MAIN,             type = ro,                optional = yes;
45     CODE:     load = MAIN,             type = ro;
46     RODATA:   load = MAIN,             type = ro;
47     DATA:     load = MAIN,             type = rw;
48     INITBSS:  load = MAIN,             type = bss, define = yes;
49     BSS:      load = MAIN,             type = bss, define = yes;
50     INIT:     load = MOVE, run = INIT, type = ro,  define = yes;
51     OVL1ADDR: load = OVL1ADDR,         type = ro;
52     OVERLAY1: load = OVL1,             type = ro,  define = yes, optional = yes;
53     OVL2ADDR: load = OVL2ADDR,         type = ro;
54     OVERLAY2: load = OVL2,             type = ro,  define = yes, optional = yes;
55     OVL3ADDR: load = OVL3ADDR,         type = ro;
56     OVERLAY3: load = OVL3,             type = ro,  define = yes, optional = yes;
57     OVL4ADDR: load = OVL4ADDR,         type = ro;
58     OVERLAY4: load = OVL4,             type = ro,  define = yes, optional = yes;
59     OVL5ADDR: load = OVL5ADDR,         type = ro;
60     OVERLAY5: load = OVL5,             type = ro,  define = yes, optional = yes;
61     OVL6ADDR: load = OVL6ADDR,         type = ro;
62     OVERLAY6: load = OVL6,             type = ro,  define = yes, optional = yes;
63     OVL7ADDR: load = OVL7ADDR,         type = ro;
64     OVERLAY7: load = OVL7,             type = ro,  define = yes, optional = yes;
65     OVL8ADDR: load = OVL8ADDR,         type = ro;
66     OVERLAY8: load = OVL8,             type = ro,  define = yes, optional = yes;
67     OVL9ADDR: load = OVL9ADDR,         type = ro;
68     OVERLAY9: load = OVL9,             type = ro,  define = yes, optional = yes;
69 }
70 FEATURES {
71     CONDES: type    = constructor,
72             label   = __CONSTRUCTOR_TABLE__,
73             count   = __CONSTRUCTOR_COUNT__,
74             segment = INIT;
75     CONDES: type    = destructor,
76             label   = __DESTRUCTOR_TABLE__,
77             count   = __DESTRUCTOR_COUNT__,
78             segment = RODATA;
79     CONDES: type    = interruptor,
80             label   = __INTERRUPTOR_TABLE__,
81             count   = __INTERRUPTOR_COUNT__,
82             segment = RODATA,
83             import  = __CALLIRQ__;
84 }