fix more problems with loading. Now SEARCHING FOR message works.

This commit is contained in:
Paul Gardner-Stephen committed 2019-05-05 01:38:51 +09:30
1 parent e547b56003
commit e6fee5e979
2 files changed
+14 -13

No files matched your search

+7 -9
View File
@@ -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 +
+7 -4
View File
@@ -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 #<current_filename_ptr
jsr peek_under_roms
sta $0609,y
jsr $ffd2
iny
jmp print_filename_loop
@@ -128,6 +130,7 @@ sent_filename:
jsr printf
.byte "LOADING",$0d,0
;; Get load address and store it if secondary address is zero
jsr iec_rx_byte
bcs load_error
@@ -142,7 +145,7 @@ sent_filename:
sta load_save_start_ptr+1
*
load_loop:
load_loop:
;; We are now ready to receive bytes
jsr iec_rx_byte
bcs load_error