Answer from cs61c-ch (hani aldhafari 14962689) for Question 4
it's a scheme inwhich portions of address space are assigned to I/O devices and reads and writes to those addresses are interpretted as commands. 

loop:
      bne $t0, $0, storeBytes
      j loop

storeBytes:
      beq $t1, $0, end
      sb $t1, 0($s2)
      j storeBytes

end 
      addi $v0, $s2, $0
      jr $ra      


