From f560e26c651cef5557d2df89f1d0329c14f4f35d Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Fri, 5 Jun 2020 23:49:43 +0200 Subject: [PATCH] small size optimization in BASIC code --- c64/basic/commands/cmd_load_verify.s | 15 ++++----------- c64/basic/engine/end_of_statement_check.s | 4 ++-- c64/basic/wedge/wedge_tape.s | 6 +++--- 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/c64/basic/commands/cmd_load_verify.s b/c64/basic/commands/cmd_load_verify.s index c95db67c..ba07cfdf 100644 --- a/c64/basic/commands/cmd_load_verify.s +++ b/c64/basic/commands/cmd_load_verify.s @@ -17,10 +17,6 @@ cmd_load: lda #$00 // mark operation as LOAD sta VERCKB - // C64 BASIC apparently does not clear variables after a LOAD in the - // middle of a program. For safety, we do. - jsr basic_do_clr - // Set default device and secondary address; channel is not important now jsr select_device @@ -83,6 +79,10 @@ cmd_load_no_error: stx VARTAB+0 sty VARTAB+1 + // C64 BASIC apparently does not clear variables after a LOAD in the + // middle of a program. For safety, we do. + jsr basic_do_clr + // Now relink the loaded program, as we cannot trust the line // links supplied. For example, the VICE virtual drive emulation // always supplies $0101 as the address of the next line @@ -97,10 +97,3 @@ cmd_load_no_error: // XXX - should run program if LOAD was used in program mode jmp basic_main_loop - - - - - - -// XXX move functions below to separate files, change names to neuytral diff --git a/c64/basic/engine/end_of_statement_check.s b/c64/basic/engine/end_of_statement_check.s index 6367e274..75ca63d8 100644 --- a/c64/basic/engine/end_of_statement_check.s +++ b/c64/basic/engine/end_of_statement_check.s @@ -9,7 +9,7 @@ end_of_statement_check: - ldy #0 + ldy #$00 #if CONFIG_MEMORY_MODEL_60K ldx #