Forth

Forth on RPi

Start the Forth interpreter with ./atlast and exit with Ctrl-D

atlast.html and atlast.pdf is included and an is an extensive atlast-forth manual. Read it online and read about Forth itself here  (Beware that the Forth dialect in the book Starting Forth is a bit outdated compared to Atlast Forth).

Adding new words
Most of the power of Atlast derives from the ease with which C coded primitives can be added to the language. It is easy to add your own words, just add a "define GERTBOARD" to atlast.c around line 56. In my case I will add some words for controlling my Gertboard. I will leave it as a skeleton until I've done the implementation myself. If you can't wait there is a detailed description on how to do this in the atlast-forth manual. And you can copy much of the word implementations from the gertboard_sw directory if you have downloaded the gertboard demo files.

Then add your own word definitions at the end of the section with word definitions, around line 2704, right after #endif /* COMPILERW */ in atlast.c

And finally, add the actual words to the Table of primitive words, right after #endif /* EVALUATE */ at line 2960 or so.

Now, save and run "make" again to recompile atlast.c.