2+( a# -- a#' | a* -- a*' | a -- a' [??] ) [FTH] => [FORTH]
add 2 to the value on stack (and leave the result there)
simulate:
: 2+ 2 + ;
primitive code = [p4_two_plus]
2-( a# -- a#' | a* -- a*' | a -- a' [??] ) [FTH] => [FORTH]
substract 2 from the value on stack (and leave the result there)
simulate:
: 2- 2 - ;
primitive code = [p4_two_minus]
?TERMINAL => [FORTH]
(no description)
primitive code = [p4_key_question]
COMPILE( "word" -- ) [FTH] => [FORTH]
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 !!! )
compiling word = [p4_compile]
-->( -- ) [FTH] => [FORTH]
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
immediate code = [p4_next_block]
INTERPRET => [FORTH]
(no description)
primitive code = [p4_interpret]
K( -- k# ) [FTH] => [FORTH]
the 3rd loop index just like I and J
compiling word = [p4_k]
OCTAL( -- ) [FTH] => [FORTH]
sets BASE to 8. Compare with HEX and DECIMAL
simulate:
: OCTAL 8 BASE ! ;
primitive code = [p4_octal]
SP@( -- sp-cell* ) [FTH] => [FORTH]
the address of the top of stack. Does save it onto
the stack. You could do
: DUP SP@ @ ;
primitive code = [p4_s_p_fetch]
!BITS( x-bits# x-addr mask# -- ) [FTH] => [FORTH]
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 ;
primitive code = [p4_store_bits]
@BITS( x-addr mask# -- x-value# ) [FTH] => [FORTH]
see the companion word => !BITS
simulate:
: @BITS SWAP @ AND ;
primitive code = [p4_fetch_bits]
_like:NTOHS => [FORTH]
(no description)
primitive code = [p4_byte_swap]
_like:NTOHS-MOVE => [FORTH]
(no description)
primitive code = [p4_byte_swap_move]
**( a# b# -- power-a# ) [FTH] => [FORTH]
raise second to top power
primitive code = [p4_power]
SEAL( -- ) [FTH] => [FORTH]
looks through the search-order and kills the ONLY wordset -
hence you can't access the primary vocabularies from there.
primitive code = [p4_seal]