-
April 29th, 2011, 12:23 AM
#1
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
.text
.globl start
.ent start
start: lui $9, 0xbf90 # Load upper half of port address
# Lower half is filled with zeros
repeat:
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|