small size optimization in BASIC code

This commit is contained in:
FeralChild64 committed 2020-06-08 19:04:09 +02:00
1 parent 4fe2e27c9e
commit eadced28b9
1 file changed
+11 -16
+11 -16
View File
@@ -29,14 +29,6 @@ execute_statements:
// Not end of the line - it seems we actually have something to execute
cmp #$7F
bcc_16 do_SYNTAX_error // branch if not a token XXX here we should handle variable assignments
cmp #$A6
bcs execute_statements_extended
execute_statements_run_token:
// Initialize temporary string stack - just about any statement might need it
// XXX original C64 ROM initializes this during the startup too - not sure where to put this
@@ -45,6 +37,14 @@ execute_statements_run_token:
ldx #$19
stx TEMPPT
// Check if token is valid for execution
cmp #$7F
bcc_16 do_SYNTAX_error // branch if not a token XXX here we should handle variable assignments
cmp #$A6
bcs execute_statements_extended
#if !HAS_OPCODES_65C02
// Get the jump table entry for it, push it on the stack, and then RTS to start it.
@@ -70,16 +70,11 @@ execute_statements_run_token:
execute_statements_extended:
cmp #$CB
bne !+
// 'GO' command has a strange token, after function tokens
lda #$A7
bne execute_statements_run_token
!:
// XXX here is the place for possible extended BASIC command set
cmp #$CB
beq_16 cmd_go // 'GO' command has a strange token, it is placed after function tokens
jmp do_SYNTAX_error