















                              Implementation Notes for
                             VERSAPLOT COLOR RANDOM 2.0
                                     on BSD UNIX




















             These notes describe an integration of Versaplot Color Random
          Universal Version 2.0 which was ported to Sun Workstations
          running UNIX and the DEC VAX range running UNIX by Lattice Logic
          Ltd.

             These notes apply both to VAX UNIX (BSD 4.2) and SUN UNIX
          which is a BSD 4.2 derivative.

             These notes describe the differences in the implementation
          with respect to the Versaplot Color Random 2.0 VAX/VMS Operating
          Manual.




                                Lattice Logic Limited

                                   11-August-1986









          Pref iii : Replace the words "VAX/VMS" by "BSD UNIX".
                     Add the statement:
                     "UNIX is a trade mark of A T & T Bell Laboratories"

          Page 1-7 : Add the following sentence to the top paragraph:
                     "On UNIX systems case is significant, and mixed
                     case is used in the examples when required."

                     "$ RUN SYS$SYSTEM:CRFOUT" should be replaced by
                     "% crfout"

                     "$ ASSIGN (logical device name) VEROUT" should be
                     replaced by "% setenv VEROUT (logical device name)"

                     The '$' should be deleted from the start of the
                     line in the third example (this is also true for
                     the VAX/VMS book!!).

          Page 1-8 : Remove the reference to the PDP-11/VAX Device Driver
                     Manual and add a reference to Section 4 of the Unix
                     Manual set (which describes devices on Unix).

          Page 2-1 : Replace "VMS" with "UNIX"
                     Replace "COL2V0.OLB" with "libcol2v0.a" (twice)
                     Replace "SYS$LIBRARY" with "/usr/local/lib"
                     Replace the word "linker" by "loader" to conform to
                     UNIX terminology.

          Page 2-2 : Replace "$ FORTRAN (application program name)"
                     with    "% f77 (application program name) -lcol2v0"

                     CREATING AN INTERMEDIATE DATA FILE

                     Delete the first paragraph of this section and
                     the example of the LINK command.
                     Replace the paragraph with:

                     "The f77 command on UNIX does both the compilation
                     of the users source program and the loading to
                     produce a binary image which is generated in a file
                     called a.out.  The -lcol2v0 option indicates that
                     the Versaplot library should be included when 
                     loading.  All other options to the f77 command can be
                     used to alter the compilation and loading defaults."

                     Replace "$ ASSIGN (file specification) RANDOM"
                     with "% setenv RANDOM (file specification)"

                     Replace the words "logical name" with the words
                     "environmental variable" (UNIX Terminology).

                     Replace "$ RUN (application program name)"
                     with "% a.out"






                                       1



                     OUTPUTTING THE PLOT

                     Replace the words "logical name" with the words
                     "environmental variable" (UNIX Terminology).

                     Replace "$ ASSIGN (logical output device) VEROUT"
                     with "% setenv VEROUT (logical output device)"

                     Delete the comment "(assuming the program is in
                     SYS$SYSTEM)...." and replace the final part of
                     the sentence with:
                     "by issuing the following command"


                             % crfout


          Page 2-3 : Replace the words "logical name" with the words
                     "environmental variable" (UNIX Terminology).

                     MAGNETIC TAPE OUTPUT

                     Replace the example with


                            % setenv VEROUT /dev/rmt8
                            % crfout


          Page 2-4 : Delete the paragraph which starts "Finally, copy.."

                     Delete the section about "Devices and Spooling
                     Support".

          Page 2-29 : Replace the rest of this page from the section 
                      on 'Specifying an Output Device' with the following
                      page.























                                       2





          Specifying an Output Device

                     The output listing is always output to UNIT 6 which
                     defaults to be the standard output stream (terminal).
                     The UNIX facilities to re-direct the standard output
                     stream can be used to place the output in a file.

                     With the command example that follows, RDUMP creates
                     an ASCII file "volts.dmp".


                              % rdump >volts.dmp


                     The prompts shown below are used to determine whether
                     a full dump is desired and which partitions to dump.
                     These prompts are also output to UNIT 6, so it is
                     desirable to refer to this manual if the output is
                     being re-directed to a file.

          Step 1     To Invoke RDUMP issue the following command:


                             % rdump


          Step 2     RDUMP responds with:


                             FULL DUMP OUTPUT? (Y/N):


                     Enter Y for yes or N for no, note that the response
                     has to be in upper case.

                     If the response is Y, the dump will contain introductory
                     information, summary statistics, and a translation of
                     each VRF construct used.  Proceed to step 3.




















                                       3




          Page 3-1 : Replace "PLOTS.FOR" by "plots.f" (twice)
                     Replace "COL2V0.COM" by "col2v0.com"

          Page 3-9 : Replace "PLOTS.FOR" by "plots.f"
                     Replace "COL2V0.COM" by "col2v0.com"

          Page 3-10 : Replace "PLOTS.FOR" by "plots.f"
                      Replace "COL2V0.COM" by "col2v0.com"

          Page 3-11 : Replace "TONE.FOR" by "tone.f" (twice)
                      Replace "COL2V0.COM" by "col2v0.com" (thrice)

          Page 3-12 : Replace "VPINIT.FOR" by "vpinit.f"

          Page 3-13 : Replace "PLOTS.FOR" by "plots.f" (thrice)

          Page 3-14 : Replace "COL2V0.COM" by "col2v0.com"
                      Replace "CLRCOM.CMN" by "blkdta.f"

          Page 3-15 : Replace "PLOTS.FOR" by "plots.f"
                      Replace "COL2V0.COM" by "col2v0.com"
                      Replace "PRMCOM.CMN" by "blkdta.f"

          Page 3-21 : I would recommend against changing the 
                      intermediate data file record size, since
                      this has not been tested!

          Page 3-22 : The UNIX command "limit" can be used to
                      alter the users stack size.  This has not
                      been tested.

          Page 3-23 : This has not been tested.



























                                       4



                                                                  SECTION 4
                                                   INSTALLATION AND TESTING

          INTRODUCTION

                  Versaplot Color Random is supplies on the following media:

                    * One nine-track magnetic tape (800 or 1600 bpi)

                    * One DC300XL Data Cartridge

                  All distribution media are in tar(1) format.
                  The installation is controlled by a command file, making
                  the installation process quite simple.

                  Before Versaplot Random can be used, the system must have
                  been configured with the plotter driving hardware and
                  the device which is to be used must have been configured
                  using the MAKEDEV procedure on UNIX.



          LOADING THE DISTRIBUTION MEDIA

            Step 1 : Log on to the system.  If you intend to release the
                     software for all users of the system you must be the
                     super-user, otherwise the software can be installed
                     from any user.

            Step 2 : Decide what directory will contain a the Versaplot
                     source code and change to use that directory by 
                     default using the following command.


                             % cd (directory name)



                     However, you may choose to create a new directory for
                     Versaplot Random and then change to the new directory.


                             % mkdir (directory name)
                             % cd (directory name)



            Step 3 : Physically load the distribution media.












                                       5




            Step 4 : Extract all the files from the distribution media to
                     the default directory.  Appendix E contains a listing
                     of the directory of the distribution media.  The
                     following two examples show how the files are extacted
                     from distribution media.

                     * From the cassette drive (on the Sun)


                              % tar xvf /dev/rst0


                     * From a magnetic tape drive (either system)


                              % tar xv


            Step 5 : Remove the distribution media.
                     This completes the loading of the distribution media.



          BUILDING VERSAPLOT COLOUR RANDOM

             Note: Before building, you may want to tailor some of
             the system defaults to suit your needs.  Possible default
             modification might be changing the units used, changing
             the default plotter model, or allowing for more than one
             controller.  To change any defaults refer to Section 3,
             System Tailoring before building Versaplot Color Random.

             You are now ready to build Versaplot Color Random.  Building
             Versaplot Colour Random is accomplished through the use of
             a master command file "colbld".  This master file executes
             three separate sub-command files.  Each subcommand file
             builds a different Versaplot module.  The command files
             delete any object files after the object file has been used.

             Having five separate subcommand files facilitates source
             modification in that the subcommand files can be executed
             individually.  Specific components of Versaplot Color Random
             can be rebuilt by executing a single subcommand file without
             rebuilding the entire package.  Each subcommand file, the
             module it builds, the default directory, and a brief
             functional description is listed in Table 4-1.













                                       6





             To invoke the command file that builds Versaplot Colour
             Random enter the command:


                    % colbld


             The command file builds all the Versaplot Colour Random
             modules.  Three additional command files are available
             to test the installation for monochrome and colour plotting
             and to release the software for all users of the system.

             After reading section 3, System Tailoring, and you modify any
             of the flags, you will need to rebuild the Phase 1 library.
             This is accomplished with the following command:


                   % col2v0.com




                        Table 4-1.  Command Files

                Command       Modules        Default       Description
               File Name       Built        Directory
             ------------------------------------------------------------
              (a) SUBCOMMANDS OF COLBLD:
             ------------------------------------------------------------
               col2v0.com    libcol2v0.a        .          Builds phase
                                                           1 library.
             ------------------------------------------------------------
               crfout.com    crfout             .          Builds phase
                                                           2 image.
             ------------------------------------------------------------
               rdump.com     rdump              .          Builds RDUMP
                                                           utility
             ------------------------------------------------------------
              (b) OTHER COMMAND FILES:
             ------------------------------------------------------------
               release.com    (none)         /usr/local/lib/libcom2v0.a
                                             /usr/local/crfout
                                             /usr/local/rdump
             ------------------------------------------------------------
               testmon.com   chrsum             .          Test progs
                             grdton                        (monochrome)
                             scn35k                        for all
                             volts                         plotters.
             ------------------------------------------------------------
               testcol.com   clracc             .          Test progs
                             clrtbl                        for colour
                             colour                        plotters.
             ------------------------------------------------------------





                                       7




          Appendix A :  The headers on the example programs are different,
                        but the programs are the same except for the
                        initial comments.

          Appendix B :  The messages up to page B-14 are the same, page B-14
                        should be replaced by the following:


                        The following error messages can occur when
                        reading or writing the intermediate file:

                        VERSAPLOT ROPEN fails: (UNIX system message)
                        VERSAPLOT RREAD fails: (UNIX system message)
                        VERSAPLOT RWRIT fails: (UNIX system message)

                        The user should refer to the appropriate UNIX
                        manuals to find the reason for these errors.


                        The following error message can occur when
                        phase 2 of the library is trying to connect
                        to the Versatec plotter:

                        VERSAPLOT ATTACH fails: (UNIX system message)

                        Again the user should refer to the appropriate
                        UNIX Manual to find the reason for the error.


          Appendix C :  No changes

          Appendix D :  Replace with the following page



























                                       8



                                                                 APPENDIX D
                                           OUTPUT PROCEDURE QUICK REFERENCE

          Step 1  Compile (and load) the application program.
                     (If software global)         (If software local)


                   % f77 applic.f -lcol2v0      % f77 applic.f libcol2v0.a


          Step 2  Using the following command set the environmental
                  variable RANDOM to the file specification into which you
                  wish to store the intermediate plot data.


                          % setenv RANDOM applic.ran


                  If the environmental variable RANDOM is not defined,
                  Versaplot Random defaults to the file RANDOM.RAN in your
                  curent directory.


          Step 3  Execute your program using the following:


                          % a.out


                  If the program image has been placed in a named file,
                  this name is given, rather than a.out.  If the image
                  file is in another directory, this directory should be
                  included in the users path, "printenv" gives details of
                  the current path settings.


          Step 4  To output plot data from the intermediate file, set the
                  environmental variable VEROUT to the desired output
                  device.


                         % setenv VEROUT /dev/vp0



          Step 5  To produce a plot, issue the following command:


                         % crfout



          Step 6  CRFOUT reads the file assigned to the environmental
                  variable RANDOM.  If this file contains more than the
                  maximum number of elements, CRFOUT sorts it into bands
                  CRFOUT then writes the data to the device assigned to
                  VEROUT.



                                       9



                                                                 APPENDIX E
                                                     DISTRIBUTION DIRECTORY


               Protections   Owner        Size Date         Name
               -----------------------------------------------------
               -rw-r--r--  1 shape        4372 Aug 11 12:07 author.f
               -rw-r--r--  1 shape        9661 Aug 11 12:07 axis.f
               -rw-r--r--  1 shape       43944 Aug 11 12:07 band.f
               -rw-r--r--  1 shape       49783 Aug 11 12:07 blkdta.f
               -rw-r--r--  1 shape        5509 Aug 11 12:07 carc.f
               -rw-r--r--  1 shape       34322 Aug 11 12:07 change.f
               -rw-r--r--  1 shape        2577 Aug 11 12:07 chrsum.f
               -rw-r--r--  1 shape       15411 Aug 11 12:07 circle.f
               -rw-r--r--  1 shape        8445 Aug 11 12:07 clip.f
               -rw-r--r--  1 shape        7253 Aug 11 12:07 clracc.f
               -rw-r--r--  1 shape        2519 Aug 11 12:07 clrtbl.f
               -rwxr-xr-x  1 shape        3103 Aug 11 12:07 col2v0.com
               -rwxr--r--  1 shape         111 Aug 11 12:07 colbld
               -rw-r--r--  1 shape       14332 Aug 11 12:07 colour.f
               -rw-r--r--  1 shape       25698 Aug 11 12:07 convex.f
               -rw-r--r--  1 shape       22313 Aug 11 12:07 convx.f
               -rw-r--r--  1 shape        4431 Aug 11 12:07 copies.f
               -rwxr-xr-x  1 shape      138076 Aug 11 12:40 crfout
               -rwxr-xr-x  1 shape         302 Aug 11 12:09 crfout.com
               -rw-r--r--  1 shape       13459 Aug 11 12:07 curve.f
               -rw-r--r--  1 shape        3160 Aug 11 12:07 cut.f
               -rw-r--r--  1 shape        4366 Aug 11 12:07 cwtv.f
               -rw-r--r--  1 shape        4508 Aug 11 12:07 dashln.f
               -rw-r--r--  1 shape        6816 Aug 11 12:07 defclr.f
               -rw-r--r--  1 shape        6883 Aug 11 12:07 defpat.f
               -rw-r--r--  1 shape       10161 Aug 11 12:07 defpen.f
               -rw-r--r--  1 shape       11142 Aug 11 12:07 drwpen.f
               -rw-r--r--  1 shape        5806 Aug 11 12:07 ellips.f
               -rw-r--r--  1 shape        4278 Aug 11 12:07 factor.f
               -rw-r--r--  1 shape        1484 Aug 11 12:07 get16.f
               -rw-r--r--  1 shape        3218 Aug 11 12:07 getfre.f
               -rw-r--r--  1 shape        2291 Aug 11 12:07 grdton.f
               -rw-r--r--  1 shape       15105 Aug 11 12:07 grid.f
               -rw-r--r--  1 shape        4052 Aug 11 12:07 ibchnk.f
               -rw-r--r--  1 shape        1029 Aug 11 12:07 iram.c
               -rw-r--r--  1 shape      382904 Aug 11 12:40 libcol2v0.a
               -rw-r--r--  1 shape        7811 Aug 11 12:07 line.f
               -rw-r--r--  1 shape       45066 Aug 11 12:07 msglg1.f
               -rw-r--r--  1 shape        6358 Aug 11 12:07 msglg2.f
               -rw-r--r--  1 shape       10482 Aug 11 12:07 newpen.f
               -rw-r--r--  1 shape        9881 Aug 11 12:07 number.f
               -rw-r--r--  1 shape        6617 Aug 11 12:07 ochunk.f
               -rw-r--r--  1 shape        4184 Aug 11 12:07 ocode.f
               -rw-r--r--  1 shape        4029 Aug 11 12:07 offset.f
               -rw-r--r--  1 shape        6140 Aug 11 12:10 output.c
               -rw-r--r--  1 shape        8363 Aug 11 12:07 outvec.f
               -rw-r--r--  1 shape        5928 Aug 11 12:07 paper.f
               -rw-r--r--  1 shape        7451 Aug 11 12:07 penclr.f
               -rw-r--r--  1 shape       43252 Aug 11 12:07 plot.f
               -rw-r--r--  1 shape       19790 Aug 11 12:07 plots.f
               -rw-r--r--  1 shape        2044 Aug 11 12:07 random.f



                                       10




               Protections   Owner        Size Date         Name
               -----------------------------------------------------
               -rwxr-xr-x  1 shape      156829 Aug 11 12:43 rdump
               -rwxr-xr-x  1 shape         241 Aug 11 12:07 rdump.com
               -rw-r--r--  1 shape       43545 Aug 11 12:07 rdump.f
               -rw-r--r--  1 shape       18001 Aug 11 12:07 rect.f
               -rw-r--r--  1 shape        4000 Aug 11 12:07 riopkg.c
               -rw-r--r--  1 shape        2808 Aug 11 12:07 rotate.f
               -rw-r--r--  1 shape        5315 Aug 11 12:07 rpmcap.f
               -rw-r--r--  1 shape        7967 Aug 11 12:07 scale.f
               -rw-r--r--  1 shape        4285 Aug 11 12:07 scn35k.f
               -rw-r--r--  1 shape        4971 Aug 11 12:07 setfnt.f
               -rw-r--r--  1 shape        2792 Aug 11 12:07 setfre.f
               -rw-r--r--  1 shape        1235 Aug 11 12:07 setmsg.f
               -rw-r--r--  1 shape        3589 Aug 11 12:07 setpat.f
               -rw-r--r--  1 shape        1708 Aug 11 12:07 stor16.f
               -rw-r--r--  1 shape        2323 Aug 11 12:07 strvrf.f
               -rw-r--r--  1 shape       28977 Aug 11 12:07 symbol.f
               -rwxr-xr-x  1 shape        1564 Aug 11 12:07 testcol.com
               -rwxr-xr-x  1 shape        1668 Aug 11 12:07 testmon.com
               -rw-r--r--  1 shape        4268 Aug 11 12:07 tonclr.f
               -rw-r--r--  1 shape       30934 Aug 11 12:07 tone.f
               -rw-r--r--  1 shape        2381 Aug 11 12:07 tonflg.f
               -rw-r--r--  1 shape       18257 Aug 11 12:07 trap.f
               -rw-r--r--  1 shape        2063 Aug 11 12:07 volts.f
               -rw-r--r--  1 shape       24644 Aug 11 12:07 vpinit.f
               -rw-r--r--  1 shape       42028 Aug 11 12:07 vpopt.f
               -rw-r--r--  1 shape        7914 Aug 11 12:07 vport.f
               -rw-r--r--  1 shape       23154 Aug 11 12:07 vrfplt.f
               -rw-r--r--  1 shape       14973 Aug 11 12:07 vstrip.f
               -rw-r--r--  1 shape        4226 Aug 11 12:07 vtec.f
               -rw-r--r--  1 shape        4721 Aug 11 12:07 wbchnk.f
               -rw-r--r--  1 shape        3425 Aug 11 12:07 where.f
               -rw-r--r--  1 shape        6794 Aug 11 12:07 window.f
               -rw-r--r--  1 shape       18518 Aug 11 12:07 xcircl.f
               -rw-r--r--  1 shape       11288 Aug 11 12:07 xstrip.f
               -rw-r--r--  1 shape       20822 Aug 11 12:07 xtext.f






















                                       11



                                                                 APPENDIX F
                         NOTES ON THE SYSTECH BOARD AND THE SUN WORKSTATION


























































                                       12




