BLOAD/BVERIFY can now parse parameters and read data

This commit is contained in:
FeralChild64 committed 2020-06-24 17:30:49 +02:00
1 parent f2520eacb2
commit 4462a15061
6 files changed
+92 -42

No files matched your search

+24 -12
View File
@@ -10,24 +10,16 @@ cmd_merge:
// Fetch the file name
jsr helper_load_fetch_filename
bcc !+
jsr helper_bload_fetch_filename
// No filename supplied - this should only be allowed for tape (device number below 8)
lda FA
and #%11111000
bne_16 do_MISSING_FILENAME_error
lda #$00
sta FNLEN
!:
// Fetch device number
jsr helper_load_fetch_devnum
// Perform loading - just for a different address
// XXX sometimes works, sometimes does not - probably improper handling of VARTAB somewhere
sec
lda VARTAB+0
sbc #$02
@@ -38,4 +30,24 @@ cmd_merge:
!:
ldy VARTAB+1
jmp cmd_load_loadmerge // XXX check variable handling (VARTAB) after failure to load
lda VERCKB // LOAD or VERIFY
jsr JLOAD
bcs_16 do_kernal_error
cmd_merge_no_error:
// Store last loaded address
stx VARTAB+0
sty VARTAB+1
// Clear the variables
jsr basic_do_clr
// Now relink the loaded program, line links supplied are almost certainly wrong
jsr LINKPRG
// Continue execution
jmp execute_statements