This is Assembler written in C++ to convert Assembly level Programs to Machine Code for the HACK Computer Architecture.
Prof.Shimon Schocken and Prof.Noam Nisan, are the creators of the Hack language and computer architecture designed for the Nand2Tetris Course. For more details, please check out: https://www.nand2tetris.org/
In the terminal run:
-
g++ assembler.cpp to compile the file and generate the executable
-
Run ./a.out in the terminal (You can replace 'a' with any name that you have given to the executable)
-
The following Prompt will show up.(Please enter a valid file name and ensure the input file is in the same directory as the executable)
-
Enter file name:
-
You will see the lines being read and the corresponding binary codes being generated show up on the terminal
-
The output will be saved in a .hack file having the same file name as the Input file