KullGames RetroCore

A real, from-scratch MOS 6502 (NMOS) CPU core from OnlyCSharp 3.0 ComputerEngineering.Processors.M6502. This page hand-assembles a tiny counting loop, boots the CPU at its reset vector, and single-steps it. Every register value below is computed live at build time - no JavaScript, no WASM.

The program (hand-assembled at $0600)

AddressBytesMnemonicComment
$0600A2 00LDX #$00X = 0
$060286 10STX $10loop: mem[$10] = X
$0604E8INXX++
$0605E0 0ACPX #$0Acompare X to 10
$0607D0 F9BNE $0602branch back if X != 10
$060900BRKhalt

Instruction trace (42 steps)

#PCAXYP
1$0602$00$00$00$26
2$0604$00$00$00$26
3$0605$00$01$00$24
4$0607$00$01$00$A4
5$0602$00$01$00$A4
6$0604$00$01$00$A4
7$0605$00$02$00$24
8$0607$00$02$00$A4
9$0602$00$02$00$A4
10$0604$00$02$00$A4
11$0605$00$03$00$24
12$0607$00$03$00$A4
13$0602$00$03$00$A4
14$0604$00$03$00$A4
15$0605$00$04$00$24
16$0607$00$04$00$A4
17$0602$00$04$00$A4
18$0604$00$04$00$A4
19$0605$00$05$00$24
20$0607$00$05$00$A4
21$0602$00$05$00$A4
22$0604$00$05$00$A4
23$0605$00$06$00$24
24$0607$00$06$00$A4
25$0602$00$06$00$A4
26$0604$00$06$00$A4
27$0605$00$07$00$24
28$0607$00$07$00$A4
29$0602$00$07$00$A4
30$0604$00$07$00$A4
31$0605$00$08$00$24
32$0607$00$08$00$A4
33$0602$00$08$00$A4
34$0604$00$08$00$A4
35$0605$00$09$00$24
36$0607$00$09$00$A4
37$0602$00$09$00$A4
38$0604$00$09$00$A4
39$0605$00$0A$00$24
40$0607$00$0A$00$27
41$0609$00$0A$00$27
42$0000$00$0A$00$27

Result

Final value at zero-page $0010: 9 (0x09). 42 instructions retired, final X register = 10 (0x0A).