main.c (651B)
1 #include <stdio.h> 2 3 #include "proc.h" 4 #include "rt.h" 5 #include "is.h" 6 #include "ins_def.h" 7 #include "helper.h" 8 9 #define DEBUG 0 10 11 int main(int argc, char** argv) 12 { 13 ASSERT(argc > 1, 14 "Specify a bytecode file in the first and only argument, please\n"); 15 16 init_mdata(); // Initalize the instruction defs 17 init_adata(); 18 init_ins_def(); 19 init_var_track(); 20 21 rt_t* runtime = proc_init(argv[1]); // Initalize process 22 23 proc_run(runtime); // Execute runtime 24 25 proc_clean(runtime); // Once `proc_run` returns, clean 26 // what sort of mess it made.` 27 28 return 0; 29 }