Answer from cs61c-bc (Svetlana Simakova 16608048) for Question 4
In order for the processor to address the IO device, it uses memory-mapped io: portions of address space are assigned to IO dedvices and reads and writes to those addresses are interpreted as as commands to IO devices.
     
      lui $t0, 0xffff  # load addr. of rec.control
loop: lw $t1, 0($t0)   # store control
      sll $t1, $t1, 31 # erase 31-1 bits
      srl $t1, $t1, 31 # now only status bit is there
      beqz $t1, loop   # keep looping if not ready
      add $v0, $t1, $0 # otherwise return result 
