Main Menu

Starting FORTH — Online Edition

Starting Forth, the Forth language tutorial, is shared freely here in its official online edition. Updates to the original text include code examples that run on iForth and SwiftForth systems. Aficionados (and detractors) of the original book’s illustrations will find most of them restored in this edition by FORTH, Inc.

Continue to the book…

“…I hope this book is not so easy and enjoyable that it seems trivial. Be warned that there is heavy content here and that you can learn much about computers and compilers as well as about programming.”

Charles Moore, Forth’s inventor

“A Forth to be reckoned with…”

Leo Brodie, Author

About the book

Starting FORTH has been the classic Forth tutorial and textbook since its first release. Many experienced programmers have commented on its concise utility and completeness. Beginners will find a carefully planned introduction to the Forth programming language that will prepare them for other books like Forth Application Techniques and Forth Programmer’s Handbook.

FORTH, Inc. and the book’s author, Leo Brodie, thank the global community for its continued enthusiasm for this book. Many have sought a new copy, a used copy, or have asked for a reprinting. It is our pleasure to now present this online edition, with great appreciation for work done by Marcel Hendrix to generate a web version on which these pages were based.

Notes about this online edition

Changes made by FORTH, Inc. to Marcel’s version were primarily related to internet coding standards and visual presentation. We also restored the book’s original illustrations here, in most cases. The following notes are also relevant and important to those familiar with the original edition.

Notes by Marcel Hendrix

This transcript is not an exact reproduction. Forth code has been ANSified. All code should run on, at least iForth. Where necessary, statements that were valid in 1981 have been exchanged with statements more appropriate for 2003 (when this tribute was written)….

I have assumed a 32-bit, byte-addressing Forth with 8-bit characters. The address returned by WORD is assumed to be HERE. This allows the common trick of ALLOTing length of str CHARS after using WORD in order to compile string str to memory. Multitasking issues are ignored (e.g. no >TYPE, just TYPE). Division is symmetric, not floored, and two’s complement is assumed throughout. iForth works splendidly with it, but other Forths will work too. Chapter 7 exploits extended uses of number conversion. Most Forths are broken in this respect, but iForth and SwiftForth support these neat features.

Continue to the book…