GForth(1)
โจ NAME โจ
okay bestie, welcome to the GForth(1) page from the General Commands Manual ๐ this is all about gforth, gforth-fast, and gforthmi โ a fast and portable Forth system. periodt. ๐
๐ธ SYNOPSIS ๐ธ
no cap, here's how you call them:
gforth [initialization options] [image-specific options] gforth-fast
[initialization options] [image-specific options]
gforthmi filename [initialization options] [image-specific options]
๐ฆ DESCRIPTION ๐ฆ
GForth is literally a fast and portable implementation of the Forth programming language. For details read the manual. iykyk ๐โจ
๐ ENVIRONMENT VARIABLES ๐
these env vars are the main characters:
GFORTHPATHโ contains the search path for source and image files.GFORTHDโ gives thegforthexecutable used bygforthmifor creating the base images. It should be a double indirect threaded system. Default:gforth-ditc.GFORTHโ gives thegforthexecutable used bygforthmifor computing the relocatable image from the base images. Default:gforth.GFORTHHISTโ gives the location of the history file used bygforthto allow command-line recall. Default:$HOME. (The history file is named.gforth-history).
๐ EXAMPLES ๐
let's get into the examples, bestie:
gforth
starts the system and goes into interactive mode. ๐ฎ
gforth file1 file2 -e bye
loads and interprets the files file1 and file2, then exits. bye bestie ๐
gforth-fast
is the same as gforth, except that it does not support accurate backtraces for signals, and is faster by up to a factor of 2. Use it for debugged, performance-critical programs such as benchmarks. ๐ฅ
gforthmi asm.fi -m 1M asm.fs
creates an image asm.fi that has a default dictionary size of 1MB and has the file asm.fs loaded. โจ
๐ OPTIONS ๐
the options are giving main character energy, no cap:
--help,-hโ lists the available options, including some not described here (see also the manual).--image-file file,-i fileโ loads the Forth image file instead of the defaultgforth.fi.--path path,-p pathโ usespathfor searching the image file and Forth source code files instead of the default in the environment variableGFORTHPATHor the path specified at installation time (typically/usr/local/lib/gforth:..A path is given as a:-separated list.--dictionary-size size,-m sizeโ allocatesizespace for the Forth dictionary space instead of using the default specified in the image (typically256K). Thesizespecification consists of an integer and a unit (e.g.,4M). The unit can be one ofb(bytes),e(element size, in this case Cells),k(kilobytes), andM(Megabytes). If no unit is specified,eis used.--data-stack-size size,-d sizeโ allocatesizespace for the data stack instead of using the default specified in the image (typically16K).--return-stack-size size,-r sizeโ allocatesizespace for the return stack instead of using the default specified in the image (typically16K).--fp-stack-size size,-f sizeโ allocatesizespace for the floating point stack instead of using the default specified in the image (typically16K). In this case the unit specifiererefers to floating point numbers.--locals-stack-size size,-l sizeโ allocatesizespace for the locals stack instead of using the default specified in the image (typically16K).--evaluate forth,-e forthโ evaluates theforthcode. This option takes only one argument; if you want to evaluate more Forth words, you have to quote them or use several -es. To exit after processing the command line (instead of entering interactive mode) append-e byeto the command line. This is an image-specific option of the default image.
๐ FILES ๐
.../gforth.fiโ default Forth image*.fiโ Forth loadable image*.fsโ Forth source (sequential)*.fbโ Forth source (block)*.fdโ generated withmakedoc.fs*.iโ C include files*.dsโ documentation source*TAGSโ etags files
๐ SEE ALSO ๐
- The Gforth manual - available in hypertext (Info, HTML) and printable (TeX, PS, ASCII) forms.
- The ANSI document
X3.215-1994(i.e., the ANS Forth standard). - More information on Gforth (e.g., pointers to new versions, to the manual on the WWW and to papers about Gforth) is available through
http://www.complang.tuwien.ac.at/projects/forth.html.
๐ AUTHORS ๐
Gforth was written by Anton Ertl, Bernd Paysan, Jens Wilke and others. ๐
mwah ๐ this page is from April 14, 1999, and it's GForth(1). stay slay, bestie ๐ซถ
๐ฆ where this page comes from
- debian bookworm: gforth 0.7.3+dfsg-9+b3 ยท GPL-3.0-or-later
- ubuntu jammy: gforth 0.7.3+dfsg-9build4.1 ยท GPL-3.0-or-later
- ubuntu noble: gforth 0.7.3+dfsg-9build4.1 ยท GPL-3.0-or-later
- ubuntu resolute: gforth 0.7.3+dfsg-9build4.1 ยท GPL-3.0-or-later
- ubuntu stonking: gforth 0.7.3+dfsg-10 ยท GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms