Skip to content

Instantly share code, notes, and snippets.

@gbarrancos
Created February 13, 2013 20:47
Show Gist options
  • Save gbarrancos/4948098 to your computer and use it in GitHub Desktop.
Save gbarrancos/4948098 to your computer and use it in GitHub Desktop.
6502 assembly first time. Need a way to loop the entire video memory region [$200,$05FF] only using 8-bit registers
LDY #$00 ;[$0200, $05ff] - video memory region
LDX #$00 ;[#$00,#$0F] - possible color values
shift_color: ;looping through the 16 possible colors
INX
CPX #$0F
BNE paint
LDX #$00
paint:
TXA
STA $0200,Y
INY
CPY #$FF
BNE shift_color
BRK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment