home *** CD-ROM | disk | FTP | other *** search
-
-
-
- F83 TUTOR
- by
- BILL KIBLER
- (c) 1986, 1987
-
-
-
- INTRODUCTION
-
- F83 TUTOR is a self paced tutorial for the public domain Forth
- program F83. F83 is a Forth based operating system and programing
- language. This version contains the standard word set Forth-83
- making the program structure different from previous standards.
- Major changes between F83 and older versions of Forth (FIG AND
- 79) make it necessary for all users, both users new to Forth and
- FIG or Forth-79 users, to study and understand these differences.
- This program, TUTOR, will help new users of F83 learn to use it
- more efficiently and faster.
-
- The "CHAPTERS" are organized with the understanding that a user
- will have a copy of "STARTING FORTH" by Leo Brodie. Each chapter
- consists of a GLOSSARY, LIST OF TERMS, and TEXT ( in that order)
- based on the books organization. Enough text is provided to get
- an understanding of the topic and the book should not be required
- by experienced Forth programmers. Experienced programmers will
- find the GLOSSARY section to be the most important aspect of this
- program. The program is based on the F83 word set and not those
- of FIG or Forth-79.
-
- TUTOR is very easy to use and can be modified to add more infor
- mation or scanning functions. Experienced Forth programmers can
- use this program by entering the following:
- A>F83
- OPEN TUTOR.BLK
- 1 LOAD
- Use the space bar to scan through the screens of information, and
- then choose a chapter to start your review. For novice or new
- users of Forth a more detailed introduction follows in the next
- section.
-
- GETTING STARTED
-
- Forth is both a programming language and a operating system.
- TUTOR is a simple F83 tutorial consisting of "WORDS" that handle
- the information and tutorial screens based on the book "STARING
- FORTH". All new or novice users should use this book, as they
- will find the tutor text information to be too brief for develo
- ping a good understanding of Forth. The screens of information
- will help you understand Forth and will help point out the diffe
- rence between F83 and the FIRST EDITION of the book. As you
- follow through the screens you will notice that some glossary
- words will be different from those in the book, these represent
- the new word set as specified in the Forth-83 standard. Those
- readers using the SECOND EDITION of "STARTING FORTH" will find
- tutor to be an on disk review of the book.
-
- To better understand this program an introduction to Forth and
- its structure is needed. Forth is a stack oriented language.
- Values are placed on the stack and then WORDS are entered to
- perform actions on these values. The most simple use would be the
- addition of two numbers. To add the numbers 4 and 7 you would
- enter 4 7 + . and Forth would return 11 ok. Considerable problems
- occur for new Forth users over the use of text type symbols to
- represent words or commands. The sample used a . to denote the
- command to print the top item of the stack on the computers
- screen. In displaying information about Forth it is very hard in
- a document to prevent confusion between Forth WORDS and the text
- used to display them. Until you can know which words are Forth
- WORDS and which are text words, reference to the text book is
- needed. The book puts a block around each word when described in
- the text, an option not available on all computer systems.
-
- This problem of variations in computer systems and languages has
- been handled by the FORTH INTEREST GROUP in respect to Forth. The
- term FIG Forth refers to an early set of Forth WORDS that the
- interest group established as the first standard Forth system.
- The next standards meeting in 1979 made some changes and
- established a new Forth standard called Forth-79. The latest and
- one that this tutorial is intended to help is the 1983 standards
- meeting version, this word set is called Forth-83. The program
- this tutorial is for is F83 which is a public domain version of
- Forth containing the Forth-83 word set.
-
- Although a few words have been changed between standards a
- considerable amount of similarity exists between the standards.
- F83 is very popular because of its cost and utilities contained
- within the program. F83 contains not only the normal screen
- editor and assembler, but also debugger, disassembler, and multi-
- tasker utilities. There are many commercial and public domain
- versions of Forth, in fact there is a version of Forth available
- for almost all the operating systems and computer hardware
- systems currently being produced. Forth is a small, fast, and
- extensible operating environment. It has been used in numerous
- special applications, such as space vehicles, where speed and
- reliability are major concerns. The extensible nature of Forth is
- its most important aspect.
-
- LOADING TUTOR AND EXTENSIONS
-
- The Forth system can be stand-alone or work within an existing
- operating system. All Forths store information in SCREENS which
- are 1K in size ( 1024 bytes). When a screen is displayed it can
- consist of 60 characters across and 16 lines down ( one character
- is equal to one byte of information). The F83 operating system
- stores the screens on disk as BLOCKS of data (1 screen is 1
- block). Typically the file name will have an extension of BLK to
- indicate Forth information. The TUTOR program is stored as
- "TUTOR.BLK" on most systems. Starting F83 would be done by typing
- F83 at the system prompt and using "RETURN" on most MSDOS or CPM
- systems.
-
- To load the TUTOR program after starting F83, the file must first
- be OPENED, you do this by typing "OPEN TUTOR.BLK" and a return.
- Next it is necessary to LOAD the Forth extensions which are used
- by the TUTOR program. You type "1 LOAD" and return, this will
- start the TUTOR program and give you more information about F83.
- Should your system be different or you are new to computers, you
- may need to review and use programs supplied by the system manu
- facturer until you understand and feel comfortable with your new
- computer. Some versions of F83 use different words to open and
- load files (due to operating system designs), check with your own
- documentation on specific instructions.
-
- The "1 LOAD" command loads screen 1 into memory and then starts
- compiling the new word definitions contained in it. These words
- are extensions to the orginal F83 word set. After being compiled
- they are part of the Forth DICTIONARY and can be used as if they
- were part of the original program. This ability to add words and
- EXTEND the dictionary is the source of the term "extensibility".
- Programs are created by extending the dictionary with new
- functions and routines. The TUTORS new words are contained in 4
- of the first 10 screens and can be changed should you desire some
- special way of handling the tutor screens.
-
- TUTOR WORDS
-
- The new words are:
-
- HELP Loads the information about the tutor program and
- general F83 words. The last screen lists words used by
- tutor and relating to "STARTING FORTH".
-
- START-TUTOR Will start displaying the introduction to tutorial
- information.
-
- REPT This command will display screens from the beginning
- of the most recent chapter or group of screens. If CHP1
- had been entered and you exited the listings to try a
- F83 operation REPT will restarted at the first screen
- of CHP1.
-
- GET GET will start displaying screens at the next one in
- sequence. Using REPTs sample, if you had typed GET
- instead of REPT you would get displayed the next screen
- of information in CHP1.
-
- 21 TUTOR Typing this will start displaying tutor screens
- starting with screen 21 and continuing till the screen
- contains $$. When you type CHP1 this word loads the
- number of the first screen of chapter 1 on the stack
- and then goes to TUTOR.
-
- PRTSCR This word will display the current GET and REPT
- pointers.
-
- LIST Forths normal internal word for displaying screens of
- information. Use this word whenever you want to view a
- single screen. TUTOR uses a modified version of LIST
- for displaying multiple screens.
-
- 10 90 INDEX Use this input command line to get a list oF
- "INDEX" lines (line 0 and NOT printed by tutor) of
- screens 10 through 90 (the text screens). Line 0
- is generally used as a descriptive line of what
- the screen contains.
-
- ESC Using the ESCAPE key will end the display of
- information, so that you can then tryout some of what
- you just learned in the text.
-
-
- ADVANCED INFORMATION
-
- TUTOR uses most of the normal F83 words to perform its functions.
- A major advantage of the tutor program is to retain easy access
- to the normal F83 functions. The tutor program will display a
- series of screens starting with glossary information. Experienced
- programmers will find this part most helpful in learning the new
- F83 words. When finished displaying text screens, the F83 prompt
- "ok" will indicate completion of the lesson. At this point any
- F83 commands can be used. Individual screens can be repeated by
- using the list function.
-
- A number of blank screens have been provided at the end of the
- program for use during the learning sessions. As new words are
- created in the lesson, they can be saved in these screens and
- auto loaded by adding "nn LOAD" to screen 5 (nn being first used
- screen). To tie screens together use --> and F83 will continue
- loading the next screen.
-
- For educators and programmers, they will find TUTOR to be an
- excellent example of how to create a tutorial program in Forth.
- It is very hard to create a tutorial program in which the user
- has enough control over the training structure that it can meet
- their needs adequately. Most users of tutorials get frustrated
- when they can not exit or reenter the program at will. Usually
- lacking in tutorials is the ability to add sorting of information
- or the creation of summary details. Forth appears to handle all
- these problems easily. Once the user understands Forths use of
- words it is possible to customize the tutorial for their personal
- needs. An example of this would be the creation of a new word to
- keep track of exiting and saving the screens pointers to disk.
- When returning, the user would type RESTART and the disk stored
- pointers would be restored, and the next screen would be loaded
- for viewing.
-
- Although not shown here, interactive uses of training are
- possible. Forth has numerous words to allow for trapping of input
- data and evaluating this information for correct response. The
- use of screens provides a simple way of grouping information such
- that a student who misses a concept (as found through testing,
- see screen 39) could be directed back to that information
- automatically. A new feature in F83 is the use of SHADOW screens.
- These screens are from the original file UTILITY.BLK of F83 and
- contain the authors comments on words in the source screens.
- Words are available to toggle between these screens and the
- source screens. Use of this feature may be helpful in tutorial
- programs, where background or detailed discussions outside the
- normal flow of instruction is needed.
-
- CONCLUSION
-
- The creation of this program was two fold; to show Forths
- abilities in creating tutorials, and to provide on disk
- information about F83. This project was part of a masters program
- in Computers and Education. This is by no means a complete study
- of using Forth for tutorials, of F83, or Forth. I have released
- this version of TUTOR.BLK into public domain solely to help those
- who have had problems getting to understand the new words of F83.
- One reason I feel that Forth has had problems being accepted is
- the lack of tutorials accompanying new releases. When I first
- tried F83, I found the on disk documentation to be inadequate.
- Although the use of shadow screens is an improvement, they do not
- equal the benefits of a good tutorial or disk based glossary.
-
- I am interested in your comments concerning this program and any
- information that could make it better. My time currently is
- limited and thus I can only take written queries. I retain all
- commercial rights to the screens 1 through 10, as they represent
- the idea behind the tutorial, as well as the information con
- tained within the text screens not directly attributed to
- "STARTING FORTH" by Leo Brodie. I am available for commercial
- activities and would be willing to assist in developing commer
- cial tutorials.
-
- Bill Kibler
- Kibler Electronics
- PO BOX 487
- Cedarville, CA 96104
-
- I do use the Sacramento Micro Users Group RBBS and can get
- messages there: 300/1200 24 hrs (916)722-9337