I'm using QtSpim to make a quick program that's supposed to perform two bitwise ori operations on some integers. When I try to assemble the program, it gives me this error message, saying I can't use the same label twice - this is the exact code from the book I'm using, which doesn't work.
## Program to bitwise OR two patterns
.text
.globl main
main:
ori $8,$0,0x0FA5 # put first pattern into register $8
ori $10,$8,0x368F # or ($8) with second pattern. Result to $10.
## End of file
I'd greatly appreciate anybody's help here.
For QtSPIM, use option "Reinitialize and Load File" rather than just "Load File". For your scenario, "Load File" will work once but not a second time for the same file — the 2nd time, "Load File" will accumulate, so it can be used to load separate, different files together, for the same simulation (but it will complain about duplicate labels if loading the same file).
"Reinitialize and Load File" is appropriate for reloading the same file over and over, as it is edited/changed..
(But MARS is easier for repeated editing and simulating, since it has an integrated editor.)