Forth is a stack-based computer programming language and programming environment.

One advantage of Forth and Interpreted Languages such as Arduino Basic over the Development Tools Arduino IDE (C++ language) is that Forth can be used as a shell to interactively execute commands, gradually grow a program, and immediately test subroutines by running them directly.

Currently Forth is the only programming language that compiles and runs on the Arduino. I.e., the Forth compiler is currently the only compiler that runs in the ATmega328 on the Arduino. (The Arduino C++ compiler runs on a laptop or other "big" computer).

FIXME: review the following Forth implementations, and indicate which ones are highly experimental and only useful to people interested in writing compilers, and which ones are stable enough to be usable for people who want to write Forth code for the Arduino.

In no particular order:

"AmForth" Example: "Arduino Hello World with AmForth". An Adafruit discussion forum. GPL.

"FlashForth also works on the popular Arduino boards." GPL.

"FINF Is Not Forth". GPL. discussion: "FORTH environment for Arduino... Called FINF (FINF Is Not Forth)"

"328eForth for Arduino" (has a comparison of the differences between AmForth and 328eForth).

"SVFIG: We have a number of Forth systems for the Arduino Uno board."

"YAFFA: Yet Another Forth For Arduino" via YAFFA discussion. GPL.

avrforth

"PFAVR -- An ANS Forth Implementation for the Atmel AVR". Andrew Sterian. GPL. requires 13Kwords of FLASH (the ATmega328 has 32 KB Flash) and 32Kbytes of external RAM. (Would a Spi RAM work?).

(Wasn't there another Forth for the Arduino that is missing from this list?)

Share