From 4ddc3cce715b69e52b618db37c362ee3e05d2287 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 15 Oct 2023 05:41:20 +0100 Subject: Main now loads a stack allocated byte array for VM stack --- src/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 3d878b3..432d74f 100644 --- a/src/main.c +++ b/src/main.c @@ -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; } -- cgit v1.2.3-13-gbd6f