Programming in Forth - rosco-pc/propeller-wiki GitHub Wiki
Sal Sanci has revised SpinForth and posted PropForth. There is a spin template that appended with forth definitions. The spin file is loaded into eeprom as any spin program. After that, the propeller can support any serial terminal (teraterm was used successfully). The forth dictionary can be extended in ram using standard colon definitions. The RAM image can be resaved to eeprom using the prop specific "saveforth" word. New definitions are added at the end, redefinitions of words hide old definitions. Eventually, it becomes advantageous to re-generate the propforth image. The spinmaker word causes the prop to generate a new version of the forth source text which can then be copied and pasted into the propforth-template.spin file. This allows the Propeller Tool to resolve any forward references in the forth source code without the use of defered words. Regenerating the propforth.spin image alse recovers dictionary space lost to redifined words, as spinamaker only finds and uses the most recent definition for each word. There is a software logic analyzer extension which can use 1 cog to sample all the i/o pins at a rate of 40 or more clocks, or uses four cogs to sample all the pins every clock. There is default support for the forth software cooperative multitasking round robin, which transfers control from task to task using the pause word. There is also an assembler multitasker that occurs between forth words. This permits very frequent access to whatever needs very frequent access. Since this has an impact on the speed of execution on the core, the assembler time slicer can be made to run on a specific core, and has no effect on the others. The documentation is being revised for clarity. The order of the topics addressed is driven by questions that are asked. The project can be found at http://code.google.com/p/propforth/
A very fast and very small Forth byte code interpreter from Peter Jakacki Parallax Forum
Cliffe Biffle has created an open source complete Forth development system for the Propeller, called PropellerForth. If you are not familiar with what Forth is about, its basically a programming language and development environment that runs entirely on the Propeller. You do not need a PC to program your Propeller board (Prop Demo, Hydra supported) anymore. Once you use the Propeller Tool to upload the single binary image all your other development tasks are performed on the Propeller directly. Simply plug in a keyboard, hook up a TV, and off you go! I was a little confused a while back about what Forth is really about, so the best analogy I can give would be: It's like an open programmable dynamic "operating system" that can be modified on the fly, in real-time, while the system is running.
Your best bet is to go download this rather amazing peice of work, and install it on your Propeller system. More information and links to file downloads available on the PropellerForth homepage.
It's important to note that this system is complete and ready to run right now. At the time this page was created, they were at version 8.01.
On 8 August 2008, Carl Jacobs introduced a commercial Forth to Spin compiler for the Propeller, called JDForth. In contrast to PropellerForth (and most other Forths), this Forth is able to co-exist with Spin in the Propeller.
- JDForth allows for the easy inclusion of propeller assembly words. These words may be either linked at compile time, or dynamically included at run time.
- JDForth has words to support 32-bit floating point in IEEE-754 compliant format.
The details of JDForth - as well as purchasing information - can be found at the JDForth homepage.
JDForth was announced on the Parallax Forum.