small size optimization in BASIC code

This commit is contained in:
FeralChild64 committed 2020-06-05 23:49:43 +02:00
1 parent 7b82145a8c
commit f560e26c65
3 files changed
+9 -16

No files matched your search

+4 -11
View File
@@ -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
+2 -2
View File
@@ -9,7 +9,7 @@
end_of_statement_check:
ldy #0
ldy #$00
#if CONFIG_MEMORY_MODEL_60K
ldx #<TXTPTR
@@ -27,7 +27,7 @@ end_of_statement_check:
!:
cmp #$00
beq !+
cmp #$3a
cmp #$3A
beq !+
// Not end of statement
+3 -3
View File
@@ -35,7 +35,8 @@ wedge_arrow_L:
// Execute 'arrow + L'
lda #$00
sta FNLEN
sta FNLEN // default file name is empty
sta VERCKB // operation is LOAD, not VERIFY
ldy #$01
#if CONFIG_TAPE_TURBO
@@ -46,8 +47,7 @@ wedge_arrow_L:
jsr JSETFLS
ldy TXTTAB+1
ldx TXTTAB+0
// Perform loading
jmp cmd_load_got_params