Last active
August 29, 2015 14:10
-
-
Save jeff-1amstudios/10fdb176536e0908568a to your computer and use it in GitHub Desktop.
c64 initial screen
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
ldx #0 ; X = 0 | |
.loop | |
txa ; copy X to A | |
sta $0400, x ; put A at $0400+X | |
sta $d800, x ; put A as a color at $d800+x. Color RAM only considers the lower 4 bits, | |
; so even though A will be > 15, this will wrap nicely around the 16 available colors | |
inx ; X=X+1 | |
cpx #27 ; have we written enough chars? | |
bne .loop | |
rts ; all done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment