Spim is A MIPS32 Sim­u­la­tor freely avail­able for Linux, Mac and Win­dows. The process for installing the soft­ware from source is not as nice as we would expect it to be.
Down­load source code from:

http://www.cs.wisc.edu/~larus/SPIM/spim.tar.gz

You will prob­a­bly need to get Bison and Flex:

sudo apt-get install bison flex

Don’t for­get:

sudo apt-get install libxaw7-dev

Oth­er­wise you’ll get “X11/Xaw/Cardinals.h: No such file or directory”

Build and install xspim first:

cd xspim; make && sudo make install

Then spim:

cd ../spim; make && sudo make install

If you install spim before xspim, the lat­ter will fail with “install: access­ing ‘/usr/lib/spim/exceptions.s’: Not a directory”