lina : a LInux NAtive Forth

You can download here release 5 of a 32-bit ISO Forth for Linux Intel called lina. Since 2012 oct we have also a stable release for 64-bit ISO Forth for Linux Intel with a few caveat's still. These are binary downloads, ready to run, with documentation ready to be viewed or printed. The last release 4 version is still available, as this is the still the version for programs published on this site, unless otherwise noted. . For previous release 4 versions and still older versions you may search my FTP-site. In fig/eForth tradition it is based on an assembler in only one file, so no c-code is present nor are any c-libraries called.

Features, present in the archive:

  • binary ; it works on all kernels at least since 1.2.
  • assembler source, GPL-ed.
  • indirect threaded Forth
  • 80386 assembler/disassembler based on the posit/fixup principle
  • savesystem and turnkey facility. Make a standalone 30 Kbyte programs, independant of any libraries, resident or not.
  • texinfo documentation. So you have info and PostScript and pdf.
  • html documentation with references between related words.

    If you want to modify and rebuild it from assembler source, for 32 bits you may use at your discretion the gas format, fasm or nasm. The excellent nasm assembler version .98 has been used to generate the binary in the distribution.
    Since the gnu Intel assembler supports the directive .Intel_syntax prefix, which forces Intel's non-standard destination-source order of operands, it became feasible to supply a .s file that can be assembled on any system equipped with a gcc compiler. This too is supplied in the archive. Use the instructions contained in the file to assemble it. For the moment the gas format is the only one that works for the 64 bits version.
    Use the generic system for more important changes.


    Apart from above source and documentation, the wc program is included in this archive. The wordcount program is an example of how to use lina as a scripting language. The only environmental dependancy is using Linux system calls.
    It has become a bit of a disgrace since the later version have much better facilities for scripting.


    Experimental coloring version

    You can also download the experimental (unstable) version called 4.1.22. It has a number of small improvements over the stable version. Most important, it allows color high lighting using the stack effect analyser and a drop-in replacement for the kernel: lina+a. It shows the words with color high lighting, as follows.
            lina+a -r
            "analyserconfig.frt" INCLUDED
            "color.frt" INCLUDED
            DO-COLOR WORDS
    
    The file smallanalyser.frt can be used to add the stack effect for new words. For more information see the supplied sources.

    lina release 5, 64 bit version

    New in release 5 is the 64 bit version. The 64-bit version is called lina64, such that it is possible to have the two versions installed at the same time. The 64 bit version has threading activated.

    lina release 5 changes

    Some substantial changes are made with respect to the introspective properties of the Forth, which in the end should make a good optimiser possible. Like in the above 4.22 snapshot version, a mechanism is in place to allow to derive (semi-)automatically the stack effect of words. On top of that there are numerous small improvements and additions to the library.
    An important change is the rename of REQUIRE to WANT such that the Forth doesn't become incompatible with upcoming additions to the Forth standard. So the -r option is replaced by a -w option.
    All code published on this site is still based on 4.0.6. It should run on a release 5 ciforth after WANT -legacy-. , but testing is still in progress.

    The 64-bit lina has a few issues, not present in the latest 32-bit release.

    You may alleviate this by downloading the latest snapshot of the generic system for version 5 . You have to build lina64 from ci86.lina.s in the file, and replace your old lina64. ci86.lina.fas results in a working executable, but the assumptions made in -c and other options only apply to headers as generated by gas. Then replace your old forth64.lab with forth.lab.lina from the snapshot. If this is too hard, you probably shouldn't be using a snapshot version. I thank mr. Ken Wilson for contributing true 64 bit system calls.

    There is a list of current defects . See also the list of defects of the generic system. .


    This binary distribution is based on a generic Intel Forth system that is available too.


    Go to the home page of Albert van der Horst