6502 REPL Workbench

CSA-101 §11.8 + CSA-102 Weeks 1-4. Write 6502 assembly, watch it assemble byte-by-byte, step through it on an in-browser CPU, and see your output land on the UART console. No hardware required. CSA-101 catalog.

How to use this

Type 6502 assembly in the top-left pane. Click Assemble and the bytes appear in the top-right pane with their memory offsets. Click Step to walk one instruction at a time, or Run to execute to the next BRK (the conventional halt). Registers and zero-page memory update on the bottom-left; anything you store into $D012 shows up on the UART console on the bottom-right (same UART contract as the virtual Tang Primer 25K; same contract as the real Tang Primer 25K Week 8 lab).

Programs load at $0200 (the conventional Easy 6502 start address). Memory is 64 KB, all zero on reset. The supported instruction subset is the Easy-6502 tutorial set; any unsupported opcode raises a clean error so you can tell the difference between a typo and a not-yet-implemented mnemonic.

Source editor 6502 asm; one instruction per line; ; starts a comment

Compiled asm offset / bytes / source; the PC row is highlighted

OffsetBytesSource
Click Assemble to see the bytes.

Registers + zero page A / X / Y / SP / PC + $0000-$00FF

A$00
X$00
Y$00
SP$FD
PC$0200
cycles0
N V B D I Z C

UART console writes to $D012 append characters here

_
Compiler integration seam. This round drives the "compiled asm" pane from the academy's Z5.1 6502 encoder directly: source asm goes through VaSixOhTwoEncoder.encodeProgram() and the resulting [{offset, bytes, source, mnemonic, mode}] array drives both the table and the emulator's memory loader. CSA-102's Py6502v compiler will plug in here through the same shape: window.VaPy6502vCompiler.compile(src) -> {asmSource, assembled: [{offset, bytes, ...}]}. The asm pane will then show the compiler-emitted asm with a toggle to view the original Py6502v source. See curriculum-research/csa-100-design-doc-2026-05-16.md §6 + §11.9 for the full dual-execution contract.