Skip to content
Web version of the Hack Assembler
Elm JavaScript Rust HTML
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
media Add media/ for README Mar 22, 2020
src Start using extern crate hack-assembler Mar 23, 2020
tests Initial commit Mar 22, 2020
www Start using extern crate hack-assembler Mar 23, 2020
.cargo-ok Initial commit Mar 22, 2020
.gitignore Initial commit Mar 22, 2020
Cargo.toml Start using extern crate hack-assembler Mar 23, 2020
LICENSE_APACHE
LICENSE_MIT Initial commit Mar 22, 2020
README.md
package-lock.json Initial commit Mar 22, 2020

README.md

hack-assembler

Assembler for the Hack computer written in Rust.

What is Hack?

Hack is an assembly language included in the online course "Build a Modern Computer from First Principles: From Nand to Tetris" and the book "The Elements of Computing Systems" by Noam Nisan and Shimon Schocken (MIT Press). Hack is also the name of the computer Noam and Shimon designed as the project for the course "From Nand to Tetris".

Hack Specification

The Hack assembly language has two types of instructions:

A Instructions

A instructions spec

C Instructions

C instructions spec

Symbols

symbols

Hack Assembler

The assembler compiles symbolic Hack code to binary code that the Hack machine understands. This project is structured in four parts:

  1. Parser
  2. Emitter
  3. Assembler
  4. Browser interface written in Elm

If you prefer a command line interface, try the original project hack-assembler.

Want to learn more about Hack?

Check out the course video on Hack assembly and the whole From Nand to Tetris course.

Credits

Thanks to Noam Nisan and Shimon Schocken for developing the amazing From Nand to Tetris course and Bodil Stokke for her excellent tutorial on parser combinators in Rust

License

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

You can’t perform that action at this time.