This is a modified version of JsSpim, which itself is an online adaptation of Prof. James Larus’s Spim.
It provides a modernized web interface, new editing capabilities, and additional peripheral visualizations for MIPS32 simulation and learning.
Spim a simulator that runs MIPS32 assembly programs and provides a simple debugger and OS services.
JsSpim extended Spim by compiling it to WebAssembly (via Emscripten), creating an interactive web-based environment, and adding some features.
This simulator builds further on JsSpim, focusing on enhanced usability, visualization, and educational tools, especially for OS course.
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.
- Dark Theme Mode Provides a sleek and eye-friendly dark mode for long coding sessions
- Replaced the basic text area with CodeMirror, providing:
- Syntax highlighting for MIPS assembly
- Line numbering and auto-indentation
- A better, more interactive editing experience directly in the browser
- 7-Segment Display
Displays numeric output in a color-coded, aligned layout. - LED Display
Circular LED lights with glow effects for ON/OFF states. - UART Interface
Basic serial communication simulation with:- Data register:
0x10000040 - Status register:
0x10000044 - Control register:
0x10000048
- Data register:
- Click on an instruction to toggle breakpoint
- Use the range slider to control the execution speed
- Highlight on changed registers, data segment, and stack
- Radix support for all values
- 7-Segment and LED features for simulation
- UART interface
- Spim - The original simulator written in C++
- JsSpim - The web-based extended version of Spim by Shawn Zhong
- Emscripten - Toolchain to compile C++ source code to WebAssembly using the LLVM IR.
- Bootstrap - Using the CSS library to build the UI
- highlight.js - For highlighting the source code
- CodeMirror - In-browser code editor
After downloading the repository, you can launch the simulator in two ways—both using Visual Studio Code (VSCode). Before starting, make sure the Live Server extension is installed.
Option 1: Manual Launch via VSCode
- Open the simulator folder in VSCode
- Open the
index.htmlfile - Start the server using one of the following methods:
- Click Go Live in the bottom-right corner of VSCode
- Right-click anywhere in the editor and select Open with Live Server
- Use the keyboard shortcut:
Alt+L, thenAlt+O
Option 2: Automatic Launch via Script
- Navigate to the simulator folder in your file explorer
- Double-click
start_server.batto launch the simulator automatically. This way, there is no need to open VSCode manually.


