		Standard ML of New Jersey
          Version 0.66 for the i386/i486, June 1992
              [This is a pre-alpha release.]

This file gives a brief summary of the installation process, followed
by information on obtaining the latest release of Standard ML of New
Jersey (for architectures other than the i386/i486).  For more
information see doc/release-notes/releaseNotes.{txt,ps}.

	------------------------------------------------

STANDARD ML OF NEW JERSEY COPYRIGHT NOTICE, LICENSE AND DISCLAIMER.

Copyright 1989, 1990, 1991 by AT&T Bell Laboratories

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both the copyright notice and this permission notice and warranty
disclaimer appear in supporting documentation, and that the name of
AT&T Bell Laboratories or any AT&T entity not be used in advertising
or publicity pertaining to distribution of the software without
specific, written prior permission.

AT&T disclaims all warranties with regard to this software, including
all implied warranties of merchantability and fitness.  In no event
shall AT&T be liable for any special, indirect or consequential
damages or any damages whatsoever resulting from loss of use, data or
profits, whether in an action of contract, negligence or other
tortious action, arising out of or in connection with the use or
performance of this software.

	------------------------------------------------

The documentation contained in this release is from version 0.75 of
the compiler, since I couldn't find documentation from version 0.66.
I doubt there are any inconsistencies.

README			This file.
75.release-notes.ps	Postscript release notes.
75.release-notes.txt	Ascii release notes.
75.doc.tar.Z		Other documentation.  (optional)
66.mo.i386.tar.Z	The 80386/80486 object files.
66.src.minimal.tar.Z	The source code needed to build the compiler.
66.src.full.tar.Z	Full source code for the compiler.
			(Optional.  Includes minimal src.)

NOTE: When transferring these files by FTP, use binary mode!

After transferring the files, each of the .tar.Z files should be
uncompressed and unbundled as follows:

	zcat 66.src.minimal.tar.Z | tar vxf -

Each file named "xx.yyy.tar.Z" creates a directory tree named "yyy"
rooted in the current directory.

	------------------------------------------------

i386/i486 System Requirements:

At least 12 Mb of physical memory to build the compiler, preferably 16 Mb 
or more.  Building the compiler from object files requires at least
30-40 Mb of virtual memory, so make sure you have enough swap space.
The compiler executable consumes about 2.5 Mb of disk space.

I haven't been able to compile the compiler from scratch with 
only 12 Mb of physical memory.  16 Mb is probably a bare minimum.

	------------------------------------------------

An overview of the installation process:

The release notes don't give an intuitive explanation of what building
the compiler involves.  Here's my attempt:

The core of SML/NJ is called the "runtime" system.  It's implemented
mostly in C (with some assembler).  The runtime primarily provides for
garbage collection and low-level interaction between ML programs and
the operating system.

The runtime also serves as a kind of linker when building the
compiler.  It can load pre-compiled ML code from binary object files
(".mo" files) and execute it.

Building the compiler requires first compiling the runtime, and then
loading and executing the compiler binaries.  This produces a running
compiler, but no executable file.  An "exportML" command can be used
to produce an executable image of the running compiler.  This command
is issued automatically by the "makeml" installation script.

The runtime can load and run any pre-compiled ML program, not
just the compiler.  See the release notes for details.

	------------------------------------------------

To try out the runtime system without actually building the whole
compiler, cd to the src directory and type the following

  makeml -i386 <OPSYS> -run -noclean -gcc
                       ^^^^^
where <OPSYS> is either "bsd" or "mach" (not preceded by a dash),
depending on your operating system.  The other flags are described 
below (and in the makeml man page).

This will produce an executable called "run" in src/runtime.  Now cd
to the test directory (src/test), read the README file there, and try
out a few tests.

	------------------------------------------------

To build an interactive ML compiler, cd to the "src" directory and type:

  unlimit stacksize
  unlimit datasize
  makeml -i386 <OPSYS> -noclean -gcc -h <MEM> -m <MEM> -r 10

where <OPSYS> is either "bsd" or "mach" (not preceded by a dash),
depending on your operating system, and <MEM> is the amount of
physical memory (in kilobytes) that will usually be available to an ML
program.  On a machine with 16 Mb of memory, <MEM> = 12288 is a
reasonable choice.  E.g.

  makeml -i386 bsd -noclean -gcc -h 12288 -m 12288 -r 10

You may want to change the other flags as follows (See the makeml man
page for more details):

  Omit -noclean if you want the runtime rebuilt from scratch.
  Omit -gcc if you don't have the Gnu C compiler.
  Add -noshare if you're very short on disk space and/or want
    to build the compiler more quickly.
  Decrease the value following the -r flag to make garbage collection
    less frequent (at the risk of paging more).
  You can use -i486 instead of -i386 if it makes you feel better :-)
    There's no special support for the i486.

	------------------------------------------------

Known bugs in the i386/i486 release:

- The batch compiler doesn't always die gracefully on a Control-C.

	------------------------------------------------

Please send comments, questions, and bug reports about the i386/i486
release to:

   Mark Leone  (mleone@cs.cmu.edu)
   School of Computer Science
   Carnegie Mellon University
   5000 Forbes Ave.
   Pittsburgh, PA  15213
   USA

(Email preferred.)

The author of the 80386 code generator and the Windows runtime system
is Yngvi Guttessen (ysg@id.dth.dk).

General comments and bug reports may be sent to:

   David MacQueen
   Room 2C-322
   AT&T Bell Laboratories
   Murray Hill, NJ 07974
   USA
   phone: 908-582-7691
   email: macqueen@research.att.com

	------------------------------------------------

The remainder of this file describes how to obtain the latest release
of Standard ML of New Jersey, version 0.75.  [Actually, 0.75 is now
slightly out of date.]

The Release Notes, found in files doc/release-notes/releaseNotes.{txt,ps},
contain instructions for installing the compiler and a more detailed
description of the distribution.


FTP distribution instructions

The primary means of distributing the compiler is anonymous internet
ftp.  For those who do not have internet access directly or
indirectly, distribution by tape is possible as a last resort.  The
following table gives the ftp connection information.

Host:		 	Net Address:	  Directory:
----------------------------------------------------
princeton.edu	 	128.112.128.1	  /pub/ml
research.att.com 	192.20.225.2	  /dist/ml

The directory pub/ml (dist/ml on research.att.com) contains this
README file and the following compressed tar files:

  75.releaseNotes.ps : Postscript version of Release Notes
  75.releaseNotes.txt: raw text version of Release Notes
  75.doc.tar.Z       : the doc directory containing documentation
  75.src.tar.Z       : the src directory containing source code
  75.lib.tar.Z       : the lib directory containing library software
  75.tools.tar.Z     : the tools directory containing useful utilities
  75.mo.m68.tar.Z    : the mo.m68 directory of m68 object files
  75.mo.vax.tar.Z    : the mo.vax directory of vax object files
  75.mo.sparc.tar.Z  : the mo.sparc directory of sparc object files
  75.mo.mipsl.tar.Z  : MIPS Little-endian object files (for DEC machines)
  75.mo.mipsb.tar.Z  : MIPS Big-endian object files (for MIPSCo, SGI)

You need only transfer the 75.mo.*.tar.Z files that you need for your
machines (e.g. 75.mo.m68.tar.Z for Sun 3, NeXT, etc., 75.mo.vax.tar.Z
for Vax).  The Release Notes are also included in the doc directory.

***************************************************************************
NOTE: Ftp should be put into binary mode before transferring the compressed
tar files.
***************************************************************************

Here is a sample dialog:

   ftp
   ftp> open princeton.edu
   Name: anonymous
   Password: <your name@host>
   ftp> binary
   ftp> cd pub/ml
   ftp> get README
   ftp> get 75.src.tar.Z
   ftp> get 75.lib.tar.Z
   ftp> get 75.tools.tar.Z
   ftp> get 75.doc.tar.Z
   ftp> get 75.mo.m68.tar.Z
   ftp> get 75.mo.vax.tar.Z
   ftp> close
   ftp> quit

After the files are transferred they should be uncompressed 
and then extracted using tar into a directory called (e.g.) mldist.
For example:

   mkdir mldist
   mv 75.src.tar.Z mldist
   cd mldist
   zcat 75.src.tar.Z | tar fox -

will install the src directory.
