Created
February 13, 2013 20:47
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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