Optional Homework Assignment

Due on Thursday 6/15

Caution: This is an extra assignment that can replace either of the first two assignments. It cannot replace either of the final two assignments. There is a regular assignment due on the Tuesday before this assignment and the Tuesday after this assignment. Do not complain that you don't have enough time, this is what is meant by "extra" credit.

You are to write a program using either C++ or Java that will translate a file of IJVM assembler instructions into the equivalent instructions in hex. You are not generating microcode, just machine code. For example, IADD would be translated into 60. The output file should be a text file, not a binary file (I want to be able to read the output file in a text editor).

Input file

Output file

Error checking