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 the gforth executable used by gforthmi for creating the base images. It should be a double indirect threaded system. Default: gforth-ditc.
  • GFORTH โ€” gives the gforth executable used by gforthmi for computing the relocatable image from the base images. Default: gforth.
  • GFORTHHIST โ€” gives the location of the history file used by gforth to 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 default gforth.fi.
  • --path path, -p path โ€” uses path for searching the image file and Forth source code files instead of the default in the environment variable GFORTHPATH or the path specified at installation time (typically /usr/local/lib/gforth:.. A path is given as a :-separated list.
  • --dictionary-size size, -m size โ€” allocate size space for the Forth dictionary space instead of using the default specified in the image (typically 256K). The size specification consists of an integer and a unit (e.g., 4M). The unit can be one of b (bytes), e (element size, in this case Cells), k (kilobytes), and M (Megabytes). If no unit is specified, e is used.
  • --data-stack-size size, -d size โ€” allocate size space for the data stack instead of using the default specified in the image (typically 16K).
  • --return-stack-size size, -r size โ€” allocate size space for the return stack instead of using the default specified in the image (typically 16K).
  • --fp-stack-size size, -f size โ€” allocate size space for the floating point stack instead of using the default specified in the image (typically 16K). In this case the unit specifier e refers to floating point numbers.
  • --locals-stack-size size, -l size โ€” allocate size space for the locals stack instead of using the default specified in the image (typically 16K).
  • --evaluate forth, -e forth โ€” evaluates the forth code. 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 bye to 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 with makedoc.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 ๐Ÿซถ