-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathld.cfg
50 lines (47 loc) · 1.81 KB
/
ld.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Memory configuration for the VIC-20 with 32K RAM Cartridge
# Contributed by Stefan Haubenthal
SYMBOLS {
__LOADADDR__: type = import;
__EXEHDR__: type = import;
__STACKSIZE__: type = weak, value = $0800; # 2k stack
}
MEMORY {
ZP: file = "", define = yes, start = $0002, size = $001A;
LOADADDR: file = %O, start = $11FF, size = $0002;
HEADER: file = %O, start = $1201, size = $000C;
# RAM before font data
LORAM: file = %O, define = yes, start = $120D, size = $01f3, fill = yes, fillval = $ff;
# font data
FONT_MEM: file = %O, define = yes, start = $1400, size = $1000;
# rest of RAM
MAIN: file = %O, define = yes, start = $2400, size = $5a00 - __STACKSIZE__;
}
SEGMENTS {
ZEROPAGE: load = ZP, type = zp;
LOADADDR: load = LOADADDR, type = ro;
EXEHDR: load = HEADER, type = ro;
STARTUP: load = LORAM, type = ro;
LOWCODE: load = MAIN, type = ro, optional = yes;
ONCE: load = MAIN, type = ro, optional = yes;
CODE: load = MAIN, type = ro;
RODATA: load = MAIN, type = ro;
DATA: load = MAIN, type = rw;
INIT: load = MAIN, type = bss;
BSS: load = MAIN, type = bss, define = yes;
FONT: load = FONT_MEM, type = ro, define = yes;
}
FEATURES {
CONDES: type = constructor,
label = __CONSTRUCTOR_TABLE__,
count = __CONSTRUCTOR_COUNT__,
segment = ONCE;
CONDES: type = destructor,
label = __DESTRUCTOR_TABLE__,
count = __DESTRUCTOR_COUNT__,
segment = RODATA;
CONDES: type = interruptor,
label = __INTERRUPTOR_TABLE__,
count = __INTERRUPTOR_COUNT__,
segment = RODATA,
import = __CALLIRQ__;
}