AmForth is an easily extendible command interpreter for the Atmel AVR8 Atmega micro controller family and some variants of the TI MSP430. It has a turnkey feature for embedded use too.
AmForth runs completely on the controller. It does not need additional hardware beyond a power supply. It makes no restrictions for hardware extensions that can be connected to the controller.
The interpreter has a command prompt in a serial terminal. Other connections like TCP/IP telnet or radio links are possible.
AmForth is published under the GNU Public License v3 (GPL).
AmForth needs 8 to 12 KB Flash memory, 80 bytes EEPROM, and 200 bytes RAM for the core system.
Karl Lunt has written an excellent User’s Manual on how to start and work with AmForth. For those who want to take a deeper look into the system is the Technical Guide. The whole documentation is available as PDF and EPUB.
Leon made a very good intro into amforth and his floating point library on youtube. Worth watching!
RecognizersThe goal of a recognizer is to dynamically extent the Forth command interpreter and make it understand and handle new data formats as well as new synatax's. The present, 2nd generation recognizers achieve this by generalizing the classic interpreter with an API to factor the components. Recognizers are portable across different forth's. Recognizers are not a new concept for forth. They have been discussed earlier.
- compgroups.net/comp.lang.forth/additional-recognizers/734676 in 2003.
- Number Parsing Hooks in 2007.
- Recent developments were presented at the Euroforth conference 2012.
- First Generation is an all in one implementation.
- Second Generation describes the factored component approach.
Work In Progress¶
Here you’ll find things that are not yet released but will be part of the next release. See the code section at Sourceforge to get the most recent sources
- core(ALL): name>interpret and name>compile added. New Recognizer rec:name able to replace rec:word. Uses name tokens (Forth 2012) instead of execution tokens.
- core(ALL): Lots of bugfixes and regressions. The AVR port should be fully usable again.
- core(MSP430): restructure of the init process: cold now transfers the data from INFO flash back to RAM if BASE is set and SAVE was executed. That way the user code now correctly survives a restart. SAVE is much like marker that overwrites the previous state and gets no name.
22.12.2014: release 5.6¶
- core(AVR): icompare got the same return flag semantics as compare. The leave and ?do forward branches are now resolved at compile time, saves one cell per loop on the return stack at runtime.
- core(AVR): interrupt vectors are moved from RAM to EEPROM. Saves RAM space and simplifies turnkey actions (remove any int! from your turnkey!)
- core: re-arranged source files: controller specific and common code.
- New architecture: MSP430 (G2553) as used in the Texas Instruments LaunchPad 430 with code from Camelforth and 4€4th.
- core: generalized existing Configuration Stacks in EEPROM into map-stack, get-stack and set-stack. Used for the search order and recognizer stacks.
- all: changed license to GPLv3.