Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teleivo/hack-assembler
Assembler for the Hack assembly language https://www.nand2tetris.org/project06
https://github.com/teleivo/hack-assembler
assembler hack nand2tetris
Last synced: 1 day ago
JSON representation
Assembler for the Hack assembly language https://www.nand2tetris.org/project06
- Host: GitHub
- URL: https://github.com/teleivo/hack-assembler
- Owner: teleivo
- License: mit
- Created: 2023-12-15T12:35:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-15T13:34:21.000Z (about 1 year ago)
- Last Synced: 2024-11-08T18:52:56.959Z (about 2 months ago)
- Topics: assembler, hack, nand2tetris
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hack Assembler (nand2tetris)
Hi 😁 this is one of my learning projects, an assembler for the Hack assembly language.
The language is defined in https://www.nand2tetris.org/project04. The assembler project itself is
documented in https://www.nand2tetris.org/project06.https://www.nand2tetris.org is an amazing course 🤩 !
## Quickstart
To run the assembler once do
```go
go run cmd/assembler/main.go testdata/Add.asm
```otherwise build the above into a binary 😄 .
The machine code is written as text instead of binary as that is what was required in
https://www.nand2tetris.org/project06.## Tests
I added ample tests written in Go for the parsing and translation logic. The machine code generated
by this repos assembler is identical to the machine code generated by
https://www.nand2tetris.org/project06 for the given sample programs. There might of course still be
bugs. Please let me know if you find one 😅 .## Resources
* https://www.nand2tetris.org - you can find the Nand2Tetris course on coursera
* https://interpreterbook.com - is an amazing book I went through before Nand2Tetris from which I
remembered some bits about a possible structure and readable tests