Skip to content

Instantly share code, notes, and snippets.

@deurell
Created April 23, 2017 15:49
Show Gist options
  • Save deurell/eadff5f7f437a228917bf4ae95c039a5 to your computer and use it in GitHub Desktop.
Save deurell/eadff5f7f437a228917bf4ae95c039a5 to your computer and use it in GitHub Desktop.
6510 scroller
BasicUpstart2(start)
* = $1000
start:
sei
lda #$7f
sta $dc0d
sta $dd0d
lda #$01
sta $d01a
lda $d011
and #$7f
sta $d011
lda #$c0
sta $d012
lda #$00
sta $d020
sta $d021
lda #<irq
sta $0314
lda #>irq
sta $0315
jsr clearscreen
cli
jmp *
irq:
jsr scroller
dec $d019
jmp $ea81
clearscreen:
ldx #$00
ldy #$01
clp:
lda #$20
sta $0400,x
sta $0500,x
sta $0600,x
sta $0700,x
tya
sta $d800,x
sta $d900,x
sta $da00,x
sta $db00,x
tay
inx
bne clp
rts
scroller:
dec $d016
lda $d016
and #$07
sta $d016
cmp #$07
beq newchar
rts
newchar:
ldx scrollpos
lda scrolltext,x
sta $0427
ldx #$00
ls:
lda $0401,x
sta $0400,x
inx
cpx #$28
bne ls
inc scrollpos
rts
scrollpos:
.byte $00
scrolltext:
.text " well this is just a scrolltext that has to be written. it was quite some time since last time if i remember correctly... "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment