Files
LithosAnanke/docs/reference/v4-dictionary.tsv
T
Claude e8e7ec8b9f feat(v4): word accounts at call -- the word ID in the header, the kernel's records, the Stadium charged per tick (#189)
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
2026-11-13 19:12:44 +00:00

28 KiB

1# docs/reference/v4-dictionary.tsv -- the dictionary of v4 (#157): name, stack notation,
2# description, tab-separated. The names are the live system's (v4/tools/mkdictionary.py
3# check refuses a missing or a stale one). A row whose description starts TODO is a draft.
4!( x addr -- )Store x in the cell at addr.
5#( ud1 -- ud2 )Pictured output: divide ud1 by BASE, put the remainder's digit in front of the string being built, leave the quotient.
6#>( ud -- baddr u )End pictured output: drop ud and leave the string built since <#.
7#S( ud -- 0 0 )Pictured output: convert digits with # until the number is zero (at least one digit).
8'( -- addr )' xxx: the parameter field address of xxx; compiled as a literal when compiling.
9(( -- )( text): a comment, ended by the first ); immediate.
10(BITS)( -- n )The number of bits in a cell, counted at run time (forth79.4th; used by U/MOD).
11(CONSOLE)( -- addr )Variable: the node that what this node prints is sent to, as messages (core.f18).
12(LOST)( -- addr )Variable: a count of the messages this node has dropped -- nowhere to send them, or no room.
13(ME)( -- addr )Variable: this node's number in the mesh.
14(NB)( -- n )Constant: the bits in a cell, (BITS) counted once at load (forth79.4th).
15(REFUSED)( -- addr )Variable: a count of the messages that came back to this node, refused.
16(SEAL)( -- )What is in the dictionary now is the system: COLD returns to it and FORGET will not go below it.
17(TELL-DEFINED)( xt -- )Tells the kernel that an entry has been made, with its code at xt (request -19 on port 0). The kernel puts it in (WORD-DEFINED) when it seals a node.
18(TELL-FORGOTTEN)( w -- )Tells the kernel that every entry from word address w up has gone (request -20 on port 0). The kernel puts it in (WORD-FORGOTTEN) when it seals a node.
19(UD)( -- addr )Variable: U/MOD's divisor while it divides (forth79.4th).
20(WORD-DEFINED)( -- addr )Variable: the hook told when an entry is made, with the xt its code will be at.
21(WORD-FORGOTTEN)( -- addr )Variable: the hook told when entries are forgotten, with the word address they went from.
22*( n1 n2 -- n3 )Multiply: the low cell of the product.
23*/( n1 n2 n3 -- n4 )n1 times n2 divided by n3, through a double-cell intermediate product.
24*/MOD( n1 n2 n3 -- n4 n5 )n1 times n2 divided by n3, through a double product: n4 the remainder, n5 the quotient.
25+( n1 n2 -- n3 )Add.
26+!( n addr -- )Add n to the cell at addr.
27+LOOP( n -- )Compile-only: end a DO loop, adding n to the index; the loop ends when the index crosses the limit.
28,( x -- )Compile x into the next cell of the dictionary.
29-( n1 n2 -- n3 )Subtract: n1 minus n2.
30-!( n addr -- )Subtract n from the cell at addr.
31-->( -- )Go on loading with the next block; only in a block being loaded.
32-ROT( x1 x2 x3 -- x3 x1 x2 )Rotate the top three values the other way from ROT.
33-TRAILING( baddr u1 -- baddr u2 )The string without its trailing blanks.
34.( n -- )Print n in the current BASE, then a blank.
35.R( n width -- )Print n right-justified in a field of width characters.
36.S( -- )Print the stack's depth and every value on it, the stack unchanged.
37/( n1 n2 -- n3 )Divide: the quotient of n1 by n2. Division by zero is error 11.
38/MOD( n1 n2 -- n3 n4 )Divide n1 by n2: n3 the remainder, n4 the quotient.
390<( n -- flag )True if n is negative.
400<>( x -- flag )True if x is not zero.
410=( x -- flag )True if x is zero.
420>( n -- flag )True if n is greater than zero.
431+( n -- n+1 )Add one.
441-( n -- n-1 )Subtract one.
452!( x1 x2 addr -- )Store the cell pair at addr: x2 at addr, x1 in the next cell.
462*( n -- 2n )Shift left one bit.
472+( n -- n+2 )Add two.
482,( x1 x2 -- )Compile the cell pair into the dictionary.
492-( n -- n-2 )Subtract two.
502/( n -- n/2 )Shift right one bit, keeping the sign.
512>R( x1 x2 -- ) ( R: -- x1 x2 )Compile-only: move the pair to the return stack.
522@( addr -- x1 x2 )Fetch the cell pair at addr.
532DROP( x1 x2 -- )Drop the top pair.
542DUP( x1 x2 -- x1 x2 x1 x2 )Copy the top pair.
552OVER( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )Copy the second pair to the top.
562R>( -- x1 x2 ) ( R: x1 x2 -- )Compile-only: move the pair from the return stack.
572R@( -- x1 x2 ) ( R: x1 x2 -- x1 x2 )Compile-only: copy the pair on the return stack.
582ROT( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 )Rotate the top three pairs.
592SWAP( x1 x2 x3 x4 -- x3 x4 x1 x2 )Exchange the top two pairs.
6079-STANDARD( -- )Run to be sure a FORTH-79 system is there; it is.
61:( -- ): xxx: start a definition of xxx; it cannot be found until ; ends it.
62;( -- )Compile-only: end the definition -- compile its return, let it be found, stop compiling.
63<( n1 n2 -- flag )True if n1 is less than n2.
64<#( -- )Begin pictured numeric output.
65<=( n1 n2 -- flag )True if n1 is less than or equal to n2.
66<>( x1 x2 -- flag )True if x1 and x2 differ.
67=( x1 x2 -- flag )True if x1 equals x2.
68>( n1 n2 -- flag )True if n1 is greater than n2.
69>=( n1 n2 -- flag )True if n1 is greater than or equal to n2.
70>BODY( xt -- addr )The parameter field of the word whose execution token is xt.
71>IN( -- addr )Variable: the offset in the input buffer of the next character to read.
72>LINK( xt -- lfa )The link field of the entry whose execution token is xt.
73>NAME( xt -- nfa )The name field of the entry whose execution token is xt.
74>R( x -- ) ( R: -- x )Compile-only: move x to the return stack.
75?( addr -- )Print the number in the cell at addr.
76?DO( limit index -- )Compile-only: begin a DO loop that is skipped when limit equals index.
77?DUP( x -- x x | 0 )Copy x if it is not zero.
78?TERMINAL( -- flag )True if a key has been pressed and is waiting.
79@( addr -- x )Fetch the cell at addr.
80ABORT( -- )Empty the data and return stacks, set execution mode, return control to the terminal.
81ABS( n -- u )The absolute value.
82ACL-ALLOW!( flag xt -- )Set the word's allow flag (the word-level ACL); nothing on a pinned word.
83ACL-ALLOW@( xt -- flag )The word's allow flag.
84ACL-HEAT@( xt -- heat )How often the word has been used: its heat counter.
85ACL-HOOK( -- addr )Variable: the execution token of the ACL recheck word, or 0 for none.
86ACL-INHERIT( src dst -- )dst takes src's ACL mode; it is not pinned, its TTL is 0.
87ACL-INIT-PRIMITIVES( -- )Set every word in every vocabulary to its starting ACL fields.
88ACL-MODE!( mode xt -- )Set the word's ACL mode; nothing on a pinned word.
89ACL-MODE@( xt -- mode )The word's ACL mode.
90ACL-PIN( xt -- )Pin the word: its ACL fields can no longer be changed. One-way.
91ACL-PINNED?( xt -- flag )True if the word is pinned.
92ACL-TTL!( n xt -- )Set the word's ACL time-to-live (0 to 65535); nothing on a pinned word.
93ACL-TTL@( xt -- n )The word's ACL time-to-live.
94ACL-WORD-ID( xt -- n )A number for the word that never changes: its address.
95AGAIN( -- )Compile-only: end a BEGIN loop that repeats for ever.
96ALIGN( -- )Align the dictionary pointer to the next cell.
97ALLOT( n -- )Reserve n cells of dictionary space.
98AND( x1 x2 -- x3 )Bitwise and.
99ANTICLOCK@( -- n )The anti-clock: how many instructions the node has retired, one tick each (#189).
100AWAIT( node -- how )Wait for the node's word on how its text ended: 0 QUIT, 1 completed, otherwise an error.
101BASE( -- addr )Variable: the number base for conversion in and out.
102BEGIN( -- )Compile-only: mark the start of a loop (UNTIL, WHILE ... REPEAT, AGAIN).
103BL( -- c )Constant: the blank character, 32.
104BLANK( baddr u -- )Fill u bytes from baddr with blanks.
105BLK( -- addr )Variable: the block being interpreted, or 0 for the terminal.
106BLOCK( n -- baddr )A buffer holding block n, read from storage if it is not already in one.
107BUFFER( n -- baddr )A buffer assigned to block n, not read from storage.
108BYE( -- )A cold restart of the machine (the kernel's word).
109C!( c baddr -- )Store the byte c at baddr.
110C,( c -- )Compile the byte c into the dictionary.
111C@( baddr -- c )Fetch the byte at baddr.
112CASE( -- )Compile-only: begin a CASE ... OF ... ENDOF ... ENDCASE selection.
113CELLS( n1 -- n2 )n1 cells, in address units.
114CFA( pfa -- cfa )The code field address from the parameter field address.
115CMOVE( baddr1 baddr2 u -- )Copy u bytes from baddr1 to baddr2, lowest first.
116CMOVE>( baddr1 baddr2 u -- )Copy u bytes from baddr1 to baddr2, highest first (for overlapping moves up).
117COLD( -- )Return the system to what it was when its capsules had just been loaded.
118COMPARE( baddr1 u1 baddr2 u2 -- n )Compare two strings: 0 if equal, -1 if the first is lower, 1 if higher.
119COMPILE( -- )COMPILE xxx: when the word containing this runs, compile xxx.
120CONSTANT( n -- )CONSTANT xxx: define xxx, which leaves n.
121CONTEXT( -- addr )Variable: the vocabulary searched first.
122CONVERT( d1 baddr1 -- d2 baddr2 )Convert the digits from baddr1+1 into d1 in BASE; baddr2 is the first character that is not a digit.
123COUNT( baddr1 -- baddr2 u )From a counted string: its first character's address and its length.
124CR( -- )Print a new line.
125CREATE( -- )CREATE xxx: an entry whose word leaves the address of its parameter field.
126CURRENT( -- addr )Variable: the vocabulary new definitions go into.
127D+( d1 d2 -- d3 )Add two double-cell numbers.
128D-( d1 d2 -- d3 )Subtract d2 from d1.
129D.( d -- )Print the double-cell number d, then a blank.
130D.R( d width -- )Print d right-justified in a field of width characters.
131D0<( d -- flag )True if d is negative.
132D0=( d -- flag )True if d is zero.
133D2*( d1 -- d2 )Shift d1 left one bit.
134D2/( d1 -- d2 )Shift d1 right one bit, keeping the sign.
135D<( d1 d2 -- flag )True if d1 is less than d2.
136D=( d1 d2 -- flag )True if d1 equals d2.
137DABS( d -- ud )The absolute value of d.
138DECIMAL( -- )Set BASE to ten.
139DEFAULT-ROUTE( port -- )The port, by its number, leads toward every node this node has not been told of.
140DEFER( -- )DEFER xxx: define xxx, whose action is set later by IS; run unset, it is error 15.
141DEFER@( -- xt )DEFER@ xxx: the execution token xxx runs now; compiled when compiling.
142DEFINITIONS( -- )New definitions go into the CONTEXT vocabulary from now on.
143DEPTH( -- n )The number of values on the stack before DEPTH.
144DMAX( d1 d2 -- d3 )The greater of two doubles.
145DMIN( d1 d2 -- d3 )The lesser of two doubles.
146DNEGATE( d -- -d )Negate a double-cell number.
147DO( limit index -- )Compile-only: begin a counted loop, ended by LOOP or +LOOP.
148DOES>( -- )Compile-only: in a defining word, what the words it defines do, with their parameter field's address on the stack.
149DROP( x -- )Drop the top value.
150DUMP( baddr u -- )Print u bytes from baddr in the current BASE, with their addresses.
151DUP( x -- x x )Copy the top value.
152ELSE( -- )Compile-only: the other branch of IF ... ELSE ... THEN.
153EMIT( c -- )Print the character c.
154EMPTY-BUFFERS( -- )Forget what is in the block buffers; nothing is written.
155ENCLOSE( baddr c -- baddr n1 n2 n3 )Find a word delimited by c in the string at baddr: n1 its start, n2 its end, n3 the offset after the delimiter.
156ENDCASE( x -- )Compile-only: end a CASE selection, dropping the value if no OF matched.
157ENDOF( -- )Compile-only: end an OF branch; go on after ENDCASE.
158ERASE( baddr u -- )Fill u bytes from baddr with zeros.
159EXECUTE( xt -- )Run the word whose execution token is xt.
160EXIT( -- )Compile-only: return from the definition at this point.
161EXPECT( baddr n -- )Read up to n characters, or a line, from the terminal into baddr; SPAN holds how many.
162FALSE( -- 0 )Constant: the false flag, zero.
163FENCE( -- addr )Variable: FORGET will not remove anything below the address it holds.
164FILL( baddr u c -- )Fill u bytes from baddr with the byte c.
165FIND( -- xt | 0 )FIND xxx: the execution token of xxx, from the input stream, or 0 if it is not found.
166FLUSH( -- )Write every changed block (SAVE-BUFFERS).
167FORGET( -- )FORGET xxx: remove xxx and every word defined after it, never below FENCE.
168FORTH( -- )Make FORTH, the primary vocabulary, the CONTEXT vocabulary.
169GONE( n node -- )Tell the node that node n is gone; it acts on that only if this node is its centre.
170HEAT-OP@( op -- n )How many times opcode op (taken mod 32) has retired: its heat counter, HEAT-OP[op] (#189).
171HERE( -- addr )The address of the next free dictionary cell.
172HEX( -- )Set BASE to sixteen.
173HIDDEN( -- )Hide the newest entry: it cannot be found until revealed.
174HOLD( c -- )Pictured output: put the character c in front of the string being built.
175I( -- n )Compile-only: the index of the innermost DO loop.
176IF( flag -- )Compile-only: run what follows if flag is not zero, else skip to ELSE or THEN.
177IMMEDIATE( -- )Make the newest definition run when compiling instead of being compiled.
178INTERPRET( -- )Interpret words from the input stream until it is exhausted.
179INVERT( x1 -- x2 )Invert every bit.
180IS( xt -- )IS xxx: make the deferred word xxx run xt; compiled when compiling.
181J( -- n )Compile-only: the index of the next outer DO loop.
182KERNEL-WORD( n -- )KERNEL-WORD xxx: define xxx, a word that asks the kernel to do request n (as BYE, BLOCK).
183KEY( -- c )Wait for a key and leave its character.
184LATEST( -- xt )The newest entry of the CURRENT vocabulary.
185LEAVE( -- )Compile-only: leave the innermost DO loop at its next LOOP or +LOOP.
186LFA( xt -- addr )The link field of the entry (>LINK).
187LINK>( addr -- xt )The entry that a link field points to.
188LIST( n -- )Print block n as 16 lines of 64 characters; SCR holds n.
189LITERAL( x -- )If compiling, compile x as a literal.
190LOAD( n -- )Interpret block n, then go on with what follows.
191LOG-DEBUG( -- 4 )Constant: the debug log level.
192LOG-DEBUG-STR( baddr u -- )Log the string at the debug level.
193LOG-ERROR( -- 0 )Constant: the error log level.
194LOG-ERROR-STR( baddr u -- )Log the string at the error level.
195LOG-INFO( -- 2 )Constant: the info log level.
196LOG-INFO-STR( baddr u -- )Log the string at the info level.
197LOG-LEVEL!( n -- )Set the log level, held to 0 .. 4: messages at or below it are printed.
198LOG-LEVEL@( -- n )The log level.
199LOG-TEST( -- 3 )Constant: the test log level.
200LOG-TEST-STR( baddr u -- )Log the string at the test level.
201LOG-WARN( -- 1 )Constant: the warning log level.
202LOG-WARN-STR( baddr u -- )Log the string at the warning level.
203LOOP( -- )Compile-only: end a DO loop, adding one to the index.
204LSHIFT( x1 u -- x2 )Shift x1 left u bits; a count that is negative or a cell wide or more is error 9.
205M*( n1 n2 -- d )Multiply: the double-cell product, signed.
206M+( d1 n -- d2 )Add a single-cell number to a double.
207M-( d1 n -- d2 )Subtract a single-cell number from a double.
208M/MOD( d n1 -- n2 n3 )Divide d by n1: n2 the remainder, n3 the quotient.
209MAX( n1 n2 -- n3 )The greater of two numbers.
210MIN( n1 n2 -- n3 )The lesser of two numbers.
211MINT-ZUSE( -- )Mint the real Zuse onto a second stick: asks for the stick, writes nothing until YES (the kernel's word; STICK.md 6a).
212MOD( n1 n2 -- n3 )The remainder of n1 divided by n2.
213MOVE( addr1 addr2 n -- )Copy n cells from addr1 to addr2, the first cell first.
214NAME>( baddr -- xt )The entry whose name field is at baddr.
215NEGATE( n -- -n )Negate.
216NEIGHBOUR( node port -- )Record the node on the other end of the port, by its number; 0: none.
217NFA( xt -- baddr )The name field of the entry (>NAME).
218NO-ROUTE( node -- )Forget the way to that node, if one is known.
219NO-ROUTES( -- )Forget every way to every node: for when the wiring has changed.
220NODE-ERROR( -- addr )Variable: storing a non-zero code raises that error -- the word goes no further and the line ends with ERROR.
221NOP( -- )Do nothing.
222NOT( flag1 -- flag2 )True if flag1 is zero (as 0=).
223NUMBER( baddr -- d )Convert the counted string at baddr to a double; what is not a number gives 0 and sets NODE-ERROR.
224OCTAL( -- )Set BASE to eight.
225OF( x1 x2 -- | x1 )Compile-only: in CASE, run the branch to ENDOF if x1 equals x2.
226OR( x1 x2 -- x3 )Bitwise or.
227ORDER( -- )Print where names are looked for, and where new ones go.
228OVER( x1 x2 -- x1 x2 x1 )Copy the second value to the top.
229PAD( -- baddr )A scratch area for text.
230PAGE( -- )Clear the screen and put the cursor at the top.
231PFA( xt -- addr )The parameter field of the entry.
232PICK( n -- x )A copy of the n-th value, not counting n itself: 1 PICK is DUP.
233PORT!( w port -- )Write a cell to the port, by its number; waits until the neighbour reads it.
234Q.*( q1 q2 -- q3 )Multiply two Q48.16 fixed-point numbers.
235Q.+( q1 q2 -- q3 )Add two Q48.16 numbers (D+).
236Q.-( q1 q2 -- q3 )Subtract q2 from q1 (D-).
237Q./( q1 q2 -- q3 )Divide q1 by q2; by zero is error 11.
238Q.0( -- q )The Q48.16 zero, 0 0.
239Q.0=( q -- flag )True if q is zero.
240Q.1( -- q )The Q48.16 one, 65536 0.
241Q.<( q1 q2 -- flag )True if q1 is less than q2.
242Q.=( q1 q2 -- flag )True if q1 equals q2.
243Q.>( q1 q2 -- flag )True if q1 is greater than q2.
244Q.ABS( q1 -- q2 )The absolute value.
245Q.COS( q1 -- q2 )The cosine of q1, in radians.
246Q.EXP( q1 -- q2 )e to the power q1.
247Q.FROM-INT( n -- q )The integer n as a Q48.16 number.
248Q.LOG( q1 -- q2 )The natural logarithm of q1; not above zero is error 12.
249Q.MAX( q1 q2 -- q3 )The greater of two Q48.16 numbers.
250Q.MIN( q1 q2 -- q3 )The lesser of two Q48.16 numbers.
251Q.NEG( q1 -- q2 )Negate.
252Q.PRINT( q -- )Print q: the integer part, a point, five digits, a blank; always in decimal.
253Q.SCALE( -- q )The scale of the fraction, 65536 0 (1.0).
254Q.SIN( q1 -- q2 )The sine of q1, in radians.
255Q.SQRT( q1 -- q2 )The square root of q1; below zero is error 12.
256Q.TO-INT( q -- n )The integer part of q.
257QUERY( -- )Read up to 80 characters, or a line, from the terminal into TIB; set >IN to 0.
258QUIT( -- )Empty the return stack, set execution mode and go back to the terminal, without a message.
259R>( -- x ) ( R: x -- )Compile-only: move the top of the return stack to the data stack.
260R@( -- x ) ( R: x -- x )Compile-only: copy the top of the return stack.
261REPEAT( -- )Compile-only: end a BEGIN ... WHILE ... REPEAT loop, jumping back to BEGIN.
262ROLL( n -- )Move the n-th value, not counting n itself, to the top: 2 ROLL is ROT.
263ROT( x1 x2 x3 -- x2 x3 x1 )Rotate the third value to the top.
264ROUTE( node port -- )The port, by its number, leads toward that node.
265RSHIFT( x1 u -- x2 )Shift x1 right u bits, filling with zeros; a count that is negative or a cell wide or more is error 9.
266S>D( n -- d )Extend n to a double-cell number, keeping its sign.
267SAVE-BUFFERS( -- )Write every block that has been UPDATEd.
268SCAN( baddr u c -- baddr' u' )Skip to the first byte c in the string: what is left of it from there.
269SCR( -- addr )Variable: the block most recently LISTed.
270SEARCH( baddr1 u1 baddr2 u2 -- baddr3 u3 flag )Look for the second string in the first: if found, true and the first from there on.
271SEND( baddr u node -- )Send the node u characters of text to interpret, by the way this node knows to it.
272SEND-ON( baddr u node port -- )Send the node text to interpret by the port named, whatever ways are known.
273SIGN( n -- )Pictured output: put a minus sign in front if n is negative.
274SKIP( baddr u c -- baddr' u' )Skip the leading bytes c of the string: what is left of it.
275SMUDGE( -- )Toggle the newest entry's hidden flag.
276SOURCE( -- baddr u )The input buffer and how much of it is in use.
277SPACE( -- )Print a blank.
278SPACES( n -- )Print n blanks.
279SPAN( -- addr )Variable: how many characters the last EXPECT read.
280STATE( -- addr )Variable: not zero while compiling.
281SWAP( x1 x2 -- x2 x1 )Exchange the top two values.
282THEN( -- )Compile-only: end an IF ... THEN or IF ... ELSE ... THEN.
283THRU( first last -- )LOAD each block from first to last.
284TIB( -- baddr )The terminal input buffer.
285TRAVERSE( baddr n -- baddr' )Step across a name field: for n > 0 from its count byte to its last byte, for n < 0 back.
286TRUE( -- -1 )Constant: the true flag, all bits set.
287TYPE( baddr u -- )Print the u characters at baddr.
288U*( u1 u2 -- ud )The unsigned double-cell product (forth79.4th).
289U.( u -- )Print u, unsigned, then a blank.
290U.R( u width -- )Print u, unsigned, right-justified in a field of width characters.
291U/MOD( ud u1 -- u2 u3 )Unsigned divide: u2 the remainder, u3 the quotient; by zero is error 11 (forth79.4th).
292U<( u1 u2 -- flag )True if u1 is less than u2, unsigned.
293U>( u1 u2 -- flag )True if u1 is greater than u2, unsigned.
294UM*( u1 u2 -- ud )Multiply, unsigned: the double-cell product.
295UNLOOP( -- )Compile-only: discard the innermost DO loop's index and limit, before an EXIT from inside it.
296UNTIL( flag -- )Compile-only: end a BEGIN loop, jumping back to BEGIN while flag is zero.
297UPDATE( -- )Mark the block most recently asked for as changed, so it is written.
298VARIABLE( -- )VARIABLE xxx: define xxx, which leaves the address of one cell.
299VERSION( -- )Print which system this is, and its cell width.
300VLIST( -- )List the names in the CONTEXT vocabulary (WORDS).
301VOCABULARY( -- )VOCABULARY xxx: define a vocabulary xxx; running it makes it the CONTEXT vocabulary.
302WARM( -- )Print the system's message and ABORT: both stacks emptied, the prompt.
303WHILE( flag -- )Compile-only: in BEGIN ... WHILE ... REPEAT, leave the loop if flag is zero.
304WITHIN( n low high -- flag )True if low <= n < high.
305WORD( c -- baddr )Read the next word from the input stream, delimited by c, as a counted string.
306WORDS( -- )List the names in the CONTEXT vocabulary, the newest first.
307XOR( x1 x2 -- x3 )Bitwise exclusive or.
308[( -- )Stop compiling: interpret what follows; immediate.
309[']( -- xt )Compile-only: ['] xxx compiles xxx's execution token as a literal.
310[COMPILE]( -- )Compile-only: [COMPILE] xxx compiles xxx even though it is immediate.
311[LITERAL]( x -- )Another name for LITERAL, as v3 has it.
312\( -- )\ text: a comment to the end of the line; immediate.
313]( -- )Start compiling what follows.
314(JOIN)( -- )Join two outer nodes of a unit: port 3 of X to port 4 of Y, each told the other is there (centre.4th).
315(KID#)( -- addr )Variable: the number of the node being born (centre.4th).
316(KID)( -- addr )Variable: the place of the node being born (centre.4th).
317(KIDC)( -- addr )Variable: the newborn node's own port that leads back to its parent (centre.4th).
318(KIDP)( -- addr )Variable: this node's port that leads to the node being born (centre.4th).
319(LINES)( baddr u -- )Send the newborn node the named capsule of FORTH blocks, a line at a time, each to be completed (centre.4th).
320(N)( k -- number )The number of the unit's k-th outer node: the unit's number plus k (centre.4th).
321(NUCLEUS)( -- )Send the newborn node the system, the capsule of F18 code, cell by cell to its port (centre.4th).
322(P1)( -- addr )Variable: the place of a unit's first outer node (centre.4th).
323(P2)( -- addr )Variable: the place of a unit's second outer node (centre.4th).
324(P3)( -- addr )Variable: the place of a unit's third outer node (centre.4th).
325(P4)( -- addr )Variable: the place of a unit's fourth outer node (centre.4th).
326(PERS#)( -- addr )Variable: the length of the newborn node's personality capsule's name; 0: none (centre.4th).
327(PERS)( -- addr )Variable: the byte address of the newborn node's personality capsule's name (centre.4th).
328(SAY)( them port me -- )Tell node me that the port, by its number, leads to node them, and that node them is its neighbour there (centre.4th).
329(T#)( -- addr )Variable: how many characters of text for another node have been built in PAD (centre.4th).
330(T)( -- baddr u )The text built in PAD for another node (centre.4th).
331(T0)( -- )Begin building text for another node in PAD: empty (centre.4th).
332(TC)( c -- )Add a character to the text being built in PAD (centre.4th).
333(TELL)( baddr u -- )Send the newborn node the text to interpret, wait for how it ended, and fail the birth if it did not complete (centre.4th).
334(THERE?)( n -- n flag )True if node n is live and is not Hera herself (hera.4th).
335(TN)( n -- )Add a number and a space to the text being built in PAD (centre.4th).
336(TOLD)( how -- )Fail the birth unless how is 1: the text completed (centre.4th).
337(TS)( baddr u -- )Add a string to the text being built in PAD (centre.4th).
338(U)( -- addr )Variable: the number of the unit being born; its outer nodes are this plus 1 to 4 (centre.4th).
339(WHO)( -- )Tell the newborn node its number, where its printing goes, its default route and who is at its port back (centre.4th).
340(X)( place number -- )Set X, the first of the two outer nodes (JOIN) joins (centre.4th).
341(XN)( -- addr )Variable: X's number (centre.4th).
342(XP)( -- addr )Variable: X's place (centre.4th).
343(Y)( place number -- )Set Y, the second of the two outer nodes (JOIN) joins (centre.4th).
344(YN)( -- addr )Variable: Y's number (centre.4th).
345(YP)( -- addr )Variable: Y's place (centre.4th).
346BIRTH( number port childport -- place )A node is born, numbered number, its port childport joined to this node's port: given the system and FORTH-79; its place.
347BIRTH-AS( number port childport baddr u -- place )BIRTH, and given the capsule named by the string as its personality when u is not 0.
348CAPSULE-CELL( -- w flag )The next cell of the capsule of F18 code this node has open, and true; 0 0 at its end. A kernel request.
349CAPSULE-LINE( baddr -- u | -1 )The next line of the capsule of FORTH blocks this node has open, copied to baddr: its length, or -1 at its end. A kernel request.
350CAPSULE-OPEN( baddr u -- flag )Find the named capsule, check its hash and signature, and open it to be read from its start by this node. A kernel request.
351CENTRE( n -- )Hera only: a second centre, node n, from its port 6 to Hera's port 6, given centre.4th; it births its own unit, n+1 to n+4.
352KILL( n -- )Hera only: node n is removed, whatever it was doing; every node is told it is gone, and Hera forgets the way to it.
353NODE-BORN( number -- place | -1 )A node is born, empty, and entered in the registry with this node as its parent: its place, or -1 if there is no room. A kernel request.
354NODE-CHILD( number i -- child | 0 )The number of node number's i-th live child, or 0. A kernel request.
355NODE-KILL( number -- )Hera only: remove the node; its children become hers. A kernel request; KILL is the word to use.
356NODE-ME( -- place )This node's place: where it is in the kernel's fabric. A kernel request.
357NODE-PARITY( place number -- )Record the parity of a node this one birthed, under the number it was born as. A kernel request.
358NODE-PLACE( number -- place | -1 )The node's place in the kernel's fabric, or -1: not live. A kernel request.
359NODE-SLEEP( number -- )Hera only: put the node to sleep. A kernel request; PAUSE is the word to use.
360NODE-UNWIRE( a pa -- )Cut the wire on port pa of node a, this node or one it birthed. A kernel request.
361NODE-WAKE( number -- )Hera only: wake the node. A kernel request; RESUME is the word to use.
362NODE-WIRE( a pa b pb -- flag )Join port pa of node a to port pb of node b, each this node or one it birthed: true if done. A kernel request.
363PAUSE( n -- )Hera only: put node n to sleep; it executes nothing until RESUME.
364RESUME( n -- )Hera only: wake node n.
365UNIT( n -- )Birth a unit: four outer nodes, n+1 to n+4, on ports 2 to 5 of this one, joined in a square.
366UNIT-KILL( n -- )Hera only: remove node n's children, one by one, then n.