Files
LithosAnanke/capsules/v4/sys/end.f18
T
Claude 1aa33f31bf feat(v4): v3's whole POST, Task 8 round -- the rules, and v4 where the rulings put it (#189)
v3's whole POST on v4 at 983 of 1010 (the table's own count with its drops), from 850.
What remains is capacity ("Dictionary full", the 100-900-deep stacks): next, as ruled.

Found and fixed under the rulings (docs/v4.0.0/POST-PARITY.md):
- IS and DEFER@ refuse a word DEFER did not make, as v3: error 22, "Not deferred".
  v4's IS stored into any word -- POST's `42 IS DUP` broke DUP for every case after it.
  DEFER marks its word with flag 128 (dict.f18).
- SMUDGE and HIDDEN are compile-only, as v3's table: at the prompt v4's hid the newest word.
- Q./ by zero gives 0 and no error (ruled: v3's table); error 11 retired. The ROM's,
  the test's reference and its hand-assembled copy changed alike.
- FENCE is v3's: it protects what is defined so far. The variable is (FENCE).
- The line's length is (#SRC), no longer SPAN: an EXPECT in a line cut the rest of
  the line off, and 0 EXPECT could not leave SPAN 0 (FORTH-83).
- POST gains V4_POST_HEAD: the values left and how the output begins -- the form of a
  printout whose values are the run's own (TOP-WORDS, WORD-ENTROPY).

post_all_rules.py: the rest of the whole table where it is not taken as v3 ran it --
v4's units for the cases that wrote through HERE as a byte address (CMOVE>, BLANK,
ERASE, FILL wrote into the system's code), the standard's results (COMPARE, SEARCH,
BASE output, THRU, >BODY with FIND's address), v3's descriptions where v3 printed
otherwise, and the cases dropped with their reasons (SP@/SP! by D-2, DABS/DMIN
underflow, CMOVE>.bounds, THRU.negative_end).

make -C v4 test: all v4 tests passed (both widths, mesh-boot, inference).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RzZgrf7V7Zk2iczBXDRbm
2026-11-14 05:59:11 +00:00

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)