This repository contains tools and utilities for the Hack Assembly language, specifically targeting the Nand2Tetris project. The repository is structured into two main tools: asm2hack and vm2asm.
The asm2hack tool converts Hack Assembly language files into Hack machine language.
To use asm2hack, navigate to the asm2hack directory and run the following command:
cargo run -- <path-to-your-asm-file>To develop and test asm2hack, navigate to the asm2hack directory and use the following commands:
# Run tests
cargo test
# Build the project
cargo buildexamples/: Contains example.asmfiles to be used for testing and demonstration.src/: Contains the source code for theasm2hacktool.target/: The target directory for compiled files.tests/: Contains unit tests for the project.Cargo.lock: Specifies the exact versions of dependencies.Cargo.toml: Contains the project configuration and dependencies.
The vm2asm tool converts VM code into Hack Assembly language.
To use vm2asm, navigate to the vm2asm directory and run the following command:
cargo run -- <path-to-your-vm-file>To develop and test vm2asm, navigate to the vm2asm directory and use the following commands:
# Run tests
cargo test
# Build the project
cargo buildexamples/: Contains example.vmfiles to be used for testing and demonstration.src/: Contains the source code for thevm2asmtool.target/: The target directory for compiled files.tests/: Contains unit tests for the project.Cargo.lock: Specifies the exact versions of dependencies.Cargo.toml: Contains the project configuration and dependencies.default: Configuration file for default settings.
This project is licensed under the MIT License. See the LICENSE file for more details.
Contributions are welcome! Please see the CONTRIBUTING file for more details.