Just a simple Hybird based VM in c for learning purpose
- Hybrid VM: Supports both register-based and stack-based execution
- Custom instruction set with math, logic, memory, and control flow
- Operand types: Register, Immediate, Memory
- Stack operations: PUSH, POP, DUP, SWAP, etc.
- Syscall interface for basic I/O
- Error and status code abstraction
- Optional bytecode file loading support
- Modular design, easy to expand
- Stack: Fixed-size data stack
- Registers: 14 general-purpose + special registers (IP, FLAGS, etc.)
- Memory: 1MB general-purpose memory
- Instructions: Hand-crafted IR (
Inst) or serialized bytecode - Program: Preloaded
Instarray or bytecode file
make
./build/aym- Bytecode optimizer (SSA or linear scan)
- More syscalls (read, mmap, file I/O)
- Debugger interface or trace hooks
- JIT backend (DynASM, libgccjit)
- Lua/JS style scripting engine
This project is licensed under the MIT License.