<< Assembly Unit Home

Valid HTML 4.01!

You can run SPIM in one of 2 modes:

  1. Enhanced (or virtual) machine mode: most suitable for assembly programming.
  2. Bare (or real) machine mode: most suitable for accurate simulation of MIPS machine.

Set SPIM as follows depending on your need. For more details read "Simulation of a Virtual Machine" in Section A.9 of Patterson & Hennessy.


If you want to

  • Simulate software control flow (virtual machine execution sequence).
    useful to run assembly programs as expected by programmers
  • Run MAL programs, or simply use pseudo-instructions.
    useful for the instruction expansion exercises
Set as in screenshot

This is mode recommeded for assembly programming exercises.


If you want to

  • Check your machine code.
    useful for hand assembly exercises (for example, check real PC-relative offsets)
  • Simulate actual machine execution sequence (see Chapter 6 of Patterson & Hennessy).
    useful to study real machine behavior and to understand how the hardware is designed to execute code
Set as in screenshot
You can change how registers show their content to the familiar decimal form.
This is not recommended. By looking at the hex value you can see the internal bit representation which is a critical learning outcome of CS212
screenshot