Implement the housekeeping verbs, and stop the REPL spinning after an error

NEW, CLR, CONT, SWAP, TRON, TROFF and HELP. None is in the Go reference, so
what each means here is recorded beside it.

Testing CONT turned up a hang that predates this: the runtime's error class is
deliberately sticky, and with run_finished_mode REPL every later step
re-entered REPL and printed READY -- overwriting the QUIT that end of input
had just set. An interactive session that hit one runtime error printed READY
forever instead of exiting.

RESTORE and RENUMBER are deferred with reasons; RESTORE turns out to need a
DATA pointer this port does not have, which is a defect in its own right.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-31 12:07:50 -04:00
parent f4007d80d4
commit bfac13ff87
11 changed files with 658 additions and 1 deletions

View File

@@ -130,6 +130,7 @@ set(AKBASIC_SOURCES
src/runtime_commands.c
src/runtime_functions.c
src/runtime_graphics.c
src/runtime_housekeeping.c
src/runtime_input.c
src/scanner.c
src/sink_stdio.c
@@ -239,6 +240,7 @@ set(AKBASIC_TESTS
grammar_leaves
graphics_verbs
hostvars
housekeeping_verbs
input_verbs
numeric_contract
parser_commands