home *** CD-ROM | disk | FTP | other *** search
/ Dream 48 / Amiga_Dream_48.iso / Atari / forth / forst.zoo / forst / bulletin.doc next >
Text File  |  1990-12-10  |  7KB  |  168 lines

  1.                         OUTLINE OF THE ForST PACKAGE
  2.  
  3.  
  4. Note
  5.  
  6. A greater level of detail on the use of ForST is provided in the
  7. associated file FORST.DOC.  A listing of the user-available words
  8. is in WORDS.LST, and a glossary of unusual words in GLOSSARY.LST.
  9.  
  10.         
  11. General
  12.  
  13. The present version of ForST is placed in the public domain for
  14. non-profit use.  This includes the object files and assembly source
  15. files used to generate it.  The origin of the files must be 
  16. acknowledged at all times.
  17.  
  18. ForST is written for the Atari ST, any version, with any number of
  19. drives and (preferably) a monochrome monitor.  The assembly source
  20. code, suitable for DevPac ST2 assembler, has been modularised to
  21. simplify porting to other 68000 systems.
  22.  
  23. It is a 32-bit, position-independent, subroutine-threaded system with
  24. macro expansion and two-edged peephole optimisation.  Compiled code
  25. is at least as good as that from other ST compilers (eg, 100 iterations
  26. of the Sieve in just over 25 seconds).
  27.  
  28. Separated headers are used, which can selectively be removed.  Local
  29. and register variables are available, adding significantly to the
  30. efficiency of the compiled code and to the source readability.  No
  31. assembler is included, as it is not really necessary and detracts from
  32. the portability of code.  Using register primitives, much the same
  33. result can be obtained.
  34.  
  35. An illustrative library is provided, including a floating point package.
  36.  
  37.  
  38. Assembly source
  39.  
  40. The details of the use of these source files (in SOURCE directory)
  41. is given in FORST.DOC.  Using DevPac ST2, they are sufficient for
  42. reassembly of the entire system.  The top-level file (FORST.S) is
  43. little more than a list of INCLUDEs of other files.  User-available
  44. words have names starting with an underscore.
  45.  
  46. GLOBALS.S: system macros and equates.  These should be looked at in
  47.   conjunction with VARS.S, which contains all the system variables
  48.   and system message.  Note that, in all these files, only the
  49.   headers are in the data section; code and variables in the code
  50.   section; and the stacks, dictionary and header space in the bss.
  51.  
  52. STRTFIN.S: routines for reserving and freeing memory, and for
  53.   initialisation of registers.
  54.     
  55. SHELL.S: the outermost level of contact with the user, and includes
  56.   INTERPRET, WORD, FIND, ', FORGET and related words.  INTERPRET
  57.   uses the interface routines in ACTIONS.S
  58.   
  59. ACTIONS.S: directs execution and compilation.  It also includes the
  60.   error handlers.
  61.   
  62. COMPILE.S: a very complex file with all the code for compilation of
  63.   subroutine calls, expansion of macros, optimisation and keeping
  64.   track of the number of edges on the stack.  Also included are the
  65.   words for structured control (IF, ELSE, WHILE, etc).
  66.   
  67. ALLMACS.S:  all the ForST code macros which can be expanded.  These are
  68.   not all optimal in isolation, but appear the best compromise for edge
  69.   optimisation.  Compare the high-level ForST code in the file REGS.S.
  70.   Note the headers of the fetch, store and NOT words.  These words are
  71.   IMMEDIATE, and their smart code is in EXTEND.S.
  72.   
  73. HEADS.S:  I have already changed the header structure once, and may want
  74.   to do so again.  All the words that know about the detailed header
  75.   structure are in this file, to simplify maintenance.  Look at them
  76.   in conjunction with the macros in GLOBALS.S and the ForST file WHAT.S.
  77.   
  78. BMATHS.S: rudimentary maths definitions, to permit customised versions
  79.   of higher-level words to be written in high-level code.  Complementary
  80.   to MATHS.S, which has the main maths words.  Remember that many of the
  81.   maths words are VECTORed (see the top of the assembly file SHELL.S.)
  82.  
  83. VARS.S:  the system variables and buffers.  Note that addresses are
  84.   always stored as offsets relative to the pointer in register A5.  This
  85.   point is enlarged in FORST.DOC.
  86.   
  87. IO.S:  character I/O and the routines for redirection.  Uses GETC and
  88.   PUTC, which are in FILES.S.
  89.   
  90. EXPECT.S:  expect has evolved over the months and, for flexibility, now
  91.   uses RE_EXPECT in this file.  It is used by _QUERY in SHELL.S.
  92.   
  93. FILES.S:  the file-related I/O, including the relevant routines of
  94.   GEMDOS (TOS).  Included are words for SAVEing and RUNing files.  High-
  95.   level file words are in the ForST file UTIL.S.
  96.   
  97. MEMORY.S:  familiar words for accessing memory and stack, including
  98.   CMOVE, etc.
  99.  
  100. GEMDOS.S:  non-file operating system words.
  101.  
  102. BIOS.S:  lower-level operating system words.
  103.  
  104. GEM.S:  rudimentary words for interfacing with the GEM environment (a
  105.   very complex business).
  106.   
  107. VT52:  terminal emulator which drives the ST screen in non-gem mode
  108.   and permits cursor control, scrolling, etc through escape sequences.
  109.  
  110. EXTEND.S: extensions of compilation to allow local and register
  111.   variables, and smart versions of fetch and store words, and NOT,
  112.   to improve compiled code.  Rather heavy going - and it illustrates
  113.   how complex things can get when you try to improve on the simple
  114.   Forth compiler.
  115.   
  116.  
  117. Executable files
  118.  
  119. FORST.TOS:  obtained from assembling FORST.S.
  120.  
  121. FORSTX.S:  an enhancement of this, as described in FORST.DOC.
  122.  
  123. Either of these can be run from the desktop, simply by double-
  124. clicking on it.
  125.  
  126.  
  127. ForST library files
  128.  
  129. These are in the LIB directory, and are included to illustrate
  130. extended Forth (ForST) style.  They are placed in the public
  131. domain with sole requirement that their authorship be acknowledged.
  132.  
  133. ANOTHER.S:  word to make another complete copy (code and head)
  134.   of a suitable system word. (It will have a length entry in its
  135.   header and must not have any external calls or PC-relative
  136.   memory references.)
  137.     
  138. APPSKEL.S:  skeleton code to illustrate the construction of
  139.   completely free-standing application code.  This is supported by
  140.   the files APPUTILS.S, APPFILIN.S, STRUTIL.S, CONIN.S, CONOUT.S
  141.   AND CONIO.S.
  142.    
  143. DUMP.S:  word to give a hex dump of a disk file.
  144.   
  145. EXPECT.S:  high-level definition of a simple expect, which can be
  146.   installed into ForST, as described in FORST.DOC.
  147.     
  148. LDFLOATS.S:  load file for FLOATS.S, FPIN.S, FPOUT.S, TRIG.S and
  149.   VECTORS.S, to provide the vectorable real number handling in
  150.   FORSTX.TOS.
  151.     
  152. INTDOT.S and INTOUT.S:  high-level code for integer output.
  153.   
  154. REDIR.S:  words for I/O redirection, described in FORST.DOC.
  155.  
  156. REGS.S:  examples of primitive words written with direct register
  157.   access.
  158.   
  159. SIEVER.S:  version of the Sieve benchmark, using register variables.
  160.   
  161. UTIL.S:  utilities package, including interface words for operating system,
  162.   file utilities and Forth words like WORDS and MACWORDS.
  163.   
  164. WHAT.S:  word to analyse a header and report on the type of word.
  165.     Illustrates access to the different header fields.  Can be made
  166.     much more elegant, but it works.
  167.  
  168.