A VM translator implemented in Python for the Nand2Tetris course.
This program translates VM code (similar to Java bytecode) into Hack assembly language. It's part of the Nand2Tetris project, which builds a modern computer from first principles.
- Translates VM arithmetic/logical commands
- Handles memory access commands
- Processes program flow commands
- Supports function calling commands
python vm_translator.py <input_file.vm>- Clone this repository
- Ensure Python 3.9 or higher is installed
- No additional dependencies required
vm_translator.py: Main program fileparser.py: Parses VM commandscode_writer.py: Generates assembly codetest/: Test files and examples
Siladitya Samaddar
MIT License