Answer from cs61c-ev (Roland Carlos 16583196) for Question 4
A program controls the SPIM terminal with four memory-mapped device registers. Memory-mapped means that each register appears as a special memory location.

la $t0, 0(0xffff0000)
la $t2, 0(0xffff0004)
la $v0, 0(some address with a buffer)
lb $t1, 0($t0)
loop:
beq $t1, 0, exit
sb $t2, 0($v0)
addi $v0, $v0, 1
j loop
exit:
