Skip to content

Instantly share code, notes, and snippets.

@jeff-1amstudios
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeff-1amstudios/10fdb176536e0908568a to your computer and use it in GitHub Desktop.
Save jeff-1amstudios/10fdb176536e0908568a to your computer and use it in GitHub Desktop.
c64 initial screen
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