Files
VMBL/src/main.c

28 lines
539 B
C
Raw Normal View History

2025-12-19 18:31:41 +11:00
#include "vmbl.h"
#include "asm/tokenize.h"
#include <stdio.h>
2025-12-19 18:31:41 +11:00
#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]));
VMBL_Instruction program[] = {
MAKE_INST_PUSH(124),
MAKE_INST_PUSH(2),
2025-12-20 18:25:53 +11:00
MAKE_INST_DIV,
MAKE_INST_HALT
2025-12-19 18:31:41 +11:00
};
int main() {
//VMBL_State vmblState = {};
//VMBL_LoadExecutable(&vmblState, program, sizeof(program));
//VMBL_StartVM(&vmblState);
Tokenizer tokenizer = {
"push 1224\npush 2\ndiv\nhalt"
};
Token token = getCurrentToken(&tokenizer);
2025-12-20 16:55:40 +11:00
printf("%s\n", tokenTypeAsCStr(token.type));
2025-12-19 18:31:41 +11:00
return 0;
}