Harvard University, FAS

Home
Syllabus
Lecture Notes

ML Resources
MIPS and SPIM

MIPS and SPIM

The SPIM Simulator.
This is an excellent document describing the MIPS assembly language, calling conventions, and using the SPIM simulator.

The SPIM Homepage.
If you would like to install SPIM on your own machine, source code and binaries can be downloaded from this site.

Using SPIM on nice
To use the SPIM simulator from nice, first make sure that the ~lib153/bin directory is in your path. Then, simply run the spim simulator from the command line:
# spim
SPIM Version 7.0 of July 7, 2004
Copyright 1990-2004 by James R. Larus (larus@cs.wisc.edu).
All Rights Reserved.
See the file README for a full copyright notice.
Loaded: /nfs/home/l/i/lib153/lib/exceptions.s
(spim) 
Alternatively, you can use the xspim program which has a nice graphical X-Windows interface. To use the X-Windows interface, make sure that you are able to run X programs. If you are using ssh, then make sure to login with the shh -X option. Then, run the xspim program from the command line.
# xspim
(... a nice window should pop up ...)