M68K Interpreter 🧠

GR
Gianluca Rea

🧠 Overview

A fully-featured Motorola 68000 (m68k) assembly emulator that runs entirely in your browser. Built with modern tools (React 18, TypeScript, Vite 5), this project replaces the dated Windows-only Easy68K tool with a zero-setup, free alternative for learning CPU architecture and assembly programming.

This project was originally part of my bachelor's thesis (2021) and has been modernized, rewritten, and completed with comprehensive instruction support in 2026.

🌐 Live Demo

Experience the interpreter firsthand: M68K Interpreter Live Demo

🦾 Repository

See the code: m68k-interpreter Repository

šŸ› ļø Features

āœ… 50+ M68K Instructions – Comprehensive instruction set covering most common operations āœ… Interactive Code Editor – Write m68k assembly with syntax highlighting powered by Ace Editor āœ… Step-by-Step Execution – Configurable execution delay to watch code run in real-time ā±ļø āœ… Full Undo/Redo – Complete execution history lets you rewind and replay your code āœ… Register Viewer – Monitor all CPU registers, flags, and condition codes āœ… Memory Inspector – View and analyze memory contents during execution āœ… Detailed Error Reporting – Contextual error messages with line numbers and descriptions āœ… GitHub Star Button – One-click starring directly from the app 😊 āœ… Data Export – Download registers and memory state to file āœ… Responsive UI – Desktop and tablet friendly āœ… Vercel Analytics – Usage tracking to improve the tool āœ… Zero Setup – Runs entirely in the browser, no installation needed

šŸ—ļø Tech Stack

Frontend:

  • →React 18.3 (UI Framework)
  • →TypeScript 5.3 (Type Safety)
  • →Zustand 4.4 (State Management)
  • →Ace Editor (Code Editing)

Build & Development:

  • →Vite 5 (Fast Bundler)
  • →ESLint 8 (Linting)
  • →Prettier 3 (Formatting)

Testing & 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

šŸ‘Øā€šŸ« 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.