simplify BASIC execution logic
This commit is contained in:
1 parent
8ecd10d5cd
commit
dec1ce257d
4 files changed
+7
-9
No files matched your search
@@ -26,9 +26,9 @@ no_space_to_skip:
|
||||
sec
|
||||
rts
|
||||
|
||||
basic_run_next_statement:
|
||||
basic_execute_statement:
|
||||
;; Skip over any white space and :
|
||||
jsr basic_end_of_statement_check
|
||||
bcc basic_execute_line
|
||||
|
||||
;; Go through the line until its end is reached.
|
||||
;; If we reach the end are in direct mode, then
|
||||
@@ -37,8 +37,6 @@ basic_run_next_statement:
|
||||
;; return to READY prompt because we have run out
|
||||
;; of program.
|
||||
|
||||
basic_execute_line:
|
||||
|
||||
;; Get next char of program text, even if it is hiding under a ROM or the
|
||||
;; IO area.
|
||||
ldx #<basic_current_statement_ptr
|
||||
@@ -83,7 +81,7 @@ not_a_token:
|
||||
|
||||
basic_skip_char:
|
||||
jsr basic_consume_character
|
||||
jmp basic_execute_line
|
||||
jmp basic_execute_statement
|
||||
|
||||
basic_consume_character:
|
||||
;; Advance basic text pointer
|
||||
@@ -143,7 +141,7 @@ basic_execute_from_current_line:
|
||||
jsr peek_under_roms
|
||||
sta basic_current_line_number+1
|
||||
|
||||
jmp basic_execute_line
|
||||
jmp basic_execute_statement
|
||||
|
||||
basic_command_jump_table:
|
||||
;; $80 - $8F
|
||||
|
||||
@@ -149,5 +149,5 @@ not_a_line:
|
||||
lda #$ff
|
||||
sta basic_current_line_number+1
|
||||
|
||||
jmp basic_execute_line
|
||||
jmp basic_execute_statement
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ cmd_clr:
|
||||
jsr basic_do_clr
|
||||
;; CLR command does not stop execution
|
||||
;; (Cconfirmed on a c64)
|
||||
jmp basic_run_next_statement
|
||||
jmp basic_execute_statement
|
||||
|
||||
basic_do_new:
|
||||
;; Setup pointers to memory storage
|
||||
|
||||
+1
-1
@@ -29,4 +29,4 @@ cmd_sys:
|
||||
;; Call the routine.
|
||||
jsr sys_jmp
|
||||
|
||||
jmp basic_run_next_statement
|
||||
jmp basic_execute_statement
|
||||
Reference in new issue
Block a user