]> git.sur5r.net Git - cc65/blob - cfg/pce.cfg
Merge pull request #7 from cvemu/master
[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 = $fd, 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         EXTZP: load = ZP, type = zp, define = yes, optional = yes;
29         APPZP: load = ZP, type = zp, define = yes, optional = yes;
30 }
31
32 FEATURES {
33     CONDES: type    = constructor,
34             label   = __CONSTRUCTOR_TABLE__,
35             count   = __CONSTRUCTOR_COUNT__,
36             segment = INIT;
37     CONDES: type    = destructor,
38             label   = __DESTRUCTOR_TABLE__,
39             count   = __DESTRUCTOR_COUNT__,
40             segment = RODATA;
41     CONDES: type    = interruptor,
42             label   = __INTERRUPTOR_TABLE__,
43             count   = __INTERRUPTOR_COUNT__,
44             segment = RODATA,
45             import  = __CALLIRQ__;
46 }