Chapter 3. Forth/Open Firmware

Verbum sat sapienti

At the beginning of this book, I said I would talk about hardware, not software. There are many good books already written on C programming, embedded firmware development in C, porting Linux, coding in Python, writing Java software, and so on. However, there is one software topic that is rare, and chances are you may not happen upon it or become exposed to it. And that is a pity, because for the hardware developer, this topic can be very important. It is the programming language, Forth. So, I will break with the general "stuff you can kick" theme of this book to give you an overview of this important language.

Introducing Forth

Forth was originally written by Charles (Chuck) Moore (http://www.colorforth.com/bio.html) in 1970 to control the 30 ft telescope at the Kitt Peak Observatory. When he created Forth, Charles Moore envisioned that the "fourth" generation of computers would be distributed controllers, in essence embedded systems, although that term had not yet been invented. Hence, he called his programming language "Fourth." However, since the machine that was used for development allowed only five-character filenames, the programming language became simply Forth. The name has stuck ever since.

Forth is unlike any other conventional programming language (although there are some vague similarities to Adobe's PostScript). Forth is an extensible, highly interactive, stack-based language. It is extremely efficient and ...

Get Designing Embedded Hardware, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.