Unix Logo Interpreter
	Lincoln-Sudbury Regional High School

-----
This is release 3 of Unix Logo.  Release 1 was the one on the first 1982
Usenix tape.  Release 2 was sent by me (BH) directly to only a few sites.
This release is much like release 2 in capabilities and syntax, but has
been rearranged internally somewhat to make the process of installation
on a new system a bit easier.  One major new feature in release 3 is the
pause facility, which allows interactive debugging in the local context
of an error.  More on this below.

I would like to thank Don Martin and his students at the College of Marin,
who have found huge numbers of obscure bugs in Logo and therefore helped
make this release much more reliable than it would otherwise have been.
-----

Logo is a programming language for education.  It is, I think, unquestionably
the best introductory learning language now available, because it combines
the ease of an interactive language (like BASIC, otherwise terrible) with
the power and structure of a procedural language (like Pascal, not bad once
you get past the details of editing and compiling and loading and semicolons
and does var go before or after const).  If you aren't convinced, read the
book "Mindstorms" by Seymour Papert.  It doesn't matter how old your
students are.

This directory contains an interpreter for the Logo programming language.
The interpreter is written in C and YACC, and runs under Unix(TM) version 7.
It has been exported also to Vax 4BSD and to Idris on a PDP-11.  This program
is based on a Logo interpreter originally written at the Boston Children's
Museum; the present version is very much improved in its capabilities.  On
the other hand, the original version ran in a 64Kb address space; this version
requires split I/D on the PDP-11.  (It can be run on a smaller 11 by turning
on the definition of SMALL in logo.h, but with hardly any recursion allowed.
This configuration just barely works and is not recommended.  If someone with
such a system wants to tune it up and send me the results, please do.)

The file "logoman" in this directory is an nroff-format reference manual. It's
very terse; you should really learn Logo from some other manual and use this
one just to learn about idiosyncracies.  There are also two smaller
documentation files, "applediff" for people accustomed to Apple
Logo, and "olddiff" for people accustomed to the first LSRHS release.

Users of the first release of LSRHS Logo (the one on the Usenix 82.1 tape)
will find the present version more robust and also more featureful.  Its
syntax is much like that of Apple Logo, which should be helpful to people
with Apples as well as real computers.  Line numbers have been flushed,
except for use with the go command.  The kludgy re-entrant use of the YACC
parser has been eliminated.

The enclosed makefile should manage to compile this Logo with no errors.
You will have to make some modifications for local conditions, most notably
in the area of turtle graphics.  Most installation dependencies have been
collected at the beginning of the file logo.h which is included in all
compilations.

TURTLE GRAPHICS.  You must #define symbols in logo.h for the kind(s) of
display hardware you support.  Also, if you have a graphics terminal which
is not one of the ones already supported in this release, you'll have to
add some code to turtle.c to support it.  The enclosed turtle.c
knows about six kinds of graphics hardware:
	1) Terrapin floor turtles, connected via DR11-K interfaces.
	2) Atari 800 personal computers, running a special terminal program.
	3) DEC GIGI graphics terminals.
	4) Retrographics boards (known to work with ADM-5 terminals,
		maybe also for other Retrographics products).
	5) Tektronix 4014 storage tube displays (with severe restrictions
		because of their inability to erase selectively).
	6) Sun Microsystems workstations.
The files ./*.i contain terminal-specific code which is #included in the
compilation of turtle.c if the corresponding terminal is #defined in logo.h.
The code for floor turtles is done very differently and is not separated into
a .i file because, alas, it's not so modular.

DEFAULT EDITOR.  The "edit" command in Logo does not use an editor built
into Logo itself.  Instead, it forks and runs your favorite editor in a
new process.  If you have an EDITOR variable in your environment, it uses
that editor (it tries with /bin, /usr/bin, and nothing prepended).  If not,
it uses the editor specified in the EDT definition in logo.h.  This is
"emacs" in the version as distributed.

INPUT WAITING TEST.  The "keyp" operation depends on a system call to
check for characters waiting to be read from the keyboard.  If you are
running a Berkeley-derived Unix, this will work correctly.  If not, but
you have your own such system call, edit procedure keyp() in logoaux.c
to use your own version.

FILENAME FORMAT.  Each Logo procedure is stored in a file called <name>.lg
in the current working directory.  Under standard Unix, this allows names
of procedures to be up to eleven letters long.  VMS filenames can only be
nine letters.  The parameter NAMELEN in logo.h should be adjusted.  (Note:
depending on when you got your version of Eunice, it may allow real Unix
filenames, in which case you needn't worry about this.)

THE PAUSE FEATURE.  New in this release is the ability to pause on an error
inside a procedure, so you can examine the context interactively.  The
pause feature distinguishes SIGINT and SIGQUIT, which were treated identically
in earlier releases.  In the normal distribution, SIGQUIT returns to toplevel,
whereas SIGINT causes a pause.  The problem is with Eunice, which doesn't
provide SIGQUIT because VMS doesn't have enough interrupt characters.
Therefore, the standard distribution allows pausing but not quitting to
toplevel, although you can say "toplevel" while paused.  If you'd rather
have quitting be the default, as in previous releases, interchange the
definitions of PAUSESIG and OTHERSIG in logo.h; there are also commands
to allow the user to make this switch dynamically.

(Eunice users:  Until just recently, an obscure bug in Eunice had the effect
that when you type ^C you don't see a prompt until you hit return.  The switch
called EUNICE in logo.h enables a workaround for this bug.  Dave Kashtan has
now fixed the underlying problem, but not necessarily in the version you have.
If you get too few prompts, turn on the #define EUNICE; if too many prompts,
turn it off.)

The pause feature is very new and required major modifications to the
error handling mechanism.  You may well find bugs.  Please let me know
about them, with as simple a failing situation as possible.

-----
INSTALLATION etc.

Saying "make install" after you compile your Logo will install Logo in
/bin/logo and will also set up two directories:
	/usr/lib/logo	Library routines written in Logo for general use
				Also stuff for edit and pots commands.
	/usr/doc/logo	Excerpts from the manual for the "describe" command
The files in these directories are copied, not moved; you can delete the
originals if you prefer.  See the makefile.  These directories must have
the names shown here, although you can put logo itself somewhere other than
/bin if you prefer.

There are three C source files included here which are not part of the Logo
interpreter itself.  One, logohead.c, is used to compile the program
/usr/lib/logo/logohead which is used for the pots command.  Another,
splithelp.c, is part of the makehelp shell script which is used to generate
the online help messages from the manual.  The third C file,
dr11k.c, is a device driver for version 7 for a DEC DR11-K used to interface
Terrapin floor turtles (you get two per DR11-K) to the PDP-11.  The interface
costs much more than the turtles!

INCOMPATIBILITY WITH RELEASE 2.  (This release is VERY incompatible with
release 1; see the file olddiff for details.)  To be compatible
with VMS restricted filenames, to run under Eunice, the names of files used
to store Logo procedure definitions have been changed from foo.logo to
foo.lg (some installations have a version of release 2 in which the name
foo.log is used, but that looks too much like a log file from a batch job;
the new version seems more Unixy anyway).  If you prefer to keep the old
convention of .logo names, turn on the definition of EXTLOGO in logo.h.

Check your makefile to be sure it refers to "y.tab.c" and "y.tab.o" on
Unix, "ytab.c" and "ytab.o" on Eunice.  (Again, some versions of Eunice
use the real Unix filenames.)

If you have questions about this Logo, there are two places to write for help.
On the east coast, try
	Computer Department
	Lincoln-Sudbury Regional High School
	390 Lincoln Road
	Sudbury, MA  01776
On the west coast, try
	Brian Harvey
	2456 Hilgard Av #406
	Berkeley, CA  94709
