ciforth

A common intel / computer intelligence / ch+ forth

It is best to consider ciforth as a factory for building different versions and configurations of Forth. It is based on assembler and macro's, and not on the usual metaforth mechanism. My philosophy is that a compiler should be as stable as possible, and be updated infrequently, with well documented changes, perferably no changes and only upwards compatible extensions. A burn in period should prevent failed experiments to bother whoever uses the compiler for serious work. The whole ciforth system is hosted on a private CVS system with a copy on github. Only stable versions will be copied to github. git doesn't guarantee the facility that I consider the most essential for a source control system, the ability to recover past versions verbatim, hence CVS. github also provides a Wiki and contains Debian releases and release of source archives. The github source archive is mirrored on https://launchpad.net/ciforth , but not the releases.
In the year 2018 debian archives where generated, but they were not accepted by Debian.
For the impatient: jump to the downloads The most common releases are available as binary downloads from above github.

Some history : fig-Forth

In 1978, shortly after Chuck Moore discovered the Forth language, volunteers started to make public domain implementations available for all popular micro computers. This was the fig-Forth series of compilers. The fig-Forth generic system on this site is the predecessor and base of the generic ISO Forth described in the next section.
The ISO Forth called ciforth is a generic source system. Generic means that it allows to generate from the same source a number of versions of Forth for Intel processors: 16 or 32 bit, hosted on Linux , MS-DOS, MS-Windows DPMI, MS-Windows 32 bit, Intel MacIntosh, booting or etc. Generating assembler sources and documentation runs on a host Linux system. Assembling then can proceed on the host or on the target system. The source control system used is CVS. Occasionally a stable version is dumped onto git including all of the development system to a git source control at github
A lot of the programs and tools in Forth on this site is from fig and public domain. The remainder is protected by the GNU Public License .

ciforth : the generic system

The latest release is 5.4. You can download its generic i86 source system .
During the year 2000 the figforth system evolved into an ISO-compliant system. Those were releases of version 3. Version 4 is ISO-compliant. You can download the last version 4 release of the generic i86 source system for ISO . Now that release 5.# has proved its worth by compiling ciasdis version 4 is no more relevant. Snapshots of earlier systems are available via ftp on the home page. It allows me to generate a number of Intel Forth's, for linux or msdos, booting or hosted versions, close or less close to ISO, for 16 or 32 bit Intel processors. It runs on a Linux system. Difference between versions within a release mainly concern additions to the library. The last (release 3 beta) version is still available . In the unlikely case you want some of the still older version you may have a look at my FTP site . There is also an dump of my complete cvs. The newest version has a binary package for linux, Windows and MS-DOS, such that you need not use the generic system. Based on your configuration information the GNU based development system will generate a single assembler source file in fig tradition and a corresponding, comprehensive programmers manual in the format of your choice. There is one exception: one of the linux versions uses c-code as a glue, and the general system libraries are called. The file generated can be assembled and modified on any other system, notably MSDOS/MSWINDOWS. The documentation about the workings of the generic system and the explanation of 4 levels of adaptability are included in this archive. You can get an idea by looking at the documentation of the generic fig system (adapted from fig but greatly enhanced since then) This explanation refers fig-Forth but the way the generic system works has not been fundamentally changed. In general to build the Forth's, I use the excellent nasm assembler , I myself used version .98 and since 2013 also fasm. Part of the first level of adaptation means selecting the assembler syntax from alternatives MASM/TASM , gas fasm etc. The assembler in GNU-Linux that comes as part of the gcc-package at last has an option to have operands in the same order as other Intel assemblers, but this has been possible only since gas version 2.13 or so. As per jan 2005 I have succeeded in at least building ciforth with it. It was never intended for heavy duty stand alone assembly in the first place. Its handling of comment is especially cumbersome, such as not having the ; (semicolon) for comment which is almost universally accepted, and is for Intel the absolute standard.
The generic source system is also available without long filenames , this is a snapshot version however. It can be unpacked in a system with filenames restricted to 8 plus 3 characters, provided there is some zip program.

The fig-glossary was the starting point for the glossary documentation for lina in html that is an example of the documentation that goes with any of the generic ISO Forths. This modern documentation is also available in texinfo, and hence in pdf, tex, PostScript and info. The generic system is likewise documented with texinfo, and available in different formats. Again, only experts need to understand the generic system, not programmers who make an incidental change to the Forth, even less so end users..


The release note of version 4.0 gives an indication of what files are present in the generic system and what for. This refers to 4.0.1 and is not quite up to date. The assessment of gas is too pessimistic, and wc is renamed /mywc.


There is a more elaborate overview of ciforth in Dutch and English on the site of the Dutch Forth use group.


The test report gives an indication what configurations have been tested, and in how far. The three main versions have a regression test as part of the maintenance tools. It is updated with each change of the ciforth. If you encounter any problems with the latest version, please email. In the meantime in case of severe problems you may down load one of the earlier versions; all versions mentioned in the testreport are available upon request and some can be downloaded by just changing the version number in the URL. You can see whether a reasonable level of usability may be expected for a configuration and whether it is worthwhile to upgrade.


There is a list of current defects .


The screens loaded via the elective screen 5 (formerly 8) or via option -e are reasonably well tested and reliable. The elective screen installs selectors ?PC , ?LI , ?32 , ?16 making those screens 16/32 bit clean. Loading via REQUIRE ASSEMBLERi86 , thus automatically loads a 16-bit or a 32-bit 386-assembler. This assembler is very compact and has some interesting techniques. There is a more advanced assembler that is in file format. It features rigorous error control, build in help for opcode completion and a disassembler. The assembler in the screens is fully compatible, and is tested using the same testset.
Screens are divided in sections that show up if you use the INDEX command. The last sections are to be considered only as educative material. Some contain some old code from my CP/M system (1980), untested as far as the new system is concerned.


WARNING
Some of the software presented here are snapshot (beta) versions.
Beware! Some versions of this program and some utilities loaded access the hard disk directly.
Beware! I think the documentation is very good. However make sure you have the correct one. If even one of the words is not documented, you have documentation for an other configuration.
Again. Beware! Some versions of this program and some utilities loaded access the hard disk directly.
I am grateful for any comment and problem reports . But please make sure, your problem is not yet solved in the latest version. I intent to make frequent updates.



REFERENCE

There are a number of Forth's under the ciforth model, not all of them on Intel processors. An overview follows.

lina : a LInux NAtive customization of ciforth

lina is a very simple Linux Forth in 32 and 64 bit versions.

wina : an MS-windows customization of ciforth

wina is similar to lina, but for all MS-windows version that use dll's, 32 or 64 bits.

xina : an OSX customization of ciforth

xina is a similar to lina, but for OSX. At last there is a separate binary distribution for it: a an official version 5. See also xina FTP You also may want to have a look at Robert Spykermans cvs archive at Sourceforge, although this binary distribution is probably superior in all respects.
This is similar to Linux, because most system utilities are based on Unix-like system calls. It contains a binary executable that is ready to run and full documentation.

aiforth : an Alpha h+ Forth

There is a similar Forth for the DEC Alpha.

ci6809 : a 6809 Forth

The Forth for the Motorola 6809. is based on the 4.0.0 release of lina. It is intended for a single board computer, and so it is only a source distribution, with examples for ROM and RAM versions. It contains no operating system interface but the blocks are retained.

cir30 : a Renesas Forth

The Forth for Renesas R8C/M16C. is based on the as yet unreleased 5.0.0 version of lina. It is intended for a single board computer, and so it is a source distribution, with the image in a Motorola S file that can be placed in flash. The blocks are adapted to the Renesas; they can be used flash and LOADed from there. A program to flash the Renesas is available to.

BINARIES DOWNLOAD

The following archives contain binaries that just run after unpacking.

lina : a LInux NAtive customization of ciforth

Download lina via her separate page . It has 32 and 64 bit versions for Intel and ARM Linux. Some versions have a deb package for easy installation.

wina : a WIndows NAtive customization of ciforth

Download wina via her separate page .

mina : a MSDOS NAtive customization of ciforth

An MSDOS version is available for download. Simply unzip this file in a separate directory and start mina.com from the DOS prompt. You can download from Simtel too.
An older snapshot (beta) version is available upon request. Do .SIGNON once you are in Forth, to find out what version you have.

ciforthtr : bootable customization of ciforth

A stand alone version is available for download. It installs on a floppy and, if you want it, on a hard disk, making it into a fully autonomous Forth system. This one is pretty old, but most enhancements are in the cooperation with operating systems anyway. Booting using the BIOS is tricky. Approximately one out of three installation fails.

Go to the home page of Albert van der Horst