Version 9 of Icon for 32-bit MS-DOS Platforms Ralph E. Griswold Department of Computer Science The University of Arizona Tucson, Arizona IPD248b March 24, 1996 http://www.cs.arizona.edu/icon/docs/ipd248.html ---------------------------------------------------------------------------- 1. Overview This implementation of Icon runs on MS-DOS in 32-bit protected mode. It was built using the Watcom C/389 9.0 compiler. The minimum configuration to run this version is a 386SX with 2MB of RAM. 4MB or more is recommended. If only 2MB of RAM are available, the use of disk caching (for example, SMARTDRV) may cause problems and should be disabled. This implementation of Icon is in the public domain and may be copied and used without restriction. The Icon Project makes no warranties of any kind as to the correctness of this material or its suitability for any application. The responsibility for the use of Icon lies entirely with the user. The basic reference for Version 8 of Icon is the second edition of the book The Icon Programming Language [1]. This book is available from the Icon Project at The University of Arizona. The new features of Version 9 of Icon are described in an accompanying technical report [2]. 2. Installing MS-DOS Icon Three executable binary files are needed to run Icon: icont.exe translator iconx.exe executor These files should be located at a place on your PATH specification. The distribution is contained in several files in LHA format. These files have the extension lzh. If you do not have a copy of lha.exe, execute the self-extracting archive lha213.exe on the distribution diskette. This will produce lha.exe and documentation. The distribution files are: docs.lzh documents icon.lzh executable binary files readme installation overview and recent notes samples.lzh Icon programs and data To install the .exe files, set your current directory to the desired place, place the appropriate distribution diskette in a drive, and dearchive the files there using lha.exe. For example, using drive A to dearchive the executable binary files, the following will do: a:lha x a:icon.lzh The same technique can be used for extracting the remaining files. 3. Running 32-Bit MS-DOS Icon -- Basic Information Files containing Icon programs must have the extension .icn. Such files should be plain text files (without line numbers or other extraneous information). The Icon translator, icont, produces an "icode" file that is executed using iconx.exe. There are two forms of icode files: 1. Executable icode files that invoke iconx.exe automatically when they are run. These icode files have the extension exe. 2. Non-executable icode files that are run by iconx with the icode file as an argument. These icode files have the extension icx. Non-executable icode files require about 8K less RAM to run than executable files, but they are more awkward to run. Note: Executable icode files do not stand alone; they require iconx.exe to run. Producing Executable Icode Files Executable icode files are produced by default. An Icon program in the file prog.icn is translated by icont prog.icn The result is an icode file with the name prog.exe. This file can be run by prog The extension .icn is optional on the command line. For example, it is sufficient to use icont prog Producing Non-Executable Icode Files To produce a non-executable icode file, use the option -I, as in icont -I prog The result is an icode file named prog.icx. It can be run by iconx prog Note that the icx extension is not necessary. iconx will find an icode file if it is in the current directory or at place given on your PATH specification. Except for the icode file extension and the method of running non-executable icode files, the remarks in the previous section apply. 4. Testing the Installation There are a few programs on the distribution diskette that can be used for testing the installation and getting a feel for running Icon: hello.icn This program prints the Icon version number, time, and date. Run this test as icont hello hello cross.icn This program prints all the ways that two words intersect in a common character. The file cross.dat contains typical data. Run this test as icont cross cross