]> git.sur5r.net Git - cc65/blob - cfg/atari-xex.cfg
Fixed _textcolor definition.
[cc65] / cfg / atari-xex.cfg
1 # Sample linker configuration for C programs using the Atari binary file support.
2 # Use with: cl65 -tatari -Catari-xex.cfg prog.c -o prog.xex
3 FEATURES {
4     STARTADDRESS: default = $2000;
5 }
6 SYMBOLS {
7     __SYSTEM_CHECK__:    type = import;  # force inclusion of "system check" load chunk
8     __STACKSIZE__:       type = weak, value = $0800; # 2k stack
9     __STARTADDRESS__:    type = export, value = %S;
10     __RESERVED_MEMORY__: type = weak, value = $0000;
11     __SYSCHKHDR__:       type = export, value = 0; # Disable system check header
12     __SYSCHKTRL__:       type = export, value = 0; # Disable system check trailer
13 }
14 MEMORY {
15     ZP:         file = "", define = yes, start = $0082, size = $007E;
16 # "system check" load chunk
17     SYSCHKCHNK: file = %O,               start = $2E00, size = $0300;
18 # "main program" load chunk
19     MAIN:       file = %O, define = yes, start = %S,    size = $BC20 - __STACKSIZE__ - __RESERVED_MEMORY__ - %S;
20 }
21 FILES {
22     %O: format = atari;
23 }
24 FORMATS {
25     atari: runad = start,
26            initad = SYSCHKCHNK: __SYSTEM_CHECK__;
27 }
28 SEGMENTS {
29     ZEROPAGE:  load = ZP,         type = zp;
30     EXTZP:     load = ZP,         type = zp,                optional = yes;
31     SYSCHK:    load = SYSCHKCHNK, type = rw,  define = yes, optional = yes;
32     STARTUP:   load = MAIN,       type = ro,  define = yes;
33     LOWBSS:    load = MAIN,       type = rw,                optional = yes;  # not zero initialized
34     LOWCODE:   load = MAIN,       type = ro,  define = yes, optional = yes;
35     ONCE:      load = MAIN,       type = ro,                optional = yes;
36     CODE:      load = MAIN,       type = ro,  define = yes;
37     RODATA:    load = MAIN,       type = ro;
38     DATA:      load = MAIN,       type = rw;
39     INIT:      load = MAIN,       type = rw,                optional = yes;
40     BSS:       load = MAIN,       type = bss, define = yes;
41 }
42 FEATURES {
43     CONDES: type    = constructor,
44             label   = __CONSTRUCTOR_TABLE__,
45             count   = __CONSTRUCTOR_COUNT__,
46             segment = ONCE;
47     CONDES: type    = destructor,
48             label   = __DESTRUCTOR_TABLE__,
49             count   = __DESTRUCTOR_COUNT__,
50             segment = RODATA;
51     CONDES: type    = interruptor,
52             label   = __INTERRUPTOR_TABLE__,
53             count   = __INTERRUPTOR_COUNT__,
54             segment = RODATA,
55             import  = __CALLIRQ__;
56 }