diff --git a/c64/basic/cmd_load.s b/c64/basic/cmd_load.s index f95f8dc3..d048fe62 100644 --- a/c64/basic/cmd_load.s +++ b/c64/basic/cmd_load.s @@ -11,13 +11,6 @@ cmd_load: ;; middle of a program. For safety, we do. jsr basic_do_clr - ;; Try to load an IEC file - lda #0 ; use supplied load address, not the one from the file - sta current_secondary_address - lda #$00 ; LOAD not verify - ldx #<$0801 ; LOAD address = $0801 - ldy #>$0801 - ;; Set filename and length lda #$00 sta current_filename_length @@ -56,8 +49,13 @@ getting_filename: got_filename: - lda current_filename_length - + ;; Try to load an IEC file + lda #0 ; use supplied load address, not the one from the file + sta current_secondary_address + lda #$00 ; LOAD not verify + ldx #<$0801 ; LOAD address = $0801 + ldy #>$0801 + jsr $ffd5 bcc + diff --git a/c64/kernal/load.s b/c64/kernal/load.s index 59de1aab..c2ac12a4 100644 --- a/c64/kernal/load.s +++ b/c64/kernal/load.s @@ -31,13 +31,15 @@ load: ;; Display SEARCHING FOR jsr printf - .byte "SEARCHING FOR " + .byte "SEARCHING FOR ",0 - ldy #0 + ldy #$00 print_filename_loop: cpy current_filename_length beq + - lda (current_filename_ptr),y + ldx #