		Runtime libraries for 68000 C and Pascal

1.	Regulus versus stand-alone 68000 runtime systems.
A program intended to execute under Regulus will make use of Regulus
system calls, file system, standard input/output, etc.  A stand-alone
system obviously cannot.  The requirements for a stand-alone system
are these:

	a.	There is a startup function called grt0 for Regulus-hosted
	programs, and one called rt68k for stand-alone systems.  These
	assembly programs are internally documented.  One of these is
	linked as the first file of any executable program.  It sets up
	the run-time environment, calls 'main', and handles any exit
	cleanup.  "grt0" is in the "regulus" directory, and "rt68k" is in
	the "alone" directory.

	b.	If dynamic memory allocation is used ("alloc" and "free" in C,
	"new" and "dispose" in Pascal), the function "heapsa" in the "cutil"
	directory may need to be modified in a stand-alone system.  For
	Regulus systems, the function "heapreg" is used instead.  It makes
	use of the "break" system call, and should not need to be modified.

	c.	If terminal or file input/output is used, the lowest-level
	I/O functions used by standard I/O will need to be supplied for
	stand-alone systems.  These functions are as follows:
		"open" "close" "read" "write" "seek"
	and should function like the regulus system calls.  If they are
	different in any way, "stdio.h" and some functions in the "stdio"
	directory will need to be modified.


2.	Linking C programs on Regulus:  Use the command
		ld -o <outfile> grt0.o <userfiles> libslg.a libg.a

If floating-point I/O is needed, use the command
		ld -o <outfile> grt0.o <userfiles> libslfg.a libg.a

(The library libslfg.a has floating-point I/O in it.)


3.	Linking C programs on a stand-alone system:  Use the command
		ld -o <outfile> rt68k.o <userfiles> libsl68k.a lib68k.a

If floating-point I/O is needed, use the command
		ld -o <outfile> rt68k.o <userfiles> libslf68k.a lib68k.a

(The library libslf68k.a has floating-point I/O in it.)


4.	Linking Pascal programs on Regulus:  Use the command
		ld -o <outfile> grt0.o <userfiles> libpg.a libslg.a libg.a

Also use this command for mixed C and Pascal programs.  If any C
files do floating-point I/O, use "libslfg.a" instead of "libslg.a".



5.	Linking Pascal programs on a stand-alone system:  Use the command
		ld -o <outfile> rt68k.o <userfiles> libp68k.a libsl68k.a lib68k.a

Also use this command for mixed C and Pascal programs.  If any C
files do floating-point I/O, use "libslf68k.a" instead of "libsl68k.a".


6.	Makefiles
The Makefile in this directory has a variety of targets.  It goes into
each subdirectory in order, does a Make, and thereby make libraries in
the correct order.  The individual subdirectory Makefiles cannot be
run independently without some knowledge of what is passed in by this
top-level Makefile.


7.	Installation
There are two installation targets in the top-level Makefile.
The command
		make rinstall
will install the Regulus libraries and include files.  It assumes the
libraries in this directory are current.  You must be SuperUser.
Inspect the target libraries in this Makefile and in
"include/Makefile" to be sure they are what is desired.

The command
		make rinstall
will install the stand-alone libraries and include files.  It assumes
the libraries in this directory are current.  You must be SuperUser.
Inspect the target libraries in this Makefile and in
"include/Makefile" to be sure they are what is desired.
