Created
December 29, 2017 14:30
-
-
Save theblazehen/dc49cbb4894bed7d82c1fa12c94591d8 to your computer and use it in GitHub Desktop.
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
* = $1000 | |
;;; disable interrupts | |
LDA #%01111111 | |
STA $DC0D | |
;;; disable text screen | |
LDA #11 | |
STA $D011 | |
newline: | |
NOP ; 2 cycles | |
NOP | |
LDX #2 ; 2 cycles, load in red | |
STX $D020 ; 4 cycles, write to graphics mem | |
INC $D020 ; 6 cycles, next colour | |
INC $D020 | |
INC $D020 | |
INC $D020 | |
INC $D020 | |
INC $D020 | |
LDX #0 ; 2 cycles, back to black | |
STX $D020 | |
LDA $d012 ; 4 cycles, load current line into A | |
waitforline: ; 9 cycles when looping, 7 when hit | |
CMP $d012 ; 4 cycles | |
BNE newline ; 2 cycles when missed | |
JMP waitforline ; 3 cycles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment