Professional Documents
Culture Documents
Term 2013
Statement Purpose:
The purpose of this Lab is to familiarize students with the assembly programming
environment they will be going to use throughout this course. This Lab introduces the
basics of SPIM Simulator and demonstrates how this simulator software facilitates the
process of programming.
Activity Outcomes:
The students will know how to download, install and use SPIM simulator and text
editing programs. Further they will be aware of how these software facilitate the
process of programming.
Instructor Note:
Read the exercises below and submit your answer in the answer sheet available at
the end. English will be the official language throughout the discussion.
Names
1. ....
I.D
Lab. 1
Spring
Term 2013
Another tool, called a Linker combines a collection of object and library files
into an executable file which a computer can run.
Lab. 1
Spring
Term 2013
Lab. 1
Spring
Term 2013
What is SPIM ?
1- Go to the website
http://www.hashimi.ws/cs214/spimstepguide.php
Figure (1)
3- Unzip pcspim.zip
4- Run SETUP.EXE
Lab. 1
Spring
Term 2013
Figure (2)
2. The message like in figure (3) will appear. Click the Yes button
Figure (3)
Lab. 1
Spring
Term 2013
Figure (4)
If the path of exception file is not correct, change it to the correct path like
C:\Program Files (x86)\PCSpim\ exceptions.s by clicking on the Browse
and choosing the correct path. Then press the Ok button.
button
4. The main window of SPIM simulator will appear as shown in figure (5).
Figure (5)
Lab. 1
Spring
Term 2013
Figure (6)
c-
The window will appear like in figure(4). Check the options as in this
figure
Lab. 1
Spring
Term 2013
Lab. 1
Spring
Term 2013
Lab. 1
Spring
Term 2013
later you can use better ways to input data into programs
4. If input registers are loaded correctly, run program (otherwise return to last
step):
select menu item Simulator->Go, or press F5, or click the Go button on toolbar
.
Lab. 1
10
Spring
Term 2013
Problem? Simply relaod (select Simulator->Reload sample.s) and run again (back to 3a step 3
above). You may need to do that more than once.
Lab. 1
11
Spring
Term 2013
Re-run Program
Select Simulator->Reload test.s then run it again with different values.
Lab. 1
12
Spring
Term 2013
EXERCISE
Lab. 1
13