28 January 1987 Version 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

Download 12.5 Kb.
Size12.5 Kb.
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". It is the follow-on language to SNOBOL4... This implementation was done by O. Rick Fonorow and Jerry D. Nowlin of Naperville, Il. 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 6 of the Icon programming language is described in the following books: 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 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. It is 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 520 with 1 meg upgrade). This system was tested on a 520 with the new prom and there probably won't be enough memory on the old 520s. This version uses static (FixedRegions) memory. This port was completed using the Lattice C compiler. A public domain version with the standard dynamic memory alloc- ation is being worked on, as well as a commercial version incorporating GEM, bios, and xbios routines as "built-in" functions. Installing ATARI ST Icon The four executable binary files needed to run Icon are: ICONT.PRG (89309 bytes) ICONX.PRG (100970 bytes) (*note: The standard ilink and itran programs have been incorporated into the icont.prg) These files can be copied to any top level directory on any drive or ram disk. You can "install" icont and iconx on the GEM desktop. The 'icont.prg' (Icon translator) command translates files ending in ".icn" suffixes, and the 'iconx.prg' command (Icon run-time system) runs programs produced by 'icont' that end with ".icx" suffixes. For example, to "install" iconx From the GEM desktop, click' once on the file iconx.prg, making it black. Then click on the 'options' drop down menu and "install" iconx. Type in ".icx" and 'click' on the TOS takes parameters. From this point, it is then only necessary to double click on icon icode files (prog.icx) to run them from the desktop. (*note: the .icx files must be produced by first translating prog.icn files using icont.prg -- see next section.) Running Atari ST Icon Icon programs must have the extension .icn. An Icon program in the file prog.icn is translated using 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 iconx prog.icx (*note: We have only tested Icon using Jerry Nowlin's ash command interpreter available from the Atari bulletin board.) Limited i/o redirection is possible before any arguments to iconx, e.g: iconx outfile prg.icx arg1 arg2 The Translation and Execution of Icon Programs under Atari TOS The program icont is a translator for Version 6.03 of the Icon programming language. It produces a file suitable for interpretation by the Icon interpreter. The Icon translator is run in the form 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. If the -x option is not recognized on this version for the Atari ST. 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 normally are deleted when compilation has finished. Files whose names end in .u1 or .u2 are assumed to be intermediate code files from a previous translation (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 output Name the interpretable file output. -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 -S option, which has the form -S[cfgilrstCL] n, where the letter following the S specifies the 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 run 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. e.g. iconx hello arg1 arg2 arg3 Files The following files are needed to translate and run Icon programs: icont.prg command processor 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. 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(tm) 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 (see next section.) Future Plans Commercial Version for the Atari ST The implementors intend to market a version of Icon for the Atari ST that includes sound, GEM and bios built-in functions. If you are interested in obtaining the enhanced commercial system please contact us: Convergent Systems Limited Icon+ for the Atari ST 318 N. Center St. Plano, Il 60545 Look for a soon to be published book on Icon programming: "Programming in Icon" by O. Rick Fonorow, Robert Kohout, Joe Hall, and Jerry D. Nowlin Please report Atari specific problems to the above address. O. Rick Fonorow Jerry D. Nowlin #############################################
Download 12.5 Kb.

Share with your friends:

The database is protected by copyright ©ininet.org 2020
send message

    Main page