Mips problem

Hello everyone. I am new to Mips so perhaps anybody that is good in Mips can lend a helping hand. I am required to always on the first two LEDs and always off the next two LEDs independent of the state of the switches. I am given a base code to modify into the requirements stated above. Here is my codes:

.set noreorder
.globl start
.ent start

start: lui $9, 0xbf90 # Load upper half of port address
# Lower half is filled with zeros

lbu $8, 0($9) # Read from the input port
nop # Needed after load
sb $8, 0($9) # Write to the output port
nop # Another nop for the sb
b repeat # Repeat the read and write cycle
nop # Needed after branch
li $8, 0 # Clear the register
.end start # Marks the end of the program

Any help is much appreciated. Thank You in advance =D
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!