From 1101716f0f1461b5fc1115a55c3b5bb7e06cf133 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 15 Oct 2023 01:35:05 +0100 Subject: Defined a simple virtual machine data structure Currently just contains a "stack". --- src/main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/main.c b/src/main.c index cd66ebb..6f468cb 100644 --- a/src/main.c +++ b/src/main.c @@ -23,6 +23,17 @@ typedef double f64; typedef uint8_t byte; typedef u64 word; +#define VM_STACK_MAX 1024 + +typedef struct +{ + struct Stack + { + byte data[VM_STACK_MAX]; + word pointer; + } stack; +} vm_t; + int main(void) { puts("Hello, world!"); -- cgit v1.2.3-13-gbd6f