Answer from cs61c-cj (Peter Lau 16539384) for Question 4
A memory-mapped I/O means that I/O device is emulated in an address space in the system memory.  (No system data is stored at that address space.)

#while the receiver control register (address 0xffff0000) has a 1 value, get a byte from the receiver (address 0xffff0004).

loop: li $t0, 0xffff0000
      lw $t1, 0($t0)
      andi $t1, $t1, 0x1
      beq $t1, $0, loop:
      lw $v0, 4($t0)
