This is a project to translate assembly code to machine code in the Hack system. It follows the contract described in The Elements of Computing Systems.
The project is implemented using Common Lisp (SBCL). The only external package I used is uiop, you can install it through quicklisp:
(ql:quickload :uiop)
You can use it by providing assembly source file and the output file as follows:
(assembler:from-assembly-to-binary "test/Rect.asm" "Rect.hack")
The assembly source files in test
folder are borrowed from nand2tetris website. You can test the translation accuracy by using the provided assembler on that website.
MIT