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:
@@ -1,10 +1,11 @@
|
||||
Block 6000
|
||||
Block 3948
|
||||
( forth79.4th -- the FORTH-79 Required Word Set for v4, )
|
||||
( as colon definitions, loaded when the system boots. )
|
||||
( docs/v4.0.0/NUCLEUS.md. Blocks 6000 up. )
|
||||
( docs/v4.0.0/NUCLEUS.md. Blocks 3948 up. )
|
||||
( A word moves here from the assembled nucleus, v4/capsule, )
|
||||
( once its colon definition passes POST. )
|
||||
Block 6001
|
||||
-->
|
||||
Block 3949
|
||||
( U* U/MOD -- FORTH-79 unsigned multiply and divide. )
|
||||
( Neither v3 nor the v4 nucleus had them. )
|
||||
( The first two words count the bits in a cell. )
|
||||
@@ -14,7 +15,8 @@ Block 6001
|
||||
VARIABLE (UD)
|
||||
( u1 u2 -- ud the unsigned double product )
|
||||
: U* UM* ;
|
||||
Block 6002
|
||||
-->
|
||||
Block 3950
|
||||
( ud u1 -- u2 u3 unsigned: u2 the remainder, u3 the quotient )
|
||||
( One bit a step: shift ud left, and take u1 from its high )
|
||||
( cell whenever it goes, counting that in the low cell. )
|
||||
|
||||
Reference in New Issue
Block a user