Files
uVM/main.c
Sam Stevens 40a1add41d Removed temp var. Fixed PC.
Changed PC to be 8bits and checking for alignment.
Introduced x/y vars.
2018-10-16 22:25:27 +01:00

22 lines
298 B
C

#include <stdio.h>
#include "vm.h"
#include "string.h"
int main() {
VM* vm = new_vm();
uint8_t data[] = {
0x31, 0x05,
0x32, 0x02,
0x73, 0x12
};
memcpy(&vm->M, data, 6);
while(!vm->halted) {
vm_step(vm);
}
free_vm(vm);
return 0;
}