******************************************************************** * * * PLOT84 VAX/VMS TRILOG AND VT640 PLOTTING SOFTWARE * * * * A.D. McLachlan JUNE 1984 . Last updated 2 OCT 1986 * * * ******************************************************************** FOREWORD -------- This write-up is designed to tell you everything you need to know about the PLOT84 system without actually looking inside the programs. If you do not want to read all this and have already used PLOT82 and only write trivial programs you can skip straight to the examples in section 5 and look at the conversion notes in Section 9. If you have a little more patience please read Section 1 quickly through and then try to understand the ideas in Section 2 before you write any elaborate programs. If you plan to do anything with the plot file look at Section 3. Section 4 gives an outline of what is available. You will generally find it simplest and most effective to use the routines marked with (*). If you plan to do anything serious with text plotting, where the sizes and positions are important to you, read sections 2.4 to 2.6 rather carefully. The program QUICKPLOT is useful as an easy way of experimenting with the routines without actually writing your own program. Try it. It is easy to use. Nothing is guaranteed to work perfectly yet, but all the routines in Section 4 (the public routines) are believed to perform as described. The plot file format will only be altered by enlarging the code, but any future changes should be upwards compatible with the present code. The additional routines in Section 7 are not guaranteed and may be changed without notice, as also the contents of the COMMON blocks. The extra user routines in Section 8 will be added to from time to time, and are intended to remain stable. After a reasonable running-in period the old PLOT82 routines will be withdrawn from use, and the lookalike versions substituted. After a longer period it is hoped that all programs which now use PLOT82 will have been converted to PLOT84. 1. INTRODUCTION TO THE SYSTEM ----------------------------- 1.1 Scope of the package ------------------------- PLOT84 is a set of low-level two-dimensional line plotting subroutines in a library which can be linked into a user's FORTRAN program. It is designed to handle line plotting on the VAX/VMS with output to the TRILOG dot matrix printer or the VT640 terminal screen. Plots can be constructed either via a PLOT FILE, which is saved and converted into print or screen output later, or plotted interactively and sent direct to the VT640 screen. Information from the screen can also be dumped directly onto the printer. Picture elements can be transferred between disc files and the terminal. The program TRILOG is provided to convert a plot file into a printed picture on paper. The program VIEW displays the contents of the plot file on the VT640 screen, where it can also be converted into an image on the TEKTRONIX electrostatic copier. The program VIEWAED displays a plot file on the AED raster graphics screen. The program SCRPRINT dumps a screen picture onto the printer dot by dot. The programs SCRSAVE and SCRFILL transfer VT640 screen pictures to or from disc. The program POSTER is useful for drawing large lettering. The program CURVY plots simple graphs with automatic control of the scaling and axis labels. The coordinate systems for line and character drawing, with the rules for viewport and window control, are based on the ideas in the Cambridge University low-level graphics package, but without the same subroutine names. All line vectors and point dots are clipped to lie in the plotting area and no out-of-bounds plot errors should escape detection. Text is drawn in the form of line vectors which are sent to the plot file or output device. This makes the output largely independent of the output device at a cost of using many vectors for each character. Several text founts are available and these include some symbols, suitable for graph markers or for mathematical output. Text character sizes are freely variable. Routines are provided to draw character strings, to centre text, to plot the integer or decimal digits of numbers. 1.1.1 Subroutine names To avoid clashes with other subroutine library names all the PLOT84 subroutine names are of the standard form PLT$abcd, where 'abcd' is different for each routine (e.g. PLT$MVTO, PLT$DWTO ). Communication between the routines is largely through named COMMON blocks. Each block has a name of the form /PLT$$ABC/ (e.g. /PLT$$UTR/, /PLT$$CHX/ ). See TABLE 1.1 for details of the COMMON blocks and their contents. The terminal driver routines have names of the type PLT$abTM where 'ab' is different for each routine. The FORTRAN source of all the routines, and the device driver routines is kept in the text library PLOT84.TLB. Individual sections can be examined by using the utility commands LIBRARY/LIST/FULL PLOT84.TLB and extracted by using LIBRARY/EXTRACT=PROGNAME/OUTPUT=PROGNAME.FOR PLOT84.TLB. Use EXTRACT=* to get the whole source in one file. Routines named PLT$abcd are named PLTabcd in the library so that they can be extracted with a legal filename. Note that the character "$" is not allowed to be part of a VAX filename. 1.1.2 Other subroutine libraries The PLOT84 system also calls on some other subroutine libraries. These are: (1) The DISKIO package of direct access routines QREAD,QWRITE etc, used for access to the plot file. These are stored in [PUBLIC.LIB]MODLIB.OLB. (2) The TRILOG printer driver routines, which convert lines of dots into printed output. A version of these is in PLOT84.OLB. (3) The screen driver routines which draw lines on the screen. A version of these is in PLOT84.OLB. To link a user program to the system, use the following command: LINK PROG.OBJ,PLOT84.OLB/L,[PUBLIC.LIB]MODLIB.OLB/L Here "PROG" is the name of the user's program. At present PLOT84.OLB is in [PUBLIC.LIB]. 1.1.3 PLOT84 compared with PLOT82 The PLOT84 routines are designed to supplement and replace the PLOT82 system written by D.A. Agard. They allow for both interactive and non-interactive plotting and could be extended to drive other devices. The dimensions of the plots are now all in millimetres instead of a mixture of inches and millimetres. The rules for scaling, plot windowing, and character size control have been corrected to remove a number of logical faults. The old character-centering routines never worked because the authors did not understand how the fount tables were designed. All text plotting uses "character" types of variable (except for a few special routines for users who will not use them) The VT640 routines written by T.S. Horsnell have been modified in a number of detailed ways to try to overcome inconsistencies in the functioning of the terminal (which does not do all of the things described in the manual). Some problems have been overcome by putting in short time delays. The PLOT84 versions have been renamed. Some new options have been provided. The TRILOG program has been made more efficient by dividing the plot area into rectangular bricks. The plot file output codes have been simplified and augmented. The plot file header format has been enlarged to include more information about the conditions under which the file was produced. The line clipping and raster line drawing routines are new and better. The TRICOLOUR program has been changed but not properly tested. The VIEW program has new options with greater user control. The VIEWAED program has been updated with minimal changes. The POSTER program has new options, including uniform letter spacing for drawing up tables of data. The CURVY program has been rationalised to work with scaling in millimetres and give a tidier output style. The new CURVY includes the special options previously provided by CURVYF and CURVYV. The VT640 SCRPRINT program now works reliably. 1.1.4 PLOT82 lookalike routines A set of PLOT82 lookalike routines is provided for those users who do not want to alter their own programs. However these routines are unable to correct all the bugs in PLOT82 or allow the new options to work fully. Programs which are used often will usually be worth converting to PLOT84 and may not need many changes. Conversion may be more difficult if the old program uses complicated changes of scale or if it uses special tricks to centre character strings. 1.1.5 Conversion of user programs from PLOT82 to PLOT84 See Section 9 for some simple guidelines 1.1.6 Future additions to PLOT84 The PLOT84 system is still a low-level set of routines, of a rather simple type. A number of extra service routines to draw circles,ellipses and other simple objects may soon be added. Routines for drawing dashed lines or thick lines may be added. More distant developments could be routines to handle concatenated scale transformations in stacks, concatenated window-viewport mappings, raster area filling, and three-dimensional plotting. 1.1.7 TRILOG and TRICOLOUR conversion note NOTE (1): The old TRILOG program will not work with the new routines, because of the change in the plot file format. The plot file header now contains a password which is checked to see whether it is a valid PLOT84 file. A new TRILOGQ program is also available. NOTE (2): The old TRICOLOUR program for colour plotting on the printer also will not work with the new routines. A new version is in preparation. 1.2 Output Devices ------------------ PLOT84 allows for both interactive plotting (on the VT640) and deferred plotting into a plot file. Later the plot file can be converted into an image on the device. At present three devices are recognised: (1) Undefined. The device is undecided yet, and information is held in the plot file in a form which is suitable for any device. The plot file is scaled to allow maximum precision, with a dot raster of 10 dots per mm. The plot area can be up to 3276.7mm wide in each direction. (2) Paper plot on the TRILOG. The plot file is normally scaled to fit the size of the paper, and with a dot raster of 100 dots per inch. The paper is assumed to be 330mm wide (approx 13 inches) and up to 2032mm (80 inches) long. See TABLE 1.2 for details of the raster layout (3) Screen plot on the VT640. The plot file is normally scaled so that the screen area used ( and copied on the TEKTRONIX copier) is 165.0mm wide and 139.5mm high (approx 6.5 by 5.5 inches). The VT640 machine uses a curious scaling raster in which memory dots are converted to physical dots with different scale factors in x and y. The plot file uses a dots-per-mm scale which achieves correct size reproduction. The default option is to do deferred plotting on the plot file as for the TRILOG printer. NOTE: The TRILOG and VIEW programs are able to deal with any reasonable dot raster scaling in the plot file, at the cost of some round-off loss of detail. 2. COORDINATES AND SCALING CONVENTIONS --------------------------------------- This section gives a general description of how the system works. The write-up here closely follows the Cambridge University one. The individual routine descriptions are given in Section 6. 2.1 Coordinate systems ---------------------- 2.1.1 Drawing board space The drawing board is an imaginary rectangular area on which the drawing of each object is placed. It is a 2-dimensional plane with Cartesian coordinates (XB,YB) measured in millimetres (mm). The origin is at the lower left corner of the drawing board. No negative coordinates are allowed. ^ Drawing board space (mm) | DWLIMY +----------------+ | | | | YB | | | | | | | | o----------------+--> XB DWLIMX Drawing board coordinates lie within the limits XB = (0.0 to DWLIMX) YB = (0.0 to DWLIMY) where DWLIMX,DWLIMY are the dimensions of the board. The drawing board coordinates are analogous to the World coordinates used in the Cambridge system, except that the limits are in millimetres. This difference gives the possible advantage that the user enjoys a more direct link between the coordinates and the actual size of the plot. The values set for the board size depend on the output device (see later) and can be altered by the user if desired. The current settings are Device Default Size (X,Y) Max Permitted Size 1. Undefined 330.0 * 508.0 3276.6 * 3276.6 2. Paper plot 330.0 * 508.0 335.0 * 2032.0 3. VT640 165.0 * 139.5 165.0 * 139.5 It is not necessary to use the whole drawing board area, and plots are normally clipped to fit into a DRAWING BOARD WINDOW set by the user. 2.1.2 Device space Device space is defined as a rectangular area with dimensions in mm which are set to suit the range of the device. Coordinates in device space are continuous real variables (XV,YV) and must lie in the range XV = ( 0 to DVLIMX ) YV = (0 to DVLIMY ) It is not necessary to use the whole device area, and plots are normally projected into a DEVICE VIEWPORT area set by the user. The device sizes used by PLOT84 are (1) Undefined 3276.6 by 3276.6 mm (2) Paper 335.0 by 2032.0 mm (3) VT640 165.0 by 139.5 mm The image on the drawing board is mapped onto device space before being converted into plot raster coordinates. 2.1.3 Plot raster space This is a space of integer coordinates on a grid of dots with values (IX,IY) which are in the range of INTEGER*2 variables, i.e. from 1 to 32767 (2**15 - 1). Zero or negative coordinates are not allowed. Positions in device space are converted to plot raster space before they are entered into the plot file or sent to a device. The scaling in raster space is defined by the number of dots/mm in the X and Y directions. This depends on the device type. Values set are normally (1) Undefined 10.0 and 10.0 (2) Paper 10.0/2.54 and 10.0/2.54 = 100 dots-per-inch (3) VT640 5.33333 and 5.41935 = 3.333 physical dots-per-mm Note that with a scale of 10.0 dots/mm the maximum real device coordinate is limited to 3276.7. In PLOT84 the limit is set at 3276.6 to avoid trouble from round-off errors. The header record of the plot file contains information about the size of the plot, including the range of raster used (IXMIN,IXMAX,IYMIN,IYMAX) and the dot scales (DTMMX,DTMMY). 2.2 Transformations ------------------- Two types of transformations of objects are used. These are windowing transformations and geometric transformations. 2.2.1 Windowing transformations Windowing transformations are produced by mapping a rectangular area (the window) in one space onto a rectangular area (viewport) in another space. In PLOT84 two windowing transformations are performed. The first is the mapping of the drawing board window area onto the device viewport (both with coordinates measured in mm). The two rectangles are parallel, but not necessarily of the same shape. The actual transformation used always preserves the correct proportions of the object, with the same scale conversion factors in the X and Y directions. The second windowing transformation maps the image in device space onto the integer grid of plot raster space. The drawing board bounds for the window are defined as XB = ( UBXMIN to UBXMAX ) YB = ( UBYMIN to UBYMAX ) These bounds must lie on the board itself, and are strictly enforced for every plotted vector or dot to ensure that no object falls outside the limits. The windowing transformations are checked to ensure that an object which lies within the drawing board bounds will also automatically be in the plottable viewport range of the device. The device viewport bounds are defined as XV = ( DVXMIN to DVXMAX ) YV = ( DVYMIN to DVYMAX ) They must lie on the allowed device area. The mapping of the device viewport onto the plot raster grid takes the origin (1,1) of the grid to be the lower left corner of the viewport (DVXMIN,DVYMIN). This ensures that all of the viewport falls within the allowed raster limits 1-32767 in each direction. The mapping of the drawing board onto the device viewport is arranged so that every plotted point in the window will lie in the plottable device range. PLOT84 allows the option of fixed or floating scales and fixed or floating origins. With fixed origins the mapping requires that the point (0,0) in drawing board space maps onto (0,0) in device space. Normally this is not wanted, and with floating origins the lower left corners of the two spaces are mapped together. Normally a fixed scale is used, so that the drawing board and device images are on the same scale of mm. With a floating origin the lower left corners of the window and viewport are matched up, and the drawing board bound trimmed at the upper boundaries if the plot is too big (a warning message will be issued). With a fixed origin the drawing board bounds will be trimmed at all sides, as required,to make the plot fit into the viewport, and sometimes the whole picture may be off the device (error messages will be given). With floating scales the mapping uses the largest scale that allows all of the drawing board to map onto the viewport (with a fixed origin the program may need to shrink the drawing board bounds at their lower limits and issue a warning message). Subroutines are provided to allow the user to set scaling and viewport dimensions. Otherwise default values are set which attempt to produce a workable choice. The user setting routines work by storing up the requested options until the picture starts to be drawn. At this point the options are examined in a set order and checked to prevent any part of the picture lying out of bounds. During picture drawing every vector is clipped on the drawing board. If the scaling and windows are correctly set this ensures that all objects later lie in the allowed range of the device. NOTE: Window and viewport settings are carried over from one picture to the next. They need not be reset each time. 2.2.2 Geometric transformations These are transformations applied to any object defined in drawing board space which are applied before it is drawn on the board. This type of transformation is sometimes called an object scaling transformation. Two sets of geometric transformations are available, one for drawing line objects (line mode) and the other for letter and symbol object (character mode). Line objects can therefore be defined in USER UNITS, while all lettering is defined in terms of CHARACTER UNITS. The transformations are achieved by multiplying the original object coordinates (XO,YO) by the geometrical transformation matrix, as defined below, to get the drawing board coordinates (XB,YB). ( XB ) ( A B U ) ( XO ) ( YB ) * ( C D V ) * ( YO ) (1.0 ) (0.0 0.0 1.0) (1.0 ) This 3*3 matrix form combines a 2*2 scaling matrix ( A B ) with a ( C D ) translation vector ( U,V ), since: XB = A*XO + B*YO + U YB = C*XO + D*YO + V The scaling matrix allows for both enlargements, rotations and shearing transformations. It is often convenient to define the scales in terms of simpler quantities. These are taken to be two scale factors FX,FY and two angles ANGX,ANGY. FX is the length in drawing board space of a line of unit length along the X axis of object space. ANGX specifies the direction of this line in drawing-board space, measured anticlockwise in radians from drawing-board X. Similarly FY and ANGY give the length and direction of a unit vector along the object Y direction. These definitions lead to the relations A = FX*COS(ANGX) B = FY*COS(ANGY) C = FX*SIN(ANGX) D = FY*SIN(ANGY) or conversely FX = SQRT( A**2 + C**2) FY = SQRT( B**2 + D**2) TAN(ANGX) = C/A TAN(ANGY) = D/B The names of the FORTRAN variables used for the scaling matrices are: Line objects- matrix USRMAT(3,3) factors SCALEX,SCALEY angles USANGX,USANGY Character objects- matrix CHRMAT(3,3) factors CHRSCX,CHRSCY angles CHANGX,CHANGY 2.3 Summary of spaces and transformations ----------------------------------------- The diagram below shows the relationship between the different coordinate systems and transformations: +----------+ +-----------+ | | | | | Line | | Character | | Object | | Object | | | | | +----------+ +-----------+ v v v v geometric object transformations v v +-------------------------+ +--------------------+ | | | | | Drawing Board Space | | Device Space | | (mm) | .>.>.>.>.>.>.> | (mm) | | WINDOW | Window-to | VIEWPORT | | | -Viewport | | +-------------------------+ transformation +--------------------+ (1) v v Window-to-viewport v transformation (2) v v INTERACTIVE ) +---------------------------+ DEVICE ) | | (VT640) ) <.<.<.<.<.<.<.<.| Plot Raster Space | Trilog ) | (integers 1-32767) | printer) <.<.<. ) <.<.<.<.<.<.<.<.| | PLOT FILE ) | | VT640 ) <.<.<. ) +---------------------------+ screen ) 2.4 Drawing Modes ----------------- Two drawing modes are defined in the system: line mode and character mode. Each mode has associated with it a scaling transformation ( in the form of a 3*3 matrix ) which is applied to objects. In line mode objects are specified in terms of their X,Y coordinates in USER UNITS in drawing board space, and the line mode transformations are applied to the defined object before it is drawn. In character mode, however, objects are specified in terms of their coordinates in CHARACTER UNITS relative to a point known as the "anchor point". The anchor point is set by the user before a character object is drawn. The effect is as if a new set of character coordinate axes have been set up with their origin at the anchor point. ^ Drawing Board ^ Drawing Board Y | Space Y | Space | | | | ^ | | y' | Character | Line mode | | coordinate | coordinate system | | system | | ----o------------> | | anchor| x' | | point | | | o------------------------> o-------------------------> X X Character objects can be scaled, rotated and sheared just like line objects. Note that an origin shift in the character transformation gives a further shift which is measured relative to the anchor point. Such an origin shift is seldom useful. The anchor point does not move except when it is reset by the user. Character plotting also uses a moveable pointer called the "character cursor". When the anchor point is positioned by the user the cursor is automatically set to lie at the anchor point. Every time a letter is plotted it is drawn at a position set relative to the cursor (usually the cursor defines the bottom left corner of the letter). When the letter is complete the cursor moves to the right automatically in preparation for the next letter. This makes it possible to plot whole character strings without resetting the anchor point. The movement of the cursor depends on the spacing option, either constant, or variable for each individual letter. Routines are provided for controlling the cursor. A "character linefeed" allows several consecutive lines of text to be plotted. Character objects fall into two classes. Letters and symbols. A letter is one of the ASCII characters, including numerical digits, and the cursor moves after it is plotted. A symbol is any other construction, such as a cross or square used for labelling points on graphs. The cursor does not move after drawing a symbol. Certain routines allow symbols to be treated as letters if required. The advantage of character mode is that it allows lettering to be drawn anywhere on the drawing board without altering the scales used by the line objects. The plotting system automatically changes from line mode to character mode as required. The user does not need to pay attention to this. The option is provided to allow character and line mode transformations to be coupled or uncoupled. The anchor point itself is defined from line mode, either in (line mode) user units or in mm on the drawing board itself. If the transformations are uncoupled then the character scalings are transferred direct to the drawing board. The lettering attached to a line object thus remains horizontal when the image of the line object is itself rotated. If the transformations are coupled the character transformation is first applied to the letter to produce a set of line vectors in line object space and then the line object transformation is applied afterwards. This means, for example, that labels attached to a graph maintain the same relative size and orientation when the graph itself is rescaled. 2.5 Graphical States --------------------- The various graphical states possible with the above modes are as follows: Line Mode --------- +-------------+ +--------------+ | Line object | apply line | | | | object | Drawing | | | transformation | Board | | |.>.>.>.>.>.>.>.>.| | | | | | +-------------+ +--------------+ Character Mode (uncoupled) -------------------------- +-------------+ +--------------+ | Character | apply | | | Object | character | Drawing | | | transformation | Board | | |.>.>.>.>.>.>.>.>.| | | | | | +-------------+ +--------------+ Character Mode (coupled) ------------------------ +-------------+ +--------------+ | Character | apply | Line object | | Object | character | space | | | transformation | | | |.>.>.>.>.>.>.>.>.| | | | | | +-------------+ +--------------+ v apply line v object v transformation v v +--------------+ | | | Drawing | | Board | | | | | +--------------+ 2.6 Text Generation -------------------- Text and symbol generating routines exist for plotting letters, text, and certain symbols in a picture. For each object they draw a set of line vectors which define the character or symbol. The vectors are often taken from a set of FOUNT TABLES which are part of the package. The characters of each fount are described within a rectangular box, the "character box" which is 1.5 units high and up to 1.0 units wide. The baseline for letters is 0.5 units up from the bottom of the box. Capital letters occupy the upper two-thirds of the box, while the descenders of some of the lower-case letters go down into the lower third. Y ^ Y ^ | | ^ |------------- |------- | | | | | | | /-\ | | 0 | | | / \ | | | | | / $ \ | | | | 1.5| | /-------\ | | | | | | / \ | | | | | o-------------*^---> X o-----+-*--> X | | || | | | | | ||0.5 | \___/ | | | || | | + ------------ + ------- <-------------> <-------> Variable width up to 1.0 Each character is positioned relative to the current position of the character cursor. There are two options for "centering" the character. The first places the left end of the baseline ( o on diagram above ) on the cursor position. The second puts the centre of the upper part of the box ( $ on diagram ) onto the cursor. As the cursor moves after each letter the characters in a string automatically chain onto one another. Each character can be drawn either with a fixed width of 1.0 units, or with a variable width of not more than 1.0 units as specified in the fount tables. Constant width is useful for drawing up tables and for centering symbols on graphs. The character transformation controls the width and height of the character, so that a character of 1.0*1.0 units may have any shape, and may be sheared. Shearing will normally also affect the character spacing, since this is measured in character units. Normal spacing consists in placing the adjacent character boxes side by side on the common baseline. There is an option for adding a further displacement of (CHRSPX,CHRSPY) units of dead space between each box and the next. Routines are supplied to draw character strings with correct centering referred to either the left side, the right side or the middle of the string. Special routines allow letters to be plotted obliquely with a spacing defined directly in user line units. The size of the letters is still in character units. Characters can be defined in three ways: as CHARACTER variables (the preferred method), as 'H format' real byte or integer variables, and as numbers defined in the ASCII code (see TABLE 2.1). There are five character founts (fount 1 is the best for normal use) Fount number Description 0 plain capitals. lower-case drawn as capitals 1 normal capitals and lower-case. Complete ASCII set 2 italic. Complete alphabet but not all other symbols 3 decorative invitation script. Alhabet and digits only 4 Greek upper and lower case See TABLE 2.2 for information about founts 1-4 The default character size is 3mm*3mm. The symbols are normally specified by number and come from two sets. At present they are rather a mixed lot, but they include a large selection of mathematical signs in set 2. An option is provided to specify symbols by an alphabetical character and treat the symbol as a special type of letter. Symbols are normally centred in the middle. See TABLE 2.3 for information about symbols 3. THE PLOT FILE ----------------- 3.1 File structure. The plot file is a direct-access file with a blocksize of 512 bytes. It is not accessed through FORTRAN input-output, but through a set of special DISKIO routines (QREAD,QWRITE etc), which organise all the operations needed to find any record or byte in the file. The file is defined by a FILE NAME or LOGICAL NAME [character*(*) variable] and has no FORTRAN unit number. Instead it is specified by a stream number IUNITP, determined by the DISKIO routines themselves. The operation of the DISKIO routines is designed to be invisible to the user. After the PLOT84 system is invoked a new plot file is created when the first picture starts to be drawn (except if plotting is interactive, when no plot file exists). The file can contain more than one picture. When plotting finishes the file is closed. In terms of the PLOT84 routines, a new file is created after the call to PLT$INIT at the first call to PLT$PICT and then closed by the call to PLT$STOP. If PLT$INIT is called a second time in the same job then a fresh plot file with a higher version number will be produced. The information for successive pictures appears consecutively in the file. Each picture has a header record followed by a variable number of data records. A typical plot file has the structure: Header of picture 1 (512 bytes) .... Data records of picture 1 (4 bytes) .... Header of picture 2 (512 bytes) .... Data records of picture 2 (4 bytes) .... Last header .... Last data record 3.2 The picture header ---------------------- The header is a block of 512 bytes which contains information about the contents of the picture. In particular, it records the total number of pictures, the number of data records for this picture, the maximum and minimum plot raster limits, the scaling constants used to construct the raster. Some spare space is left in the header for future use. The header contains a 'password' ( value 'PLOT%%84' ) which can be checked to see if the file was written by PLOT84. Some of the information in the header is not known till the current picture is complete, and the total number of pictures is not known till the file is ready to close. Therefore the routines need to wind back the plot file after each picture and before stopping, to update the header. A side effect of this method of operation is that an incomplete picture which stops in error may have a defective header and be unplottable. TABLE 3.1 lists the information contained in the file header. 3.3 Plot data records ---------------------- Every data record is a pair of INTEGER*2 numbers (IX,IY) and uses 4 bytes. There are two types of record. Drawing records request the pen to move-to or draw-to a given point on the raster. Control records specify other features of the plot such as colour, line thickness, etc. In the following list (IX,IY) are positive integers between 1 and 32767 (note that 0 is not allowed). The drawing records are of two kinds: (+IX,+IY) Draw a line from the current position to (IX,IY) (+IX,-IY) Move the pen to (IX,IY) The control records all have a negative first digit. The second digit is a data value. END (-1,+IY) End picture. Put out IY pages of paper before next picture (we use IY=1). DOT (-2,0) Next record specifies position of a point dot. LINEWEIGHT (-3,+IY) Line thickness changes to IY (IY=1...9) COLOUR (-4,+IY) IY defines colour (IY=1...7) BLANK PAPER (-5,+IY) IY rows at 100 rows per inch. ERASE MODE (-6,+IY) VT640 only IY=1 for on, 0 for off. 4. SUMMARY LIST OF THE USER ROUTINES ------------------------------------- This list gives the names and functions of the routines which have been designed for the public user. There are other routines which are used internally by the PLOT84 system, which may be useful for some programmers. They are described in Section 6. Most people will not need to know about them. A more detailed description of each user routine is given in Section 7. In the list the symbols *,? are used. * Means the routine is essential or preferred for general use ? Means the routine is provided only for special purposes or is not recommended except in cases of need. No symbol means the routine is fairly useful. Starting and finishing pictures * PLT$INIT(FILNAM) Start up the system * PLT$PICT Start a picture * PLT$ENDP Finish picture * PLT$STOP Finish last picture and stop PLT$WAIT(NSEC) Pause after picture (interactive) ? PLT$TITL(TITL) Set title in header Print control PLT$PRNT(IPRINT) Control information print-out Plot style control ? PLT$MIXC(MIXCOL) Single or multi-colour plot ? PLT$LNWT(LINWT) Thick lines on raster ? PLT$COLR(ICOLOR) Change colour ? PLT$PAPR(XLENG) Extrude paper PLT$ERAS Rubout VT640 on PLT$ERAX Rubout VT640 off PLT$EREV Reverse erase VT640 on Windows and Viewports ? PLT$ENVR Set default environment for picture series ? PLT$XENV Clear environment * PLT$DVIC(NDIREC,NDEVIC) Select interactive/device PLT$BSIZ(DWLIMX,DWLIMY) Size of drawing board (mm) ? PLT$DVPT(DVXMIN,DVXMAX,DVYMIN,DVYMAX) Device viewport (mm) PLT$WNDB(VBXMIN,VBXMAX,BYMIN,VBYMAX) Drawing board bounds (mm) PLT$WSCL(NSCAFL,NCNTFL) Fixed or floating scales PLT$DTRN(DOTMMX,DOTMMY) Dot raster scales (mm) General Scaling ? PLT$UTRN Set up default scaling PLT$TSAV(NTRSAV) Save current scalings PLT$TRES(NTRSAV) Restore saved scaling Line Object Scaling (User units) * PLT$SCLU(SCALEX,SCALEY) Horizontal and vertical scales * PLT$UROT(USANGX,USANGY) User directions PLT$UMAT(TMAT) 2*2 transformation matrix * PLT$ORGD(XORIG,YORIG) Origin (on drawing board) PLT$ORGU(XU,YU) Origin in user space Character Scaling (Character units) * PLT$SCLC(CHRSCX,CHRSCY) Width and height character units * PLT$CROT(CHANGX,CHANGY) Angles for x and y directions ? PLT$CMAT(TMAT) 2*2 transformation matrix ? PLT$ORGC(CHORGX,CHORGY) Origin of transformation PLT$TLNK(ICLINK) Couple character and line transformations Character Positions and Spacing * PLT$ANCD(XCHAR,YCHAR) Set anchor point on drawing board PLT$ANCU(XCHU,YCHU) Set anchor point in user units * PLT$CSPU(IUSPCE) Set uniform or non-uniform spacing ? PLT$CSPA(CHRSPX,CHRSPY) Extra spacing after character. * PLT$CENC(ICENTC) Centering of characters PLT$LNFD(YCDOWN) Line feed PLT$SCUR(XCGAP) Cursor right shift ? PLT$PCUR(XCSTRT,YCSTRT) Position cursor ? PLT$FCUR(XCSTRT,YCSTRT) Find cursor Character Set-Up * PLT$FONT(IFONT) Select fount ? PLT$RFNT Read fount tables ? PLT$CFSZ(NCHAR,XLEFT,XRIGHT,YLOW,YHIGH,CWID,KFONT) Report character dimensions from fount table Line and Dot Drawing * PLT$DWTO(X,Y) Draw line to (X,Y) from current position * PLT$MVTO(X,Y) Move pen to (X,Y) ? PLT$DWBY(X,Y) Draw line of vector length (X,Y) ? PLT$MVBY(X,Y) Move pen by vector (X,Y) * PLT$POIN(X,Y) Draw point dot at (X,Y) * PLT$LINE(P,Q) Draw line between 2-vectors P,Q ? PLT$VCLN(XVEC,YVEC,NPOINT) Draw set of points connected by lines Character Strings * PLT$STRC(TEXT) Plot left-justified string [character TEXT] PLT$STRH(BYTXT,NLETT) Plot string of byte text ? PLT$STR2(ITEXT2,NLETT) Plot string of INTEGER*2 text ? PLT$STR4(ITEXT4,NLETT) Plot string of INTEGER*4 text PLTSTRS(TEXT,SIZX,SIZY) Plot characters with controlled size Centred Character Strings * PLT$CETX(TEXT,NJUST) Characters centred at left,middle,or right PLT$CETS(TEXT,SIZX,SIZY,NJUST) Characters with controlled size Strings With User-Set Spacing (?) ? PLT$STRD(TEXT,DX,DY) String with separation on board ? PLT$STRU(TEXT,DXU,DYU) String with user unit separation Formatted Number Plotting * PLT$INUM(INUM,NDIGIT,SIZX,SIZY,NJUST) Plot integer I format * PLT$FNUM(FNUM,NDIGIT,NAFTER,SIZX,SIZY,NJUST) Plot decimal F format * PLT$ENUM(ENUM,NDIGIT,NAFTER,SIZX,SIZY,NJUST) Plot decimal E format Single Characters (?) * PLT$GCHC(CHAR1,XCOFF,YCOFF,KFONT) Character from any fount. Standard size. PLT$GCHS(CHAR1,XCOFF,YCOFF,SIZX,SIZY,KFONT) Any fount. Chosen size. ? PLT$GCHI(NLETT,XCOFF,YCOFF,KFONT) Specified as integer ASCII code ? PLT$GCHH(NCHAR,XCOFF,YCOFF,KFONT) Specified as byte integer ASCII code ? PLT$GCHF(LETTER,XCOFF,YCOFF,SIZX,SIZY,KFONT) Fount 1-4 only. Specified as integer. ? PLT$GCH0(LETTER,XCOFF,YCOFF,SIZX,SIZY) Fount 0 only. Specified by ASCII integer. Single Symbols * PLT$GSYM(NSYMB,NSET) Centred symbol. Standard size. No move. PLT$GSYS(NSYMB,NSET,XCOFF,YCOFF,SIZX,SIZY) Centred symbol. Chosen size. No move. ? PLT$GSYC(CHAR1,NSET,XCOFF,YCOFF,SIZX,SIZY) Symbol as letter. Move cursor. ? PLT$GSY0(ISYMB,XCOFF,YCOFF,SIZX,SIZY) Symbol from fount 0. Move cursor. Terminal Routines PLT$TYON Teletype mode (no action for plotfile) PLT$TYOF Vector mode (no action for plotfile) PLT$HAIR(X,Y,CHKEY) Display cross-hair,move it,report new position on pressing key. See section 7.3 for driver routines. 5. SIMPLE USE OF THE ROUTINES ------------------------------ 5.1 Very Simple Picture Example -------------------------- CHARACTER*(*) FILNAM C -- FILNAM='PICTURE.PLT' CALL PLT$INIT(FILNAM) CALL PLT$PICT .... CALL PLT$MVTO(X1,Y1) CALL PLT$DWTO(X2,Y2) .... CALL PLT$ANCD(10.0,10.0) CALL PLT$STRC('-MY TEXT-') .... CALL PLT$STOP This program makes a plot in the plot file named PICTURE.PLT, which can be plotted later, or viewed. The calls to PLT$INIT and PLT$STOP are required to start and stop the system. The call to PLT$PICT is needed to start the (single) picture. Notice how the CHARACTER*(*) variable FILNAM is set. The argument of PLT$INIT can be either the vriable FILNAM or a quoted string, but not a BYTE, INTEGER or REAL variable. By default the system assumes non-interactive plotting to paper and sets the drawing board size to 330 * 508 mm. The user scale is set in mm without any rotation, and the character units set at 3mm by 3mm with the user and character transformations linked. The calls to PLT$MVTO and PLT$DWTO draw a line. The call to PLT$ANCD sets the anchor point on the drawing board at X=10mm, Y=10mm. The call to PLT$STRC plots the words '-MY TEXT-' left justified on the right side of the anchor point,with the baseline left corner of the first letter on the anchor point itself. By default the letters are chained, with non-uniform spacing and drawn in fount number 1. After the string is drawn the character cursor is in position to draw the next letter immediately following TEXT- (no gap). 5.2 An Interactive Picture Example -------------------------------- CHARACTER*1 CHKEY .... CALL PLT$INIT('PIC2.PLT') NDIREC=1 NDEVIC=3 CALL PLT$DVIC(NDIREC,NDEVIC) CALL PLT$PICT .... CALL PLT$SCLU(2.0,2.0) CALL PLT$ANCU(10.0,10.0) NJUST=2 CALL PLT$CETX('-MY TEXT-',NJUST) CALL PLT$LNFD(2.0) CALL PLT$CETX('INTERACTIVE',NJUST) .... CALL PLT$ENDP NSEC=30 CALL PLT$WAIT(NSEC) .... X=10.0 Y=10.0 CALL PLT$HAIR(X,Y,CHKEY) .... CALL PLT$STOP .... This program uses PLT$DVIC to select interactive plotting (NDIREC=1) on the VT640 (NDEVIC=3). By default the drawing board is now given the device size of 165.0 mm wide and 139.5 mm high. The device viewport is set to this full size. Mapping of the board onto the device uses fixed scale and floating origin by default, but in this case the mapping changes nothing. Because the plotting is interactive the program will probably go on to clear the VT640 screen and do some other task once the picture is complete. Therefore the program uses PLT$ENDP to signal the end of the picture. The call to PLT$WAIT then makes the computer pause for 30 sec. This gives time to look at the plot, or even to make a copy of it on the TEKTRONIX copier. The copy will be on the same scale as the screen or the paper plot. The call to PLT$HAIR places the cross hairs at (10.0,10.0) in user space and the terminal then responds to the four driver keys ^ v < > till a character key is pressed. The new values of X,Y are reported to the program. This second program uses a simple user scaling option. The call to PLT$SCLU sets user units of 2.0 mm in each direction. The character size is linked to the user transformation, and so the default size of 3 user units becomes 6mm. The call to PLT$ANCU(10.0,10.0) now puts the anchor point (in user units) at X=20.0, Y=20.0 mm on the screen. The calls to PLT$CETX plot the centered strings '-MY TEXT-' and 'INTERACTIVE' . The letters in each string fill a character box which goes 6.0mm above the base-line and 3.0 below for lower-case letters. The box is up to 6.0 mm wide. The first string of 9 letters will therefore be up to 54.0 mm wide, and part of it will automatically be clipped off the screen. In each string the default option is to centre the height of the string so that the baseline goes through the anchor point. For vertical centering we would use ICENTC=1 CALL PLT$CENC(ICENTC) after the call to PLT$PICT. The PLT$LNFD call moves the character cursor back to the anchor point and then down by 2.0 character units (i.e. by 2.0*6mm). This means that the second string will be centred directly below the first with its letters well cleared. The normal character string has a vertical range of 1.5 character units. At the end the plot cursor is just past the 'IVE' of interactive, and if a third centred string were plotted without resetting the cursor the new string would overlap the end of the previous one. If we wanted the strings drawn with uniform spacing the program would have to contain the call IUSPCE=1 CALL PLT$CSPU(IUSPCE) after the call to PLT$PICT. To alter the letter spacing we could use CHRSPX=0.5 CHRSPY=0.16666 CALL PLT$CSPA(CHRSPX,CHRSPY) The values of CHRSPX,CHRSPY specify additional spacings in character units. Thus with CHRSPX=0.5 and a character unit of 6mm the letters would be 6.0+0.5*6.0 = 9.0mm apart. With CHRSPY = 0.16666 the letters would step upwards, without tilting, by 1mm after each character. At the end of a picture PLT$WAIT can be used in another way, with NSEC=0. The call CALL PLT$WAIT(0) returns control to the keyboard, to decide whether to keep or erase the screen. Typing "RETURN" or "SPACE" keeps the picture: any other character erases it. 5.3 A Plot With Several Pictures ------------------------------- CHARACTER*(*) FILNAM 20 FORMAT(1X,A) C -- READ(5,20) FILNAM .... CALL PLT$INIT(FILNAM) CALL PLT$BSIZ(100.0,100.0) CALL PLT$PICT !Start picture 1 .... CALL PLT$SCLU(2.0,3.0) PI= 3.1415926 USANGX=PI/2.0 USANGY=PI CALL PLT$UROT(USANGX,USANGY) .... CALL PLT$ENDP !End picture 1 CALL PLT$PICT !Start picture 2 .... CALL PLT$ORGD(5.0,5.0) CALL PLT$CSPU(1) .... CALL PLT$STOP !End picture 2 and stop In this example there are two pictures. The name of the plot file is read in from the input stream (terminal or command file) with the format (1X,A). Note that carriage-control characters in the input stream can sometimes cause trouble, since they are invisible to the user, but may be interpreted as blank filenames. The call to PLT$BSIZ sets the drawing board size to 100*100 mm and by default the window is set to the same size. This setting lasts through the series of pictures. In picture (1) the call to PLT$UROT sets a 90-degree anticlockwise rotation of axes for all lines, and the coupled characters. Scale settings are wiped out at the end of each picture. Therefore picture (2) uses normal axis directions, but now has an origin shift. The user origin is at (5.0,5.0) on the drawing board. The call to PLT$STOP both terminates picture (2) and switches off the system. 5.4 A Plot with Labels and Symbols ---------------------------------- This plot illustrates how to label a graph or an axis with symbols and labels: FILNAM='GRAPH.PLT' CALL PLT$INIT(FILNAM) CALL PLT$PICT **** CALL PLT$ANCU(20.0,30.0) ! Draw a pentagram star from fount 0 NSYMB=16 ! of standard size 1*1 character NSET=1 ! units,centred on the point with user CALL PLT$GSYM(NSYMB,NSET) ! coordinates (20.0,30.0). Don't move .... ! the character cursor **** CALL PLT$ANCU(60.0,40.0) ! Draw the same symbol SIZX=2.0 ! but distorted to be 2.0 units wide SIZY=3.0 ! and 3.0 units high. It is drawn XCOFF=0.5 ! with its centre 0.5*2.0 units to the YCOFF=0.0 ! right of the user point (60.0,40.0) .... CALL PLT$GSYS(NSYMB,NSET,XCOFF,YCOFF,SIZX,SIZY) .... **** CALL PLT$ANCU(150,200.0) ! Draw an integral sign from fount 1 NSET=2 ! as a special character equivalent to SIZX=1.5 ! the digit '7'. Size 1.5*2.0 char. SIZY=2.0 ! units. The bottom left corner of XCOFF= -0.7 ! is 0.7*1.5 char units to left of .... ! cursor. Cursor shifts 1.5 units to .... ! right after completion .... CALL PLT$GSYC('7',NSET,XCOFF,YCOFF,SIZX,SIZY) .... **** .... CALL PLT$ANCU(35.0,100.0) ! Plot the digits of the number -122 NDIGIT=5 ! in I5 format " -122" right justified INUM= -122 ! on the point (35.0,100.0) NJUST=3 ! digits are size 1.5*2.0 char. units .... ! Cursor moves to end of " -122" .... CALL PLT$INUM(INUM,NDIGIT,SIZX,SIZY,NJUST) .... **** CALL PLT$ANCU(75.0,88.5) ! Plot the digits of the number NJUST=2 ! 120.33333 in F8.3 format as NDIGIT=8 ! " 120.333" centred on the NAFTER=3 ! anchor point FNUM=120.33333 CALL PLT$FNUM(FNUM,NDIGIT,NAFTER,SIZX,SIZY,NJUST) .... **** CALL PLT$ANCU(75.0,105.5) ! Plot the same number in E12.2 NDIGIT=12 ! format as " 0.12 E 03" NAFTER=2 CALL PLT$ENUM(FNUM,NDIGIT,NAFTER,SIZX,SIZY,NJUST) .... CALL PLT$STOP The number plotting routines are designed so that they will always try to produce a plottable set of digits even if the values of NDIGIT and NAFTER are too small. This is to avoid overflows when program errors produce unexpected values for the numbers. 6. PLOT84 USER ROUTINE DESCRIPTIONS ------------------------------------ * These are the basic public routines of the system. Certain other * accessory routines used by the system are described in Section 7. Starting and finishing pictures PLT$INIT(FILNAM) Start up the plotting system before the first picture. Only needs to be done once in a session. FILNAM is a CHARACTER*(*) variable or string enclosed in quotes, e.g. 'PLOT84.PLT'. PLT$PICT Start a new picture. Switch on device if required set up the environment and the user transformation. Clear graphics terminal screen. PLT$ENDP End the current picture and update its file header. Leave terminal in teletype mode, but do not clear the graphics screen. PLT$STOP Finish all plotting. End current picture if needed. Switch off device. Update plot file headers with picture count. Leave terminal in teletype mode and wait for keyboard command whether or not to clear screen. ("RETURN" or "SPACE" saves the picture: any other character clears it). PLT$WAIT(NSEC) Optional pause between pictures (used for VT640 to keep picture on screen). NSEC is number of seconds to wait. After the wait the screen will clear. If NSEC=0 the program waits for a prompt from the keyboard (type "RETURN" or "SPACE"to save the screen and any other character to clear). PLT$TITL(TITL) Set the plot title to go in the plotfile header This is not drawn TITL = title string [character*(*)] up to 80 long Print control PLT$PRNT(JPRINT) Controls amount of information printed during run JPRINT = (0)none (1)normal (2) header and scaling and minor warnings (3) full line vector detail for error tracing Plot style features PLT$MIXC(MIXCOL) Set for single or multiple colour plot on paper MIXCOL = 0,1 for single or multiple (default =0) PLT$LNWT(LINWT) Set line weight value 1-9 for thick lines on paper LINWT = 1,2,...9 (default =1) PLT$COLR(ICOLOR) Set colours for plot on TRILOG printer ICOLOR = 1 black (yellow+red+blue) 2 red 3 green (yellow+blue) 4 blue (default value) 5 yellow 6 orange (yellow+red) 7 purple (red+blue) PLT$PAPR(XLENG) Put out XLENG mm of blank lines on the paper plotter at 100 lines per inch (max 500mm) PLT$ERAS Set "rubout" mode for lines and dots (VT640 only) PLT$ERAX Switch off "rubout" mode (VT640 only) PLT$EREV Switch on "reverse erase" mode (VT640 only) Window and viewport scaling limits PLT$ENVR Set up the limits for this series of pictures, using default values or values from the routines PLT$DVIC,PLT$BSIZ,PLT$DVPT,PLT$WNDB,PLT$WSCL See TABLE 6.1 for a summary of the actions. PLT$XENV Clear the settings so that next time PLT$ENVR is called the defaults will be set. PLT$DVIC(NDIREC,NDEVIC) choose interactive or plotfile operation, choose device NDIREC = 1,0 interactive or not NDEVIC = 1,2,3 undefined,plotfile,VT640 PLT$BSIZ(DWLIMX,DWLIMY) choose size of drawing board DWLIMX,DWLIMY dimensions in mm along x and y PLT$DVPT(DVXMIN,DVXMAX,DVYMIN,DVYMAX) choose device viewport limits in mm DVXMIN,DVXMAX = limits along x DVYMIN,DVYMAX = limits along y PLT$WNDB(VBXMIN,VBXMAX,VBYMIN,VBYMAX) choose size of drawing board window in mm VBXMIN,VBXMAX = limits along x VBYMIN,VBYMAX = limits along y PLT$WSCL(NSCAFL,NCNTFL) choose method of scaling drawing board to device NSCAFL = 1,0 floating or fixed scale factor NCNTFL = 1,0 floating or fixed origin PLT$DTRN(DOTMMX,DOTMMY) choose number of dots per mm for integer device coordinates DOTMMX,DOTMMY = numbers of dots along x,y Normally values are (10.0,10.0) for undefined, 100 dots/inch for paper, and special values (5.333,5.41935) for VT640 General Scaling PLT$UTRN Set up the default scaling and character size constants at the beginning of a picture (is called automatically by PLT$PICT) PLT$TSAV(NTRSAV) Save the current scaling settings for user and character transformations, anchor point,cursor,spacing, centering,font, by copying data from COMMON blocks into an equivalent array NTRSAV = integer array of 48 integer*4 to hold the data. See details in TABLE 6.2. PLT$TRES(NTRSAV) Restore the saved transformation variables NTRSAV = integer array of 48 integer*4 with saved data in it Line Object Scaling (User Units) PLT$SCLU(SCALEX,SCALEY) Set horizontal and vertical user scales in mm SCALEX,SCALEY = scale factors on drawing board in mm PLT$UROT(USANGX,USANGY) Set directions on drawing board for user x and y axes. Angles are anticlockwise from drawing board X-axis and measured in radians USANGX,USANGY = angles for user x,y PLT$UMAT(TMAT) Set the 2*2 user scaling matrix and recalculate from it the new values of SCALEX,SCALY,USANGX,USANGY TMAT(2,2) = scaling matrix PLT$ORGD(XORIG,YORIG) Set the user origin on drawing board in mm XORIG,YORIG = position of new user origin PLT$ORGU(XU,YU) Set user origin in terms of a point in current user space. (NOTE:this needs care if used more than once) XU,YU = origin in user units and user axes Character Scaling (Character Units) PLT$SCLC(CHRSCX,CHRSCY) Define scaling of character size in terms of user units or drawing board units (see PLT$TLNK) CHRSCX,CHRSCY = standard character width and height unit in terms of user units or drawing board mm (ICULNK=T or F) PLT$CROT(CHANGX,CHANGY) Set angles for direction of character x and y. Used for oblique characters etc angles are in radians anticlockwise from either user X-axis or drawing board X-axis CHANGX,CHANGY = angles for character x and y axes PLT$CMAT(TMAT) Set the 2*2 character scaling matrix and recalculate the new values of CHRSCX,CHRSCY,CHANGX,CHANGY from it TMAT(2,2) = scaling matrix in user or drawing board units (ICULNK=T or F) PLT$ORGC(CHORGX,CHORGY) Set the origin of the character transformation in character units relative to the "anchor point" CHORGX,CHORGY = origin shifts PLT$TLNK(ICLINK) Lock or unlock character transformation to user transformation ICLINK=1,0 for locked and unlocked states Character positions and spacing PLT$ANCD(XCHAR,YCHAR) Sets character anchor point in terms of drawing board coordinates (mm) and resets cursor to zero XCHAR,YCHAR = position of anchor point PLT$ANCU(XCHU,YCHU) Sets character anchor point in terms of user coordinates and resets cursor to zero XCHU,YCHU = position of anchor point PLT$CSPU(IUSPCE) Select uniform or non-uniform character spaciing. IUSPCE = 1,0 for uniform or non-uniform spacing Default is IUSPCE=0. PLT$CSPA(CHRSPX,CHRSPY) Set character spacing constants CHRSPX,CHRSPY = extra displacements in charcter units after each letter in addition to normal 1.0,1.0 values Default is (0.0,0.0) PLT$CENC(ICENTC) Controls centering of individual letters in character drawing. Either by bottom left corner or by centre of upper part. ICENTC = 0,1 for bottom left, middle. PLT$LNFD(YCDOWN) Character virtual linefeed. Move cursor to zero in X and down in Y to start a new line of text YCDOWN = downward shift in character units PLT$SCUR(XCGAP) Shift character cursor to right XCGAP = shift measured in character units PLT$PCUR(XCSTRT,YCSTRT) Position the character cursor XCSTRT,YCSTRT = new position in character units PLT$FCUR(XCSTRT,YCSTRT) Find current position of character cursor XCSTRT,YCSTRT = position relative to anchor point in character units Character Set-up PLT$RFNT Read in font tables (normally called automatically by the other routines just once). The table is kept in a file with the logical name PUBLIC_FONT84 currently PUBLIC_DISK:[PUBLIC.LIB]FONT84.DAT PLT$FONT(IFONT) Select character font IFONT = 0 plain capitals (small letters drawn as caps) 1 normal letters 2 italic 3 invitation script 4 Greek PLT$CFSZ(NCHAR,XLEFT,XRIGHT,YLOW,YHIGH,CWID,KFONT) report the size of a character from the font tables NCHAR = ASCII number of letter or identifier for symbol (range 32-177) XLEFT,XRIGHT = limits in X in character units YLOW,YHIGH = limits in Y in character units CWID = width used by character KFONT = font number. Each character is drawn inside a rectangular box 1.0 units wide,1.0 units high above the line and 0.5 units down below the line. The box origin is on the line at the left-hand edge. With fixed spacing CWID=1.0. Line- and Dot-drawing PLT$DWTO(X,Y) draw line from current point to (X,Y) PLT$DWBY(X,Y) draw by moving pen an amount (X,Y) from current point PLT$MVTO(X,Y) move pen to (X,Y) PLT$MVBY(X,Y) move pen an amount (X,Y) from current point PLT$POIN(X,Y) draw a dot at (X,Y) NOTE These are all entries of the subroutine PLT$DRMV The pen position is undefined till the first moveto. PLT$LINE(P,Q) draw a line from P to Q, where P and Q are 2-vectors PLT$VCLN(XVEC,YVEC,NPOINT) draw a set of points connected by lines XVEC(NPOINT) = array of X-values YVEC(NPOINT) = array of Y-values NPOINT = number of points Left-justified character strings PLT$STRC(TEXT) Plot a character string in the current font without trailing blanks, left justified on the cursor. Unprintable ASCII characters are replaced by blanks. The cursor moves. Centering controlled by ICENTC in PLT$CSPA either by bottom left or centre of each character TEXT = string [character*(*)] PLT$STRH(BYTXT,NLETT) Plot a byte array of letters at standard size BYTXT = array of bytes (H format) NLETT = number of letters PLT$STR2(ITEXT2,NLETT) Plot an integer*2 array of letters at standard size ITEXT2 = array of integer*2 (H format) NLETT = number of letters PLT$STR4(ITEXT4,NLETT) Plot an integer*4 array of letters at standard size ITEXT4 = array of integer*4 (H format) NLETT = number of letters PLT$STRS(TEXT,SIZX,SIZY) Plot a character string as above but with width and height as selected TEXT = character string [character*(*)] SIZX,SIZY = width and height of letters in character units Centred character strings PLT$CETX(TEXT,NJUST) plot a centred character string of standard size TEXT = string [character*(*)] NJUST = 1,2,3 justify by (1)left (2)middle (3)right Centres a string of the current set size,with leading and trailing blanks removed,using the current font. Unprintable characters are replaced by blanks. The letters are drawn with either uniform or non-uniform spacing, as selected by PLT$CSPA. Individual characters fit into a box 1.0*1.5 character units and are centred on the baseline or at the +0.5 level as selected by PLT$CENC. Character cursor moves and ends up at the right side of the string. PLT$CETS(TEXT,SIZX,SIZY,NJUST) plot a centred string of chosen size TEXT = string [character*(*)] SIZX = height in character units of current scaling SIZY = width in character units NJUST = 1,2,3 justify by (1)left (2)middle (3)right Character strings with oblique spacing PLT$STRD(TEXT,DX,DY) Draw a text string of standard size in current font left justified on the anchor point. Letters are centred individually on the cursor (ICENTC controls) and trailing blanks are ignored. Each letter is separated from the previous one by distances (DX,DY) in mm on the drawing board. The anchor point is restored and the cursor set to zero after finishing. TEXT = string [character*(*)] DX,DY = drawing board letter intervals in mm PLT$STRU(TEXT,DXU,DYU) Draw a text sring with letter intervals in user units. Otherwise the same as PLT$STRD. TEXT = string [character*(*)] DXU,DYU = user coordinate letter intervals. Number-plotting routines PLT$INUM(INUM,NDIGIT,SIZX,SIZY,NJUST) plot the digits of an integer justified on the current cursor position INUM = integer to plot NDIGIT = format is I-, enlarged if necessary maximum value is 20 SIZX,SIZY = width and height of digits in character units NJUST = 1,2,3 for justify by left,middle,right PLT$FNUM(FNUM,NDIGIT,NAFTER,SIZX,SIZY,NJUST) plot the digits of a decimal in F-. format,expanding if necessary shortest allowed format is F3.0 FNUM = decimal to plot (real*4) NDIGIT = number of digits, including sign if neg and decimal point (max 20) NAFTER = number of digits after point (max 10) SIZX,SIZY = width and height in character units NJUST = 1,2,3 justify by left,middle,right PLT$ENUM(ENUM,NDIGIT,NAFTER,SIZX,SIZY,NJUST) plot the digits of a real number in E-. format,expanding if necessary. Shortest allowed is E8.1 ENUM = number to plot NDIGIT = number of digits, including sign and "E" part and point (max 20) NAFTER = number of digits after point (max 10) SIZX,SIZY = width and height in character units NJUST = 1,2,3 justify by left,middle,right Generate Single characters PLT$GCHC(CHAR1,XCOFF,YCOFF,KFONT) draw a character of standard size from fonts 0,1,2,3,4. The cursor moves to the right CHAR1 = ASCII character variable (See TABLE 2.1) XCOFF,YCOFF = offset of left baseline corner of character from the current cursor position measured in character units. KFONT = font number 0=plain caps,1=normal,2=italic 3=script 4=Greek. PLT$GCHI(NLETT,XCOFF,YCOFF,KFONT) draw a character specified by integer value. Standard size NLETT = ASCII number of character (integer*4) XCOFF,YCOFF = offsets KFONT = font number PLT$GCHH(NCHAR,XCOFF,YCOFF,KFONT) draw a character specified by byte integer value. Standard size NCHAR = ASCII number of character (byte) XCOFF,YCOFF = offsets KFONT = font number PLT$GCHS(CHAR1,XCOFF,YCOFF,SIZX,SIZY,KFONT) draw a character of chosen size from fonts 0-4. The cursor moves to the right CHAR1 = ASCII character variable XCOFF,YCOFF specify offsets of XCOFF*SIZX and YCOFF*SIZY SIZX,SIZY = width and height in character units KFONT = font number PLT$GCHF(LETTER,XCOFF,YCOFF,SIZX,SIZY,KFONT) draw a character from founts 1-4 by number. (See TABLE 2.2) LETTER = ASCII number of character (1-177) allowed XCOFF,YCOFF specify offsets SIZX,SIZY = width and height in character units KFONT = fount number PLT$GCH0(LETTER,XCOFF,YCOFF,SIZX,SIZY) draw a character in fount 0 at the current position of the character cursor. The cursor moves to the right. Centering is by bottom left. LETTER = ASCII number of the character (only capitals drawn in this fount) XCOFF,YCOFF specify offsets of baseline left corner of letter from cursor position SIZX,SIZY = width and height in character units Generate Single Symbols PLT$GSYM(NSYMB,NSET) draw a centred symbol of standard size and leave character cursor unmoved NSYMB = symbol number (see TABLE 2.3 for definition) NSET = set number (1= font 0, symbols 1-32) (2= font 1, symbols 1-46) PLT$GSYS(NSYMB,NSET,XCOFF,YCOFF,SIZX,SIZY) draw a centered symbol of chosen size and leave the character cursor unmoved NSYMB = symbol number NSET = set number XCOFF,YCOFF specify offsets of centre from cursor position XCOFF*SIZX,YCOFF*SIZY SIZX,SIZY = width and height in character units PLT$GSYC(CHAR1,NSET,XCOFF,YCOFF,SIZX,SIZY) draw symbol as a special form of letter, specified by the character CHAR1. Centre it as for a letter at bottom left corner and move the cursor. CHAR1 = character (character*1) NSET = symbol set XCOFF,YCOFF specify offsets SIZX,SIZY = width and height in character units PLT$GSY0(ISYMB,XCOFF,YCOFF,SIZX,SIZY) draw a symbol in font 0 at the current position of the character cursor. The cursor moves to the right. Centering is by bottom left. ISYMB = symbol number, 1-32 allowed XCOFF,YCOFF specify offset of baseline left corner from cursor. SIZX,SIZY = width and height in character units Terminal Routines PLT$TYON In interactive plotting set teletype mode,clear lettering and put cursor at bottom left. No action in plotfile plotting. PLT$TYOF In interactive plotting set graphics vector mode. No action in plotfile plotting. PLT$HAIR(X,Y,CHKEY) On the VT640 terminal display the cross-hairs at the position on the screen which corresponds to (X,Y) in user units. The terminal remains in cross-hair mode with the hairs driven by the 4 cursor keys ^ v < > until another character key is pressed. At this point the terminal returns to normal function and the routine reports the new coordinates (X,Y) and the name of the key last pressed (CHARACTER*1 CHKEY). Note that the position is subject to roundoff on the terminal raster grid and may not come back identical even if the hair is not moved. If X,Y are off the screen the hair will be placed at bottom left edge of the viewport. 7. ACCESSORY ROUTINES USED BY THE PLOT84 SYSTEM ------------------------------------------------ 7.1 Lower Level Operating Routines of PLOT84 -------------------------------------------- * These routines are not designed to be used directly by the programmer * and their use may interfere with the operation of the public routines PLT$BLKD block data program to set data in COMMON blocks Device control PLT$DVON(PLTNAM,NOUT) Switch on device, or open plot file PLTNAM = name of plot file [character*(*)] NOUT = device type 1=undefined,2=paper,3=VT640 PLT$DVOF Switch off device. Window and scaling limits for the device PLT$EDTR(DTMMX,DTMMY) Works out transformation from drawing board to device DTMMX,DTMMY = requested dots per mm along X and Y value (0.0,0.0) means use automatic setting Normal settings are (10.0,10.0) for undefined, (100/25.4,100/25.4) for paper plot, (880/165 , 756/139.5) for VT640 PLT$EDVC(NDIREC,NDEVIC,DWLIM1,DWLIM2,DVLMX1,DVLMX2,DVLMY1,DVLMY2) Select plot device and corresponding drawing board size NDIREC = 1,0 interactive or not NDEVIC = 1,2,3 undefined,paper,VT640 DWLIM1,DWLIM2 = output size of drawing board DVLMX1,DVLMX2 = x device limits output DVLMY1,DVLMY2 = y device limits output PLT$EDVP(DVLMX1,DVLMX2,DVLMY1,DVLMY2,VBXMIN,VBXMAX,VBYMIN,BYMAX) Set plot device viewport and window size to override defaults DVLMX1,DVLMX2 = input x limits of device viewport DVLMY1,DVLMY2 = input y limits of device viewport VBXMIN,VBXMAX = output x limits of drawing board window VBYMIN,VBYMAX = output y limits of drawing board window PLT$EBSZ(DWLIM1,DWLIM2) Set drawing board limits to override defaults DWLIM1,DWLIM2 = x and y dimensions of board (origin at 0.0,0.0) PLT$EWND(VBXMIN,VBXMAX,VBYMIN,VBYMAX) Overrides default setting of drawing board window and checks new values VBXMIN,VBXMAX = x limits VBYMIN,VBYMAX = y limits PLT$EWSC(NSCAFL,NCNTFL) chooses options for mapping drawing board window onto device viewport NSCAFL = 1,0 floating or fixed overall scale NCNTFL = 1,0 floating or fixed origin Plot style features PLT$STYL Set default line-weight,colour,colour-mix values as LINWT=1,ICOLOR=4,MIXCOL=0 Line drawing PLT$DDRB(XB,YB) draw line on the drawing board from current point XB,YB = point to draw to PLT$DOTB(XB,YB) draw a dot on the drawing board XB,YB = position of dot PLT$MDRB(XB,YB) move to a point on drawing board XB,YB = position of point NOTE: These routines do a check to avoid redundant move and draw instructions when a series of lines are plotted. PLT$VBRK Special routine to break a chain of line vector instructions and override redundancy checks. Used when change of colour or when terminal mode is switched half way through a drawing operation. Transformation handling PLT$MUCT(USRMAT,CHRMAT,CUMAT,ICULNK,IPRINT) combine user and character transformations as linked or unlinked. USRMAT(3,3) = 3*3 user scale and translation matrix CHRMAT(3,3) = 3*3 character scale and translation matrix CUMAT(3,3) = 3*3 combined matrix ICULNK = 1,0 for linked or unlinked transformations IPRINT = 0,1,2,3 prints results if IPRINT .GE.2 PLT$TMPY(TA,TB,TAB) multiplies together two plane transformation 3*3 matrices for transformations of the type ( X2 ) ( A B U ) ( X1 ) ( Y2 ) * ( C D V ) * ( Y1 ) (1.0 ) ( 0.0 0.0 1.0 ) (1.0 ) the contents of the matrices are not checked! TA,TB = matrices TAB = product matrix Character and line mode control PLT$CMOD(ICMODE) Select character or line mode (usually done automatically by the character routines). This controls the scaling of line vectors. ICMODE = 1,0 for character or line mode Error checking PLT$LVCK(SUBNAM) Checks that some routines are not called out of turn, using the parameter IDRLVL to check (see COMMON block PLT$$DVW). SUBNAM = subroutine name in error [character*(*)] NOTE The values of IDRLVL give the state of the system set-up: (0) not initialised, (1) initialised, (2) transformation set (3) drawing in progress. Line clipping PLT$CLPL(X1,Y1,X2,Y2,ACCEPT) clips a line to lie in rectangular window X1,Y1 = first end point X2,Y2 = second end point ACCEPT = T,F indicates if any part of line lies inside window (logical) The window itself is defined in COMMON block PLT$$CLP.The subroutine calculates new end points for the truncated line. PLT$CLPT(X,Y,NCODE,INSIDE) tests if a point lies inside a rectangular window, defined in COMMON block PLT$$CLP X,Y = point NCODE = 4-byte code of logicals 1=left,2=right, 3=below,4=above window INSIDE = T or F for inside or not (logical*1) PLT$CLTS(REJECT,ACCEPT,NCODE1,NCODE2) tests if line lies wholly within or outside a rectangular window defined in COMMON block PLT$$CLP REJECT = T,F (logical*1) for fully outside ACCEPT = T,F (logical*1) for fully inside NCODE1 = 4-byte code of left end (see PLT$CLPT) NCODE2 = 4-byte code of right end PLT$SWLN(X1,Y1,X2,Y2,NCODE1,NCODE2,NSWAP) exchanges the two ends of a line X1,Y1 = left end X2,Y2 = right end NCODE1,NCODE2 = 4-byte codes for inside or outside window at each end NSWAP = +1,-1 for even or odd number of swaps changes each time called Timing PLT$TIM0(ITPRNT) Set the cpu time clock ITPRNT = 1,0 for print or no print PLT$TIMR(SECTOT,SSTAGE,ITPRNT) Read cpu time clock SECTOT = time since last set SSTAGE = time since last read ITPRNT = 1,0 for print or no print of times PLT$SUSP(MILSEC) Suspend the VAX computer for MILSEC millisecs. Used to allow the terminal time to respond. 7.2 Plot File Routines ---------------------- * These routines make use of the DISKIO direct access routines QREAD, * QWRITE etc. The plot file name should contain no leading blanks. PLT$OFLW(IUNITP,PLTNAM) Open plotfile to write IUNITP = symbolic unit number returned afterwards by the dirext access routines PLTNAM = filename or logical unit name [character*(*)] PLT$OFLR(IUNITP,PLTNAM) Open plotfile to read IUNITP = symbolic unit number returned afterwards by the dirext access routines PLTNAM = filename or logical unit name [character*(*)] PLT$CFIL(IUNITP) Close plotfile on stream number IUNITP PLT$WHDR Write plot file header at beginning of picture PLT$FLWI(IX,IY) Write a pair of plot coordinates (points or other codes) IX,IY = cordinates (in integer*2 range ) PLT$UHDR Update header at end of picture to give number of lines etc PLT$RHDR(*) Read in picture header and return to statement (*) on end-file Check that it is a genuine PLOT84 file. PLT$FLRI(IX,IY,*) Read a pair of plot coordinates and return to statement * on end-file IX,IY = coordinates PLT$FLP1 Reposition file at first record of picture number 1 PLT$FLBR(NBYTE) Backspace the plot file pointer by NBYTE bytes PLT$FLSR(NBYTE) Forward skip the plot file pointer by NBYTE bytes PLT$FLWR(IARRAY,NBYTE) Write the byte integer array IARRAY of NBYTE bytes PLT$FLRR(IARRAY,NBYTE) Read the byte integer array IARRAY of NBYTE bytes 7.3 VT640 Driver Routines ------------------------- These are a set of FORTRAN-callable routines for driving the VT640 Tektronix-4010 emulator on the VT100 terminals. Routines are provided for line, point and text drawing, crosshair reading, VT100 cursor positioning and screen clearing. The memory coords (0-1023 in x, 0-780 in y) are automatically converted to the display range (0-639 in x, 0-479 in y). The origin is always the bottom left hand corner of the screen. The terminal can exist in one of four operating modes: TELETYPE MODE Types large lettering on the screen independent of the graphics dot memory. Responds as a normal VT100 terminal. Teletype lettering can coexist with graphic dot information on the screen. GRAPHIC ALPHA MODE Text is written or read in small letters using the graphics memory. Text from the FORTRAN 5 stream is written in two columns and stored in the graphics memory. GRAPHIC VECTOR MODE Lines and dots are drawn and stored in the graphics memory. CROSS HAIR MODE Cross hairs are displayed and terminal responds to cursor keys ^ v < > till another character key is pressed. When the terminal is in a Graphics Mode any attempt to use the teletype function is likely to cause errors. In teletype mode many of the graphics commands will cause errors. In cross hair mode the terminal appears to ignore all commands except from the keyboard. Therefore programs should be designed carefully to SELECT THE CORRECT MODE AT ALL TIMES. For Graphics mode operations the lines and moves are sent to a 256-byte buffer in the program. This gives more efficient communication with the host computer. Any routine which changes mode etc will empty the buffer. Time should then be allowed to let all the current vectors be drawm. In these routines a time delay routine PLT$SUSP(MILSEC) which waits for MILSEC milliseconds is used to try to ensure that the changes of terminal mode do not occur too fast for it to keep up. these apply to changes between normal teletype (MODE=MTTY) and graphics modes. ( vector or alpha). The routines use one COMMON block called /PLT$$BFT/. They are written in FORTRAN and use FORTRAN IO. The graphics stream is on SYS$OUTPUT, without carriage controls, and has a record length of 1024. The terminal is unable to write records of more than 512 bytes, but can read them ! The graphics stream should be independent of normal (READ,5) and (WRITE,6) operations. PLT$INTM(ITERM) Clear the display screen and open the FORTRAN unit ITERM as the plot stream. PLT$OPTM(ITERM) Open the FORTRAN unit ITERM as the plot stream, but do not clear the screen. Used when a new job wants to look at what is already on the screen. PLT$OFTM(ITERM) Close terminal graphics FORTRAN stream (do not clear screen) PLT$SCTM Clear screen and leave in graphics vector mode PLT$GRTM Switch to vector mode (from any other mode) PLT$MVTM(IX,IY) Move to the position (IX,IY) PLT$DWTM(IX,IY) Draw a vector from the current position to position (IX,IY) PLT$PTTM(IX,IY) Place a point at the position (IX,IY) PLT$TXTM(TEXT,ISIZE) Write the string TEXT with char size ISIZE starting at the current position defined by the last PLT$MVTM command. The integer ISIZE=1,2,3,4 specifies the size in units of the standard text size which is 7*9 physical dots on the screen. TEXT is a CHARACTER*(*) variable. PLT$HRTM(IX,IY,CHKEY) Place the cross-hairs at (IX,IY), display them and then wait for the user to position them. The crosshairs are driven by the 4 cursor keys The coordinates are read when any character key is pressed. The cross hair then disappears and the terminal returns to alphabetical mode. The ASCII key character is returned in CHKEY (CHARACTER*1). Note that (IX,IY) can change by +-1 unit even if no move is asked for !! Terminal returns to graphics alpha mode. PLT$DOTM Selects the normal drawing style (white dots) PLT$ERTM Selects erase style, rubs out any dots which subsequent draw, point, or text operations overwrite (white -->black). PLT$RVTM Selects reverse erase style. Reverses any dots which subsequent draw, point, or text operations overwrite. (black<->white). Drawing an object twice causes it to disappear. PLT$TYTM Return the terminal to teletype mode. PLT$MYTM(IX,IY) Position the teletype cursor to (IX,IY) 0<=IX<=79, 0<=IY<=23 PLT$CYTM Clear the screen of teletype characters, leaving the graphics picture and text. (vice-versa is not possible) PLT$LSTM(ITYPE) In graphics mode select the line type for vector drawing. ITYPE=1-4 1 = Normal 2 = Dotted 3 = Dot-Dash 4 = Short Dash 5 = Long Dash PLT$BLTM Sound the bell or buzzer of the terminal and leave in graphics mode. PLT$XYTM(ITERM,IX,IY,CODE) Send a pair of move,draw,or dot coordinates to the terminal in coded form. ITERM = unit number IX,IY = position on screen CODE = control byte code PLT$BFTM(ITERM,NBYTE) Send a byte character to the graphics output buffer of 256-bytes. If buffer is full write out the whole buffer and save the new character. if NBYTE=0 then write out the whole buffer but do not save NBYTE. 7.4 Other VT640 Service Routines -------------------------------- PLT$PRTM(ITERM,NRWMIN,NRWMAX) Dump the contents of the VT640 screen on the TRILOG dot matrix printer (with a scale of 100 screen dots per inch of paper). The output file is called 'SCREEN.LIS'. ITERM = Fortran unit for graphics stream. NRWMIN = Line number at bottom of screen (GE.0) NRWMAX = Line number at top of screen (LE.479). Lines are read in groups of three. NRWMAX will be rounded to 3*N-1 and NRWMIN to 3*M. PLT$RDTM(ITERM,NRWMIN,NRWMAX,SCREEN) Read the contents of the screen and save them in packed binary form with 5 dots per byte. ITERM = Fortran unit for graphics stream. NRWMIN = Line number at bottom of screen (GE.0) NRWMAX = Line number at top of screen (LE.479). SCREEN = Byte array dimensioned (0:127 , NRWMIN:NRWMAX). each byte is OCTAL 100 plus 5 bits representing dots. The screen width of 640 dots (0:639) is divided into 128 columns of 5 dots each. The screen is left in teletype mode. The screen read is slow and takes about 2 minutes. PLT$SFTM(ITERM,BITS,NROW,NCOL,NCOUNT) Fill part of the screen with a dot pattern taken from the byte array BITS which consists of a sequence of /1/ or /0/ bytes. The pattern is read directly onto the screen from left to right and top to bottom row by row (up to 2560 dots at a time). ITERM = Fortran unit number of graphics stream. BITS = Byte array of dots (not packed!!) NROW = Row to start at (top limit) NCOL = Column to start with (0:127) Each of 5 dots wide. NCOUNT= Number of 5-dot groups to transmit (Max =512). PLT$SLTM(ITERM,NRWMIN,NRWMAX,SCREEN) Load part of the screen with a dot pattern of bytes in PACKED form, 5 dots per byte. This routine loads complete lines and works from top to bottom. Maximum 4 lines at a time or 512 bytes. ITERM = Fortran unit number of graphics stream. NRWMIN = Row number for bottom (GE.0) NRWMAX = Row number for top (LE.479) SCREEN = Packed byte array (e.g. as read by PLT$RDTM. PLT$SVTM(ITERM,FILNAM) Save the entire contents of the screen on a disk file of packed binary data, 5 dots per byte. Each row of screen uses 128 bytes. There are 480 rows. Total 60*1024 bytes. ITERM = Fortran unit number of graphics stream. FILNAM = Filename or logical name for disc file. This routine uses the QREAD,QWRITE direct access routines. PLT$RSTM(ITERM,FILNAM) Restore the entire contents of the screen from a disk file of packed binary data created by PLT$SVTM. ITERM = Fortran unit number of graphics stream. FILNAM = Filename or logical name for disc file. This routine uses the QREAD,QWRITE direct access routines. 8. ADDITIONAL USER ROUTINES ---------------------------- * These routines are extra ones which use the PLOT84 system to draw * various useful objects PLT$BARX(CENT,XDIFF,WA,WB,NUM) draws tick marks along the X axis PLT$BARY(CENT,YDIFF,WL,WR,NUM) draws tick marks along the Y axis CENT(2) = position of first mark XDIFF = interval between marks along X YDIFF = interval between marks along Y WA,WB = limits of tick height above and below X axis WL,WR = limits of tick to left and right of Y axis NUM = number of marks PLT$FRAM(FXWID,FYWID,XF0,YF0,SLANT) draws a frame as a parallelogram with horizontal base. FXWID,FYWID = half-width in x and y XF0,YF0 = position of centre SLANT = tangent of angle of sloping side with vertical 9. LOOKALIKE ROUTINES FOR THE OLD PLOT82 SYSTEM -------------------------------------------- 9.1 List of the PLOT82 simulation routines ------------------------------------------ * The following routines mimic the effect of the old PLOT82 routines. * They do not usually allow for the improved features of PLOT84, and they * do not attempt to correct some of the logical faults in the old routines. * They are intended for the user who has a simple program written with PLOT82 * which he does not want to update. Basic routines CRTPLT(PLTNAM,JCOLOR) Start up plotting PLTNAM = name of plotfile [CHARACTER*(*)] JCOLOR = 0,1 for monochrome or mixed colour NOTE!! File name is still a character variable. BRKPLT(NFORM) Finish current picture or stop plotting NFORM = +1,-1 go on or finish. Must use one call with -1 to complete the plot file correctly. Style of plotting PEN(ICOLR) Set colour ICOLR = 1...7 as for PLT$COLR LINEWT(LWT) Choose line weight LWT = 1...9 as for PLT$LNWT PAPER(X) Put out blank paper at 100 lines per inch X in mm (limit of 500mm) Plot boundary ALTPRM(NBPI,PAPWID,PAPLEN) Set paper plotting constants. NBPI = dots-per-inch (normally 100) PAPWID = paper width in inches (max 13.0) PAPLEN = paper length in inches (normally 20.0, max 80.0). !! Call this, if used, once only before CRTPLT BOUNDS(VBXMIN,VBXMAX,VBYMIN,VBYMAX) Set plot bounds in mm on the drawing area VBXMIN,VBXMAX = limits in x VBYMIN,VBYMAX = limits in y !! Call this just once after CRTPLT and before you draw anything. Note mm not inches. Line scaling SCALE(A,B) Multiply user units along x and y by factors start with user unit=1mm A,B = x,y factors ROTATE(A) Set user axes turned A degrees anticlockwise TRANSFM(A,B,C,D) Set user transformation matrix ( A B ) ( C D ) ORIGIN(X,Y,N) Set user origin X,Y = new position N = 0,1, absolute in mm, or relative to old user origin in user units Character scaling SCLCHR(A,B) Multiply character width and height by A,B with initial values of 3mm,3mm ANROT(DEG) Set angle for rotated text baseline (now same as ROTCHR routine DEG = angle of rotation anticlockwise from X ROTCHR(DEG) Rotate each character DEG degrees anticlockwise from X CHRSPC(A) Multiply character width by A. Initially set as 3mm Character positioning and set-up FONT(N) Select font N=0...4 as for PLT$FONT IRELCH(N) Centering choice N = 0 bottom left corner = 4 centred LOCCHR(X,Y,N) Set character position for a string X,Y = position in user coordinates N = 0 relative to user origin N = 1 relative to current pen position !!NOTE Changes in allowed values of N. Line drawing PLOT(X,Y,NDRAW) Move to or draw to a point (X,Y) = user coordinates NDRAW = 0,1,2,3 for drawto,drawby,moveto moveby DRAWTO(X,Y) Draw from current point to (X,Y) DRAWBY(X,Y) Draw from current point a distance (X,Y) MOVETO(X,Y) Move without drawing to (X,Y) MOVEBY(X,Y) Move without drawing from current point a distance (X,Y) VECPLT(XVEC,YVEC,NPOINT) Draw a set of NPOINT points connected by lines XVEC(NPOINT) = x array YVEC(NPOINT) = y array Character string drawing STRING(BYTXT,NCHARS) Plot a character string left justified BYTXT = byte array of text (H format) NCHARS = number of letters CSTRING(BYTXT,NCHARS) Plot a centred character string BYTXT = byte array of text (H format) NCHARS = number of letters Special drawing routines NUMBER(X,Y,HGT,FNUM,ANGLE,NDIG) Draw the digits of a real number X,Y = position to start. If (X,Y)=(999.0,999.0) then use current text position HGT = character size in user units FNUM = number to plot (real*4) ANGLE = angle of tilt in degrees NDIG = GE.0 number of digits after point = LT.0 plot as rounded integer SYMBOL(X,Y,HGT,BYTXT,ANGLE,NC) Draw a byte character string at an angle X,Y = position to start HGT = character size in user units BYTXT = byte array of letters (H format) ANGLE = angle of slope in degrees NC = number of letters Plot file routines BOPENW Open plot file for writing and write header BWRITE(IX,IY) Write the coordinates of a plot point in the plot file BCLOSE Close plot file BOPENR(*) Open plot file to read header (return to statement * on end of file) BREAD(IX,IY,*) Read the coordinates of a plot point in the plot file (return to statement * on end of file) 9.2 List of nearest equivalent routines in PLOT84 -------------------------------------------------- The symbols * and ? are used to indicate: a nearly exact equivalence where the translation is obvious; a rather remote connection where careful thought may be required. In other cases the conversion is fairly direct, but not always precisely equivalent. !! Note that PLT$INIT, PLT$PICT, and PLT$STOP are always required. The use of PLT$PICT,PLT$ENDP is required if there is more than one picture. Note that the plot file name is a CHARACTER*(*) variable, as before. Note that CHARACTER variables are now preferred for plotting letters and strings in the most useful routines. Window and viewport bounds are saved from one picture to the next. They can be changed between pictures, but the results are not easily predictable unless routines PLT$XENV and PLT$ENVR are called to erase old settings completely. Non-standard scalings are erased at the end of each picture. The character scaling and centering in PLOT82 was faulty and cannot be reproduced exactly by the new routines. * CRTPLT PLT$INIT - PLT$PICT * BRKPLT PLT$ENDP - PLT$PICT - PLT$STOP * PEN PLT$COLR * LINEWT PLT$LNWT * PAPER PLT$PAPR ? BOUNDS PLT$WNDB SCALE PLT$SCLU ROTATE PLT$UROT ? TRANSFM PLT$UMAT ? ORIGIN PLT$ORGD - PLT$ORGU SCLCHR PLT$SCLC ? ANROT PLT$CROT - PLT$STRU - PLT$STRD ROTCHR PLT$CROT ? CHRSPC PLT$CSPA * FONT PLT$FONT IRELCH PLT$CENC LOCCHR PLT$ANCD - PLT$ANCU * PLOT PLT$MVTO - PLT$DWTO -PLT$MVBY - PLTDWBY * DRAWTO PLT$DWTO * MOVETO PLT$MVTO * DRAWBY PLT$DWBY * MOVEBY PLT$MVBY * VECPLT PLT$VCLN - PLT$LINE * STRING PLT$STRC - PLT$STRH ? CSTRING PLT$CETX NUMBER PLT$INUM - PLT$FNUM - PLT$ENUM SYMBOL PLT$STRC - PLT$STRD - PLT$STRU 9.3 List of Nearest Equivalent VT640 Routines ---------------------------------------------- * The new routines are very similar to the old ones. Certain precautions * have been taken to guard against the peculiarities of the VT640 terminal. INITVT640 PLT$INTM(ITERM) PLT$OPTM(ITERM) Do not clear screen PLT$SCTM Clear only SELECTVT640 PLT$GRTM MOVEVT640 PLT$MVTM(IX,IY) DRAWVT640 PLT$DWTM(IX,IY) POINTVT640 PLT$PTTM(IX,IY) TEXTVT640 PLT$TXTM(TEXT,ISIZE) XHAIRVT640 PLT$HRTM(IX,IY,CHKEY) DOTSONVT640 PLT$DOTM DOTSOFFVT640 PLT$ERTM DOTSCOMPVT640 PLT$RVTM SELECTVT100 PLT$TYTM MOVEVT100 PLT$MYTM(IXC,IYC) CLEARVT100 PLT$CYTM BUFFVT640 PLT$BFTM(ITERM,NBYTE) COORDVT640 PLT$XYTM(IX,IY,CODE) DUMPVT640 SCRPRINT program or subroutines PLT$PRTM, PLT$RDTM New Routines PLT$OFTM(ITERM) Close graphics stream PLT$LSTM(ITYPE) Line type PLT$BLTM Bell 10. INDEPENDENT PROGRAMS AND SUBROUTINES ----------------------------------------- 10.1 Graph Drawing Program --------------------------- CURVY Program for drawing graphs with a simple form of automatic scaling See separate write-up. Uses special subroutines PLT$CVAX,PLT$CVLI,PLT$CVSC PLT$CFIX,PLT$CVLF PLT$CVAX(X,Y,LABEL,NSIDE,NTEX,AXLEN,GSCALE,ANGLE,FVAL,DV) Subroutine to draw an axis on a graph with tick marks and labels. This routine is designed for use by CURVY program. (X,Y) = origin in user units LABEL = character string to label the axis.[character*(*) up to 40] NSIDE = +1,-1 for tick marks above or below axis NTEX = 1,0 Plot normal text labels etc, or suppress all written output except for the plotted symbols AXLEN = axis length in graph units. Ticks every 1.0 units GSCALE = value of 1 graph unit in user units (usually mm) ANGLE = anticlockwise rotation of axis line from X=direction in degrees FVAL = number to write next to first tick, giving graph value DV = step of value to write on each following tick FURTHER DETAILS. The LABEL is plotted in characters of size 5mm and centred in a position 14mm above or below axis. The tick marks are 3mm long. The scale numbers FVAL are scaled by a suitable number of powers of 10 to make DV lie between 0.01 and 99.0 and then written left justified to the ticks, 7mm above or below the axis, with letters of size 4mm, offset 4mm to the left of the first tick. The label letter size is reduced down to a minimum of 2mm if the space allowed is too small for the full size. PLT$CVSC(CHLINE,CHOUT,NCHAR) Subroutine to scan input line and find an "!" CHLINE = input string [character*(*)] CHOUT = output string consisting of that part of CHLINE before the "!" NCHAR = length of output string (up to 60) PLT$CVSC(AMIN,AMAX,AXLEN,XMIN,DX) Subroutine used by CURVY to scale along one axis AMIN = given min value of graph AMAX = given max value of graph AXLEN = length of axis in user units XMIN = output min X to match AMIN DX = output distance in X to match (AMAX-AMIN) PLT$CFIX(REEL,IFIXI) Routine used by CURVY to truncate positive and negative decimals REEL = real number IFIX = largest integer (algebraic) that does not exceed REEL. PLT$CVLF(CARD,XNUM,NFIELDS) Subroutine used by CURVY to decode free-format number pairs for graph drawing CARD = line of data [character*80] XNUM = array for output of free-format numbers found on line NFIELDS= number of complete numbers found (should be 2) 10.2 Plotting on the TRILOG printer ------------------------------------ TRILOG Simple main program for plotting on a dot matrix printer produces an output print file .LIS TRILOGQ Simple main program for plotting with output in a batch job included in the LOG file. PLT$TRIL(PLTFIL,LISFIL,IOFLAG) Subroutine used to do the plotting on the dot matrix printer. The main TRILOG program does nothing but call PLT$TRIL PLTFIL = full name of plot .PLT file [character*(*)] LISFIL = full name of output .LIS file [character*(*)] IOFLAG = 0 or 1 controls method of opening plot file. IOFLAG=0 in TRILOG and IOFLAG=1 in TRILOGQ. PLT$TRIC(PLTFIL,LISFIL,IOFLAG) Subroutine used to do colour plotting on the dot matrix printer. The main TRICOLOUR program does nothing but call PLT$TRIC PLTFIL = full name of plot .PLT file [character*(*)] LISFIL = full name of output .LIS file [character*(*)] NOTE!! This routine has not been tested properly, and may not work. Line plotting on a dot raster * The routine PLT$LRSB is used by the TRILOG program PLT$LRAS(IX1,IY1,IX2,IY2) plot a line as dots on a raster by Bresenham's method. Uses addition and subtraction only. IX1,IY1,IX2,IY2 = end points as integer values on the raster PLT$LRSB(IX1,IY1,IX2,IY2) plot a line as dots on a raster of rectangular bricks by Bresenham's method. As used by TRILOG84 . Uses addition,subtraction and binary shifts. Also plots point dots. IX1,IY1,IX2,IY2 = end points as integer values on the raster 10.3 Viewing the plotfile on the VT640 screen ---------------------------------------------- VIEW simple main program for looking at plots PLT$VIEW(FILNAM,NSTART,ISCALE,SCAFAC,LINSIZ,NOCENT,NOPRNT,NINTER,IERR) This is the subroutine used by the VIEW main program to look at the contents of the plotfile. FILNAM = name of plot file [character*(*)] NSTART = number of picture to start at. If NSTART.LT.1 program asks user for value ISCALE = 1,2,3 choice of scaling (1) uniform to fill screen (2) chosen multiple of true scale on paper (3) independent X,Y scales to fill screen SCAFAC = scale factor when ISCALE=2 LINSIZ = 0,1-9 line thickness (0) use value in plot file (1...9) use value set here NOCENT = 1,0 use floating or fixed origin for picture. With NOCENT=1 picture is positioned in middle of screen NOPRNT = 1,0 print of information off,on NINTER = 1,0 interactive or not. If NINTER=1 the program asks user for all information and ignores the called settings. IERR = 0,1 normal or error return code 10.4 VT640 Screen Programs --------------------------- SCRPRINT Program to send contents of the screen to the TRILOG printer. This is a slow operation and should not be used if it is possible to draw the same picture from a standard plot file. The scale is 100 dots per inch and may not reproduce the expected size. Allow about 2 minutes of real time to read the screen. SCRSAVE Program to save contents of screen on a direct access disc file of 120 blocks. SCRFILL Program to restore screen from a saved disc file. 10.5 Poster drawing -------------------- POSTER Program to draw large lettering on printer, suitable for posters at meetings etc. See separate write-up 10.6 Plotting by command ------------------------- QUICKPLOT Program to make drawings under keyboard control by commands. Useful for testing PLOT84 routines or for special diagrams. See separate write-up ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ TABLES ====== ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ TABLE 1.1 --------- DEFINITIONS OF PLOT84 COMMON BLOCK VARIABLES -------------------------------------------- Last updated 5 Oct 1984 --DEFINITIONS OF COMMON BLOCKS AND VARIABLES IN PLOT84 <> ((USER TRANSFORMATION VARIABLES)) USRMAT(3,3) = USER SCALING MATRIX: XDRW=USRMAT(1,1)*XU+USRMAT(1,2)*YU + XORIG YDRW=USRMAT(2,1)*XU+USRMAT(2,2)*YU + YORIG XORIG:=: USRMAT(1,3) YORIG:=: USRMAT(2,3) XORIG,YORIG = USER ORIGIN ON DRAWING BOARD (MM) SCALEX,SCALEY = MM EQUIV OF 1 USER UNIT ALONG LOCAL X,Y USANGX,USANGY = ANGLES OF LOCAL USER AXES (RADIANS) CUMAT(3,3) = CHARACTER*USER SCALING MATRIX CUORGX:=:CUMAT(1,3) CUORGY:=:CUMAT(2,3) CUORGX,CUORGY = CHARACTER*USER ORIGIN VALUE LINMOD = .TRUE. FOR LINE MODE ICULNK = .TRUE. FOR USER CHAR TRANS LINKED NSTRAN(24) = ARRAY EQUIVALENT TO (USRMAT...ICULNK) KPRINT = PRINT CONTROL, COPY OF IPRINT FOR SOME ROUTINES <> ((CHARACTER POSITION VARIABLES)) CHRMAT(3,3) = CHARACTER TRANSFORMATION MATRIX CHORGX:=:CHRMAT(1,3) CHORGY:=:CHRMAT(2,3) CHORGX,CHORGY = CHARACTER ORIGIN IN CHAR UNITS RELATIVE TO (XCHAR,YCHAR) CHRSCX,CHRSCY = CHAR WIDTH AND HEIGHT IN CHARACTER UNITS (DEFAULT=3.0) CHANGX,CHANGY = ANGLES OF CHAR X AND Y (RADIANS) CHRSPX,CHRSPY = CHARACTER SPACE EXTRA VALUES ICENTC = CHARACTER CENTERING CONTROL UCSPAC = .TRUE. FOR UNIFORM SPACING IFONT = FONT NUMBER FONTIN = .TRUE. AFTER FONT TABLES READ IN XCHAR,YCHAR = CHARACTER ANCHOR POINT XCSTRT,YCSTRT = CHARACTER CURSOR POSITION RELATIVE TO ANCHOR POINT IN CHARACTER UNITS ON CHARACTER GRID ANGFAC = PI/180.0 DEGREES TO RADIANS NCTRAN(24) = ARRAY EQUIVALENT TO (CHRMAT...ANGFAC) <> ((PEN POSITION VARIABLES)) XNOW,YNOW = CURRENT USER POSITION XBNEW,YBNEW = CURRENT BOARD POSITION XBOLD,YBOLD = OLD BOARD POSITION <> ((DEVICE AND WINDOW VARIABLES)) MDEVIC = DEVICE (1)UNDEF (2)PAPER (3) VT640 MDIREC = (0)PLOTFILE (1) DIRECT MOUT = VT640 UNIT SYMBOLIC NUMBER MPIC = SERIES NUMBER OF PICTURE MSCAFL,MCNTFL = FLOATING SCALE AND ORIGIN DWLIMX,DWLIMY = CURRENT DRAWING BOARD SIZE MM DVXMIN,DVXMAX = DEVICE X VIEWPORT MM DVYMIN,DVYMAX = DEVICE Y VIEWPORT MM UBXMIN,UBXMAX = DRAWING BOARD X WINDOW MM UBYMIN,UBYMAX = DRAWING BOARD Y WINDOW MM FILNAM(*80) = PLOTFILE NAME DEVCON = LOGICAL*4 .TRUE. WHEN DEVICE SWITCHED ON INITON = .TRUE. IF PLT$INIT CALLED NERROR = NO OF OUT OF BOUNDS ERRORS DWBLMX,DWBLMY = DRAWING BOARD MAX SIZE MM PAPLMX,PAPLMY = PAPER MAX SIZE MM V64LMX,V64LMY = VT640 MAX SIZE MM IUNIT = SYMBOLIC UNIT NUMBER (PLOTFILE) DOTMMX,DOTMMY = DOTS PER MM ALONG DEVICE X Y (DEFAULT(10.0,10.0)) IXMIN,IXMAX = ACTUAL USED X RANGE OF PLOT PIXELS IYMIN,IYMAX = ACTUAL USED Y RANGE OF PLOT PIXELS LINWT,ICOLOR = LINE-THICKNESS, COLOUR (DEFAULT 4) MIXCOL = (0) MONOCHROME (1) MIXED COLOURS NPICS = NUMBER OF PICTURES IN THE RUN IPRINT = PRINT CONTROL (0)NONE (1)NORMAL,(2,3)MORE IDRLVL = INITIATION LEVEL (0)NO-INIT,(1)INIT,(2)TRSET, (3) DRAWING IN PROGRESS TITLE(*80) = PLOT TITLE <> ((DEVICE MM TO PIXELS INTEGERS TRANSF)) FACX,FACY = SCALE FACTORS XFOFF,YFOFF = ORIGIN OFFSETS IDXOFF,IDYOFF = PIXEL MARGINS TRANSFORMATION IS: IX = (XDRW*FACX+XFOFF)+IDXOFF IY = (YDRW*FACY+YFOFF)+IDYOFF IXOLD,IYOLD = PIXEL INDEX OF PREVIOUS PLOTTED POINT MODOLD = MODE FOR PREVIOUS POINT (1=DRAW,2=POINT,3=MOVE) <> ((CLIPPING LIMITS ON DRAWING BOARD)) BXMIN,BXMAX = X RANGE BYMIN,BYMAX = Y RANGE <> ((PLOT HEADER DATA)) 512 BYTES (SOME SPARE) IUNITR = UNIT NUMBER (COPY OF IUNIT) NOT PART OF HEADER IREC(128)/AREC(128) CONTAINS THE OTHER DATA AS FOLLOWS: 1. NREC = NUMBER OF RECORDS AFTER HEADER 2. DOTMMX = DOTS PER MM ALONG X 3. DOTMMY = DOTS PER MM ALONG Y 4. IXMIN = LOW PIXEL X USED 5. IXMAX = HIGH PIXEL X USED 6. IYMIN = LOW Y 7. IYMAX = HIGH Y 8. LINWT = LINE THICKNESS 9. ICOLOR = COLOUR 10. MIXCOL = MIXED COLOUR 11. MDEVIC = DEVICE TYPE 12. MDIREC = DIRECT/DEFERRED 13. MOUT = OUTPUT UNIT 14. MPIC = PICTURE NUMBER 15. MSCAFL = FLOATING SCALE 16. MCNTFL = FLOATING ORIGIN 17. DWLIMX = DRAWING BOARD X SIZE 18. DWLIMY = DRAWING BOARD Y SIZE 19. DVXMIN = DEVICE X MIN 20. DVXMAX = DEVICE X MAX 21. DVYMIN = DEVICE Y MIN 22. DVYMAX = DEVICE Y MAX 23. NPICS = NUMBER OF PICTURES IN THIS SET 24-25. PASWRD = CHARACTER*8 WORD 'PLOT%%84' 26-40. SPARE 41-60. TITLEH = PLOT TITLE(*80) 61-128. SPARE -------------------------------------------------------- <> TEXT FONT GENERATION VECTORS IFSTRT = START ARRAY POSITION LENGF = NUMBER OF VECTORS IFX0,IFY0 = ORIGIN SHIFT IFWID,IFHT = WIDTH, HEIGHT CONSTANTS NFONTS = VECTOR COORDS (4 BYTES FOR X1,Y1,X2,Y2) C-------------------------------------------------------- C --FORTRAN DEFINITIONS OF THE COMMON BLOCKS C -- Last updated 1 Oct 1984 C-- COMMON/PLT$$UTR/USRMAT(3,3),SCALEX,SCALEY, 1 USANGX,USANGY,CUMAT(3,3),LINMOD, 2 ICULNK,KPRINT EQUIVALENCE(XORIG,USRMAT(1,3)),(YORIG,USRMAT(2,3)) EQUIVALENCE(CUORGX,CUMAT(1,3)),(CUORGY,CUMAT(2,3)) LOGICAL*4 LINMOD,ICULNK DIMENSION NSTRAN(24) EQUIVALENCE(NSTRAN(1),USRMAT(1,1)) C-- COMMON/PLT$$CHX/ CHRMAT(3,3),CHRSCX,CHRSCY, 1 CHANGX,CHANGY,CHRSPX,CHRSPY, 2 ICENTC,UCSPAC,IFONT,FONTIN, 3 XCHAR,YCHAR,XCSTRT,YCSTRT,ANGFAC EQUIVALENCE(CHORGX,CHRMAT(1,3)),(CHORGY,CHRMAT(2,3)) LOGICAL*4 FONTIN,UCSPAC DIMENSION NCTRAN(24) EQUIVALENCE(NCTRAN(1),CHRMAT(1,1)) C-- COMMON/PLT$$DWX/XNOW,YNOW, 1 XBNEW,YBNEW,XBOLD,YBOLD C-- COMMON/PLT$$DVW/MDEVIC,MDIREC,MOUT,MPIC, 1 MSCAFL,MCNTFL, 2 DWLIMX,DWLIMY,DVXMIN,DVXMAX,DVYMIN,DVYMAX, 3 UBXMIN,UBXMAX,UBYMIN,UBYMAX, 4 FILNAM,DOTMMX,DOTMMY,DEVCON,INITON,NERROR, 5 DWBLMX,DWBLMY,PAPLMX,PAPLMY,V64LMX,V64LMY, 6 IUNIT,IXMIN,IXMAX,IYMIN,IYMAX, 7 LINWT,ICOLOR,MIXCOL,NPICS,IPRINT, 8 IDRLVL,TITLE C-- CHARACTER*80 FILNAM,TITLE LOGICAL*4 DEVCON,INITON C-- COMMON/PLT$$DVT/FACX,FACY,XFOFF,YFOFF, 1 IDXOFF,IDYOFF,IXOLD,IYOLD,MODOLD C-- COMMON/PLT$$CLP/BXMIN,BXMAX,BYMIN,BYMAX C-- COMMON/PLT$$FHD/IUNITR,IREC(128) REAL*4 AREC(128) EQUIVALENCE (IREC(1),AREC(1)) CHARACTER*80 TITLEH EQUIVALENCE(TITLEH,IREC(41)) CHARACTER*8 PASWRD EQUIVALENCE(PASWRD,IREC(24)) C-- COMMON/PLT$$FNT/IFSTRT,LENGF,IFX0,IFY0,IFWID,IFHT, 1 NFONTS BYTE NFONTS(4,3000,4) INTEGER*2 IFSTRT(150,4),LENGF(150,4) INTEGER*2 IFX0(150,4),IFY0(150,4) INTEGER*2 IFWID(150,4),IFHT(150,4) C-- C --FORCE THE LINKER TO INCLUDE "BLOCK DATA" EXTERNAL PLT$BLKD C---------------------------------------- ======================================================================== TABLE 1.2 --------- DETAILS OF THE PLOT RASTER ARRAY -------------------------------- Last updated 30 August 1984 ----- The maximum page depth is set at 8192 lines (100 per inch) Each line 1536 dots across (6 dots/byte and 256 bytes) The plotter allows 1320 dots across page (220 bytes) With a 13-inch paper width only the first 1296 dots (216 bytes) on each line are used. With 8-inch page depth there are 800 lines per page ----- In the PLOT84 TRILOG program the plot area is divided into bricks of (48*64) dots or (8*64)=512 bytes with 32 bricks across the page and 128 up the page. This reduces the number of virtual memory page faults, and in plots with many long vectors which run up and down the page the brick algorithm is 8 times faster than the PLOT82 TRILOG program. Some of the byte-copying of bricks is done in terms of blocks of character strings -------------------------------------------------------------------- PLOT FILE COMMAND CODES (IX,IY) revised July 1984 (i,+j) draw line to (i,j) i,j in range 1 to 32766,not 0. (i,-j) move to (i,j) ------- (-i,j) treat i as a command code, j as a data value (-1,j) end picture: put out j pages of paper before next picture use (j=1) (-2,0) dot (-3,j) lineweight,thickness j=1...9 (-4,j) colour change. j defines colour (-5,j) blank paper, j rows of 1/100 inch height (-6,j) erase (VT640 only) j=1 on, j=0 off. ------------------------------------------------------------------------- TRILOG PRINTER BIT CODING A line of 1296 printed dots is specified by 216 bytes (each of 8 binary digits) which are initially set to a value of NBYTE=64. The first 6 bit positions in NBYTE are set with 1 or 0 for dot or blank by using a logical .OR. operation: NBYTE= (NBYTE.OR.MBITS(J)) J= 0,1,2,3,4,5 Here the byte array MBITS is initialised by the data statement BYTE MBITS(0:6)/1,2,4,8,16,31/ ========================================================== TABLE 1.3 --------- DETAILS OF THE VT640 SCREEN RASTER AND SCALING ---------------------------------------------- Last updated 30 August 1984 The VT640 machine has a raster of physical dots (640*480) and the xerox monitor plots at 10 physical dots/3mm with full size (192.0,144.0)mm or (7.55906,5.66929)inches. VT640 programming uses a virtual raster of memory dots (0:1023 * 0:779) and then the range (1024,780) is scaled down by factors of (5/8) and (8/13) to 1024*(5/8)=640 and 780*(8/13)=480. PLOT84 uses just part of the VT640 screen. The program leaves a margin at the edge of the screen and uses a screen area size (550*465) physical dots equivalent to (165.0*139.5)mm or (6.5*5.5) inches across, with margins [left 60=(0:59) ] [ bottom 8=(0:7) ]. The physical user area is (60:609 * 8:472) dots and the corresponding area in memory dots is (880*756) with margins [ left 96=(0:95) ] [ bottom 13=(0:12) ]. The memory user area is now (96:975 * 13:768). ================================================================= ======================================================================== TABLE 2.1 --------- ASCII NUMBERS FOR CHARACTER PLOTTING ------------------------------------ Last updated 30 August 1984 --STANDARD ASCII TEXT ASSIGNMENTS (CHARACTERS NUMBERED 0...127) --WRITTEN IN COLUMNS OF 16 CHARACTERS 0 16 32 48 64 80 96 112 0 NUL DLE 32SPA 48 0 64 @ 80 P 96 112 p 1 SOH DC1 33 ! 49 1 65 A 81 Q 97 a 113 q 2 STX DC2 34 " 50 2 66 B 82 R 98 b 114 r 3 ETX DC3 35 # 51 3 67 C 83 S 99 c 115 s 4 EOT DC4 36 $ 52 4 68 D 84 T 100 d 116 t 5 ENQ NAK 37 % 53 5 69 E 85 U 101 e 117 u 6 ACK SYN 38 & 54 6 70 F 86 V 102 f 118 v 7 BEL ETB 39 ' 55 7 71 G 87 W 103 g 119 w 8 BS CAN 40 ( 56 8 72 H 88 X 104 h 120 x 9 HT EM 41 ) 57 9 73 I 89 Y 105 i 121 y 10 LF SUB 42 * 58 : 74 J 90 Z 106 j 122 z 11 VT ESC 43 + 59 ; 75 K 91 [ 107 k 123 { 12 FF FS 44 , 60 < 76 L 92 \ 108 l 124 | 13 CR GS 45 - 61 = 77 M 93 ] 109 m 125 } 14 SO RS 46 . 62 > 78 N 94 ^ 110 n 126 ~ 15 SI US 47 / 63 ? 79 O 95 _ 111 o 127 DEL NUL Null DLE Data link escape SOH Start of heading DC1 Device control 1 STX Start of text DC2 Device control 2 ETX End of text DC3 Device control 3 EOT End of transmission DC4 Device control 4 ENQ Enquiry NAK Negative acknowledge ACK Acknowledge SYN Synchronous idle BEL Bell ETB End transmission block BS Backspace CAN Cancel HT Horizontal tabulation EM End of medium LF Line feed SUB Substitute VT Vertical tab ESC Escape FF Form feed FS File separator CR Carriage return GS Group separator SO Shift out RS Record separator SI Shift in US Unit separator SP Space DEL Delete -------------------------------------------------------------------- ====================================================================== ====================================================================== TABLE 2.2 --------- RULES FOR MAKING LETTERS IN FOUNTS 1-4 ------------------------------------- Last updated 30 August 1984 ------------------------------------------------------- HERSHEY FOUNTS FROM NATIONAL BUREAU OF STANDARDS Via A.M. Lesk Modified by D.A. Agard to be a part of VAX PLOT81 package KFONT = 1 FOR BLOCK LETTERS (DEFAULT) KFONT = 2 FOR BOLD-FACE ITALICS KFONT = 3 FOR SCRIPT KFONT = 4 FOR GREEK -------------------------------------------------------------------- Each character is defined on an integer grid with 21 units for the character height and various widths The scaled character is 1.0 character units high (21 grid units) The width is a multiple of 1.0/21.0 character units In font 1: for capital letters the lowest point is at IY=-8 and top at IY=+13 for lower-case letters the top is normally at IY=+6 with descenders down to IY = -15 the [ ] | go from -15 to +17 The letter baseline is therefore at -8. Relative to this baseline letters rise to +21 special chars to +25, lower case to +14, descents to -7 Widths are 20 for numbers (0-9),25 letter "m",27 for "@" is widest. For each font the grid values lie in the range IX=(IFX0+1)...(IFWID-1) IY=(IFY0+1)...(IFHT +1) where IFX0,IFY0,IFWID,IFHT are stored in the tables of founts. In this drawing routine any big letters are shrunk to fit in a "standard character box" (1.5) character units high and (1.0) units wide,with the baseline (0.5) units above the bottom of the box. Positioning of characters is referred to the left end of the baseline (ICENTC=0) or the centre of the upper box(ICENTC=1) 0.5 units above the baseline. DRAWING OF LETTERS IN FOUNT 0 These letters are constructed on a smaller grid X=0-7 and Y=0-7 with 7 grid units to one character unit. Each character is either a capital letter or a digit or punctuation, so there are no descenders and the character all lies in the upper 1.0*1.0 square of the character box. The fount table is written with a curious combination of packed integers in half bytes. The letter grid in the tables only uses X=0-4. Here the letters are offset by 1.5 grid units to thr right to give correct centering. Symbols from fount 0 are drawn in a smaller grid X=0-4, Y=0-4 and are centred at their midpoint. ======================================================================= TABLE 2.3 --------- SHORT DESCRIPTION OF SYMBOLS AVAILABLE IN FONTS 0 AND 1 ------------------------------------------------------- Last updated 30 August 1984 ******************************************************** The symbol generating routines construct a symbol numbered NSYMB from a symbol set numbered NSET (NSET=1 or 2) There are at present three routines: (1) PLT$GSYM DRAWS CENTRED SYMBOL OF STANDARD SIZE AND LEAVES CHARACTER CURSOR UNMOVED (2) PLT$GSYS DRAWS CENTRED SYMBOL OF CHOSEN SIZE AND OFFSET AND LEAVES CHARACTER CURSOR UNMOVED (3) PLT$GSYC TREATS SYMBOL AS A SPECIAL FORM OF LETTER AND CENTRES IT AS FOR LETTERS,AT BOTTOM LEFT, MOVING THE CHARACTER CURSOR AFTER DRAWING THE SYMBOL THE CHARACTER CURSOR MOVES BY THE NORMAL LETTER SPACING --NSET=1,2 ONLY AVAILABLE NOW !!! 32 SYMBOLS IN SET 1 FROM FONT 0 TABLES 46 SYMBOLS IN SET 2 FROM FONT 1 TABLES (CHARACTERS 129-174) ---------------------------------------------------------------- LIST OF SYMBOLS IN SET 1 AND SET 2 ---SET 1--- ---SET 2--- A 1. SQUARE + LINE TO CENTRE A 1. LEFT < BRACKET B 2. OCTAGON + LINE TO CENT B 2. RIGHT > BRACKET C 3. PLUS SIGN C 3. DOUBLE BAR || D 4. X CROSS D 4. +OR- E 5. TRIANG + LINE TO CENTRE E 5. MULTIPLY X F 6. DIAMOND + LINE TO CENT F 6. DECIMAL . G 7. + WITH TOP ARROW G 7. DIVIDE BY H 8. X WITH TOP LINK H 8. NOT= I 9. Z I 9. IDENTICALLY= J 10. Y J 10. OR= L 12. VERTICAL BAR L 12. VARIES AS M 13. SQUARE WITH EARS M 13. ACCENT / N 14. UNION JACK STAR N 14. ACCENT \ O 15. CROSSED SQUARE O 15. ACCENT U P 16. PENTAGRAM STAR P 16. QUOTE 9 Q 17. LOGICAL NOT --| Q 17. QUOTE 6 R 18. HORIZ BAR -- R 18. QUOTE BACK 9 S 19. CAP LAMBDA S 19. QUOTE BACK 6 T 20. IDENT = TRIPLE BAR T 20. SQUARE ROOT U 21. RIGHT ARROW U 21. BOOLEAN [ V 22. LOW -- V 22. BOOLEAN U W 23. +OR- W 23. BOOLEAN ] X 24. V X 24. BOOLEAN ^ Y 25. SQUARE ROOT Y 25. BOOLEAN EPSILON Z 26. DOWN ARROW Z 26. RIGHT ARROW 1 27. TRIANGLE DELTA 1 27. UP ARROW 2 28. MULTIPLY X 2 28. LEFT ARROW 3 29. DIVIDE BY 3 29. DOWN ARROW 4 30. US "CENT" 4 30. PARTIAL DERIV D 5 31. VERTICAL HIGH BAR 5 31. GRAD D 6 32. UNDERLINE 6 32. SQUARE ROOT 7 7 33. INTEGRAL 8 8 34. CIRCUIT INTEGRAL 0/ 9 9 35. INFINITY a a 36. DOUBLE SS SIGN b b 37. DAGGER SIGN c c 38. DOUBLE DAGGER d d 39. BACKWARD "E" e e 40. ALEPH "N" f f 41. FF LIGATURE g g 42. FI LIGATURE h h 43. FL LIGATURE i i 44. FFI LIGATURE j j 45. FFL LIGATURE k k 46. SMALL "1" (FOOTNOTE) --------------------------------------------------------------- --SYMBOLS SUITABLE FOR MARKING POINTS ON GRAPHS ARE: SET 1 :- 1 2 3 4 5 6 11 13 14 15 27 28=4 alias A B C D E F K M N O 1 2=D SET 2 :- 5 6 31 alias E F 5 --OPTION TO GET SYMBOLS THROUGH AN ASCII CHARACTER CODE NSYMB(1-26) = LETTERS (A-Z) NSYMB(27-35) = DIGITS(1-9) NSYMB(36-61) = LETTERS (a-z) ---------------------------------------------------------------- ================================================================== ================================================================== TABLE 3.1 --------- CONTENTS OF THE PLOT FILE HEADER Last updated 1 Oct 1984 The header contains 512 bytes, or 128 4-byte words. These are normally held in the COMMON block COMMON/PLT$$FHD/ IUNITR,IREC(128) REAL*4 AREC(128) EQUIVALENCE (IREC(1),AREC(1)) CHARACTER*80 TITLEH CHARACTER*8 PASWRD EQUIVALENCE(TITLEH,IREC(41)) EQUIVALENCE(PASWRD,IREC(24)) The single variable IUNITR is the file stream unit number (not FORTRAN IO) and is not part of the header. The header information is in the words of the two equivalent arrays IREC or AREC as follows: 1. NREC = NUMBER OF DATA RECORDS IN PICTURE AFTER HEADER 2. DOTMMX = DOTS PER MM ALONG X 3. DOTMMY = DOTS PER MM ALONG Y 4. IXMIN = LOW RASTER X USED 5. IXMAX = HIGH RASTER X USED 6. IYMIN = LOW Y 7. IYMAX = HIGH Y 8. LINWT = LINE THICKNESS 9. ICOLOR = COLOUR 10. MIXCOL = MIXED COLOUR 11. MDEVIC = DEVICE TYPE 12. MDIREC = DIRECT/DEFERRED 13. MOUT = OUTPUT UNIT (FOR VT640 ONLY) 14. MPIC = PICTURE NUMBER IN THIS FILE 15. MSCAFL = FLOATING SCALE SELECTION 16. MCNTFL = FLOATING ORIGIN SELECTION 17. DWLIMX = DRAWING BOARD X SIZE (MM) 18. DWLIMY = DRAWING BOARD Y SIZE (MM) 19. DVXMIN = DEVICE VIEWPORT X MIN (MM) 20. DVXMAX = DEVICE VIEWPORT X MAX (MM) 21. DVYMIN = DEVICE VIEWPORT Y MIN (MM) 22. DVYMAX = DEVICE VIEWPORT Y MAX (MM) 23. NPICS = NUMBER OF PICTURES IN THIS FILE 24-25. PASWRD = PASSWORD 'PLOT%%84' 26-40. SPARE 41-60. TITLEH = PLOT TITLE(*80) 61-128. SPARE =========================================================================== TABLE 6.1 --------- ORDER OF INITIALISATION OF WINDOWS AND SCALING LIMITS BY SUBROUTINE ------------------------------------------------------------------- PLT$ENVR -------- Last updated 30 August 1984 ----------------------------------------------------------------- ENTRY PLT$XENV Used to clear old settings to default ENTRIES: PLT$DVIC,PLT$BSIZ,PLT$DVPT,PLT$WNDB,PLT$WSCL PLT$DTRN These are used to set the desired values for window and device constants. when PLT$ENVR is called it uses either its own default values or those set by the user to build a reasonable plotting system. each subroutine checks its input values for errors and supplies a default for the next step. The order of initialisation is: PLT$EDVC (DIRECT,DEVICE) Sets default drawing board size for device PLT$EBSZ (DRAWING BOARD SIZE) Sets default device viewport max size to fill the whole device PLT$EDVP (DEVICE VIEWPORT) Sets default drawing board window to fill the board size PLT$EWND (DRAWING BOARD WINDOW) PLT$EWSC (SCALING OPTIONS: FLOAT,FIX) Trims drawing board window if too big for device PLT$EDTR (DEVICE TRANSFORMATION) Checks raster scaling to fit 1-32767 grid Values are remembered, so that a second call to PLT$ENVR sets the same environment as before. Also, if any of the settings are altered PLT$ENVR makes minimal changes to the values of other constants. The object of these routines is to ensure that all plots stay within the drawing board and device limits. ----------------------------------------------------------------- TABLE 6.2 --------- TRANSFORMATION DATA SAVED BY ROUTINE PLT$TSAV --------------------------------------------- Last updated 30 August 1984 DEFINITIONS OF COMMON BLOCKS USED HERE <> ((USER TRANSFORMATION VARIABLES)) USRMAT(3,3) = USER SCALING MATRIX: XDRW=USRMAT(1,1)*XU+USRMAT(1,2)*YU + XORIG YDRW=USRMAT(2,1)*XU+USRMAT(2,2)*YU + YORIG XORIG:=: USRMAT(1,3) YORIG:=: USRMAT(2,3) XORIG,YORIG = USER ORIGIN ON DRAWING BOARD (MM) SCALEX,SCALEY = MM EQUIV OF 1 USER UNIT ALONG LOCAL X,Y USANGX,USANGY = ANGLES OF LOCAL USER AXES (RADIANS) CUMAT(3,3) = CHARACTER*USER SCALING MATRIX CUORGX:=:CUMAT(1,3) CUORGY:=:CUMAT(2,3) CUORGX,CUORGY = CHARACTER*USER ORIGIN VALUE LINMOD = .TRUE. FOR LINE MODE ICULNK = .TRUE. FOR USER CHAR TRANS LINKED NSTRAN(24) = ARRAY EQUIVALENT TO (USRMAT...ICULNK) KPRINT = PRINT CONTROL, COPY OF IPRINT FOR SOME ROUTINES <> ((CHARACTER POSITION VARIABLES)) CHRMAT(3,3) = CHARACTER TRANSFORMATION MATRIX CHORGX:=:CHRMAT(1,3) CHORGY:=:CHRMAT(2,3) CHORGX,CHORGY = CHARACTER ORIGIN IN CHAR UNITS RELATIVE TO (XCHAR,YCHAR) CHRSCX,CHRSCY = CHAR WIDTH AND HEIGHT IN CHARACTER UNITS (DEFAULT=3.0) CHANGX,CHANGY = ANGLES OF CHAR X AND Y (RADIANS) CHRSPX,CHRSPY = CHARACTER SPACE EXTRA VALUES ICENTC = CHARACTER CENTERING CONTROL UCSPAC = .TRUE. FOR UNIFORM SPACING IFONT = FONT NUMBER FONTIN = .TRUE. AFTER FONT TABLES READ IN XCHAR,YCHAR = CHARACTER ANCHOR POINT XCSTRT,YCSTRT = CHARACTER CURSOR POSITION RELATIVE TO ANCHOR POINT IN CHARACTER UNITS ON CHARACTER GRID ANGFAC = PI/180.0 DEGREES TO RADIANS NCTRAN(24) = ARRAY EQUIVALENT TO (CHRMAT...ANGFAC) The PLT$TSAV routine array NTRSAV(48) contains the contents of arrays NSTRAN(24) and NCTRAN(24) in positions 1-24 and 25-48. *********************************************************************** * * * PLOT84 SUBROUTINE CALLING CONNECTIONS * * * * Last Updated 5 Oct 1984 * * * *********************************************************************** Notes ----- 1. All PLOT84 library routines have a name of the type PLT$abcd. Some routines use common blocks with names PLT$$xyz. In these lists the PLT$ is usually omitted. 2. Subroutines often have multiple entries. These are grouped together in clusters thus: [*INIT [>TITL [>PRNT Here [ groups together the entries. Each entry point is marked >. The main entry which names the subroutine is marked * 3. Calls are listed in order of occurrence and drawn as lines to the right thus: [>HRTM ---------------| SUSP / | XYTM - | BFTM / The symbol - on the right of the called routine means that it in turn calls other routines. The symbol / means that the routine calls no further routines in the PLOT84 library. 4. If a group of entries call nearly the same routines these are grouped together with a vertical line of | on the right thus: [*GCHC |---------------| GCH0 - [>GCHS | [>GCHI | [>GCHH | --------------------- CALLING PATTERNS Initial Set-Up -------------- [*INIT ----------------| BLKD / [ | LVCK / [ | XENV - [ | STYL - [ | RFNT / [>TITL [>PRNT Start and Finish Pictures ------------------------- [*PICT ----------------| LVCK / [ | ENVR - [ | UTRN - [ | STYL - [ | DVON - [ | WHDR - [ | INTM - [ | GRTM - [ [>WAIT ----------------| LVCK / [ | TYTM - [ | SUSP / [ | SCTM - [ | TYTM - [ | CYTM - [ | MYTM - [ | BLTM - [ | TYTM - [ | CYTM - [ | INTM - [ | TYTM - [ | MYTM - [ [>ENDP ----------------| LVCK / [ [>STOP ----------------| FLWI - [ | UHDR - [ | TYTM - [ | MYTM - [ | DVOF - Device on and Off ----------------- [*DVON ----------------| LVCK / [ | OFLW - [ | INTM - [ | GRTM - [ [>DVOF ----------------| FLP1 - [ | RHDR - [ | FLBR - [ | FLWR - [ | FLSR - [ | WHDR - [ | CFIL - [ [ ----------------| BLTM - [ | TYTM - [ | SCTM - [ | TYTM - [ | CYTM - [ | MYTM - [ | OFTM - Window and Viewport Setting --------------------------- [*ENVR ----------------| LVCK / [ | EDVC / [ | EBSZ / [ | EDVP / [ | EWND / [ | EWSC / [ | EDTR / [ [>XENV ----------------| LVCK / [>BSIZ ----------------| LVCK / [>DVPT ----------------| LVCK / [>WNDB ----------------| LVCK / [>WSCL ----------------| LVCK / [>DTRN ----------------| LVCK / [*EDVC / [*EDVP / [ [>EBSZ / [*EWND / [*EDVC / Style and Colour ---------------- [*STYL -----------------| LVCK / [ [>MIXC / [ [>LNWT -----------------| FLWI - [ [>COLR -----------------| FLWI - [ | VBRK / [ [>PAPR -----------------| FLWI - [ [>FONT / [ [>ERAS | [>EREV |----------------| FLWI / [>ERAX | | DOTM - [ | ERTM - [ | RVTM - [ | VBRK / General Scaling --------------- [*UTRN -----------------| LVCK / [ | MUCT - [ line scaling [>SCLU | [>UROT | [>UMAT |----------------| LVCK / [>ORGD | | MUCT - [>ORGU | [ character scaling [>SCLC | [>CROT |----------------| LVCK / [>CMAT | | MUCT - [>ORGC | [ spacing and cursor [>CSPA / [>CSPU / [>CENC / [>ANCD / [>ANCU / [>FCUR / [>PCUR / [>SCUR / [>LNFD / [ transformation control [>TLNK / [>CMOD / [*TSAV / [>TRES / [*MUCT -----------------| TMPY Character Set-up ---------------- [*RFNT / [*CFSZ / Number Digit Plotting --------------------- [*INUM | [>FNUM |----------------| CETS - [>ENUM | Character Strings ----------------- Centred [*CETX |----------------| CFSZ / [>CETS | | STRS - Left-Justified [*STRC -----------------| GCHC - [ [>STRS -----------------| GCHS - [ [>STRH | [>STR2 |----------------| GCHI - [>STR4 | Special [*STRD |----------------| GCHC - [>STRU | Single Characters ----------------- [*GCHC |----------------| GCH0 - [>GCHS | | GCHF - [>GCHI | [>GCHH | Single Symbols -------------- [*GSYM |----------------| GSY0 - [>GSYS | | GCHF - [>GSYC | Fount Stroke Generation ----------------------- [*GCH0 |----------------| MVTO - [>GSY0 | | DWTO - [*GCHF -----------------| MVTO - | DWTO - Line and Dot Drawing -------------------- [*DRMV | [>DWTO |----------------| CLPT / [>DWBY | | DOTB - [>POIN | | MDRB - [>MVTO | | CLPL - [>MVBY | | DDRB - [*LINE -----------------| MVTO - | DWTO - [*VCLN -----------------| MVTO - | DWTO - [*DDRB |----------------| LVCK / [>DOTB | | FLWI - [>MDRB | | DWTM - [ | PTTM - [>VBRK / | MVTM - Line Clipping ------------- [*CLPT / [*CLPL -----------------| CLPT / | CLTS / | SWLN / [*CLTS / [*SWLN / Terminal User Routines ---------------------- [*HAIR -----------------| CLPT / | TYTM - | HRTM - | TYTM - [*TYON |----------------| TYTM - [>TYOF | | CYTM - | MYTM - | GRTM - | VBRK / Plot File Control ----------------- [*OFLW -----------------| LVK / [ | QOPEN / [ [>OFLR -----------------| QOPEN / [ [>CFIL -----------------| QCLOSE / [ [>WHDR -----------------| LVCK / [ | QWRITE / [ [>FLWI -----------------| LVCK / [ | QWRITE / [ [>UHDR -----------------| LVCK / [ | QBACK / [ | QWRITE / [ | QSKIP / [ [>RHDR -----------------| QREAD / [ [>FLRI -----------------| QREAD / [ [>FLP1 -----------------| QSEEK / [ [>FLBR -----------------| QBACK / [ [>FLSR -----------------| QSKIP / [ [>FLWR -----------------| QWRITE / [ [>FLRR -----------------| QREAD / Terminal Driver --------------- [*INTM |----------------| SUSP / [>ONTM | [ [>OFTM -----------------| SUSP / [ | BFTM / [ [>SCTM -----------------| SUSP / [ | BFTM / [ [>GRTM -----------------| SUSP / [ [>MVTM |----------------| XYTM - [>DWTM | [>PTTM | [ [>HRTM -----------------| SUSP / [ | XYTM - [ | BFTM / [ [>TXTM -----------------| BFTM / [ [>TYTM -----------------| BFTM / [ | SUSP / [ [>MYTM -----------------| BFTM / [ [>CYTM -----------------| BFTM / [ [>DOTM |----------------| BFTM / [>ERTM | | SUSP / [>RVTM | [ [>LSTM -----------------| BFTM / [ | SUSP / [ [>BLTM -----------------| SUSP / [*XYTM -----------------| BFTM / [*BFTM / Timing ------ [*TIMR |----------------| LIB$STAT_TIMER / [>TIM0 | | LIB$INIT_TIMER / [*SUSP -----------------| SYS$SETIMR / | SYS$WAITFR / Character Drawing Summary ------------------------- [INUM | [CETX | [FNUM |--[CETS |---| [CFSZ [ENUM | | | [STRC ----[GCHC | |--[STRS ----[GCHS |----[GCHF ---------+ [STRH |---[GCHI | | [STR2 | [GCHH |--+ | [STR4 | | | [GSYM | |[GCH0 |----------[MVTO [GSYS |---[GSY0 | |[DWTO [GSYC |-----------[GCHF --+ Line Drawing Summary -------------------- [DRMV | [LINE ---| [DWTO |--| [DDRB |-----------------|[LVCK | [ | | [DOTB | |[FLWI --[QWRITE [VCLN ---| [MVTO | | [MDRB |-------|[DWTM | [POIN | | [VBRK |[PTTM |---[XYTM --[BFTM [DWBY | |[MVTM | [MVBY |---+ | +-[CLPL --|[CLPT |[CLTS |[SWLN