]> git.sur5r.net Git - cc65/blob - cfg/pce.cfg
Merge pull request #575 from groessler/something_to_pull
[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:   file = "", start = $0003, size = $00FD, type = rw,  define = yes;
10
11     # reset-bank and hardware vectors
12     ROM0: file = %O, start = $E000, size = $1FF6, fill = yes, define = yes;
13     ROMV: file = %O, start = $FFF6, size = $000A, fill = yes;
14
15     # first RAM page (also contains stack and zeropage)
16     RAM:  file = "", start = $2200, size = $1e00,             define = yes;
17 }
18
19 SEGMENTS {
20     ZEROPAGE: load = ZP,              type = zp,  define = yes;
21     EXTZP:    load = ZP,              type = zp,  define = yes, optional = yes;
22     APPZP:    load = ZP,              type = zp,  define = yes, optional = yes;
23     STARTUP:  load = ROM0,            type = ro,  define = yes;
24     ONCE:     load = ROM0,            type = ro,                optional = yes;
25     CODE:     load = ROM0,            type = ro,  define = yes;
26     RODATA:   load = ROM0,            type = ro,  define = yes;
27     DATA:     load = ROM0, run = RAM, type = rw,  define = yes;
28     BSS:      load = RAM,             type = bss, define = yes;
29     VECTORS:  load = ROMV,            type = rw,  define = yes;
30 }
31
32 FEATURES {
33     CONDES: type    = constructor,
34             label   = __CONSTRUCTOR_TABLE__,
35             count   = __CONSTRUCTOR_COUNT__,
36             segment = ONCE;
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 }