diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-15 01:35:05 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-15 01:35:05 +0100 |
commit | 1101716f0f1461b5fc1115a55c3b5bb7e06cf133 (patch) | |
tree | 1e402156b3da803e221cf8106d05f4cf9f6b4449 | |
parent | ca2e9c7083347366402991531d236f35d6726450 (diff) | |
download | ovm-1101716f0f1461b5fc1115a55c3b5bb7e06cf133.tar.gz ovm-1101716f0f1461b5fc1115a55c3b5bb7e06cf133.tar.bz2 ovm-1101716f0f1461b5fc1115a55c3b5bb7e06cf133.zip |
Defined a simple virtual machine data structure
Currently just contains a "stack".
-rw-r--r-- | src/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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!"); |