USING SPIM:Loading source file
Use File -> Open menu
Simulation
Simulator -> Settings… :
in the Display section check only the first two items Save window
positions and General registers in hexadecimal
in the Execution section check only Allow pseudo instruction
Simulator -> Set Value… : to load PC with address of first instruction
enter Address or Register Name as “PC” and enter Value as “0x00400000”
reason: the text area of memory, where programs are stored, starts here
Simulator -> Go : run loaded program
Click the OK button in the Run Parameters pop-up window if the StartingAddress: value is “0x00400000”
Simulator -> Break : stop execution
Simulator -> Clear Registers and Reinitialize : clean-up before new run