]> git.sur5r.net Git - cc65/blob - cfg/apple2enh-hgr.cfg
Added Apple II linker configs for programs including a hires screen.
[cc65] / cfg / apple2enh-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     __MAIN_START__: type = export, value = %S;
13     __MAIN_LAST__:  type = export, value = __HIGH_LAST__;
14 }
15 MEMORY {
16     ZP:     file = "", define = yes, start = $0080,        size = $001A;
17     HEADER: file = %O,               start = %S - 4,       size = $0004;
18     LOW:    file = %O, fill   = yes, start = %S,           size = $2000 - %S;
19     HGR:    file = %O, fill   = yes, start = $2000,        size = $2000;
20     HIGH:   file = %O, define = yes, start = $4000,        size = __HIMEM__ - $4000;
21     BSS:    file = "",               start = __ONCE_RUN__, size = __HIMEM__ - __STACKSIZE__ - __ONCE_RUN__;
22     LC:     file = "", define = yes, start = __LCADDR__,   size = __LCSIZE__;
23 }
24 SEGMENTS {
25     ZEROPAGE: load = ZP,             type = zp;
26     EXEHDR:   load = HEADER,         type = ro;
27     STARTUP:  load = LOW,            type = ro;
28     LOWCODE:  load = LOW,            type = ro,  optional = yes;
29     HGR:      load = HGR,            type = rw,  optional = yes;
30     CODE:     load = HIGH,           type = ro;
31     RODATA:   load = HIGH,           type = ro;
32     DATA:     load = HIGH,           type = rw;
33     INIT:     load = HIGH,           type = rw;
34     ONCE:     load = HIGH,           type = ro,  define   = yes;
35     LC:       load = HIGH, run = LC, type = ro,  optional = yes;
36     BSS:      load = BSS,            type = bss, define   = yes;
37 }
38 FEATURES {
39     CONDES: type    = constructor,
40             label   = __CONSTRUCTOR_TABLE__,
41             count   = __CONSTRUCTOR_COUNT__,
42             segment = ONCE;
43     CONDES: type    = destructor,
44             label   = __DESTRUCTOR_TABLE__,
45             count   = __DESTRUCTOR_COUNT__,
46             segment = RODATA;
47     CONDES: type    = interruptor,
48             label   = __INTERRUPTOR_TABLE__,
49             count   = __INTERRUPTOR_COUNT__,
50             segment = RODATA,
51             import  = __CALLIRQ__;
52 }