home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / fpc / help / ffloat.hlp < prev    next >
Encoding:
Text File  |  1990-05-24  |  37.1 KB  |  916 lines

  1. \ FFLOAT.HLP    Help file for 8087 floating point support package.
  2.  
  3. WAIT?   ( -- addr )             \ ASSEMBLER
  4.         A variable to indicate if we need to assemble a WAIT instruction
  5.         along with a floating point instruction.
  6.  
  7. <FW>    ( -- addr )             \ ASSEMBLER
  8.         A variable that holds the type and size information for the
  9.         floating point operand of the instruction to be assembled.
  10.  
  11. 8087NPU  ( -- flag )            \ ASSEMBLER
  12.         This flag indicates if we are assembling for an 8087 chip versus
  13.         one of the later (80287, 80387, etc).  If set, WAIT instructions
  14.         will be generated between floating point instructions.
  15.  
  16. NOWAIT   ( -- )                 \ ASSEMBLER
  17.         Turns off the temporary WAIT? flag.
  18.  
  19. COMP-WAIT   ( -- )              \ ASSEMBLER
  20.         Optionally assemble a WAIT instruction.
  21.  
  22. FPSTACK?   ( -- flag )          \ ASSEMBLER
  23.         Used by the floating point assembler to determine if a floating
  24.         point stack operand appears in the instruction.
  25.  
  26. ST      Floating Point Stack operand
  27. ST0     Floating Point Stack operand
  28. ST(0)   Floating Point Stack operand
  29. ST1     Floating Point Stack operand
  30. ST(1)   Floating Point Stack operand
  31. ST2     Floating Point Stack operand
  32. ST(2)   Floating Point Stack operand
  33. ST3     Floating Point Stack operand
  34. ST(3)   Floating Point Stack operand
  35. ST4     Floating Point Stack operand
  36. ST(4)   Floating Point Stack operand
  37. ST5     Floating Point Stack operand
  38. ST(5)   Floating Point Stack operand
  39. ST6     Floating Point Stack operand
  40. ST(6)   Floating Point Stack operand
  41. ST7     Floating Point Stack operand
  42. ST(7)   Floating Point Stack operand
  43.  
  44. ST,     Floating Point Stack operand
  45. ST0,    Floating Point Stack operand
  46. ST(0),  Floating Point Stack operand
  47. ST1,    Floating Point Stack operand
  48. ST(1),  Floating Point Stack operand
  49. ST2,    Floating Point Stack operand
  50. ST(2),  Floating Point Stack operand
  51. ST3,    Floating Point Stack operand
  52. ST(3),  Floating Point Stack operand
  53. ST4,    Floating Point Stack operand
  54. ST(4),  Floating Point Stack operand
  55. ST5,    Floating Point Stack operand
  56. ST(5),  Floating Point Stack operand
  57. ST6,    Floating Point Stack operand
  58. ST(6),  Floating Point Stack operand
  59. ST7,    Floating Point Stack operand
  60. ST(7),  Floating Point Stack operand
  61.  
  62. WORD-TYPE                            \ ASSEMBLER
  63.         A creating word for assembler helper words.
  64.  
  65. INTEGER*2       Defines type of floating point operand.
  66. INTEGER*4       Defines type of floating point operand.
  67. INTEGER*8       Defines type of floating point operand.
  68. REAL*4          Defines type of floating point operand.
  69. REAL*8          Defines type of floating point operand.
  70. TEMP-REAL       Defines type of floating point operand.
  71. BCD             Defines type of floating point operand.
  72.  
  73. MF    ( -- n )                       \ ASSEMBLER
  74.  
  75. ESC,   ( n -- )  Returns bits 1 and 2 of the current operand word type.
  76.         Generates a basic floating-point instruction using ESC .
  77.  
  78. N1FPF   Used to generate simple floating point instructions with no WAIT .
  79.  
  80. N1FP    Creating word for simple floating point instructions with no WAIT .
  81.  
  82. FNCLEX          Clear floating-point exception flags with no WAIT .
  83. FNINT           Initialize the floating-point processor with no WAIT .
  84. FNENI           Enable interrupts from floating point processor, no WAIT .
  85. FNDISI          Disable interrupts from f-p processor, no WAIT .
  86. FNSTWAX         80287: store Status word in AX, with no WAIT .
  87.  
  88. W1FPF    Used to generate simple floating point instructions with WAIT .
  89.  
  90. W1FP     Creating word for simple floating point instructions with WAIT .
  91.  
  92. FCLEX           Clear floating-point exception flags with WAIT .
  93. FINT            Initialize the floating-point processor with WAIT .
  94. FENI            Enable interrupts from floating point processor, with WAIT .
  95. FDISI           Disable interrupts from f-p processor, with WAIT .
  96. FSTWAX          80287: store Status word in AX, with WAIT .
  97.  
  98. 1FP     Creating word for simple floating point instructions.
  99.  
  100. FCOMPP          Compare Real and Pop twice.
  101. FTST            Compare the top stack element against zero.
  102. FXAM            Examine the top stack element, set condition codes.
  103. FLDZ            Load a floating point zero.
  104. FLD1            Load a floating point 1.
  105. FLDPI           Load a floating point value of pi.
  106. FLDL2T          Load a floating point log to base 2 of 10.
  107. FLDL2E          Load a floating point log to base 2 of e.
  108. FLDLG2          Load a floating point log to base 10 of 2.
  109. FLDLN2          Load a floating point log to base e of 2.
  110. FSQRT,          Assembler instruction to take the square root.
  111. FSCALE          Scale by 2 raised to the integer second on stack.
  112. FPREM           Floating point partial remainder function.
  113. FRNDINT         Rounds top stack item to an integer.
  114. FXTRACT         Extracts sign and exponent of top f.p. stack item.
  115. FABS,           Changes the top stack item to positive. Assembler inst.
  116. FCHS            Reverses the sign of the top f.p. stack item.
  117. FPTAN           Partial tangent function.
  118. FPATAN          Partial arctangent function.
  119. F2XM1           Calculate ((2^x) - 1).
  120. FYL2X           Calculate  y*logb2(x), where logb2 = log base 2.
  121. FYL2XP1         Calculate  y*logb2(x+1).
  122. FINCSTP         Increment the floating point stack pointer.
  123. FDECSTP         Decrement the floating point stack pointer.
  124. FNOP            Floating point no-operation.
  125.  
  126. N2FPF           Assist class 2 f-p assembler instructions with no WAIT .
  127.  
  128. N2FP            Generate class 2 f-p assembler instructions with no WAIT .
  129.  
  130. FNSTCW          Store the Control Word with no WAIT .
  131. FNSTSW          Store the Status Word with no WAIT .
  132. FNSTENV         Store the Environment with no WAIT .
  133. FNSAVE          Store the Environment and register stack with no WAIT .
  134.  
  135. W2FPF           Assist class 2 f-p assembler instructions with WAIT .
  136.  
  137. W2FP            Generate class 2 f-p assembler instructions with WAIT .
  138.  
  139. FSTCW           Store the Control Word with WAIT .
  140. FSTSW           Store the Status Word with WAIT .
  141. FSTENV          Store the Environment with WAIT .
  142. FSAVE           Store the Environment and register stack with WAIT .
  143.  
  144. 2FPF            Assist class 2 f-p assembler instructions.
  145.  
  146. 2FP             Generate class 2 f-p assembler instructions.
  147.  
  148. FLDCW           Load the Floating point processor Control Word.
  149. FLDENV          Restore the FPU environment.
  150. FRSTOR          Restore the entire FPU from memory.
  151.  
  152. 3FPF            Assist class 3 floating point assembler generation.
  153.  
  154. 3FP             Generate class 3 floating point assembler instructions.
  155.  
  156. FLD             Push the source operand onto floating point stack.
  157. FSTP            Store the top f.p. stack operand to memory (no pop).
  158.  
  159. 4FPF            Assist class 4 floating point assembler generation.
  160.  
  161. 4FP             Generate class 4 f.p. assembler instructions.
  162.  
  163. FXCH            Exchange the contents of the destination and f.p.
  164.                 stack top.
  165. FFREE           Change the destination register tag to "empty".
  166.  
  167. 5FPF            Assist class 5 floating point assembler generation.
  168.  
  169. 5FP             Generate class 5 f.p. assembler instructions.
  170.  
  171. FADDP           Floating point add and pop.
  172. FMULP           Floating point multiply and pop.
  173. FSUBP           Floating point subtract and pop.
  174. FSUBRP          Reversed floating point subtract and pop.
  175. FDIVP           Floating point divide and pop.
  176. FDIVRP          Reversed floating point divide and pop.
  177.  
  178. 6FPF            Assist class 6 floating point assembler generation.
  179.  
  180. 6FP             Generate class 6 f.p. assembler instructions.
  181.  
  182. FCOM            Floating point compare.
  183. FCOMP           Floating point compare and pop.
  184. FST             Store the top of f.p. stack to destination.
  185.  
  186. 7FPF            Assist class 7 floating point assembler generation.
  187.  
  188. 7FP             Generate class 7 f.p. assembler instructions.
  189.  
  190. FADD            Floating point addition.
  191. FMUL            Floating point multiplication.
  192. FSUB            Floating point subtraction.
  193. FSUBR           Reversed floating point subtraction.
  194. FDIV            Floating point division.
  195. FDIVR           Reversed floating point division.
  196.  
  197. WSS:            Generate a WAIT, then a Stack Segment prefix.
  198.  
  199. WCS:            Generate a WAIT, then a Code Segment prefix.
  200.  
  201. WDS:            Generate a WAIT, then a Data Segment prefix.
  202.  
  203. WES:            Generate a WAIT, then an Extra Segment prefix.
  204.  
  205. 2/?   ( n1 -- n2 n3 )              \ FORTH
  206.         n2 is the result of shifting n1 right by 1 bit.  n3 is the
  207.         least significant bit of n1.
  208.  
  209. OR!  ( n1 addr -- )                \ FORTH
  210.         Perform a logical OR of n1 with the contents at addr, leaving
  211.         the result in addr.
  212.  
  213. FPSTAT   ( -- addr )               \ FORTH
  214.         A variable holding a 32 bit code for error flags.
  215.  
  216. .FP.     ( -- )                    \ FORTH
  217.         A simple display word to simplify (FPERR) .
  218.  
  219. .NAME    ( addr -- )               \ FORTH
  220.         Print the name of the word specified by the cfa argument.
  221.  
  222. .NAMES   ( addr1 addr2 -- )               \ FORTH
  223.         Print the names corresponding to the cfas specified on the
  224.         parameter stack.         
  225.  
  226. (FPERR)  ( F: r1 -- r1 ; n1 n2 -- )  \ FORTH
  227.         Print an error message depending on the bit set in the error
  228.         code n2 .  n1 is the cfa of the routine in which the error
  229.         was detected.
  230.  
  231. INITFP   ( -- )                    \ FORTH
  232.         Initialize the numeric co-processor.
  233.  
  234. CLEARFP   ( -- )                   \ FORTH
  235.         Clear the floating point exceptions flags on the NPU.
  236.  
  237. FSTACK-SIZE    ( -- n )            \ FORTH
  238.         Returns the maximum number of floating point elements allowed
  239.         on the floating point stack.
  240.  
  241. FSTACK  ( -- addr )                \ FORTH
  242.         An array of floating point values used as a stack.
  243.  
  244. FSP0     ( -- addr )               \ FORTH
  245.         Points to the base of the floating point stack.
  246.  
  247. FLOAT-WORK  ( -- addr )            \ FORTH
  248.         A variable to hold a 10 byte floating point temporary.
  249.  
  250. FVTOS   ( -- addr )                \ FORTH
  251.         The address represents the apparent top of the NPU co-processor
  252.         stack.  If the actual information is in the NPU, then it
  253.         does NOT appear in memory (or at least, it is just an accident,
  254.         if it does).
  255.  
  256. FVBOS   ( -- addr )                \ FORTH
  257.         The address represents the apparent bottom of the NPU.  The
  258.         difference between FVTOS and FVBOS should represent the actual
  259.         arguments in the NPU.  Any overflow from the NPU should appear
  260.         in memory between FVBOS and FXSP0 .
  261.  
  262. FCLEAR   ( -- )                    \ FORTH
  263.         Resets the floating point stack pointer to FSP0 .
  264.  
  265. FDROP   ( F: r -- )                \ FORTH
  266.         Drop a f.p. number from the f.p. stack.
  267.  
  268. (1VLOAD)                           \ FORTH
  269.         A code level subroutine used to insure that at least one argument
  270.         is on the real NPU stack.
  271.  
  272. (2VLOAD)                           \ FORTH
  273.         A code level subroutine used to insure that at least two arguments
  274.         are on the real NPU stack.
  275.  
  276. 1VLOAD  A CODE word which may be called from high level Forth to insure
  277.         that at least one argument is on the real NPU stack.
  278.  
  279. (3VLOAD)                           \ FORTH
  280.         A code level subroutine used to insure that at least three arguments
  281.         are on the real NPU stack.
  282.  
  283. (1VEMPTY)                          \ FORTH
  284.         A code level subroutine to ensure that at least one position
  285.         on the NPU stack is empty!
  286.  
  287. (1VL1VE)                           \ FORTH
  288.         A code level subroutine to ensure that at least one argument is
  289.         on the real NPU stack, and that at least one position on the
  290.         stack is empty!
  291.  
  292. (2VEMPTY)                          \ FORTH
  293.         A code level subroutine to ensure that at least 2 positions on
  294.         the real NPU stack are empty.
  295.  
  296. F!      ( F: r -- ; addr -- )      \ FORTH
  297.         Store the f.p. number at the top of the f.p. stack into memory
  298.         beginning at the address specified at the top of the parameter
  299.         stack.
  300.  
  301. F@      ( F: -- r ; addr -- )      \ FORTH
  302.         Push the f.p. number pointed to by the address at the top of the
  303.         parameter stack onto the f.p. stack.  The address is popped from
  304.         the parameter stack.
  305.  
  306. FCONSTANT   ( F: r -- ) ( compiling )  \ FORTH
  307.         Create a floating point constant.  Analogous to  CONSTANT .
  308.  
  309. FVARIABLE   ( -- ) ( compiling )   \ FORTH
  310.         Create a floating point variable.  Analogous to  VARIABLE .
  311.  
  312. FP>DI   ( F: r -- ; -- d )       \ FORTH
  313.         Round the floating point number at the top of the 8087's stack
  314.         to an integer value.  Pop it off and push it onto the normal
  315.         parameter stack as a double number.
  316.  
  317. FP>QI   ( F: r -- ; -- q )       \ FORTH
  318.         Round the floating point number at the top of the 8087's stack
  319.         to an integer value.  Pop it off and push it onto the normal
  320.         parameter stack as a quad number.
  321.  
  322. QI>FP   ( F: -- r ; q -- )       \ FORTH
  323.         Pop the quad number at the top of the parameter stack, push
  324.         it onto the 8087's stack and convert it to a f.p. number.
  325.  
  326. FPSW>   ( -- n )                 \ FORTH
  327.         Push the NPU Status word onto the parameter stack.
  328.  
  329. FEXAM   ( F: r -- r ; -- n )                 \ FORTH
  330.         Examine the status of the top word in the floating point stack.
  331.  
  332. FPCW>   ( -- n )                 \ FORTH
  333.         Push a copy of the NPU Control word onto the parameter stack.
  334.  
  335. >FPCW   ( n -- )                 \ FORTH
  336.         Pop the new control word from the parameter stack and put it
  337.         into the NPU.
  338.  
  339. >FREGS   ( addr -- )             \ FORTH
  340.         Load the NPU environment and stack from the array pointed to
  341.         by addr.
  342.  
  343. >FREGS>   ( addr -- )            \ FORTH
  344.         Save a copy of the NPU environment and stack in the array
  345.         pointed to by addr.
  346.  
  347. PI      ( F: -- pi )             \ FORTH
  348.         Push a value of pi onto the (memory) floating point stack.
  349.  
  350. F1.0    ( F: -- 1.0 )            \ FORTH
  351.         Push a floating point 1.0 onto the floating point stack.
  352.  
  353. F0.0    ( F: -- 0.0 )            \ FORTH
  354.         Push a floating point 0.0 onto the floating point stack.
  355.  
  356. F*      ( F: r1 r2 -- r3 )       \ FORTH
  357.         Replace the two numbers at the top of the f.p. stack with
  358.         the product of the two numbers.
  359.  
  360. F+      ( F: r1 r2 -- r3 )       \ FORTH
  361.         Replace the two numbers at the top of the f.p. stack with
  362.         the sum of the two numbers.
  363.  
  364. F-      ( F: r1 r2 -- r3 )       \ FORTH
  365.         Subtract the top f.p. number from the second f.p. number.
  366.         Replace the top two numbers with that difference.
  367.  
  368. F\-     ( F: r1 r2 -- r3 )       \ FORTH
  369.         Subtract the second f.p. number from the top f.p. number.  Replace
  370.         the top two numbers with that difference.
  371.  
  372. F/      ( F: r1 r2 -- r3 )       \ FORTH
  373.         Divide the second f.p. number by the top f.p. number.  Replace
  374.         the top two numbers by the quotient.
  375.  
  376. FABS    ( F: r1 -- |r1| )        \ FORTH
  377.         Clear the sign bit of the floating point value at the top of
  378.         the f.p. stack, yielding a positive value.
  379.  
  380. FNEGATE   ( F: r1 -- r2 )        \ FORTH
  381.         Reverse the sign of the number at the top of the f.p. stack.
  382.  
  383. FSQRT   ( F: r1 -- r2 )          \ FORTH
  384.         Replace the value at the top of the f.p. stack with its square
  385.         root.
  386.  
  387. FLOG    ( F: r1 -- r2 )          \ FORTH
  388.         Replace the value at the top of the floating point stack with
  389.         its base 10 logarithm.
  390.  
  391. FLN     ( F: r1 -- r2 )          \ FORTH
  392.         Replace the value at the top of the floating point stack with
  393.         its natural logarithm.
  394.  
  395. 1/F     ( F: r1 -- r2 )          \ FORTH
  396.         Replace the value at the top of the floating point stack with
  397.         its reciprical.
  398.  
  399. F2*     ( F: r1 -- r2 )          \ FORTH
  400.         Multiply the f.p. number on the top of the f.p. stack by 2.0 .
  401.  
  402. F2/     ( F: r1 -- r2 )          \ FORTH
  403.         Divide the top f.p. number by 2.0 .
  404.  
  405. F2**N*   ( F: r1 -- r2 ; n -- )  \ FORTH
  406.         Multiply the top f.p. number by 2 raised to the nth power.  n
  407.         may be either positive or negative.
  408.  
  409. FLOAT   ( F: -- r ; d -- )       \ FORTH
  410.         Pop the double integer from the parameter stack and push it onto
  411.         the f.p. stack, converting it to a floating point number.
  412.  
  413. (ROUND)   ( F: r -- ; n -- d )   \ FORTH
  414.         Round the number at the top of the floating point stack according
  415.         to the bits 10 and 11 in  n  on the parameter stack.  Drop n from
  416.         the parameter stack.  Pop the result from the f.p. stack and push
  417.         the result onto the parameter stack as a double precision number.
  418.  
  419. FIX     ( F: r -- ; -- d )       \ FORTH
  420.         Round the number at the top of the floating point stack to an
  421.         integer, using the "round to even" rule.  Pop the result from the
  422.         floating point stack and push the double number result onto the
  423.         parameter stack.
  424.  
  425. INT     ( F; r -- ; -- d )       \ FORTH
  426.         Round the number at the top of the floating point stack toward
  427.         zero.  Pop the result and push the double number onto the parameter
  428.         stack.
  429.  
  430. RND>+INF   ( F: r -- ; -- d )    \ FORTH
  431.         Round the number at the top of the floating point stack toward
  432.         positive infinity.  Pop the result and push the double number
  433.         onto the parameter stack.
  434.  
  435. RND>-INF   ( F: r -- ; -- d )    \ FORTH
  436.         Round the number at the top of the floating point stack toward
  437.         negative infinity.  Pop the result and push the double number
  438.         onto the parameter stack.
  439.  
  440. FDUP    ( F: r -- r r )          \ FORTH
  441.         Duplicate the number at the top of the f.p. stack.
  442.  
  443. FOVER   ( F: r1 r2 -- r1 r2 r1 )  \ FORTH
  444.         Push a copy of the second item on the parameter stack onto the
  445.         parameter stack.
  446.  
  447. FSWAP   ( F: r1 r2 -- r2 r1 )    \ FORTH
  448.         Exchange the top two items on the f.p. stack.
  449.  
  450. FNSWAP   ( F: rn rn-1 ... r1 r0 -- r0 rn-1 ... r1 rn ; n -- )   \ FORTH
  451.         Exchange the item at the top of the f.p. stack with the n-th
  452.         item (counting from 0) on the floating point stack.
  453.  
  454. FROT    ( F: r1 r2 r3 -- r2 r3 r1 )   \ FORTH
  455.         Rotate the top three items on the floating point stack, bringing
  456.         the third item to the top.
  457.  
  458. F-ROT   ( F: r1 r2 r3 -- r3 r1 r2 )   \ FORTH
  459.         Rotate the top three items on the floating point stack, moving the
  460.         top item to the third position.
  461.  
  462. FNIP    ( F: r1 r2 -- r2 )            \ FORTH
  463.         Remover the second item from the floating point stack.
  464.  
  465. FTUCK   ( F: r1 r2 -- r2 r1 r2 )      \ FORTH
  466.         Place a copy of the top item on the floating point stack under the
  467.         second item on the f.p. stack.
  468.  
  469. FPICK   ( F: rn rn-1 ... r0 -- rn rn-1 r0 rn ; n -- )   \ FORTH
  470.         Push a copy of the n-th item on the floating point stack onto the
  471.         floating point stack.  Counting begins at 0.
  472.  
  473. (RVS0)   ( F: r -- ; -- fpsw )        \ FORTH
  474.         Pop the top element in the f.p. stack and compare it against zero.
  475.         Push the 8087 status word onto the parameter stack.
  476.  
  477. C3C0X   ( fpsw -- n )                 \ FORTH
  478.         Convert the copy of the 8087 status word at the top of the
  479.         parameter stack.  If the comparison was made relative to zero,
  480.         the possible results are:
  481.  
  482.                 0       The f.p. number was positive and non-zero.
  483.                 1       The f.p. number was negative and non-zero.
  484.                 2       The f.p. number was zero.
  485.                 3       The f.p. number was not comparable.
  486.  
  487.         If the comparison is made between two numbers on the floating
  488.         point stack, the possible results are:
  489.  
  490.                 0       Second element > top element.
  491.                 1       Second element < top element.
  492.                 2       Second element = top element.
  493.                 3       The two values are not comparable.
  494.  
  495. F0=     ( F: r -- ; -- f )             \ FORTH
  496.         Pop and test the f.p. number at the top of the f.p. stack.
  497.         If the number was a floating point zero, push a true flag on
  498.         the parameter stack.  Otherwise push a false flag (0).
  499.  
  500. FDUP0=   ( F: r -- r ; -- f )          \ FORTH
  501.         Compare the number at the top of the f.p. stack with zero.  If
  502.         the number is zero, return a true flag.  Otherwise, return a false
  503.         flag.
  504.  
  505. F0<     ( F: r -- ; -- f )             \ FORTH
  506.         Pop and test the f.p. number at the top of the f.p. stack.
  507.         If the number is less than zero, push a true flag on the parameter
  508.         stack.  Otherwise push a false flag.
  509.  
  510. F0>     ( F: r -- ; -- f )             \ FORTH
  511.         Pop and test the f.p. number at the top of the f.p. stack.
  512.         If the number is greater than zero, push a true flag on the
  513.         parameter stack.  Otherwise push a false flag.
  514.  
  515. (RVSR)   ( F: r1 r2 -- ; -- fpsw )     \ FORTH
  516.         Compare the top two words on the f.p. stack.  Push the resulting
  517.         status word from the 8087 onto the parameter stack.  The f.p.
  518.         stack is popped twice.
  519.  
  520. F=      ( F: r1 r2 -- ; -- f )         \ FORTH
  521.         If the top two elements on the f.p. stack are equal, return a
  522.         true flag.  Otherwise return a false flag.  In either case, the
  523.         top two elements on the f.p. stack are popped.
  524.  
  525. F<      ( F: r1 r2 -- ; -- f )         \ FORTH
  526.         Compare the top two elements on the f.p. stack.  If the second
  527.         number is less than the first, return a true flag.  Otherwise
  528.         return a false flag.  In either case the f.p. stack is popped
  529.         twice.
  530.  
  531. F>      ( F: r1 r2 -- ; -- f )         \ FORTH
  532.         Compare the top two elements on the f.p. stack.  If the second
  533.         number is greater than the first, return a true flag.  Otherwise
  534.         return a false flag.  In either case the f.p. stack is popped
  535.         twice.
  536.  
  537. FMIN    ( F: r1 r2 -- r3 )             \ FORTH
  538.         Replace the top two elements on the f.p. stack by the algebraically
  539.         smaller of the two.
  540.  
  541. FMAX    ( F: r1 r2 -- r3 )             \ FORTH
  542.         Replace the top two elements on the f.p. stack by the algebraically
  543.         larger of the two.
  544.  
  545. (FLIT)   ( F: -- r )                   \ FORTH
  546.         Move the in-line floating point literal onto the f.p. stack.
  547.  
  548. FLITERAL   ( F: r -- )                 \ FORTH
  549.         Pop a number from the f.p. stack and create an in-line literal
  550.         floating point number.  Used while compiling.
  551.  
  552. TRIG-MODE   ( -- addr )                \ FORTH
  553.         A variable used to indicate the trigonmetric mode.  If the
  554.         contents at the address are true, then the arguments to the
  555.         trigonmetric functions are specified in degrees.  If the contents
  556.         are false, then the arguments are specified in radians.
  557.  
  558. DEGREES   ( -- )                       \ FORTH
  559.         Set the trigonometric mode to degrees.
  560.  
  561. RADIANS   ( -- )                       \ FORTH
  562.         Set the trigonometric mode to radians.
  563.  
  564. DEG->RAD   ( F: r1 -- r2 )             \ FORTH
  565.         Convert the angle at the top of the f.p. stack from degress to
  566.         radians.
  567.  
  568. RAD->DEG   ( F: r1 -- r2 )             \ FORTH
  569.         Convert the angle at the top of the f.p. stack from radians to
  570.         degress.
  571.  
  572. 2PI     ( -- addr )                    \ FORTH
  573.         Push an address on the parameter stack which points to a f.p.
  574.         value of  2*pi .
  575.  
  576. PI/4    ( -- addr )                    \ FORTH
  577.         Push an address on the parameter stack which points to a f.p.
  578.         value of  pi/4 .
  579.  
  580. PI/2    ( -- addr )                    \ FORTH
  581.         Push an address on the parameter stack which points to a f.p.
  582.         value of  pi/2 .
  583.  
  584. [SIN]   ( F: r -- sin[r] )             \ FORTH
  585.         The input argument is in the range 0 < r <= pi/4 .  The result
  586.         is the floating point value of the sine of the input argument.
  587.  
  588. [COS]   ( F: r -- cos[r] )             \ FORTH
  589.         The input argument is in the range  0 < r <= pi/4 .  The result
  590.         is the cosine of the argument.
  591.  
  592. [TAN]   ( F: r -- tan[r] )             \ FORTH
  593.         The input argument is in the range 0 < r <= pi/4 .  The result
  594.         is the tangent of the argument.
  595.  
  596. ?DEG->RAD   ( F: r1 -- r2 )            \ FORTH
  597.         If the trigonmetric mode is set to degrees, convert the argument
  598.         (presumably in degrees) to radians.  Otherwise return the
  599.         argument unchanged.
  600.  
  601. SMALL-ANGLE   ( F: -- r )              \ FORTH
  602.         The trigonometric functions above do not work properly for
  603.         arguments close to or equal to zero.  SMALL-ANGLE is used
  604.         as a reference, such that the sine and tangent functions
  605.         may be approximated by the arguments with negligable error.
  606.  
  607. FSIN1   ( F: r1 -- r2 )                \ FORTH
  608.         A high level use of [SIN] for the range  0 <= r <= pi/4 .
  609.  
  610. FCOS1   ( F: r1 -- r2 )                \ FORTH
  611.         A high level use of [COS] for the range  0 <= r <= pi/4 .
  612.  
  613. FSIN    ( F: r -- sin[r] )             \ FORTH
  614.         The floating point sine function.  There is no check made
  615.         for very large magnitude arguments.
  616.  
  617. FCOS    ( F: r -- cos[r] )             \ FORTH
  618.         The floating point cosine function.  There is no check made
  619.         for very large arguments.
  620.  
  621. INFINITY   ( F: -- r )                 \ FORTH
  622.         A floating point representation for infinity.
  623.  
  624. FINFINITY=   ( F: r1 -- ; -- flag )    \ FORTH
  625.         Test and drop the top item on the floating point stack.  If the
  626.         item had a value of infinity (either + or -), return a true flag.
  627.  
  628. FTAN1   ( F: r -- tan[r] )             \ FORTH
  629.         The tangent function for arguments in the range  0 <= r <= pi/4 .
  630.  
  631. TANARG<>0   ( F: r -- tan[r] ; n -- )  \ FORTH
  632.         An auxillary function for calculating the floating point tangent.
  633.         The value on the parameter stack is a quadrant number  0 <= n <= 3.
  634.  
  635. TANARG=0   ( F: -- tan ; n -- )        \ FORTH
  636.         Auxilliary tangent function.
  637.  
  638. FTAN    ( F: r -- tan[r] )             \ FORTH
  639.         The trigonometric tangent function.  There is no check made for
  640.         very large magnitude arguments.
  641.  
  642. (POWER)                                \ FORTH
  643.         A subroutine for calculating a f.p. number raised to a f.p.
  644.         power.
  645.  
  646. (FALN)                                 \ FORTH
  647.         An auxilliary function for calculating exp(r), where the input
  648.         and output arguments are at the top of the 8087 stack.
  649.  
  650. (FALOG)                                \ FORTH
  651.         An auxilliary function for calculating 10^r , where the input
  652.         and output arguments are on the 8087 stack.
  653.  
  654. FEXP    ( F: r -- e^r )                \ FORTH
  655.         The exponential function  e^r .
  656.  
  657. FALN    ( F: r -- e^r )                \ FORTH
  658.         The inverse natural logarithm function.  Identical to  FEXP .
  659.  
  660. FALOG   ( F: r -- 10^r )               \ FORTH
  661.         The inverse common logarithm.
  662.  
  663. FLOATDPL   ( F: -- r ; d -- )          \ FORTH
  664.         Float the double precision argument on the parameter stack.
  665.         Scale the floating point value by DPL .
  666.  
  667. F**     ( F: r1 r2 -- r2^r2 )          \ FORTH
  668.         Raise the second number on the f.p. stack to the power specified
  669.         at the top of the stack.
  670.  
  671. (FATAN)                                \ FORTH
  672.         An auxilliary function for calculating the arctangent function.
  673.  
  674. FATAN   ( F: r -- arctan[r] )          \ FORTH
  675.         The arctangent function.  Return an angle whose tangent is the
  676.         input argument.
  677.  
  678. ARCRANGE   ( F: r -- r ; -- f )        \ FORTH
  679.         Return a true flag if r is outside of the range: -1 <= r <= 1 .
  680.  
  681. FASIN   ( F: r -- arcsin[r] )          \ FORTH
  682.         The arcsin function.  Return an angle whose sine is the input
  683.         argument.
  684.  
  685. FACOS   ( F: r -- arccos[r] )          \ FORTH
  686.         The arccosine function.  Return an angle whose cosine is the
  687.         input argument.
  688.  
  689. XVALUE   ( XVALUE name )               \ FORTH
  690.         A word for creating a word similiar to a CONSTANT, but whose
  691.         value may be changed using the  IS  function.
  692.  
  693. FP?     ( -- flag )                    \ FORTH
  694.         A near constant for determining if a number with an imbedded
  695.         decimal point is a double number or a floating point number.
  696.  
  697. FLOATS   ( -- )                        \ FORTH
  698.         Sets flag FP? which allows the user to enter floating point
  699.         numbers as simple numeric strings with imbedded decimal points.
  700.         The exponential notation is optional.
  701.  
  702. DOUBLES  ( -- )                        \ FORTH
  703.         Clears the flag FP? .  Restores the usual Forth convention that
  704.         a decimal point attached to a number causes the number to be
  705.         treated as a double number.
  706.  
  707. EXP?    ( -- addr )                    \ FORTH
  708.         A variable used in scanning the input stream to indicate the
  709.         existance of the exponential indicator "E" in a possible f.p.
  710.         number.
  711.  
  712. FLOATING   ( -- addr )                 \ FORTH
  713.         A variable used to indicate if the current literal number is
  714.         a floating point number.
  715.  
  716. FLOATING?   ( -- flag )                \ FORTH
  717.         Returns the contents of the variable  FLOATING .
  718.  
  719. (FP-CHECK)   ( flag addr -- flag' addr )  \ FORTH
  720.         Test if character at addr is allowed as a part of a floating
  721.         point literal.  Also changes "e" to "E".
  722.  
  723. FP-CHECK   ( addr -- addr flag )       \ FORTH
  724.         Examine counted string at addr .  Return a true flag if the
  725.         string can be converted to a floating point literal.
  726.  
  727. FMUL10   ( F: n -- 10*n )              \ FORTH
  728.         Multiply the f-p number by decimal 10.
  729.  
  730. (FADDI)   ( F: r1 -- r2 ; n -- )       \ FORTH
  731.         Convert the integer on the parameter stack to a floating point
  732.         number and add it to the current f-p number at the top of the
  733.         f-p stack.
  734.  
  735. QCONVERT   ( q1 addr1 -- q2 addr2 )    \ FORTH
  736.         Convert the string at addr1 to a quad precision number,
  737.         accumulating the results in the quad value under the address.
  738.  
  739. QNEGATE   ( q -- -q )                  \ FORTH
  740.         Negate the quad precision number at the top of the parameter stack.
  741.  
  742. QFLOAT   ( F: -- r ; q -- )            \ FORTH
  743.         Convert the quad integer on the parameter stack to a floating point
  744.         number on the f-p stack.
  745.  
  746. (MANTISSA)   ( F: -- r ; addr1 -- addr2 )   \ FORTH
  747.         Convert the leading part of the string at addr1 to a floating point
  748.         number.  Conversion proceeds until the end of the string or until
  749.         an "E" exponential lead-in character is encountered.
  750.  
  751. (EXP)   ( addr -- d )                  \ FORTH
  752.         Convert the string at addr to a double integer representing the
  753.         exponential part of a floating point number.
  754.  
  755. FNUMBER   ( addr -- | r | n | d )      \ FORTH
  756.         If possible, convert the string at addr to a number.  The number
  757.         may be a single integer, a double integer, or a floating point
  758.         number.  If it is f-p, set the variable FLOATING to "true".
  759.         FNUMBER  will replace  NUMBER .
  760.  
  761. F]   ( -- )                            \ FORTH
  762.         Enter the compiling state, allowing possible floating point
  763.         literals.
  764.  
  765. FMAG   ( F: r1 -- r1 ; -- n)           \ FORTH
  766.         Consider the floating point number as a product of a power of
  767.         ten and a mantissa m such that  1 <= m < 10.  Return the power
  768.         of ten on the parameter stack.
  769.  
  770. FLOAT-BCD   ( -- addr )                \ FORTH
  771.         An array to hold the result of a BCD conversion of a floating
  772.         point number.
  773.  
  774. #BCD   ( -- addr )                     \ FORTH
  775.         A variable holding the number of digits of BCD conversion
  776.         desired.
  777.  
  778. R>BCD   ( F: r -- ; )                  \ FORTH
  779.         Convert a floating point number to a full BCD string at
  780.         FLOAT-BCD .
  781.  
  782. .DIGITS   ( first last -- )            \ FORTH
  783.         Print a range of digits from the string at FLOAT-BCD .
  784.  
  785. FULL2   ( n -- )                       \ FORTH
  786.         Print the low order 2 digits of n ,
  787.  
  788. (I10)   ( -- addr )                    \ FORTH
  789.         Pointer to a variable which holds the integer 10 .
  790.  
  791. FIXBCD   ( n1 -- n2 )                  \ FORTH
  792.         Auxilliary function for E.  This checks for improperly rounded
  793.         exponent calculation.
  794.  
  795. F.SPECIAL   ( F: r -- ; cc n -- )      \ FORTH
  796.         This handles printing of special cases of a floating point number.
  797.         cc  is a condition code after the top of the f-p stack has been
  798.         checked with FEXAM. 
  799.  
  800. E.   ( F: r -- )                       \ FORTH
  801.         Convert the floating point number to a BCD string with full
  802.         17 digit accuracy.
  803.  
  804. #PLACES   ( -- addr )                  \ FORTH
  805.         A variable holding the number of places of accuracy desired
  806.         for BCD conversion.
  807.  
  808. PLACES   ( n -- )                      \ FORTH
  809.         Set the desired number of decimal digits of accuracy for
  810.         floating point numeric output conversion.
  811.  
  812. FPARSE   ( F: r1 -- rint rfrac )       \ FORTH
  813.         Convert the floating point number into an integer part and
  814.         a fractional part.
  815.  
  816. .INT   ( F: r -- )                     \ FORTH
  817.         Convert the integer on the f-p stack and print it.
  818.  
  819. (F2.0)   ( -- addr )                   \ FORTH
  820.         A variable holding the image of a floating point 2.0 .
  821.  
  822. FRNDFRC   ( F: r1 -- r2 )              \ FORTH
  823.          An auxilliary function used in displaying f-p numbers.  It
  824.          adds a small part of itself for checking rounding range (?).
  825.  
  826. .FRACT   ( F: r1 -- )                  \ FORTH
  827.          Print the f-p number as a fraction.
  828.  
  829. F.     ( F: r -- )                     \ FORTH
  830.          Print the f-p number in "F" format (the integer part, a decimal
  831.          point, and the fractional part).  There are #PLACES of decimals
  832.          printed in the fractional part.
  833.  
  834. E.R0   ( #dec #cols -- )               \ FORTH
  835.          An auxillary function used to print a formatted floating point
  836.          zero under E.R .
  837.  
  838. E.R#   ( F: r -- ; #dec -- )           \ FORTH
  839.          Print a formatted floating point number using the exponential
  840.          format using #dec number of significant decimal places.  A leading
  841.          minus sign, a decimal point, the exponential part, and a terminal
  842.          space are also printed.
  843.  
  844. E.R    ( F: r -- ; #dec #col -- )      \ FORTH
  845.          Print a formatted floating point number in exponental format
  846.          using #dec number of decimal places in an area #col wide.  The
  847.          width includes a terminal space (unless the magnitude of the
  848.          exponent is greater than 99).
  849.  
  850. F.R0    ( #dec   #col -- )             \ FORTH
  851.          Print a floating point zero in the fractional format.  Use
  852.          #dec decimal places in #col columns.
  853.  
  854. F.R+-   ( -- addr )                    \ FORTH
  855.          A variable that holds the sign of a floating point number
  856.          for printing.
  857.  
  858. F.R#INT   ( -- addr )                  \ FORTH
  859.          A variable for temporary storage.
  860.  
  861. (F.R)    ( |r| #dec   #col -- +frac #dec )   \ FORTH
  862.          An auxillary function used in  F.R .
  863.  
  864. F.R   ( F: r -- ; #dec #col -- )       \ FORTH
  865.          Display a floating point number in fractional format in a 
  866.          field #col wide and #dec decimal places of accuracy.
  867.  
  868. FDEPTH   ( -- n )                      \ FORTH
  869.          Put the depth of the floating point stack on the parameter
  870.          stack.
  871.  
  872. .FS    ( -- )                          \ FORTH
  873.          Display the floating point stack without dropping the values.
  874.  
  875. ROUND    ( F: r -- ; -- d )            \ FORTH
  876.          Convert a floating point number to a double integer, rounding
  877.          toward 0.
  878.  
  879. IFLOAT    ( F: -- r ; n -- )           \ FORTH
  880.          Convert a single precision integer to a floating point number.
  881.  
  882. R>N    ( F: r -- ; -- n )              \ FORTH
  883.          Convert a floating point number to a single integer, rounding
  884.          toward zero.
  885.  
  886. F2DUP    ( F: r1 r2 -- r1 r2 r1 r2 )   \ FORTH
  887.          Similiar to 2DUP for the floating point stack.
  888.  
  889. FMOD    ( F: r1 r2 -- r3 )             \ FORTH
  890.          Returns the remainder after dividing r1 by r2.
  891.  
  892. F,   ( F: r -- )                       \ FORTH
  893.         Emplace the floating point number at the end of the dictionary.
  894.  
  895. FARRAY   ( Comp:  rn ... r1 r0 n+1 -- ) ( Run:  k -- rk_addr)  \ FORTH
  896.         Create an array of floating point numbers.
  897.  
  898. ?FSTACK   ( -- )                       \ FORTH
  899.         Checks the floating point stack for overflow or underflow.  An
  900.         ABORT" error message is printed for either case.  The NPU status
  901.         is checked for "Invalid Operation", and an appropriate message
  902.         is displayed if relevant.
  903.  
  904. FR   ( -- addr )                       \ FORTH
  905.          Returns the address of a buffer used to hold a copy of
  906.          the NPU stack and envirnment.  Used for debugging.
  907.  
  908. FFILL   ( -- )                         \ FORTH
  909.          Clears the NPU, and sets all the bits in the NPU stack.
  910.          Used for debugging only.
  911.  
  912. FR.   ( -- )                           \ FORTH
  913.          Displays the NPU environment, the NPU stack, and the
  914.          current virtual stack values.  Used for debugging only.
  915.  
  916.