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.

~/asmvision/architecture5 layers
  1. 05GUI Layer
  2. 04Execution Layer
  3. 03Parser Layer
  4. 02FFI Bridge Layer
  5. 01Assembly Layer
Architecture Layers
5
ASM Functions
42
MIPS Registers
32+
Sample Programs
6

01 / The Problem

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

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.