VT125 HGRAPH General Information ------------------- In the VT125 version of HGRAPH the VT125 screen is defined to have the same number of pixels per nominal inch as the Visual 550. A consequence of this is that the size of the VT125 plotting page is reduced to 10.2 by 6.3 nominal inches. These are the dimensions that should be used when calling INIPLT if it is desired to utilize the entire screen. The code that drives the VT125 is a slightly modified copy of the 550 code. Thus the logical unit number of the VT125 is the same as the logical unit number of the 550 (logical unit number 7). Additional modifications not documented here will have to be made to create an HGRAPH library that supports both the VT125 and the 550. Since HGRAPH was designed to work with a variety of physical plotting devices, its subprogram modules are divided into device dependent modules and device independent modules. It should only be necessary to modify the device dependent routines to provide HGRAPH support for the VT125. Additional modifications may be necessary when using an older model DM/PL single pen HIPLOT plotter. All the executable statements in subroutine COLOR should be removed, and all P, E, and F commands contained in plotter messages in the INIPLT and ENDPLT routines should be removed. The command 'UH @' is recommended as the command to be sent to the plotter in subroutine ENDPLT. VT125 HGRAPH PAGE 2 The Visual 550 and VT125 also appear to have differences regarding the ability to independently display text and graphics planes. The VT125 seems to always display both text and graphics. If this is undesirable, it is possible to control this to a certain extent from inside the program using the modified HGRAPH routines. Subroutine erase will clear the graphics plane. Subroutine plton will, in addition to entering graphics mode, clear the text plane. If it is desireable to clear the text screen and remain in text mode, this can be accomplished by calling plton followed immediately by calling pltoff. The file CLEAR.DAT has been provided to clear the graphics screen from outside the control of the program. To clear the graphics screen simply enter TYPE CLEAR.DAT. A couple of problems commonly occur when using HGRAPH. When a program is linked with the HGRAPH library it is common to see the linker error message LIBRARY LIST OVERFLOW INCREASE SIZE WITH /P. The run time error message STACK OVERFLOW may also be encountered. The solution to these problems is to use the following commands when linking programs with HGRAPH: r link <.sav file name>/P:400/B:1400= If the errors persist, the values 400 and 1400 can be increased. VT125 HGRAPH PAGE 3 Since the VT125 does not recognize graphics commands unless they occur between the two commands to enter and exit REGIS (plton and pltoff), and since these commands may be used to control the text plane, if calls to HGRAPH routines result in a lot of garbage characters being printed on the terminal it will be due to the fact that plotting was disabled and not reenabled before calling plotting routines. The routines that implement cursor control, character reading routines, and interactive legend developing routines are not supported. Do not attempt to use these routines. They will not be included in the library built using this version of HGRAPH. An indirect command file is provided to compile the HGRAPH source and build the library HGRAPH.OBJ. To create the HGRAPH object library enter the command @HGRAPH.BLD. VT125 HGRAPH PAGE 4 Device Dependent Routine Modifications -------------------------------------- CIRCLE : The subroutine circle is implemented by ENCODEing a REGIS command to move to the location specified by the parameters IX and IY. The y coordinate is adjusted to account for the difference in screen origin locations between the two terminals. A circle is then drawn by ENCODEing the circle radius into the regis circle command and sending this message. Since the 550 version of HGRAPH used routines implemented in the terminal itself to draw circles, it was necessary to use the REGIS circle drawing command also. A result of this is that circles drawn using the VT125 version of HGRAPH will be of lower quality than circles drawn using the 550. In addition, since the terminal implements the actual circle drawing, circles will be plotted without regard to defined pages, frames, and windows. VT125 HGRAPH PAGE 5 ERASE : Graphics mode characters to clear the VT125 screen have been substituted for 550 control characters. S(E) INIPLT : Iniplt was changed to call plton to enable graphics. This call replaced outputting specific 550 characters intended to cause a particular type of entry into alphagraphics mode. PENDWN : Modified to only save up/down status of pen. The REGIS equivalent of a pen position is determined by a command that accompanies the graphics coordinates. This status is looked at to determine the proper type of command to accompany the coordinates when a screen position change is made. PENUP : Modified to only save updown status of pen. See notes accompanying PENDWN. VT125 HGRAPH PAGE 6 PLOT : The modifications to suboutine plot represent the only significant changes to the HGRAPH source where the code was actually changed instead of replaced by a REGIS equivalent. The changes reflect the fact that the 550 interprets graphics coordinates relative to the particular state that it is currently in (ie vector mode, point-plot mode, etc.). Regis commands, on the other hand, contain a command character along with the graphics coordinates that indicate what action is to be taken (ie draw a vector, plot a point, etc.). Another difference is that the origin of the REGIS plotting page is at the upper left-hand corner while the 550 origin is in the lower left-hand corner. Plot calculates the proper point in the same manner for the VT125 as for the 550. When the screen coordinates have been calculated the y coordinate is subtracted from 479 to account for the difference in screen origin locations. The coordinate values are then ENCODEd into the proper type of REGIS message based on the up/down status of the pen and output to the terminal. The current screen location is saved as a 550 screen coordinate. This routine should be the first place to look for correcting bugs in the VT125 version of HGRAPH. VT125 HGRAPH PAGE 7 PLTOFF : Pltoff was modified to output the REGIS graphics command terminator ESC\ to exit graphics mode. When pltoff is called the cursor is also homed and lowered to the bottom line of the screen. This is done in an attempt to keep possible subsequent program generated output from immediately overwriting the plot. PLTON : Plton was modified to output the start of a REGIS command string (ESC P p). This causes any subsequent characters output to be interpreted as REGIS commands until the graphics string terminator is encountered. Each time plton is called the text screen is cleared. WRTSTR : The subroutine wrtstr in the hgraph flecs source was replaced with the contents of the file wrtst2.flx. This subroutine generates its own characters instead of using terminal generated characters. Including this routine adds simplicity to the modification at the expense of a certain loss of character quality. VT125 HGRAPH PAGE 8 Routines Not Requiring Modification. ------------------------------------ COLTYP DEFWIN DMPPLT ENDPLT MARKER WRITCH Unsupported Routines -------------------- CONLGN CURSON DEFWIN FNDCUR GETSTR PUTCUR REDSTR