1 # Sample linker configuration for C programs using the Atari binary file support.
2 # Use with: cl65 -tatari -Catari-c-xex.cfg prog.c -o prog.xex
4 STARTADDRESS: default = $2000;
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
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;
26 initad = SYSCHKCHNK: __SYSTEM_CHECK__;
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;
43 CONDES: type = constructor,
44 label = __CONSTRUCTOR_TABLE__,
45 count = __CONSTRUCTOR_COUNT__,
47 CONDES: type = destructor,
48 label = __DESTRUCTOR_TABLE__,
49 count = __DESTRUCTOR_COUNT__,
51 CONDES: type = interruptor,
52 label = __INTERRUPTOR_TABLE__,
53 count = __INTERRUPTOR_COUNT__,