Overview

kForth is a simple Forth programming language and environment. It implements a subset of the ANSI Forth specification, along with some extensions. kForth can serve as a standalone computing environment or its object code may be interfaced to another program to serve as a customizable programming language for that application. In fact, the kForth virtual machine is used to evaluate expressions for the program XYPLOT.

Some of kForth's features are:


The notation for stack diagrams in this document is as follows:

aaddress
nsingle integer value
bboolean flag (-1 or 0)
fdouble precision floating point value
^strcounted string


Installation under Linux

  1. As root user, create a directory for kforth under /usr/local/src, e.g.

    mkdir /usr/local/src/kforth


    and move the archive file kflnx10.tar.gz into this directory,

    mv kflnx10.tar.gz /usr/local/src/kforth


  2. Change to the kforth source directory,

    cd /usr/local/src/kforth


    and extract the source files using the command

    tar -zxvf kflnx10.tar.gz


  3. Along with the extracted source files, there will also be a Makefile in the directory. Type

    make


    to generate the executable. The GNU assembler, C, and C++ compilers must be installed on your system.

  4. The executable, named kforth will be generated. Move the executable to the directory /usr/local/bin in order to put it in a path available to users,

    mv kforth /usr/local/bin


  5. Sample source code files are included in the archive. These files have extension .4th. Users may copy the example programs to their own directories.



Next