ENGINE step 4 Phase 2 (plan docs/v4.0.0/plans/2026-11-13-engine-step4-phase2-word-accounts.md). Rulings, Captain Bob 2026-11-13: "ID field in the header"; "Per heartbeat tick"; the ACL "All of it in Phase 4". - The word ID, at xt-4 before the flags (ENGINE.md 3b). The system's words are numbered as they are assembled, by a new directive, #id, (and #ids, the count), in the C assembler (text.c) and in the machine ROM's (capsules/v4/rom), which counts in the system's own (NEXT-ID). (HEADER) numbers later words; FORGET gives back the IDs it frees, always the newest; COLD resets to (BOOT-ID); (SEAL) records it. All 313 system headers carry the cell. - The kernel's records (v4/mesh.h): (TELL-DEFINED) and (TELL-FORGOTTEN), requests -19/-20 on port 0, which the kernel puts in (WORD-DEFINED)/(WORD-FORGOTTEN) when it seals a node, and reads the system's own words once. A bit per address marks a word's xt (calls into the ROM or headerless code are not words); at call, the bit test and a count. v4_mesh_charge hands the owner the calls since. - The Stadium: stadium_words_charge -- N calls as N of stadium_word_dispatch's dispatches, shared by calls when the reservoir is short; sk_v4.c charges every node's words at the tick beside its opcodes, and stadium_word_forget before an ID is used again. - Tests first: test_text.c, test_host_dict.c, test_host_quit.c (numbering, FORGET, COLD), test_mesh_boot.c (44 checks), kernel/tests/test_stadium_words.c; qemu_session.py: Hera's words admitted after POST. - amd64: Stadium words: promotions=141 after POST, CONSERVED; POST 539/539; word_count=377; dict_hash 0xa854ba15b437d288 (the new cell); the boot 142 s against Phase 1's 153 s. - v4 test, test-32: all pass; v4-checks: 80 programs under the sanitizers, 0 failures; the hosted builds alike. docs/reference/v4-dictionary.tsv: the two new words; FABRIC-3 XLVIII.24. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
40 lines
1.4 KiB
Plaintext
40 lines
1.4 KiB
Plaintext
\ end.f18 -- the end of the system's source: the state it is switched on in.
|
|
\
|
|
\ What was set in C when the nucleus was prebuilt (v4/tools/mkimage.c, gone
|
|
\ since the machine's ROM assembles the system), said with the
|
|
\ ROM's directives (MACHINE.md, the ROM's language). RAM is all zeroes
|
|
\ when the machine starts, so only what is not zero is stored. Then the
|
|
\ image record (map: (IMG)), the addresses a host needs (v4/image.h), and
|
|
\ start: the ROM clears what it used and the node waits for a message.
|
|
|
|
\ the dictionary: empty, at DBASE; the newest entry, the nucleus's last
|
|
store DP DBASE
|
|
store (LATEST) HDR-LINK
|
|
\ the control-flow stack, the number base, the log level
|
|
store (CFP) CFBASE
|
|
store BASE 10
|
|
store (LOG-LEVEL) 2
|
|
\ one vocabulary, FORTH, whose head cell is LATEST; new words go into it
|
|
store CONTEXT (LATEST)
|
|
store CURRENT (LATEST)
|
|
\ the text interpreted is the terminal's
|
|
store (SRC) TIB
|
|
\ what COLD comes back to, and the lowest FORGET goes: the nucleus as it is
|
|
store (BOOT) DBASE
|
|
store (BOOT)+1 HDR-LINK
|
|
\ the word IDs: the system's are 0 .. #ids - 1, numbered as assembled (#189, Phase 2)
|
|
store (NEXT-ID) #ids
|
|
store (BOOT-ID) #ids
|
|
store FENCE DICT-W
|
|
\ nothing has ended badly; nothing has been printed
|
|
store (LINE-STATUS) 1
|
|
store (OUT^) (OUT)
|
|
|
|
\ the image record: where the node waits, its fault table, KEY's code
|
|
store (IMG) &(IDLE)
|
|
store (IMG)+1 &(FAULTS)
|
|
store (IMG)+2 &KEY
|
|
store (IMG)+3 &CR
|
|
|
|
start (IDLE)
|