pfe-forth-83-ext
Prev? | pfe Forth Wordset List | ?Next

## Name

pfe-forth-83-ext ?

## Synopsis

`2+ ( a# -- a#' | a* -- a*' | a -- a' [??] ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`2- ( a# -- a#' | a* -- a*' | a -- a' [??] ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`?TERMINAL ?=>? (` | `)`; | ?

`[FORTH]`;
?

`COMPILE ( "word" -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`--> ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`INTERPRET ?=>? (` | `)`; | ?

`[FORTH]`;
?

`K ( -- k# ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`OCTAL ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`SP@ ( -- sp-cell* ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`!BITS ( x-bits# x-addr mask# -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`@BITS ( x-addr mask# -- x-value# ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`>< ( a -- a' ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`>MOVE< ( from-addr* to-addr* count# -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`** ( a# b# -- power-a# ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

`SEAL ( -- ) ?=>? (` | `)`; | ?

`[FORTH]`;
?

## Description

NOT ( x# - x#' [?] ) [FTH] * a => SYNONYM for => INVERT - the word => NOT is not portable as in some * systems it is a => SYNONYM for => 0= ... therefore try to avoid it. * * we declare it as an OBSOLETED-SYNONYM now to create a warning message * since code using NOT is inherently not portable. The forth systems * seem to be divided about 50%-50% for F83'style bitwise =>"INVERT" or * a logical NOT as =>"0=", with a slight drift into the direction of * =>"0=". We default to bitwise style for earlier FIG/F83 usage. * * Remember that you can override the defaults in your application code * e.g. a SYNONYM NOT 0= to have the logical style as the behavior. As * for all synonyms the decompilation will show "0=" in that case.

2+ ( a# -- a#' | a* -- a*' | a -- a' [??] ) [FTH] => [FORTH]

add 2 to the value on stack (and leave the result there)

      simulate:
        : 2+ 2 + ;

2- ( a# -- a#' | a* -- a*' | a -- a' [??] ) [FTH] => [FORTH]

substract 2 from the value on stack (and leave the result there)

      simulate:
        : 2- 2 - ;

?TERMINAL - no description, sorry

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&gt; DUP @ , CELL+ &gt;R ;  ( not immediate !!! )

--> ( -- ) [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`

      : --&gt; ?LOADING REFILL ;

INTERPRET - no description, sorry

K ( -- k# ) [FTH] => [FORTH]

the 3rd loop index just like `I` and `J`

OCTAL ( -- ) [FTH] => [FORTH]

sets `BASE` to 8. Compare with `HEX` and `DECIMAL`

      simulate:
        : OCTAL  8 BASE ! ;

SP@ ( -- sp-cell* ) [FTH] => [FORTH]

the address of the top of stack. Does save it onto the stack. You could do

        : DUP  SP@ @ ;

!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  &gt;R 2DUP @ R NOT AND SWAP R&gt; AND OR SWAP ! DROP ;

@BITS ( x-addr mask# -- x-value# ) [FTH] => [FORTH]

see the companion word => !BITS

      simulate:
        : @BITS  SWAP @ AND ;

>< ( a -- a' ) [FTH] [OLD] => [FORTH]

byte-swap a word

depracated: use `NTOHS` which does the same as this word when the local byte-order seems to have no match, and be otherwise a no-op. Note that only the two lower bytes of the top-of-cell are swapped.

>MOVE< ( from-addr* to-addr* count# -- ) [FTH] [OLD] => [FORTH]

see `MOVE` , does byte-swap for each word underway.

depracated: this word has not been very useful lately. It does still stem from times of 16bit forth systems that wanted to interchange data blocks. It is better to use functionality based on `NTOHS` or `NTOHL`. Note that this word `>MOVE<` does swap each 2byte. It is not useful for byte-swapping `WCHAR` strings as the count is given in bytes, not wchar items.

** ( a# b# -- power-a# ) [FTH] => [FORTH]

raise second to top power

SEAL ( -- ) [FTH] => [FORTH]

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

Prev? | Up | ?Next
pfe-floating-misc-ext? | Home | ?pfe-forth-usual-ext