EE 360N - Programming Assignment 1 Clarifications
- Invalid register numbers should also be detected as "Invalid instructions(error code 2)"
Ex: ADD R9,R0,#1 ; R9 is an invalid register number (exit with error code 2)
- The whole assembling process is case insensitive. That is, the labels, opcodes, and operands can be in upper cases or lower cases or both, and are still interpreted the same. The parser given in the useful codes converts every line into lower cases before parsing it.
- Your assembler needs to support all 8 variations of BR.
BRn LABEL BRz LABEL
BRp LABEL BRnz LABEL
BRnp LABEL BRzp LABEL
BR LABEL BRnzp LABEL
- You may assume that the 8 numbers given for the min8.asm program are all positive. That is, you need not worry about handling overflows.
If a label and an instruction that uses it are too far apart that the offset cannot be specified properly in the machine code, you should produce error code 4.