]> git.sur5r.net Git - cc65/blob - cfg/apple2-hgr.cfg
Significantly simplified recently added linker config files.
[cc65] / cfg / apple2-hgr.cfg
1 # Configuration for programs including a hires screen (with 6KB LOWCODE)
2
3 FEATURES {
4     STARTADDRESS: default = $0803;
5 }
6 SYMBOLS {
7     __EXEHDR__:    type = import;
8     __STACKSIZE__: type = weak, value = $0800; # 2k stack
9     __HIMEM__:     type = weak, value = $9600; # Presumed RAM end
10     __LCADDR__:    type = weak, value = $D400; # Behind quit code
11     __LCSIZE__:    type = weak, value = $0C00; # Rest of bank two
12 }
13 MEMORY {
14     ZP:     file = "", define = yes, start = $0080,        size = $001A;
15     HEADER: file = %O,               start = %S - 4,       size = $0004;
16     MAIN:   file = %O, define = yes, start = %S,           size = __HIMEM__ - %S;
17     BSS:    file = "",               start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
18     LC:     file = "", define = yes, start = __LCADDR__,   size = __LCSIZE__;
19 }
20 SEGMENTS {
21     ZEROPAGE: load = ZP,             type = zp;
22     EXEHDR:   load = HEADER,         type = ro;
23     STARTUP:  load = MAIN,           type = ro;
24     LOWCODE:  load = MAIN,           type = ro,  optional = yes;
25     HGR:      load = MAIN,           type = rw,  optional = yes, start = $2000;
26     CODE:     load = MAIN,           type = ro                   start = $4000;
27     RODATA:   load = MAIN,           type = ro;
28     DATA:     load = MAIN,           type = rw;
29     INIT:     load = MAIN,           type = rw;
30     ONCE:     load = MAIN,           type = ro,  define   = yes;
31     LC:       load = MAIN, run = LC, type = ro,  optional = yes;
32     BSS:      load = BSS,            type = bss, define   = yes;
33 }
34 FEATURES {
35     CONDES: type    = constructor,
36             label   = __CONSTRUCTOR_TABLE__,
37             count   = __CONSTRUCTOR_COUNT__,
38             segment = ONCE;
39     CONDES: type    = destructor,
40             label   = __DESTRUCTOR_TABLE__,
41             count   = __DESTRUCTOR_COUNT__,
42             segment = RODATA;
43     CONDES: type    = interruptor,
44             label   = __INTERRUPTOR_TABLE__,
45             count   = __INTERRUPTOR_COUNT__,
46             segment = RODATA,
47             import  = __CALLIRQ__;
48 }