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 is published under the GNU Public License v3 (GPL). A commercial use is possible but for traditional commercial uses there are commercial Forths — amForth just is not one of them.

AmForth runs completely on the controller. It does not need additional hardware. It makes no restrictions for hardware extensions that can be connected to the controller. The default command prompt is in a serial terminal.

The command language is Forth. AmForth implements an almost compatible Forth 2012 indirect threading 16bit Forth.

AmForth for the AVR8 needs 8 to 12 KB Flash memory, 80 bytes EEPROM, and 200 bytes RAM for the core system. A similar code for the MSP430 fits into 8KB flash. The MSP430 info flash is used for similar purposes as the EEPROM for the AVR8 platform.

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(MSP430): New device MSP430F5529. See Texas Instruments LaunchPad 430.
  • core(MSP430): Extended VM Register A. See Extended VM
  • lib(ALL): Fix regressions in Rdefer and does>. Make quotations more robust in corner cases.

6.9.2015: release 6.0

  • core(ALL): Fix a few regressions like the TAB handling in accept.
  • core(AVR8): Fix forth-wordlist to return a valid wordlist id.
  • core(MSP430): many small changes to bring it closer to the AVR8. Still fits into 8KB flash.
    • global variables like DP (HERE), STATE, HLD etc instead of USER variables-
    • Same USER area layout. Including deferred words for terminal IO.
    • complete wordlist support including search order and current.
    • Emulate AVR EEPROM configuration with a info flash segment. Needs save to store the data permantly.
    • Lots of common code, optimized versions of standard words if applicable.
    • preparing for more MSP430 device types.

9.7.2015: release 5.9

  • lib: for and next. The i and j can be used as well.
  • core(AVR8): clear all RAM at cold.
  • core(MSP430): DEFER and VALUE were missing in release 5.8. pause and turnkey using them (RAM based, save-able to info flash).
  • core(All): ' uses the recognizer stack.
  • core(ALL): Fix regression in literal (broke e.g. quotations)

25.3.2015: release 5.8

  • core(MSP430): new :noname and the defer and value groups of commands.
  • core(All): words with the same name do the same (mostly).
  • core(AVR8): introduce <builds. Together with does> saves one flash erase cycle and makes the source work on the MSP430 as well.

1.2.2015: release 5.7

  • 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.