-
Notifications
You must be signed in to change notification settings - Fork 0
/
mem.cfg
46 lines (41 loc) · 1.46 KB
/
mem.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
MEMORY
{
# OS's zeropage is 26 bytes of C runtime and extra 14 bytes.
# The rest is for userland programs.
ZP: start = $0000, size = $0028, define = yes;
STACK: start = $0100, size = $0100, define = yes;
RAM: start = $0200, size = $7C00, define = yes;
OSCSTACK: start = $7E00, size = $0200, define = yes;
#IO: start = $8000, size = $1002, define = yes; # IO space, mostly unused.
ROM: start = $C000, size = $4000, type = ro, define = yes, fill = yes, file = %O; # 16 KiB ROM
}
SEGMENTS
{
ZEROPAGE: load = ZP, type = zp, define = yes;
ONCE: load = ROM, type = ro, optional = yes;
CODE: load = ROM, type = ro;
RODATA: load = ROM, type = ro;
DATA: load = ROM, run = RAM, type = rw, define = yes;
BSS: load = RAM, type = bss, define = yes;
VECTORS: load = ROM, type = ro, offset = $3ffa;
}
SYMBOLS {
# Define the stack size for the OS.
__STACKSTART__: value = __OSCSTACK_START__, type = export;
__STACKSIZE__: value = __OSCSTACK_SIZE__, type = export;
}
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__;
}