I\'m currently working with assembly language under the MIPS processor. I\'m currently using MARS simulator and for reasons unknown I get the following error message after every
I am new to MIPS and I just had this problem. This is what I had:
.data
.text
swap:
# do stuff
jr $ra
main:
# do stuff
jal swap
li $v0,10
syscall
I fixed it by changing it to this:
.data
.text
main:
# do stuff
jal swap
li $v0,10
syscall
swap:
# do stuff
jr $ra
Notice I moved main to be before swap. I mistakenly assumed that main was a reserved label. And that it would automatically jump straight to main first. But apparently that isn't the case because it was hitting my jr $ra instruction before I got to call jal swap in main.
Anyway, I hope this helps.