LINA(1)

NAME
lina - close to ISO Forth Language And Environment

SYNOPSIS
lina [ -aehmrv ]
lina -c <source>
lina -d [<source>]
lina -f [ forth code ]
lina -g <N> <binary-path>
lina -i <binary-path> <library-path> [<shell-path>]
lina -l <library> [ params ]
lina -s <script> [ params ]

DESCRIPTION
Forth is a tried and proven language for evolutionary ("check as you go") programming, ideal for rapid prototyping and embedded systems. lina is the Linux version of ciforth (common Intel Forth), an interpreter environment, scripter and compiler for Forth. It is (large and by) compliant with the ISO Forth standard; the CORE 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 386 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. ciforth has a high documentation to binary ratio, largely due to a small binary.

OPTIONS
lina without options starts an interactive system. If used as a filter, lina 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.

-a, -w
    Make the word WANT available. WANT XXX loads XXX from the library, if available. Then start the interpreter.

-c file.frt
    Compile file.frt to the binary file.

-d file.frt
    Include file.frt after loading conditional compilation facilities ([IF] etc.). This is helpful if the file must be portable.

-e  Load the electives , i.e. tools for interactive development. Then start the interpreter.

-f words
    Execute the forthcode words . Then start the interpreter.

-g N binary-path
    Expand the system by N Megabytes, then save it under the name binary-path. N may be negative, and in that case the system is made smaller.

-h  Print help, i.e. the option summary.

-i binary-path library-path [shell-path]
    Install the current compiler into binary-path and the current library into library-path. Optionally specify the path of the command interpreter to be used. This must be fully qualified names, not directories. The system is configured accordingly.

-l library-path [arguments]
    Close the default library, and open the library at library-path. Shift the arguments such as to make the -L option invisible. Process any other options, then start the interpreter.

-s script-path [arguments]
    (Intended to be used in a script with ``#!lina -s'' as the first line.) Shift the arguments such as to make the -s option invisible. Interpret the file script-path , ignoring its first line.

-t file.frt
    Try to load the file file.frt automatically, by possibly unsafe means. Report facilities that were required, then start the interpreter.

-m, --, --help, --version
    print help, version and copyright information.

-v  print version and copyright information.

AVAILABILITY
lina is one of the configurations of ciforth.
The generic system can be fetched from

    http://home.hccnet.nl/a.w.m.van.der.horst/ciforth.html

MS-DOS, "windows" , stand alone and Alpha Linux binary versions are available.

ENVIRONMENT
Configuration is done fully internal.

FILES
forth.lab contains a Forth source library. This is configurable at install time.

SEE ALSO
lina64.info documents all language features implemented and has a tutorial. Further documentation is beneficial but not required. lina64.html contains only the reference documentation, heavily cross referenced.
/usr/share/doc/ci86.lina64/lina64.texinfo allows you to generate the documentation in html, ps and pdf form.
/usr/share/doc/lina.lina64/lina64.s and forth.lab are source code and can be viewed.
lina comes also in cell-width 32; the filenames change accordingly.
gforth(1) GNU Forth, a faster and more complicated Forth system.
as(1) The portable GNU assembler.

DIAGNOSTICS
Uncaught exceptions will show the error number. Positive error numbers are ciforth-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.

CAVEATS
Mistakes can easily crash lina. lina 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.

AUTHOR
Copyright © 2000-2022 Albert van der Horst albert@spenarnc.xs4all.nl. ciforth is made available under the GNU Public License: quality, but NO warranty.