diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-21 23:31:48 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-21 23:31:48 +0100 |
commit | d2cdb211b2d15c3a15b15737645f2a68641f34ee (patch) | |
tree | f85d83d700e7cdffd57219a345abc3a687419712 /src/main.c | |
parent | 1c2de9a926924a5eaf5000b695fdb33ad5664da1 (diff) | |
download | ovm-d2cdb211b2d15c3a15b15737645f2a68641f34ee.tar.gz ovm-d2cdb211b2d15c3a15b15737645f2a68641f34ee.tar.bz2 ovm-d2cdb211b2d15c3a15b15737645f2a68641f34ee.zip |
Added vm_execute_all which executes an entire program
Handles OP_HALT
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -28,13 +28,7 @@ int interpret_bytecode(const char *filepath) vm_t vm = {0}; vm_load_stack(&vm, stack, ARR_SIZE(stack)); vm_load_program(&vm, instructions, number); - for (size_t i = 0; i < number; ++i) - { - vm_execute(&vm); - printf("Cycle %lu\n", i); - vm_print_all(&vm, stdout); - printf("\n"); - } + vm_execute_all(&vm); free(instructions); return 0; } |