-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathlina.1
189 lines (173 loc) · 6.16 KB
/
lina.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
.\" $Id: lina.1,v 5.7 2024/04/16 21:28:51 albert Exp $
.TH LINA "1" "apr 2024 " "ciforth 5.5.0" HCC-FORTHIG
.SH "NAME"
lina \- close to ISO Forth Language And Environment
.SH "SYNOPSIS"
\fBlina\fR [\ \fB\-aehmnrv\fR\ ]
.br
\fBlina\fR \ \fB\-c\fR\ <source>
.br
\fBlina\fR \ \fB\-d\fR\ [<source>]
.br
\fBlina\fR \ \fB\-f\fR\ [ forth code ]
.br
\fBlina\fR \ \fB\-g\fR\ <N> <binary-path>
.br
\fBlina\fR \ \fB\-i\fR\ <binary-path> <library-path> [<shell-path>]
.br
\fBlina\fR \ \fB\-l\fR\ <library> [ params ]
.br
\fBlina\fR \ \fB\-s\fR\ <script> [ params ]
.SH "DESCRIPTION"
Forth is a tried and proven language
for evolutionary ("check as you go") programming,
ideal for rapid prototyping and embedded systems.
\fBlina\fR is the Linux version of \fBciforth\fR (common Intel Forth), an
interpreter environment, scripter and compiler for Forth. It is (large
and by) compliant with the ISO Forth standard; the \fICORE\fR wordset
is fully implemented. The small, classic, indirect threaded
kernel contains the essential, i.a. file access, exceptions and
interfacing with Linux.
Its power is multiplied by an extensive source library, that
adds i.a. a number of standard words, floating point,
a decompiler, integrated i86 assembler, sort utilities,
binary search and numerous small functions.
.
It is simple, fully
self contained and intended to be customized by you; if you want
to understand a compiler in all details, this is your best, if
not only, choice. \fBciforth\fR
has a high documentation to binary ratio, largely due to a
small binary.
.SH "OPTIONS"
\fBlina\fR without options starts an interactive system.
If used as a filter, \fBlina\fR doesn't reflect its input and exits
at end of input.
Options are implemented by a simple mechanism through
the source library, and hence are configurable.
The first letter after the \- (or DEC-style /)
determines the option.
It is case insensitive and further letters are ignored.
Usually one option only is processed.
If the interactive interpreter is started, that is indicated.
.TP
\fB\-a\fR, \fB\-w\fR
Make the word \fIWANT\fR available.
\fIWANT XXX\fR loads \fIXXX\fR from the library, if available.
Then start the interpreter.
.TP
\fB\-c\fR \fIfile.frt\fR
Compile \fIfile.frt\fR to the binary \fIfile\fR.
.TP
\fB\-d\fR \fIfile.frt\fR
Include \fIfile.frt\fR after loading conditional compilation facilities
(\fI[IF]\fR etc.).
This is helpful if the file must be portable.
.TP
\fB\-e\fR
Load the \fBelectives\fR , i.e. tools for interactive development.
Then start the interpreter.
.TP
\fB\-f\fR \fIwords\fR
Execute the forthcode \fIwords\fR .
Then start the interpreter.
.TP
\fB\-g \fIN binary-path\fR
Expand the system by \fIN\fR Megabytes,
then save it under the name \fIbinary-path\fR.
\fIN\fR may be negative,
and in that case the system is made smaller.
.TP
\fB\-h\fR
Print help, i.e. the option summary.
.TP
\fB\-i\fR \fIbinary-path\fR \fIlibrary-path\fR [\fIshell-path\fR]
Install the current compiler into \fIbinary-path\fR and the current library into
\fIlibrary-path\fR.
Optionally specify the path of the command interpreter to be used.
This must be fully qualified names, not directories.
The system is configured accordingly.
.TP
\fB\-l\fR \fIlibrary-path\fR [\fIarguments\fR]
Close the default library, and open the library at
\fIlibrary-path\fR. Shift the arguments such as to make the \fB-l\fR
option invisible.
Process any other options, then start the interpreter.
.TP
\fB\-n\fR
This starts the interpreter for newbies.
It is convenient but somewhat unsafe.
The interpreter is made case-insensitive.
The stack is printed after each command.
For unknown words an attempt is made to load it from the library.
.TP
\fB\-s\fR \fIscript-path\fR [\fIarguments\fR]
(Intended to be used in a script with ``\fB#!lina -s\fR'' as the first line.)
Shift the arguments such as to make the \fB-s\fR option invisible.
Interpret the file \fIscript-path\fR , ignoring its first line.
The arguments are to appended to the script involation, not to the first line.
.TP
\fB\-m\fR, \fB\--\fR, \fB\-\-help\fR, \fB\-\-version\fR
print help, version and copyright information.
.TP
\fB\-v\fR
print version and copyright information.
.SH "AVAILABILITY"
\fBlina\fR is one of the configurations of \fBciforth\fR.
.br
The generic system can be fetched from
.IP
\fI http://home.hccnet.nl/a.w.m.van.der.horst/ciforth.html\fR
.PP
MS-DOS, "windows" , stand alone and Alpha Linux
binary versions are available.
.br
The Intel specific system can be fetched from
.IP
\fI https://github.com/albertvanderhorst/ciforth\fR
.PP
.SH "ENVIRONMENT"
Configuration is done fully internal.
.SH "FILES"
\fIforth.lab\fR contains a Forth source library.
This is configurable at install time.
.SH "SEE ALSO"
\fIlina64.info\fR
documents all language features implemented and
has a tutorial. Further documentation is beneficial but not
required.
\fIlina64.html\fR contains only the reference documentation, heavily cross
referenced.
.br
\fI/usr/share/doc/ci86.lina64/lina64.texinfo\fR allows you to generate the documentation
in html, ps and pdf form.
.br
\fI/usr/share/doc/lina.lina64/lina64.fasm\fR and \fIforth.lab\fR are source code and can be viewed.
.br
\fIlina\fR comes also in cell-width 32,
the documentation corresponds.
.br
gforth(1) GNU Forth, a faster and more complicated Forth system.
.br
fasm(1) The flat assembler.
.SH "DIAGNOSTICS"
Uncaught exceptions will show the error number.
Positive error numbers are \fBciforth\fR-specific and
explained in the documentation.
Negative error numbers are OS-specific.
A mnemonic message is fetched from the library file and displayed,
if possible.
.SH "CAVEATS"
Mistakes can easily crash \fBlina\fR.
\fBlina\fR is case sensitive, so ISO words must be entered in upper case.
Linux error numbers are not officially related to messages (a Linux defect).
A Forth program intended for systems where no Forth library is
installed must take care of error messages itself.
The library does not contain a full complement of the ISO Forth
language.
The library has comments but no comprehensive documentation.
.SH "AUTHOR"
Copyright \(co 2000-2024
Albert van der Horst \fI [email protected]\fR.
\fBciforth\fR is made available under the GNU Public License 2:
quality, but NO warranty.