Saturday, 20 March 2010

Threaded Interpretive Languages by R. G. Loeliger

Threaded Interpretive Languages by R. G. Loeliger
In Threaded Interpretive Languages, Loeliger explores the design and implementation of TILs in an individual quirky style.  Programs in a threaded language typically compiles to a list of subroutine calls or addresses. Loeliger focuses on Forth-like threaded languages and provides examples in Z80 assembly language.

After the standard introductory chapter the book gets straight down to the implementation details, first dealing with the design of the dictionary format, inner and outer interpreters.  This is followed by example code for the interpreters and assembly language definitions for 170 of the most common subroutines.

Later chapters investigate some common extensions to TILs including virtual memory and floating point numbers. A section is devoted to assemblers and includes code for a structured Z80 assembler.

Threaded Interpretive Languages contains the most in-depth examination of Forth internals I've seen. However the age of the books shows in the dialect of Forth used and the systems described. Despite this, I'd still recommend Threaded Interpretive Languages to anyone planning to implement a minimal Forth.