;Prepare loader and start of demo... *=$8f00 jsr $8000 ;Initialise disk-drive fastloader. bcc load_setup_ok ;If no carry, init successfull. inc $d020 ;Else, flash border, saying no drive is connected, etc. jmp $8f00 ;Loop back to check again. load_setup_ok jmp irqstart ;Call main IRQ to setup and start demo. ;This part is JMPed to after IRQ is set up. load_restart jsr $0506 ;Shut up the disk-drive. load_next lda #$00 ;Shift next two files to the file handle to load. sta load_start+1 ; load_third lda #$00 ; sta load_next+1 ; lda #$00 ; sta load_third+1 ; load_start lda #$00 ;Main driver loop to check for next file to load. beq load_next clc adc #$2b ;Offset to store char as "@" onwards cmp #$3f ;Check if the char is a "?" (invalid filechar) bne *+4 lda #119 ;Set it as another unique symbol sta load_filename jsr $0509 ;Wake up the disk-drive. load_retry ldy #>load_filename ;and load the file... ldx #<load_filename ; lda #$02 ;(first 2 chars required from filename) jsr $0500 ; bcs load_error ;If no carry, load was successful. lda load_start+1 ;Do we need to restart the tune after load? cmp #$11 bcc load_restart ;Skip if not a tune loaded. lda #$00 ;Else start loaded music. tax tay jsr $1000 jmp load_restart load_error ;If load unsuccessful, check the right disk is inserted. ...blah...blah...blah load_filename !text " *"