Skip to content

Instantly share code, notes, and snippets.

@fsphil
Created August 13, 2019 23:40
Show Gist options
  • Save fsphil/01bda1a9dd58c219002ddd6e18b36c3f to your computer and use it in GitHub Desktop.
Save fsphil/01bda1a9dd58c219002ddd6e18b36c3f to your computer and use it in GitHub Desktop.
32 byte X
ov = $90 ; == $40, initial value for the overflow counter
ct = $D5 ; == $4F / 79, number of passes. Decrementing, finished at -1
sp = $D1 ; == $07C0, pointer to the bottom line (only set after scolling)
* = $0304 - (end - scroll)
scroll: jsr $E8EA
loop: ldy ct
lda #$A0
sta $D020, y
sta (sp), y
sta $07C0 - $B, x
inc $D6
adc ov
sta ov
dec ct
bmi *
bcc loop - 1
jmp scroll
end:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment