Forth Language
Forth is ideal for real-time control, instrumentation, and data analysis. Its simple yet powerful structure allows the interpreter and compiler to reside on the target microcontroller hardware, giving you the ability to interactively define new routines and immediately execute and debug them. This leads to an iterative programming style involving rapid definition, testing, and redefinition of small, modular routines tailored to your application. Using the Mosaic IDE (Integrated Development Environment), you edit your code on your PC and download it to the microcontroller board.
There is an ANSI X3.215-1994 standard for the Forth language1). QED-Forth is a powerful superset of the ANSI Forth language, developed by Mosaic Industries. It provides an interactive compiler, in-line assembler and symbolic debugger right on the Mosaic Controller. So as soon as you receive the controller of your choice you can plug it into the serial port of any PC or terminal and start programming.
In QED-Forth, parameters are passed between routines on a data stack. Stack-based parameter passing speeds program execution and unifies Forth syntax. All arithmetic, logical, I/O, and decision operators remove required data from the stack and leave their results on the stack. This leads to "postfix" syntax, with the operation being called after the data is placed on the stack.
QED-Forth includes familiar program flow and control structures to simplify the coding of your program. These include:
DO ... LOOP DO ... +LOOP BEGIN ... WHILE ... REPEAT BEGIN ... UNTIL BEGIN ... AGAIN CASE ... ENDCASE FOR ... NEXT IF ... ENDIF IF ... ELSE ... ENDIF
These flexible program flow structures make it easy to implement any mathematical or logical algorithm.
Forth tutorials
You can find excellent introductions to Forth on the following sites:
- Online edition of Starting FORTH by Leo Brodie
Versions of Forth
Kernel Version 4
The version 4 kernel is used on the following products:
It is also used by legacy products including the Handheld Controller, QVGA Controller, and QED-Flash Board.
There are two separate flavors of Forth running on the version 4 kernel:
Kernel Version 6
The version 6 Kernel is our latest and greatest software. It has a simplified memory map, and runs on our newest products, the PDQ Board and PDQ Board Lite.
Using Forth
This namespace contains the following pages to help get you started using the QED-Forth.
—-
See also → Single Board Computers