feat(v4.0.0): a node is handed a line -- ENGINE.md step 1
A v4 node no longer reads its own command line or prints a prompt. Its host puts a line of text in the node's input buffer and starts it at (LINE); the node interprets it and stops at (IDLE), leaving in (LINE-STATUS) how it ended: completed, an error, or QUIT. The host says " ok" or " ERROR" and prompts, as the kernel's REPL does for a v3 VM. A line may be 1024 characters, a block, as v3's. Ruled 2026-10-05 (V3-PARITY.md 1b); design ENGINE.md 3.1. - quit.v4: (REPL), the node's prompt loop, is gone; (LINE) (IDLE) (DONE) - image.h/.c: v4_line_begin, v4_line_done, v4_line_status; the node is idle at switch-on - boot.c: v4_boot_line, the one loop the hosted binary, the kernel and the capsule loader hand a line with; the code that took " ok" and the prompt back out of the node's output is gone - hosted.c, sk_v4.c: the prompt and the line editing are the host's - test_host_quit.c: the tests are the node's host; two tests of the old 80-character prompt line now test a whole line, 1024 and 1025 characters Verified: make -C v4 test passes at both widths; hosted-check passes on three ISAs; clean qemu with STARFORTH_V4=1 on amd64, aarch64 and riscv64 passes POST (550 of 550) with the same hashes as hosted, and three lines typed at each bare-metal prompt through the serial port are answered correctly (logs/20261005-180922, -181152, -181541). Still the lone node: kernel_main.c starts it before the fleet tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ab7a9bf06f
commit
01c447f9ab
+25
-9
@@ -55,23 +55,39 @@ and fails unless their output is identical and ends in `PARITY:OK`.
|
||||
A capsule line the node does not answer ` ok` to ends the boot, naming the
|
||||
capsule, block and line, with `PARITY:FAIL` and `POST: FAILED`.
|
||||
|
||||
State, 2026-10-05: all six builds start the nucleus, load `v4:forth79.4th`,
|
||||
pass POST and reach `ok>`, with the same lines:
|
||||
State, 2026-10-05, after `ENGINE.md` step 1: all six builds start the nucleus,
|
||||
load `v4:forth79.4th`, pass POST and reach `ok>`, with the same lines:
|
||||
|
||||
```
|
||||
PARITY:V4_NUCLEUS words=295 image_hash=0x3ed5d5fc83f0b026
|
||||
PARITY:V4_CAPSULE name=v4:forth79.4th capsule_id=0x4055641ee17d176b capsule_hash=0x4055641ee17d176b dict_hash=0x1ec33b48cc76a0b5
|
||||
PARITY:V4_NUCLEUS words=295 image_hash=0x3b5a9a7a2f7c5361
|
||||
PARITY:V4_CAPSULE name=v4:forth79.4th capsule_id=... dict_hash=0xc45c4db43ea0b1f1
|
||||
PARITY:V4_POST tests=550 pass=550 fail=0
|
||||
PARITY:V4_CAPSULE name=v4:post79.4th capsule_id=0xb987dbb4388990bd capsule_hash=0xb987dbb4388990bd dict_hash=0x671fdd7aebf0f8d8
|
||||
PARITY:V4_CAPSULE name=v4:post79.4th capsule_id=... dict_hash=0x88df0873060da73e
|
||||
PARITY:OK
|
||||
POST: PASSED
|
||||
ok>
|
||||
```
|
||||
|
||||
Bare-metal logs: `logs/20261005-161924/amd64/`, `logs/20261005-162142/aarch64/`,
|
||||
`logs/20261005-162524/riscv64/`. Each run was ended once the prompt was in the
|
||||
log; nothing was typed at a bare-metal prompt, so keyboard input there is not
|
||||
yet verified. The capsules were unsigned (no signing key on this machine).
|
||||
Bare-metal logs: `logs/20261005-180922/amd64/`, `logs/20261005-181152/aarch64/`,
|
||||
`logs/20261005-181541/riscv64/`. On each, three lines were then typed at the
|
||||
prompt through the serial port — a definition, its use with the capsule's
|
||||
`U*`, and an unknown word — and each answered as the hosted binary does. The
|
||||
capsules were unsigned (no signing key on this machine).
|
||||
|
||||
**A node is handed a line** (`docs/v4.0.0/ENGINE.md` 3.1). It does not read
|
||||
its own command line and prints no prompt. Its host puts the text in the
|
||||
node's input buffer and starts it at `(LINE)`; the node interprets the text
|
||||
and stops at `(IDLE)`, leaving in `(LINE-STATUS)` how it ended. The host says
|
||||
` ok` or ` ERROR` and prompts, as the kernel's REPL does for a v3 VM. A line
|
||||
may be 1024 characters, a block. `v4_line_begin`, `v4_line_done` and
|
||||
`v4_line_status` (`v4/include/v4/image.h`) are that interface;
|
||||
`v4_boot_line` (`v4/system/boot.c`) is the one loop the hosted binary, the
|
||||
kernel and the capsule loader all run it with.
|
||||
|
||||
**This is still the lone node.** On bare metal `kernel_main.c` starts it
|
||||
before the fleet tables, beside the kernel's own system and not in the VM's
|
||||
place. `ENGINE.md` sets out the steps from here; step 1 is the only one
|
||||
done. `V3-PARITY.md` records the rulings it is built from.
|
||||
|
||||
**What this does not yet show.** `forth79.4th` holds two definitions, `U*`
|
||||
and `U/MOD`. Every other word is still in the assembled nucleus, so POST is
|
||||
|
||||
Reference in New Issue
Block a user