Answer from cs61c-ei (Jing Chen 16669246) for Question 4
To give a command to an I/O device, the processor must be able to address the device and supply one or more command words. In memory-mapped I/O, portions of the address space are assigned to I/O devices. Each register essentially appears in a special memory location. 

# $t0 = receiver control address 0xffff0000
# $t1 = receiver control (dereferenced) 
        lui $t0, 0xffff 		
loop: 	lw $t1, 0($t0) 		
        andi $t1,$t1,0x0001
        beqz $t1, loop
        lw $v0, 4($t0) 		

# put received byte in $v0 

