FORTH
add 2 to the value on stack (and leave the result there)
simulate:
: 2+ 2 + ;
|
forth_83 ordinary primitive
substract 2 from the value on stack (and leave the result there)
simulate:
: 2- 2 - ;
|
forth_83 ordinary primitive
FORTH ?TERMINAL
no special info, see general notes
forth_83 ordinary primitive
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_83 compiling primitive
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_83 compiling primitive
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_83 ordinary primitive
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_83 immediate primitive
FORTH INTERPRET
no special info, see general notes
forth_83 ordinary primitive
the 3rd loop index just like I and J
|
forth_83 ordinary primitive
sets BASE to 8. Compare with HEX and DECIMAL
simulate:
: OCTAL 8 BASE ! ;
|
forth_83 ordinary primitive
the address of the top of stack. Does save it onto
the stack. You could do
: DUP SP@ @ ;
|
forth_83 ordinary primitive
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_83 ordinary primitive
see the companion word !BITS
simulate:
: @BITS SWAP @ AND ;
|
forth_83 ordinary primitive
forth_83 ordinary primitive
see MOVE , does byte-swap for each word underway
|
forth_83 ordinary primitive
raise second to top power
|
forth_83 ordinary primitive
FORTH DPL
no special info, see general notes
forth_83 threadstate variable
looks through the search-order and kills the ONLY wordset -
hence you can't access the primary vocabularies from there.
|
forth_83 ordinary primitive