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" ( -- ) LOG-WARN" text": log the text at the warning level.
|
||||||
LOG-WARN-STR ( baddr u -- ) Log the string 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.
|
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* ( 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 ) Add a single-cell number to a double.
|
||||||
M- ( d1 n -- d2 ) Subtract a single-cell number from 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.
|
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.
|
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.
|
PORT! ( w port -- ) Write a cell to the port, by its number; waits until the neighbour reads it.
|
||||||
Q.* TODO ---- multiply ----
|
Q.* ( q1 q2 -- q3 ) Multiply two Q48.16 fixed-point numbers.
|
||||||
Q.+ TODO ---- the double words under other names ----
|
Q.+ ( q1 q2 -- q3 ) Add two Q48.16 numbers (D+).
|
||||||
Q.- TODO
|
Q.- ( q1 q2 -- q3 ) Subtract q2 from q1 (D-).
|
||||||
Q./ TODO
|
Q./ ( q1 q2 -- q3 ) Divide q1 by q2; by zero is error 11.
|
||||||
Q.0 TODO
|
Q.0 ( -- q ) The Q48.16 zero, 0 0.
|
||||||
Q.0= TODO
|
Q.0= ( q -- flag ) True if q is zero.
|
||||||
Q.1 TODO
|
Q.1 ( -- q ) The Q48.16 one, 65536 0.
|
||||||
Q.< TODO
|
Q.< ( q1 q2 -- flag ) True if q1 is less than q2.
|
||||||
Q.= TODO
|
Q.= ( q1 q2 -- flag ) True if q1 equals q2.
|
||||||
Q.> TODO
|
Q.> ( q1 q2 -- flag ) True if q1 is greater than q2.
|
||||||
Q.ABS TODO
|
Q.ABS ( q1 -- q2 ) The absolute value.
|
||||||
Q.COS TODO
|
Q.COS ( q1 -- q2 ) The cosine of q1, in radians.
|
||||||
Q.EXP TODO ---- e to the x ----
|
Q.EXP ( q1 -- q2 ) e to the power q1.
|
||||||
Q.FROM-INT TODO ---- conversion and constants ----
|
Q.FROM-INT ( n -- q ) The integer n as a Q48.16 number.
|
||||||
Q.LOG TODO ---- natural logarithm ----
|
Q.LOG ( q1 -- q2 ) The natural logarithm of q1; not above zero is error 12.
|
||||||
Q.MAX TODO
|
Q.MAX ( q1 q2 -- q3 ) The greater of two Q48.16 numbers.
|
||||||
Q.MIN TODO
|
Q.MIN ( q1 q2 -- q3 ) The lesser of two Q48.16 numbers.
|
||||||
Q.NEG TODO
|
Q.NEG ( q1 -- q2 ) Negate.
|
||||||
Q.PRINT TODO ---- printing ---- The integer part, a point, five digits, a blank; always in decimal.
|
Q.PRINT ( q -- ) Print q: the integer part, a point, five digits, a blank; always in decimal.
|
||||||
Q.SCALE TODO
|
Q.SCALE ( -- q ) The scale of the fraction, 65536 0 (1.0).
|
||||||
Q.SIN TODO
|
Q.SIN ( q1 -- q2 ) The sine of q1, in radians.
|
||||||
Q.SQRT TODO ---- square root ----
|
Q.SQRT ( q1 -- q2 ) The square root of q1; below zero is error 12.
|
||||||
Q.TO-INT TODO
|
Q.TO-INT ( q -- n ) The integer part of q.
|
||||||
QUERY ( -- ) TODO FORTH-79: up to 80 characters, or a line, into TIB; >IN to 0.
|
QUERY ( -- ) Read up to 80 characters, or a line, from the terminal into TIB; set >IN to 0.
|
||||||
QUIT TODO
|
QUIT ( -- ) Empty the return stack, set execution mode and go back to the terminal, without a message.
|
||||||
R> TODO
|
R> ( -- x ) ( R: x -- ) Compile-only: move the top of the return stack to the data stack.
|
||||||
R@ TODO
|
R@ ( -- x ) ( R: x -- x ) Compile-only: copy the top of the return stack.
|
||||||
REPEAT TODO
|
REPEAT ( -- ) Compile-only: end a BEGIN ... WHILE ... REPEAT loop, jumping back to BEGIN.
|
||||||
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.
|
ROLL ( n -- ) Move the n-th value, not counting n itself, to the top: 2 ROLL is ROT.
|
||||||
ROT TODO
|
ROT ( x1 x2 x3 -- x2 x3 x1 ) Rotate the third value to the top.
|
||||||
ROUTE ( node port -- ) TODO the port, by its number, leads toward that node
|
ROUTE ( node port -- ) The port, by its number, leads toward that node.
|
||||||
RSHIFT TODO
|
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 ) 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" ( -- baddr u ) S" text": the text's address and length; compiled into the definition when compiling.
|
||||||
S>D TODO
|
S>D ( n -- d ) Extend n to a double-cell number, keeping its sign.
|
||||||
SAVE-BUFFERS TODO FORTH-79: write every block that has been UPDATEd.
|
SAVE-BUFFERS ( -- ) Write every block that has been UPDATEd.
|
||||||
SCAN TODO
|
SCAN ( baddr u c -- baddr' u' ) Skip to the first byte c in the string: what is left of it from there.
|
||||||
SCR TODO
|
SCR ( -- addr ) Variable: the block most recently LISTed.
|
||||||
SEARCH TODO
|
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 -- ) 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 ( 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 -- ) 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.
|
SEND-ON ( baddr u node port -- ) Send the node text to interpret by the port named, whatever ways are known.
|
||||||
SIGN TODO
|
SIGN ( n -- ) Pictured output: put a minus sign in front if n is negative.
|
||||||
SKIP TODO
|
SKIP ( baddr u c -- baddr' u' ) Skip the leading bytes c of the string: what is left of it.
|
||||||
SMUDGE TODO
|
SMUDGE ( -- ) Toggle the newest entry's hidden flag.
|
||||||
SOURCE ( -- baddr u ) TODO the input buffer and how much of it is in use
|
SOURCE ( -- baddr u ) The input buffer and how much of it is in use.
|
||||||
SPACE TODO
|
SPACE ( -- ) Print a blank.
|
||||||
SPACES TODO ---- spaces and the number base ----
|
SPACES ( n -- ) Print n blanks.
|
||||||
SPAN TODO
|
SPAN ( -- addr ) Variable: how many characters the last EXPECT read.
|
||||||
STATE TODO
|
STATE ( -- addr ) Variable: not zero while compiling.
|
||||||
SWAP TODO
|
SWAP ( x1 x2 -- x2 x1 ) Exchange the top two values.
|
||||||
THEN TODO
|
THEN ( -- ) Compile-only: end an IF ... THEN or IF ... ELSE ... THEN.
|
||||||
THRU ( first last -- ) TODO as v3: LOAD each block from first to last.
|
THRU ( first last -- ) LOAD each block from first to last.
|
||||||
TIB TODO
|
TIB ( -- baddr ) The terminal input buffer.
|
||||||
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.
|
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 TODO
|
TRUE ( -- -1 ) Constant: the true flag, all bits set.
|
||||||
TYPE TODO
|
TYPE ( baddr u -- ) Print the u characters at baddr.
|
||||||
U* TODO
|
U* ( u1 u2 -- ud ) The unsigned double-cell product (forth79.4th).
|
||||||
U. TODO
|
U. ( u -- ) Print u, unsigned, then a blank.
|
||||||
U.R TODO
|
U.R ( u width -- ) Print u, unsigned, right-justified in a field of width characters.
|
||||||
U/MOD TODO
|
U/MOD ( ud u1 -- u2 u3 ) Unsigned divide: u2 the remainder, u3 the quotient; by zero is error 11 (forth79.4th).
|
||||||
U< TODO
|
U< ( u1 u2 -- flag ) True if u1 is less than u2, unsigned.
|
||||||
U> TODO
|
U> ( u1 u2 -- flag ) True if u1 is greater than u2, unsigned.
|
||||||
UM* TODO ---- section 4: multiply ------------------------------------------------
|
UM* ( u1 u2 -- ud ) Multiply, unsigned: the double-cell product.
|
||||||
UNLOOP TODO
|
UNLOOP ( -- ) Compile-only: discard the innermost DO loop's index and limit, before an EXIT from inside it.
|
||||||
UNTIL TODO
|
UNTIL ( flag -- ) Compile-only: end a BEGIN loop, jumping back to BEGIN while flag is zero.
|
||||||
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.
|
UPDATE ( -- ) Mark the block most recently asked for as changed, so it is written.
|
||||||
VARIABLE TODO FORTH-79: CREATE and one cell. The standard leaves its first value to the programme; here it is 0.
|
VARIABLE ( -- ) VARIABLE xxx: define xxx, which leaves the address of one cell.
|
||||||
VERSION ( -- ) TODO which system this is, and its cell width
|
VERSION ( -- ) Print which system this is, and its cell width.
|
||||||
VLIST TODO
|
VLIST ( -- ) List the names in the CONTEXT vocabulary (WORDS).
|
||||||
VOCABULARY TODO
|
VOCABULARY ( -- ) VOCABULARY xxx: define a vocabulary xxx; running it makes it the CONTEXT vocabulary.
|
||||||
WARM ( -- ) TODO as v3's message, and then ABORT: both stacks emptied, the prompt
|
WARM ( -- ) Print the system's message and ABORT: both stacks emptied, the prompt.
|
||||||
WHILE TODO
|
WHILE ( flag -- ) Compile-only: in BEGIN ... WHILE ... REPEAT, leave the loop if flag is zero.
|
||||||
WITHIN TODO
|
WITHIN ( n low high -- flag ) True if low <= n < high.
|
||||||
WORD TODO
|
WORD ( c -- baddr ) Read the next word from the input stream, delimited by c, as a counted string.
|
||||||
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.
|
WORDS ( -- ) List the names in the CONTEXT vocabulary, the newest first.
|
||||||
XOR TODO
|
XOR ( x1 x2 -- x3 ) Bitwise exclusive or.
|
||||||
[ TODO
|
[ ( -- ) Stop compiling: interpret what follows; immediate.
|
||||||
['] TODO ['] xxx the same inside a definition, whatever STATE is; and [LITERAL], which v3 has as another name for LITERAL.
|
['] ( -- xt ) Compile-only: ['] xxx compiles xxx's execution token as a literal.
|
||||||
[COMPILE] TODO [COMPILE] xxx FORTH-79: compile xxx even though it is immediate
|
[COMPILE] ( -- ) Compile-only: [COMPILE] xxx compiles xxx even though it is immediate.
|
||||||
[LITERAL] TODO
|
[LITERAL] ( x -- ) Another name for LITERAL, as v3 has it.
|
||||||
\ TODO
|
\ ( -- ) \ text: a comment to the end of the line; immediate.
|
||||||
] TODO
|
] ( -- ) 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