# asm.b
Asm : module {
init: fn(nil: ref Draw->Context, nil: list of string);
Dtype : adt {
pick {
Byte =>
b : int;
Word =>
w : int;
Float =>
r : real;
Big =>
b : big;
Pointer =>
p : int;
Unicode =>
c : string;
Memory =>
m : int;
MemoryP =>
mp : int;
}
};
Header : adt {
magic : con Dis->XMAGIC;
runtime_flag : con 0;
stack_extent, code_size, data_size, type_size, link_size, entry_pc, entry_type : int;
};
Cell : adt {
pick {
op =>
opcode : ref Dis->Inst;
addr =>
cell : int;
}
};
Label : adt {
name : string;
cell : int;
};
Obj : adt {
header : ref Header;
code : list of ref Dis->Inst;
types : list of ref Dis->Type;
data : list of ref Dis->Data;
name : string;
link : list of ref Dis->Link;
imports : list of ref Dis->Import;
except : list of ref Dis->Except;
handler : list of ref Dis->Handler;
labels : list of ref Label;
label_cell: fn(o : self ref Obj, name : string) : int;
};
parse: fn(fd : ref Sys->FD) : ref Obj;
};
|