home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / forth / compiler / f83 / tutor / tutor.doc < prev   
Text File  |  1987-06-28  |  13KB  |  266 lines

  1.  
  2.  
  3.  
  4.                             F83 TUTOR
  5.                                by
  6.                            BILL KIBLER
  7.                          (c) 1986, 1987
  8.  
  9.  
  10.  
  11. INTRODUCTION
  12.  
  13. F83  TUTOR  is a self paced tutorial for the public domain  Forth 
  14. program F83. F83 is a Forth based operating system and programing 
  15. language.  This  version contains the standard word set Forth-83 
  16. making  the program structure different from previous  standards. 
  17. Major  changes between F83 and older versions of Forth  (FIG  AND 
  18. 79) make it necessary for all users,  both users new to Forth and 
  19. FIG or Forth-79 users, to study and understand these differences. 
  20. This program,  TUTOR,  will help new users of F83 learn to use it 
  21. more efficiently and faster. 
  22.  
  23. The  "CHAPTERS" are organized with the understanding that a  user 
  24. will have a copy of "STARTING FORTH" by Leo Brodie.  Each chapter 
  25. consists of a GLOSSARY,  LIST OF TERMS, and TEXT ( in that order) 
  26. based on the books organization.  Enough text is provided to  get 
  27. an understanding of the topic and the book should not be required 
  28. by  experienced Forth programmers.  Experienced programmers  will 
  29. find the GLOSSARY section to be the most important aspect of this 
  30. program.  The  program is based on the F83 word set and not those 
  31. of FIG or Forth-79.
  32.  
  33. TUTOR is very easy to use and can be modified to add more  infor
  34. mation  or scanning functions.  Experienced Forth programmers can 
  35. use this program by entering the following:
  36.           A>F83
  37.           OPEN TUTOR.BLK  
  38.           1 LOAD
  39. Use the space bar to scan through the screens of information, and 
  40. then  choose  a chapter to start your review.  For novice or  new 
  41. users  of Forth a more detailed introduction follows in the  next 
  42. section.
  43.  
  44. GETTING STARTED
  45.  
  46. Forth  is  both a programming language and  a  operating  system. 
  47. TUTOR  is a simple F83 tutorial consisting of "WORDS" that handle 
  48. the  information and tutorial screens based on the book  "STARING 
  49. FORTH".  All  new or novice users should use this book,  as  they 
  50. will find the tutor text information to be too brief for  develo
  51. ping  a good understanding of Forth.  The screens of  information 
  52. will help you understand Forth and will help point out the diffe
  53. rence  between  F83  and the FIRST EDITION of the  book.  As  you 
  54. follow  through  the screens you will notice that  some  glossary 
  55. words will be different from those in the book,  these  represent 
  56. the  new  word set as specified in the Forth-83  standard.  Those 
  57. readers  using the SECOND EDITION of "STARTING FORTH"  will  find 
  58. tutor to be an on disk review of the book.
  59.  
  60. To  better  understand this program an introduction to Forth  and 
  61. its  structure  is needed.  Forth is a stack  oriented  language. 
  62. Values  are  placed on the stack and then WORDS  are  entered  to 
  63. perform actions on these values. The most simple use would be the 
  64. addition  of  two numbers.  To add the numbers 4 and 7 you  would 
  65. enter 4 7 + . and Forth would return 11 ok. Considerable problems 
  66. occur  for new Forth users over the use of text type  symbols  to 
  67. represent  words or commands.  The sample used a .  to denote the 
  68. command  to  print  the top item of the stack  on  the  computers 
  69. screen.  In displaying information about Forth it is very hard in 
  70. a document to prevent confusion between Forth WORDS and the  text 
  71. used  to display them.  Until you can know which words are  Forth 
  72. WORDS  and  which are text words,  reference to the text book  is 
  73. needed.  The book puts a block around each word when described in 
  74. the text, an option not available on all computer systems.
  75.  
  76. This problem of variations in computer  systems and languages has 
  77. been handled by the FORTH INTEREST GROUP in respect to Forth. The 
  78. term  FIG  Forth refers to an early set of Forth WORDS  that  the 
  79. interest  group  established as the first standard Forth  system. 
  80. The  next  standards  meeting  in  1979  made  some  changes  and 
  81. established a new Forth standard called Forth-79.  The latest and 
  82. one that this tutorial is intended to help is the 1983  standards 
  83. meeting version,  this word  set is called Forth-83.  The program 
  84. this  tutorial is for is F83 which is a public domain version  of 
  85. Forth containing the Forth-83 word set.
  86.  
  87. Although  a  few  words  have been changed  between  standards  a 
  88. considerable  amount of similarity exists between the  standards. 
  89. F83  is very popular because of its cost and  utilities contained 
  90. within  the  program.  F83  contains not only the  normal  screen 
  91. editor and assembler, but also debugger, disassembler, and multi-
  92. tasker  utilities.  There are many commercial and  public  domain 
  93. versions of Forth,  in fact there is a version of Forth available 
  94. for  almost  all  the  operating systems  and  computer  hardware 
  95. systems currently being produced.  Forth is a  small,  fast,  and 
  96. extensible  operating environment.   It has been used in numerous 
  97. special  applications,  such as space vehicles,  where speed  and 
  98. reliability are major concerns. The extensible nature of Forth is 
  99. its most important aspect.
  100.  
  101. LOADING TUTOR AND EXTENSIONS
  102.  
  103. The  Forth  system can be stand-alone or work within an  existing 
  104. operating system.  All Forths store information in SCREENS  which 
  105. are  1K in size ( 1024 bytes).  When a screen is displayed it can 
  106. consist of 60 characters across and 16 lines down ( one character 
  107. is  equal to one byte of information).  The F83 operating  system 
  108. stores  the  screens  on disk as BLOCKS of data (1  screen  is  1 
  109. block).  Typically the file name will have an extension of BLK to 
  110. indicate  Forth  information.  The  TUTOR program  is  stored  as 
  111. "TUTOR.BLK" on most systems. Starting F83 would be done by typing 
  112. F83 at the system prompt and using "RETURN"  on most MSDOS or CPM 
  113. systems. 
  114.  
  115. To load the TUTOR program after starting F83, the file must first 
  116. be OPENED,  you do this by typing "OPEN TUTOR.BLK" and a  return. 
  117. Next  it is necessary to LOAD the Forth extensions which are used 
  118. by  the TUTOR program.  You type  "1 LOAD" and return, this  will 
  119. start the TUTOR program and give you more information about  F83. 
  120. Should your system be different or you are new to computers,  you 
  121. may  need to review and use programs supplied by the system manu
  122. facturer until you understand and feel comfortable with your  new 
  123. computer.  Some  versions of F83 use different words to open  and 
  124. load files (due to operating system designs), check with your own 
  125. documentation on specific instructions.
  126.  
  127. The   "1 LOAD" command loads screen 1 into memory and then starts 
  128. compiling the new word definitions contained in it.  These  words 
  129. are extensions to the orginal F83 word set.  After being compiled 
  130. they  are part of the Forth DICTIONARY and can be used as if they 
  131. were part of the original program. This ability to add words  and 
  132. EXTEND  the dictionary is the source of the term "extensibility". 
  133. Programs  are  created  by  extending  the  dictionary  with  new 
  134. functions  and routines. The TUTORS new words are contained in  4 
  135. of the first 10 screens and can be changed should you desire some 
  136. special way of handling the tutor screens.
  137.  
  138. TUTOR WORDS
  139.  
  140. The new words are:
  141.  
  142. HELP      Loads the information about the tutor program and 
  143.           general F83 words. The last screen lists words used by           
  144.           tutor and relating to "STARTING FORTH".
  145.  
  146. START-TUTOR   Will start displaying the introduction to tutorial 
  147.               information.
  148.  
  149. REPT      This command will display screens from the beginning 
  150.           of the most recent chapter or group of screens. If CHP1 
  151.           had been entered and you exited the listings to try a 
  152.           F83 operation REPT will restarted at the first screen 
  153.           of CHP1.
  154.  
  155. GET       GET will start displaying screens at the next one in 
  156.           sequence. Using REPTs sample, if you had typed GET 
  157.           instead of REPT you would get displayed the next screen           
  158.           of information in CHP1.
  159.  
  160. 21 TUTOR  Typing this will start displaying tutor screens 
  161.           starting with screen 21 and continuing till the screen 
  162.           contains $$. When you type CHP1 this word loads the 
  163.           number of the first screen of chapter 1  on the stack 
  164.           and then goes to TUTOR.
  165.  
  166. PRTSCR    This word will display the current GET and REPT 
  167.           pointers.
  168.  
  169. LIST      Forths normal internal word for displaying screens of 
  170.           information. Use this word whenever you want to view a 
  171.           single screen. TUTOR uses a modified version of LIST 
  172.           for displaying multiple screens.
  173.  
  174. 10 90 INDEX    Use this input command line to get a list oF 
  175.                "INDEX" lines (line 0 and NOT printed by tutor) of 
  176.                screens 10 through 90 (the text screens). Line 0 
  177.                is generally used as a descriptive line of what 
  178.                the screen contains.
  179.  
  180. ESC       Using the ESCAPE key will end the display of 
  181.           information, so that you can then tryout some of what 
  182.           you just learned in the text.
  183.  
  184.  
  185. ADVANCED INFORMATION
  186.  
  187. TUTOR uses most of the normal F83 words to perform its functions. 
  188. A  major advantage of the tutor program is to retain easy  access 
  189. to  the  normal F83 functions.  The tutor program will display  a 
  190. series of screens starting with glossary information. Experienced 
  191. programmers will find this part most helpful in learning the  new 
  192. F83 words.  When finished displaying text screens, the F83 prompt 
  193. "ok" will indicate completion of the lesson.  At this point  any 
  194. F83  commands can be used.  Individual screens can be repeated by 
  195. using the list function.
  196.  
  197. A  number  of blank screens have been provided at the end of  the 
  198. program  for use during the learning sessions.  As new words  are 
  199. created  in the lesson,  they can be saved in these screens  and 
  200. auto loaded by adding "nn LOAD" to screen 5 (nn being first  used 
  201. screen).  To  tie screens together use --> and F83 will  continue 
  202. loading the next screen.
  203.  
  204. For  educators  and programmers,  they will find TUTOR to  be  an 
  205. excellent  example of how to create a tutorial program in  Forth. 
  206. It  is very hard to create a tutorial program in which  the  user 
  207. has  enough control over the training structure that it can  meet 
  208. their  needs adequately.  Most users of tutorials get  frustrated 
  209. when  they can not exit or reenter the program at  will.  Usually 
  210. lacking in tutorials is the ability to add sorting of information 
  211. or  the creation of summary details.  Forth appears to handle all 
  212. these  problems easily. Once the user understands Forths  use  of 
  213. words it is possible to customize the tutorial for their personal 
  214. needs.  An example of this would be the creation of a new word to 
  215. keep  track of exiting and saving the screens pointers  to  disk. 
  216. When  returning,  the user would type RESTART and the disk stored 
  217. pointers would be restored,  and the next screen would be  loaded 
  218. for viewing.
  219.  
  220. Although  not  shown  here,  interactive  uses  of  training  are 
  221. possible. Forth has numerous words to allow for trapping of input 
  222. data  and evaluating this information for correct  response.  The 
  223. use of screens provides a simple way of grouping information such 
  224. that  a  student who misses a concept (as found through  testing, 
  225. see  screen  39)  could  be directed  back  to  that  information 
  226. automatically. A new feature in F83 is the use of SHADOW screens. 
  227. These  screens are from the original file UTILITY.BLK of F83  and 
  228. contain  the  authors  comments on words in the  source  screens. 
  229. Words  are  available  to toggle between these  screens  and  the 
  230. source  screens.  Use of this feature may be helpful in  tutorial 
  231. programs,  where  background or detailed discussions outside  the 
  232. normal flow of instruction is needed.
  233.  
  234. CONCLUSION
  235.  
  236. The  creation  of  this  program was two  fold;  to  show  Forths 
  237. abilities  in  creating  tutorials,   and  to  provide  on   disk 
  238. information about F83. This project was part of a masters program 
  239. in Computers and Education.  This is by no means a complete study 
  240. of  using Forth for tutorials, of F83, or Forth.  I have released 
  241. this version of TUTOR.BLK into public domain solely to help those 
  242. who have had problems getting to understand the new words of F83. 
  243. One  reason I feel that Forth has had problems being accepted  is 
  244. the  lack  of tutorials accompanying new releases.  When I  first 
  245. tried  F83,  I found the on disk documentation to be  inadequate. 
  246. Although the use of shadow screens is an improvement, they do not 
  247. equal the benefits of a good tutorial or disk based glossary. 
  248.  
  249. I am interested in your comments concerning this program and  any 
  250. information  that  could make it better.  My  time  currently  is 
  251. limited  and thus I can only take written queries.  I retain  all 
  252. commercial rights to the screens 1 through 10,  as they represent 
  253. the  idea  behind the tutorial,  as well as the information  con
  254. tained  within  the  text  screens  not  directly  attributed  to 
  255. "STARTING  FORTH" by Leo Brodie.  I am available  for  commercial 
  256. activities  and would be willing to assist in developing  commer
  257. cial tutorials.
  258.  
  259.           Bill Kibler
  260.           Kibler Electronics
  261.           PO BOX 487
  262.           Cedarville, CA 96104
  263.  
  264. I  do  use  the  Sacramento Micro Users Group RBBS  and  can  get 
  265. messages there: 300/1200 24 hrs (916)722-9337
  266.