Files
LithosAnanke/docs/reference/v4-dictionary.tsv
T
Claude a53cc82dd5 docs(dictionary): mkdictionary.py and the draft table -- every live v4 word, 318 (#157) [skip ci]
The names from the system itself (the hosted v4's WORDS, plus the kernel's sk_v4_words[]); the stack notation and description in docs/reference/v4-dictionary.tsv, drafted from the source where it says (54 stacks, 105 descriptions), the rest to write. check refuses a missing, unfinished or stale entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
2026-11-10 11:25:01 +00:00

19 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!TODO
5#TODO
6#>TODO
7#STODO
8'( -- addr )TODO FORTH-79: the next word's parameter field address; if compiling, compiled as a literal
9(TODO ---- comments (5.15) ------------------------------------------------------- PAREN skips to the closing parenthesis; BACKSLASH skips the rest of the line.
10(BITS)( -- n )TODO
11(CONSOLE)TODO
12(LOST)TODO
13(ME)TODO
14(NB)TODO
15(REFUSED)TODO
16(SEAL)( -- )TODO WHAT IS IN THE DICTIONARY NOW IS THE SYSTEM: COLD comes back to it and FORGET will not go below it. Whoever has loaded a node's capsules has it do this (system.f18, (BOOT) and FENCE).
17(UD)TODO
18(WORD-DEFINED)TODO
19(WORD-FORGOTTEN)TODO
20*TODO The low cell of the product, by N steps of +* with nothing but the count on the return stack. UM* drop gives the same cell but needs two more return entries, which a word inside two DO loops does not have (D-2). The low cell is exact: what +* loses at the top of T (D-3) takes N shifts to reach the bit that moves into A, and the loop ends first.
21*/TODO
22*/MODTODO
23+TODO ---- arithmetic ----
24+!TODO
25+LOOPTODO
26,TODO , calls nothing: the code generator calls it from as deep as anything goes.
27-TODO
28-!TODO
29-->( -- )TODO go on with the next block. Only in a block being loaded: at the terminal it is an error (code 14).
30-ROTTODO
31-TRAILINGTODO
32.TODO
33.RTODO
34.S( -- )TODO as v3: the depth between < and >, then every value on the stack, the deepest first, each followed by a blank; then a new line. The stack is left as it was. It reads each value with PICK, so it needs a few cells of the stack free to work in.
35/TODO
36/MODTODO
370<TODO
380<>TODO ---- comparison ----
390=TODO
400>TODO
411+TODO
421-TODO
432!TODO
442*TODO
452+TODO
462,TODO
472-TODO
482/TODO
492>RTODO
502@TODO ---- memory ----
512DROPTODO
522DUPTODO
532OVERTODO
542R>TODO
552R@TODO
562ROTTODO
572SWAPTODO ---- stack ----
5879-STANDARDTODO FORTH-79: execute to be sure a FORTH-79 system is there. It is: nothing happens. (v3's prints two lines and leaves a flag.)
59:TODO FORTH-79: start a definition; it cannot be found until ; ends it. The CONTEXT vocabulary is set to the CURRENT one. (C)+2 holds LATEST while the entry is made, to tell whether one was.
60;TODO FORTH-79: compile the return, let the word be found, stop compiling
61<TODO
62<#TODO ---- pictured output ----
63<=TODO
64<>TODO
65=TODO
66>TODO
67>=TODO
68>BODYTODO
69>INTODO
70>LINKTODO
71>NAMETODO
72>RTODO ---- return stack: in line, and only inside a definition ----
73?( addr -- )TODO print what the cell holds
74?DOTODO
75?DUPTODO
76?TERMINALTODO ---- strings and memory ----
77@TODO ---- memory ----
78ABSTODO
79ACL-ALLOW!TODO
80ACL-ALLOW@TODO
81ACL-HEAT@( xt -- heat )TODO how often the word has been used. The node's heat counters are not readable from a programme yet (D-6): 0.
82ACL-HOOKTODO
83ACL-INHERIT( src dst -- )TODO as v3: dst takes src's mode; it is not pinned, its TTL is 0 and it is allowed. This is the one word that unpins.
84ACL-INIT-PRIMITIVES( -- )TODO as v3: do that to every word in the dictionary, in every vocabulary
85ACL-MODE!TODO
86ACL-MODE@TODO
87ACL-PINTODO
88ACL-PINNED?TODO
89ACL-TTL!TODO as v3: below 0 is 0. The TTL is sixteen bits here: above 65535 is 65535.
90ACL-TTL@TODO
91ACL-WORD-ID( xt -- n )TODO a number for the word that never changes: its address
92AGAINTODO
93ALIGNTODO
94ALLOTTODO
95ANDTODO ---- logic and comparison ----
96BASETODO
97BEGINTODO A loop that tests at its end jumps back with the flag still there, so it jumps back to a drop laid just ahead of the body: BEGIN a UNTIL jump L0 Ld: drop L0: a if Ld drop BEGIN a WHILE b REPEAT jump L0 Ld: drop L0: a if Lx drop b jump L0 Lx: drop BEGIN a AGAIN jump L0 Ld: drop L0: a jump L0 The control-flow stack holds Ld, L0 and 3.
98BLTODO ---- in-line addresses and constants ----
99BLANKTODO
100BLKTODO
101BLOCK( n -- baddr )TODO FORTH-79: the address of a buffer that holds block n, read from storage if it is not already in one.
102BUFFER( n -- baddr )TODO FORTH-79: the address of a buffer assigned to block n. What the buffer holds is not read from storage.
103BYETODO
104C!TODO
105C,TODO
106C@TODO
107CASETODO
108CELLSTODO
109CFATODO
110CMOVETODO ---- section 5.9: strings ------------------------------------------------
111CMOVE>TODO
112COLD( -- )TODO the system as it was when the capsule had just been loaded: everything defined since is gone, there is one vocabulary, numbers are decimal, the block buffers are empty. Then as WARM.
113COMPARETODO
114COMPILETODO COMPILE xxx FORTH-79: when the word this is in runs, xxx is compiled
115CONSTANT( n -- )TODO FORTH-79: an entry whose word leaves n
116CONTEXTTODO ---- vocabularies (FORTH-79) ---------------------------------------------------- A vocabulary is two cells: its head -- the xt of its newest entry, or 0 -- and the address of the vocabulary defined before it, or 0. VOC-LINK holds the newest one's address. FORTH's head is (LATEST) and it is in no chain.
117CONVERT( d1 baddr1 -- d2 baddr2 )TODO FORTH-79: the characters from baddr1 + 1 on are taken as digits in the current BASE, each accumulated into the double after it is multiplied by BASE, until one is not a digit; baddr2 is its address. (P)+2 holds the digit while the double is multiplied and (P)+5 the address, so nothing waits on the return stack across the calls.
118COUNTTODO
119CRTODO
120CREATETODO FORTH-79: an entry whose word leaves the address of its parameter field
121CURRENTTODO
122D+TODO ---- section 5.7: doubles ------------------------------------------------
123D-TODO ---- doubles and mixed ----
124D.TODO
125D.RTODO
126D0<TODO
127D0=TODO
128D2*TODO
129D2/TODO
130D<TODO
131D=TODO
132DABSTODO
133DECIMALTODO
134DEFAULT-ROUTE( port -- )TODO the port, by its number, leads toward every node not told of
135DEFERTODO
136DEFER@TODO
137DEFINITIONSTODO FORTH-79: new definitions go into the CONTEXT vocabulary from now on.
138DEPTHTODO FORTH-79: how many values were on the stack before DEPTH
139DMAXTODO
140DMINTODO
141DNEGATETODO
142DOTODO
143DOES>TODO
144DROPTODO
145DUMPTODO
146DUPTODO ---- stack ----
147ELSETODO
148EMITTODO EMIT puts the character with what has been printed. Everything the node prints goes through EMIT. A is kept: the words that print have always been free to use it across an EMIT. As v3, only the low 8 bits of the character are printed. A BUFFER FOUND FULL is sent first. It is full when a flush of it ended in a fault -- the stack too deep to begin a message -- and what is printed next is that fault's own message: put where (OUT^) points, it would go past the buffer's end, and (OUT^) would never again be at the end to be flushed (MESH.md 7c.6).
149EMPTY-BUFFERSTODO FORTH-79: forget what is in the buffers; nothing is written.
150ENCLOSE( baddr c -- baddr n1 n2 n3 )TODO in the zero-terminated string at baddr: n1 the offset of the first character that is not c, n2 the offset of the first c after it, n3 the offset of the first character after that run of c.
151ENDCASETODO
152ENDOFTODO
153ERASETODO
154EXECUTETODO
155EXITTODO FORTH-79: return from the definition at this point
156EXPECT( baddr n -- )TODO FORTH-79: characters from the terminal are stored from baddr upward until a new-line or until n have been received; the new-line is taken but not stored. A zero is added after the text, so the buffer must hold n + 1 bytes. No action for n <= 0. SPAN is how many characters were stored (SPAN is not FORTH-79; v3 has it). A line longer than n leaves the rest, its new-line included, to be read next. It is what the prompt reads every line with, with whatever the user has left on the stack beneath it, so it works in (P) -- (P)+0 where the next character goes, (P)+1 how many more may come, (P)+2 where the first went -- and has at most three cells of its own on the data stack (D-2).
157FALSETODO
158FENCETODO
159FILLTODO
160FIND( -- xt | 0 )TODO FORTH-79: the compilation address of the next word in the input stream, or 0 if it is not in the dictionary.
161FLUSHTODO As v3: the same.
162FORTHTODO FORTH-79: the primary vocabulary; it becomes the CONTEXT vocabulary.
163GONE( n node -- )TODO tell the node that node n is gone. It acts on that only if this node is its centre: it forgets the way to n, and if it is waiting for n's answer the wait ends.
164HERETODO
165HEXTODO
166HIDDENTODO
167HOLDTODO
168ITODO
169IFTODO Native if leaves the flag, so both ways out of it drop it (section 2): IF a THEN if L1 drop a jump L2 L1: drop L2: IF a ELSE b THEN if L1 drop a jump L2 L1: drop b L2:
170IMMEDIATETODO
171INTERPRET( -- )TODO FORTH-79: take words from the input stream until it is exhausted. A word in the dictionary is executed, or, when compiling and not immediate, compiled. Anything else must be a number in the current BASE: it is left on the stack, or compiled as a literal. What is neither, or a compile-only word met while interpreting, abandons the line, with v3's message: UNKNOWN WORD: 'xxx' xxx: compile-only
172INVERTTODO
173ISTODO
174JTODO
175KEYTODO
176LATESTTODO
177LEAVETODO
178LFATODO
179LINK>TODO
180LITERAL( x -- )TODO FORTH-79: if compiling, compile x as a literal
181LOAD( n -- )TODO FORTH-79: interpret block n, then go on with what follows.
182LOG-DEBUGTODO
183LOG-DEBUG-STR( baddr u -- )TODO
184LOG-ERRORTODO
185LOG-ERROR-STR( baddr u -- )TODO
186LOG-INFOTODO
187LOG-INFO-STR( baddr u -- )TODO
188LOG-LEVEL!( n -- )TODO as v3: a level below 0 is 0, one above 4 is 4
189LOG-LEVEL@TODO
190LOG-TESTTODO
191LOG-TEST-STR( baddr u -- )TODO
192LOG-WARNTODO
193LOG-WARN-STR( baddr u -- )TODO
194LOOPTODO
195M*TODO The product's sign waits in (F), not on the return stack, for the same reason as SM/REM's.
196M+TODO
197M-TODO
198M/MODTODO
199MAXTODO
200MINTODO
201MINT-ZUSETODO
202MODTODO
203MOVETODO FORTH-79: n cells from addr1 to addr2, the cell at addr1 first.
204NAME>TODO
205NEGATETODO
206NEIGHBOUR( node port -- )TODO the node on the other end of the port, by its number; 0: none, or a device. Whoever wires the node tells it, and tells it again when the wiring changes. It is how a node knows who its centre is, the one node whose GONE it believes: (CENTRE).
207NFATODO
208NO-ROUTE( node -- )TODO forget the way to that node, if one is known: what is for it then goes by the way for every node not told of, if there is one. The last way in the table takes its place.
209NO-ROUTES( -- )TODO forget every way: for when the wiring has changed
210NODE-ERRORTODO FORTH-79: clear the return stack, set execution mode, return control to the terminal; no message is given. The data stack is left as it is. NODE-ERROR, by name: how a definition written in FORTH raises an error. A store of a code that is not zero is the trap of D-18 -- the word goes no further, the message for the code is printed (-1: the word has printed its own) and the line ends with ERROR. The codes are listed in core.f18.
211NOPTODO
212NOTTODO
213NUMBER( baddr -- d )TODO FORTH-79. What is not a number gives 0 and sets NODE-ERROR.
214OCTALTODO
215OFTODO
216ORTODO
217ORDER( -- )TODO as v3's, but true: where names are looked for, and where new ones go
218OVERTODO
219PADTODO
220PAGE( -- )TODO clear the screen and put the cursor at the top, as v3: ESC [2J ESC [H
221PFATODO
222PICK( n -- x )TODO FORTH-79: a copy of the n-th value, not counting n itself. 1 PICK is DUP, 2 PICK is OVER. n less than one is an error.
223PORT!( w port -- )TODO write a cell to the port, by its number. It waits until the neighbour has taken it. This is how a node is sent a capsule of F18 code (docs/v4.0.0/MESH.md section 5): the cells go as they are, not as a message, to a node that is executing from its ports.
224Q.*TODO ---- multiply ----
225Q.+TODO ---- the double words under other names ----
226Q.-TODO
227Q./TODO
228Q.0TODO
229Q.0=TODO
230Q.1TODO
231Q.<TODO
232Q.=TODO
233Q.>TODO
234Q.ABSTODO
235Q.COSTODO
236Q.EXPTODO ---- e to the x ----
237Q.FROM-INTTODO ---- conversion and constants ----
238Q.LOGTODO ---- natural logarithm ----
239Q.MAXTODO
240Q.MINTODO
241Q.NEGTODO
242Q.PRINTTODO ---- printing ---- The integer part, a point, five digits, a blank; always in decimal.
243Q.SCALETODO
244Q.SINTODO
245Q.SQRTTODO ---- square root ----
246Q.TO-INTTODO
247QUERY( -- )TODO FORTH-79: up to 80 characters, or a line, into TIB; >IN to 0.
248QUITTODO
249R>TODO
250R@TODO
251REPEATTODO
252ROLL( n -- )TODO FORTH-79: the n-th value, not counting n itself, is taken out and put on top. 3 ROLL is ROT, 2 ROLL is SWAP, 1 ROLL does nothing. n less than one is an error.
253ROTTODO
254ROUTE( node port -- )TODO the port, by its number, leads toward that node
255RSHIFTTODO
256S>DTODO
257SAVE-BUFFERSTODO FORTH-79: write every block that has been UPDATEd.
258SCANTODO
259SCRTODO
260SEARCHTODO
261SEND( baddr u node -- )TODO send the node u characters of text to interpret, by the way this node knows to it. What it prints there goes to that node's console. With no way to the node it is error 12.
262SEND-ON( baddr u node port -- )TODO the same by a port this node names, by its number, whatever ways it knows: for a neighbour that has no number of its own yet, to which text is sent as to node 0.
263SIGNTODO
264SKIPTODO
265SMUDGETODO
266SOURCE( -- baddr u )TODO the input buffer and how much of it is in use
267SPACETODO
268SPACESTODO ---- spaces and the number base ----
269SPANTODO
270STATETODO
271SWAPTODO
272THENTODO
273THRU( first last -- )TODO as v3: LOAD each block from first to last.
274TIBTODO
275TRAVERSE( baddr n -- baddr' )TODO as v3: for n > 0, from a name's count byte to the byte after its last character; otherwise the address unchanged.
276TRUETODO
277TYPETODO
278U*TODO
279U.TODO
280U.RTODO
281U/MODTODO
282U<TODO
283U>TODO
284UM*TODO ---- section 4: multiply ------------------------------------------------
285UNLOOPTODO
286UNTILTODO
287UPDATETODO FORTH-79: mark the block most recently asked for as changed, so that it is written before its buffer is used for another.
288VARIABLETODO FORTH-79: CREATE and one cell. The standard leaves its first value to the programme; here it is 0.
289VERSION( -- )TODO which system this is, and its cell width
290VLISTTODO
291VOCABULARYTODO
292WARM( -- )TODO as v3's message, and then ABORT: both stacks emptied, the prompt
293WHILETODO
294WITHINTODO
295WORDTODO
296WORDS( -- )TODO the names in the CONTEXT vocabulary, the newest first, a blank after each, a new line whenever one has passed column 64. Hidden entries -- a definition under way -- are not shown. (Q)+0 is the column.
297XORTODO
298[TODO
299[']TODO ['] xxx the same inside a definition, whatever STATE is; and [LITERAL], which v3 has as another name for LITERAL.
300[COMPILE]TODO [COMPILE] xxx FORTH-79: compile xxx even though it is immediate
301[LITERAL]TODO
302\TODO
303]TODO