init
lda #$01
sta $d019
jsr scroller
jsr $1003
asl $d019
pla
tay
pla
tax
pla
rti
Replace this with:
jmp $ea31 - And end the main prog with RTS rather than JMP *
That would enable you to still be able to move cursor around after starting the program. Can be fun to play around with.
IF you end the main program with JMP * rather than RTS then use JMP $ea81 to end the IRQ. Saves some lines by doing so. Plus some music routines are not too happy with the JMP $ea31 since it uses some zero page addys by the kernal.
There is no need to use the pla, tay, pla, tax, pla, rti - the kernal is your friend. Check kernal listing from $ea7e and viola - you got the whole thing there as well.
---------
As I mentioned in prev. post:
Remove from SCROLLER routine and start with this from the very start of the program - it's only needed to be run once - definitely not every IRQ call. I think the $EA31 would waste A LOT of clock cycles better used by other programming. Save up on the rastertime where you can. You'll need it eventually as you add more routines.
| Code: |
lda #$37
sta $01
ldx #0
inx
stx $0286
jsr $e544
|
...and continue with IRQ setup, etc...