Here is the sample's code:
Code: Select all
.set noreorder
.global me_run
.global me_end
.ent me_run
me_run:
li $2, 0xbfc00060
li $3, 0
loop:
addiu $3, $3, 1
sw $3, 0($2)
b loop
nop
me_end:
.end me_run
I have tried getting rid of the nop to see what happens, and I have also tried changing the "b loop" to "j loop" (I have tried both at the same time too). However, after I make these alterations, the number that the C program watches at 0xBFC00060 no longer increments.
So my questions are:
Is the no-operation after the branch needed, and if so why?
Why doesnt the unconditional jump work while the unconditional branch does?
Thanks!
- dega[/code]