The xlisp distribution consists of the following files:

	separate.c
	xlisp0.txt
	xlisp1.txt
	xlisp2.txt
	xlisp3.txt
	xlisp4.txt

The program 'separate' can be used to separate the xlisp distribution
files into individual .c and .h files.  In order to run it, compile and
link the program 'separate.c' and type the following lines:

	$ separate xlisp0.txt
	$ separate xlisp1.txt
	$ separate xlisp2.txt
	$ separate xlisp3.txt
	$ separate xlisp4.txt

When 'separate' is run, you can expect to see the news header at the
beginning of each file printed followed by a list of file names.

This process should create the following files:

	readme.txt	(this file)
	xlisp.mem	(documentation)
	xlbind.c	(routines to bind values to symbols)
	xldmem.c	(dynamic memory management routines)
	xleval.c	(the evaluator)
	xlfio.c		(file i/o routines)
	xlio.c		(i/o routines for 'xlread')
	xlisp.c		(the main routine)
	xlisp.h		(the definition file)
	xllist.c	(list functions)
	xlmath.c	(arithmetic functions)
	xlobj.c		(object oriented functions)
	xlkmap.c	(keymap functions)
	xlprin.c	(the printer)
	xlread.c	(the reader)
	xlstr.c		(string functions)
	xlsubr.c	(misc. functions)
	junk.c		(routines needed for the AZTEC C version)
	setjmp.h	(definition file for 'setjmp.asm')
	setjmp.asm	(setjmp and longjmp for AZTEC C)

Before compiling xlisp, look at the beginning of the file 'xlisp.h'.
You should check to see that the conditionals defined here are
appropriate for your machine.

The .c files should then be compiled with your local c compiler.
In order to link xlisp, you need to write a module that defines
a function called 'kbin' which takes no arguments and returns
the next character typed on the terminal in character mode with
no echo.  This function is required for the 'keymap' functions.
If you don't need these functions and just want to link xlisp
with no errors, you can use the following dummy routine:

 int kbin()
 {
	return (-1);
 }

After you have generated a module that defines 'kbin', you can
link xlisp.  Just link all of the object modules generated by
compiling the xlisp sources along with the module that you created
to define 'kbin'.  This should generate a working version of xlisp.
Since xlisp evaluates functions recursively, it tends to use up
a lot of stack space.  Depending on how stack space is allocated
on your machine, you may need to tell the linker to allocate more
than the normal amount of space.  I generated the original xlisp
on a PDT-11/150 under the RT-11 operating system using the DECUS-C
compiler and needed to tell the RT-11 linker to allocate 10000 octal
bytes of stack space in order to make xlisp run reasonably well.

In order to link xlisp under AZTEC C, you need to use several modules
that are included in the AZTEC distribution.  There is a memory allocation
package called 'alloc.c' and 'sbrk.asm'.  There are instructions that
come with the compiler that describe how to make these routines usable.
Follow the instructions and include 'alloc.o' and 'sbrk.o' in your
linker command line when linking xlisp.  You will also need to compile
and assemble 'junk.c' which contains some routines that are missing
from the normal AZTEC library.  You should assemble 'setjmp.asm' and
link 'setjmp.o' along with everything else.  Your linker command line
should end up looking like this:

ln -o xlisp.com xlisp.o xlread.o xleval.o xlprin.o xlsubr.o xlbind.o 
 xllist.o xlmath.o xlstr.o xlobj.o xlkmap.o xlfio.o xlio.o xldmem.o 
 junk.o alloc.o sbrk.o setjmp.o -l a:libcz80.lib

(note that the above lines must be typed on a single line or placed
in a file on a single line)
