@MISC{Ertl93aportable, author = {M. Anton Ertl}, title = {A Portable Forth Engine}, year = {1993} }
Bookmark
OpenURL
Abstract
. The Forth engine discussed in this paper is written in GNU C, which provides several extensions that are important for Forth implementation. The indirect threaded Forth engine is completely machine-independent, direct threading requires a few machine-specific lines for each machine. Using a portable language like GNU C encourages producing an engine with many primitives. In order to make the development of primitives easier and less error-prone, an automatic tool generates most of the code for a Forth primitive from the stack effect notation, even if the TOS is kept in a register. The engine is combined with the parts of the system written in Forth by loading a machine-independent image file that contains the executable Forth code in relocatable form. 1 Introduction When it became clear what the ANS Forth standard document would look like, a number of people on ForthNet expressed concerns that the standard would be too weak. They wanted a model-based standard, not an abstract progra...