diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-15 05:41:20 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-15 05:41:20 +0100 |
commit | 4ddc3cce715b69e52b618db37c362ee3e05d2287 (patch) | |
tree | 24a7e98c705f4a2921a04dad0ef23d7521eb083e /src | |
parent | bee6d445bb227f788eb584b0943233613e0d2770 (diff) | |
download | ovm-4ddc3cce715b69e52b618db37c362ee3e05d2287.tar.gz ovm-4ddc3cce715b69e52b618db37c362ee3e05d2287.tar.bz2 ovm-4ddc3cce715b69e52b618db37c362ee3e05d2287.zip |
Main now loads a stack allocated byte array for VM stack
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -101,8 +101,12 @@ f64 vm_pop_float(vm_t *vm) return f; } +#define ARR_SIZE(xs) (sizeof(xs) / sizeof(xs[0])) + int main(void) { - puts("Hello, world!"); + byte stack_data[256]; + vm_t vm = {0}; + vm_load_stack(&vm, stack_data, ARR_SIZE(stack_data)); return 0; } |