M68K Interpreter 🧠
🧠 Overview
The M68K Interpreter is a browser-based Motorola 68000 (m68k) assembly emulator designed to make low-level programming easier to explore and teach.
It started as part of my bachelor's thesis in 2021, then was modernized and expanded in 2026 into a complete zero-setup learning tool. The goal was to replace the old Windows-only Easy68K workflow with something accessible from any modern browser.
🌐 Live Demo
Experience the interpreter firsthand: M68K Interpreter Live Demo
🦾 Repository
Code and source details: github.com/gianlucarea/m68k-interpreter
Why I built it
Learning assembly and CPU architecture often requires heavyweight desktop tooling, installation steps, and environment-specific setup. That friction is especially painful in classrooms or self-study scenarios.
This project removes that barrier with a fully client-side emulator that runs instantly in the browser while still exposing the low-level details that matter for understanding execution flow, registers, flags, and memory.
🛠️ Features
Core capabilities include:
- →50+ M68K instructions covering the most common assembly operations
- →Interactive editor with Ace syntax highlighting
- →Step-by-step execution with configurable delay for didactic walkthroughs
- →Undo/redo execution history to replay and inspect program behavior
- →Register and flags viewer for CPU state inspection
- →Memory inspector for runtime state analysis
- →Detailed error reporting with contextual line information
- →Data export for registers and memory snapshots
- →Responsive UI for desktop and tablet use
- →Zero setup execution directly in the browser
Implementation notes
The architecture focuses on visibility and feedback during execution. Instead of hiding emulator internals behind a single output pane, the interface keeps the core debugging surfaces (code, state, memory, output) visible and interactive.
This design makes the app useful both for quick experiments and for guided educational sessions where seeing each state transition is the main learning objective.
🏗️ Tech Stack
Frontend
- →React 18.3 (UI Framework)
- →TypeScript 5.3 (Type Safety)
- →Zustand 4.4 (State Management)
- →Ace Editor (Code Editing)
Build and development
- →Vite 5 (Fast Bundler)
- →ESLint 8 (Linting)
- →Prettier 3 (Formatting)
Testing and quality
- →Vitest (Unit Tests)
- →CodeQL (Static Analysis)
- →GitHub Actions (CI/CD)
Deployment
- →Vercel (Hosting & Analytics)
⚙️ Supported Instructions (50+)
Data Movement — MOVE, MOVEA, MOVEQ, MOVEM, MOVEP, LEA, PEA, CLR, EXG, SWAP
Integer Arithmetic — ADD, ADDA, ADDI, ADDQ, ADDX, SUB, SUBA, SUBI, SUBQ, SUBX, MULS, MULU, DIVS, DIVU, NEG, NEGX, EXT, CMP, CMPA, CMPI, CMPM, TST
Logical Operations — AND, ANDI, OR, ORI, EOR, EORI, NOT
Shift & Rotate — ASL, ASR, LSL, LSR, ROL, ROR, ROXL, ROXR
Bit Manipulation — BTST, BSET, BCLR, BCHG
Control Flow — JMP, JSR, RTS, BRA, BSR, BEQ, BNE, BCC, BCS, BPL, BMI, BGE, BGT, BLE, BLT, BVC, BVS, BHI, BLS
System Control — NOP, RESET, RTE, TRAP, TRAPV, CHK, LINK, UNLK, TAS, STOP
CCR Operations — ANDI to CCR, ORI to CCR, EORI to CCR, MOVE to CCR, MOVE from CCR
🚀 Getting Started
Requirements: Node.js 16+ and npm 8+
# Clone repository
git clone https://github.com/gianlucarea/m68k-interpreter.git
cd m68k-interpreter
# Install dependencies
npm install
# Start development server
npm run dev
# Open http://localhost:5173
# Or build for production
npm run build
npm run test # Run tests
npm run lint:fix # Lint and format code
Educational use case
If you teach assembly or CPU architecture and currently rely on Easy68K, this project can be used as a browser-native drop-in alternative. Students can start writing and running m68k code immediately, without local installation constraints.
👨🏫 For Educators
If you teach a course using Easy68K, this works as a drop-in browser-based alternative with zero student setup required. Students can start writing and running m68k code immediately in any modern web browser.
📚 Learn More
Read the full story of the modernization sprint: Building a Motorola 68000 Emulator in the Browser
For complete documentation and examples, visit the project repository.
🙏 Acknowledgments
Built with guidance from Claude and GitHub Copilot. Special thanks to MarkeyJester's Motorola 68000 Beginner's Tutorial for instruction reference material.