This project is a part of the NAND to Tetris course, which aims to take learners through the process of building a modern computer system from the ground up, starting with elementary logic gates and ending with a fully functional operating system.
In this project, we continue our journey from NAND gates to a complete computer system by implementing a compiler for the high-level programming language Jack. The compiler translates Jack programs into the assembly language of the Hack platform.
To get started with this project, follow these steps:
-
Clone this repository to your local machine.
git clone git@github.com:WilliamTakeshi/vm-translator-rust.git
-
Navigate to the project directory.
cd vm-translator-rust
-
Now you can transate programs in a intermediate language (
.vm
) to a Hack programming language file (.asm
).cargo run -- -i examples/MemoryAccess/StaticTest/StaticTest.vm --output examples/MemoryAccess/StaticTest/StaticTest.asm
You can test the functionality of the compiler by running the CPUEmulator (downloaded on the nand-to-tetris website) and use the .tst
files on the /example
directory.
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
By William