This file explains how to use the SAOimage communictions interface 
software on an OpenVMS machine.  The enhanced version of SAOimage (v. 1.07E2) 
allows loading multiple independent images, cursor and vector drawing, cursor
readback, and lookup table control from a user program.  Slow video is
also possible.  The OpenVMS version of the software has been tested on a 
VAXstation.

1.  A new version of SAOimage is required.  You can simply copy 
SAOIMAGE.EXE via ftp from vms.ucc.okstate.edu in the directory 
DUA4:[MIIPS.X_WINDOWS.SAOIMAGE] in binary mode.  If you wish to recompile, 
you will have to obtain copies of all the files in that directory and 
its subdirectories, and retain the directory structure.  To make this 
easier, a "tar" file has been created.  This was then compressed with the
COMPRESS utility reducing the size to only 1510 blocks.  Its name is
SAOIMAGE.TAR_Z.  This file does not contain LIBSAO.OLB and SAOIMAGE.EXE
since the tar file was created on a UNIX machine.  The compression was
done on an OpenVMS machine since the UNIX COMPRESS utility creates files 
which can't be read on an OpenVMS machine.  Since the OpenVMS COMPRESS
utility creates files which can be read on either machine, SAOIMAGE.TAR_Z
can be used by both systems.  All files were compiled 
under VAX C and may not necessarily compile under other compilers.  
Therefore you may need to define CC as CC/VAXC if another C 
compiler is installed on your system.  To recompile a single module, enter 
@MAKE module_name and the module will be recompiled with the proper switches 
and placed in the library.  To simply relink, enter @MAKE LINK.  To rebuild 
everything, enter @MAKE.  Again, it is simpler to copy SAOIMAGE.EXE.
Installation under UNIX is more complicated.

2.  A new version of IMTOOLRC. is required.  Copy this from the above 
directory and put it in the same directory as SAOIMAGE.EXE on your 
machine.  Note that the first 13 configurations in IMTOOLRC are assumed 
by the demo programs.

3.  To run the demonstration programs, copy SAODEMO.EXE, 
SAODEMO2.EXE, SAODEMO3.EXE, SAODEMO4.EXE, SAODEMO5,EXE, SAODEMO6.EXE, 
SAODEMO7.EXE, SAODEMO8.EXE, and SAOSAMPLE.EXE from DUA4:[MIIPS.DISPLAY] to your 
private directory.  SAODEMO8 uses the MIIPS plot package and is included
as an example of graphics plotting on SAOimage.

4.  Define the foreign commands
$ SAOIMAGE :== $your_disk:[your_directory]SAOIMAGE.EXE 
    -g 886x886-2+134 -q -one +coord +magnifier
$ SAO:==SPAWN/NOWAIT/INPUT=NL: SAOIMAGE
Upper or lower case may be used.  The geometry should be adjusted if 
the display area on your monitor is not big enough.  The above command 
assume a 19-inch monitor with 100 dots/inch, giving a 1240 by 1024 
available pixel area.  With a 75 dots/inch display a geometry of 
600x775-2+84 may give better results. The effect of the -one switch is 
different than in previous versions of SAOimage.  The switches zero, half, 
and one, assign the starting pixel corner to (0.0, 0.0), (0.5, 0.5), and 
(1.0, 1.0), respectively.  The effect of the former "one" switch is now 
accomplished by use of the "half" switch.  This relationship is more 
intuitive.  Also, +magnifier now enables the magnifier window.  Finally 
simply enter

$ SAO

and SAOimage will come up.  Then try running the demos from the same
window that you entered the SAO command from and have fun.

5.  If you want to create a new demo or display custom images on SAOimage, 
you'll have to copy several files to your account and compile and link them.
They are:

     Name                   Location
IMTOOLCHECKSUM.FOR	DUA4:[MIIPS.DISPLAY]	Required lower level routine
SAOCAPTION.FOR		DUA4:[MIIPS.DISPLAY]	User routine to display a
						message on SAOimage.  It
						also reinitializes the world
						coordinate system in SAOimage.
SAOCONVLT.FOR		DUA4:[MIIPS.DISPLAY]	User routine to control the
						lookup table
SAODOT.FOR		DUA4:[MIIPS.DISPLAY]	User routine to display a
						single dot
SAOERAS.FOR		DUA4:[MIIPS.DISPLAY]	User routine to erase the
						image buffer
SAOFACTS.FOR		DUA4:[MIIPS.DISPLAY]	User include file
SAOFIRST.FOR		DUA4:[MIIPS.DISPLAY]	User routine to set up the
						coordinate system and erase
						the screen of all items.
SAOLOAD.FOR		DUA4:[MIIPS.DISPLAY]	User routine to load an
						image or images
SAOSTART.FOR		DUA4:[MIIPS.DISPLAY]	User routine to prompt the
						user for the frame buffer
						size if not already selected
SAO_CURN.FOR		DUA4:[MIIPS.DISPLAY]	User routine to read back
						cursor positions (desktop,
						frame, and file)
SAO_DISPLAY_VECT.FOR	DUA4:[MIIPS.DISPLAY]	User routine to display a
						set of vectors already written
						into frame
SAO_DRAW.FOR		DUA4:[MIIPS.DISPLAY]	User routine to display cursors
SAO_ERASE_CURSOR.FOR	DUA4:[MIIPS.DISPLAY]	User routine to erase cursors
SAO_LOAD_VLT.FOR	DUA4:[MIIPS.DISPLAY]	User routine to download a
						custom video look-up table
SAO_VECT.FOR		DUA4:[MIIPS.DISPLAY]	User routine to draw vectors
						(2 modes)
ZFIOVI.C		DUA4:[MIIPS.X_WINDOWS.SAOIMAGE.VMS]
						Required lower level routine

The demonstration programs make use of the USRINP subroutine and dynamic
memory.  To use these, you will need:

   Name             Location
DCD.FOR 	DUA4:[MIIPS.FOR]    Required lower level routine
DELAY.FOR	DUA4:[MIIPS.FOR]    User routine to delay exection
DO		DUA4:[MIIPS.FOR]    Required lower level routine
DYNAMIC.FOR	DUA4:[MIIPS.FOR]    User routine to obtain dynamic memory
ERROR.FOR	DUA4:[MIIPS.FOR]    Required lower level routine
MESSAGE		DUA4:[MIIPS.FOR]    User routine to print messages
				    on terminal and in log file
NEL.FOR		DUA4:[MIIPS.FOR]    Required lower level routine
NELD.FOR	DUA4:[MIIPS.FOR]    Required lower level routine
MAPSCRAT.FOR	DUA4:[MIIPS.FOR]    Required lower level routine
PRTMSG.FOR	DUA4:[MIIPS.FOR]    Required lower level routine
SAVE.FOR	DUA4:[MIIPS.FOR]    Required lower level routine
STRKEY.FOR	DUA4:[MIIPS.FOR]    Required lower level routine
USRINP.FOR	DUA4:[MIIPS.FOR]    User routine for generalized
				    character and numerical input

Put the object files in a library, and then link.  This is conveniently
done if you create a linking command file.  If the file is called P1LINK.COM,
then it should contain:
$ SET VERIFY
$ LINK 'P1',-
'P2' your_disk:[your_directory]your_library/LIB,-
SYS$INPUT/OPTIONS
SYS$SYSDISK:[SYSLIB]LBRSHR/SHARE
$ SET NOVERIFY

Next enter
$ @P1LINK.COM your_demo.obj
and your execute image will be created.

Any questions should be directed to Donald Gudehus at 
U6233AA:vms.ucc.okstate.edu
It is possible to build a UNIX version of SAOimage from the same code
in DUA4:[MIIPS.X_WINDOWS.SAOIMAGE].  UNIX versions of the communications 
interface routines and demos can be found in DUA4:[MIIPS.UNIX.DISPLAY]
and DUA4:[MIIPS.UNIX.GENERAL].  One should first read the file 
SAO_INSTRUCTIONS.TXT in the [MIIPS.UNIX.DISPLAY] directory.