agssim: implement ptrstack
[rofl0r-agsutils.git] / Assembler.h
blobaeb4e9ca118bb20f01ccc6aa972a6abf5fbc8067
1 #ifndef ASSEMBLER_H
2 #define ASSEMBLER_H
4 #include "ByteArray.h"
5 #include "List.h"
6 #include <stdio.h>
7 #include <stddef.h>
9 typedef struct AgsAssembler {
10 struct ByteArray obj_b, *obj;
11 struct ByteArray data_b, *data;
12 struct ByteArray code_b, *code;
13 List *export_list, export_list_b;
14 List *fixup_list, fixup_list_b;
15 List *string_list, string_list_b;
16 List *label_list, label_list_b;
17 List *label_ref_list, label_ref_list_b;
18 List *function_ref_list, function_ref_list_b;
19 List *variable_list, variable_list_b;
20 List *import_list, import_list_b;
21 FILE* in;
22 } AS;
24 void AS_open_stream(AS* a, FILE* f);
25 int AS_open(AS* a, char* fn);
26 void AS_close(AS* a);
27 int AS_assemble(AS* a, char* out);
29 #pragma RcB2 DEP "Assembler.c"
31 #endif