MIPS Exception Handler Code NOT working: In the following code I attempt to print out the addresses of the instruction that caused the exception (register $14) and the Type of exception (register $13). I have exhausted every possible route I could think of.
The error message gives:
"lw": Too few or incorrectly formatted operands. Expected: lw $t1,-100($t2)
Thank you!
mfc0 $k0,$14 # Coprocessor 0 register $14 has address of trapping instruction
lw $a0, $k0 # address of string to print
li $v0, 4 # Print String service
syscall
mfc0 $k0,$13 # Coprocessor 0 register $13 has type of exception
lw $a0, $k0 # address of string to print
li $v0, 4 # Print String service
syscall