Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
--- /dev/null
+.ktext 0x80000180
+ li $k1, 16
+ mfc0 $k0, $13
+ beq $k0, $k1, errmem
+ move $k0, $a0
+ move $k1, $v0
+ la $a0, trapmsg
+ li $v0, 4
+ syscall
+ j kret
+errmem:
+ move $k0, $a0
+ move $k1, $v0
+ la $a0, memmsg
+ li $v0, 4
+ syscall
+kret:
+ move $a0, $k0
+ move $k1, $v0
+ mfc0 $k0, $14
+ addi $k0, $k0, 4
+ mtc0 $k0, $14
+ eret
+.kdata
+ trapmsg: .asciiz "T"
+ memmsg: .asciiz "O"
+.text
+ teq $0, $0
+ lb $t1, 0($0)
\ No newline at end of file