docs(dictionary): batch 3 -- Q..Z and the brackets; every one of the 318 live words has its entry (#157) [skip ci]
LSHIFT corrected (a count out of range is error 9, as DECOMPOSITION.md says, not 0). mkdictionary.py check: covers all 318 live words. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GE3SDvQn5EoxdGufk84zz2
This commit is contained in:
@@ -208,7 +208,7 @@ LOG-WARN ( -- 1 ) Constant: the warning log level.
|
||||
LOG-WARN" ( -- ) LOG-WARN" text": log the text at the warning level.
|
||||
LOG-WARN-STR ( baddr u -- ) Log the string at the warning level.
|
||||
LOOP ( -- ) Compile-only: end a DO loop, adding one to the index.
|
||||
LSHIFT ( x1 u -- x2 ) Shift x1 left u bits; a count that is negative or a cell or more gives 0.
|
||||
LSHIFT ( x1 u -- x2 ) Shift x1 left u bits; a count that is negative or a cell wide or more is error 9.
|
||||
M* ( n1 n2 -- d ) Multiply: the double-cell product, signed.
|
||||
M+ ( d1 n -- d2 ) Add a single-cell number to a double.
|
||||
M- ( d1 n -- d2 ) Subtract a single-cell number from a double.
|
||||
@@ -238,84 +238,84 @@ PAGE ( -- ) Clear the screen and put the cursor at the top.
|
||||
PFA ( xt -- addr ) The parameter field of the entry.
|
||||
PICK ( n -- x ) A copy of the n-th value, not counting n itself: 1 PICK is DUP.
|
||||
PORT! ( w port -- ) Write a cell to the port, by its number; waits until the neighbour reads it.
|
||||
Q.* TODO ---- multiply ----
|
||||
Q.+ TODO ---- the double words under other names ----
|
||||
Q.- TODO
|
||||
Q./ TODO
|
||||
Q.0 TODO
|
||||
Q.0= TODO
|
||||
Q.1 TODO
|
||||
Q.< TODO
|
||||
Q.= TODO
|
||||
Q.> TODO
|
||||
Q.ABS TODO
|
||||
Q.COS TODO
|
||||
Q.EXP TODO ---- e to the x ----
|
||||
Q.FROM-INT TODO ---- conversion and constants ----
|
||||
Q.LOG TODO ---- natural logarithm ----
|
||||
Q.MAX TODO
|
||||
Q.MIN TODO
|
||||
Q.NEG TODO
|
||||
Q.PRINT TODO ---- printing ---- The integer part, a point, five digits, a blank; always in decimal.
|
||||
Q.SCALE TODO
|
||||
Q.SIN TODO
|
||||
Q.SQRT TODO ---- square root ----
|
||||
Q.TO-INT TODO
|
||||
QUERY ( -- ) TODO FORTH-79: up to 80 characters, or a line, into TIB; >IN to 0.
|
||||
QUIT TODO
|
||||
R> TODO
|
||||
R@ TODO
|
||||
REPEAT TODO
|
||||
ROLL ( 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.
|
||||
ROT TODO
|
||||
ROUTE ( node port -- ) TODO the port, by its number, leads toward that node
|
||||
RSHIFT TODO
|
||||
S" ( -- baddr u ) TODO S" text" as v3. In a definition the text is compiled into it. At the prompt it is copied to PAD, where it stays until PAD is used again: WORD's buffer is overwritten by the very next word of the line.
|
||||
S>D TODO
|
||||
SAVE-BUFFERS TODO FORTH-79: write every block that has been UPDATEd.
|
||||
SCAN TODO
|
||||
SCR TODO
|
||||
SEARCH TODO
|
||||
SEND ( 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.
|
||||
SEND-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.
|
||||
SIGN TODO
|
||||
SKIP TODO
|
||||
SMUDGE TODO
|
||||
SOURCE ( -- baddr u ) TODO the input buffer and how much of it is in use
|
||||
SPACE TODO
|
||||
SPACES TODO ---- spaces and the number base ----
|
||||
SPAN TODO
|
||||
STATE TODO
|
||||
SWAP TODO
|
||||
THEN TODO
|
||||
THRU ( first last -- ) TODO as v3: LOAD each block from first to last.
|
||||
TIB TODO
|
||||
TRAVERSE ( 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.
|
||||
TRUE TODO
|
||||
TYPE TODO
|
||||
U* TODO
|
||||
U. TODO
|
||||
U.R TODO
|
||||
U/MOD TODO
|
||||
U< TODO
|
||||
U> TODO
|
||||
UM* TODO ---- section 4: multiply ------------------------------------------------
|
||||
UNLOOP TODO
|
||||
UNTIL TODO
|
||||
UPDATE TODO FORTH-79: mark the block most recently asked for as changed, so that it is written before its buffer is used for another.
|
||||
VARIABLE TODO FORTH-79: CREATE and one cell. The standard leaves its first value to the programme; here it is 0.
|
||||
VERSION ( -- ) TODO which system this is, and its cell width
|
||||
VLIST TODO
|
||||
VOCABULARY TODO
|
||||
WARM ( -- ) TODO as v3's message, and then ABORT: both stacks emptied, the prompt
|
||||
WHILE TODO
|
||||
WITHIN TODO
|
||||
WORD TODO
|
||||
WORDS ( -- ) 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.
|
||||
XOR TODO
|
||||
[ TODO
|
||||
['] TODO ['] xxx the same inside a definition, whatever STATE is; and [LITERAL], which v3 has as another name for LITERAL.
|
||||
[COMPILE] TODO [COMPILE] xxx FORTH-79: compile xxx even though it is immediate
|
||||
[LITERAL] TODO
|
||||
\ TODO
|
||||
] TODO
|
||||
Q.* ( q1 q2 -- q3 ) Multiply two Q48.16 fixed-point numbers.
|
||||
Q.+ ( q1 q2 -- q3 ) Add two Q48.16 numbers (D+).
|
||||
Q.- ( q1 q2 -- q3 ) Subtract q2 from q1 (D-).
|
||||
Q./ ( q1 q2 -- q3 ) Divide q1 by q2; by zero is error 11.
|
||||
Q.0 ( -- q ) The Q48.16 zero, 0 0.
|
||||
Q.0= ( q -- flag ) True if q is zero.
|
||||
Q.1 ( -- q ) The Q48.16 one, 65536 0.
|
||||
Q.< ( q1 q2 -- flag ) True if q1 is less than q2.
|
||||
Q.= ( q1 q2 -- flag ) True if q1 equals q2.
|
||||
Q.> ( q1 q2 -- flag ) True if q1 is greater than q2.
|
||||
Q.ABS ( q1 -- q2 ) The absolute value.
|
||||
Q.COS ( q1 -- q2 ) The cosine of q1, in radians.
|
||||
Q.EXP ( q1 -- q2 ) e to the power q1.
|
||||
Q.FROM-INT ( n -- q ) The integer n as a Q48.16 number.
|
||||
Q.LOG ( q1 -- q2 ) The natural logarithm of q1; not above zero is error 12.
|
||||
Q.MAX ( q1 q2 -- q3 ) The greater of two Q48.16 numbers.
|
||||
Q.MIN ( q1 q2 -- q3 ) The lesser of two Q48.16 numbers.
|
||||
Q.NEG ( q1 -- q2 ) Negate.
|
||||
Q.PRINT ( q -- ) Print q: the integer part, a point, five digits, a blank; always in decimal.
|
||||
Q.SCALE ( -- q ) The scale of the fraction, 65536 0 (1.0).
|
||||
Q.SIN ( q1 -- q2 ) The sine of q1, in radians.
|
||||
Q.SQRT ( q1 -- q2 ) The square root of q1; below zero is error 12.
|
||||
Q.TO-INT ( q -- n ) The integer part of q.
|
||||
QUERY ( -- ) Read up to 80 characters, or a line, from the terminal into TIB; set >IN to 0.
|
||||
QUIT ( -- ) Empty the return stack, set execution mode and go back to the terminal, without a message.
|
||||
R> ( -- x ) ( R: x -- ) Compile-only: move the top of the return stack to the data stack.
|
||||
R@ ( -- x ) ( R: x -- x ) Compile-only: copy the top of the return stack.
|
||||
REPEAT ( -- ) Compile-only: end a BEGIN ... WHILE ... REPEAT loop, jumping back to BEGIN.
|
||||
ROLL ( n -- ) Move the n-th value, not counting n itself, to the top: 2 ROLL is ROT.
|
||||
ROT ( x1 x2 x3 -- x2 x3 x1 ) Rotate the third value to the top.
|
||||
ROUTE ( node port -- ) The port, by its number, leads toward that node.
|
||||
RSHIFT ( 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.
|
||||
S" ( -- baddr u ) S" text": the text's address and length; compiled into the definition when compiling.
|
||||
S>D ( n -- d ) Extend n to a double-cell number, keeping its sign.
|
||||
SAVE-BUFFERS ( -- ) Write every block that has been UPDATEd.
|
||||
SCAN ( baddr u c -- baddr' u' ) Skip to the first byte c in the string: what is left of it from there.
|
||||
SCR ( -- addr ) Variable: the block most recently LISTed.
|
||||
SEARCH ( baddr1 u1 baddr2 u2 -- baddr3 u3 flag ) Look for the second string in the first: if found, true and the first from there on.
|
||||
SEND ( baddr u node -- ) Send the node u characters of text to interpret, by the way this node knows to it.
|
||||
SEND-ON ( baddr u node port -- ) Send the node text to interpret by the port named, whatever ways are known.
|
||||
SIGN ( n -- ) Pictured output: put a minus sign in front if n is negative.
|
||||
SKIP ( baddr u c -- baddr' u' ) Skip the leading bytes c of the string: what is left of it.
|
||||
SMUDGE ( -- ) Toggle the newest entry's hidden flag.
|
||||
SOURCE ( -- baddr u ) The input buffer and how much of it is in use.
|
||||
SPACE ( -- ) Print a blank.
|
||||
SPACES ( n -- ) Print n blanks.
|
||||
SPAN ( -- addr ) Variable: how many characters the last EXPECT read.
|
||||
STATE ( -- addr ) Variable: not zero while compiling.
|
||||
SWAP ( x1 x2 -- x2 x1 ) Exchange the top two values.
|
||||
THEN ( -- ) Compile-only: end an IF ... THEN or IF ... ELSE ... THEN.
|
||||
THRU ( first last -- ) LOAD each block from first to last.
|
||||
TIB ( -- baddr ) The terminal input buffer.
|
||||
TRAVERSE ( baddr n -- baddr' ) Step across a name field: for n > 0 from its count byte to its last byte, for n < 0 back.
|
||||
TRUE ( -- -1 ) Constant: the true flag, all bits set.
|
||||
TYPE ( baddr u -- ) Print the u characters at baddr.
|
||||
U* ( u1 u2 -- ud ) The unsigned double-cell product (forth79.4th).
|
||||
U. ( u -- ) Print u, unsigned, then a blank.
|
||||
U.R ( u width -- ) Print u, unsigned, right-justified in a field of width characters.
|
||||
U/MOD ( ud u1 -- u2 u3 ) Unsigned divide: u2 the remainder, u3 the quotient; by zero is error 11 (forth79.4th).
|
||||
U< ( u1 u2 -- flag ) True if u1 is less than u2, unsigned.
|
||||
U> ( u1 u2 -- flag ) True if u1 is greater than u2, unsigned.
|
||||
UM* ( u1 u2 -- ud ) Multiply, unsigned: the double-cell product.
|
||||
UNLOOP ( -- ) Compile-only: discard the innermost DO loop's index and limit, before an EXIT from inside it.
|
||||
UNTIL ( flag -- ) Compile-only: end a BEGIN loop, jumping back to BEGIN while flag is zero.
|
||||
UPDATE ( -- ) Mark the block most recently asked for as changed, so it is written.
|
||||
VARIABLE ( -- ) VARIABLE xxx: define xxx, which leaves the address of one cell.
|
||||
VERSION ( -- ) Print which system this is, and its cell width.
|
||||
VLIST ( -- ) List the names in the CONTEXT vocabulary (WORDS).
|
||||
VOCABULARY ( -- ) VOCABULARY xxx: define a vocabulary xxx; running it makes it the CONTEXT vocabulary.
|
||||
WARM ( -- ) Print the system's message and ABORT: both stacks emptied, the prompt.
|
||||
WHILE ( flag -- ) Compile-only: in BEGIN ... WHILE ... REPEAT, leave the loop if flag is zero.
|
||||
WITHIN ( n low high -- flag ) True if low <= n < high.
|
||||
WORD ( c -- baddr ) Read the next word from the input stream, delimited by c, as a counted string.
|
||||
WORDS ( -- ) List the names in the CONTEXT vocabulary, the newest first.
|
||||
XOR ( x1 x2 -- x3 ) Bitwise exclusive or.
|
||||
[ ( -- ) Stop compiling: interpret what follows; immediate.
|
||||
['] ( -- xt ) Compile-only: ['] xxx compiles xxx's execution token as a literal.
|
||||
[COMPILE] ( -- ) Compile-only: [COMPILE] xxx compiles xxx even though it is immediate.
|
||||
[LITERAL] ( x -- ) Another name for LITERAL, as v3 has it.
|
||||
\ ( -- ) \ text: a comment to the end of the line; immediate.
|
||||
] ( -- ) Start compiling what follows.
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 10 and column 3.
|
Reference in New Issue
Block a user