From 8a16ce39346387d6d13e4c1f6c419066ab6c7dc6 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Sat, 6 Jun 2020 15:54:31 +0200 Subject: [PATCH] LOAD/VERIFY commands finished --- c64/,,config_custom.s | 2 +- c64/basic/commands/cmd_load_verify.s | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/c64/,,config_custom.s b/c64/,,config_custom.s index adef8403..84c60ab8 100644 --- a/c64/,,config_custom.s +++ b/c64/,,config_custom.s @@ -48,7 +48,7 @@ #define CONFIG_IEC // #define CONFIG_IEC_DOLPHINDOS // #define CONFIG_IEC_DOLPHINDOS_FAST -// #define CONFIG_IEC_JIFFYDOS +#define CONFIG_IEC_JIFFYDOS // #define CONFIG_IEC_JIFFYDOS_BLANK // #define CONFIG_IEC_BURST_CIA1 // please keep disabled for now // #define CONFIG_IEC_BURST_CIA2 // please keep disabled for now diff --git a/c64/basic/commands/cmd_load_verify.s b/c64/basic/commands/cmd_load_verify.s index 5ba69324..e93888dc 100644 --- a/c64/basic/commands/cmd_load_verify.s +++ b/c64/basic/commands/cmd_load_verify.s @@ -70,6 +70,11 @@ cmd_load_no_error: stx VARTAB+0 sty VARTAB+1 + // For VERIFY - this is it + + lda VERCKB + bne cmd_load_end + // C64 BASIC apparently does not clear variables after a LOAD in the // middle of a program. For safety, we do. jsr basic_do_clr @@ -86,5 +91,15 @@ cmd_load_no_error: // Reset to start of program jsr init_oldtxt - // XXX - should run program if LOAD was used in program mode + // If loading was done when running a program - run it + + ldx CURLIN+1 + inx + beq cmd_load_end // branch if direct mode + + // XXX + jmp basic_execute_from_current_line + +cmd_load_end: + jmp basic_main_loop