2020-01-14 00:58:39 +00:00
|
|
|
# Forth Dictionary
|
|
|
|
|
2020-10-31 22:02:41 +00:00
|
|
|
Updated: 2020-10-31 15:02:22 -0700
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## !
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n addr -- )_ Store n at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## "
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compiling: _( [text<">] -- )_ Parse string, including IEEE 1275-1994 hex interpolation.
|
|
|
|
|
|
|
|
Execution: _( -- addr u )_ Return parsed string.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \#
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( ud1 -- ud2 )_ Divide ud1 by BASE, convert remainder to char and HOLD it, ud2 = quotient.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## #>
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( ud -- )_ Conclude pictured numeric output.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## #IN
|
|
|
|
|
|
|
|
_( -- addr )_ Variable containing number of chars in the current input buffer.
|
|
|
|
|
|
|
|
## #LINE
|
|
|
|
|
|
|
|
_( -- addr )_ Variable containing the number of lines output.
|
|
|
|
|
|
|
|
## #OUT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- addr )_ Variable containing the number of chars output on the current line.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## #S
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( ud -- 0 )_ Perform # until quotient is zero.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $2VALUE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 addr u -- )_ Create a definition that pushes the first two cells of the body.
|
2020-01-14 00:58:39 +00:00
|
|
|
initially n1 and n2
|
|
|
|
|
|
|
|
## $BYTE-EXEC
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
_( addr xt -- )_ evaluate FCode at addr with fetch function xt, do not save FCode
|
|
|
|
evaluator state
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $CREATE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr u -- )_ Like CREATE but use addr u for name.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $DIRECT
|
|
|
|
|
|
|
|
_( -- addr )_ addr = address of the CPU direct page
|
|
|
|
|
|
|
|
## $EMPTY-WL
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- wid )_ Create a new empty wordlist (danger!).
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $ENV?-WL
|
|
|
|
|
|
|
|
_( -- wid )_ Return the WID of the wordlist for environmental queries.
|
|
|
|
|
|
|
|
## $FIND
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( c-addr u -- xt true | c-addr u false )_ Find word in search order.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $FORGET
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xt -- )_ Forget word referenced by xt and subsequent words.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $HEX(
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [text<)>] -- addr u )_ Parse hex digits, return in allocated string.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $MEMTOP
|
|
|
|
|
|
|
|
_( -- addr )_ addr = top of usable data space
|
|
|
|
|
|
|
|
## $NUMBER
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr len -- true | n false )_ Attmept to convert string to number.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $RESTORE-INPUT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xn...x1 n f1 -- f2 )_ restore current source input state,
|
|
|
|
including source ID if f1 is true.
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## $SEARCH
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( c-addr u -- 0 | xt +-1 )_ Search for word in current search order.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $SOURCE-ID
|
|
|
|
|
|
|
|
_( -- a-addr )_ variable containing current input source ID
|
|
|
|
|
|
|
|
## $SYSIF
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( ... u -- ... )_ Call system interface function u.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## $TMPSTR
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr1 u1 -- addr2 u1 )_
|
2020-01-21 07:09:50 +00:00
|
|
|
Allocate a temporary string buffer for interpretation semantics of strings
|
|
|
|
and return the address and length of the buffer. If taking the slot used
|
|
|
|
by an existing buffer, free it.
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## $VALUE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n addr u -- )_ Create a definition that pushes the first cell of the body, initially n.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## '
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [old-name< >] -- xt )_ Parse old-name in input stream, return xt of word.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## (
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [text<)>] -- )_ Parse and discard text until a right paren or end of input.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## (.)
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- addr u )_ Convert n to text via pictured numeric output.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## (CR
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Emit a CR with no linefeed, set #OUT to 0.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## (IS-USER-WORD)
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr u xt -- )_ Create a DEFER definition for string with xt as its initial behavior.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## (SEE)
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xt -- )_ Attempt to decompile the word at xt.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-10-31 22:02:41 +00:00
|
|
|
## (TO)
|
|
|
|
|
|
|
|
_( n xt | n1 n2 xt -- )_ change the first cell or two of the body of xt
|
|
|
|
if xt is a 2VALUE, change the first two cells of the body
|
|
|
|
if xt is any other created word, change the first cell of the body
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## (U.)
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u -- addr u )_ Convert u to text via pictured numeric output.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## *
|
|
|
|
|
|
|
|
_( n1 n2 -- n3 )_ n3 = n1*n2
|
|
|
|
|
|
|
|
## */
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 n3 -- n4 )_ n4 = quot of n1*n2/n3.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## */MOD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 n3 -- n4 n5 )_ n4, n5 = rem, quot of n1*n2/n3.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## +
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- x3 )_ x3 = x1 + x2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## +!
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n addr -- )_ Add n to value at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## +LOOP
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( do-sys -- )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Execution: _( u|n -- )_ Add u|n to loop index and continue loop if within bounds.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ,
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- )_ Compile cell n into the dictionary.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## -
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- x3 )_ x3 = x1 - x2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## -1
|
|
|
|
|
|
|
|
_( -- -1 )_
|
|
|
|
|
|
|
|
## -ROT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 x3 -- x3 x1 x2 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## -TRAILING
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr u1 -- addr u2 )_ u2 = length of string with trailing spaces omitted.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## .
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- )_ Output n.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ."
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [text<">] -- )_ Parse text and output.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## .(
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [text<)>] -- )_ Parse text until a right paren or end of input, output text.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## .D
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- )_ Output n in decimal base.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## .H
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- )_ Output n in hexadecimal base.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## .R
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n u -- )_ Output n in a field of u chars.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## .S
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Display stack contents.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## .VERSION
|
|
|
|
|
|
|
|
_( -- )_ Display version information.
|
|
|
|
|
|
|
|
## /
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- n3 )_ Divide n1 by n2, giving quotient n3.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## /C
|
|
|
|
|
|
|
|
_( -- u )_ u = size of char in bytes.
|
|
|
|
|
|
|
|
## /C*
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 * size of char.
|
|
|
|
|
|
|
|
## /L
|
|
|
|
|
|
|
|
_( -- u )_ u = size of long in bytes.
|
|
|
|
|
|
|
|
## /L*
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 * size of long.
|
|
|
|
|
|
|
|
## /MOD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- n3 n4 )_ Divide n1 by n2, giving quotient n4 and remainder n3.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## /N
|
|
|
|
|
|
|
|
_( -- u )_ u = size of cell in bytes.
|
|
|
|
|
|
|
|
## /N*
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 * size of cell.
|
|
|
|
|
|
|
|
## /STRING
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( c-addr1 u1 n -- c-addr2 u2 )_ Adjust string.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## /W
|
|
|
|
|
|
|
|
_( -- u )_ u = size of word in bytes.
|
|
|
|
|
|
|
|
## /W*
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 * size of word.
|
|
|
|
|
|
|
|
## 0
|
|
|
|
|
|
|
|
_( -- 0 )_
|
|
|
|
|
|
|
|
## 0<
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- f )_ f = true if n < 0, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 0<=
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- f )_ f = true if n <= 0, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 0<>
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x -- f )_ f = false if x is zero, true if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 0=
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x -- f )_ f = true if x is zero, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 0>
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- f )_ f = true if n > 0, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 0>=
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- f )_ f = true if n >= 0, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 1
|
|
|
|
|
|
|
|
_( -- 1 )_
|
|
|
|
|
|
|
|
## 1+
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 -- x2 )_ x2 = x1 + 1
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 1-
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 -- x2 )_ x2 = x1 - 1
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2
|
|
|
|
|
|
|
|
_( -- 2 )_
|
|
|
|
|
|
|
|
## 2!
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 addr -- )_ Store two consecutive cells at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2*
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 -- u2 )_ Shift n1 one bit left.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2+
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 -- x2 )_ x2 = x1 + 2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2-
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 -- x2 )_ x2 = x1 - 2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2/
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 -- x2 )_ Shift x1 one bit right, extending sign bit.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2>R
|
|
|
|
|
|
|
|
_( n1 n2 -- )_ _(R: -- n1 n2 )_
|
|
|
|
|
|
|
|
## 2@
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- n1 n2 )_ Fetch two consecutive cells from addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2CONSTANT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 [name< >] -- )_ Create name, name does _( -- n1 n2 )_ when executed.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2DROP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2DUP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- x1 x2 x1 x2 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-10-31 22:02:41 +00:00
|
|
|
## 2LITERAL
|
|
|
|
|
|
|
|
- Immediate.
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## 2OVER
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 x3 x4 -- x1 x2 x3 x4 x1 x2 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2R>
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( R: x1 x2 -- )_ _( -- x1 x2 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2R@
|
|
|
|
|
|
|
|
_( R: n1 n2 -- n1 n2 )_ _( -- n1 n2 )_
|
|
|
|
|
|
|
|
## 2ROT
|
|
|
|
|
|
|
|
_( x1 x2 x3 x4 x5 x6 -- x3 x4 x5 x6 x1 x2 )_
|
|
|
|
|
|
|
|
## 2S>D
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- d1 d2 )_ Convert two numbers to double-numbers.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 2SWAP
|
|
|
|
|
|
|
|
_( x1 x2 x3 x4 -- x3 x4 x1 x2 )_
|
|
|
|
|
2020-10-31 22:02:41 +00:00
|
|
|
## 2VALUE
|
|
|
|
|
|
|
|
_( n1 n2 [name< >] -- )_ Create a definition that pushes n1 and n2 on the stack,
|
|
|
|
n1 and n2 can be changed with TO.
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## 3
|
|
|
|
|
|
|
|
_( -- 3 )_
|
|
|
|
|
|
|
|
## 3DROP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 x3 -- )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## 3DUP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 x3 -- x1 x2 x3 x1 x2 x3 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## :
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name< >] -- colon-sys )_ Parse name, start colon definition and enter compiling state.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## :NONAME
|
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
_( -- colon-sys )_ Create an anonymous colon definition and enter compiling state.
|
|
|
|
The xt of the anonymous definition is left on the stack after ;.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## :TEMP
|
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
_( -- colon-sys )_ Create a temporary anonymous colon definition and enter
|
2020-01-23 01:14:52 +00:00
|
|
|
compiling state. The temporary definition is executed immediately after ;.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ;
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( colon-sys -- )_ Consume colon-sys and enter interpretation state, ending the current
|
2020-01-14 00:58:39 +00:00
|
|
|
definition. If the definition was temporary, execute it.
|
|
|
|
|
|
|
|
## ;CODE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ End compiler mode, begin machine code section of definition.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ;]
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( quot-sys -- )_ End a quotation.
|
|
|
|
|
|
|
|
Execution: _( -- xt )_ Leave xt of the quotation on the stack.
|
2020-01-21 07:09:50 +00:00
|
|
|
|
|
|
|
## \<
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- f )_ f = true if n1 < n2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \<#
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Begin pictured numeric output.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \<<
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- u3 )_ u3 = u1 << u2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \<=
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- f )_ f = true if n1 <= n2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \<>
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- f )_ f = true if x1 <> x2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \<W@
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- n )_ Fetch sign-extended word from addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## =
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- f )_ f = true if x1 = x2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- f )_ f = true if n1 > n2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>=
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- f )_ f = true if n1 >= n2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>>
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- u3 )_ u3 = u1 >> u2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>>A
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- x3 )_ x3 = x1 >> x2, extending sign bit.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>BODY
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
_( xt -- a-addr)_ return body of word at xt, if unable then throw exception -31
|
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>IN
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
_( -- addr )_ Variable containing offset to the current parsing area of input buffer.
|
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>LINK
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xt -- addr|0 )_ Get link field of word at xt or 0 if none.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>NAME
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xt -- c-addr u )_ Get string name of word at xt, or ^xt if anonymous/noname.
|
|
|
|
Uses pictured numeric output.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>NUMBER
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( ud1 addr1 u1 -- ud2 addr2 u2 )_ Convert text to number.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>R
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
_( n -- )_ _(R: -- n )_
|
|
|
|
|
2020-01-21 07:09:50 +00:00
|
|
|
## \>R@
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
_( n -- n )_ _( R: -- n )_
|
|
|
|
|
|
|
|
## ?
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- )_ Output signed contents of cell at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ?DO
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- In interpretation state, starts temporary definition.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( -- do-sys )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Execution: _( limit start -- )_ Start DO loop, skip if limit=start.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ?DUP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( 0 -- 0 )_ | _( n1 -- n1 n2 )_ n2 = n1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ?LEAVE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( f -- )_ Exit do loop if f is nonzero.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## @
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- n )_ Fetch n from addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## A"
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [text<">] -- c-addr u )_ Parse text in input buffer, copy to allocated string.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ABORT
|
|
|
|
|
|
|
|
_( -- )_ Execute -1 THROW.
|
|
|
|
|
|
|
|
## ABORT"
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
|
|
|
Compilation/Interpretation: _( [text<">] -- )_
|
|
|
|
|
|
|
|
Execution: _( f -- )_
|
2020-01-14 00:58:39 +00:00
|
|
|
If f is true, display text and execute -2 THROW.
|
|
|
|
|
|
|
|
## ABS
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 -- n2 )_ Take the absolute value of n1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ACCEPT
|
|
|
|
|
|
|
|
_( addr len -- u )_ get input line of up to len chars, stor at addr, u = # chars accepted
|
|
|
|
|
|
|
|
## ACONCAT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr1 u1 addr2 u2 -- addr3 u1+u2 )_ Concatenate allocated strings,
|
2020-01-21 07:09:50 +00:00
|
|
|
freeing the originals.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## AGAIN
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( dest -- )_ Resolve dest.
|
|
|
|
|
|
|
|
Execution: _( -- )_ Jump to BEGIN.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## AHEAD
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- In interpretation state, starts temporary definition.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( -- orig )_
|
|
|
|
|
|
|
|
Execution: _( -- )_ Jump ahead as to the resolution of orig.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ALIAS
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name1< >] [name2< >] -- )_ create name1, name1 is a synonym for name2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ALIGN
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u -- u )_ Align u (no-op in this implementation).
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ALIGNED
|
|
|
|
|
|
|
|
_( u1 -- u2 )_ u2 = next aligned address after u1.
|
|
|
|
|
|
|
|
## ALLOC-MEM
|
|
|
|
|
|
|
|
_( u -- c-addr )_ Allocate memory from heap.
|
|
|
|
|
|
|
|
## ALLOT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- )_ Allocate n bytes in the dictionary.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ALSO
|
|
|
|
|
2020-01-22 07:45:51 +00:00
|
|
|
_( -- )_ Duplicate the first wordlist in the search order.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## AND
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- u3 )_ u3 = u1 & u2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ASCII
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [word< >] -- char )_ Perform either CHAR or [CHAR] per the current compile state.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## AT-XY
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- )_ Place cursor at col u1 row u2 (uses ANSI escape sequence).
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## BASE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- a-addr )_ Variable containing current numeric base.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## BEGIN
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- In interpretation state, starts temporary definition.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( -- dest )_
|
|
|
|
|
|
|
|
Execution: _( -- )_ start a BEGIN loop
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## BEHAVIOR
|
|
|
|
|
2020-01-23 01:56:29 +00:00
|
|
|
_( xt -- )_ Return the first cell of the body of word at xt, normally a DEFER word
|
|
|
|
but will do the same on some other types of words (CREATE, VARIABLE, VALUE, etc).
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## BELL
|
|
|
|
|
|
|
|
_( -- <bel> )_
|
|
|
|
|
|
|
|
## BETWEEN
|
|
|
|
|
2020-10-31 22:02:41 +00:00
|
|
|
_( n1 n2 n3 -- f )_ f = true if n2<=n1<=n3, false otherwise
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## BINARY
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Store 2 to BASE.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## BL
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- <space> )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## BLANK
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr len -- )_ Fill memory with spaces.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## BLJOIN
|
|
|
|
|
|
|
|
_( b.l b2 b3 b.h -- q )_ Join bytes into quad.
|
|
|
|
|
|
|
|
## BODY>
|
|
|
|
|
|
|
|
_( a-addr -- xt )_ return xt of word with body at a-addr, if unable throw exc. -31
|
|
|
|
|
|
|
|
## BOUNDS
|
|
|
|
|
|
|
|
_( n1 n2 -- n1+n2 n1 )_
|
|
|
|
|
|
|
|
## BS
|
|
|
|
|
|
|
|
_( -- <bs> )_
|
|
|
|
|
|
|
|
## BSX
|
|
|
|
|
|
|
|
_( byte -- sign-extended )_
|
|
|
|
|
|
|
|
## BUFFER:
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n [name< >] -- )_ Allocate n bytes of memory, create definition that
|
|
|
|
returns the address of the allocated memory.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## BWJOIN
|
|
|
|
|
|
|
|
_( b.l b.h -- w )_ Join bytes into word.
|
|
|
|
|
|
|
|
## BYE
|
|
|
|
|
|
|
|
_( -- )_ Restore system stack pointer and exit Forth.
|
|
|
|
|
|
|
|
## BYTE-LOAD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr xt -- )_ Evaluate FCode at addr with fetch function xt, saving and
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## C!
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( char addr -- )_ Store char at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## C,
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( char -- )_ Compile char into dictionary.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## C;
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( code-sys -- )_ Consume code-sys, end CODE or LABEL definition.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## C@
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- char )_ Fetch char from addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CA+
|
|
|
|
|
|
|
|
_( u1 n -- u2 )_ u2 = u1 + n * size of char in bytes.
|
|
|
|
|
|
|
|
## CA1+
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 + size of char.
|
|
|
|
|
|
|
|
## CARRET
|
|
|
|
|
|
|
|
_( -- <cr> )_
|
|
|
|
|
|
|
|
## CASE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- In interpretation state, starts temporary definition.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( -- case-sys )_ start a CASE...ENDCASE structure
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
Execution: _( -- )_
|
|
|
|
|
|
|
|
## CATCH
|
|
|
|
|
|
|
|
_( xt -- xi ... xj n|0 )_ Call xt, trap exception, and return it in n.
|
|
|
|
|
|
|
|
## CELL+
|
|
|
|
|
|
|
|
_( u1 -- u2 )_ u2 = u1 + size of cell in bytes.
|
|
|
|
|
|
|
|
## CELLS
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 * size of cell.
|
|
|
|
|
|
|
|
## CHAR
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [word< >] -- char )_ Parse word from input stream, return value of first char.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CHAR+
|
|
|
|
|
|
|
|
_( u1 -- u2 )_ u2 = u1 + size of char in bytes.
|
|
|
|
|
|
|
|
## CHARS
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 * size of char.
|
|
|
|
|
|
|
|
## CICOMP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr1 addr2 u1 -- n1 )_ Case-insensitive compare two strings of length u1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CLEAR
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( ... -- )_ Empty stack.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CMOVE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr1 addr2 len -- )_ Move memory, startomg from the bottom.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CMOVE>
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr1 addr2 len -- )_ Move memory, starting from the top.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CODE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name< >] -- code-sys )_ Create a new CODE definiion.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## COMP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr1 addr2 u1 -- n1 )_ Compare two strings of length u1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## COMPARE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr1 u1 addr2 u2 -- n1 )_ Compare two strings.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## COMPILE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Compile code to compile the immediately following word which must resolve to an xt.
|
|
|
|
Better to use POSTPONE in most cases.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## COMPILE,
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xt -- )_ Compile xt into the dictionary.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CONSTANT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n [name< >] -- )_ alias of VALUE, OF816 doesn't have true constants
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CONTEXT
|
|
|
|
|
2020-10-31 22:02:41 +00:00
|
|
|
_( -- addr )_ Return address of cell with first wid in the search order.
|
|
|
|
if search order is empty, sets the search order to contain the CURRENT word list.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CONTROL
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
( [name< >] ) Parse name, place low 5 bits of first char on stack.
|
|
|
|
If compiling state, compile it as a literal.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## COUNT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- addr+1 u )_ Count packed string at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CPEEK
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- char true )_ Access memory at addr, returning char.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CPOKE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( char addr -- true )_ Store char at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CR
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Emit a CR/LF combination, increment #LINE, set #OUT to 0.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## CREATE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name< >] -- )_ Create a definition, when executed pushes the body address.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## D#
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
( [number< >] n ) Parse number as decimal, compile as literal if compiling.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## D+
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( d1 d2 -- d3 )_ d3 = d1 + d2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## D-
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( d1 d2 -- d3 )_ d3 = d1 - d2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## D.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( d -- )_ Output d.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## D.R
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( d u -- )_ Output d in a field of u chars.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## D>S
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( d -- n )_ Convert double-number to number.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DABS
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( d1 -- d1|d2 )_ Take the absolute value of d1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DEBUG-MEM
|
|
|
|
|
|
|
|
_( -- )_ Display heap and temporary string information.
|
|
|
|
|
|
|
|
## DECIMAL
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Store 10 to BASE.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DEFER
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name< >] -- )_ Create definition that executes the first word of the body as an xt.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DEFINITIONS
|
|
|
|
|
|
|
|
_( -- )_ Set the compiler wordlist to the first wordlist in the search order.
|
|
|
|
|
|
|
|
## DEPTH
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xu ... x1 -- xu ... x1 u )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DIGIT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( char base -- digit true | char false )_ Attempt to convert char to digit.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DNEGATE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( d1 -- d2 )_ Negate d1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DO
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- In interpretation state, starts temporary definition.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( -- do-sys )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Execution: _( limit start -- )_ Start DO loop.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DOES>
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-10-31 22:02:41 +00:00
|
|
|
_( -- )_ alter execution semantics of most recently-CREATEd definition to
|
2020-01-23 01:14:52 +00:00
|
|
|
perform the execution semantics of the code following DOES>.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DROP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x -- )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DUMP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr len -- )_ Dump memory.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## DUP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 -- n1 n2 )_ n2 = n1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ELSE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( if-sys -- else-sys )_
|
|
|
|
|
|
|
|
Execution: _( -- )_ ELSE clause of IF ... ELSE ... THEN.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## EMIT
|
|
|
|
|
|
|
|
_( char -- )_ Output char.
|
|
|
|
|
|
|
|
## END-CODE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( code-sys -- )_ Synonym for C;.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ENDCASE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( case-sys -- )_ Conclude a CASE...ENDCASE structure.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Execution: _( | n -- )_ Continue execution, dropping n if no OF matched.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ENDOF
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation; _( case-sys of-sys -- case-sys )_ Conclude an OF...ENDOF structure.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Execution: Continue execution at ENDCASE of case-sys.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ENVIRONMENT?
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( c-addr u -- xn...x1 t | f )_ Environmental query.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ERASE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr len -- )_ Zero fill memory.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## EVAL
|
|
|
|
|
|
|
|
synonym for EVALUATE
|
|
|
|
|
|
|
|
## EVALUATE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xxn...xx1 addr u -- yxn...yx1 )_ Interpret text in addr u.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## EVEN
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 -- n1|n2 )_ n2 = n1+1 if n1 is odd.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## EXECUTE
|
|
|
|
|
|
|
|
_( xt -- )_ execute xt, regardless of its flags
|
|
|
|
|
|
|
|
## EXIT
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Exit this word, to the caller.
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## EXIT?
|
|
|
|
|
|
|
|
_( -- f )_ If #LINE >= 20, prompt user to continue and return false if they want to.
|
|
|
|
|
|
|
|
## EXPECT
|
|
|
|
|
|
|
|
_( addr len -- )_ get input line of up to len chars, stor at addr, actual len in SPAN
|
|
|
|
|
|
|
|
## FALSE
|
|
|
|
|
|
|
|
_( -- false )_ false = all zero bits
|
|
|
|
|
|
|
|
## FCODE-REVISION
|
|
|
|
|
|
|
|
_( -- u )_ Return FCode revision
|
|
|
|
|
|
|
|
## FERROR
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Display FCode IP and byte, throw exception -256.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## FIELD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( offset size [name< >] -- offset+size )_ create name
|
|
|
|
Execution of name: _( addr -- addr+offset)_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## FILL
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr len char -- )_ Fill memory with char.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## FIND
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( c-addr -- xt|0 )_ Find packed string word in search order, 0 if not found.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## FM/MOD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( d n1 -- n2 n3 )_ Floored divide d by n1, giving quotient n3 and remainder n2.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## FORGET
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name< >] -- )_ Attempt to forget name and subsequent definitions in compiler
|
2020-01-14 00:58:39 +00:00
|
|
|
word list. This may have unintended consequences if things like wordlists and
|
|
|
|
such were defined after name.
|
|
|
|
|
|
|
|
## FORTH
|
|
|
|
|
|
|
|
_( -- )_ Set the first wordlist in the search order to the system words
|
|
|
|
|
|
|
|
## FORTH-WORDLIST
|
|
|
|
|
|
|
|
_( -- wid )_ Return the WID of the wordlist containing system words.
|
|
|
|
|
|
|
|
## FREE-MEM
|
|
|
|
|
|
|
|
_( c-addr u -- )_ Release memory to heap, u is currently ignored.
|
|
|
|
|
|
|
|
## GET-CURRENT
|
|
|
|
|
|
|
|
_( -- wid )_ Get WID current compiler wordlist.
|
|
|
|
|
|
|
|
## GET-ORDER
|
|
|
|
|
|
|
|
_( -- widn ... wid1 u )_ Get dictionary search order.
|
|
|
|
|
|
|
|
## GET-TOKEN
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( fcode# -- xt f )_ Get fcode#'s xt and immediacy.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## H#
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
( [number< >] n ) Parse number as hexadecimal, compile as literal if compiling.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## HERE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- addr )_ Return dictionary pointer.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## HEX
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Store 16 to BASE.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## HOLD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( c -- )_ Place c in pictured numeric output.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## I
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- n )_ Copy inner loop index to stack.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## IF
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- In interpretation state, starts temporary definition.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( -- if-sys )_
|
|
|
|
|
|
|
|
Execution: _( n -- )_ Begin IF ... ELSE ... ENDIF.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## IMMEDIATE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Mark last compiled word as an immediate word.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## INVERT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 -- x2 )_ Invert the bits in x1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## J
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- n )_ Copy second-inner loop index to stack.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## KEY
|
|
|
|
|
|
|
|
_( -- char )_ wait for input char, return it
|
|
|
|
|
|
|
|
## KEY?
|
|
|
|
|
|
|
|
_( -- f )_ f = true if input char is ready, false otherwise
|
|
|
|
|
|
|
|
## L!
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n addr -- )_ Store n at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## L,
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( q -- )_ Compile cell q into dictionary.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## L@
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- n )_ Fetch n from addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LA+
|
|
|
|
|
|
|
|
_( u1 n -- u2 )_ u2 = u1 + n * size of long in bytes.
|
|
|
|
|
|
|
|
## LA1+
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 + size of long.
|
|
|
|
|
|
|
|
## LABEL
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name< >] -- code-sys )_ Create a new LABEL definition.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LAST
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- addr )_ Return address of last definition in current vocabulary.
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## LBFLIP
|
|
|
|
|
|
|
|
_( q -- q' )_ Flip the byte order of quad.
|
|
|
|
|
|
|
|
## LBFLIPS
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr len -- )_ Perform LBFLIP on the cells in memory.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LBSPLIT
|
|
|
|
|
|
|
|
_( u -- u1 ... u4 )_ u1 ... u4 = bytes of u.
|
|
|
|
|
|
|
|
## LCC
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( char -- char' )_ Lower case convert char.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LEAVE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Exit DO loop.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LEFT-PARSE-STRING
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( str len char -- r-str r-len l-str l-len )_ Parse string for char, returning
|
|
|
|
the left and right sides.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LINEFEED
|
|
|
|
|
|
|
|
_( -- <lf> )_
|
|
|
|
|
|
|
|
## LITERAL
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( n -- )_
|
|
|
|
|
|
|
|
Execution: _( -- n )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LOOP
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( do-sys -- )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Execution: _( -- )_ Add 1 to loop index and continue loop if within bounds.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LPEEK
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- cell true )_ Access memory at addr, returning cell.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LPOKE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( cell addr -- true )_ Store cell at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LSHIFT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- u3 )_ u3 = u1 << u2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LWFLIP
|
|
|
|
|
|
|
|
_( q -- q )_ Flip the word order of quad.
|
|
|
|
|
|
|
|
## LWFLIPS
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr len -- )_ Perform LWFLIP on the cells in memory.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## LWSPLIT
|
|
|
|
|
|
|
|
_( u -- u1 ... u2 )_ u1 ... u2 = words of u.
|
|
|
|
|
|
|
|
## M*
|
|
|
|
|
|
|
|
_( n1 n2 -- d )_ d = n1*n2
|
|
|
|
|
|
|
|
## MAX
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- n1|n2 )_ Return the greater of n1 or n2.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## MIN
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- n1|n2 )_ Return the smaller of n1 or n2.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## MOD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 n2 -- n3 )_ Divide n1 by n2, giving remainder n3.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## MOVE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr1 addr2 len -- )_ Move memory.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## N>R
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xu ... x0 u -- )_ _( R: -- x0 ... xu )_ remove u+1 items from parameter stack
|
|
|
|
and place on return stack.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## NA+
|
|
|
|
|
|
|
|
_( u1 n -- u2 )_ u2 = u1 + n * size of cell in bytes.
|
|
|
|
|
|
|
|
## NA1+
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 + size of cell.
|
|
|
|
|
|
|
|
## NEGATE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n1 -- n2 )_ Negate n1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## NIP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- x2 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## NOOP
|
|
|
|
|
|
|
|
_( -- )_ Do nothing.
|
|
|
|
|
|
|
|
## NOSHOWSTACK
|
|
|
|
|
|
|
|
_( -- )_ assuming STATUS is a defer, set it to NOOP
|
|
|
|
|
|
|
|
## NOT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 -- x2 )_ Invert the bits in x1.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## NR>
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( R: x0 ... xu -- )_ _( u -- xu ... x0 )_ remove u+1 items from return stack
|
|
|
|
and place on parameter stack.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## O#
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
( [number< >] n ) Parse number as octal, compile as literal if compiling.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## OCTAL
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Store 8 to BASE.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## OF
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( case-sys -- case-sys of-sys )_ Begin an OF...ENDOF structure.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Execution: _( x1 x2 -- | x1 )_ Execute OF clause if x1 = x2, leave x1 on stack if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## OFF
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- )_ Store all zero bits in cell at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ON
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- )_ Store all one bits to cell at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ONLY
|
|
|
|
|
|
|
|
_( -- )_ Set the search order to contain only the system wordlist.
|
|
|
|
|
|
|
|
## OR
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- u3 )_ u3 = u1 | u2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ORDER
|
|
|
|
|
|
|
|
_( -- )_ Display the current search order and compiler wordlist.
|
|
|
|
|
|
|
|
## OVER
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- x1 x2 x2 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## PACK
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( str len addr -- addr )_ Pack string into addr, similar to PLACE in some Forths.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## PAD
|
|
|
|
|
|
|
|
_( -- a-addr )_ return address of PAD
|
|
|
|
|
|
|
|
## PAGE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Clear screen & home cursor (uses ANSI escape sequence).
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## PARSE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( char [text<char>] -- addr u )_ Parse text from input stream, delimited by char.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## PARSE-2INT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( str len -- val.lo val.hi )_ Parse two integers from string in the form "n2,n2".
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## PARSE-NAME
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [word< >] -- addr u )_ Alias of PARSE-WORD.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## PARSE-WORD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [word< >] -- addr u )_ Parse word from input stream, return address and length.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## PICK
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xu ... x1 x0 u -- xu ... x1 xu )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## POSTPONE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name< >] -- )_ Compile the compilation semantics of name.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## PREVIOUS
|
|
|
|
|
|
|
|
_( -- )_ Remove the first wordlist in the search order.
|
|
|
|
|
|
|
|
## QUIT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ _( R: ... -- )_ Enter outer interpreter loop, aborting any execution.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## R+1
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( R: n1 -- n2 )_ n2 = n1 + 1
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## R>
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( R: x -- )_ _( -- x )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## R@
|
|
|
|
|
|
|
|
_( R: n -- n )_ _( -- n )_
|
|
|
|
|
|
|
|
## RB!
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( byte addr -- )_ Perform FCode-equivalent RB!: store byte.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## RB@
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- byte )_ Perform FCode-equivalent RB@: fetch byte.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## RDROP
|
|
|
|
|
|
|
|
_( R: n -- )_
|
|
|
|
|
|
|
|
## RECURSE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Compile the execution semantics of the most current definition.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## RECURSIVE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Make the current definition findable during compilation.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## REFILL
|
|
|
|
|
|
|
|
_( -- f )_ refill input buffer, f = true if that worked, false if not
|
|
|
|
|
|
|
|
## REPEAT
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( orig dest -- )_ Resolve orig and dest.
|
|
|
|
|
|
|
|
Execution: _( -- )_ Repeat BEGIN loop.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## RESET-ALL
|
|
|
|
|
|
|
|
_( -- )_ Reset the system.
|
|
|
|
|
|
|
|
## RESTORE-INPUT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xn...x1 n -- f )_ Restore current source input state, source ID must match current.
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## RL!
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( cell addr -- )_ Perform FCode-equivalent RL!, store cell.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## RL@
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- cell )_ Perform FCode-equivalent RL@: fetch cell.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ROLL
|
|
|
|
|
|
|
|
_( xu ... x0 u -- xu-1 .. x0 xu )_
|
|
|
|
|
|
|
|
## ROT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 x3 -- x2 x3 x1 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## RSHIFT
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- u3 )_ u3 = u1 >> u2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## RW!
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( word addr -- )_ Perform FCode-equivalent RW!: store word.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## RW@
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- word )_ Perform FCode-equivalent RW@: fetch word.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## S"
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [text<">] -- addr u )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## S.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- )_ Output n.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## S>D
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- d )_ Convert number to double-number.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SAVE-INPUT
|
|
|
|
|
|
|
|
## SEAL
|
|
|
|
|
|
|
|
_( -- )_ Set the search order to contain only the current top of the order.
|
|
|
|
|
|
|
|
## SEARCH
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( c-addr1 u1 c-addr2 u2 -- c-addr3 u3 flag )_ Search for substring.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SEARCH-WORDLIST
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( c-addr u wid -- 0 | xt +-1 )_ Search wordlist for word.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SEE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [text< >] -- )_ Attempt to decompile name.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SET-CURRENT
|
|
|
|
|
|
|
|
_( wid -- )_ Set the compiler wordlist.
|
|
|
|
|
|
|
|
## SET-ORDER
|
|
|
|
|
|
|
|
_( widn ... wid1 n -- )_ Set dictionary search order.
|
|
|
|
|
|
|
|
## SET-TOKEN
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( xt fcode# f -- )_ Set fcode# to execute xt, immediacy f.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SHOWSTACK
|
|
|
|
|
|
|
|
_( -- )_ assuming STATUS is a defer, set it to .S
|
|
|
|
|
|
|
|
## SIGN
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- )_ Place - in pictured numeric output if n is negative.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SIGNUM
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- s )_ s = -1 if n is negative, 0 if 0, 1 if positive.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SLITERAL
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compiling: _( addr1 u -- )_ compile string literal into current def
|
|
|
|
|
|
|
|
Execution: _( -- addr2 u )_ return compiled string
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SM/REM
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( d n1 -- n2 n3 )_ Symmetric divide d by n1, giving quotient n3 and remainder n2.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SOURCE
|
|
|
|
|
|
|
|
_( -- c-addr u )_ return address and length of input source buffer
|
|
|
|
|
|
|
|
## SOURCE-ID
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
_( -- n )_ return current input source id (0 = console, -1 = string, >0 = file)
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## SPACE
|
|
|
|
|
|
|
|
_( -- )_ emit a space
|
|
|
|
|
|
|
|
## SPACES
|
|
|
|
|
|
|
|
_( u -- )_ emit u spaces
|
|
|
|
|
|
|
|
## SPAN
|
|
|
|
|
|
|
|
## SQRTREM
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 -- u2 u3 )_ u2 = closest square root <= to the true root, u3 = remainder.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## STATE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- addr )_ Variable, zero if interpreting, nonzero if compiling.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## STRUCT
|
|
|
|
|
|
|
|
_( -- 0 )_
|
|
|
|
|
|
|
|
## SWAP
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- x2 x1 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## THEN
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( if-sys|else-sys -- )_
|
|
|
|
|
|
|
|
Execution: _( -- )_ Conclustion of IF ... ELSE ... THEN.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## THROW
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n -- )_ Throw exception n if n is nonzero.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## TO
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n [name< >] -- )_ Change the first cell of the body of xt to n. Can be used on
|
|
|
|
most words created with CREATE, DEFER, VALUE, etc. (even VARIABLE).
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## TRUE
|
|
|
|
|
|
|
|
_( -- true )_ true = all one bits
|
|
|
|
|
|
|
|
## TUCK
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( x1 x2 -- x2 x1 x2 )_
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## TYPE
|
|
|
|
|
|
|
|
_( addr u -- )_ Output string.
|
|
|
|
|
|
|
|
## U#
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 -- u2 )_ Divide u1 by BASE, convert remainder to char and HOLD it, u2 = quotient.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U#>
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u -- )_ Conclude pictured numeric output.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U#S
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u -- 0 )_ Perform U# until quotient is zero.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U*
|
|
|
|
|
|
|
|
_( u1 u2 -- u3 )_ u3 = u1*u2
|
|
|
|
|
|
|
|
## U.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u -- )_ Output u.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U.0
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 -- )_ Output u1 with no trailing space.
|
2020-01-22 07:39:06 +00:00
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## U.R
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- )_ Output u1 in a field of u2 chars.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U/MOD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- u3 u4 )_ Divide u1 by u2, giving quotient u4 and remainder u3.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U2/
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 -- u2 )_ Shift n1 one bit right.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U<
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- f )_ f = true if u1 < u2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U<=
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- f )_ f = true if u1 <= u2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U>
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- f )_ f = true if u1 > u2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## U>=
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- f )_ f = true if u1 >= u2, false if not.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## UD/MOD
|
|
|
|
|
|
|
|
_( d1 n1 -- d2 n2 )_ d2, n2 = remainder and quotient of d1/n1
|
|
|
|
|
|
|
|
## UM*
|
|
|
|
|
|
|
|
_( u1 u2 -- ud )_ ud = u1*u2
|
|
|
|
|
|
|
|
## UM/MOD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( ud u1 -- u2 u3 )_ Divide ud by u1, giving quotient u3 and remainder u2.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## UNALIGNED-L!
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n addr -- )_ Store n at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## UNALIGNED-L@
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- n )_ Fetch n from addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## UNALIGNED-W!
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( word addr -- )_ Store word at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## UNALIGNED-W@
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- n )_ Fetch word from addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## UNLOOP
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ _( R: loop-sys -- )_ Remove loop parameters from return stack.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## UNTIL
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( dest -- )_
|
|
|
|
|
|
|
|
Execution: _( x -- )_ UNTIL clause of BEGIN...UNTIL loop
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## UNUSED
|
|
|
|
|
|
|
|
_( -- u )_ u = unused data space accounting for PAD and dynamic allocations
|
|
|
|
|
|
|
|
## UPC
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( char -- char' )_ Upper case convert char.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## VALUE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( n [name< >] -- )_ Create a definition that pushes n on the stack,
|
|
|
|
n can be changed with TO.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## VARIABLE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name< >] -- )_ Execute CREATE name and allocate one cell, initially a zero.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## VOCABULARY
|
|
|
|
|
|
|
|
_( "name"<> -- )_ Create a new named wordlist definition. When name is executed,
|
|
|
|
put the WID of the wordlist at the top of the search order.
|
2020-01-21 07:09:50 +00:00
|
|
|
The WID is the address of the body of the named wordlist definition.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## W!
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( word addr -- )_ Store word at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## W,
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( word -- )_ Compile word into dictionary.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## W@
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- word )_ Fetch word from addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## WA+
|
|
|
|
|
|
|
|
_( u1 n -- u2 )_ u2 = u1 + n * size of word in bytes.
|
|
|
|
|
|
|
|
## WA1+
|
|
|
|
|
|
|
|
_( n1 -- n2 )_ n2 = n1 + size of word.
|
|
|
|
|
|
|
|
## WBFLIP
|
|
|
|
|
|
|
|
_( w -- w' )_ Flip the byte order of w.
|
|
|
|
|
|
|
|
## WBFLIPS
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr len -- )_ Perform WBFLIP on the words in memory.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## WBSPLIT
|
|
|
|
|
|
|
|
_( u -- u1 .. u2 )_ u1 .. u2 = bytes of word u.
|
|
|
|
|
|
|
|
## WHILE
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( dest -- orig dest )_
|
|
|
|
|
|
|
|
Execution: _( x -- )_ WHILE clause of BEGIN...WHILE...REPEAT loop
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## WITHIN
|
|
|
|
|
|
|
|
_( n1|u1 n2|u2 n3|u3 -- f )_ f = true if n2|u2 <= n1|u1 < n3|u3, false otherwise
|
|
|
|
|
|
|
|
## WLJOIN
|
|
|
|
|
|
|
|
_( w.l w.h -- q )_ Join words into quad.
|
|
|
|
|
|
|
|
## WORD
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( char [text<char>] -- addr )_ Parse text from input stream delimited by char, return
|
|
|
|
address of WORD buffer containing packed string.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## WORDLIST
|
|
|
|
|
|
|
|
_( -- wid )_ Create a new wordlist.
|
|
|
|
|
|
|
|
## WORDS
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( -- )_ Output the words in the CONTEXT wordlist.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## WPEEK
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( addr -- word true )_ Access memory at addr, returning word.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## WPOKE
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( word addr -- true )_ Store word at addr.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## WSX
|
|
|
|
|
|
|
|
_( word -- sign-extended )_
|
|
|
|
|
|
|
|
## XOR
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( u1 u2 -- u3 )_ u3 = u1 ^ u2
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## [
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
_( -- )_ Enter interpretation state.
|
|
|
|
|
|
|
|
## [']
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [old-name< >] -- xt )_ Immediately parse old-name in input stream, return xt of word.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## [:
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
Compilation: _( -- quot-sys )_ Start a quotation.
|
|
|
|
|
|
|
|
Execution: _( -- )_ Skip over quotation code.
|
2020-01-21 07:09:50 +00:00
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
## [CHAR]
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
- Compile-only.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [word< >] -- char )_ Immediately perform CHAR and compile literal.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## [COMPILE]
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [name< >] -- )_ Compile name now. Better to use POSTPONE.
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## \
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-23 01:14:52 +00:00
|
|
|
_( [text<end>] -- )_ Discard the rest of the input buffer (or line during EVALUATE)
|
2020-01-14 00:58:39 +00:00
|
|
|
|
|
|
|
## ]
|
|
|
|
|
2020-01-22 07:39:06 +00:00
|
|
|
- Immediate.
|
|
|
|
|
2020-01-14 00:58:39 +00:00
|
|
|
_( -- )_ Enter compilation state.
|
|
|
|
|