home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / language / forth / !FORTH / dict < prev    next >
Encoding:
Text File  |  1990-05-02  |  23.4 KB  |  896 lines

  1.  
  2.                          FORTH DICTIONARY DEFINITIONS
  3.                          ============================
  4.  
  5.  
  6.    This file contains the dictionary entries called words of the FORTH v1.2
  7. compiler / interpreter, it should be used to check the semantics and number
  8. of stack entries of the words. A short example follows of the syntax used to
  9. desribe them.
  10.  
  11.  
  12. DUP        [ W32a -> W32a W32a ]  (special)
  13.  
  14.            This word is used to duplicate the top 32 bit word on the stack.
  15.  
  16.  
  17.  
  18.    The entry starts of with the word being defined, next in the square
  19. brackets comes the stack usage. The values on the stack before the call of
  20. DUP are shown to the left of the -> those left on the stack after the call
  21. are shown on the right. Each stack element definition is made up of three
  22. parts the first part is a letter showing the type of the stack element.
  23.  
  24.          A = address
  25.          U = unsigned
  26.          S = signed                                                               
  27.          W = a word (address or unsigned or signed)
  28.          B = a word which can only have two values (0=FALSE, -1=TRUE).
  29.  
  30.    The next part is a number showing the number of bits that the element
  31. takes up.
  32.  
  33.          Str = a series of bytes ending with between 1 and 4 zeros, to make
  34. the size up to a multiple of 4 bytes.
  35.  
  36.    The final part is a letter which is used to distinguish between stack
  37. elements i.e.
  38.  
  39.  
  40. ROT          [ W32a W32b W32c -> W32b W32c W32a] (main)
  41.  
  42.              This word is used to rotate the top three stack elements, the
  43.          bottom one of these becomes the top.
  44.  
  45.  
  46.  
  47.    Next comes a name in brackets, this is the dictionary that the word is
  48. contained in, currently there are three basic dictionaries defined:
  49.  
  50.    1. main     - this is the dictionary which contains the words that are
  51.                  interpreted from the prompt, as well as basic stack
  52.                  manipulation there are words for I/O, dictionary
  53.                  manipulation, etc.
  54.  
  55.    2. compiler - this dictionary is only available when compiling a new word,
  56.                  it contains words for iteration, selection, etc.
  57.                                                           
  58.    3. special  - this dictionary contains the most used words from the main
  59.                  dictionary. The are compiled in a special way so that they
  60.                  run much faster than ordinary words. 
  61.  
  62.    Finally comes a description of the word its actions, semantics, and usual uses.
  63.  
  64.  
  65.  
  66. :            [ -> ] (main)
  67.  
  68.              This word starts the compilation process, the next string
  69.          starting after the intervening space and ending at the next space
  70.          after that is the name of the word compiled. (e.g. : 2DUP DUP DUP ;          compiles the word 2DUP, a semicolon ends the compilation. 
  71.  
  72.  
  73. ?            [ ]       ?????????????
  74.  
  75.  
  76.  
  77. .            [ W32a -> ] (main)
  78.  
  79.              This word prints the TOS to the currently selected output (e.g.          the screen).
  80.  
  81.  
  82. "            [ -> Str ] (main)
  83.  
  84.              This word takes the following string and places it on the stack.
  85.          The string is followed by at least one and up to four zero bytes to
  86.          make it up to a multiple of 4 bytes long.
  87.          ( use as in " this is a string" ) the string starts with the 't' and
  88.          ends with the 'g'.
  89.  
  90.  
  91. ,            [ W32a -> ] (main)
  92.  
  93.              This word writes the top stack entry into the code. It is used
  94.          during the compilation process, see the example program Outer.
  95.  
  96.  
  97. >            [ S32a S32b -> B32c ] (main) (special)
  98.  
  99.              If S32a > S32b then write -1 into the TOS else write 0 to TOS.
  100.          (-1 = TRUE, 0=FALSE).
  101.         
  102.  
  103. <            [ S32a S32b -> B32c ] (main) (special)
  104.  
  105.              If S32a < S32b then write -1 into the TOS else write 0 to TOS. 
  106.          (-1 = TRUE, 0=FALSE).      
  107.  
  108.  
  109. =            [ W32a W32b -> B32c ] (main) (special)
  110.  
  111.              If W32a = W32b then write -1 into the TOS else write 0 to TOS.
  112.          (-1 = TRUE, 0=FALSE).
  113.  
  114.  
  115. -            [ S32a S32b -> S32c ] (main) (special)
  116.  
  117.              Subtract the top stack entry from the one below it on the stack.
  118.               
  119.  
  120.  
  121. +            [ S32a S32b -> S32c ] (main) (special)
  122.  
  123.              Add the top two stack entries together
  124.  
  125.  
  126. *            [ S32a S32b -> S32c ] (main)
  127.  
  128.              Multiply the top two stack entries together.
  129.  
  130.  
  131. /            [ S32a S32b -> S32c ] (main)
  132.  
  133.              Divide the second entry on the stack by the top stack entry.
  134.       
  135.  
  136. MOD          [ ] ??????????
  137.  
  138.  
  139. /MOD         [ ] ??????????
  140.  
  141.  
  142. @            [ A32a -> W32a ] (main) (special)
  143.  
  144.              The top stack entry is treated as an address, the word at this
  145.          address is loaded into the top stack entry.
  146.          
  147.  
  148. !            [ W32a A32a -> ] (main) (special)
  149.  
  150.              The top stack entry is treated as an address and the second
  151.          entry on the address is stored at this address, both entries are
  152.          poped.
  153.  
  154.  
  155. */           [ S32a S32b S32c -> S32d ] (main) (special)
  156.  
  157.              S32d := (S32a * S32b) / S32c. This is written so that the
  158.          multiplication produces at 64 bit product that is then divided by
  159.          S32c to produce the 32 bit result.
  160.  
  161.  
  162. C@           [ A32a -> W8a ] (special)
  163.  
  164.              The top stack entry is treated as an address, the byte at this
  165.          address is loaded into the top stack entry.
  166.               
  167.  
  168. C!           [ W8a A32a -> ] (main) (special)
  169.  
  170.              The top stack entry is treated as an address and the second
  171.          entry on the address is stored as a byte at this address, both
  172.          entries are poped.
  173.  
  174.  
  175. 0=           [ W32a -> B32b ] (main)
  176.  
  177.              If the TOS is zero the B32b=-1 (TRUE) else B32b=0 (FALSE).
  178.               
  179.  
  180. 0<           [ S32a -> B32b ] (main)
  181.  
  182.              If the TOS is less than zero the B32b=-1 (TRUE) else B32b=0
  183.          (FALSE).
  184.  
  185.  
  186. 1-           [ S32a -> S32b ] (main) (special)
  187.  
  188.              S32b := S32a-1.
  189.  
  190.  
  191. 1+           [ S32a -> S32b ] (main) (special)
  192.  
  193.              S32b := S32a+1.
  194.  
  195.  
  196. 2-           [ S32a -> S32b ] (main) (special)
  197.  
  198.              S32b := S32a-2.
  199.  
  200.  
  201.  
  202. 2+           [ S32a -> S32b ] (main) (special)
  203.    
  204.              S32b := S32a+2.
  205.  
  206.  
  207.  
  208. 2*           [ S32a -> S32b ] (main)
  209.  
  210.              S32b := S32a << 1.
  211.  
  212.  
  213.  
  214. 2/           [ S32a -> S32b ] (main)
  215.  
  216.              S32b := S32a >> 1.
  217.  
  218.  
  219.  
  220. 4-           [ S32a -> S32b ] (main) (special)
  221.  
  222.              S32b := S32a-4.
  223.  
  224.  
  225.  
  226. 4+           [ S32a -> S32b ] (main) (special)
  227.  
  228.              S32b := S32a+4.
  229.             
  230.  
  231. 4*           [ S32a -> S32b ] (main)
  232.  
  233.              S32b := S32a << 2.
  234.  
  235.  
  236. 4/           [ S32a -> S32b ] (main)
  237.  
  238.              S32b := S32a >> 2.
  239.  
  240.  
  241. <R           [ W32a -> ]  (main)
  242.  
  243.              Pops the top word off the stack and puts it onto the processor
  244.          stack.
  245.  
  246.  
  247. R>           [ -> W32a ]  (main)
  248.  
  249.              Pops the top word off the processor stack and puts it onto the
  250.          stack.
  251.  
  252.  
  253. +!           [ W32a A32b -> ] (main)
  254.  
  255.              Pops two stack entries and adds the word in the second entry to
  256.          the word whose address is the top entry.
  257.  
  258.  
  259. +-           [ W32a W32b -> W32c ] (main)
  260.  
  261.              The sign of the top word on the stack is popped and used to set
  262.          the sign of the second word on the stack.
  263.  
  264.              IF W32b <0 THEN W32c := -ABS(W32a) ELSE W32c := ABS(W32a) ENDIF
  265.  
  266.  
  267.  
  268. +ORIGIN      [ W32a -> A32b ] (main)
  269.  
  270.              Adds the address of the system variables onto the word on the
  271.          top of the stack. This word is used to address system variables.
  272.  
  273.  
  274. uD*          [ W32a W32b -> W64c ] (main)
  275.  
  276.              Multiplies the top two 32 bit unsigned entries on the stack and
  277.          places the 64 bit result back on the stack (high word is at the
  278.          TOS).
  279.  
  280.  
  281. uD/          [ W64a W32b -> W32c ] (main)
  282.  
  283.              Divides the 64 bit unsigned entry by the TOS and places the
  284.          result on the stack.
  285.  
  286.  
  287. D*           [ W32a W32b -> W64c ] (main)
  288.  
  289.              Multiplies the top two 32 bit signed entries on the stack and
  290.          places the 64 bit result back on the stack (high word is at the
  291.          TOS).
  292.  
  293.  
  294. D/           [ W64a W32b -> W32c ] (main)
  295.  
  296.              Divides the 64 bit signed entry by the TOS and places the result
  297.          on the stack.
  298.  
  299.  
  300. ?SP          [ -> A32a ] (main)
  301.  
  302.              Pushes the current stack pointer (before the execution of ?SP)
  303.          onto the stack.
  304.  
  305.  
  306. 'S           [ ] ???????????????
  307.  
  308.  
  309. +SP          [ W32a -> W32b ] (main)
  310.  
  311.              Add the current stack pointer to the number on top of the stack.
  312.                                                                 
  313.  
  314. ><           [ W32a -> W32b ] (main)
  315.  
  316.              Swaps the lowest two bytes of W32a.
  317.  
  318.              EXAMPLE:
  319.  
  320.              What Next>  HEX &12345678 >< .       (HEX is not defined yet!)
  321.              1247856 OK
  322.                                                   
  323. >CLI         [ A32a -> ] (main)
  324.  
  325.              Sends the string pointed to by A32a to the Command Line
  326.          Interpreter. To do this it calls "OS_CLI" with the address A32a in
  327.          R0.
  328.  
  329.  
  330. 0SET         [ A32a -> ] (main)
  331.  
  332.              Set the 32 bit word whose address is the top stack entry to 0.
  333.  
  334.  
  335. 1SET         [ A32a -> ] (main)
  336.  
  337.              Set the 32 bit word whose address is the top stack entry to 1.
  338.  
  339.  
  340. C0SET        [ A32a -> ] (main)
  341.  
  342.              Set the byte whose address is the top stack entry to 0.
  343.  
  344.  
  345. C1SET        [ A32a -> ] (main)
  346.  
  347.              Set the byte whose address is the top stack entry to 1.
  348.  
  349.  
  350. C+!          [ W8a A32b -> ] (main)
  351.  
  352.              Pops two stack entries and adds the least significant byte in
  353.          the second entry to the byte whose address is the top entry.
  354.  
  355.  
  356. ABS          [ S32a -> W32b ] (main)
  357.  
  358.              Makes the TOS positive, by negating is top bit set (i.e.
  359.          negative) before call of ABS.
  360.  
  361.  
  362. REM          [ -> ] ???????????
  363.  
  364.  
  365. RANDOM       [ -> ] ???????????
  366.  
  367.  
  368. AND          [ W32a W32b -> W32c ] (main)
  369.  
  370.              Does a bitwise logical AND on the top two stack entries and
  371.          pushes the result.
  372.  
  373.  
  374. CLEAR        [ -> ] ???????????????????
  375.  
  376.  
  377. CRET         [ -> ] (main)
  378.  
  379.              Write a carriage-return line-feed to the current output streams.
  380.  
  381.  
  382. DROP         [ W32a -> ] (special) (main)
  383.  
  384.              Remove the top stack entry without doing any processing on it.
  385.  
  386.  
  387. ECHO         [ W8a -> ] (main)
  388.  
  389.              Pops the top stack entry and write the low-order byte to all the
  390.          current output streams.
  391.  
  392.  
  393. MAX          [ S32a S32b -> S32c ] (main)
  394.  
  395.              Pops the top two stack entries, compares them and then pushes
  396.          the higher value back onto the stack.
  397.  
  398.          IF S32a > S32b THEN
  399.              S32c := S32a
  400.          ELSE
  401.              S32c := S32b
  402.          ENDIF.
  403.  
  404.  
  405. MIN          [ S32a S32b -> S32c ] (main)
  406.  
  407.              Pops the top two stack entries, compares them and then pushes
  408.          the lower value back onto the stack.
  409.  
  410.          IF S32a < S32b THEN
  411.              S32c := S32a
  412.          ELSE
  413.              S32c := S32b
  414.          ENDIF.
  415.  
  416.  
  417. NOT          [ W32a -> W32b ] (main)
  418.  
  419.              Does a bitwise NOT on the top stack entry.
  420.  
  421.  
  422. OR           [ W32a W32b -> W32c ] (main)
  423.  
  424.              Does a bitwise logical OR on the top two stack entries and
  425.          pushes the result.
  426.  
  427.  
  428. .R           [ S32a W32b -> ] (main)
  429.  
  430.              Displays the second stack entry as a number on all the current
  431.          output streams in a field width determined by the top stack entry.
  432.          The number is right justified within the field and followed by a
  433.          space. The field width is the the minimum field width and so a
  434.          number which takes more digits to display then are allowed for it
  435.          can overflow.
  436.  
  437.  
  438. .H           [ -> ] ???????????
  439.  
  440.  
  441. ASPACE       [ -> W32a ] (main)
  442.  
  443.              Pushes the ASCII (32 decimal) space character onto the stack.
  444.  
  445.  
  446. TYPE         [ A32a -> ] (main)
  447.  
  448.              Uses the top word on the stack as a pointer to a string
  449.          (sequence of bytes followed by a 0 byte terminator). It prints this
  450.          string out to the current output streams.
  451.  
  452.  
  453. WAIT         [ -> ] (main)
  454.  
  455.              If any key has been pressed then enter a loop waiting for the
  456.          next key to be pressed.
  457.  
  458.  
  459. KEY          [ -> W9a ] (main)
  460.  
  461.              Wait for a key to be pressed and the push the lowest 9 bits onto
  462.           the stack.
  463.  
  464.  
  465. INKEY        [ W32a -> W9b ] (main)
  466.  
  467.              Wait for a key to be pressed for the number of centiseconds
  468.          given by W32a and the push the lowest 9 bits onto the stack.
  469.  
  470.  
  471. SPACE        [ -> ] (main)
  472.  
  473.              Write a space character the the current output streams.
  474.          Equivalent of : SPACE 32 ECHO ;
  475.  
  476.  
  477. CLS          [ -> ] (main)
  478.  
  479.              Clear the screen.
  480.  
  481.  
  482. TAB          [ W32a W32b -> ] (main)
  483.  
  484.              Move to character position X=W32a, Y=W32b where (0,0) is the top
  485.          left corner of the screen.
  486.  
  487.  
  488. CORE         [ -> ] (main)
  489.  
  490.              Set the dictionaries back to the default dictionaries, i.e
  491.          forgets all user defined words.
  492.  
  493.  
  494. XOR          [ W32a W32b -> W32c ] (main)
  495.  
  496.              Does a bitwise logical XOR (or EOR if you prefer) on the top two
  497.          stack entries and pushes the result.
  498.  
  499.  
  500. ABORT        [ -> ] (main)
  501.  
  502.              Aborts the current operation and resets the FORTH system.
  503.          Reinitialises output stream, stacks, compiler variables,but leaves
  504.          the dictionaries alone.
  505.  
  506.  
  507. 2OVER        [ W64a W64b -> W64a W64b W64a ] (main)
  508.  
  509.              Duplicates the second 64 bit stack entry onto the TOS.
  510.  
  511.  
  512. OVER         [ W32a W32b -> W32a W32b W32a ] (special) (main)
  513.  
  514.              Duplicates the second stack entry onto the TOS.
  515.  
  516.  
  517. 2SWAP        [ W64a W64b -> W64b W64a ] (main)
  518.  
  519.              Interchanges the second 64 bit stack entry and the TOS (64 bit).
  520.  
  521.  
  522. SWAP         [ W32a W32b -> W32b W32a ] (special) (main)
  523.  
  524.              Interchanges the second stack entry and the TOS.
  525.  
  526.  
  527. LROT         [ W32a W32b W32c -> W32c W32a W32b ] (main)
  528.  
  529.              Rotate the top three stack entries (e.g. 1 2 3 ROT gives 2 1 3).
  530.  
  531.  
  532. RROT         [ W32a W32b W32c -> W32b W32c W32a ] (main)
  533.  
  534.              Rotate the top three stack entries (e.g. 1 2 3 ROT gives 1 3 2).
  535.  
  536.  
  537. ???????? ROT    [ W32a W32b W32c -> W32b W32c W32a] (main) this word is used to rotate the top three stack elements, the bottom one of these becomes the top.
  538.  
  539.  
  540. DUP          [ W32a -> W32a W32a ]  (main) (special)
  541.  
  542.              This word is used to duplicate the top 32 bit word on the stack,
  543.          creating two words the with the same value.
  544.  
  545.  
  546. 2DUP         [ W64a -> W64a W64a ] (main)
  547.  
  548.              Duplicates the 64 bit value on TOS, creating two new words.
  549.  
  550.  
  551. TRUE         [ -> W32a ] (main)
  552.  
  553.              Pushes a TRUE value onto the stack, equivalent to : TRUE -1 ;
  554.  
  555.  
  556. FALSE        [ -> W32a ] (main)
  557.  
  558.              Pushes a FALSE value onto the stack, equivalent to : FALSE -1 ;
  559.  
  560.  
  561. STATE        [ -> A32a ] (main)
  562.  
  563.              Pushes the address of the STATE variable onto the stack. The
  564.          STATE variable is used to indicate wether a word should be compiled
  565.          or executed. All the main vocabulary words should be executed in
  566.          interpret mode, but only those in the compiler dictionary in compile
  567.          mode. In compile mode those words not in the compiler dictionary
  568.          should be compiled into the word currently being defined.
  569.  
  570.  
  571. BASE         [ -> A32a ] (main)
  572.  
  573.              Places the address of the number base onto the stack, currently
  574.          the only number base which should be used is decimal.
  575.  
  576.  
  577. MODE         [ -> B32a ] (main)
  578.  
  579.              If the FORTH system is interpretive mode then put 0 (FALSE) onto
  580.          the stack otherwise it is in compile mode and so it places -1
  581.          (FALSE) onto the stack.
  582.  
  583.  
  584. ENTRY        [ A32a -> ] (main) 
  585.  
  586.  
  587. PRINT_MODE   [ -> ] (main) ?????????
  588.  
  589.  
  590. LINE_BUFFER  [ -> A32a ] (main)
  591.  
  592.              Places the address of the pointer to the current input line on
  593.          the stack.
  594.  
  595.  
  596. TOKEN_BUFFER [ -> A32a ] (main)
  597.  
  598.              Places the address of the pointer to the currently decoded
  599.          token.
  600.  
  601.  
  602. CODE         [ -> A32a ] (main)
  603.  
  604.              Places the address of the code pointer onto the TOS. The code
  605.          pointer points to the place where the next byte (word) of code will
  606.          be compiled to.
  607.  
  608.  
  609. S0           [ -> ] ?????????????????????????
  610.  
  611.  
  612. CONTEXT      [ -> A32a ] (main)
  613.  
  614.              Pushes the address of the address of the dictionary to search
  615.          initially for word definitions.
  616.  
  617.  
  618. CURRENT      [ -> A32a ] (main)
  619.  
  620.              Pushes the address of the current user dictionary onto the
  621.          stack.
  622.  
  623.  
  624. COMPILER     [ -> A32a ] (main)
  625.  
  626.              Pushes the address of the compiler dictionary onto the stack.
  627.  
  628.  
  629. SPECIAL      [ -> A32a ] (main)
  630.  
  631.              Pushes the address of the special dictionary onto the stack.
  632.  
  633.  
  634. SEARCH       [ A32a -> A32b TRUE   or  FALSE ] (main)
  635.  
  636.              Seaches the dictionary from address A32a looking for the token
  637.          which is in the TOKEN_BUFFER. IF the token is found the place the
  638.          execute address of the token onto the stack and then place a -1
  639.          (TRUE) onto the stack. If the token is not found just put a 0
  640.          (FALSE) onto the stack.
  641.  
  642.  
  643. QUESTION     [ -> A32a ] (main)
  644.  
  645.              Places the address of the string "<cr> ? " onto the stack.
  646.  
  647.  
  648. EXECUTE      [ A32a -> ] (main)
  649.  
  650.              Executes the code at address A32a, which could of cause change
  651.          the stack.
  652.  
  653.  
  654. INLINE       [ -> ] (main)
  655.  
  656.              Reads a line (up to 255 characters) into the buffer pointed to
  657.          by the LINE_BUFFER variable from the currently selected input steam.
  658.          Always ends the line with a 0 Byte so that TYPE works.
  659.  
  660.  
  661. NUMBER       [ -> W32a TRUE  or FALSE ] (main)
  662.  
  663.              If the token in the TOKEN_BUFFER is a valid number in the
  664.          current number base (must be decimal for now), then place that
  665.          number on the stack and put a true on top, otherwise put a false on
  666.          the stack.
  667.  
  668.  
  669. *STACK       [ -> ] (main)
  670.  
  671.              Checks the stack for overflow / underflow, but not implemented
  672.          at the moment.
  673.  
  674.  
  675. SETUP_STACK  [ -> ]  (main)
  676.  
  677.              Used in the outer interpreter/compiler to create the code so
  678.          that the TOS would be in R0 and the data_SP pointer would point to
  679.          the NOS.
  680.  
  681.  
  682. CREATE_BL    [ A32a -> W32b ] (main)
  683.  
  684.              Used in the outer interpreter/compiler to create the BL
  685.          instruction to call the code at address A32a. This assumes that the
  686.          code put at the address CODE (see above).
  687.  
  688.  
  689. TOP_REG      [ -> W32a ] (main)
  690.  
  691.              Used in the outer interpreter/compiler. TOP_REG contains a value
  692.          from 0 to 5, 0 means that the TOS is at the address data_SP, 1 means
  693.          that it is contained in R0,  .. 5 means that it is contained in R4,
  694.          with NOS in R3, etc.
  695.  
  696.  
  697. COMPILECONST [ W32a -> ] (main)
  698.  
  699.              This is used to compile a constant into the code. 
  700.  
  701.  
  702. CONSTANT     [ W32a -> ] (main)
  703.  
  704.              Defines a constant which has the value W32a.
  705.          i.e. '32 CONSTANT space'  defines a new word space which has the
  706.          value 32. When space is executed it places the value 32 onto the
  707.          stack.
  708.  
  709.  
  710. VARIABLE     [ W32a -> ] (main)
  711.  
  712.              Defines a variable which has the initial value W32a.
  713.          i.e. '32 VARIABLE space'  defines a new word space which has the
  714.          value 32. When space is executed it places an address on the stack
  715.          which points to a word which contains 32 (initially).
  716.  
  717.  
  718. ARRAY        [ W32a -> ] (main)
  719.  
  720.              A defining word used to create an array W32a words long (e.g.
  721.          15 ARRAY ThisArray  which would create an array 15 words =60 bytes
  722.          long). 
  723.  
  724.  
  725. CCONSTANT    [ W8a -> ] (main)
  726.  
  727.              Defines a byte (or character) constant which has the value W32a,
  728.          i.e. '32 CCONSTANT space'  defines a new word space which has the
  729.          value 32. When space is executed it places the value 32 onto the
  730.          stack.
  731.  
  732.  
  733. CVARIABLE    [ W8a -> ] (main)
  734.  
  735.              Defines a byte (or character) variable which has the initial
  736.          value W32a, i.e. '32 CVARIABLE space'  defines a new word space
  737.          which has the value 32. When space is executed it places an address
  738.          on the stack which points to a word which contains 32 (initially).
  739.  
  740.  
  741. CARRAY       [ W32a -> ] (main)
  742.  
  743.              A defining word used to create an array W32a bytes long
  744.          (e.g. 15 ARRAY ThatArray  which would create an array 15 bytes long). 
  745.  
  746.  
  747. VARS         [ -> A32a ] (main)
  748.  
  749.              Pushes the address that the next variable will be placed at.
  750.  
  751.  
  752. I>           [ -> W32a ] (main) (special)
  753.  
  754.              TOS := innermost loop index.                 
  755.  
  756.  
  757. J>           [ -> W32a ] (main) (special)
  758.  
  759.              TOS := 2nd innermost loop index.
  760.  
  761.  
  762. K>           [ -> W32a ] (main) (special)
  763.  
  764.              TOS := 3rd innermost loop index.
  765.  
  766.  
  767. TIME         [ -> W32a] (main)
  768.  
  769.              The value of the number of centi-seconds that have elapsed since
  770.          the last time the clock was set to zero.
  771.  
  772.  
  773. PRINT_DICT   [ W32a -> ] (main)
  774.  
  775.              This word is used to print a dictionary to the currently
  776.          selected output steam.
  777.  
  778.  
  779. DICTIONARIES [ -> ] (main)
  780.  
  781.              This word prints all the words defined in the CURRENT, COMPILER
  782.          and SPECIAL dictionaries, using PRINT_DICT above.
  783.  
  784.  
  785. TOKEN        [ -> B32a ] (main)
  786.  
  787.              This word is used to find the next token in the INPUT_BUFFER.
  788.          It puts it into TOKEN_BUFFER the token in TOKEN_BUFFER ends with a
  789.          zero byte. If an end of line character (i.e. 0 or 10 or 13) is found
  790.          before the next printable character a 0 (FALSE) is pushed onto the
  791.          stack, otherwise a -1 (TRUE) is pusehed onto the stack.
  792.  
  793.  
  794. FORTHTXTWIND [ -> A32a ] (main)
  795.  
  796.              This word pushes the address of the definition of the initial
  797.          window onto the stack. It is used in multiple window programs to set
  798.          the output window back to the initial one.
  799.          (Use as in FORTHTXTWIND SETTXTWIND).
  800.  
  801.  
  802. NEWTXTWINS   [ U32a U32b -> ] (main)
  803.  
  804.              A defining word which creates a new text window definition (they
  805.          take 3K each). U32a is the number of characters across the window
  806.          and U32b is the number of characters down (all characters are
  807.          assumed to be 16 by 32 OS Units).
  808.          (Use as in 50 12 NEWTXTWIND MyWindow
  809.                      which creates a window 50 characters across by 12 down).
  810.  
  811.  
  812. OPENTXTWIND  [ A32a -> ] (main)
  813.  
  814.              Open the text window whose definition is on the stack.
  815.          (Use as in MyWindow OPENTXTWIND).
  816.  
  817.  
  818. CLOSETXTWIND [ A32a -> ] (main)
  819.  
  820.              Close the text window whose definition is on the stack.
  821.          (Use as in MyWindow CLOSETXTWIND).
  822.  
  823.  
  824. DELTXTWIND   [ A32a -> ] (main)
  825.  
  826.              Deletes the text window whose definition is on the stack. Be
  827.          very careful not to refer to this window again as it would give an
  828.          illegal window handle error from the WIMP.
  829.          (Use as in MyWindow DELTXTWIND).
  830.                                                                            
  831.  
  832. SETTXTWIND   [ A32a -> ] (main)
  833.  
  834.              Sets the !FORTH system to use the text window whose definition
  835.          is on the stack for output.
  836.          (Use as in MyWindow SETTXTWIND).
  837.  
  838.  
  839. TITLETXTWIND [ Str A32a -> ] (main)
  840.  
  841.              This changes the title of the text window whose definition is on
  842.          the stack (A32a). The new title is a string on the stack.
  843.          ( use as in " New Title" MyWindow TITLETXTWIND ).
  844.  
  845.  
  846. MOVETXTWIND  [ I32a I32b A32c -> ] (main)
  847.  
  848.              This word moves the window so that the top left corner is at
  849.          (I32a,I32b). The window will always stay within the screen area.
  850.          ( use as in 100 500 MyWindow MOVETXTWIND ).
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  ------------------------- COMPILER DICTIONARY
  858.  
  859. ;
  860.  
  861. BEGIN
  862.  
  863. END
  864.  
  865. DO
  866.  
  867. LOOP
  868.  
  869. +LOOP
  870.  
  871. IF
  872.  
  873. ELSE
  874.  
  875. ENDIF
  876.  
  877. WHILE
  878.  
  879.  
  880. ----------------------------- SPECIAL DICTIONARY
  881.  
  882. ."
  883.  
  884. [I]
  885.  
  886. [J]
  887.  
  888. [I]@
  889.  
  890. [I]!
  891.  
  892. [J]@
  893.  
  894. [J]!
  895.  
  896.