Peer review Simon Lundqvist
I've lookd at your code, First you need to Implement complete register preservation. You also need to add . set noat sw $at . set at in the kernal code. The assembler uses $at for pseudo-instructions, but $at belongs to the user process.