Forth Tutorial
November 10, 1987
TO: All People interested in the FORTH computer language.
FROM: Jack W. Brown,
BCIT Mathematics Department. 3700 Willingdon Avenue Burnaby B.C. V5G 3H2 Phone 434-5734 local 5401. BBS Phone 434-5886.
If you would like to know more about the FORTH computer language, please readon, otherwise perhaps you might be kind enough to pass this information on toa friend or colleague.
I am offering, through the Mathematics Department (BCIT Continuing Education),two courses covering various aspects of the FORTH computer language. These courses will cover the full range of skills required to use FORTH to solve substantial real world problems. FORTH is the rising star in a group of High Tech programming languages that include LISP and C. The courses are currently titled:
MATH 495 Introduction to the FORTH Programming Language. Starting date: Monday September 14, 1987.
MATH 496 Inside FORTH 83. Starting date: Wednesday September 17, 1987.
If you would like to learn forth on your own, the file LEARN4TH.ARC in file area #2 has a modified version of the Laxen and Perry F83 with a super editor. Also inclued is the actual notes and examples used in MATH 495, Introduction to the FORTH Programming Language. Get a copy of Starting FORTH by Brodie and enjoy. The best way to learn FORTH is from a live teacher!! I have 6 years of experience with the FORTH language on 6502, 8086, and 68000 CPU's. I would love to have you attend my FORTH classes at B.C.I.T. Below is a directory of the LEARN4TH.ARC file
- Number input and editing words
- Mode-less full feature text editor
* On line HELP systemsee SAMPLE1.
* DOSEDIT style forth input line editor
* Polynomial properties application
* Tutorial on Recursion
* Examples and notes for lecture # 1Words, In and Out, Simple programs, VEDITor, HELP system.
Stack manipulation, Area & volume calculations, Tables.
Number display, Logicals and conditionals, Numeric input.
Interval logic, return stack, variables constants arrays.
* Examples for lecture number five.
Fixed and floatin point, fractions scaling, rounding
* There is no 6. This was a test night.
- Examples for lecture number seven.
Strings, IF ELSE THEN, BEGIN WHILE REPEAT, CASE statement.
* Examples for lecture number eight.
Dictionary structure, vocabularies, recursion.
* Examples for lecture number nine
Compiler extension... CREATE DOES> line editor.
* Examples for lecture number ten
Making use of virtual memory.
* Examples for Lecture Number 11
Multi tasking.
* There is no 12.
No sample final exams are provided.
Here is some interesting information on the FORTH Language.
WHERE IS FORTH USED?
FORTH is used in video games, operating systems, real-time process control, word processing, spread sheet programs, business packages, database management systems, robotics control, high speed data acquisition, artificial intelligence programs, and for engineering and scientific calculations.
WHY IS FORTH USED?
The reason is best stated by Charles H. Moore, the inventor of FORTH:
„FORTH provides a natural means of communication between man and the smart machines he is surrounding himself with . . . . I cannot imagine a better language for writing programs, expressing algorithms, or understanding computers“. From the forward of Starting FORTH by Brodie.
WHAT IS FORTH?
- FORTH is conversational like APL LISP or BASIC.
- FORTH is compilable with many high-level language structured programming constructs such as IF … ELSE … THEN, BEGIN … WHILE … REPEAT, BEGIN … UNTIL, DO … LOOP, CASE … ENDCASE.
- FORTH exhibits performance very close to that of machine coded program equivalents, yet it is a high level language.
- FORTH is completely written in itself and you are given the complete source code for the language.
- FORTH places no barriers among combinations of system, compiler, or application code.
- FORTH includes an integrated, user-controlled virtual memory system with dynamic allocation of resources for both program source text and data files.
- FORTH includes an integrated full feature machine code assembler with built in high level language structured programming constructs, like those mentioned above, for use in the assembler!
- FORTH can be extended to include new commands written in terms of any previously existing commands or in machine code using the integrated assembler.
- FORTH permits easy user extension of existing data types and data structures.
- FORTH is easily debugged- application program modules can be incrementally compiled tested and debugged interpretively.
- FORTH spans the power of most other programming languages including assembly language, FORTRAN, Pascal, C, and LISP.
- FORTH is transportable- applications can be run easily on many different micro-computers, even those with different CPU's.
- FORTH produces completely relocatable object modules with code more compact than native machine language assembly code.
STILL NOT CONVINCED?
Take any of the above FORTH courses and receive a copy of Laxen & Perry's public domain FORTH83 system (free!). You have nothing to loose!