.const scr = 2 .var music = LoadSid("Echoing.sid") .pc = $0801 :BasicUpstart(start) .pc = $0810 "program" start: lda #0 sta $d020 sta $d021 sta scr jsr music.init ldx #0 clear: lda #$20 sta $0400,x sta $0500,x sta $0600,x sta $06e8,x lda #YELLOW sta $d800,x dex bne clear // lda #'x' // sta $0400 + 39 lda #'8' sta $0700 lda #$c7 sta $d016 main: lda #140 wait1: cmp $d012 bne wait1 clc adc #2 wait2: cmp $d012 bne wait2 dec $d020 jsr pixels dec $d020 jsr music.play inc $d020 inc $d020 jmp main pixels: lda $d016 and #7 sec sbc #1 bpl skip pha ldx #0 cpyloop: lda $0401,x sta $0400,x inx cpx #39 bne cpyloop repeat: ldx scr lda scrolltext,x bne common sta scr beq repeat common: sta $0400 + 39 inc scr pla skip: and #7 ora #$c0 sta $d016 rts .align 256 scrolltext: .text "hej hopp alla som kodar c64" .text " " .byte 0 .print "end of code: $"+toHexString(*) *=music.location "Music" .fill music.size, music.getData(i)