Index of /atarilibrary/atari_cd03/UNPACKED/PROGR/STICON

      Name                    Last modified       Size  Description

[DIR] Parent Directory 11-May-2007 20:54 - [TXT] ICONT.PRG 03-Apr-1987 01:25 20k [TXT] ICONX.PRG 03-Apr-1987 01:25 93k [TXT] ILINK.PRG 03-Apr-1987 01:25 37k [TXT] ITRAN.PRG 03-Apr-1987 01:25 60k [   ] OVERVIEW.DOC 06-Apr-1987 02:39 26k [TXT] S.ICN 06-Apr-1987 02:39 21k [   ] VERSION6.DOC 06-Apr-1987 02:39 24k


                              28 January 1987


                     Version 6.3 of Icon for Atari ST


This document describes the implementation of the University of Arizona
Icon programming language for the Atari ST.  It is based on a similar
document written by Dr. Ralph Griswold for the MS-DOS implementation.

  Note: Icon is a general purpose computer programming language that has
        little or nothing to do with "icons".  The name conflict is
        unfortunate.  Icon is the follow-on language to SNOBOL4.

This implementation was done by O. Rick Fonorow of Naperville Illinois and
Jerry D. Nowlin of Plano Illinois.  This version has been placed in the
public domain to make it as widely available as possible.  We also provided
the technical information contained in this document.

The Icon source is being distributed by the University of Arizona as a
service to the computing community.  It makes no warranties of any kind as
to the correctness or suitability of this material for any application.

The Icon system can be copied and used freely, provided the material on it
is not modified and that appropriate credit is given where applicable.
Persons who obtain a copy of this system are encouraged to register their
copy by sending their name and mailing address to:

        Icon Project
        Department of Computer Science
        Gould-Simpson Science Bldg
        The University of Arizona
        Tucson, AZ  85721

Persons who register their copies will receive the Icon Newsletter, which
is published aperiodically, free of charge and will be notified of
corrections, new releases, and so forth.


Documentation

Version 5 of the Icon programming language is described in the following
book:

        The Icon Programming Language, Ralph E. Griswold and Madge T.
        Griswold, Prentice-Hall, Inc., Englewood Cliffs, New Jersey.
        1983. ISBN 0-13-449777-5.

A brief overview of Icon and features that have been added to Version 6 of
Icon since the book was written are available.  Printed copies of these
documents are available on request from the Icon Project at the address
listed above.

A new book has just been published describing the Version 6 language
internals:

        The Implementation of the Icon Programming Language, Ralph E.
        Griswold and Madge T. Griswold, Princeton University Press,
        New Jersey, 1987.



Disclaimer

This is a PRELIMINARY version of the Icon programming language for the
Atari ST.  This port was completed using the Lattice C compiler.  It's
designed to run on the 520ST and requires approximately 200,000 bytes of
available memory.  All available memory is "grabbed" making it impossible
to exec other programs with the system() function.  Some programs may not
link or run on a 520 ST (depending on the available memory, ram disks, desk
accessories, etc.) but you should not experience any problems with a 1040
or a 520 with a 1 Meg upgrade.  This system was tested on a 520 with TOS in
ROM so there may not be enough memory if you still use TOS in RAM.  This
version uses static (FixedRegions) memory.

A public domain version with the standard dynamic memory allocation is
being worked on, as well as a commercial version incorporating gemdos,
bios, and xbios routines as "built-in" functions.


Installing Atari ST Icon

The four executable binary files needed to run Icon are:

                  ICONT.PRG   20838 Bytes
                  ILINK.PRG   37785 Bytes
                  ITRAN.PRG   60940 Bytes
                  ICONX.PRG   95582 Bytes

These files can be copied to any top level directory on any drive or ram
disk.

The icont.prg (Icon translator) command translates files ending in ".icn"
suffixes and the iconx.prg (Icon run-time system) command runs programs
produced by icont that end with ".icx" suffixes.  The ilink.prg and
itran.prg commands are executed by icont.prg.


Running Atari ST Icon

Icon programs must have the extension ".icn".  An Icon program in the file
prog.icn can be translated from a shell (try ash) by typing:

        icont prog.icn

The result is a file with the name prog.icx.  This file can be run by
executing:

        iconx prog.icx

(NOTE: The only shell we've tested Icon with is Jerry Nowlin's ash.
Version 0.52 is available from the Atari bulletin board.)

When invoking an Icon program, limited I/O redirection is possible if the
redirection parameters are specified before any other arguments to iconx.
For example:

        iconx <data prog.icx
        iconx <datafile >outfile prg.icx arg1 arg2

The I/O redirection is provided because this release of Icon for the ST was
compiled with the Lattice C compiler.


The Translation and Execution of Icon Programs under Atari TOS

The program icont is a translator for Version 6.3 of the Icon programming
language.  It produces a file suitable for interpretation by the Icon
interpreter.  The syntax of an Icon translator command is:

        icont [ option ... ] file ...

Translation consists of two phases, translation and linking.  During
translation each Icon source file is translated into an intermediate
language.  During linking the intermediate language files are combined and
a single output file is produced.  The output file from the linker is
referred to as an interpretable file.  Unless the -o option is specified,
the name of the resulting interpretable file is formed by deleting the
suffix of the first input file named on the command line.  The -x option is
not recognized on the current Atari ST version of Icon.

Files whose names end in .icn are assumed to be Icon source programs.  They
are translated and the intermediate code is left in two files of the same
name with .u1 and .u2 substituted for .icn.  The intermediate code files
are normally deleted when compilation has finished.  Files whose names end
in .u1 or .u2 are assumed to be intermediate code files from a previous
translation (NOTE: Only the .u1 file should be named -- the .u2 file is
assumed.) These files are included in the linking phase after any .icn
files have been translated.  A .u1 or .u2 file that is explicitly named is
not deleted.

The following options are recognized by icont.

    -c  Suppress the linking phase.  The intermediate code files are not
        deleted.

    -o  The next argument is a name for the resulting interpretable file.

    -s  Suppress any informative messages from the translator and linker.
        Normally, both informative messages and error messages are sent to
        standard error output.

    -u  Issue warning messages for undeclared identifiers in the program.
        The warnings are issued during the linking phase.

Icon has a number of memory regions related to the translation of programs.
These regions are large enough for most programs, but their size can be
changed, if necessary, by the icont -S option.  This option has the form:

        -S[cfgilrstCL] n,

The letter following the S specifies the memory region and 'n' is the
number of storage units to allocate for the region.  The regions are:

    c   literal table

    f   field table

    g   global symbol table

    i   identifier table

    l   local symbol table

    r   field table for record lists

    s   string space

    t   tree space

    C   code buffer

    L   labels

(NOTE: This capability has not been thoroughly tested on the ST.)

The interpretable file produced by the Icon linker is executed by the
program iconx.  For example, the command:

        icont hello.icn

produces a file named hello.ixc that can be run by the command

        iconx hello.icx
or
        iconx hello

Arguments can be passed to the Icon program by following the program name
with the arguments.  Any such arguments are passed to the main procedure as
a list of strings.  For example:

        iconx hello arg1 arg2 arg3


Files

The following files are needed to translate and run Icon programs:

              ICONT.PRG   Command Processor
              ITRAN.PRG   Translator
              ILINK.PRG   Linker
              ICONX.PRG   Icon Run-time System


Simple Example Program:

Use the following program to test your installation:

        procedure main()
            write("hello world")
            write(&version)
        end



References

The Icon Programming Language, Ralph E. Griswold and Madge T. Griswold,
Prentice-Hall Inc., Englewood Cliffs, New Jersey, 1983.

Version 6.0 of Icon, Ralph E. Griswold and William H. Mitchell, TR 85-16,
Department of Computer Science, The University of Arizona, August 1985.

Installation and Maintenance Guide for Version 6.0 of Icon, Ralph E.
Griswold and William H. Mitchell, TR 85-15, Department of Computer Science,
The University of Arizona, August 1985.


Bugs and Deficiencies

Downward compatibility of interpretable files will not be maintained in
subsequent releases of Icon.  No checks are performed to determine if the
interpretable file and the interpreter are compatible.  Peculiar program
behavior is the only indication of such incompatibility.

Interpretable files do not stand alone; the Icon interpreter must be
present on the system.  This implies that the interpreter is of the same
version of Icon as the translator that produced the interpretable file.

The system() built-in function is not implemented.

Co-expressions are not implemented.

Integer overflow on multiplication is not detected.


Features of Atari ST Icon

Atari ST Icon supports all the features of Version 6.3 of Icon, including
sets and the experimental features described in the University of Arizona
technical reports, with the following exceptions and additions:

   - UNIX Pipes are not supported.  A file cannot be opened with the "p"
     option.

   - There is two new options for open: "t" and "u".  "t" indicates that
     the file is to be translated into UNIX format.  All carriage-
     return/line-feed sequences are translated into newline sequences on
     both input and output.  "t" is the default.  "u" indicates that the
     file is to be untranslated.  Examples are:

             untranfile := open("test.fil","ru");
             tranfile := open("test.new","wt");

   - The following Atari ST device names can be used as filenames:

         AUX Refers to an auxiliary device.

         CON Refers to the console.

         PRN Refers to the printer device.

         NUL Specifies a "null" file.  Giving NUL as a filename means that
             no file is created.

     These special names remain associated with the devices listed above,
     even if device designations or filename extensions are added to them.
     For example, A:CON.XXX refers to the console and is not the name of a
     disk file.


Bugs

This is a new implementation and some problems with it are likely to occur.
Problems should be reported to:

        CSL
        Icon for the Atari ST
        318 N. Center Street
        Plano, IL  60545

For example, a bug in the string to floating point type conversion
algorithm that was in the initial release of Icon for the Atari ST has been
corrected in this version.  Please report any Atari ST specific problems
with Icon to the above address.  Also, feel free to contact us with any
questions or suggestions.  Thanks.

O. Rick Fonorow
Jerry D. Nowlin