Defined a simple virtual machine data structure
Currently just contains a "stack".
This commit is contained in:
11
src/main.c
11
src/main.c
@@ -23,6 +23,17 @@ typedef double f64;
|
|||||||
typedef uint8_t byte;
|
typedef uint8_t byte;
|
||||||
typedef u64 word;
|
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)
|
int main(void)
|
||||||
{
|
{
|
||||||
puts("Hello, world!");
|
puts("Hello, world!");
|
||||||
|
|||||||
Reference in New Issue
Block a user