Forth Programmer's Handbook

A detailed, technical Forth manual for experienced programmers

Forth programming manual

What readers say
about the 3rd edition

"Your succinct and clear organization — 'Just the facts ma'am' — is incredibly useful for someone who has a programming skillset, just not in Forth. Each and every one of my questions about memory organization, file management, strings and the like has been answered."

—Jeff Byron

"It's a great book. I enjoyed and profited from reading it cover to cover. At the same time, it will serve well by providing easy access to those tidbits of language and programming information you need, when you need them."

—Daniel B. Wright

Every serious Forth programmer — and everyone who wants to be one — needs this Forth book! Forth Programmer's Handbook goes far beyond the popular introductory text Starting Forth. It provides the detail needed to truly master this powerful language. Forth Programmer's Handbook is for programmers and engineers using ANS Forth systems such as SwiftForth™ for writing Windows apps and SwiftX™ for developing embedded systems.

The Handbook is intended for readers with a programming background but not necessarily prior experience with Forth. Offering comprehensive coverage of all major aspects of the Forth language — from basic principles to advanced concepts — the Handbook has become the de facto Forth reference manual for Forth programmers everywhere. This edition covers nearly 400 ANS Forth words and common extensions.*

CONTENTS: Forth Programmer's Handbook

Forth Language Features
Forth Operating System Features
The Forth Assembler
Documentation and Programmer Aids
Interactive Programming — an Example
Forth Fundamentals
Stack Operations
Arithmetic and Logical Operations
Memory and Data Storage
String Handling
General String Topics
Strings in Definitions
Strings in Data Structures
String Management Operations
Comparing Character Strings
Number Conversions
Structured Programming
Controlling Program Flow
Comparison and Testing Operations
Indefinite Loops
Counting (Finite) Loops
Finite vs. Indefinite Loops
Case Statement
Nesting Structures
Nesting and Un-nesting Structures and Definitions
System Functions
Vectored Execution
System Environment
Exception Handling
Serial I/O
File-Based Disk Access
Time and Timing Functions
Dynamic Memory Management
Floating Point
The Forth Interpreter and Compiler
The Text Interpreter
Defining Words
Compiling Words and Literals
Compiler Directives
Word Lists
Forth Cross-compilers
Issues in Cross Development
Host and Target Roles and Functions
Managing Scopes
Data Space Management
Interactive Programming
I/O Drivers for Embedded Systems
Programming Style and Editing Standards
FORTH, Inc. Editing Standards
Open Firmware Coding Style
Wong's Rules for Readable Forth
Naming Conventions
Glossary & Notation
Blocks for Disk Storage
General Index
Index to Forth Words

*About the 3rd edition: Forth Programmer's Handbook was extensively revised and updated to reflect contemporary practice. Nearly 50 pages were added, including enhanced descriptions of many features and new topics such as Forth cross compilers. This edition was released in September 2007.

About the Authors

Forth Programmer's Handbook was written by Elizabeth D. Rather and Edward K. Conklin, two of the founders of FORTH, Inc. Authors Conklin and Rather have been involved with Forth since its inception at the National Radio Astronomy Observatory. Elizabeth Rather was the chair of the Technical Committee that produced the ANSI Standard for Forth in 1994.