https://github.com/alienkevin/hack-assembler-web
Web version of the Hack Assembler
https://github.com/alienkevin/hack-assembler-web
Last synced: 11 months ago
JSON representation
Web version of the Hack Assembler
- Host: GitHub
- URL: https://github.com/alienkevin/hack-assembler-web
- Owner: AlienKevin
- License: apache-2.0
- Created: 2020-03-22T16:27:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T16:14:04.000Z (about 3 years ago)
- Last Synced: 2025-01-23T21:24:59.678Z (about 1 year ago)
- Language: Elm
- Homepage: https://alienkevin.github.io/hack-assembler-web/
- Size: 3.01 MB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE_APACHE
Awesome Lists containing this project
README
# 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"](https://www.coursera.org/learn/build-a-computer/home/welcome) 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

## C Instructions

## 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](src/hack_parser.rs)
2. [Emitter](src/hack_emitter.rs)
3. [Assembler](src/hack_assembler.rs)
4. [Browser interface written in Elm](www/index.html)
If you prefer a command line interface, try the original project [hack-assembler](https://github.com/AlienKevin/hack-assembler).
# Want to learn more about Hack?
Check out the [course video on Hack assembly](https://www.coursera.org/learn/build-a-computer/lecture/AYPo6/unit-6-2-the-hack-assembly-language) and the whole [From Nand to Tetris course](https://www.coursera.org/learn/build-a-computer/home/welcome).
# Credits
Thanks to Noam Nisan and Shimon Schocken for developing the amazing From Nand to Tetris course and Bodil Stokke for her [excellent tutorial](https://bodil.lol/parser-combinators/) on parser combinators in Rust
# License
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/)