date: December 6, 1985 to: HGraph DECUS Users from: Dennis V. Jensen Ames Laboratory 310 Metallurgy Ames, Iowa 50011 515/294-4823 subject: HGraf4 - An HGraph DECUS Update for Virtual. 1.0 The History of DECUS Hgraph. The initial DECUS release of HGraph was at the Fall 1983 Symposium. Release one was coded entirely in DEC Fortran 66 compatible code. The second release was distributed at the Spring 1984 symposium. Included in the second release was a new WRTSTR (extracted as WRTST2.*) which would generate characters as vectors (stroke font); it was not dependent on any particular terminal's character generator. Also, included was a cubic spline interpolation line drawing routine (extracted as SMOOTH.*) which was compatible with the DASHLN calling convention. HGR550 files on this distribution support the Visual 550 (TEK4014 compatible) and the Houston Instruments DMPL plotters. The third release (Fall 1984) included support for REGIS compatible terminals. It was initially developed for the VT-125 terminal although it should work with other REGIS compatible terminals. Refer to the NOTES.125 file for information on which modules were modified to adapt Hgraph to this terminal. Only partial Hgraph funcionality is in this version. The HGR125 files support a REGIS terminal and the Houston Instruments DMPL plotters. Releases two and three were simultaneously released to the VMS and RSX SIG tapes. The source code is transportable, although, a problem arose with the HGR125.Flx on VMS as the Flecs translator wrapped some comments beyond column 72 into invalid statements. This version if moved will still have this problem as the RT Flecs files have not been changed. 2.0 Hgraph Release 4 - Virtual array support. Hgraph release four is a simple update that provides subroutines that will expect the X and Y coordinates to be passed as virtual arrays. The use of virtual arrays allows the PDP-11 HGRAPH user to access more program memory without the need to overlay. This HGraf4 - DECUS HGraph - Support for Virtual PAGE 2 often makes the use of virtual arrays preferable over real arrays for those who can use them. Who can and should use virtual arrays? If you're running on a PDP-11 computer which has extended memory support (i.e. more than 64K of memory is present on the machine) and your FORTRAN compiler was built to include virtual array support, then you can be using virtual arrays when running Hgraph. Programs using virtual arrays are also portable to VAX FORTRAN without modification; however, VAX FORTRAN treats a virtual array like any other array; nothing is gained (or lost) by using virtual arrays on a VAX. In addition to the standard routines contained in Hgraph, there are 3 new subroutines: VLINE, VDASHLN, and VSMOOTH which are exactly analogous to the LINE, DASHLN, and SMOOTH except that the X() and Y() coordinate arrays are declared as VIRTUAL. The calling sequence is identical; all that must be modified is the Hgraph routine name and the declaration statement for the X() and Y() coordinate arrays. For example: ! (Not Virtual) ! (Virtual) PROGRAM MAIN PROGRAM MAIN REAL TEMP(20), Z, X(300), Y(300) REAL TEMP(20), Z VIRTUAL X(300), Y(300) CALL INIPLT(...) CALL INIPLT(...) . . . . . . CALL DASHLN(X,Y,N,...) CALL VDASHLN(X,Y,N,...) . . . . . . CALL ENDPLT CALL ENDPLT END END Some special considerations must be taken into account when using virtual arrays; therefore, one should consult the FORTRAN Reference Manual. (See the section concerning the VIRTUAL declarator.) This is particularly important if the X() and Y() virtual arrays are to be passed to other non-Hgraph routines. If you are able to use virtual, than you may also want to reassign Fortran unit 1 to a virtual memory device (i.e, VM:). SMOOTH uses unit 1 as a scratch file during execution. 3.0 Hgraph Development Environment. Hgraph is coded in FLECS. This structured Fortran code is contained in the .FLX files. The FLECS generated Fortran 66 code is in the .FOR files. The HGraf4 - DECUS HGraph - Support for Virtual PAGE 3 HGraph document is in the HGraph.DOC file with the associated Runoff file as HGraph.RNO. An RT-11 FLECS translator FLECS*.Dsk should also be on this RT tape. I submitted a corrected version of what I know to be the most recent release. (It fixes the use of tabs.) Refer to the VAX Fall 82 SIG Tape [VAX82B.FORDAERO.UTIL.FORDUTIL] (or something to this effect) for a VMS FLECS translator. Other Flecs translators are available from SIG tapes and the DECUS library. To build an Hgraph library, use the .BLD file that relates to your configuration. You must have a Flecs translator installed on the system disk to do this. Alternatively, you can compile the .FOR files that have been included and build a library from these objects. 4.0 Three Dimensional Plots. PLOT3D.FOR is included as a separate file. A FLECS version is not included as it does not exist. PLOT3D is somewhat limited in what it can handle: it has trouble with stiff data (large variations in the magnitude of the coordinates); it has projection problems at the window edge; and there is a menacing floating divide by zero that might pop up (probably as a result of stiff data). PLOT3D should be treated as unsupported. If you should work on it and think you have its limitations fixed, I for one would like to have a copy. 5.0 So whats new - this is the same old Hgraph. In general, you will find that the source code is quite transportable to other operating systems, especially if you transport the .FOR files. Hgraph was designed to provide graphics support on small systems but is quite extendable to larger systems. In fact, much of what has happened with products layered on top of Hgraph has been developed on a VAX. An interactive graphics editor called UGraph is on the Fall 85 VMS Sig tape in the SKUNK root directory. Only the executable is released at this time. (I'm looking at overlaying the Ugraph code for use on an RT-11 or probablly a TSX-Plus system). It is menu driven and requires no programming. 6.0 Things to Watch Out for when Using Hgraph. The following notes relate primarily to Hgraph on RT-11 (small) systems. They are included as they may help you isolate setup problems: HGraf4 - DECUS HGraph - Support for Virtual PAGE 4 When using HGRAPH it is common to encounter the message "LINK-F-Library list overflow". Increase the library list size with the /P switch when linking. For example: r link prog/P:400=prog,sy:hgraph A run-time error when using HGRAPH is "?MON-F-Trap to 4 NNNNNN" or "Stack Overflow". This message likely indicates a lack of program stack space. The solution is to increase the amount of program stack space using the /B linker option. For example: r link prog/B:1400/P:400=prog,sy:hgraph The default value of B is 1000 octal. This problem will often be encountered when using threaded code. 7.0 Disclaimer. All code included in this distribution is in the public domain and may not be marketed for profit. It may be altered without the explicit permission of the authors. Any corrections or significant modifications to HGraph are of interest to the authors and may be communicated to the address above. The authors and their employers assume no responsibility for the correctness or the appropriatness of the software included in this distribution.