HACK Assembler

I've created a program that coverts the Hack Assembly Language to the 16bit HACK binary language.


The assembler program is run from the command line with the arguments needed for the program to run. You use the program as follows:

"java -jar ./HackAssembler.jar [filepath.asm]"


How does the assembler work?

The current version of the assembler parses the given file or folder and processes this parsed data into 16bit HACK binary instructions. These instructions get written to a file with the same name as the file.

The Hach Assembly Language instructions                                                       The converted 16bit HACK binary instructions














How does the assembler work under the hood?

Once the assembler starts execution it starts by loading in a parse rules file. This file contains the rules of how the parser should parse. Once loading has finished, the program parses all the lines from the given file. Once the parser reached the end of the file, the program starts looping through each item of the parsed data and converts this to the 16bit HACK binary instruction.  And writes this instruction to an output file. This continues until we have looped through each part of the data.

Language: ​Java

Role: Programmer

Teamsize: 1