https://github.com/writeonlycode/hack-assembler
An implementation of the Hack Assembler from the 'Nand to Tetris' course, written in Rust!
https://github.com/writeonlycode/hack-assembler
assembler nand2tetris
Last synced: 17 days ago
JSON representation
An implementation of the Hack Assembler from the 'Nand to Tetris' course, written in Rust!
- Host: GitHub
- URL: https://github.com/writeonlycode/hack-assembler
- Owner: writeonlycode
- Created: 2024-07-25T12:07:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-30T15:44:03.000Z (over 1 year ago)
- Last Synced: 2025-01-21T20:27:58.662Z (12 months ago)
- Topics: assembler, nand2tetris
- Language: Rust
- Homepage:
- Size: 117 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Hack Assembler in Rust
This project is an implementation of the Hack Assembler from the 'Nand to
Tetris' course, written in Rust!
The architecture of the assembler follows a functional approach: mostly
functions doing the heavy work, not relying on objects, and trying to use
mostly immutable variables. However, a few mutable references are used when it
makes everything easier.
The entire implementation is done in just over 200 lines of code!
## Usage
```bash
cargo run -- path/to/filename.asm
```
If `filename.asm` is a valid program, a `filename.hack` file that can be
executed by the Hack computer will be generated!
# References
- [From Nand to Tetris: Building a Modern Computer From First Principles](https://www.nand2tetris.org/)