Engineered a low-level, cycle-accurate emulator for the Integer Java Virtual Machine (IJVM). This project focused on building a robust interpreter in C that parses compiled binary files and executes them according to the stack-based microarchitecture designed by Andrew Tanenbaum.
The emulator functions as a complete virtual processor, managing its own memory, program counter, and stack frames to execute Java-like assembly code with high performance and precision.
The system is designed around a strictly defined memory model that separates data and instructions into specialized regions to ensure execution stability and safety.
The primary technical challenge involved implementing INVOKEVIRTUAL and IRETURN. This required maintaining a secondary "Frame Stack" to save context, restore pointers, and pass return values between methods without corrupting the underlying memory.
By integrating features like the WIDE prefix for 16-bit indexing and robust error handling for stack underflows, the emulator is capable of running complex recursive programs. This project demonstrates a deep understanding of how software interacts with hardware at the most fundamental level, bridging the gap between high-level code and machine execution.