1GForth(1) General Commands Manual GForth(1)
2
3
4
6 gforth, gforth-fast, gforthmi - a fast and portable Forth system
7
9 gforth [initialization options] [image-specific options] gforth-fast
10 [initialization options] [image-specific options]
11
12 gforthmi filename [initialization options] [image-specific options]
13
15 GForth is a fast and portable implementation of the Forth programming
16 language. For details read the manual.
17
19 GFORTHPATH contains the search path for source and image files.
20
21 GFORTHD gives the gforth executable used by gforthmi for creating the
22 base images. It should be a double indirect threaded system. Default:
23 gforth-ditc.
24
25 GFORTH gives the gforth executable used by gforthmi for computing the
26 relocatable image from the base images. Default: gforth.
27
28 GFORTHHIST gives the location of the history file used by gforth to
29 allow command-line recall. Default: $HOME. (The history file is named
30 .gforth-history).
31
32
34 gforth
35
36 starts the system and goes into interactive mode.
37
38 gforth file1 file2 -e bye
39
40 loads and interprets the files file1 and file2, then exits.
41
42 gforth-fast
43
44 is the same as gforth, except that it does not support accurate back‐
45 traces for signals, and is faster by up to a factor of 2. Use it for
46 debugged, performance-critical programs such as benchmarks.
47
48 gforthmi asm.fi -m 1M asm.fs
49
50 creates an image asm.fi that has a default dictionary size of 1MB and
51 has the file asm.fs loaded.
52
53
55 --help
56 Lists the available options, including some not described here (see
57 also the manual).
58
59 --image-file file
60 Loads the Forth image
61 file instead of the default gforth.fi.
62
63 --path path
64 Uses path for searching the image file and Forth source code files
65 instead of the default in the environment variable GFORTHPATH or
66 the path specified at installation time (typically
67 /usr/local/lib/gforth:.. A path is given as a :-separated list.
68
69 --dictionary-size size
70 Allocate
71 size space for the Forth dictionary space instead of using the
72 default specified in the image (typically 256K). The size speci‐
73 fication consists of an integer and a unit (e.g., 4M). The unit
74 can be one of b (bytes), e (element size, in this case Cells), k
75 (kilobytes), and M (Megabytes). If no unit is specified, e is
76 used.
77
78 --data-stack-size size
79 Allocate
80 size space for the data stack instead of using the default spec‐
81 ified in the image (typically 16K).
82
83 --return-stack-size size
84 Allocate
85 size space for the return stack instead of using the default
86 specified in the image (typically 16K).
87
88 --fp-stack-size size
89 Allocate
90 size space for the floating point stack instead of using the
91 default specified in the image (typically 16K). In this case the
92 unit specifier e refers to floating point numbers.
93
94 --locals-stack-size size
95 Allocate
96 size space for the locals stack instead of using the default
97 specified in the image (typically 16K).
98
99
100 --evaluate forth
101 Evaluates the
102 forth code. This option takes only one argument; if you want to
103 evaluate more Forth words, you have to quote them or use several
104 -es. To exit after processing the command line (instead of
105 entering interactive mode) append -e bye to the command line.
106 This is an image-specific option of the default image.
107
109 .../gforth.fi default Forth image
110 *.fi Forth loadable image
111 *.fs Forth source (sequential)
112 *.fb Forth source (block)
113 *.fd generated with makedoc.fs
114 *.i C include files
115 *.ds documentation source
116 *TAGS etags files
117
119 The Gforth manual - available in hypertext (Info, HTML) and printable
120 (TeX, PS, ASCII) forms.
121
122 The ANSI document X3.215-1994 (i.e., the ANS Forth standard).
123
124 More information on Gforth (e.g., pointers to new versions, to the man‐
125 ual on the WWW and to papers about Gforth) is available through
126 http://www.complang.tuwien.ac.at/projects/forth.html.
127
129 Gforth was written by Anton Ertl, Bernd Paysan, Jens Wilke and others.
130
131
132
133 April 14, 1999 GForth(1)