1 # linker config. to produce a NEC PC-Engine 8K, 16K, or 32K image (.bin)
3 __CARTSIZE__: type = weak, value = $2000; # $2000, $4000, or $8000
4 __STACKSIZE__: type = weak, value = $0300; # 3 pages stack
7 ZP: file = "", start = $0000, size = $0100, define = yes;
9 MAIN: file = "", start = $2200, size = $1E00 - __STACKSIZE__, define = yes;
10 # ROM banks, before swapping, and after mapping
11 ROM: file = %O, start = $10000 - __CARTSIZE__, size = __CARTSIZE__, fill = yes, fillval = $FF;
14 ZEROPAGE: load = ZP, type = zp;
15 EXTZP: load = ZP, type = zp, optional = yes;
16 APPZP: load = ZP, type = zp, optional = yes;
17 DATA: load = ROM, run = MAIN, type = rw, define = yes;
18 INIT: load = MAIN, type = bss, optional = yes;
19 BSS: load = MAIN, type = bss, define = yes;
20 RODATA: load = ROM, type = ro;
21 CODE: load = ROM, type = ro;
22 LOWCODE: load = ROM, type = ro, optional = yes;
23 ONCE: load = ROM, type = ro, optional = yes;
24 STARTUP: load = ROM, type = ro, start = $FFF6 - $0066;
25 VECTORS: load = ROM, type = ro, start = $FFF6;
28 CONDES: type = constructor,
29 label = __CONSTRUCTOR_TABLE__,
30 count = __CONSTRUCTOR_COUNT__,
32 CONDES: type = destructor,
33 label = __DESTRUCTOR_TABLE__,
34 count = __DESTRUCTOR_COUNT__,
36 CONDES: type = interruptor,
37 label = __INTERRUPTOR_TABLE__,
38 count = __INTERRUPTOR_COUNT__,