Updated link in README file.
[Hack-Assembler.git] / code.h
blob0f805422a12d46c785bb56da469cb76ccb4cb08e
2 /*
3 * Initialize ouptut file for writing
4 */
5 int init_coder(const char *filename);
7 /*
8 * Adds newline to end of output file.
9 */
10 void advance_ouptut_file();
13 * Returns binary code of A_COMMAND and L_COMMAND
14 * mnemonic is array of chars with A_COMMAND or L_COMMAND.
15 * code array will be modified to binary chars of command.
17 void enc_symbol(int number);
20 * Returns binary code of the dest mnemonic
22 int enc_dest(const char mnemonic[]);
25 * Returns binary code of the comp mnemonic
27 int enc_comp(const char mnemonic[]);
30 * Returns binary code of the jump mnemonic
32 int enc_jump(const char mnemonic[]);