home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / beehive / cpmforth / forthdoc.arc / FIG-4TH.TXT next >
Text File  |  1980-01-01  |  61KB  |  1,330 lines

  1.  
  2.       +-----------------------------------------------------+
  3.       | The  following glossary has been extracted from the |
  4.       | fig-FORTH Installation Manual (Nov 1980).  It gives |
  5.       | the  description  and operation  of words in a fig- |
  6.       | FORTH  system.  Though  all  care has been   taken, |
  7.       | it  is possible  that  errors  may  have   resulted |
  8.       | during transcription.  Full copies of the fig-FORTH |
  9.       | Installation  Manual may be obtained from the Forth |
  10.       | Interest Group,  P.O.Box 8231,  San Jose,  CA 95155 |
  11.       | USA.                                                |
  12.       +-----------------------------------------------------+
  13.  
  14.  
  15.                         fig-FORTH GLOSSARY
  16.  
  17.  
  18.  
  19. This  glossary contains all of the word definitions in Release 1 of
  20. fig-FORTH.   The  definitions are present in order of  their  ascii
  21. sort.
  22.  
  23. The  first  line of each entry shows a symbolic description of  the
  24. action  of  the  procedure on the  parameter  stack.   The  symbols
  25. indicate  the order in which input parameters have been  placed  on
  26. the stack. The three dashes "---" indicate the execution point; any
  27. parameters left on the stack are listed.  In this notation, the top
  28. of the stack is to the right.
  29.  
  30. The symbols include:
  31.  
  32. addr      memory address
  33. b         8 bit byte (ie. hi 8 bits zero)
  34. c         7 bit ascii character (hi 9 bits zero)
  35. d         32 bit signed double integer, most significant portion
  36.             with sign on top of stack.
  37. f         boolean flag. 0=false, non-zero=true
  38. ff        boolean false flag=0
  39. n         16 bit signed integer number
  40. u         16 bit unsigned integer
  41. tf        boolean true flag=non zero
  42.  
  43. The capital letters on the right show definition characteristics:
  44.  
  45. C         May only be used within a colon definition.  A digit
  46.             indicates number of memory addresses used, if other
  47.             than one.
  48. E         Intended for execution only.
  49. L0        Level Zero definition of FORTH-78
  50. L1        Level One definition of FORTH-78
  51. P         Has precedence bit set.  Will execute even when
  52.             compiling.
  53. U         A user variable.
  54.  
  55. Unless  otherwise noted,  all references to numbers are for 16  bit
  56. signed  integers.  On 8 bit data bus computers,  the high byte of a
  57. number is on top of the stack,  with the sign in the leftmost  bit.
  58. For  32 bit signed double numbers,  the most significant (with  the
  59. sign) is on top.
  60.  
  61. All arithmetic is implicitly 16 bit signed integer math, with error
  62. and under-flow indication unspecified.
  63.  
  64.  
  65.  
  66. !              n  addr  ---                            L0
  67.           Store 16 bits of n at address.  Pronounced "store".
  68.  
  69. !CSP
  70.           Save  the  stack position in CSP.   Used as part  of  the
  71.           compiler security.
  72.  
  73. #              d1  ---  d2                             L0
  74.           Generate  from  a  double  number  d1,   the  next  ascii
  75.           character which is placed in an output string.  Result d2
  76.           is the quotient after division by BASE, and is maintained
  77.           for further processing.  Used between <# and #>.  See #S
  78.  
  79. #>             d  ---  addr count                      L0
  80.           Terminates  numeric  output  conversion  by  dropping  d,
  81.           leaving the text address and character count suitable for
  82.           TYPE.
  83.  
  84. #S             d1  ---  d2
  85.           Generates  ascii text in the text output buffer,  by  the
  86.           use  of #,  until a zero double number n2  results.  Used
  87.           between <# and #>.
  88.  
  89. '              ---  addr                               P,L0
  90.           Leaves  the  parameter field address of  dictionary  word
  91.           nnnn.   As  a  compiler directive,  executes in  a  colon
  92.           definition  to compile the address as a literal.   If the
  93.           word is not found after a search of CONTEXT and  CURRENT,
  94.           an appropriate error message is given. Pronounced "tick".
  95.  
  96. (                                                      P,L0
  97.           Used in the form:
  98.                     ( cccc)
  99.           Ignore  a  comment  that  will be delimited  by  a  right
  100.           parenthesis on the same line.  May occur during execution
  101.           or  in  a colon-definition.   A blank after  the  leading
  102.           parenthesis is required.
  103.  
  104. (.")                                                   C+
  105.           The  run-time procedure,  compiled by ." which  transmits
  106.           the following in-line text to the selected output device.
  107.           See ."
  108.  
  109. (;CODE)                                                C
  110.           The run-time procedure,  compiled by ;CODE, that rewrites
  111.           the code field of the most recently defined word to point
  112.           to the following machine code sequence.  See ;CODE
  113.  
  114. (+LOOP)        n  ---                                  C2
  115.           The  run-time procedure compiled by +LOOP,  which  incre
  116.           ments  the loop index by n and tests for loop completion.
  117.           See +LOOP
  118.  
  119. (ABORT)
  120.           Executes  after an error when WARNING is -1.   This  word
  121.           normally executes ABORT,  but may be altered (with  care)
  122.           to a user's alternative procedure.
  123.  
  124. (D0)                                                   C
  125.           The  run-time  procedure compiled by DO which  moves  the
  126.           loop control parameters to the return stack.  See DO
  127.  
  128. (FIND)         addr1  addr2  ---  pfa  b  tf      (ok)
  129.                addr1  addr2  ---  ff              (bad)
  130.           Searches  the  dictionary  starting  at  the  name  field
  131.           address  addr2,  matching to the text at addr1.   Returns
  132.           parameter  field address,  length byte of name field  and
  133.           boolean  true for a good match.   If no match  is  found,
  134.           only a boolean false is left.
  135.  
  136. (LINE)         n1  n2  ---  addr  count
  137.           Converts the line number n1 and the screen n2 to the disc
  138.           buffer  address  containing  the data.   A  count  of  64
  139.           indicates the full line text length.
  140.  
  141. (LOOP)                                                 C2
  142.           The  run-time procedure compiled by LOOP which increments
  143.           the loop index and tests for loop completion.  See LOOP
  144.  
  145. (NUMBER)       d1  addr1  ---  d2  addr2
  146.           Convert  the ascii text beginning at addr1+1 with  regard
  147.           to BASE.  The new value is accumulated into double number
  148.           d1,  being left as d2.  Addr2 is the address of the first
  149.           unconvertable digit.  Used by NUMBER.
  150.  
  151. *              n1  n2  ---  prod                       L0
  152.           Leave the signed product of two signed numbers.
  153.  
  154. */             n1  n2  n3  ---  n4                     L0
  155.           Leave  the  ratio  n4 = n1*n2/n3  where  all  are  signed
  156.           numbers.   Retention  of  an intermediate 31 bit  product
  157.           permits greater accuracy than would be available with the
  158.           sequence:  n1  n2  *  n3  /
  159.  
  160. */MOD          n1  n2  n3  ---  n4  n5                 L0
  161.           Leave  the quotient n5 and remainder n4 of the  operation
  162.           n1*n2/n3.   A 31 bit intermediate product is used as  for
  163.           */.
  164.  
  165. +              n1  n2  ---  sum                        L0
  166.           Leave the sum of n1+n2.
  167.  
  168. +!             n  addr  ---                            L0
  169.           Add  n  to the value at the address.   Pronounced  "plus-
  170.           store".
  171.  
  172. +-             n1  n2  ---  n3
  173.           Apply the sign of n2 to n1, which is left as n3.
  174.  
  175. +BUF           addr1  ---  addr2  f
  176.           Advance  the disc buffer address addr1 to the address  of
  177.           the next buffer addr2.   Boolean f is false when addr2 is
  178.           the buffer presently pointed to by variable PREV.
  179.  
  180. +LOOP                n1  ---       (run)
  181.                addr  n2  ---       (compile)           P,C2,L0
  182.           Used in a colon-definition in the form:
  183.                     DO  ...  n1  +LOOP
  184.           At run-time, +LOOP selectively controls branching back to
  185.           the corresponding DO based on n1,  the loop index and the
  186.           loop  limit.   The  signed increment n1 is added  to  the
  187.           index  and the total compared to the limit.   The  branch
  188.           back  to  DO occurs until the new index is  equal  to  or
  189.           greater than the limit (n1>0),  or until the new index is
  190.           equal to or less than the limit (n1<0).  Upon exiting the
  191.           loop,   the   parameters  are  discarded  and   execution
  192.           continues ahead.
  193.  
  194.           At compile time, +LOOP compiles the run-time word (+LOOP)
  195.           and  the branch offset computed from HERE to the  address
  196.           left  on  the stack by DO.   n2 is used for  compile-time
  197.           error checking.
  198.  
  199. +ORIGIN        n  ---  addr
  200.           Leave  the  memory address relative by n  to  the  origin
  201.           parameter  area.   n is the minimum address unit,  either
  202.           byte  or  word.   This definition is used  to  access  or
  203.           modify the boot-up parameters at the origin area.
  204.  
  205. ,              n  ---                                  L0
  206.           Store  n into the next available dictionary memory  cell,
  207.           advancing the dictionary pointer.  (comma)
  208.  
  209. -              n1  n2  ---  diff                       L0
  210.           Leave the difference of  n1-n2.
  211.  
  212. -->                                                    P,L0
  213.           Continue   interpretation  with  the  next  disc  screen.
  214.           (pronounced next-screen).
  215.  
  216. -DUP           n1  ---  n1         (if zero)
  217.                n1  ---  n1  n1     (non-zero)          L0
  218.           Reproduce  n1 only if it is non-zero.   This  is  usually
  219.           used  to  copy a value just before IF,  to eliminate  the
  220.           need for an ELSE part to drop it.
  221.  
  222. -FIND          ---  pfa  b  tf     (found)
  223.                ---  ff             (not found)
  224.           Accepts  the next text word (delimited by blanks) in  the
  225.           input stream to HERE,  and searches the CONTEXT and  then
  226.           CURRENT vocabularies for a matching entry.  If found, the
  227.           dictionary  entry's parameter field address,  its  length
  228.           byte,  and  a boolean true is left.   Otherwise,  only  a
  229.           boolean false is left.
  230.  
  231. -TRAILING      addr  n1  ---  addr  n2
  232.           Adjusts the character count n1 of a text string beginning
  233.           address  to suppress the output of trailing blanks.   ie.
  234.           the characters at addr+n1 are blanks.
  235.  
  236. .              n  ---                                  L0
  237.           Print  a  number from a signed 16  bit  two's  complement
  238.           value,  converted  according  to  the  numeric  BASE.   A
  239.           trailing blank follows.  Pronounced "dot"
  240.  
  241. ."                                                     P,L0
  242.           Used in the form:
  243.                     ." cccc"
  244.           Compiles   an  in-line  string  cccc  (delimited  by  the
  245.           trailing  ") with an execution procedure to transmit  the
  246.           text to the selected output device.   If executed outside
  247.           a  definition,  ." will immediately print the text  until
  248.           the final ".   The maximum number of characters may be an
  249.           installation dependent value.  See (.")
  250.  
  251. .LINE          line  scr  ---
  252.           Print  on the terminal device,  a line of text  from  the
  253.           disc by its line and screen number.   Trailing blanks are
  254.           suppressed.
  255.  
  256. .R             n1  n2  ---
  257.           Print  the  number n1 right aligned in a field  of  whose
  258.           width is n2.  No following blank is printed.
  259.  
  260. /              n1  n2  ---  quot                       L0
  261.           Leave the signed quotient of n1/n2.
  262.  
  263. /MOD           n1  n2  ---  rem quot                   L0
  264.           Leave the remainder and quotient of n1/n2.  The remainder
  265.           has the sign of the dividend.
  266.  
  267. 0 1 2 3 4      ---  n
  268.           These  small  numbers  are  used  so  often  that  it  is
  269.           attractive  to  define them by name in the dictionary  as
  270.           constants.
  271.  
  272. 0<             n  ---  f                               L0
  273.           Leave  a  true  flag  if the number  is  less  than  zero
  274.           (negative), otherwise leave a false flag.
  275.  
  276. 0=             n  ---  f                               L0
  277.           Leave a true flag if the number is equal to zero,  other
  278.           wise leave a false flag.
  279.  
  280. 0BRANCH        f  ---                                  C2
  281.           The run-time procedure to conditionally branch.   If f is
  282.           false (zero), the following in-line parameter is added to
  283.           the  interpretive  pointer  to  branch  ahead  or   back.
  284.           Compiled by IF, UNTIL, and WHILE.
  285.  
  286. 1+             n1  ---  n2                             L1
  287.           Increment n1 by 1.
  288.  
  289. 2+             n1  ---  n2
  290.           Leave n1 incremented by 2.
  291.  
  292. :                                                      P,E,L0
  293.           Used in the form called a colon-definition:
  294.                     : cccc   ...  ;
  295.           Creates a dictionary entry defining cccc as equivalent to
  296.           the  following  sequence of Forth word definitions  '...'
  297.           until the next ';' or ';CODE'.   The compiling process is
  298.           done  by  the text interpreter as long as STATE  is  non-
  299.           zero.   Other details are that the CONTEXT vocabulary  is
  300.           set  to  the CURRENT vocabulary and that words  with  the
  301.           precedence  bit  set (P) are executed rather  than  being
  302.           compiled.
  303.  
  304. ;                                                      P,C,L0
  305.           Terminates   a   colon-definition   and   stops   further
  306.           compilation.  Compiles the run-time ;S.
  307.  
  308. ;CODE                                                  P,C,L0
  309.           Used in the form:
  310.                     : cccc  ...  ;CODE
  311.                          assembly mnemonics
  312.           Stop  compilation and terminate a new defining word  cccc
  313.           by  compiling  (;CODE).   Set the CONTEXT  vocabulary  to
  314.           ASSEMBLER,  assembling  to  machine  code  the  following
  315.           mnemonics.
  316.  
  317.           When cccc later executes in the form:
  318.                     cccc  nnnn
  319.           the   word  nnnn  will  be  created  with  its  execution
  320.           procedure given by the machine code following cccc.  That
  321.           is,  when nnnn is executed,  it does so by jumping to the
  322.           code after nnnn.  An existing defining word must exist in
  323.           cccc prior to ;CODE.
  324.  
  325. ;S                                                     P,L0
  326.           Stop interpretation of a screen.  ;S is also the run-time
  327.           word  compiled  at the end of  a  colon-definition  which
  328.           returns execution to the calling procedure.
  329.  
  330. <              n1  n2  ---  f                          L0
  331.           Leave a true flag if n1 is less than n2;  otherwise leave
  332.           a false flag.
  333.  
  334. <#                                                     L0
  335.           Setup  for  pictured numeric output formatting using  the
  336.           words:
  337.                     <#  #  #S  SIGN  #>
  338.           The conversion is done on a double number producing  text
  339.           at PAD.
  340.  
  341. <BUILDS                                                C,L0
  342.           Used within a colon-definition:
  343.                     : cccc  <BUILDS  ...  DOES>  ...  ;
  344.           Each  time cccc is executed,  <BUILDS defines a new  word
  345.           with a high-level execution procedure.  Executing cccc in
  346.           the form:
  347.                     cccc  nnnn
  348.           uses <BUILDS to create a dictionary entry for nnnn with a
  349.           call  to  the DOES> part for nnnn.   When nnnn  is  later
  350.           executed, it has the address of its parameter area on the
  351.           stack  and  executes  the  words  after  DOES>  in  cccc.
  352.           <BUILDS and DOES> allow run-time procedures to be written
  353.           in  high-level rather than in assembler code (as required
  354.           by ;CODE ).
  355.  
  356. =              n1  n2  ---  f                          L0
  357.           Leave a true flag if n1=n2; otherwise leave a false flag.
  358.  
  359. >              n1  n2  ---  f                          L0
  360.           Leave a true flag if n1 is greater than n2;  otherwise  a
  361.           false flag.
  362.  
  363. >R             n  ---                                  C,L0
  364.           Remove  a number from the computation stack and place and
  365.           place  as the most accessable on the return  stack.   Use
  366.           should be balanced with R> in the same definition.
  367.  
  368. ?              addr  ---                               L0
  369.           Print  the value contained at the address in free  format
  370.           according to the current base.
  371.  
  372. ?COMP
  373.           Issue error message if not compiling.
  374.  
  375. ?CSP
  376.           Issue error message if stack position differs from  value
  377.           saved in CSP.
  378.  
  379. ?ERROR         f  n  ---
  380.           Issue  error  message number n,  if the boolean  flag  is
  381.           true.
  382.  
  383. ?EXEC
  384.           Issue an error message if not executing.
  385.  
  386. ?LOADING
  387.           Issue an error message if not loading.
  388.  
  389. ?PAIRS         n1  n1  ---
  390.           Issue  an  error message if n1 does not  equal  n2.   The
  391.           message  indicates  that  compiled  conditionals  do  not
  392.           match.
  393.  
  394. ?STACK
  395.           Issue  an  error message if the stack is out  of  bounds.
  396.           This definition may be installation dependent.
  397.  
  398. ?TERMINAL      ---  f
  399.           Perform  a test of the terminal keyboard for actuation of
  400.           the break key.   A true flag indicates  actuation.   This
  401.           definition is installation dependent.
  402.  
  403. @              addr  ---  n                            L0
  404.           Leave the 16 bit contents of address.
  405.  
  406. ABORT                                                  L0
  407.           Clear  the stacks and enter the execution state.   Return
  408.           control  to the operators terminal,  printing  a  message
  409.           appropriate to the installation.
  410.  
  411. ABS            n  ---  u                               L0
  412.           Leave the absolute value of n as u.
  413.  
  414. AGAIN          addr  n  ---        (compiling)         P,C2,L0
  415.           Used in a colon-definition in the form:
  416.                     BEGIN  ...  AGAIN
  417.           At  run-time,  AGAIN forces execution to return to corre
  418.           sponding  BEGIN.   There  is  no  effect  on  the  stack.
  419.           Execution  cannot leave this loop (unless  R>   DROP   is
  420.           executed one level below).
  421.  
  422.           At  compile  time,  AGAIN compiles BRANCH with an  offset
  423.           from  HERE  to addr.   n is used for  compile-time  error
  424.           checking.
  425.  
  426. ALLOT          n  ---                                  L0
  427.           Add the signed number to the dictionary pointer DP.   May
  428.           be used to reserve dictionary space or re-origin  memory.
  429.           n is with regard to computer address type (byte or word).
  430.  
  431. AND            n1  n2  ---  n3
  432.           Leave the bitwise logical and of n1 and n2 as n3.
  433.  
  434. B/BUF          ---  n
  435.           This constant leaves the number of bytes per disc buffer,
  436.           the byte count read from the disc by BLOCK.
  437.  
  438. B/SCR          ---  n
  439.           This  constant  leaves the number of blocks  per  editing
  440.           screen.   By convention,  an editing screen is 1024 bytes
  441.           organised as 16 lines of 64 charcters each.
  442.  
  443. BACK           addr ---
  444.           Calculate  the  backward branch offset from HERE to  addr
  445.           and  compile  into the next available  dictionary  memory
  446.           address.
  447.  
  448. BASE           ---  addr                               U,L0
  449.           A  user variable containing the current number base  used
  450.           for input and output conversion.
  451.  
  452. BEGIN          ---  addr  n        (compiling)         P,L0
  453.           Occurs in a colon-definition in form:
  454.                     BEGIN  ...  UNTIL
  455.                     BEGIN  ...  AGAIN
  456.                     BEGIN  ...  WHILE  ...  REPEAT
  457.           At run-time, BEGIN marks the start of a sequence that may
  458.           be  repetitively executed.   It serves as a return  point
  459.           from  the corresponding UNTIL,  AGAIN  or  REPEAT.   When
  460.           executing UNTIL,  a return to BEGIN will occur if the top
  461.           of  the stack is false;  for AGAIN and REPEAT a return to
  462.           BEGIN always occurs.
  463.  
  464.           At compile time BEGIN leaves its return address and n for
  465.           compiler error checking.
  466.  
  467. BL             ---  c
  468.           A constant that leaves the ascii value for "blank".
  469.  
  470. BLANKS         addr  count  ---
  471.           Fill an area of memory begining at addr with blanks.
  472.  
  473. BLK            ---  addr                               U,L0
  474.           A user variable containing the block number being  inter
  475.           preted.   If zero, input is being taken from the terminal
  476.           input buffer.
  477.  
  478. BLOCK          n  ---  addr                            L0
  479.           Leave  the memory address of the block buffer  containing
  480.           block n.   If the block is not already in memory,  it  is
  481.           transfered  from  disc to which ever buffer was  recently
  482.           written.   If  the block occupying that buffer  has  been
  483.           marked as being updated,  it is re-written to disc before
  484.           block n is read into the buffer.  See BUFFER  R/W  UPDATE
  485.           FLUSH
  486.  
  487. BLOCK-READ
  488. BLOCK-WRITE
  489.           These are preferred names for the installation  dependent
  490.           code to read and write one block to the disc.
  491.  
  492. BRANCH                                                 C2,L0
  493.           The run-time procedure to unconditionally branch.  An in-
  494.           line  offset  is added to the interpretive pointer IP  to
  495.           branch ahead or back.  BRANCH is compiled by ELSE, AGAIN,
  496.           REPEAT.
  497.  
  498. BUFFER         n  ---  addr
  499.           Obtain the next memory buffer,  assigning it to block  n.
  500.           If the contents of the buffer is marked as updated, it is
  501.           written  to  the disc.   The block is not read  from  the
  502.           disc.   The  address  left is the first cell  within  the
  503.           buffer for data storage.
  504.  
  505. C!             b  addr  ---
  506.           Store  8 bits at address.   On word addressing computers,
  507.           further   specification  is  necessary   regarding   byte
  508.           addressing.
  509.  
  510. C,             b  ---
  511.           Store  8  bits  of b into the next  available  dictionary
  512.           byte,  advancing  the dictionary pointer.   This is  only
  513.           available  on byte addressing computers,  and  should  be
  514.           used with caution on byte addressing minicomputers.
  515.  
  516. C@             addr  ---  b
  517.           Leave  the  8 bit contents of memory  address.   On  word
  518.           addressing  computers,  further  specification is  needed
  519.           regarding byte addressing.
  520.  
  521. CFA            pfa  ---  cfa
  522.           Convert  the parameter field address of a  definition  to
  523.           its code field address.
  524.  
  525. CMOVE          from  to  count  ---
  526.           Move the specified quantity of bytes beginning at address
  527.           from  to  address to.   The contents of address  from  is
  528.           moved  first  proceeding  toward  high  memory.   Further
  529.           specification is necessary on word addressing computers.
  530.  
  531. COLD
  532.           The  cold  start  proceedure  to  adjust  the  dictionary
  533.           pointer  to  the minimum standard and restart via  ABORT.
  534.           May  be  called from the terminal to  remove  application
  535.           programs and restart.
  536.  
  537. COMPILE                                                C2
  538.           When the word containing COMPILE executes,  the execution
  539.           address   of  the  word  following  COMPILE   is   copied
  540.           (compiled)  into  the dictionary.   This allows  specific
  541.           compilation  situations  to  be handled  in  addition  to
  542.           simply   compiling  an  execution  address   (which   the
  543.           interpreter already does).
  544.  
  545. CONSTANT       n  ---                                  L0
  546.           A defining word used in the form:
  547.                     n  CONSTANT  cccc
  548.           to create word cccc,  with its parameter field containing
  549.           n. When cccc is later executed, it will push the value of
  550.           n to the stack.
  551.  
  552. CONTEXT        ---  addr                               U,L0
  553.           A  user  variable containing a pointer to the  vocabulary
  554.           within which dictionary searches will first begin.
  555.  
  556. COUNT          addr1  ---  addr2  n                    L0
  557.           Leave  the  byte  address addr2 and byte  count  n  of  a
  558.           message text beginning at addr1.  It is presumed that the
  559.           first  byte at addr1 contains the text byte count and the
  560.           actual text starts with the second byte.  Typically COUNT
  561.           is followed by TYPE.
  562.  
  563. CR                                                     L0
  564.           Transmit a carriage return and line feed to the  selected
  565.           output device. Set user variable OUT to zero.
  566.  
  567. CREATE
  568.           A defining word used in the form:
  569.                     CREATE  cccc
  570.           by such words as CODE and CONSTANT to create a dictionary
  571.           header  for a Forth definition.  The code field  contains
  572.           the  address of the word's parameter field.  The new word
  573.           is created in the CURRENT vocabulary.
  574.  
  575. CSP            ---  addr                               U
  576.           A  user  variable temporarily storing the  stack  pointer
  577.           position, for compilation error checking.
  578.  
  579. D+             d1  d2  ---  dsum
  580.           Leave the double number sum of two double numbers.
  581.  
  582. D+-            d1  n  ---  d2
  583.           Apply the sign of n to the double number d1,  leaving  it
  584.           as d2.
  585.  
  586. D.             d  ---                                  L1
  587.           Print  a  signed  double  number  from  a  32  bit  two's
  588.           complement  value.   The  high-order  16  bits  are  most
  589.           accessable   on  the  stack.   Conversion  is   performed
  590.           according   to  the  current  BASE.   A  blank   follows.
  591.           Pronounced D-dot.
  592.  
  593. D.R            d  n  ---
  594.           Print a signed double number d right aligned in a field n
  595.           characters wide.
  596.  
  597. DABS           d  ---  ud
  598.           Leave the absolute value ud of a double number.
  599.  
  600. DECIMAL                                                L0
  601.           Set the numeric conversion BASE for decimal input-output.
  602.  
  603. DEFINITIONS                                            L1
  604.           Used in the form:
  605.                     cccc  DEFINITIONS
  606.           Set the CURRENT vocabulary to the CONTEXT vocabulary.  In
  607.           the  example,  executing vocabulary name cccc made it the
  608.           CONTEXT  vocabulary and executing DEFINITIONS  made  both
  609.           specify vocabulary cccc.
  610.  
  611. DIGIT          c  n1  ---  n2  tf  (ok)
  612.                c  n1  ---  ff      (bad)
  613.           Converts  the  ascii character c (using base n1)  to  its
  614.           binary equivalent n2,  accompanied by a true flag. If the
  615.           conversion is invalid, leaves only a false flag.
  616.  
  617. DLIST
  618.           List  the names of the dictionary entries in the  CONTEXT
  619.           vocabulary.
  620.  
  621. DLITERAL       d  ---  d           (executing)
  622.                d  ---              (compiling)         P
  623.           If  compiling,  compile  a  stack double  number  into  a
  624.           literal.  Later  execution of the definition containg the
  625.           literal  will push it to the  stack.  If  executing,  the
  626.           number will remain on the stack.
  627.  
  628. DMINUS         d1  ---  d2
  629.           Convert d1 to a double number two's complement.
  630.  
  631. DO              n1  n2  ---        (execute)
  632.                addr  n  ---        (compile)           P,C2,L0
  633.           Occurs in a colon-definition in the form:
  634.                     DO  ...  LOOP
  635.                     DO  ...  +LOOP
  636.           At  run-time,   DO  begins  a  sequence  with  repetitive
  637.           execution controlled by a loop limit n1 and an index with
  638.           initial value n2.  DO removes these from the stack.  Upon
  639.           reaching LOOP the index is incremented by one.  Until the
  640.           new  index equals or exceeds the limit,  execution  loops
  641.           back to just after DO;  otherwise the loop parameters are
  642.           discarded  and execution continues ahead.  Both n1 and n2
  643.           are determined at run-time and may be the result of other
  644.           operations. Within a loop 'I' will copy the current value
  645.           of the index to the stack.  See I  LOOP  +LOOP  LEAVE
  646.  
  647.           When compiling within the colon-definition,  DO  compiles
  648.           (DO),  leaves  the following address addr and n for later
  649.           error checking.
  650.  
  651. DOES>                                                  L0
  652.           A  word which defines the run-time action within a  high-
  653.           level  defining  word.  DOES> alters the code  field  and
  654.           first  parameter of the new word to execute the  sequence
  655.           of  compiled  word addresses  following  DOES>.  Used  in
  656.           combination with <BUILDS. When the DOES> part executes it
  657.           begins  it with the address of the first parameter of the
  658.           new word on the stack.  This allows interpretation  using
  659.           this area or its contents. Typical uses include the Forth
  660.           assembler,   multi-dimensional   arrays,   and   compiler
  661.           generation.
  662.  
  663. DP             ---  addr                               U,L
  664.           A user variable,  the dictionary pointer,  which contains
  665.           the address of the next free memory above the dictionary.
  666.           The value may be read by HERE and altered by ALLOT.
  667.  
  668. DPL            ---  addr                               U,L0
  669.           A  user  variable containing the number of digits to  the
  670.           right of the decimal on double integer input. It may also
  671.           be  used  to  hold output column location  of  a  decimal
  672.           point, in user generated formatting. The default value on
  673.           single number input is -1.
  674.  
  675. DR0       Installation dependent commands to select disc drives, by
  676. DR1       presetting OFFSET. The contents of OFFSET is added to the
  677.           block number in BLOCK to allow for this selection. Offset
  678.           is  suppressed  for  error  text so that  it  may  always
  679.           originate from drive 0.
  680.  
  681. DROP           n  ---                                  L0
  682.           Drop the number from the stack.
  683.  
  684. DUMP           addr  n  ---                            L0
  685.           Print  the  contents of n memory locations  beginning  at
  686.           addr.  Both  addresses  and  contents are  shown  in  the
  687.           current numeric base.
  688.  
  689. DUP            n  ---  n  n                            L0
  690.           Duplicate the value on the stack.
  691.  
  692. ELSE           addr1  n1  ---  addr2  n2  (compiling)  P,C2,L0
  693.           Occurs within a colon-definition in the form:
  694.                     IF  ...  ELSE  ...  ENDIF
  695.           At run-time,  ELSE executes after the true part following
  696.           IF.  ELSE  forces  execution to skip over  the  following
  697.           false part and resumes execution after the ENDIF.  It has
  698.           no stack effect.
  699.  
  700.           At  compile-time ELSE emplaces BRANCH reserving a  branch
  701.           offset,  leaves  the  address  addr2  and  n2  for  error
  702.           testing.  ELSE  also resolves the pending forward  branch
  703.           from  if by calculating the offset from addr1 to HERE and
  704.           storing at addr1.
  705.  
  706. EMIT           c  ---                                  L0
  707.           Transmit ascii character c to the selected output device.
  708.           OUT is incremented for each character output.
  709.  
  710. EMPTY-BUFFERS                                          L0
  711.           Mark   all  block-buffers  as  empty,   not   necessarily
  712.           affecting the contents. Updated blocks are not written to
  713.           the disc. This is also an initialisation procedure before
  714.           first use of the disc.
  715.  
  716. ENCLOSE        addr1  c  ---  addr1  n1  n2  n3
  717.           The text scanning primitive used by WORD.  From the  text
  718.           address  addr1  and an ascii delimiting character  c,  is
  719.           determined  the byte offset to the  first  non-delimiting
  720.           character n1, the offset to the first delimiter after the
  721.           text  n2,  and  the  offset  to the  first  character  no
  722.           included.  This procedure will not process past an  ascii
  723.           'null', treating it as an unconditional delimiter.
  724.  
  725. END                                                    P,C2,L0
  726.           This is an alias or duplicate definition for UNTIL.
  727.  
  728. ENDIF          addr1  n  ---       (compile)           P,C0,L0
  729.           Occurs in a colon-definition in the form:
  730.                     IF  ...  ENDIF
  731.                     IF  ...  ELSE  ...  ENDIF
  732.           At  run-time,  ENDIF serves only as the destination of  a
  733.           forward  branch from IF or ELSE.  It marks the conclusion
  734.           of  the conditional structure.  THEN is another name  for
  735.           ENDIF.  Both  names  are supported in fig-FORTH.  See  IF
  736.           ELSE
  737.  
  738.           At compil-time,  ENDIF computes the forward branch offset
  739.           from  addr to HERE and stores it at addr.  n is used  for
  740.           error tests.
  741.  
  742. ERASE          addr  n  ---
  743.           Clear  a  region  of  memory to zero  from  addr  over  n
  744.           addresses.
  745.  
  746. ERROR          line  ---  in  blk
  747.           Execute error notification and restart of system. WARNING
  748.           is first examined.  If 1, the text of line n, relative to
  749.           screen 4 of drive 0 is printed.  This line number may  be
  750.           positive  or  negative,  and  beyond just  screen  4.  If
  751.           WARNING=0,  n  is just printed as a message number  (non-
  752.           disc  installation).  If WARNING is  -1,  the  definition
  753.           (ABORT) is executed, which executes the system ABORT. The
  754.           user  may  cautiously modify this execution  by  altering
  755.           (ABORT).  fig-FORTH  saves the contents of IN and BLK  to
  756.           assist  in determining the location of the  error.  Final
  757.           action is execution of QUIT.
  758.  
  759. EXECUTE        addr  ---
  760.           Execute the definition whose code field address is on the
  761.           stack.   The  code  field  address  is  also  called  the
  762.           compilation address.
  763.  
  764. EXPECT         addr  count  ---                        L0
  765.           Transfer characters from the terminal to address, until a
  766.           "return"  or the count of characters have been  received.
  767.           One or more nulls are added at the end of the text.
  768.  
  769. FENCE          ---  addr                               U
  770.           A   user  variable  containing  an  address  below  which
  771.           FORGETting  is trapped.  To forget below this  point  the
  772.           user must alter the contents of FENCE.
  773.  
  774. FILL           addr  quan  b  ---
  775.           Fill memory at the address with the specified quantity of
  776.           bytes b.
  777.  
  778. FIRST          ---  n
  779.           A  constant that leaves the address of the first (lowest)
  780.           block buffer.
  781.  
  782. FLD            ---  addr                               U
  783.           A user variable for control of number output field width.
  784.           Presently unused in fig-FORTH.
  785.  
  786. FORGET                                                 E,L0
  787.           Executed in the form:
  788.                     FORGET  cccc
  789.           Deletes  definition  named cccc from the dictionary  with
  790.           all  entries physically following it.  In  fig-FORTH,  an
  791.           error  message  will  occur if the  CURRENT  and  CONTEXT
  792.           vocabularies are not currently the same.
  793.  
  794. FORTH                                                  P,L1
  795.           The name of the primary vocabulary. Execution makes FORTH
  796.           the   CONTEXT   vocabulary.    Until   additional    user
  797.           vocabularies  are defined,  new user definitions become a
  798.           part  of FORTH.  FORTH is immediate,  so it will  execute
  799.           during the creation of a colon-definition, to select this
  800.           vocabulary at compile-time.
  801.  
  802. HERE           ---  addr                               L0
  803.           Leave  the  address  of  the  next  available  dictionary
  804.           location.
  805.  
  806. HEX                                                    L0
  807.           Set the numeric conversion base to sixteen (hexadecimal).
  808.  
  809. HLD            ---  addr                               L0
  810.           A  user  variable that holds the address  of  the  latest
  811.           character of text during numeric output conversion.
  812.  
  813. HOLD           c  ---                                  L0
  814.           Used  between <# and #> to insert an ascii character into
  815.           a pictured numeric output string.
  816.           eg.  2E HOLD  will place a decimal point.
  817.  
  818. I              ---  n                                  C,L0
  819.           Used  within  a  DO-LOOP to copy the loop  index  to  the
  820.           stack. Other use is implementation dependent. See R
  821.  
  822. ID.            addr ---
  823.           Print a definition's name from its name field address.
  824.  
  825. IF             f  ---              (run-time)
  826.                   ---  addr  n     (compile)           P,C2,L0
  827.           Occurs in a colon definition in the form:
  828.                     IF  (tp)  ...  ENDIF
  829.                     IF  (tp)  ...  ELSE  (fp)  ...  ENDIF
  830.           At  run-time,  IF  selects execution based on  a  boolean
  831.           flag.  If f is true (non-zero), execution continues ahead
  832.           through thr true part.  If f is false  (zero),  execution
  833.           skips  till  just after ELSE to execute the  false  part.
  834.           After  either part,  execution resumes after ENDIF.  ELSE
  835.           and  its  false part  are  optional.  If  missing,  false
  836.           execution skips to just after ENDIF.
  837.  
  838.           At  compile-time  IF compiles 0BRANCH and reserves  space
  839.           for  an  offset at addr.  addr and n are used  later  for
  840.           resolution of the offset and error testing.
  841.  
  842. IMMEDIATE
  843.           Mark  the  most  recently made definition  so  that  when
  844.           encountered at compile time,  it will be executed  rather
  845.           than being compiled. ie. the precedence bit in its header
  846.           is set.  This method allows definitions to handle unusual
  847.           compiling  situations,  rather  than build them into  the
  848.           fundamental compiler.  The user may force compilation  of
  849.           an immediate definition by preceding it with [COMPILE].
  850.  
  851. IN             ---  addr                               L0
  852.           A  user  variable  containg the byte  offset  within  the
  853.           current  input text buffer (terminal or disc) from  which
  854.           the  next text will be accepted.  WORD uses and moves the
  855.           value of IN.
  856.  
  857. INDEX          from  to  ---
  858.           Print the first line of each screen over the range  from,
  859.           to.  This is used to view the comment lines of an area of
  860.           text on disc screens.
  861.  
  862. INTERPRET
  863.           The outer text interpreter which sequentially executes or
  864.           compiles  text  from the input stream (terminal or  disc)
  865.           depending  on  STATE.  If the word name cannot  be  found
  866.           after a search of CONTEXT and the CURRENT it is converted
  867.           to  a  number according to the current  base.  That  also
  868.           failing,  an  error message echoing the name with a "  ?"
  869.           will be given.
  870.  
  871.           Text input will be taken according to the convention  for
  872.           WORD.  If a decimal point is found as part of a number, a
  873.           double  number value will be left.  The decimal point has
  874.           no other purpose than to force this action. See NUMBER
  875.  
  876. KEY            ---  c                                  L0
  877.           Leave the ascii value of the next terminal key struck.
  878.  
  879. LATEST         ---  addr
  880.           Leave  the name field address of the topmost word in  the
  881.           CURRENT vocabulary.
  882.  
  883. LEAVE                                                  C,L0
  884.           Force   the   termination  of  a  DO-LOOP  at  the   next
  885.           opportunity  by  setting the loop limit  to  the  current
  886.           value  of the index.  The index itself remains unchanged,
  887.           and  execution proceeds normally until LOOP or  +LOOP  is
  888.           encountered.
  889.  
  890. LFA            pfa  ---  lfa
  891.           Convert  the  parameter  field address  of  a  dictionary
  892.           definition to its link field address.
  893.  
  894. LIMIT          ---  n
  895.           A  constant  leaving the address just above  the  highest
  896.           memory  available for a disc buffer.  Usually this is the
  897.           highest system memory.
  898.  
  899. LIST           n  ---                                  L0
  900.           Display the ascii text of screen n on the selected output
  901.           device.  SCR contains the screen number during and  after
  902.           this process.
  903.  
  904. LIT            ---  n                                  C2,L0
  905.           Within a colon-definition,  LIT is automatically compiled
  906.           before  each  16 bit literal number encountered in  input
  907.           text.  Later execution of LIT causes the contents of  the
  908.           next dictionary address to be pushed to the stack.
  909.  
  910. LITERAL        n  ---    (compiling)                   P,C2,L0
  911.           If compiling,  then compile the stack value n as a 16 bit
  912.           literal.  This  definition  is immediate so that it  will
  913.           execute during a colon definition. The intended use is:
  914.                     : xxx   [ calculate ]  LITERAL  ;
  915.           Compilation is suspended for the compile time calculation
  916.           of a value.  Compilation is resumed and LITERAL  compiles
  917.           this value.
  918.  
  919. LOAD           n  ---                                  L0
  920.           Begin interpretation of screen n.  Loading will terminate
  921.           at the end of the screen or at ;S. See ;S  -->
  922.  
  923. LOOP           addr  n  ---        (compiling)         P,C2,L0
  924.           Occurs in a colon-definition in the form:
  925.                     DO  ...  LOOP
  926.           At run-time,  LOOP selectively controls branching back to
  927.           the  corresponding DO based on the loop index and  limit.
  928.           The  loop index is incremented by one and compared to the
  929.           limit.  The  branch  back to DO occurs  until  the  index
  930.           equals or exceeds the limit. At that time, the parameters
  931.           are discarded and execution continues ahead.
  932.  
  933.           At  compile-time,  LOOP compiles (LOOP) and uses addr  to
  934.           calculate an offset to DO. n is used for error testing.
  935.  
  936. M*             n1  n2  ---  d
  937.           A  mixed magnitude math operation which leaves the double
  938.           number signed product of two signed numbers.
  939.  
  940. M/             d  n1  ---  n2  n3
  941.           A  mixed magnitude math operator which leaves the  signed
  942.           remainder n2 and signed quotient n3, from a double number
  943.           dividend  and divisor n1.  The remainder takes  its  sign
  944.           from the dividend.
  945.  
  946. M/MOD          ud1  u2  ---  u3  u4
  947.           An unsigned mixed magnitude math operation which leaves a
  948.           double  quotient  ud4  and remainder u3,  from  a  double
  949.           dividend ud1 and single divisor u2.
  950.  
  951. MAX            n1  n2  ---  max                        L0
  952.           Leave the greater of two numbers.
  953.  
  954. MESSAGE        n  ---
  955.           Print  on the selected output device the text of  line  n
  956.           relative  to  screen 4 of drive 0.  n may be positive  or
  957.           negative.  MESSAGE  may be used to print incidental  text
  958.           such as report headers.  IF WARNING is zero,  the message
  959.           will simply be printed as a number (disc-unavailable).
  960.  
  961. MIN            n1  n2  ---  min                        L0
  962.           Leave the smaller of two numbers.
  963.  
  964. MINUS          n1  ---  n2                             L0
  965.           Leave the two's complement of a number.
  966.  
  967. MOD            n1  n2  ---  mod                        L0
  968.           Leave the remainder of n1/n2, with the same sign as n1.
  969.  
  970. MON
  971.           Exit to the system monitor,  leaving a re-entry to Forth,
  972.           if possible. BYE is used in some systems.
  973.  
  974. MOVE           addr1  addr2  n  ---
  975.           Move the contents of n memory (16 bit contents) beginning
  976.           at addr1 into n cells beginning at addr2. The contents of
  977.           addr1  is moved first.  This definition is appropriate on
  978.           word addressing computers.
  979.  
  980. NEXT
  981.           This is the inner interpreter that uses the  interpretive
  982.           pointer  IP to execute compiled Forth definitions.  It is
  983.           not  directly  executed but is the return point  for  all
  984.           code procedures.  It acts by fetching the address pointed
  985.           by IP, storing this value in register W. It then jumps to
  986.           the address pointed to by W.  W points to the code  field
  987.           of  a  definition which contains the address of the  code
  988.           which  executes  for  that  definition.   This  usage  of
  989.           indirect  threaded  code is a major  contributor  to  the
  990.           power, portability, and extensibility of forth. Locations
  991.           of IP and W are computer specific.
  992.  
  993. NFA            pfa  ---  nfa
  994.           Convert  the  parameter field address of a definition  to
  995.           its name field.
  996.  
  997. NUMBER         addr  ---  d
  998.           Convert a character string left at addr with a  preceding
  999.           count, to a signed double number, using the current base.
  1000.           If  a  decimal  point is encountered  in  the  text,  its
  1001.           position  will  be  given in DPL,  but  no  other  effect
  1002.           occurs.  If numeric conversion is not possible,  an error
  1003.           message will be given.
  1004.  
  1005. OFFSET         ---  addr                               U
  1006.           A  user variable which may contain a block offset to disc
  1007.           drives.  The  contents  of OFFSET is added to  the  stack
  1008.           number bt BLOCK.  Messages by MESSAGE are independent  of
  1009.           OFFSET. See BLOCK  DR0  DR1  MESSAGE
  1010.  
  1011. OR             n1  n2  ---  or                         L0
  1012.           Leave the bit-wise logical or of two 16 bit values.
  1013.  
  1014. OUT            ---  addr                               U
  1015.           A  user  variable  that contains a value  incremented  by
  1016.           EMIT.  The  user  may alter and examine  OUT  to  control
  1017.           display formatting.
  1018.  
  1019. OVER           n1  n2  ---  n1  n2  n1                 L0
  1020.           Copy the second stack value, placing it as the new top.
  1021.  
  1022. PAD            ---  addr                               L0
  1023.           Leave  the  text of the output text buffer,  which  is  a
  1024.           fixed offset above HERE.
  1025.  
  1026. PFA            nfa  ---  pfa
  1027.           Convert  the name field address of a compiled  definition
  1028.           to its parameter field address.
  1029.  
  1030. POP
  1031.           The  code sequence to remove a stack value and return  to
  1032.           NEXT.  POP is not directly executable, but is a forth re-
  1033.           entry point after machine code.
  1034.  
  1035. PREV           ---  addr
  1036.           A variable containing the address of the disc buffer most
  1037.           recently referenced. The UPDATE command marks this buffer
  1038.           to be later written to disc.
  1039.  
  1040. PUSH
  1041.           This  code  sequence  pushes  machine  registers  to  the
  1042.           computation stack and returns to NEXT. It is not directly
  1043.           executable,  but  is a forth re-entry point after machine
  1044.           code.
  1045.  
  1046. PUT
  1047.           This code sequence stores machine register contents  over
  1048.           the  topmost computation stack value and returns to NEXT.
  1049.           It  is not directly executable,  but is a forth  re-entry
  1050.           point after machine code.
  1051.  
  1052. QUERY
  1053.           Input  80 characters of text (or until a  "return")  from
  1054.           the operators terminal. Text is positioned at the address
  1055.           contained in TIB with IN set to zero.
  1056.  
  1057. QUIT                                                   L1
  1058.           Clear  the  return stack,  stop compilation,  and  return
  1059.           control to the operators terminal. No message is given.
  1060.  
  1061. R              ---  n
  1062.           Copy  the  top  of the return stack  to  the  computation
  1063.           stack.
  1064.  
  1065. R#             ---  addr                               U
  1066.           A  user  variable which may contain the  location  of  an
  1067.           editing cursor, or other file related function.
  1068.  
  1069. R/W            addr  blk  f  ---
  1070.           The  fig-FORTH  standard disc read-write  linkage.   addr
  1071.           specifies the source or destination block buffer,  blk is
  1072.           the sequential number of the referenced block; and f is a
  1073.           flag for f=0 write and f=1 for read.  R/W determines  the
  1074.           location  on  mass storage,  performs the read-write  and
  1075.           performs any error checking.
  1076.  
  1077. R>             ---  n                                  L0
  1078.           Remove  the top value from the return stack and leave  it
  1079.           on the computation stack. See >R  R
  1080.  
  1081. R0             ---  addr                               U
  1082.           A  user variable containing the initial location  of  the
  1083.           return stack. Pronounced R-zero. See RP!
  1084.  
  1085. REPEAT         addr  n  ---        (compiling)         P,C2
  1086.           Used within a colon-definition in the form:
  1087.                     BEGIN  ...  WHILE  ...  REPEAT
  1088.           At  run-time,  REPEAT forces an unconditional branch back
  1089.           to just after the corresponding BEGIN.
  1090.  
  1091.           At  compile-time,  REPEAT compiles BRANCH and the  offset
  1092.           from HERE to addr. n is used for error testing.
  1093.  
  1094. ROT            n1  n2  n3  ---  n2  n3  n1             L0
  1095.           Rotate  the top three values on the stack,  bringing  the
  1096.           third to the top.
  1097.  
  1098. RP!
  1099.           A  computer dependent procedure to initialise the  return
  1100.           stack pointer from user variable R0.
  1101.  
  1102. S->D           n  ---  d
  1103.           Sign extend a single number to form a double number.
  1104.  
  1105. S0             ---  addr                               U
  1106.           A  user variable that contains the initial value for  the
  1107.           stack pointer. Pronounced S-zero. See SP!
  1108.  
  1109. SCR            ---  addr                               U
  1110.           A   user  variable  containing  the  screen  number  most
  1111.           recently referenced by LIST.
  1112.  
  1113. SIGN           n  d  ---  d                            L0
  1114.           Stores an ascii "-" sign just before a converted  numeric
  1115.           output  string  in  the  text output  buffer  when  n  is
  1116.           negative.   n  is  discarded,  but  double  number  d  is
  1117.           maintained. Must be between <# and #>.
  1118.  
  1119. SMUDGE
  1120.           Used during word definition to toggle the "smudge bit" in
  1121.           a definition's name field.  This prevents an un-completed
  1122.           definition  from being found during dictionary  searches,
  1123.           until compiling is completed without error.
  1124.  
  1125. SP!
  1126.           A  computer  dependent procedure to initialise the  stack
  1127.           pointer from S0.
  1128.  
  1129. SP@            ---  addr
  1130.           A  computer dependent procedure to return the address  of
  1131.           the  stack position to the top of the stack,  as  it  was
  1132.           before  SP@ was executed.  (eg.  1  2  SP@  @  ...  would
  1133.           type  2  2  1 )
  1134.  
  1135. SPACE                                                  L0
  1136.           Transmit an ascii blank to the output device.
  1137.  
  1138. SPACES         n  ---                                  L0
  1139.           Transmit n ascii blanks to the output device.
  1140.  
  1141. STATE          ---  addr                               L0,U
  1142.           A user variable containing the compilation state.  A non-
  1143.           zero value indicates compilation. The value itself may be
  1144.           implementation dependent.
  1145.  
  1146. SWAP           n1  n2  ---  n2  n1                     L0
  1147.           Exchange the top two values on the stack.
  1148.  
  1149. TASK
  1150.           A  no-operation word which can mark the boundary  between
  1151.           applications.  By  forgetting TASK and  re-compiling,  an
  1152.           application can be discarded in its entirety.
  1153.  
  1154. THEN                                                   P,C0,L0
  1155.           An alias for ENDIF.
  1156.  
  1157. TIB            ---  addr                               U
  1158.           A  user variable containing the address of  the  terminal
  1159.           input buffer.
  1160.  
  1161. TOGGLE         addr  b  ---
  1162.           Complement the contents of addr by the bit pattern b.
  1163.  
  1164. TRAVERSE       addr1  n  ---  addr2
  1165.           Move across the name field of a fig-FORTH variable length
  1166.           name  field.  addr1  is the address of either the  length
  1167.           byte  or the last letter.  If n=1,  the motion is  toward
  1168.           high memory;  if n= -1,  the motion is toward low memory.
  1169.           The  addr2 resulting is address of the other end  of  the
  1170.           name.
  1171.  
  1172. TRIAD          scr  ---
  1173.           Display  on the selected output device the three  screens
  1174.           which include that numbered scr,  beginning with a screen
  1175.           evenly divisible by three.  Output is suitable for source
  1176.           text records, and includes a reference line at the bottom
  1177.           taken from line 15 of screen 4.
  1178.  
  1179. TYPE           addr  count  ---                        L0
  1180.           Transmit  count  characters  from addr  to  the  selected
  1181.           output device.
  1182.  
  1183. U*             u1  u2  ---  ud
  1184.           Leave  the unsigned double number product of two unsigned
  1185.           numbers.
  1186.  
  1187. U/             ud  u1  ---  u2  u3
  1188.           Leave the unsigned remainder u2 and unsigned quotient  u3
  1189.           from the unsigned double dividend ud and unsigned divisor
  1190.           u1.
  1191.  
  1192. UNTIL                f  ---        (run-time)
  1193.                addr  n  ---        (compile)           P,C2,L0
  1194.           Occurs within a colon-definition in the form:
  1195.                     BEGIN  ...  UNTIL
  1196.           At  run-time,  UNTIL controls the conditional branch back
  1197.           to  the corresponding BEGIN.  If f  is  false,  execution
  1198.           returns to just after begin; if true, execution continues
  1199.           ahead.
  1200.  
  1201.           At  compile-time,  UNTIL compiles (0BRANCH) and an offset
  1202.           from HERE to addr. n is used for error tests.
  1203.  
  1204. UPDATE                                                 L0
  1205.           Marks  the most recently referenced block (pointed to  by
  1206.           PREV)  as  altered.   The  block  will  subsequently   be
  1207.           transferred  automatically  to disc should its buffer  be
  1208.           required for storage of a different block.
  1209.  
  1210. USE            ---  addr
  1211.           A variable containing the address of the block buffer  to
  1212.           use next, as the least recently written.
  1213.  
  1214. USER           n  ---                                  L0
  1215.           A defining word used in the form:
  1216.                     n  USER  cccc
  1217.           which  creates a user variable cccc.  The parameter field
  1218.           of cccc contains n as a fixed offset relative to the user
  1219.           pointer register UP for this user variable.  When cccc is
  1220.           later executed,  it places the sum of its offset and  the
  1221.           user  area  base  address  on the stack  as  the  storage
  1222.           address of that particular variable.
  1223.  
  1224. VARIABLE                                               E,L0
  1225.           A defining word used in the form:
  1226.                     n  VARIABLE  cccc
  1227.           When VARIABLE is executed, it creates the definition cccc
  1228.           with its parameter field initialised to n.  When cccc  is
  1229.           later  executed,  the  address  of  its  parameter  field
  1230.           (containing  n) is left on the stack,  so that a fetch or
  1231.           store may access this location.
  1232.  
  1233. VOC-LINK       ---  addr                               U
  1234.           A user variable containing the address of a field in  the
  1235.           definition  of the most recently created vocabulary.  All
  1236.           vocabulary  names  are linked by these  fields  to  allow
  1237.           control for FORGETting through multiple vocabularies.
  1238.  
  1239. VOCABULARY                                             E,L
  1240.           A defining word used in the form:
  1241.                     VOCABULARY  cccc
  1242.           to create a vocabulary definition cccc. Subsequent use of
  1243.           cccc  will  make  it  the  CONTEXT  vocabulary  which  is
  1244.           searched   first   by  INTERPRET.   The  sequence   "cccc
  1245.           DEFINITIONS"  will also make cccc the CURRENT  vocabulary
  1246.           into which new definitions are placed.
  1247.  
  1248.           In fig-FORTH,  cccc will be so chained as to include  all
  1249.           definitions  of  the vocabulary in which cccc  is  itself
  1250.           defined.  All vocabularies ultimately chain to Forth.  By
  1251.           convention,   vocabulary   names   are  to  be   declared
  1252.           IMMEDIATE. See VOC-LINK
  1253.  
  1254. VLIST
  1255.           List  the  names  of  the  definitions  in  the   context
  1256.           vocabulary. "Break" will terminate the listing.
  1257.  
  1258. WARNING        ---  addr                               U
  1259.           A  user variable containing a value controlling  message.
  1260.           If  = 1,  disc is present and screen 4 of drive 0 is  the
  1261.           base location for messages.  If = 0,  no disc is  present
  1262.           and  messages  will  be presented by  number.  If  =  -1,
  1263.           execute  (ABORT)  for  a user  specified  procedure.  See
  1264.           MESSAGE  ERROR
  1265.  
  1266. WHILE                f  ---        (run-time)
  1267.                ad1  n1  ---  ad1  n1  ad2  n2          P,C2
  1268.           Occurs in a colon-definition in the form:
  1269.                     BEGIN  ...  WHILE  (tp)  ...  REPEAT
  1270.           At run-time, WHILE selects conditional execution based on
  1271.           boolean flag f.  If f is true (non-zero), WHILE continues
  1272.           execution of the true part through to REPEAT,  which then
  1273.           branches back to BEGIN.   If f is false (zero), execution
  1274.           skips to just after REPEAT, exiting the structure.
  1275.  
  1276.           At compile time,  WHILE emplaces (0BRANCH) and leaves ad2
  1277.           of the reserved offset. The stack values will be resolved
  1278.           by REPEAT.
  1279.  
  1280. WIDTH          ---  addr                               U
  1281.           In  fig-FORTH,  a  user variable containing  the  maximum
  1282.           number   of  letters  saved  in  the  compilation  of   a
  1283.           definition's  name.  It  must be 1  through  31,  with  a
  1284.           default  value  of 31.  The name character count and  its
  1285.           natural characters are saved,  up to the value in  width.
  1286.           The  value  may be changed at any time within  the  above
  1287.           limits.
  1288.  
  1289. WORD           c  ---                                  L0
  1290.           Read the next text characters from the input stream being
  1291.           interpreted,  until  a delimiter c is found,  storing the
  1292.           packed  character  string  beginning  at  the  dictionary
  1293.           buffer HERE. WORD leaves the character count in the first
  1294.           byte,  the characters,  and ends with two or more blanks.
  1295.           Leading occurances of c are ignored. If BLK is zero, text
  1296.           is taken from the terminal input buffer,  otherwise  from
  1297.           the disc block stored in BLK. See BLK  IN
  1298.  
  1299. X
  1300.           This  is  a psuedonym for the "null" or dictionary  entry
  1301.           for  a  name of one character of ascii null.  It  is  the
  1302.           execution procedure to terminate interpretation of a line
  1303.           of  text from the terminal or within a  disc  buffer,  as
  1304.           both buffers always have a null at the end.
  1305.  
  1306. XOR            n1  n2  ---  xor                        L1
  1307.           Leave the bitwise logical exclusive-or of two values.
  1308.  
  1309. [                                                      P,L1
  1310.           Used in a colon-definition in the form:
  1311.                     : xxx   [  words  ]   more  ;
  1312.           Suspend compilation.  The words after [ are executed, not
  1313.           compiled.   This   allows   calculation  or   compilation
  1314.           exceptions  before  resuming  compilation  with  ].   See
  1315.           LITERAL  ]
  1316.  
  1317. [COMPILE]                                              P,C
  1318.           Used in a colon-definition in the form:
  1319.                     : xxx   [COMPILE]   FORTH  ;
  1320.           [COMPILE]  will  force the compilation  of  an  immediate
  1321.           definition,   that   would   otherwise   execute   during
  1322.           compilation.  The  above  example will select  the  FORTH
  1323.           vocabulary  when  xxx executes,  rather than  at  compile
  1324.           time.
  1325.  
  1326. ]                                                      L1
  1327.           Resume  compilation,   to  the  completion  of  a  colon-
  1328.           definition. See [
  1329.  
  1330.