# Suppose that "config" is a word being used to configure an I/O device. # Suppose that if bit 7 is 1, then something should be turned on, but if it # is 0, something should be turned off. # # This program illustrates the type of programming you would do .data # Suppose "config" contains the following value, and we need to test bit # 7 to decide whether or not to turn something on (like an LED light) # config: .word 0xFE3445EB .text la $t0,config lw $t1,0($t0) andi $t1,$t1,0x80 srl $t1,$t1,7 bne $t1,$zero,turnon # code here for turning whatever it is off # a nonsense instruction, so we can see where code goes li $t3,0x11111111 j exit turnon: # code here for turning whatever it is on # a nonsense instruction, so we can see where code goes li $t3,0x22222222 exit: #done