24 lines
355 B
C
24 lines
355 B
C
#include "../../../vm/vm.h"
|
|
#undef true
|
|
#undef false
|
|
|
|
#include <stdio.h>
|
|
#include <emscripten.h>
|
|
#include <emscripten/html5.h>
|
|
|
|
VM vm = {0};
|
|
|
|
void mainloop(void) {
|
|
if (!step_vm(&vm)) {
|
|
emscripten_cancel_main_loop();
|
|
return;
|
|
}
|
|
}
|
|
|
|
int main(void) {
|
|
printf("VM loaded successfully\n");
|
|
|
|
emscripten_set_main_loop(mainloop, 0, 1);
|
|
return 0;
|
|
}
|