]> git.sur5r.net Git - cc65/blob - cfg/pce.cfg
adb420f32bf70285f3ad12e8f7bcda21c11fe468
[cc65] / cfg / pce.cfg
1 # linker config to produce simple NEC PC-Engine cartridge (.pce)
2
3 SYMBOLS {
4         __STACKSIZE__: type = weak, value = $0300; # 3 pages stack
5 }
6
7 MEMORY {
8         # FIXME: is this correct? the first 3? bytes cant be used?
9         ZP:  start = $03, size = $1A, type = rw, define = yes;
10
11         # reset-bank and hardware vectors
12         ROM0: start = $e000, size = $1ff6, file = %O ,fill = yes, define = yes;
13         ROMV: start = $fff6, size = $a, file = %O,fill = yes;
14
15         # first RAM page (also contains stack and zeropage)
16         RAM: start = $2200, size = $1e00, define = yes;
17 }
18
19 SEGMENTS {
20         STARTUP: load = ROM0, type = ro, define = yes;
21         INIT:    load = ROM0, type = ro, define = yes, optional = yes;
22         CODE:    load = ROM0, type = ro, define = yes;
23         RODATA:  load = ROM0, type = ro, define = yes;
24         DATA:    load = ROM0, run= RAM, type = rw, define = yes;
25         BSS:     load = RAM, type = bss, define = yes;
26         VECTORS: load = ROMV, type = rw, define = yes;
27         ZEROPAGE: load = ZP, type = zp, define = yes;
28 }
29
30 FEATURES {
31     CONDES: type    = constructor,
32             label   = __CONSTRUCTOR_TABLE__,
33             count   = __CONSTRUCTOR_COUNT__,
34             segment = INIT;
35     CONDES: type    = destructor,
36             label   = __DESTRUCTOR_TABLE__,
37             count   = __DESTRUCTOR_COUNT__,
38             segment = RODATA;
39 # FIXME: interruptor support is missing
40 #    CONDES: type    = interruptor,
41 #            label   = __INTERRUPTOR_TABLE__,
42 #            count   = __INTERRUPTOR_COUNT__,
43 #            segment = RODATA,
44 #            import  = __CALLIRQ__;
45 }