code cleanup and division by zero error handling

This commit is contained in:
SpookyDervish
2025-12-20 19:42:00 +11:00
parent 3752c6abcc
commit 03ea7bd418
5 changed files with 49 additions and 60 deletions

View File

@@ -6,14 +6,13 @@ VMBL_Instruction program[] = {
MAKE_INST_PUSH(123),
MAKE_INST_PUSH(0),
MAKE_INST_DIV,
};
int main() {
VMBL_State vmblState = {};
//VMBL_LoadExecutable(&vmblState, program, sizeof(program));
//VMBL_SaveExecutable("fib.vmbl", program, sizeof(program));
VMBL_LoadExecutableFromFile(&vmblState, "fib.vmbl");
VMBL_LoadExecutable(&vmblState, program, sizeof(program));
VMBL_StartVM(&vmblState);
return 0;