blob: 597e2bab6974e5bfb0c7ab927aaacce81c65a562 (
plain)
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
|
#
# External loader interface
#
Nilmod: module
{
};
Loader: module
{
PATH: con "$Loader";
Inst: adt
{
op: byte;
addr: byte;
src: int;
mid: int;
dst: int;
};
Typedesc: adt
{
size: int;
map: array of byte;
};
Link: adt
{
name: string;
sig: int;
pc: int;
tdesc: int;
};
Niladt: adt
{
};
ifetch: fn(mp: Nilmod): array of Inst;
tdesc: fn(mp: Nilmod): array of Typedesc;
newmod: fn(name: string, ss, nlink: int,
inst: array of Inst, data: ref Niladt): Nilmod;
tnew: fn(mp: Nilmod, size: int, map: array of byte): int;
link: fn(mp: Nilmod): array of Link;
ext: fn(mp: Nilmod, idx, pc: int, tdesc: int): int;
dnew: fn(size: int, map: array of byte): ref Niladt;
compile: fn(mp: Nilmod, flag: int): int;
};
|