Getting PCSpim and a program to run
![]()
Downloading PCSpim
PCSpim is a MIPS R2000/R3000 Simulator, available from
http://www.cs.wisc.edu/~larus/spim.html
To run PCspim on a PC under Microsoft Windows (you don’t need to do this if you are in the lab):
download the file http://www.cs.wisc.edu/~larus/SPIM/pcspim.zip,
unzip it, and
run the setup program
Reference documentation with application and Appendix A from the text
![]()
Running PCSpim
Once installed
Start -> Programs ->
PCSPIM
The first time you run PCSPIM you may have the warning box shown below appear (new versions will say “exception file” instead of “trap file).

Click “Yes”. You’ll then see a screen like this:

At the bottom, under “Trap file:” or “Exception file:”, change the drive from “C” to “D”.
Leave “Allow pseudocode instructions” option checked. Hit OK.
You can return to settings at any time from the PCSpim window by selecting
Simulator->Settings

Four windows appear in the PCSpim frame: Registers, Text Segment, Data Segment, and Messages
The console also opens. Your input and output to the program will be through the console.
![]()
Opening, Loading and Running a File
Download the file simple-spim.asm (right-click and use “Save Target As” to save it somewhere).
![]()
To open the first file:
File
-> Open …
Open “simple-spim.asm” (from wherever you saved it above).
In the Message window, you should see a message “…simple-spim.asm has been successfully loaded”
First, try running the program:
Simulator -> Run -
button)
You will be asked for the starting address of the program.
Use the address of the first instruction in the Text Segment window.
(this is most likely set already)

You will be prompted for input on the console window. Your output will be shown on the console window.

Next, try single-stepping through the program one step at a time.
Stopping Program Execution
To stop the execution at any time, you can use
Simulation -> Break
You will be prompted whether to continue or end execution. (Click on Yes to end)

When you make changes to the file you are running
Simulation -> Reload
<filename>
to have the updated file loaded into PCSpim
![]()
Quitting PCSpim
File -> Exit
![]()
Videos of the loading of a program are available from:
http://users.ece.gatech.edu/~sudha/2030/temp/spim/spim-tutorial.html