"Forth'83 compatibility"

forth_83 FORTH /* FORTH-83 required word set */
* 2+ ( i -- i )

add 2 to the value on stack (and leave the result there)
 simulate:
   : 2+ 2 + ;

FORTH/FORTH forth_83 ordinary primitive

* 2- ( i -- i )

substract 2 from the value on stack (and leave the result there)
 simulate:
   : 2- 2 - ;

FORTH/FORTH forth_83 ordinary primitive

?TERMINAL

[] no special info, see general notes

FORTH/FORTH forth_83 ordinary primitive

* COMPILE ( 'word' -- )

compile the next word. The next word should not be immediate,
in which case you would have to use [COMPILE]. For this
reason, you should use the word POSTPONE, which takes care
it.
 simulate:
   : COMPILE  R> DUP @ , CELL+ >R ;  ( not immediate !!! )

FORTH/FORTH forth_83 compiling primitive

* NOT ( x -- flag )

Identical to `0=`, used for program clarity to reverse the
result of a previous test.

WARNING: PFE's NOT uses bitwise complement INVERT
instead of the logical complement 0=, so
that loading TOOLBELT will change semantics.
... this difference in semantics has caused dpans94 to
depracate the word. Only if TRUE is -1 it would be identical
but not all words return -1 for true.

FORTH/FORTH forth_83 compiling primitive

* VOCABULARY ( 'name' -- )

create a vocabulary of that name. If the named vocabulary
is called later, it will run ((VOCABULARY)) , thereby
putting it into the current search order.
Special pfe-extensions are accessible via
CASE-SENSITIVE-VOC and SEARCH-ALSO-VOC
 simulate:
   : VOCABULARY  CREATE ALLOT-WORDLIST
        DOES> ( the ((VOCABULARY)) runtime )
          CONTEXT ! 
   ; IMMEDIATE

FORTH/FORTH forth_83 ordinary primitive

/* FORTH-83 controlled reference words */
* --> ( -- ) no-return

does increase BLK and refills the input-buffer
from there. Does hence break interpretation of the
current BLK and starts with the next. Old-style
forth mechanism. You should use INCLUDE

FORTH/FORTH forth_83 immediate primitive

INTERPRET

[] no special info, see general notes

FORTH/FORTH forth_83 ordinary primitive

* K ( -- counter-val )

the 3rd loop index just like I and J

FORTH/FORTH forth_83 compiling primitive

* OCTAL ( -- )

sets BASE to 8. Compare with HEX and DECIMAL
 simulate:
   : OCTAL  8 BASE ! ;

FORTH/FORTH forth_83 ordinary primitive

* SP@ ( -- )

the address of the top of stack. Does save it onto
the stack. You could do
   : DUP  SP@ @ ;

FORTH/FORTH forth_83 ordinary primitive

/* FORTH-83 uncontrolled reference words */
* !BITS ( bits addr mask -- )

at the cell pointed to by addr, change only the bits that
are enabled in mask
 simulate:
   : !BITS  >R 2DUP @ R NOT AND SWAP R> AND OR SWAP ! DROP ;

FORTH/FORTH forth_83 ordinary primitive

* @BITS ( addr mask -- value )

see the companion word !BITS
 simulate:
   : @BITS  SWAP @ AND ;

FORTH/FORTH forth_83 ordinary primitive

* >< ( a -- a' )

byte-swap a word

FORTH/FORTH forth_83 ordinary primitive

* >MOVE< ( from-addr to-addr count -- )

see MOVE , does byte-swap for each word underway

FORTH/FORTH forth_83 ordinary primitive

* ** ( a b -- r )

raise second to top power

FORTH/FORTH forth_83 ordinary primitive

DPL

[] no special info, see general notes

FORTH/FORTH forth_83 threadstate variable

/* FORTH-83 Search order specification and control */
* SEAL ( -- )

looks through the search-order and kills the ONLY wordset -
hence you can't access the primary vocabularies from there.

FORTH/FORTH forth_83 ordinary primitive