Capsule blocks steps 3+4 for v4: capsules are placed in RAM and load their lowest block

Captain Bob ruled: Block n lands at n-R; the lowest block is
interpreted; chaining is the developer's; together, v4 first.
- v4_blocks_place_capsule copies each Block n into RAM block n - R as 16
  lines of 64, space-padded, in any file order. A later block of the
  same number overwrites. It refuses a block below R.
- The mesh's load(), its capsule reader (CAPSULE-OPEN/(LINES), so a
  child's forth79.4th via BIRTH too), boot.c and test_host_unit's model
  each place a capsule, then interpret "<lowest> LOAD".
- mkdictionary.py skips --> when it types capsules at the hosted prompt.
- The v4 capsules are renumbered into R..2R-1, landing at RAM 1900 and
  up, away from POST's blocks 0-5. Each is chained with -->, and
  centre.4th's gap at 8103 is closed.

Test first:
- test_host_blocks.c gained 6 placement checks; it failed to build
  before.
- test_mesh_boot.c checks forth79's lowest block in RAM block 1900; it
  failed before.

After: POST is 990/990; all 52 tests at 64 bits, test-32, hosted-check
and ASan/UBSan pass; the amd64 kernel builds; the dictionary has 404
words.

Logs are in logs/20261118-capsule-place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
This commit is contained in:
Claude
2026-11-18 20:33:21 +00:00
parent bcfca9fa19
commit 6dcfbe6740
27 changed files with 1399 additions and 97 deletions
+4
View File
@@ -143,6 +143,10 @@ int main(void)
/* ---- lines, as messages ---- */
r = line(V4_MESH_HERA, "3 4 + .", &how);
CHECK(how == V4_TEXT_COMPLETED && strcmp(r, "7 ") == 0, "a line to Hera: \"%s\" (%d)", r, how);
/* the capsules were placed in RAM, block n at n - R, and loaded from there (capsule blocks plan, step 4):
* forth79.4th's lowest block, 3948, is RAM block 1900 */
r = line(V4_MESH_HERA, "1900 BLOCK 16 TYPE", &how);
CHECK(how == V4_TEXT_COMPLETED && strncmp(r, "( forth79.4th --", 16) == 0, "forth79.4th's lowest block is in RAM block 1900: \"%.20s\" (%d)", r, how);
/* starshipos.4th, a system capsule loaded before POST (MACHINE.md 3, step 3; ruled 2026-11-18) */
r = line(V4_MESH_HERA, "STARSHIPOS S\" ok\" DOE", &how); /* COLD leaves FORTH alone in the search; init.4th will set it */
CHECK(how == V4_TEXT_COMPLETED && strcmp(r, "ok") == 0, "starshipos.4th is loaded: in STARSHIPOS, DOE types its name: \"%s\" (%d)", r, how);