File format: The input file consists of assembler commands delimited by newline characters. Legal assembler commands are: or REG, REG, REG add REG, REG, REG and REG, REG, REG sub REG, REG, REG lw REG, IMM sw REG, IMM lui REG, IMM ori REG, IMM j beq Where REG is $0 or $1 (specifying register 0 or register 1) IMM is an unsigned 4-bit immediate. is either a label or a 5-bit unsigned immediate. Lines can also be labels, formatted as Label_name: (e.g. foo:) To jump to a label, use: j Label_name (e.g. j foo) Other notes: -This program was originally written for personal use for Fall 2005's project. Consequently error handling is limited (though present). Formatting: After your instruction there can be no white space between the last character and the new line. (e.g. add $0, $0, $1 is good, but add $0, $0, $1 will not work). -If you want to use hex values anywhere, proceed them with 0xnumber. You can also use octal with 0number. -You will receive a warning if your jump or beq is not reachable (i.e. j over a 32 block or beq beyond +-16). You will have to manually resolve this problem. -Comments are allowed, but they must take up the entire line. That is the first char of the line must be a '#' if you want a comment. To use: -compile with gcc. -./*assembler* < input.asm > output.code where input.asm is the *assembler* file and output.code will be the code written.