Assembly execution visualizer
ASMVisionInteractive Assembly Language Visualizer
An interactive desktop app that loads MIPS Assembly files and visualizes step-by-step execution powered by a real x86 NASM backend.
- 05GUI Layer
- 04Execution Layer
- 03Parser Layer
- 02FFI Bridge Layer
- 01Assembly Layer
- Architecture Layers
- 5
- ASM Functions
- 42
- MIPS Registers
- 32+
- Sample Programs
- 6
01 / The Problem
Learning MIPS Assembly is difficult without visual feedback. Traditional tools like MARS and SPIM are functional but offer limited interactivity and no clear separation between what the processor is doing and how that maps to source code. Existing simulators also run entirely in software with no connection to real assembly computation. ASMVision addresses this with a genuine x86 Assembly backend — every arithmetic, logical, and branch operation executes inside a real NASM-compiled function, giving students an accurate view of what's actually happening at the processor level.
ASMVision provides a MIPS visualization GUI connected to a real x86 Assembly backend compiled to a Windows DLL. Every calculation runs native machine instructions, giving students authentic hardware-level feedback.
02 / Key Features
Real-Time Register & Memory View
All 32 MIPS registers plus PC, HI, and LO are visualized live — with a gold flash animation on change — alongside a memory panel split into Data Segment and Stack views.
Step & Auto-Run Execution
Step through one instruction at a time with F10, or auto-run with an adjustable speed slider ranging from 1000ms down to 50ms per instruction step.
Breakpoint System
Click the gutter next to any line to toggle a breakpoint. Auto-run pauses automatically when execution reaches a marked line — just like a real debugger.
Syntax Highlighting & Tooltips
Full MIPS syntax coloring with hover tooltips on every supported opcode, explaining what the instruction does and how it affects registers — in plain English.
Execution Statistics
A breakdown of instructions executed by category — arithmetic, logical, branch, memory, jump, syscall — plus identification of the most-used register during the session.
Six Built-In Sample Programs
Factorial, Fibonacci, Array Sum, Bubble Sort, String Print, and Recursive Function — covering the full range of supported MIPS instructions ready to load and run immediately.
03 / System Architecture — 5 Layers
Assembly Layer
x86 NASM Backend — backend.asm
x86-64 NASM Assembly compiled to a Windows DLL using the win64 calling convention. Exports 42 functions covering every arithmetic, logical, branch, and memory operation. This is what actually executes the computation — nothing is simulated in Python.
FFI Bridge Layer
Python–Assembly Bridge — bridge.py
Loads backend.dll via ctypes.CDLL, declaring argument types and return types for every exported function so the rest of the codebase never touches ctypes directly. Acts as a typed interface contract between Python and native code.
Parser Layer
MIPS Parser — parser.py
Two-pass parser: the first pass collects all labels and their line positions; the second pass tokenizes every instruction and builds the data segment from .data directives. Outputs a structured instruction list ready for the execution controller.
Execution Layer
Execution Controller — executor.py
Maintains the complete register file (all 32 MIPS registers + PC, HI, LO), the memory model, and the breakpoint set. Dispatches each instruction to the Assembly backend via a six-hook callback system. Has zero UI dependency — fully testable standalone.
GUI Layer
PyQt5 Desktop Frontend
A dark-themed glassmorphism GUI built across six Qt modules: splash screen, main window, code panel (with syntax highlighter and gutter), register panel, memory panel, and console panel. The UI only reads from the executor — never drives computation directly.
04 / Tech Stack
- NASM 3.01 (x86-64)
- GCC via MSYS2
- Windows DLL (win64 ABI)
- Python 3.x
- ctypes FFI
- PyQt5
- QPainter
- QSyntaxHighlighter
Explore the Full Source on GitHub
The full codebase — NASM assembly source, bridge layer, parser, executor, PyQt5 GUI, and all six sample programs — is available on GitHub.