EVERYTHING’S GOING TO BE OK
Implementing a tiny virtual machine, assembler, and compiler
This thesis presents the design and implementation of ok, a stack-based virtual machine intended for educational use that prioritizes ease of implementation and minimal resource usage. The system is formally specified and accompanied by a reference implementation written in C. This thesis also introduces MK2, an assembly-like language targeting this virtual machine, as well as a high-level compiled programming language called nude. Together, these components form a usable programming stack that demonstrates how a beginner-friendly and resource-conscious virtual machine and toolchain can support higher-level software development while remaining accessible for instructional use.