go6asm CPU · MOS 6502 (NMOS) nothing installed · works offline

A 6502 assembler, in your browser.

Assembly is the human-readable form of the individual instructions a CPU executes. go6asm turns 6502 assembly into the exact bytes the chip would run, places them in a target machine's memory, and checks the result for mistakes — all in this page, nothing to install. What is assembly? · Pick an example and press Assemble. Hover any iInfo. A circled i marks a term — hover or focus it for a plain-language definition. for a plain-language definition of a term.

§00

What happens when you press Assemble

text → machine, in six stages
1Scan & expand Text becomes tokens; macros, .if and .repeat expand.
2Parse Tokens become a syntax tree — one statement per line.
3Resolve Every label and expression gets a value (ca65 32-bit math).
4Generate Pick addressing modes, emit bytes — two passes so forward references work.
5Link Place segments at real addresses for the target; patch relocations.
6Analyze Trace reachable paths; flag bugs against the device map.

You can write just instructions and let go6asm fill in the rest, or spell out every detail yourself — same language, same result, you decide how much to hand off. The language reference walks through it.

§01

Source

write it · target it · assemble it
Step 1 — the program pick an example to start from, or edit it freely
Step 2 — the target the machine you're building for — it decides the memory layout below

$0000$4000$8000$C000$FFFF
RAM I/O (VIC/VIA) ROM unmapped code load / reset vector
Step 3 — assemble turn the source into bytes for that target, and check it

Loading WebAssembly…

§02

Assembled result

Static analysis iStatic analysis. Without running the program, go6asm traces every path the CPU can take from the reset/IRQ vectors and flags trouble: writing to ROM, touching unmapped memory, hitting a BRK or an illegal opcode. It's honest about what it can't follow (indirect jumps, self-modifying code).
Annotated disassembly iDisassembly. The finished bytes decoded back into instructions, with your labels and — the point — your own source comments threaded back in. Data is shown as .byte, not mis-decoded, because the analyzer knows what's code. addr · bytes · instruction · your comments
Image (hex) iImage. The actual bytes that would be loaded into the machine's memory, shown as a hex dump starting at the load address.
Symbols iSymbols. Named locations — code labels and exported constants — with their resolved addresses. These feed the disassembly and a debugger's memory view.
Debug-info sidecars iSidecars. .lbl is a VICE-monitor label file; .sym is go6asm's canonical symbol JSON. Tools and debuggers consume these to show your names instead of raw addresses. click to expand
out.lbl
out.sym