X-Git-Url: http://git.subgeniuskitty.com/pforth/.git/blobdiff_plain/970d32b553a44051cedd2caf34267b7b1cdbab78..1cb310e62eaf4422ee298d9d87c35f9dd6b4c71c:/fth/system.fth diff --git a/fth/system.fth b/fth/system.fth index 01b779d..0223ab0 100644 --- a/fth/system.fth +++ b/fth/system.fth @@ -17,8 +17,8 @@ : \ ( -- , comment out rest of line ) EOL word drop ; immediate - -\ 1 echo ! \ Uncomment this line to echo Forth code while compiling. + +\ 1 echo ! \ Uncomment this line to echo Forth code while compiling. \ ********************************************************************* \ This is another style of comment that is common in Forth. @@ -48,13 +48,9 @@ 0 swap ! ; -\ size of data items -\ FIXME - move these into 'C' code for portability ???? -: CELL ( -- size_of_stack_item ) 4 ; - : CELL+ ( n -- n+cell ) cell + ; : CELL- ( n -- n+cell ) cell - ; -: CELLS ( n -- n*cell ) 2 lshift ; +: CELL* ( n -- n*cell ) cells ; : CHAR+ ( n -- n+size_of_char ) 1+ ; : CHARS ( n -- n*size_of_char , don't do anything) ; immediate @@ -174,7 +170,7 @@ ; : N>LINK ( nfa -- lfa ) - 8 - + 2 CELLS - ; : >BODY ( xt -- pfa ) @@ -358,7 +354,8 @@ ; : D2* ( d -- d*2 ) - 2* over 31 rshift or swap + 2* over + cell 8 * 1- rshift or swap 2* swap ; @@ -825,6 +822,6 @@ FREEZE \ prevent forgetting below this point .( Dictionary compiled, save in "pforth.dic".) cr c" pforth.dic" save-forth - + \ Save the dictionary in "pfdicdat.h" file so pForth can be compiled for standalone mode. SDAD