is an interactive 16-bit stand-alone forth for MSP430.
Albert Nijhof & Willem Ouwerkerk
Last update 22 april 2016
You can put the noForth image on a Launchpad
and then program the chip using any serial terminal.
is functionally equivalent to
the previous version (noForth 1210, october 2012).
We made noForth still more robust and we made some space saving
internal changes: the kernel takes less space and
compiling a program is more space efficient now.
This is nice especially for the smaller 16kB processors.
Why C,V ?
Because noForth C,V comes in two variants:
- noForth C, Compact, for the smaller 16kB flash processors.
- noForth V, with Vocabularies, for larger flash memories.
noForth C can be used in the larger flash memories
noForth V in the smaller ones.
To get an idea of the differences between C and V,
see noforth cv words.pdf
"Low Power" noForths are marked with a dash: noForth C- or noForth V-.
There is an adapted noForth for several processors and boards.
Which noForth for which board?
consists of about 50 elementary examples of hardware control
with noForth on the MSP430.
In each example you find a file with forth code, documentation
and links to more information on the internet.
- Low Power noForth for MSP430G2553 boards.
In Low Power noForth all 'wait-loops' are replaced with 'sleep-until-interrupted'
which relatively saves a lot of energy.
Low power noForth is marked with a dash:
noForth C- and noForth V-.
- noForth for msp-exp430fr5969 experimenter board
- noForth for MSP430G2553 egel kit
(for details see 'noforth(c,v)documentation.html' below, under 'Files')
- GIE> >GIE ROUTINE (see noForth documentation)
GIE-bit in status register is now saved and restored correctly around flashwriting.
- (* Nestable multi line comment sign
Both (* and the closing *) must be the first word on a line!
- Assembler words
BIX and BIA (aliases for XOR> and AND>)
0=? and 0<>? (aliases for =? and <>?)
- Extended memory: X@ X! XC@ and XC! for MSP-EXP430FR5969
- The word NOFORTH 'forgets' all added code so that only the kernel is left.
This word is renamed to NOFORTH\ .
- The multiply functions use the hardware multiplier if present.
- The meta compiler files are cleaned up and (should) run now on 32 bit
and on 64 bit standard forth systems.
Some internal improvements and introduction of ADR
value prefix that provides the address where the value is stored in RAM.
Apart from the binary files the following files are adapted:
- noforth c-tools.f
- noforth v-tools.f
- noforth metacompiler
The only visible change is in noForth C:
From now on the inside words (hidden auxiliary words) can be found with
still shows only the inside words
shows all words other than the inside words.
The words INSIDE TICK FIND-ALL
are no longer needed;
they are removed from noForth C and withdrawn from these files:
- noforth c-tools.f
- noforth c more standard words.f
- noforth metacompiler.zip
- A smart terminal (e4thcom) may use ACK/NAK in the communication with noForth.
In that case the highest bit in the value OK must be set:
OK HX 8000 OR to OK FREEZE
ACK (06) → noForth is ready to receive a new line.
NAK (15) → noForth is ready to receive a new line (but there was an error).
- New noForth names: '.0' (or '.1') denotes that UART0 (or UART1) is used for the terminal.
Four answered questions about noForth
How do I get noForth in the ...
What do I need to get my program compiled in noForth?
noForth receives the text, translates it into code and compiles that in flashrom.
You need a simple communication program which is able
to send text to noForth on the chip.
(Teraterm for Windows, CoolTerm for OS X,
e4thcom for Linux, ... )
Baud rate 9600 -
data 8 bit -
parity none -
stop 1 bit -
flow control none -
transmit delay: 0 ms/char, 100 ms/line
Will compiled code stay in flashrom after a power off/on?
No, unless you have sent the command
Is it possible to erase 'frozen' code?
Yes. Executing a MARKER or a SHIELD erases the code that is compiled after it.
Before you start:
Since noForth compiles in FlashROM,
it is unavoidable that some words don't behave exactly as the standard prescribes.
We tried, without restricting the programming freedom, to minimize
the aberrations from the standard. This concerns:
HERE ALLOT ! C! +! MOVE (only RAM) , C, (only ROM) and CREATE
This noForth software
is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This software is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
noForth is written 'from scratch'
- Floored division
- With decompiler
- CATCH and THROW
- With meta compiler
- Fast FIND (eight threads)
- KEY KEY? and EMIT are vectored
- Adjustable prompt, for extra information
- VALUE with prefixes TO +TO and INCR
- Missing core words are available as source
- Assembler and disassembler available as source
- Also an external assembler aux430ass.f (in Win32forth)
- Forget-functions (MARKER and SHIELD) do not spill Flash memory
- When an error occurs while loading a file, noForth will ignore the rest of the file
How to make a turnkey system
' <my-application> TO APP FREEZE
(Put the application token in the value APP and type FREEZE)
The execution of the APP vector can be bypassed with a switch.