processor 6502
org $F000
Start:
SEI
CLD
LDX #$FF
TXS
LDA #0
LDX #$FF
ClearMem:
STA $00,X
DEX
BNE ClearMem
MainLoop:
LDA #2
STA VSYNC
STA WSYNC
STA WSYNC
STA WSYNC
LDA #0
STA VSYNC
LDA #2
STA VBLANK
LDX #37
VBlankLoop:
STA WSYNC
DEX
BNE VBlankLoop
LDA #0
STA VBLANK
LDA #$84
STA COLUBK
LDX #192
ScanLoop:
STA WSYNC
DEX
BNE ScanLoop
LDA #2
STA VBLANK
LDX #30
OverscanLoop:
STA WSYNC
DEX
BNE OverscanLoop
JMP MainLoop
org $FFFC
.word Start
.word Start