home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / a293_1 / !AForth_Docs_!ReadMe1st < prev    next >
Encoding:
Text File  |  1993-04-13  |  11.5 KB  |  164 lines

  1.  
  2. AForth Introduction Manual
  3.  
  4.  
  5. AForth is an ANS standard Forth system for the Acorn RISCOS computers. This file is the first of a collection of files containing the documentation for AForth.
  6.  
  7. If you are an experienced Forth user/programmer you can skip directly to the section 'Documentation Overview' below. This will explain where to find relevant information on specific issues, such that you can start programming as soon as possible.
  8.  
  9.  
  10. Contents ______________________________________________________________________
  11.  
  12. Copyright Notice, Disclaimer and Addresses
  13. Features of AForth
  14. Overview of ANS Forth
  15. Documentation Overview
  16. Brief History of Forth
  17. Finding Out More About Forth
  18.  
  19.  
  20.  
  21. Copyright Notice, Disclaimer and Addresses ____________________________________
  22.  
  23. The source code, binaries and documentation of AForth are the exclusive copyright of Mads Meisner-Jensen. AForth is Public Domain and may be freely copied, provided that all files are retained and no changes made. No charge whatsoever for this software should be made under any circumstances --- including charging for public domain discs!
  24.  
  25. All parts of AForth, including sources, binaries and documentation are used at your own risk. The author, Mads Meisner-Jensen, cannot accept any liability for any loss or damage arising from the direct or indirect use of AForth.
  26.  
  27. Any commercial use with the aim of profit of any part of this software, documentation, in part or whole is illegal without my written permission.
  28.  
  29. AForth is subject to continuos development and improvement. Therefore I am *very* pleased to receive any comments, suggestions and/or bugreports on any subject concerning AForth such as: documentation, supplied sources, implementation, future improvements etc. etc.
  30. I am sincerely interested to know how, why and when you use AForth and see some of your Forth programs. If you enclose any material (discs, papers etc.) in your mail, I cannot guarantee returning it.
  31.  
  32. I would like you to start a public domain collection of Forth source code. If you think you have made some useful Forth definitions - why not send them to me, so everybody can share your brilliant work! Likewise - if you need some Forth code and don't want to reinvent the wheel then try contact me to see if I have it in my collection.
  33.  
  34. You can contact me via electronic mail or human mail. Please no phone calls. I read my electronic mail regularly.
  35.  
  36. Mads Meisner-Jensen
  37. Valdemarsgade 6, st.tv.
  38. DK-9000 Aalborg
  39. Denmark
  40.  
  41. e-mail: mmj@vlsi-gw.vlsi.auc.dk
  42.  
  43.  
  44. ----------------
  45. Acknowledgements
  46. ----------------
  47. I would like to thank Olav Reinert for valuable discussions of AForth, his support and interest and writing of the Memory Allocation words.
  48.  
  49.  
  50.  
  51. Features of AForth ____________________________________________________________
  52.  
  53. The main features of AForth version 0.70 are:
  54.  
  55. * Direct threaded compiler, meaning fast execution - many times faster than BASIC.
  56.  
  57. * Programmed in pure machine code highly speed optimized for very fast compilation and execution (most other Forths for RISC-OS do not emphasize compilation speed!).
  58.  
  59. * Compact module holding complete kernel.
  60.  
  61. * Interfaces with RISCOS;
  62.   Any number of Tasks can be run in the Wimp.
  63.   SWIs can be accessed via the SYS and SYS# words.
  64.   Error handling compatible with RISCOS.
  65.   Double clicking on a Forth file executes it.
  66.   String creating words (C" and S") null-terminates their strings.
  67.  
  68. * ANS Basis 15 compliance. AForth includes the Core, File Access, Search Order, Memory Allocation and Error handling wordsets. Includes parts of the Core Extension, Toolkit Extension and String word sets.
  69.  
  70. * Nice handling of character strings with the words C" and S"
  71.  
  72. * File handling through the File Access wordset.
  73.  
  74. * Debugging aids and utilities provided by the Toolkit wordset.
  75.  
  76. * Elaborate error diagnostics and many debugging features.
  77.  
  78. * Forth programs in plain text files.
  79.  
  80. * Ideal for interactive on-line development and debugging
  81.  
  82. * In many ways, using this Forth implementation is quite similar to BASIC, the only difference being programming in postfix notation using Forth.
  83.  
  84.  
  85.  
  86. Overview of ANS Forth _________________________________________________________
  87.  
  88. AForth is an ANS standard Forth for the Archimedes, based on the draft proposal standard called Basis 15. It will continually be altered and improved to fulfill the ANS standard as this continues to develop.
  89.  
  90. To my knowledge, AForth is the first and only implementation of the ANS standard for Forth programming systems. The ANS standard Forth is, in my humble opinion as an enthusiastic Forth programmer, a vast improvement over previous Forth standards.
  91.  
  92. The standard enables portability over a wide range of platforms of different hardware. Especially the wordsize of various platforms have been addressed and solved by the inclusion of the concept of memory cells, a cell being the native wordsize of a platform, eg. 32 bit for the ARM processor.
  93.  
  94. The standard is a mix of common sense and practice within Forth computing as this has developed during the last 20 years. Several new Forth words have been included and old ones have been discouraged or excluded. The vocabulary has been made more consistent and developed according to the evolution of programming. The Forth vocabulary has been split into several so-called word sets, each comprising a logical collection of words dealing with a specific issue --- in effect, a kind of libraries.
  95.  
  96. Even though the ANS comittee has 'streamlined' Forth, Forth *is* still Forth; it is very fun to program (even funnier), it has the special ability to squeeze the underlying hardware and it is highly interactive, at the same time being very modularized and fast. The main features added by the standard are breifly summarized below.
  97.  
  98. Comprehensive file handling features have been included for easy interfacing with the host operating system. Forth source code can now be read and compiled from standard text files.
  99.  
  100. Floating point number handling has been added, thus eliminating one of the most debated disadvantages of Forth.
  101.  
  102. Strings are being supported by the new standard, though without explicit string operators.
  103.  
  104. Error handling has been included very consistently and beautifully, greatly enhancing application writing in Forth.
  105.  
  106. Dynamic memory allocation have been included.
  107.  
  108. Flow control words have been standardized and case statements and recursion have been added. Loop constructs have been freshened up and early termination of DO LOOPs have become tolerable.
  109.  
  110. Dictionary handling has been standardized through separation of words into logical word sets. A collection of dictionary handling words offers great diversity in customisation of dictionary searching and compiling.
  111.  
  112.  
  113.  
  114. Documentation Overview ________________________________________________________
  115.  
  116. The Docs directory contain the following files/directories:
  117.  
  118. !ReadMe1st
  119. This file. Introduction to AForth and the ANS draft proposal standard.
  120.  
  121. AForth
  122. This file explains some important points about this implementation of ANS Forth. It describes general concepts, command line options and have references of where to find other information in the documentation. An overview of the word sets and what each of them provides is given.
  123.                 
  124. Semantics
  125. This directory contains files describing the exact semantics of every word in AForth. The semantics files are for reference. Two other files reside in this directory, as described below.
  126.  
  127. Semantics.!ReadMe1st
  128. This file explains how to read the semantics files, f.ex. what the stack diagrams mean. The features of each word set is briefly listed. For the programmer wanting to build portable programs, also data type compatability and related issues are discussed.
  129.  
  130. Semantics.Words
  131. This file is an alphabetically ordered list of all the words included in AForth and the ANS standard. A reference by each word in this file tells where to find the documentation on the word.
  132.  
  133. History
  134. This file contains the revision history of AForth. It also contains suggestions of features to be included in future releases of AForth.
  135.  
  136. Internals
  137. This file contains an explanation of the inner workings of AForth including topics as compilation, execution, speed, register usage and so on. This is *only* intended for the programmer wanting to know more about how Forth works and/or squeezing more performance out of AForth.
  138.  
  139.  
  140.  
  141. Brief History of Forth ________________________________________________________
  142.  
  143. Without going into a long lecture about Forth and its history, a short note might be appropriate. Forth was invented by Charles H. Moore around 1970, where he used it to control a radio telescope in Arizona. Forth quickly gained popularity within the atronomic society, so in 1973 Moore formed Forth Inc. Later, in 1978 the Forth Interest Group (FIG) was formed by hobbyists in northern California.
  144.  
  145. Since 1977 several efforts have been made to standardize Forth. Hitherto Forth had been implemented in many different versions, each one taking advantage of the host computer architecture, thus making portation difficult. So came Forth-77, Forth-78, Forth-79 and latest Forth-83. All these standards assumed an 8-bit host computer, so when 16 and 32 bit computers became pervasive, Forth programs became even less portable. In 1986 a group of users and vendors of Forth met to investigate the feasibility of an American National Standard (ANS). The ANS team work continues, and at the time of writing, the standard has not yet been officially approved.
  146.  
  147.  
  148.  
  149. Finding Out More About Forth __________________________________________________
  150.  
  151. Neither this textfile nor any of the other textfiles supplied with AForth are learning books in programming with Forth. If you want to learn (more) about Forth you are referred to the references listed below. If you have access to UseNet, you can read the newsgroup comp.lang.forth where Forth programmers discuss Forth.
  152.  
  153. Brodie, Leo. 1981. "Starting Forth". Prentice-Hall, Englewood Cliffs, N.J.
  154. This book deals with FIG-Forth, POLY Forth and mentions the differences between these and Forth-79. This is an introductory text to Forth for the absolute beginner. No previous knowledge of computers are assumed. Easy to read with a a cheerful style and many cute drawings. Limited examples, exercises and coverage of advanced topics. Very bad index.
  155.  
  156. Brodie, Leo. 1981. "Thinking Forth". Prentice-Hall, Englewood Cliffs, N.J.
  157. The thought processes and philosophy of problem solving in Forth. Discussion of implementation with many examples, tips, style conventions and programming procedures. A very readable book for the experienced Forth programmer. This book also introduces some new words for vectored execution; DOER MAKE etc. No particular dialect of Forth is assumed but source code examples for different dialects of Forth are given when appropriate.
  158.  
  159. Kelly, Mahlon G. and Spies, Nicholas. 1986. "Forth: A Text and Reference"
  160. Prentice-Hall, Englewood Cliffs, N.J. This is a highly recommendable book for both the beginner and experienced Forth programmer. It explains Forth in depth and explains even subtle differences between Forth-79 and Forth-83 but with lots of references to MMSForth. Lots of examples and exercises. Very good coverage of advanced topics such as assembler, compiling, interpretation, dictionary structure and generally any aspect of Forth. Very good index.
  161.  
  162. De Grandis-Harrison, Richard. 1983. "Forth on the BBC Microcomputer" Acorsoft
  163. Ltd., 4a Market Hill, Cambridge, CB2 3NJ, England. This is the manual for the Acornsoft implementation of Forth-79 on the BBC microcomputer. This book is of course machine specific, but gives some ideas about how to implement a Forth on your computer. Discusses some of the advanced topics. Many examples.
  164.