Skip to content

Instantly share code, notes, and snippets.

@gagarine
Last active August 29, 2015 14:23
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 gagarine/77a170585f26704b9c2c to your computer and use it in GitHub Desktop.
Save gagarine/77a170585f26704b9c2c to your computer and use it in GitHub Desktop.
For comodor 64
processor 6502
org $1000
init_screen
lda #$00
sta $d020
sta $d021
lda #$20 ; #$20 is the spacebar Screen Code
clear
sta $0400,x ; fill four areas with 256 spacebar characters
sta $0500,x
sta $0600,x
sta $06e8,x
inx ; increment X
bne clear ; did X turn to zero yet? if not, continue with the loop
; rts ; return from this subroutine
loop: lda $d012
cmp #$ff
bne loop
inc $d021
jmp loop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment