home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / i / icon / DOCS / IPD249_DOC < prev    next >
Text File  |  1995-12-01  |  24KB  |  793 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.               Building Version 9 of Icon for MS-DOS
  8.  
  9.                         Ralph E. Griswold
  10.     Department of Computer Science, The University of Arizona
  11.  
  12.  
  13.  
  14.    The implementation of Version 9 of Icon includes both an
  15. interpreter and an optimizing compiler. The interpreter and com-
  16. piler are largely compatible and almost all Icon programs will
  17. run under either, although some features require the specifica-
  18. tion of options when used with the compiler [1].  The interpreter
  19. is appropriate for program development and many production appli-
  20. cations. The compiler can be used to get faster execution speeds
  21. and a stand-alone executable file that can be distributed without
  22. the interpreter.
  23.  
  24.    Note: This document is primarily concerned with building Icon
  25. for MS-DOS, but the source code also can be used to build Icon
  26. for OS/2; see [2].
  27.  
  28.  
  29. 1.__Requirements
  30.  
  31. Processors
  32.  
  33.    Version 9 of Icon runs on computers with 8086/88/x86-family
  34. processors. IBM hardware compatibility is not required. Either
  35. MS-DOS or PC-DOS, Version 3.0 or higher, is needed.  The inter-
  36. preter requires at least 500KB of conventional memory to run
  37. satisfactorily.  The Icon compiler requires a 32-bit processor
  38. with at least 4MB of RAM. A fast 486 with considerably more RAM
  39. is recommended.  The Icon compiler generates C code, which then
  40. must be compiled and linked using the C compiler under which the
  41. Icon compiler was built.
  42.  
  43. C_Compilers
  44.  
  45.    The implementation is written almost entirely in C and RTL
  46. [3], a superset of C for which a translator to C is supplied.
  47.  
  48.    Building the interpreter is straightforward and can be done on
  49. a 16-bit platform with most of the popular C compilers that sup-
  50. port the large memory model.  Building the interpreter requires
  51. at least 510KB of free RAM. If there is not sufficient memory,
  52. MS-DOS may hang. If this happens, you may need to remove some
  53. memory-resident programs to build Icon.  Building the compiler
  54. requires a 32-bit C compiler. The amount of RAM required depends
  55. on the compiler. 4 MB is typical.
  56.  
  57.    To date, the Version 9 interpreter for Icon for MS-DOS has
  58. been successfully built using the following C compilers:
  59.  
  60.  
  61.  
  62.  
  63.  
  64. IPD249                        - 1 -              December 1, 1995
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.         Borland C++ 3.0
  74.         Intel Code Builder 1.0
  75.         Microsoft C 6.0
  76.         Microsoft C 7.0
  77.         Turbo C 2.0
  78.         Watcom C/396 9
  79.         Zortech C++ 3.0
  80.  
  81. The Version 9 compiler for Icon has been successfully built using
  82.  
  83.         Intel Code Builder 1.0
  84.         Watcom C/396 9
  85.         Zortech C++ 3.0
  86.  
  87. Version 9 also has been configured for Metaware High C 2.3, but
  88. this configuration has not been tested.  The use of a C compiler
  89. not listed here involves additional work to provide appropriate
  90. conditional code.
  91.  
  92. Assembly_Language
  93.  
  94.    Icon's co-expressions require an assembly-language context
  95. switch.  An appropriate assembler therefore is necessary to pro-
  96. vide this feature when building Icon entirely from the source
  97. code. However, object files for context switches are provided,
  98. where available, for persons who do not have an assembler. Alter-
  99. natively, co-expressions can be disabled without otherwise
  100. affecting the use of Icon.
  101.  
  102. Batch_Scripts
  103.  
  104.    Some of the batch scripts for building and testing Icon use
  105. the call command, which allows a batch script to be run from
  106. inside another batch script, with control then returning to the
  107. former one. If you are using an early version of MS-DOS that does
  108. not support call, you will have to decompose the batch scripts
  109. that use it into more elementary ones.
  110.  
  111. Disk_Space
  112.  
  113.    The material on the distribution diskettes occupies about
  114. 4.5MB when unloaded.  This amount can be reduced by deleting
  115. files related to the interpreter and to C compilers that will not
  116. be used.  About 1.5MB additional space is needed to completely
  117. build and test the Icon interpreter, although it is possible to
  118. get by with less by building incrementally.  Building the Icon
  119. compiler requires additional disk space - 3 to 4MB depending on
  120. the C compiler used.
  121.  
  122.  
  123. 2.__Organization_of_the_Implementation
  124.  
  125.    The source code for Icon is organized in a hierarchy.  Files
  126. for various components of Icon are packaged using LHA.  A copy of
  127.  
  128.  
  129.  
  130. IPD249                        - 2 -              December 1, 1995
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139. LHA is included in the distribution.  Instructions for unloading
  140. the files are provided on the distribution diskettes.
  141.  
  142.    If the Icon hierarchy is rooted in \icon, the directories
  143. after unloading are:
  144.  
  145.           |-bin------                        executable binaries
  146.           |
  147.           |          |-common---             common files
  148.           |          |
  149.           |          |          |-borland--  Borland C++
  150.           |          |          |-codebldr-  Intel Code Builder
  151.           |          |          |-highc----  Metaware High C
  152.           |-config---|-msdos----|-msc6-----  Microsoft C 6.0
  153.           |          |          |-msc7-----  Microsoft C 7.0
  154.           |          |          |-turbo----  Watcom C
  155.           |          |          |-turbo----  Turbo C
  156.           |          |          |-zortech--  Zortech C++
  157.           |          |
  158.           |          |-os2------|-cset2--    Cset/2
  159.           |
  160.           |          |-common---             common source
  161.           |          |-h--------             headers
  162.           |          |-iconc----             compiler source
  163. |-icon----|-src------|-icont----             translator source
  164.           |          |-preproc--             pre-processor source
  165.           |          |-rtt------             run-time translator source
  166.           |          |-runtime--             run-time source
  167.           |
  168.           |-tests----|-local----             local test results
  169.                      |-stand----             standard test results
  170.  
  171.  
  172. In the descriptions that follow, path specifications assume that
  173. the Icon hierarchy is unloaded in \icon\bin. If the location is
  174. different for your installation or requires a drive specifica-
  175. tion, interpret the path specifications that follow accordingly.
  176.  
  177.    The distribution diskettes also contain documentation and some
  178. tools that may be useful in building and testing Icon. See the
  179. README files on the distribution diskettes.
  180.  
  181. Binary_Files
  182.  
  183.    Since rtt.exe cannot be built under all the C compilers that
  184. otherwise support Icon, a copy is included in the distribution.
  185. Several other executable binaries used in various aspects of
  186. building Icon are also included. These executable binaries are
  187. installed in \icon\bin.
  188.  
  189. Source_Files
  190.  
  191.    The six source-code sub-directories under src contain the fol-
  192. lowing components of Icon:
  193.  
  194.  
  195.  
  196. IPD249                        - 3 -              December 1, 1995
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.      common    files common to different components of Icon.
  206.  
  207.      h         header files used by files in the other direc-
  208.                tories.
  209.  
  210.      iconc     source code for iconc.exe, the optimizing com-
  211.                piler.
  212.  
  213.      icont     source code for icont.exe, the translator and
  214.                linker that converts an Icon source-language pro-
  215.                gram into a form suitable for the interpreter.
  216.  
  217.      preproc   source code for an ANSI C pre-processor used by
  218.                the run-time translator.
  219.  
  220.      rtt       source code for rtt.exe, a program used in
  221.                translating run-time code to C.
  222.  
  223.      runtime   source code for the interpreter, iconx.exe, and
  224.                run-time systems for the compiler and interpreter.
  225.  
  226. Configuration_Directories
  227.  
  228.    In order to simplify the process of compiling Icon under dif-
  229. ferent C compilers, files that are compiler-specific, such as
  230. batch and linker files, are provided in subdirectories of the
  231. config directory.  The MS-DOS configurations presently are:
  232.  
  233.         borland   Borland C++
  234.         codebldr  Intel Code Builder
  235.         highc     Metaware High C
  236.         msc6      Microsoft C 6.0
  237.         msc7      Microsoft C 7.0
  238.         turbo     Turbo C
  239.         watcom    Watcom C
  240.         zo