scroll_test2 lda #$c0 sta $d1 lda #$00 sta $d0 lda #$04 sta $d3 lda #$00 sta $d2 ldx #$19 @loop ldy #$00 lda ($d0),y sta ($d2),y iny ... the above three lines are repeated 39 time lda ($d0),y sta ($d2),y clc lda $d0 adc #$50 sta $d0 bcc @lp1 inc $d1 clc @lp1 lda $d2 adc #$28 sta $d2 bcc @lp2 inc $d3 @lp2 dex beq @loop2 jmp @loop @loop2 rts
frame=$ff *=$0801 BYTE $0B, $08, $0A, $00, $9E, $33, $30, $37, $32, $00, $00, $00 *=$0c00 init lda #$7f sta $DC0D ;"Switch off" interrupts signals from CIA-1 and $D011 sta $D011 ;Clear most significant bit in VIC's raster register lda #$01 sta $D012 ; set raster to occour 1 lines down lda #<irq_handler sta $0314 ; set low bit of start lda #>irq_handler sta $0315 ; set high bit of start lda #$01 sta $D01A ;enable raster interrupts @endloop jmp @endloop irq_handler inc $d020 ldy #$29+$7c ;change the $29 to change direction, $00 = up, $50=down $27=left, $29 =right inc frame lda frame and #$01 beq @loopy lda $d018 and $0f ora #$10 sta $d018 jsr scroll_btof jmp @exit @loopy lda $d018 and $0f ora #$20 sta $d018 jsr scroll_ftob @exit dec $d020 asl $D019 JMP $EA31 scroll_btof ldx #$7c @loop1 LDA $0400-$28,y STA $0800,x LDA $047D-$28,y STA $087D,x LDA $04FA-$28,y STA $08FA,x LDA $0577-$28,y STA $0977,x LDA $05F4-$28,y STA $09F4,x LDA $0671-$28,y STA $0A71,x LDA $06EE-$28,y STA $0AEE,x LDA $076B-$28,y STA $0B6B,x dey dex bpl @loop1 rts scroll_ftob ldx #$7c @loop1 LDA $0800-$28,y STA $0400,x LDA $087D-$28,y STA $047D,x LDA $08FA-$28,y STA $04FA,x LDA $0977-$28,y STA $0577,x LDA $09F4-$28,y STA $05F4,x LDA $0A71-$28,y STA $0671,x LDA $0AEE-$28,y STA $06EE,x LDA $0B6B-$28,y STA $076B,x dey dex bpl @loop1 rts