aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index df596a7..3d878b3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -24,6 +24,13 @@ typedef struct
} stack;
} vm_t;
+void vm_load_stack(vm_t *vm, byte *bytes, size_t size)
+{
+ vm->stack.data = bytes;
+ vm->stack.size = size;
+ vm->stack.ptr = 0;
+}
+
void vm_push_byte(vm_t *vm, data_t b)
{
if (vm->stack.ptr >= vm->stack.size)