-
Notifications
You must be signed in to change notification settings - Fork 0
/
mipsassem.d.ts
37 lines (33 loc) · 1.07 KB
/
mipsassem.d.ts
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
/**
* Optional parameters used to configure assembly.
*/
export interface IAssembleOpts {
/**
* When passed, the assembly will be performed against this buffer.
* By default, the assembler will produce a new buffer for you.
* Many directives only make sense when passing this buffer
* (like .orga)
*/
buffer?: ArrayBuffer;
/**
* Object containing "file names" and strings containing assembly.
* These files can be used with the `.include` directive.
*/
files?: { [name: string]: string };
/**
* After assembly, if an object is passed, it will be populated with a map
* of symbol names to their memory output location in the buffer.
*/
symbolOutputMap?: { [name: string]: number };
/**
* If true, return an array of text instructions instead of a buffer.
* This is useful for debugging.
*/
text?: boolean;
}
/**
* Assembles the given input instructions.
* @param input Assembly text or lines.
* @param opts Optional parameters.
*/
export function assemble(input: string | string[], opts?: IAssembleOpts): ArrayBuffer | string[];