HACK is a simple and interesting computer system built from scratch for the purpose of teaching CS students the concepts of computer system from first principle in a single book.
Like any other modern computer system, HACK computer system runs programs written by software engineers. In HACK, programs can be written in HACK assembly language and assembled by the HACK assembler into HACK machine instruction that can be executed by the HACK CPU.
The HACK assembler is written in Go. To build the assembler, run the usual build command.
go buildThen run the assembler with the provided HACK assembly source code.
./hack-assembler -infile draw.asmA HACK machine binary file draw.hack is created and the file can be loaded into the CPU Emulator and executed by the HACK CPU. That's it!