## Program adds 1 and 12
.text # text section
.globl main # call main by SPIM
ori $8,$0,0x1 # load 1 into register 8
ori $9,$0,0x2 # load 2 into register 9
add $10,$8,$9 # add registers 8 and 9, put result in register 10
The newest version of Spim is called QtSpim, and unlike all of the other version, it runs on Microsoft Windows, Mac OS X, and Linux—the same source code and the same user interface on all three platforms! QtSpim is the version of Spim that currently being actively maintaned. The other versions are still available, but are no longer maintained or updated. A compiled, immediately installable version of QtSpim is available for Microsoft Windows, Mac OS X, and Linux can be downloaded from:https://sourceforge.net/projects/spimsimulator/files/. Full source code is also available (to compile QtSpim, you need the Qt framework, a very nice cross-platform UI framework that can be downloaded from http://qt-project.org/downloads).
Spim is a self-contained simulator that runs MIPS32 programs. It reads and executes assembly language programs written for this processor. Spim also provides a simple debugger and minimal set of operating system services. Spim does not execute binary (compiled) programs. Spim implements almost the entire MIPS32 assembler-extended instruction set. (It omits most floating point comparisons and rounding modes and the memory system page tables.) The MIPS architecture has several variants that differ in various ways (e.g., the MIPS64 architecture supports 64-bit integers and addresses), which means that Spim will not run programs for all MIPS processors. Spim comes with complete source code and documentation. Spim implements both a terminal and windows interfaces. […]