PROGRAMMERS' REFERENCE MANUAL S-C 4020 Computer Recorder

Document No. 9500056

Stromberg Datagraphics

October 1964

Revised 1968

TABLE OF CONTENTS

Many of the original SC4020 output diagrams have been redrawn to make them more readable. The versions here use SVG to replace the original SC4020 hardcopy output.

1. INTRODUCTION

The S-C 4020 Computer Recorder, designed and manufactured by Stromberg-Carlson Corporation, Data Products, San Diego, Calif., operates as peripheral equipment for high-speed digital computers. This document describes the features of the machine, gives the basic programming requirements including the coding and word format of commands used for control and recording operations, and describes a set of subroutines to assist the programmer in developing grid backgrounds, scaling data, and formatting printed material. These routines are made available by Stromberg-Carlson and have been derived from a programming system contributed largely by the programming groups of North American Aviation Company, Inc.

The obvious application of the S-C 4020 is the rapid production of labeled graphs. Results in graphical form are usually much easier to analyze than are the same results in printed tabular form.

Less obvious, but often highly desirable, is the exploitation of the S-C 4020 as a high-speed printer. For certain applications, this affords distinct advantages over the use of a standard printer. For one thing, printed records can be obtained on 35mm or 16mm film, which greatly reduces the amount of space required to store the records. A form suited to the printed information can be generated or superimposed by the S-C 4020.

A variation is the production of a frame that combines tabular data with a plot of the related curve. Still another use of S-C 4020 techniques is the creation of diagrams and line drawings.

At first glance, the list of S-C 4020 routines on the following pages seems formidable indeed, but the user should not feel baffled by the great volume of details available. Some routines were developed for special purposes with limited usage. Many are used principally as lower-level modules for more general subroutines, and will seldom be called directly by the programmer.

This Programmers' Reference Manual has been organized in major sections according to the function of the routines described therein. The major sections are: Introduction and Description of the S-C 4020, Machine Control Routines, Grid Drawing Routines, Scaling Routines, Point-Plotting and Line-Drawing Routines, Titling and Labeling Routines, and Higher Level Printing and Graphics Routines. Information about the interpretation of the system subroutines and an operating system has been included in the Controls section.

In order to become familiar with the equipment, the programmer should read the following machine description before proceeding to the programming details.

1.1 Description of Machine Features

1.1.1 CHARACTRON Shaped Beam Tube

The CHARACTRON Shaped Beam Tube, the basic device of the S-C 4020, permits generation of certain characters at a very high speed. This tube, illustrated schematically in Figure 1.1, contains a built-in character-forming section which consists of an electron gun, character-selection plates, and a stencil-like matrix.

Figure 1.1
1.1.2 Matrix

The Matrix, a small thin disk of special alloy metal, employs 64 character-shaped openings engraved in a space less than one-fourth of an inch square. These 64 characters are arranged in an 8 × 8 array, thus giving the matrix its name.

1.1.3 Electron Gun

The Electron Gun directs an electron beam toward the matrix through two sets of electrostatic character-selection plates. These plates deflect the beam so that it passes through the particular matrix aperture desired. Thus, as the beam leaves the matrix, it has been shaped in the form of the character aperture through which it has passed. As this shaped beam proceeds toward the tube face, it is accelerated (brightened) and again deflected to the proper position on the tube face. From this description, it can be seen that it takes no longer to print an entire CHARACTRON (beam-shaped) character than it does a single dot.

1.1.4 CHARACTRON Character

Each CHARACTRON Character occupies approximately 6-horizontal by 9-vertical positions on the plottable area of the tube face. This area, called the raster, contains over one million plottable positions. These CHARACTRON characters cannot be rotated nor changed in size in any way. However, if other characters which may differ in size, shape, or attitude from those provided by the matrix are desired, they may be constructed from dots or lines.

1.1.5 Typewriter Simulator

A Typewriter Simulator, so-called because it provides automatic spacing and carriage return capabilities, is built into the S-C 4020. Each CHARACTRON character typed occupies 8-horizontal and l6-vertical positions on the raster; this character space area provides the spacing necessary to separate adjacent characters, both vertically and horizontally. In this mode of operation, a maximum of 128-horizontal and 64-vertical alphanumeric characters are possible in one display. The point at which the first character is to be printed must be specified (the center of the character position), and thereafter the horizontal printing position is automatically advanced one character-space to the right. At the edge of the frame, the horizontal position is returned to the left side of the frame and the vertical position is advanced down one character-space. This continues until the machine is told to stop printing, i.e., leave the typewriter mode of operation.

1.1.6 Typewriter-like Operations

The Typewriter-like Operation takes place at an extremely rapid rate. Unlike the human typist however, the machine does not check to make sure that it ends a line at the end of a word; a carriage return must be programmed or the appropriate number of blanks inserted to insure that the lines will come out correctly. Also, if the end of the film frame is reached, typing will continue at the upper left-hand corner of the current film frame (on top of anything that was put there before) unless an advance-film command is given.

1.1.7 Heavy and Light Intensities

Heavy and Light Intensities of exposure are available for recording CHARACTRON-generated characters. A greater range of intensities may be obtained by repeated exposure at either light or heavy setting. This control does not affect the intensity of lines drawn by the axis generator or the vector generator. Over exposure due to excessive repetition results in haloing on the film and poor definition in the output. Once the intensity has been set, all plotting and typewriter-printing will be at that intensity until it is changed. For special applications, a variable intensity plot command option is available. This permits plotting at any of sixteen intensity levels without affecting the intensity mode set by a light or heavy command.

1.1.8 Vector Generator

A Vector Generator permits drawing a line from a specified point to the resultant of the specified X and Y components. The length of one vector is limited; the X and/or Y components may be no greater than 63 raster counts (raster count is the number of plottable positions on the raster in either the horizontal or vertical direction). A longer line may be formed by a series of vectors plotted head-to-tail. Since the extent of a vector is determined by the X and Y components, the vectors will not necessarily stop at the edge of the frame. This feature might be used to advantage in marking the location of errors.

1.1.9 Axis Generator

An Axis Generator enables grid lines to be drawn horizontally or vertically across the film frame. The coordinates of the starting point of each axis must be specified. The stop point is specified as the Y coordinate or the complement of the X coordinate, whichever is appropriate.

1.1.10 Two Cameras

Two Cameras are available and can be used separately or simultaneously to photograph the display on the tube face. The microfilm camera may be either 35mm (with sprocket holes) or 16mm (without sprocket holes). The image size is a 17.5-mm square on 35mm film and a 14-mm square on 16mm film. The 9.5-inch camera records the same picture as a 7.5-inch square on sensitized vellum paper.

1.1.11 Rotatable Tube Mount

Rotatable Tube Mount allows output to be obtained in any of four orientations on the film.

1.1.12 Form Projector

A Form Projector permits an overlay on top of the image projected from the CHARACTRON tube. This is obtained by using a glass slide, independent of the tube, to project an image in registration with the tube output. The program can control when the form is flashed (projected), but the S-C 4020 operator must manually change the slides.

1.1.13 Specified Image Size Generator

Specified Image Size Generator allows the image to be expanded and returned to normal four inches under program control. The size of the expanded image may be adjusted by the Customer Engineer. However, machine alignment in expanded image is difficult.

1.1.14 Current Point Register

A Current Point Register in the S-C 4020 is used to hold the coordinates specified by the last operation. This register can be set by the programmer (by plotting a blank, if necessary, at the point desired), but not retrieved by him.

1.1.15 Input

Input to the S-C 4020 may be directly from the computer through an I/O adapter or from a tape unit which is off-line. When operating off-line, an F-53 buffer is normally used to control the tape drive and to convert tape records to 36-bit control words for the S-C 4020. The F-53 also provides the means for accepting high-density, blocked information from the tape unit and transmitting the information to the S-C 4020 on demand. An alternative off-line configuration is to use the S-C 4020 with a small general purpose computer in place of the F-53. This has been accomplished successfully with a CDC 160-A and a GE 225.

1.2 Error Marks

1.2.1 Void Mark

This is a solid circle which the S-C 4020 places in the margin when forced to proceed past an error condition. This occurs whenever a parity error in reading the tape cannot be corrected by rereading, or whenever the tape block exceeds the size of the F-53 input buffer. In either condition, the S-C 4020 will automatically try a second time to read the record. The void light comes on only when the operator forces the S-C 4020 to proceed after detecting an error.

1.2.2 Error Symbol

The CHARACTRON character is displayed by the S-C 4020 if a parity error occurs when printing or plotting; that is, the specifications in the erroneous word. This error symbol is not displayed if the erroneous word is one which normally does not display a character; for example, an axis or vector generation word. In addition to displaying the error symbol, the tape drive is stopped when a parity error is detected. A frame with such a mark will usually have a Void Mark as well.

2. BASIC S-C 4020 PROGRAMMING

The S-C 4020 plots on a grid of 1024-horizontal by 1024-vertical points. There are, therefore, over 1 million addressable positions. The center of any character may be plotted at any of these positions. However, each character in the matrix occupies an amount of space that varies from the square of 3-horizontal by 3-vertical points used by a plotting dot to the rectangle of 8-horizontal by 16-vertical points used by all characters in the typewriter mode.

The S-C 4020 grid is a reflection of the first quadrant. The origin (0, 0) is in the upper left corner, with X and Y increasing to the right and downward, respectively as shown in the figure below. This is the machine-oriented reference. (see Positioning Information regarding programmer orientation of rasters.)

0,0 1023,0 0,1023 1023,1023

The plot appears in a 4-inch by 4-inch square on the face of the CHARACTRON shaped beam tube and is recorded on film.

Information is transmitted to the S-C 4020 through a 36-bit input register. The basic unit breaks down each 36-bit word into its component parts: the operation code and the information necessary to accomplish the specified operation. The bits, from left to right, are numbered from 0 (or S, the sign bit) through 35. Word format and operation code for each command is given in the following pages of this section.

NOTE: The S-C 4020 requires a delay following its receipt of certain operation codes. The delay is of concern only when operating without an F-53 or other input buffer. These operations, presented in the following discussion, are marked with an asterisk.

2.1 Control Operations

No information is plotted on the grid as the result of any of the following nine operations:

2.1.1 Advance Film

The ADVANCE FILM command causes the film in the camera (or cameras) selected to be advanced one frame. If the supply of film is exhausted, the command cannot be executed. An alarm is activated.

ADVANCE FILM* OPCODE 46 0 5 6 35 OP CODE NOT USED
2.1.2 Reset

The RESET command performs simultaneously the functions of the ADVANCE FILM, STOP TYPE, and EXPOSE HEAVY commands. It also resets the deflection registers. In the typewriter mode, operation code 56 may replace any of the character codes shown below. Any bits following the code 56 are ignored.

RESET* (PLOTTING MODE) OPCODE 56 0 5 6 35 OP CODE NOT USED
RESET* (TYPEWRITER MODE) OPCODE 56 0 5 6 11 12 17 18 23 24 29 30 35 CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE
2.1.3 Carriage Return

The CARRIAGE RETURN command is effective only in the typewriter mode. Operation code 52, replacing any of the 6-bit character codes shown below, causes an effective typing position at the left of the grid and down one line (X=0, Y=Y last + 16) to be assumed. Spacing, therefore, may be achieved through the appearance of this code in contiguous 6-bit groups. If a CARRIAGE RETURN command is given which would specify an effective position of X=0, Y=1024, the position assumed is X=0, Y=0 of the same grid, since Y is computed modulo 210. Typing is resumed with the next legitimate character.

CARRIAGE RETURN OPCODE 52 0 5 6 11 12 17 18 23 24 29 30 35 CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE
2.1.4 Select Camera

The SELECT CAMERA commands are used to open the shutter of the camera or cameras designated and to close the shutter on the one not selected. If only one camera is mounted, it is not necessary to give a SELECT CAMERA command.

SELECT CAMERA 1* OPCODE 41 0 5 6 35 OP CODE NOT USED
SELECT CAMERA 2* OPCODE 42 0 5 6 35 OP CODE NOT USED
SELECT BOTH CAMERAS* OPCODE 43 0 5 6 35 OP CODE NOT USED
2.1.5 Expand Image

The EXPAND IMAGE command increases the image size on the CHARACTRON tube face. The exact size is adjusted so that successive frames on the microfilm will abut to allow plots to extend continuously through several adjacent frames. The number of raster points remains the same and the CHARACTRON characters remain the same size; therefore, the space between characters is increased in expanded image mode. The image may be expanded uniformly in both directions in order to avoid distortion in graphs due to uneven scaling. The image remains expanded until the REDUCE IMAGE command is given.

EXPAND IMAGE* OPCODE 44 0 5 6 35 OP CODE NOT USED
2.1.6 Reduce Image

The REDUCE IMAGE command causes the image to be reduced to four inches square and to remain at four inches until another EXPAND IMAGE command is given.

REDUCE IMAGE* OPCODE 45 0 5 6 35 OP CODE NOT USED
2.1.7 Stop Type

The STOP TYPE command is used to return the S-C 4020 to the plotting mode from the typewriter mode of operation. Operation code 12 may replace any of the character codes shown below. Bits following the 12 are lost.

STOP TYPE OPCODE 12 0 5 6 11 12 17 18 23 24 29 30 35 CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE

2.2 Recording Operations

Information is placed on the grid by using one of the following nine commands. The length of time that characters, plotted or typed, are exposed results in their being recorded on film with heavy or light density. There is, however, no density-mode selection when drawing vectors or generating axes.

   PLOT
   EXPOSE LIGHT
   EXPOSE HEAVY
   TYPE SPECIFIED POINT
   TYPE CURRENT POINT
   DRAW VECTOR
   GENERATE X-AXIS*
   GENERATE y-AXIS*
   PROJECT FORM*
2.2.1 Plotting Mode

The PLOT, EXPOSE LIGHT, and EXPOSE HEAVY commands are exactly the same in that they plot the character represented by bits 18 through 23 at the point specified by the X and Y deflections. However, code 00 (PLOT) operates in the density mode to which the S-C 4020 has already been set, while 02 and 04 set the machine to the EXPOSE HEAVY and EXPOSE LIGHT modes, respectively. All plotting or typing subsequent to the recognition of an 02 or 04 operation code is done in the density mode thus established. The EXPOSE HEAVY mode can be terminated only by the reception of an EXPOSE LIGHT code. The EXPOSE LIGHT mode can be changed to the EXPOSE HEAVY mode by either an EXPOSE HEAVY code or a RESET code.

PLOT OPCODE 00 0 5 6 7 8 17 18 23 24 25 26 35 OP CODE NOT USED X DEFLECTION CHAR CODE NOT USED Y DEFLECTION
EXPOSE LIGHT OPCODE 04 0 5 6 7 8 17 18 23 24 25 26 35 OP CODE NOT USED X DEFLECTION CHAR CODE NOT USED Y DEFLECTION
EXPOSE HEAVY OPCODE 02 0 5 6 7 8 17 18 23 24 25 26 35 OP CODE NOT USED X DEFLECTION CHAR CODE NOT USED Y DEFLECTION
2.2.2 Typewriter Mode

The typewriter mode is initiated by either a TYPE SPECIFIED POINT or a TYPE CURRENT POINT command. A STOP TYPE or RESET operation returns the S-C 4020 to the plotting mode.

In the typewriter mode, the grid of 1024-horizontal by 1024-vertical points may be regarded as containing 64 lines of 128 typing spaces each. Once typing has been commenced, it continues across the line until the 128th space has been filled or a CARRIAGE RETURN command has been executed. In either case, typing continues on the next lower line at the extreme left of the grid (X=0, Y= Ylast + 16).

An ADVANCE FILM command must be given after the 64th line has been typed; otherwise; typing will continue on the first line of the same grid at X=Y=0 with resulting overlay. If vertical alignment of characters is desired, X0 should be either 0 or divisible by eight.

Note that, in the typewriter mode, character codes 12, 52, and 56 are not legitimate in that they do not cause a character to be typed but instead cause an operation to be performed (STOP TYPE, CARRIAGE RETURN, and RESET, respectively).

TYPE SPECIFIED POINT (FIRST WORD) OPCODE 20 0 5 6 7 8 17 18 23 24 25 26 35 OP CODE NOT USED X DEFLECTION CHAR CODE NOT USED Y DEFLECTION
TYPE CURRENT POINT (FIRST WORD) OPCODE 22 0 5 6 11 12 17 18 23 24 29 30 35 CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE

For both of the above commands, all words after the first have the following format:

(SUBSEQUENT WORD) 0 5 6 11 12 17 18 23 24 29 30 35 CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE CHAR CODE

One of the character codes of the subsequent word's format may be replaced by the operation code for CARRIAGE RETURN. Characters specified by succeeding bits are typed. The six bits following the last character to be typed must contain either the RESET or STOP TYPE operation code. Any bits still remaining in this word are lost.

The current point is defined as the point specified by the last operation performed, i.e. , either the last point plotted or typed, or the origin of the last vector or axis drawn. It is advisable, therefore, with a TYPE CURRENT POINT command to make the first two characters typed blanks.

2.2.3 Vector Generation

The DRAW VECTOR command causes a vector to be drawn from the point specified by the X and Y deflections to the resultant of the X and Y components.

DRAW VECTOR OPCODE 1 BIT IN POSITIONS 0 AND 1 0 1 2 7 8 17 18 19 20 25 26 35 OP CODE X COMPONENT X-DEFLECTION Y COMPONENT Y-DEFLECTION SIGN X COMPONENT SIGN Y COMPONENT

The direction is determined by the signs of the X and Y components as shown below. A one in bit 18 indicates a plus X component; a zero means a minus X component. Bit 19 similarly indicates the sign of the Y component.

-X , +Y +X , +Y -X , -Y +X , -Y

The maximum component of the vector which may be drawn is 1/16 of full scale (64 plotting positions).

2.2.4 Axis Generation

The GENERATE X-AXIS command causes a line to be drawn parallel to the X-axis. The line starts at the point designated by the X and Y deflections and extends to the right to the stop point. The ones complement of the X deflection of the stop point is placed in bits 6, 7, and 18 through 25 of the command word. If the stop point bits contain all zero, the axis generated will extend to the right boundary of the frame. Thus, programs prepared for early models of the S-C 4020 will generate full axes in machines equipped with the specified stop point axis generator. The stop point must be at least 64 raster counts to the right of the start point.

GENERATE X-AXIS* OPCODE 30 0 5 6 7 8 17 18 25 26 35 OP CODE STOP POINT X DEFLECTION STOP POINT Y DEFLECTION

The GENERATE Y-AXIS command causes a line to be drawn parallel to the Y-axis. The line starts at the point designated by the X and Y deflections and extends upward to the stop point. The stop point is not complemented for a Y-axis. The Y deflection of the stop point is placed in bits 6, 7, and 18 through 25 of the command word. The stop point must be at least 64 raster counts upward from the start point. Programs prepared for early models of the S-C 4020 will generate full length axes in machines equipped with the specified stop point axis generator.

GENERATE Y-AXIS* OPCODE 32 0 5 6 7 8 17 18 25 26 35 OP CODE STOP POINT X DEFLECTION STOP POINT Y DEFLECTION
2.2.5 Form Projection

The PROJECT FORM command causes the information on the form slide to be superimposed on the film, along with the data displayed on the tube. This command may he given only once every 100 milliseconds.

PROJECT FORM* OPCODE 50 0 5 6 35 OP CODE NOT USED

2.3 S-C 4020 Operation Codes

The 6-bit codes for commands, written in octal notation, are given below.

OperationCode
PLOT00
EXPOSE HEAVY02
EXPOSE LIGHT04
STOP TYPE12
TYPE SPECIFIED POINT20
TYPE CURRENT POINT22
GENERATE X-AXIS*30
GENERATE Y-AXIS*32
SELECT CAMERA 1*41
SELECT CAMERA 2*42
SELECT BOTH CAMERAS*43
EXPAND IMAGE*44
REDUCE IMAGE*45
ADVANCE FILM*46
PROJECT FORM*50
CARRIAGE RETURN52
RESET*56
DRAW VECTOR6x or 7x

2.4 S-C 4020 Standard Character Matrix

The standard scientific character set used by the S-C 4020 is illustrated in Figure 2-1.

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 9 = " ' δ α + A B C D E F G H I π ) β ± ? - J K L M N O P Q R . $ * γ d / S T U V W X Y Z ° , ( Σ
Figure 2.1

BCD Code in Octal = Number of Left and Above Character. Note: 12, 52, and 56 cannot be used in Typewriter Mode

2.5 Optional Commands

2.5.1 Specified Intensity Plot

This command is an additional PLOT command. The intensity of the plotted character is controlled by regulating the exposure time. The sixteen levels of intensity are specified by setting bits 6, 7, 24, 25 from 0000 (lightest) to 1111 (darkest). Bit 6 is the high order bit and bit 25 is the low order bit. The operation of this command does not affect the model intensity for other plotting established by a prior EXPOSE HEAVY or EXPOSE LIGHT command. S-C 4020's not equipped with the Specified Plot Intensity option, treat this command as a PLOT with OPCODE 00.

SPECIFY INTENSITY PLOT OPCODE 01 0 5 6 7 8 17 18 23 24 25 26 35 OP CODE SPEC INT X DEFLECTION CHAR CODE SPEC INT Y DEFLECTION

2.6 Standardized S-C 4020 Programming Routines

The Stromberg-Carlson Corporation provides, as a service to users, programming support for the S-C 4020. In 1961 a set of routines was generated by StrombergCarlson and distributed to users and potential users of the S-C 4020. These routines were a tremendous boon to programmers and are still in use in some installations. Over the months of usage many users have developed subroutines of a more sophisticated nature to reduce the programming task to produce S-C 4020 output.

The various divisions of the North American Aviation Co., cooperatively developed a system of subroutines for use on their IBM 7090 computers within the framework of their operating system. Since the NAA system has been contributed to the UAIDE library, Stromberg-Carlson has adopted these routines as the base for a standardized programming system. It is intended that this system of routines will be maintained and upgraded by Stromberg-Carlson to keep pace with the continuing improvement program for the S-C 4020 and the operating systems in use by the majority of the users of the S-C 4020. As new generalized routines become available they will be added to the system. Changes to the system will be announced by systems bulletins to be issued by Stromberg-Carlson as required.

2.7 Operating Systems: PLOT.., (PLOT)

The programming system is presently available for use under IBSYS for the IBM 7090/7094 computers in either the FORTRAN II, Version 3 monitor or the IBJOB, Version 9 monitor.

All output from the programming system is handled by a routine called (PLOT) in the FORTRAN II version and PLOT.. in the IBJOB version. These routines store the word to be transmitted to the S-C 4020 in a core buffer. When the buffer is filled the routine causes the contents of the buffer to be written on tape. The system is double buffered to take advantage of the I/O buffering of the IBM 7090/7094. The buffer size is set by the command:

FORTRAN II   (SIZE)      EQU        680      (deck OUTV)
IBJOB        buffer size is set by the FILE  card (deckUN16)

A buffer size of 680 words is maximum and can only be used on machines not using the F53 or on machines using the F53 for 4096 characters. For the small size F53, a buffer size of 170 words is maximum. The buffer size is set at assembly time and should only be changed by reassembling the source deck labeled OUTV with the appropriate change in the card defining (SIZE). IBM 7090/7094 DCS systems may further restrict the buffer size.

On the first entry into (PLOT) or PLOT.. control is transferred to an initialization routine stored in the second buffer region. This routine causes the first three commands transmitted to the S-C 4020 to be a Reset, Select Both Cameras, and Reduce Image Size. This assures that the output will start on a clean sheet of paper, the image size will be small, and that both cameras are selected. The routine then proceeds to output an ID frame, followed by another Reset.

2.8 The Identification Frame

The chief purpose of the ID frame (Figure 2-2) is to enable the job dispatcher to return the developed output to the right programmer. However, since it is always generated in the same way, the frame can also serve as a clue to output quality. Several machine features are demonstrated. The information printed in small characters is an example of CHARACTRON characters, printed in the typewriter mode, using bright intensity. These characters are displayed only once; i.e., they are not replotted for greater intensity. Since the typewriter mode is used, the spacing of characters within words is determined by the equipment, not by the programmer. An example of vectors may be seen in the arrow. Since the lines that form the shaft of the arrow are longer than the maximum vector length, each line is made up of three vectors joined end-to-end. The border is formed by pairs of axis lines. On the ID Frame, the outermost axis lines lie on the outermost raster coordinates. The border, therefore, shows the maximum size of a frame (and, incidentally, shows how close the frame is to being square). The small box is also made with axes and tests the accuracy of stop points.

The coding to produce the ID frame can be easily altered to communicate with the local operating system in order to place the required ID information for job identification in the ID frame. A few moments study by a systems programmer should be all that is required.

STROMBERG-CARLSON CORPORATION DATAPRODUCTS-SANDIEGO POST OFFICE BOX 2449, SAN DIEGO, CALIFORNIA 92112 TELEPHONE (714) 299-9331
Figure 2.2 - An Identification Frame

2.9 Positioning Information

For all the routines discussed in the following sections, the raster is reflected about the X axis to place the origin (0, 0) in the lower left-hand corner and (1023, 1023) is in the upper right-hand corner. The subroutine does the transformation to the S-C 4020 system described in the section on basic programming. Any position in the frame can be addressed by specifying the number of raster counts from the left and from the bottom of the frame. Fractional distances cannot be addressed. The programmer raster orientation is shown in the figure below.

0,1023 1023,1023 0,0 1023,0

2.10 Scaling Information

The typical S-C 4020 application involves the display of some physical phenomenon scaled to the dimensions of the available plotting area. For the most part, the programmer can do his planning on the basis of the physical model. The system provides subprograms that will accept information given in terms of the model and perform the necessary scaling and conversion to relate the information to the raster area.

2.11 Symbol Conventions

In the subprogram descriptions, floating point variable names have been assigned in accordance with the FORTRAN convention. If integer variables are required, names beginning with I, J, K, L, M, or N are used. The actual floating point number (or integer) may be used in the argument lists in place of a floating point (or integer) variable name, if the argument represents input to the subprogram. Constants should never be substituted for argument names that represent output from the subprogram.

3. S-C 4020 CONTROL FUNCTIONS

3.1 Selecting the Camera: CAMRAV

At the outset of every job, both cameras are selected before drawing the ID frame. If no other camera selection is done all output will be on both cameras. A manual override is provided so that the S-C 4020 operator can change the camera selection at will.

Camera selection is implemented by the following statement:

      CALL CAMRAV (N) 
      
      N=9  The 9-inch camera will be called and the 35mm camera will 
         be dropped out of select. 
      N=35 The 35mm camera will be called and the 9-inch camera will 
         be dropped out of select. 
      N=Any other number. Both cameras will be selected. 

Note that selection of one camera causes the S-C 4020 display to be photographed only by the camera selected. That camera will be used until another CALL CAMRAV statement changes the selection. If the 9-inch camera is selected, and a CALL CAMRAV(35) is encountered, usage of the 9-inch camera will be discontinued and only the 35mm camera will be employed.

Therefore, CALL CAMRAV(935) is not equivalent to the two statements:

      CALL CAMRAV (9) 
      CALL CAMRAV (35) 

3.2 Advancing the Film: FRAMEV, RESETV

Following the generation of the ID frame, a reset command is given by the program. This leaves the S-C 4020 with blank film in both cameras, set in the Expose Heavy mode, and not in the Typewriter mode. During the programming, it is the responsibility of the programmer to advance the film whenever a new page is to be started. A subroutine is provided which can be called by the statement CALL FRAMEV (N). The argument N controls the display of the job ID, a frame count, and the short vectors which indicate the corners of the frame. The effect of the argument and different values is as follows:

 N             Effect
 3    Film advanced, no print out
 2    Film advanced, corners drawn, no ID
 1    Film advanced, ID printed, no corners
 0    Film advanced, corners drawn, ID printed
 

Another subroutine called by the statement CALL RESETV (N) also causes the film to be advanced. In addition, this command sets the exposure to heavy and assures that the S-C 4020 is not in the typewriter mode. The sense of the parameter is the same as for FRAMEV. When drawing graphs and using the subroutine GRID1V to be described later, the film advance is controlled by a parameter of GRID1V which in turn calls FRAMEV. No argument in FRAMEV or RESETV has the effect of a zero argument.

3.3 Frame Count Retrieval: NOFRV

NOFRV enables the programmer to obtain the current output frame counts. He can use this number as a cut-off point to prevent a wasteful loop. (Some programmers have used it, in conjunction with a timing routine, to determine how much computing time was needed to produce a frame, or for other accounting purposes within their programs.) The call statement is:

      CALL NOFRV (N9, N35) 

      N9  Name of location in which current count of 9-inch 
          camera frames will be stored. 
      N35 Name of location in which current count of 35mm 
          camera frames will be stored. 

Since both arguments represent output from the routine, they must be variables.

A special case of NOFRV is necessary to obtain the current frame count numbers printed (if different), instead of the current number of output frames on the S-C 4020. This occurs when the subprogram FRMNOV has been called. When a third argument is used in the calling sequence, the current camera frame counts appearing on the S-C 4020 output are returned in the first two arguments. The call statement is:

      CALL NOFRV (N9, N35, ANY) 

The format of the 3rd argument is immaterial.

3.4 Intensity Selection BRITEV, FAINTV, RESETV

GRID1V ensures that the bright intensity mode is on. Normally, this intensity mode should be left on, since experience has shown that it produces the best results. If the programmer wants to change this setting to the faint mode, he can use the following statement:

      CALL FAINTV

Then, to restore the bright intensity mode, he can use the statement:

      CALL BRITEV

RESETV is explained under FRAMEV and STOPTV.

3.5 Image Size Control: BIGV, SMALLV

The image size may be selected by the programmer to be 4.00 inches square or to be expanded, normally to 4.53 inches square. The program statement

      CALL BIGV 

expands the image; and the statement,

      CALL SMALLV 

reduces the image. The system initialization program sets the image size to small.

3.6 Bypassing the ID Frame and Special Treatment of Frame Count: FRMNOV

FRMNOV serves two purposes. They are both for special applications and should not be of concern to the programmer for normal usage.

The first use of FRMNOV is to bypass the ID frame and initialization routine as discussed already. This is done by calling FRMNOV before any other call is made that puts information on the S-C 4020 output tape. The frame normally following the ID frame will then have frame counts beginning with the arguments supplied in the CALL FRMNOV. This is normally 1 and 1 for each camera frame count. The call statement is:

      CALL FRMNOV (M9, M35) 
      
      M9,M35  Normally, these are both 1. 
              Or they may be whatever framecounts are desired 
              for the first (which is yet to be advanced) 
              S-C 4020 output frame. 

The second use of FRMNOV is to set either or both camera frame counts at any time in the program. If only one camera frame count is set, the other is unaffected. As in the above usage, the frame count setting made will appear on the following frame, not the frame currently exposed on the tube of the S-C 4020. The call statement is:

      CALL FRMNOV (M9)     Set 9-inch camera frame count 
      or 
      CALL FRMNOV (±M9, M35) Set only 35mm camera frame count 
                                  if M9 is negative. Set both camera 
                                  frame counts if M9 is positive. 

The frame count settings will apply to the next frame to be advanced.

3.7 Changing the Systems Routines Output Tape: TPNUMV

TPNUMV is used for special applications and should not be of concern to the programmer in normal usage.

The system as distributed will write output on tape A7 in the FORTRAN II version and on unit LB4 inthe IBJOB version.

The output tape can be changed at assembly time in either version. In the FORTRAN II version, the decrement of the location CRTAPE in deck OUTV must be set to the logical tape number of the desired output tape unit. In the IBJOB version, an output file must be redefined.

At object time, in FORTRAN II, the output tape can be changed with the FORTRAN statement:

      CALL TPNUMV (LOGNUM) 

which causes all successive transfers from core to tape to be written on the tape designated by the logical number LOGNUM. The capability of changing the output tape during object time of an IBJOB run is not currently available.

3.8 Emptying the Output Buffer: PLTND

The S-C 4020 output buffer will not be dumped on tape until it is full unless the programmer forces a dump for his own purposes. The current contents of the S-C 4020 output buffer can be dumped by the FORTRAN statement:

      CALL PLTND 

Programmers using an S-C 4020 not equipped with an F53 or other input buffer must remember to dump the buffers and cause a tape gap following each time a control routine is called. Since the buffers are not dumped until full, the last command of any program using the S-C 4020 programming system must be a CALL PLTND followed by a statement to write an END OF FILE on the output tape.

4. GRAPHS

4.1 Graphing Data: KWKPLT

The purpose of this routine is to provide the programmer with a quick look at the relationship between two variables. KWKPLT will automatically provide the programmer with a series of linearly connected points on a scaled linear grid with or without identification printing.

The calling sequence without identification printing is:

      CALL KWKPLT (X,Y,N) 

where 
  X = starting location of a forward stored array of floating 
      point numbers representing the X-coordinates. 
  Y = starting location of a forward stored array of floating 
      point numbers representing the Y-coordinates. 
  N = number of points to be plotted. 

It is not necessary to arrange the coordinates in an increasing or decreasing order of magnitude. If the table of X-coordinates are not in ascending order, KWKPLT will rearrange them in ascending order within the table. The Y-coordinates will be arranged accordingly.

The calling sequence with identification printing is:

      CALL KWKPLT (X,Y,N,18H(LH),18H(LV)) 

where 
   X, Y, and N are the same as given above. 
   (LH) = 18 character identification for the X-coordinates. 
   (LV) = 18 character identification for the Y-coordinates. 

The printing routine assumes a full 18 characters including blanks.

5. GRIDS

5.1 Generating a Grid: GRID1V

In many ways, plotting on the S-C 4020 is very much like plotting on a sheet of graph paper, but there are also distinct differences. For one thing, the programmer must create the grid; the film frame is completely blank to start with.

Although every line of the grid must be specified on the S-C 4020, there are advantages to this situation. A hand-plotted graph must be adapted to some preprinted form; more frequently than not, this means that some plotting area must be sacrificed in order to use the most convenient scale.

On the S-C 4020, the programmer can select a scale that will be easy to read and that will accommodate the entire range of data. The number of light grid lines, the number of emphasized grid lines, and the spacing between lines can be chosen to suit the plot. The programmer is not restricted to the use of a single form for a variety of plots. For each graph, a new grid can be tailored to the data.

The easiest way to create a grid for S-C 4020 plots is to call the GRID1V subprogram. At the outset, GRID1V makes certain that the Typewriter Mode is off, and that the Bright Intensity Mode is on.

GRID1V will produce a grid which has some lines emphasized and some lines labeled. Margin space (which may be used for titles) will be reserved at the top, left side, and bottom of the grid. Normally, the title margin spaces are 24 raster counts wide.

Upon completion of GRID1V, scale factors will have been established and made available (internally) for the conversion requirements of other subprograms; i.e., the conversion of floating point coordinates into raster coordinates.

The call statement for GRID1V appears below, with a description of the arguments.

      CALL GRID1V (L,XL,XR,YB,YT,DX,DY,±N,±M,±I,±J,±NX,±NY) 
L

This integer argument controls the film advance and frame identification display:

L=0
The film will be advanced, ID will be printed but the corner marks will be suppressed.
L=1
The film will be advanced. The job number and frame counts will be placed in the upper right corner of the frame.
L=2
The film will not be advanced and the identification information will not be displayed.
L=3
The film will be advanced but the identification information will be suppressed.
L=4
The film will be advanced and both the ID and the corner marks will be suppressed.
XL,XR
Floating point values of X for the left-most and right-most limits of the grid.
YB,YT
Floating point values for the bottom limit and the top limit of the grid.
After margin space for titles and labels has been reserved, the limits of the remaining space are assigned the data values given for XL, XR, YB, and YT. Scale factors are then computed; they will remain in effect until another GRID1V statement is made (or until other action is taken to compute new scale factors).
DX,DY
Floating point data increment at which vertical (specified by DX) and horizontal (specified by DY) grid lines will be displayed. If 0.0, no lines will be shown.
Positions are stepped off in DX increments in the positive and negative directions from X=0, and in DY increments in the positive and negative directions from Y=0.
N,M
Fixed point integers that cause every Nth vertical grid line and every Mth horizontal grid line to be retraced for emphasis. If N (or M) is zero, no vertical (or horizontal) lines will be emphasized.
To force the grid to be square, a negative sign should be used on N and/or M. (If either N or M is zero, the negative sign should go on both N and M.)
I,J
Fixed point integers which cause every Ith vertical line and every Jth horizontal line to be labeled. If I (or J) is zero, no vertical (or horizontal) lines will be labeled.
If I and J are positive, the line labels will lie along the X=0 and Y=0 lines, provided these lines are within the grid limits. If X=0 (or Y=0) does not fall within the grid limits, labels will be placed in a space reserved at the left (or at the bottom) of the grid.
Negative signs can be used on I and/or J to force labels outside the grid. Label space is reserved at the left if I is negative, or at the bottom if J is negative, and labels will be placed in these reserved spaces. Note that label margin space is in addition to the margin reserved for titles.
NX,NY
Fixed point integers indicating the number of characters to be displayed in the labels of vertical and horizontal lines.
+NX,+NY
The labels will be in a decimal format similar to the F-type format. In specifying +NX and +NY, a decimal point must be counted as one of the NX or NY characters, but the sign is not counted. The largest number of digits permitted is 6 (or 7 if one character is a decimal point).
-NX,-NY
The labels will be in scientific notation. (Example: 1.25x10+02. ) NX indicates the number of significant figures in the labels of vertical grid lines, and NY indicates the same for the labels of horizontal lines. The sign, decimal point, and exponent will be displayed in addition to NX (or NY) characters. NX (or NY) must not be greater than 6.
Examples of GRID1V Usage

Figures 5-1 through 5-9 are examples of the effect of the various parameters in the GRID1V call statement. These examples are reproduced from S-C 4020 output. The call statement to produce each graph is printed by the S-C 4020 on the frame with the grid.

Figure 5-1 is a simple grid with the x=0, y=0 lines crossing in the middle of the grid. The numeric labels have been placed along the x=0, y=0 lines. For simplicity in the illustration, constants were used in the parameter list. In actual usage, variable names may be substituted for any parameter.

0000-00- 002 002 -30 -20 -10 0 10 20 30 800 600 400 200 0 -200 -400 -600 CALL GRID1V(1,-30.0, 30.0,-600.0,800.0, 1.0, 25.0, 5, 4, 10, 8, 2, 3)
Figure 5-1

Figure 5-2 is similar to Figure 5-1 except that the XL, XR and YB, YT have been reversed to show that the scaling routines have no difficulty handling data which decreases from left to right and bottom to top.

0000-00- 004 004 30 20 10 0 -10 -20 -30 -600 -400 -200 0 200 400 600 800 CALL GRID1V(1, 30.0,-30.0, 600.0,-600.0, 1.0, 25.0, 5, 4, 10, 8, 2, 3)
Figure 5-2

Figure 5-3 illustrates the effect of negative values for I, J in the parameter list. Note that the numeric labels are outside the grid and that the margins have been increased to accommodate the labels.

0000-00- 006 006 -400.0 -200.0 0 200.0 400.0 -400 -200 0 200 400 CALL GRID1V(1, -400.0, 400.0, -400.0, 400.0, 25.0, 25.0, 4, 4, -8, -8, 5, 8)
Figure 5-3

Figures 5-4 and 5-5 show the same grid with labels in integer notation and scientific notation.

0000-90- 008 008 0 1000 2000 3000 4000 5000 6000 7000 0 1000 2000 3000 4000 5000 6000 7000 CALL GRID1V(1, 0.0, 7000.0, 0.0, 70000.0, 100.0, 1000.0, 5, 5, 10, 10, 4, 5)
Figure 5-4
0000-90- 008 008 CALL LABLV(579.5, 623, 1023, 5, 1, 3 ) RESULTS IN 579.5 CALL LABLV(579.5, 623, 992, -4, 1, 3 ) RESULTS IN 5.795 x 10+02 0 1.0x10+03 2.0x10+03 3.0x10+03 4.0x10+03 5.0x10+03 6.0x10+03 7.0x10+03 0 1.0x10+04 2.0x10+04 3.0x10+04 4.0x10+04 5.0x10+04 6.0x10+04 7.0x10+04 CALL GRID1V(1, 0.0, 7000.0, 0.0, 70000.0, 100.0, 1000.0, 5, 5, 10, 10, -2, -2)
Figure 5-5

Figure 5-6 has been double exposed to show the effect of negative arguments at N or M. The outer frame was produced by the first call statement with the positive argument for N and M. The grid utilizes the maximum available space in both directions and is taller than it is wide. The second call statement with negative N and M forced the frame to be shorter in the Y direction in order to be square. It is important to have a square grid when representing geometric figures such as a circle or a square. Note that the first parameter of the second call statement is a 2 which inhibits the frame advance.

0000-90- 012 012 100 100.00 100.00 CALL GRID1V(1, 50.0, 100.0, 50.0, 100.0, 50.0, 50.0, 1, 1, 2, 2, 3, 6) CALL GRID1V(1, 50.0, 100.0, 50.0, 100.0, 50.0, 50.0, -1, -1, 2, 2, 3, 6)
Figure 5-6

Figure 5-7 illustrates the use of the routine DXDYV to compute some of the values for the GRID1V parameter statement. DXDYV is explained in Section 5.2.

Figure 5-7

Figures 5-8 and 5-9 show the influence upon the grid of the density factor used by DXDYV. For the case of Figure 5-8, a density factor of 8.0 was specified as the 8th argument of DXDYV. A larger factor, 20.0, caused DXDYV to derive values of DX and DY such that the grid in Figure 5-9 is less dense.

0000-90- 010 010 0 -40 -80 -120 -160 -200 -240 -280 -320 -360 -400 -440 -480 20 30 40 50 60 70 80 90 CALL DXDYV(1, 0.0, -505.0, DX, N, I, MX, 8.0, IERR ) CALL DXDYV(2, 93.5, 14.0, DY, M, J, MY, 8.0, IERR ) CALL GRID1V(1, 0.0, -505.0, 93.5, 14.0, DX, DY, N, M, I, J, MX, MY )
Figure 5-8
0000-90- 010 010 0 -100 -200 -300 -400 -500 20 40 60 80 CALL DXDYV(1, 0.0, -505.0, DX, N, I, MX, 20.0, IERR ) CALL DXDYV(2, 93.5, 14.0, DY, M, J, MY, 20.0, IERR ) CALL GRID1V(2, 0.0, -505.0, 93.5, 14.0, DX, DY, N, M, I, J, MX, MY )
Figure 5-9

5.2 Computation of GRID1V Arguments: DXDYV

It frequently happens that the programmer does not have sufficient advance information about the range of data his program will encounter to be able to assign practical values to all arguments of GRID1V. In this case, a series of FORTRAN statements can be used to determine the upper and lower X and Y bounds. For example, the values of XL and XR for a block of data, X, can be computed as follows:

      XL=X(1)
      XR=(X(1)
      DO 10 J=2,NPTS    where NPTS is the number of points inm the X-block of data
      XL=MIN1F(XL, X(J))
   10 XR=MAX1F(XR, X(J))

A similar group of statements can be used to compute YB and YT for the Y block of data.

Once XL and XR (or YB and YT) are known, the routine DXDYV is available to compute arguments for line spacing, line emphasizing, and line labeling. Two call statements are available, one for the X direction and one for the Y direction. They are:

      CALL DXDYV(1, XL, XR, DX, N, I, NX, DC, IERR) 
      CALL DXDYV(2, YB, YT, DY, M, J, NY, DC, IERR) 

On each entry to DXDYV, four arguments are furnished by the programmer:

The remainder of the arguments are variables to which DXDYV will assign values. Any value previously assigned these variables will be destroyed during execution of the subroutine. NEVER USE CONSTANTS FOR THESE ARGUMENTS.

IERR is an error indicator. It is set to zero if a reasonable grid can be drawn, and to one if the parameters given would result in an impossible grid. After execution of DXDYV, IERR should always be tested before proceeding to draw the graph.

In using DXDYV, it should be noted that no provision has been made for generating labels in scientific notation. If this is desired, it is necessary to assure that there is sufficient space for the longer labels and also to change the sign of NX and NY to be negative.

5.3 GRID1V Controls

Certain features of the basic linear GRID1V can be altered by subprograms that control its internal operation. The subprograms can be classified as set and retrieve routines since they permit information to be set by the programmer and retrieved during execution of GRID1V.

The routines that furnish values different from those normally employed by GRID1V are:

SETMIV
which allows the programmer to make nonstandard margin assignments. The companion routine called by GRID1V to retrieve margin values is SETMOV.
SETCIV
which makes it possible to provide extra space for grid line labels. The companion routine is SETCOV.

Routines that furnish indicators recognized by GRID1V as signals to execute alternate branches are:

HOLDIV
which assists in holding margins from graph to graph. HOLDOV is called to retrieve the indicators.
SMXYV
which enables the programmer to select a non-linear mode of operation. The companion routine is MSXYV.

These two routines are described under Log and Semilog Plotting.

Grid Margin Variation: SETMIV, SETMOV

As discussed in an earlier section, GRID1V normally reserves a strip, 24 raster counts in width, at the top, left, and bottom of the grid, for the display of titles. For the many applications which require special margin widths, the subprogram SETMIV can be called to change the basic specifications.

One obvious application of SETMIV is to provide margin space for multiple lines of printed titles and headings. In addition, and perhaps even more important, SETMIV makes it possible to display more than one graph on a frame, or to display a graph with its accompanying text.

The standard GRID1V margin specifications can be altered by the statement:

      CALL SETMIV (MTL, MTR, MTB, MTT) 

Each argument is an integer which specifies, in raster counts, the width of one area to be reserved for a margin.

MTL   Width of area for left margin. 
MTR   Width of area for right margin.
MTB   Width of area for bottom margin.
MTT   Width of area for top margin. 

GRID1V does not necessarily use these exact values for the upper and lower limits of X and Y. It guarantees that the reserved space will not be overlapped, assigning additional space if required for label margins. After the total margin space has been reserved, the remaining area will be used for the grid.

If SETMIV is never called, GRID1V will use the values 24, 0, 24, 24 as MTL, MTR, MTB, and MTT, respectively. To return to a standard grid after the margins have been altered, restore the standard margin values by

      CALL SETMIV (24, 0, 24, 24) 

The current values of MTL, MTR, MTB, and MTT can be retrieved by using the statement

      CALL SETMOV (MTLL, MTRL, MTBL, MTTL) 

where the arguments are variables (never constants) to which SETMOV is to assign the current margin values. SETMOV was designed for use by GRID1V to retrieve current margin values; the programmer will rarely have reason to call it.

Examples. Figure 5-10 shows three grids with the SETMIV and GRID1V call statements used to produce them. The grid at the bottom was the first one displayed; a 1 was used as the first argument of the first GRID1V statement executed, in order to change the film frame. The other two GRID1V statements include a 2 as the first argument, to inhibit the film advance.

Note particularly the variation in the raster locations assigned by GRID1V to XL in each of the grids. This effect is caused primarily by the differences in the specification of NY (the last argument) , which gives the number of characters to be displayed in the labels of horizontal lines. In each case, NY has been assigned a value just large enough to satisfy the needs of the grid. For the bottom grid, NY=1; for the middle grid, NY=3; and for the top grid, NY=5. Since margin space was reserved for labels of different lengths, the positions of the left limits, and of the corresponding values of X, vary noticeably. Such a nonalignment is often of no importance, but if it does matter, the programmer may have to make special provisions to force alignment.

0 10 20 30 40 50 1 2 3 4 0 10 20 30 40 50 100 200 300 400 0 10 20 30 40 50 10000 20000 30000 40000 CALL SETHIV(24, 0, 24, 715) CALL GRID1V(1, 0.0, 50.0, 1.0, 4.0, 1.0, 0.2, 5, 5, 10, 5, 2, 1) CALL SETHIV(24, 0, 368, 371) CALL GRID1V(2, 0.0, 50.0, 100.0, 400.0, 1.0, 20.0, 5, 5, 10, 5, 2, 3) CALL SETHIV(24, 0, 712, 28) CALL GRID1V(2, 0.0, 50.0, 10000.0, 40000.0, 1.0, 2000.0, 5, 5, 10, 5, 2, 5)
Figure 5.10

5.4 Providing for Special Label Characters: SETCIV, SETCOV

GRID1V computes the starting location of each label, taking into consideration the size of the characters used. If the labels are to be placed outside the grid, GRID1V assigns space for them, again taking the character size into consideration. Normally, labeling is done in CHARACTRON characters (via LABLV). If the programmer substitutes a non-system labeling routine for LABLV, it may be necessary to furnish adjusted character dimensions to GRID1V.

To state the dimensions of nonstandard label characters, use

      CALL SETCIV(IW, IH)
IW
An integer which specifies, in raster counts, the allowance needed for the width of each label character.
IH
An integer which specifies, in raster counts, the allowance for the height of a label character.

If SETCIV is never called, the indicator table contains IW=8 and IH=10. Obviously, if it is called, the arguments must be compatible with the size of the characters employed by the LABLV subprogram used.

GRID1V retrieves the values of the indicators by using:

      CALL SETCOV (IWL, IHL) 

The width will be retrieved from the table and stored in the fixed point variable location IWL, and the height will be similarly stored in IHL. (The arguments must not be constants.) Note that GRID1V uses this information to control the space that will be reserved for labels; it does not control the size of the label characters themselves in any way.

5.5 Holding Margins from Graph to Graph: HOLDIV, HOLDOV

For a large graph, it may be necessary for the programmer to display segments of the graph in separate frames, and join the segments tile fashion to form the complete plot. If the graphs are to have the same scale, certain equalities should exist.

  1. The range of X in each segment should be equal, and the range of Y should be equal. In other words, the quantity (XR-XL) should be the same in each segment, and, similarly, the quantity (YT-YB).
  2. The dimensions of the scaled area should be the same from segment to segment; that is, the dimensions of the space between margins should be equal.

The programmer can easily provide for equality in the ranges of X and Y, but he cannot so readily ensure equality in the scaled areas. Since GRID1V computes label margins (and, therefore, total margins) to suit the needs of each graph, the dimensions of the scaled area may vary.

One method that will usually give equality of scaled areas is to specify the option that forces labels to be placed outside the grid, and to always request the same number of label characters (NX, NY) for each segment. If this is not practical, a holding feature is provided.

GRID1V can be instructed to hold the label margin spaces used for the preceding grid and use them in computing total margins for the next grid. The statement to be used is

CALL HOLDIV (NH) 

If NH≠0, the label margins from the preceding grid will be used again. If NH=0 (as is the case if HOLDIV is never called), label margins will be computed in the normal manner.

The status of this indicator is tested in GRID1V by using

      CALL HOLDOV (NHL) 

Figure 5-11 is similar to Figure 5-10 except that NY=5 on all three grids, permitting the left limits to be in line. If XL, NX, and NY are equal from grid to grid, the desired alignment will usually be achieved.

Figure 5-12 shows four graphs on a single frame. The SETMIV statements used to produce the margins for each grid are shown. The programmer must remember to set the first argument of the GRID1V statement to 2 so as not to advance the film.

Figure 5-13, Figure 5-14, Figure 5-15 show additional examples of special effects which can be obtained with GRID1V when the routine HOLDIV is used to retain grid margins from one grid to another. The labeling is self explanatory.

0 10 20 30 40 50 1 2 3 4 0 10 20 30 40 50 100 200 300 400 0 10 20 30 40 50 10000 20000 30000 40000 CALL SETHIV(24, 0, 24, 712) CALL GRID1V(1, 0.0, 50.0, 1.0, 4.0, 1.0, 0.2, 5, 5, 10, 5, 2, 5) CALL SETHIV(24, 0, 368, 371) CALL GRID1V(2, 0.0, 50.0, 100.0, 400.0, 1.0, 20.0, 5, 5, 10, 5, 2, 5) CALL SETHIV(24, 0, 712, 28) CALL GRID1V(2, 0.0, 50.0, 10000.0, 40000.0, 1.0, 2000.0, 5, 5, 10, 5, 2, 5)
Figure 5.11
CALL SETHIV(24, 534, 536, 24) 0 2 4 6 0 2 4 6 CALL SETHIV(536, 22, 536, 24) 0 2 4 6 .0 .2 .4 .6 CALL SETHIV(24, 534, 24, 536) 6 8 10 12 0 2 4 6 CALL SETHIV(536, 22, 24, 536) 0 2 4 6 .0 .2 .4 .6
Figure 5.12
SPECIAL GRID1V EXAMPLES HOLDIV AS AN AID IN MAINTAINING THE SAME SCALE FROM ONE GRID TO ANOTHER 0. 1. 2. 3. 4. 5. 6. 7 8. -10 0 10 20 30 40 50 60 70 CALL GRID1V(1,-10.0,70.0,0.0,7.0,1.0,0.1,5,5,10,10,2,2) CALL HOLDIV(1) THE HOLD STATEMENT WILL CAUSE LABEL MARKINGS TO BE HELD FOR SUBSEQUENT GRIDS UNTIL CALL HOLDIV(0) RELEASES THE HOLD
Figure 5.13
0. 1. 2. 3. 4. 5. 6. 7 70 80 90 100 110 120 130 140 150 CALL GRID1V(1,70.0,150.0,0.0,7.0,1.0,0.1,5,5,10,10,3,2) NOTE: NOT ONLY HAS HOLD1V BEEN USED BUT ALSO XL,XR,YB,YT HAVE BEEN SPECIFIED SUCH THAT XR-XL, AND YT-YB OF ONE GRID EQUAL THEIR COUNTERPART IN THE OTHER GRID
Figure 5.14
0 2 4 6 8 0 20 40 60 80 0 2 4 6 8 100 120 140 160 180
Figure 5.15

5.6 Operation Details of GRID1V

GRID1V is, in many respects, an executive routine. It examines the information furnished by the argument list and by certain external subprograms, makes decisions based on this information, and then calls other subprograms to advance the film, compute scale factors, generate the grid, etc.

Initially, GRID1V uses STOPTV to ensure that the typewriter mode is off, BRITEV to ensure that the bright intensity mode is on, and FRAMEV to advance the film and affix the job number and frame count (unless an option is used that inhibits this).

GRID1V then checks certain internal locations to obtain basic information, by calling the following subprograms:

SETMOV
Retrieves margin assignments. The programmer may have changed the standard specifications by a CALL SETMIV.
SETCOV
Retrieves character size specifications that programmer may have changed by a CALL SETCIV.
MSXYV
Determines linear or nonlinear mode. Indicators may have been set to nonlinear by a CALL SMXYV.
HOLDIV
Determines whether margin specifications were held over from preceding graph. Indicator may have been specified by a CALL HOLDIV.

Computations are made to determine the raster positions to be used as grid boundaries. ERRLNV and/or ERRNLV are called to check the boundaries and the data limits to see if a grid can be produced from this information. Finally, XSCALV and YSCALV are called to compute scale factors, and LINRV (in the linear mode) and/or NONLNV (in the logarithmic mode) are called to generate the grid.

5.7 Determining Grid Boundary Positions

GRID1V sets aside the margin space specified by a prior call to SETMIV (or the standard margin space if SETMIV has not been called). With the exception of the small area in the upper right corner used for frame identification, GRID1V does no writing in these basic margins.

Then GRID1V tests to see if labels are to be placed (or may extend) outside the grid area. Space required for such labels is computed, taking into consideration the type of label (fixed point or scientific), the number of label characters specified in GRID1V arguments plus space for a sign, and the height and width of the label characters.

If any space is needed for labels at the left, right, bottom, or top of the grid, it is added to the basic margins specified by SETMIV table, to produce the total margins. (HOLDIV can alter this procedure by causing label spaces held from a previous grid to be added when computing the total margins).

If the option for a square grid is specified, the right, or top, total margin will be adjusted so the remaining area will be square.

If the total margins and the grid limits (XL, XR, YB, and YT) meet certain error tests, they are used as arguments of XSCALV and YSCALV in computing the scale factors required for generating the grid and plotting on it.

Since so many items influence the margin assignments, the grid boundaries will rarely fall at the exact raster positions that the programmer might have estimated. If the precise raster positions of the boundaries are required in a program, they should be derived by converting the limits into raster counts after GRID1V has been called. For example:

      IXL = NXV (XL) 
      IXR = NXV (XR)       (The right total margin is 1023-IXR)
      IYB = NYV (YB) 
      IYT = NYV (YT)       (The top total margin is 1023-IYT)

5.8 GRID1V Error Procedure: ERMRKV

Even if bad input data is used, GRID1V will attempt to produce a grid. The philosophy is that some useful information may be revealed, even if the grid is inaccurate.

The grid limits and total margins are tested by lower-level subprograms, ERRLNV (for linear mode) and/or ERRNLV (for log mode). If these tests show that a grid cannot be produced from the given information, some data values are manufactured so that the program can continue. The manufactured quantities are used only internally; data values in the main program will not be affected. (Since ERRLNV and ERRNLV are meant to be used only by GRID1V, the call statements are not given.)

When artificial quantities are used, an error mark (//////) is placed in the upper right corner of the frame by ERMRKV. Although ERMRKV was designed for use by GRID1V, the programmer can place this mark on the frame if he uses the statement

      CALL ERMRKV

An error mark from GRID1V may indicate that one or more of the following errors has been found.

  1. Equal values have been specified for grid limits; that is, XL=XR and/or YB=YT. See Figure 5-16.
  2. The specified margins are too wide. In other words, MR+ ML-1023, and/or MB+MT-1023. See Figure 5-17.
  3. In a linear grid, the specified values of DX and/or DY would result in grid lines spaced closer than 3 raster counts.
  4. In a log grid the value of one or more of the limits is either zero or negative.
  5. In the log mode, there are more than 10 cycles in either the X or Y direction.
SPECIAL GRID1V EXAMPLE GRID1V ERROR HANDLING 0. 1. 2. 3. 4. 5. 6. 7 8 10 11 12 13 14 15 16 17 18 19 20 CALL GRID1V(1,10.0,10.0,0.0,8.0,0.1,0.1,5,5,10,10,2,2)
Figure 5.16
SPECIAL GRID1V EXAMPLE GRID1V ERROR HANDLING 10 0 CALL SETH1V(600,400,40,40) CALL GRID1V(1,0.0,18.0,0.0,18.0,1.0,1.0,5,5,10,10,2,2)
Figure 5.17
Examples of GRID1V Chacteristics

Certain special characteristics of the grid generated by GRID1V are shown in the following examples.

Example 1. During construction of a linear grid, vertical lines are displayed at intervals stepped off from X=0 in DX increments until the maximum limit of the grid is exceeded. Then they are stepped off from X=0 in the negative direction until the minimum limit of the grid is passed. Similarly, horizontal lines are stepped off from Y = 0 in DY increments. Because of this method of construction, lines will be generated at the grid limits only if XL and XR are integer multiples of DX, and if YB and YT are integer multiples of DY. Figure 5-18 and Figure 5-19 illustrate the effect of changing DX and DY. Figure 5-20 and Figure 5-21 illustrate a similar effect in the negative range of values.

Example 2. Vertical lines to be emphasized are stepped off from X=0 by increments of N.DX, and vertical lines to be labeled are stepped off by increments of I.DX. Similarly, horizontal lines to be emphasized are stepped off from Y=0 by increments of M.DY, and those to be labeled by increments of J.DY. This procedure means that labels and/or emphasized lines will not necessarily occur at the grid limits. Lines at XL and XR will be emphasized only if XL and XR are integer multiples of N.DX, and labeled only if XL and XR are integer multiples of I.DX.

In the same way, lines at YB and YT are integer multiples of M.DY, and labeled only if they are integer multiples of J.DY.

This method of determining the positions of line labels is responsible for the absence of labels on the limit lines in Figure 5-19 and Figure 5-21. Notice in the example that the labels for vertical grid lines are adequate; there is no real need to provide labels on the lines at XL and XR. However, the labels for the horizontal lines in this illustration are not adequate; they demonstrate another factor to be considered in planning for line labels. To be meaningful, labels should appear on at least two lines. In the example, the use of J=5, instead of J=10, would cause labeling of the lines of Y=25.0, 30.0, and 35.0, giving a scale that can be read easily.

SPECIAL GRID1V EXAMPLE EFFECTS OF STEPPING OFF DELTA INCREMENTS FROM ZERO 30 20 10 10 15 20 25 30 CALL GRID1V(2,7.5,32.5,8.0,31.0,1.0,2.5,5,2,5,4,2,2)
Figure 5.18
20 30 40 CALL GRID1V(2,25.0,45.0,25.0,35.0,1.0,1.0,5,5,10,10,2,2)
Figure 5.19
SPECIAL GRID1V EXAMPLE THE NEGATIVE RANGE OF VALUES IS HANDLED IN A SIMILAR WAY -30 -20 -10 -10 -15 -20 -25 -30 CALL GRID1V(1,-7.5,-32.5,-8.0,-31.0,1.0,2.5,5,2,5,4,2,2)
Figure 5.20
-20 -30 -40 CALL GRID1V(1,-25.0,-45.0,-25.0,-35.0,1.0,1.0,5,5,10,10,2,2)
Figure 5.21

Example 3. Under certain conditions, GRID1V purposely omits labels. Figure 5-22 shows how this can happen. The limits. of X used for the grid were -99.9999 and 99.9999, and the limits of Y were 0.0 and 9.9999. During scaling, these limits were rounded, causing them to be treated as -100.0, 100.0 and 0.0, 10.0.

This process caused the decimal scales of the grid limits to be larger than the initial limits, i.e., the values of NX and NY specified by the programmer were not compatible with the new limits. To avoid erroneous labeling, label values will not be displayed if the rounding process causes the decimal scale to be larger than the initial value.

SPECIAL GRID1V EXAMPLE SPECIAL CASES AFFECTING GRID LABELS 8 6 4 2 0 -80 -60 -40 -20 0 20 40 60 80 CALL GRID1V(1,-99.9999,99.9999,0.0,9.9999,4.0,1.0,5,2,5,2,2,1)
Figure 5.22

The system does not adequately provide for all problems of this type. Such complications can be avoided if the programmer considers the rounded values of XL and XR, and YB and YT, and when specifying NX and NY.

Example 4. When X=0 (and/or Y=0) lies within the grid limits, and I (and/or J) is positive, GRID1V places labels along the X=0 (or Y=0) line. If there isn't enough space for the label between X=0 and the left limit of the grid (or between Y=0 and the bottom of the grid), GRID1V will provide space outside the grid area for labels, just as if negative values of I (and/or J) had been specified. An illustration is shown in Figure 5-23.

SPECIAL GRID1V EXAMPLE SPECIAL CASES AFFECTING GRID LABELS 80 40 0 0 20 40 60 80 100 CALL GRID1V(2,-0.7,100.0,-3.0,100.0,2.0,10.0,5,2,10,4,3,3)
Figure 5.23

Example 5. The number of label characters, NX (or NY), specified for fixed point labels should satisfy the largest and smallest label values to be displayed. Normally, the quantity should be the sum of: (1) the decimal scale of the largest value of X (or Y), (2) the number of fractional positions required in the smallest value, and (3) one more position to provide for the decimal point, if required. The total quantity may not exceed 6 (or 7 if the decimal point is included).

Figure 5-24 illustrates how trouble can occur when NX and/or NY are not specified properly. Note that the values of NX=1 and NY=1 are adequate for the largest values of X and Y, but do not allow for the fractional values required in some of the labels. In this example, 3 should have been used for the values of NX and NY, in the top graph.

SPECIAL GRID1V EXAMPLE FURTHER GRID LABEL CONSIDERATIONS CALL GRID1V(2,0.0,5.0,0.0,2.0,0.1,0.1,5,5,5,5,1,1) 0 0 1 1 2 2 3 3 4 4 5 0 0 1 1 2 CALL GRID1V(1,1000.0,10000.0,1200.0,10000.0,200.0,400.0,5,5,5,5,3,3) 10 20 30 40 50 60 70 80 90 100 20 40 60 80 100 CALL GRID1V(2,900.0,1300.0,0.0,2000.0,5.0,100.0,5,5,10,5,2,1) 0 1 2 2 9 9 10 10 11 11 12 12 13
Figure 5.24

For some applications, it may be advantageous to specify values of NX and/or NY less than the decimal scale of the largest label value. In the middle grid of Figure 5-24, the two low-order positions in the labels have been dropped intentionally, by using values of NX and NY that are less than the decimal scales of the largest values of X and Y. In this case, the resulting graph has been effectively rescaled.

This procedure must be used with care. In the bottom grid, Figure 5-24, the values of NX and NY are so small that the increment between labeled lines is not reflected in the labels that are displayed.

5.9 Log and Semi-Log Grids: SMXYV, MSXYV

The earlier examples used only linear scaling and conversion. The modal subroutine SMXYV can be used to alter the scaling mode such that scaling and conversions will be made in the logarithmic mode.

The call statement for establishing the logarithmic mode is:

      CALL SMXYV (MX, MY) 

where MX and MY are scale mode indicators that designate whether the logarithmic or linear mode is to be used. If:

 MX≠0, MY≠0  Log in X, log in Y 
 MX≠0, MY=0  Log in X, linear in Y 
 MX=0, MY≠0  Linear in X, log in Y
 MX=0, MY=0  Linear in both X and Y 
                  (to restore linear mode) 

At the beginning of each job, MX and MY are zero, so that linear scaling and conversion result if SMXYV is never called.

If the programmer wants to generate a log or semi-log plot, he must call SMXYV to set the logarithmic mode before using any S-C 4020 subroutines that involve scaling or conversion.

Once the log-log or semi-log mode has been set by SMXYV and the scale factors have been established, the function statements NXV and NYV can be used to convert data coordinates into raster coordinates, in the same manner as shown for linear scaling.

For chain jobs, note that the values of MX and MY do not carry over from link to link. If a scale mode other than linear-linear is desired, it will be necessary to restate the SMXYV statement in each chain link.

FAP subprograms use two other references in connection with these indicators, causing the names (XXXX) and (YYYY) to appear on the load map.

The contents of the scale mode indicators may be retrieved by using the following statement:

      CALL MSXYV (MXL, MYL) 

The indicator for the X scale mode will be stored in MXL, and for the Y scale mode in MYL.

GRID1V, IXV, IYV, NXV, NYV, XSCALV, and YSCALV all use this statement to determine what scale mode has been selected by the programmer.

5.10 Restrictions on Logarithmic Mode

In general, once SMXYV has been called, the programmer can use any of the routines to generate a logarithmic display. (One exception: DXDYV should not be used to generate arguments for GRID1V in the direction in which logarithmic scaling is being used. )

However, some of the GRID1V arguments are restricted in the logarithmic mode. Following is a list of the 13 arguments, with notations as to the arguments affected if the mode is logarithmic in the direction affected by each.

      CALL GRID1V (L, XL, XR, YB, YT, DX, DY, ±N, ±M, ±I, ±J, ±NX, ±NY) 
L
Controls film advance.
XL, XR
Left and right limits of the grid. May not be negative or zero.
YB, YT
Bottom and top limits of the grid. May not be negative or zero.
DX, DY
Should be set to 1.0. If less, only the cycle lines will be displayed. If greater, no lines will be drawn.
N, M
Will be ignored; however, an argument must be present. A negative sign on Nor M will force the grid to the square.
I, J
Will be ignored; however, an argument must be present.
NX, NY
Number of characters to be displayed in the labels.

Generally, line labels will be placed only at the cycle lines. If, however, the grid spans less than one complete cycle, each grid line will be labeled.

No more than 10 log cycles are permitted in the GRID1V system.

Examples. Figure 5-25 illustrates a plot that is logarithmic in both the X and Y directions. Note the arguments for SMXYV and GRID1V in the coding.

Figure 5-26 illustrates a semi-log grid, with plotting of data siimilar to that used in Figure 5-25.

CALL SMXYV(1,1) CALL GRID1V(1,1.0,10.0,1.0,1000.0,1.0,1,0,1,1,1,1,2,4) POINTS PLOTTED BY CALLING POINTV(X,Y,1) IN A LOOP 1000 100 10 0 0 10
Figure 5.25
10000 1000 100 10 1 20 18 16 14 12 10 8 6 4 2 CALL SMXYV(0,1) CALL DXDYV(1,1.0,20.0,DX,N,I,NX,12.0,IERR) CALL GRID1V(1,1.0,10.0,1.0,1000.0,1.0,1,0,1,1,1,1,2,4)
Figure 5.26

5.11 Building Special Grids: LINRV, NONLNV

Two of the lower-level modules employed by GRID1V are useful as building blocks for building special grids. LINRV may be used to generate only the vertical portion or only the horizontal portion of a linear grid. NONLNV can generate only the vertical or only the horizontal portion of a log grid. See examples in Figure 5-27 and Figure 5-28.

EXAMPLES OF USE OF LINRV CALL FRAMEV CALL XSCALV(45.0,95.0,50,544) CALL LINRV(1,515,535,908,45.0,95.0,2.5,2,4,2,8) 50 60 70 80 90 CALL YSCALV(15.0,85.0,20,575) CALL LINRV(2,520,550,1023,15.0,65.0,2.5,2,4,2,12) 60 50 40 30 20
Figure 5.27
EXAMPLES OF USE OF LINRV CALL FRAMEV CALL SMXYV(1,0) CALL XSCALV(10.0,100.0,50,544) CALL LINRV(1,515,535,908,10.0,100.0,1.0,1,1,5,8) 10 100 CALL SMXYVV(0,1) CALL YSCALV(1.0,10.0,20,575) CALL LINRV(2,520,550,1023,1.0,10.0,1.0,1,1,2,9) 10 1
Figure 5.28

In addition to generating the vertical and horizontal portions of a grid in separate operations, these modules offer other special capabilities:

  1. The programmer can control the length of the grid lines. For example, the grid lines can be as short as time tics.
  2. The programmer can exert greater control over the position of line labels by specifying a label reference location.
  3. Selected grid lines can be emphasized and/or labeled in the same way as with GRID1V.
  4. DXDYV can be used with LINRV in much the same way it is used with GRID1V.

Certain subprograms must be executed prior to the use of LINRV or NONLNV. The frame must have been advanced, and XSCALV and/or YSCALV must have established scale factors. If a change in scale mode is required, SMXYV must have been called.

The call statement for using LINRV to generate a vertical grid is

      CALL LINRV (1, LYREFR, IYMIN, IYMAX, XL, XR, DX, ±N, ±I, ±NX, IW) 

For a horizontal grid, the statement is

      CALL LINRV (2, LXREFR, JXMIN, JXMAX, YB, YT, DY, ±M, ±J, ±NY, IH) 
LYREFR LXREFR
Label reference locations.
For a vertical grid, LYREFR is the Y raster coordinate that will be used to position the labels of the vertical grid lines. The X raster coordinate will vary, and will be computed by the subprogram.
For a horizontal grid, LXREFR is the X raster coordinate that will be used to position the labels of the horizontal grid lines. The Y raster coordinates will vary, and will be computed by the subprogram.
The character dimensions, IW and IH (below), should be considered in assigning LYREFR and LXREFR. For example, LYREFR should be chosen to allow at least one character height (IH) below the origin of vertical grid lines (IYMIN). LXREFR should be a raster position that is at least IW*(NY+1) raster counts to the left of the origin of the horizontal grid lines (JXMIN). In both instances, some additional space should be added to prevent overlapping.
If scientific labels are selected (-NX and/or -NY), provision must be made for 7 additional label characters in the computation of LXREFR. About 5 raster counts extra must be added to LYREFR to allow for the raised exponent.
NOTE: IW*(NY+1) allows space for a sign μ.
IYMIN, IYMAX
Raster positions that determine the origin and end of IXMIN, IXMAX each line. For a vertical grid, these integers are raster counts in the Y direction. For a horizontal grid, these integers are raster counts in the X direction.
IW, IH
The dimension to be allowed for each label character: IW for the width, and IH for the height. Since LINRV uses LABLV to display the labels, and since the system LABL V uses Charactron characters, the dimensions should be IW=8 and IH=10. (If the standard values have not been altered, these values can be obtained by calling SETCOV).

The remainder of the arguments have the same definitions given for these terms in the discussion of GRID1V.

The vertical portion of a log grid can be generated by the statement

      CALL NONLNV (1, LYREFR, IYMIN, IYMAX, XL, XR, DX, ±N, ±I, ±NX, IW) 

For a horizontal log grid, the statement is

      CALL NONLNV (2, LXREFR, IXMIN, IXMAX, YB, YT, DY, ±M, ±J, ±NY, IH) 

The arguments XL, XR, DX, N, I, NX, and YB, YT, DY, M, J, NY have the same definitions (and restrictions) given for these terms in the discussion of GRID1V for the log mode. The remaining arguments have the definitions given for LINRV.

Figure 5-27 and Figure 5-28 show examples of portions of grids created by LINRV and NONLNV, respectively.

5.12 Axis Lines: XAXISV, YAXISV

Axis lines XAXISV, Y AX.ISV enable the programmer to use the axis line feature of the S-C 4020 to generate horizontal or vertical lines. Horizontal axis lines started at a specified raster position will be swept to the right to the specified X stop point in raster count. Vertical axis lines started at a specified raster position will be swept upwards to the specified Y stop point in raster count. The axis generator will not sweep lines down or to the left; therefore, the program automatically interchanges the coordinates if it is required in order not to stop the S-C 4020. If no stop point is given in the parameter list, the axis will be swept to the right edge of the frame or the top edge of the frame.

The call statement for sweeping a horizontal line is:

      CALL XAXISV (TX, IY) 
or 
      CALL XAXISV (DX, IY, NSTPT) 
IX, IY
The fixed point raster coordinates of the origin of the line. IX may have a value from 0 to 959, while IY may have a value from 0 to 959.
NSTPT
The fixed point X coordinate of the stop point.

For a vertical line, the statement is:

      CALL YAXISV (IX, IY) 
or 
      CALL YAXISV (IX, IY, NSTPT) 
IX, IY
The fixed point raster coordinates of the origin of the line. IX may have a value from 0 to 959, while IY may have a value from 0 to 959.
NSTPT
The fixed point Y coordinate of the stop point.

6. SCALING AND CONVERSION

In earlier sections, scaling and conversion problems have been left to the routine GRID1V. However, much of the actual computation is done in lower-level modules. This section describes these and some associated modules that provide additional tools for some scaling and conversion problems.

The descriptions may also be useful in clarifying the operation of higher-level routines. For example, GRID1V uses XSCALV, YSCALV as a lower-level routine to do scaling. Consequently, the comments in this section concerning scaling and conversion equations, scale factors, and retrieving and resetting scale factors also apply when the programmer uses GRID1V to control scaling.

Methods of operation in both the linear and nonlinear modes are discussed. The nonlinear mode built into the system is the logarithmic mode, but the possibility of substitution of other nonlinear modes is mentioned.

6.1 Basic Scaling Subprograms: XSCALV, YSCALV

XSCALV, YSCALV will compute the scale factors for a specified display and store them in an internal table for later use by those functions which convert data. The calling statements are:

      CALL XSCALV (XL, XR, ML, MR) 
      CALL YSCALV (YB, YT, MB, MT) 
XL, XR
Floating point values of X for the leftmost and rightmost limits of the scaled plotting area.
ML, MR
The amount of margin space to be reserved to the left and right of the scaled area, expressed in raster counts (fixed point integers).
YB, YT
Floating point values of Y for the bottom and top limits of the scaled plotting area.
MB, MT
The amount of margin space to be reserved below and above the scaled area, expressed in raster counts (fixed point integers).

XSCALV, YSCALV contains a test for nonlinear mode. If this mode is indicated, XL, XR and/or YB, YT will be transformed before the scale factors are computed by the basic scaling equations.

Example

Figure 6-1 illustrates the relationship of the arguments. The margin specifications are: ML=170, MR=192, MB=340, MT=128.

MT MB ML MR YT YB XL XR SCALED AREA
Figure 6-1

XSCALV will assign XL to raster location IX= 170, and XR to raster location IX= 831 (i.e., 102 -192). YSCALV will assign YB to raster location IY = 340, and YT to raster location IY=895 (i.e., 1023-128). The scaled area will then be the rectangle from IX=170 to IX=831, and from IY=340 to IY=895.

6.2 Basic Scaling Equations

In the following equations, A and B represent the scale factors computed and stored by XSCALV, and C and D are the factors computed and stored by YSCALV. (Since the computation is done in floating point arithmetic, the floating point variable names FML, FMR, FMB, and FMT are used to represent the floating point equivalents of the margin values ML, MR, MB, and MT.)

A = ((1023.- FMR)-FML)/(XR - XL)    I
B = FML-A*XL                        II
C = ((1023.- FMT) - FMB)/(YT- YB)   III 
D = FMB-C*YB                        IV

6.3 Conversion of Date: NXV, NYV, IXV, IYV

Four function subprograms, NXV, NYV, IXV, and IYV, are provided to convert data coordinates into raster coordinates. The argument for each of the functions must be a floating point quantity; the result will be an integer quantity.

The following FORTRAN statements show how these functions may be used to convert data coordinates X (or Y) into raster coordinates IX (or IY):

      IX = NXV(X)
      IY = NYV(Y)
      IX = IXV(X)
      IY = IYV(Y)

These four functions are similar in that they all convert data by means of the basic equations for data conversion discussed below. They are dissimilar in the way they handle off-scale data (that is, data which falls outside the limits XL, XR or YB, YT.)

The functions NXV and NYV check for off-scale data values. The result IX (or IY) will be set to zero if the argument X (or Y) is outside the limits that were used to establish the scale. In addition, an error indication is set, as discussed under Off-Scale Error Detection.

The functions IXV and IYV do not test for off-scale data values. The resulting position can be outside the plotting area, or even outside the frame, but the value will be properly scaled relative to the plotting area. (However, no test is made for the possibility that the result is greater than 131,071; integer bits above the 17th will be lost.)

Figure 6-2 illustrates how error testing of the results of NXV, NYV can be used to bypass plotting of points that are off-scale. NXV and NYV were used to convert the points along the curve into raster positions, and LINEV was employed to connect the points. Since the results of NXV and NYV were tested for zeros, and plotting was by-passed whenever a point was off-scale, the curve stopped at the top and right limits of the scaled area (outlined).

.0 .95 -.95 3.0
Figure 6-2: Use of MXV, MYV With Error Testing

In Figure 6-3 two sine curves are shown, one plotted after using NXV, NYV to do the conversion, and the other after IXV, IYV were used. As in Figure 6-2, LINEV was used to connect the points. NO ERROR TESTS WERE MADE.

.0 .95 -.95 3.0
Figure 6-3: Use of MXV, MYV, IXV, IYV Without Error Testing

The lower curve shows the line going to zero when off-scale values were encountered by NXV, NYV. Note that this curve drops to the bottom of the frame (IY = 0) when values that were off-scale in Y were encountered. Also note that the off-scale initial and last values of X caused the curve to start and end at the left edge of the frame (IX = 0).

The higher curve was drawn after IXV, IYV were used to convert the points. The curve continued past the boundaries of the scaled area when off-scale values were encountered. (When IXV, IYV are used, the programmer must decide what action should be taken when the result of IXV and/or IYV is < 0 or > 1023.)

All four functions test for nonlinear mode. If indicated, X (or Y) will be transformed before it is converted by one of the basic conversion equations.

6.4 Basic Conversion Equations

The following equations show how the conversion functions convert data coordinates X and Y into raster coordinates IX and IY:

      IX = A*X + B 
      IY = C*Y + D 

The scale factors A, B, C, and D are those derived from the equations I, II, III, and IV.

Generally speaking, the programmer should use the conversion functions rather than writing statements of his own containing these equations. The functions offer the following advantages:

  1. They have direct access to the internal table in which the scale factors A, B, C, and D are stored.
  2. They check the scale mode, and use a nonlinear conversion if that mode is indicated.
  3. NXV, NYV contain a test for off-scale points.

If it is ever necessary to use these equations directly, the programmer can retrieve the scale factors (A, B, C, D) by employing the routine SCLSAV.

6.5 Inverse Conversion: UXV,UYV

The functions UXV, UYV allow the programmer to obtain the coordinates of a specified raster location in terms of his data. The following statements show how these functions may be used:

      X= UXV (IX) 
      Y =UYV (IY) 

Although UXV, UYV represent the inverse of IX= IXV(X) and IY=IYV(Y), the results are approximate because truncation occurs in the IXV and IYV functions.

NOTE: UXV, UYV CANNOT BE USED IN THE NONLINEAR MODE.

The equations used by UXV, UYV are the inverse of the equations for data conversion:

 X = (IX-B)/A
 Y = (IY-D)/C

(The computation is performed in floating point arithmetic.)

6.6 Retrieval of Scaling Information: SCLSAV

The subroutine SCLSAV will retrieve scale factors and other scaling information from an internal table and store them in an array named by the programmer. Although SCLSAV makes scaling information available for special-purpose conversions, certain limit tests, etc., its principal value is that it permits saving scaling information from one program link to another. When a new link is entered, another routine RESCLV, can be called to restore the scaling information in the internal table, where it is accessible to NXV, NYV, IXV, or IYV.

The calling statement to retrieve the scaling information is:

      CALL SCLSAV (R) 
R
The name of a ten-cell array, named and dimensioned by the programmer.

The storage locations in the block of cells, R, are assigned as follows:

R(10)  Minimum IY     
R(9)   Minimum IX     
R(8)   Maximum IY     
R(7)   Maximum IX     
R(6)   D     
R(5)   B   Scale factors   
R(4)   C     
R(3)   A     
R(2)   Scale mode indicator for Y   
R(1)   Scale mode indicator for X   

6.7 Resetting Scaling Information: RESCLV

If the scaling information has been stored in COMMON by SCLSAV, it can be reset into the internal table when a new chain link is entered. The statement is:

      CALL RESCLV(R) 

where R is the ten-cell array described under SCLSAV.

6.8 Nonlinear Scaling and Conversion

The only nonlinear capability built into the system is logarithmic scale mode, used in connection with log grids. However, the system design allows the programmer to incorporate some special nonlinear scale mode, by the substitution of one module of his own. For this reason, the more inclusive term, nonlinear, is used in the following discussion, instead of logarithmic. The linear and nonlinear scale mode indicators are discussed in Section 5.9.

6.9 Nonlinear Transformation: XMODV, YMODV

The scaling and conversion equations shown under number conversion apply not only to the linear mode, but also to the nonlinear mode if transformed arguments are used. The functions XMODV, YMODV are provided to perform such transformation; they can be used in statements of the following type:

      XPRIME = XMODV(X) 
      YPRIME = YMODV(Y) 

The scaling and conversion subprograms (XSCALV, YSCALV, IXV, IYV, NXV, NYV) test the scale mode indicators to see if they have been set to nonlinear mode by a call SMXYV. If nonlinear mode is indicated, each of these subprograms will use XMODV (or YMODV) to perform a nonlinear transformation on X (or Y) before the remainder of the scaling or conversion takes place. Since the XMODV, YMODV functions in the system compute the log of X or Y, the system nonlinear mode is synonymous with log mode.

For a problem requiring special nonlinear transformation, the programmer can substitute subprograms of his own named XMODV and YMODV, with one argument and one result. Since the system XMODV and YMODV are physically contained in one subprogram, both must be replaced if a substitution is made for either. Obviously, such substitute functions must meet the nonlinear scaling and conversion requirements of the entire program (or chain link), since they will replace the system functions.

System subprograms that use XMODV and YMODV (either directly or indirectly) are: GRID1V, IXV, IYV, LINRV, NONLNV, NXV, NYV, XSCALV, YSCALV, APLOTV, POINTV.

WARNING: GRID1V WAS DESIGNED ONLY FOR THE LINEAR, LOG, AND SEMI-LOG OPTIONS. SUBSTITUTION OF A SPECIAL TRANSFORMATION FUNCTION MAY CAUSE UNEXPECTED DIFFICULTIES IF USED BY GRID1V.

6.10 Off-Scale Error Detection

Whenever there is a possibility that off-scale data points might be encountered, error tests should be made by the programmer. For example, APLOTV sets an error indicator which should be tested. A zero result from NXV or NYV nearly always indicates an error; a test should be made for this condition.

There are additional situations which demand special error detection procedures. For one thing, if no left and/or bottom margin space is reserved, the conversion of XL and/or YB can produce a legitimate zero result from NXV, NYV. More important, the programmer may be using NXV or NYV indirectly, via other modules, and thus be unable to test the results. For these reasons, additional subprograms are provided for detailed analysis of conversion errors resulting from off-scale points.

Keep in mind that the special procedures which follow are designed for unusual situations, in which normal error testing does not suffice.

6.11 Set Conversionn Error Indicators: SCERRV

Two internal cells are used by NXV and NYV to store indications of successful or unsuccessful data conversion. The subroutine SCERRV allows the programmer to assign two cells which NXV, NYV will use in place of the internal error cells. In this way, the programmer can name error indicator locations that are accessible to his program. The call statement is:

      CALL SCERRV(KX, KY) 

When NXV converts a quantity successfully, it will place a 0 in KX; when unsuccessful, it will store a 1 in KX. NYV will use the cell KY in the same way. The cells named will be used in each subsequent execution of NXV, NYV (including execution via other subprograms) until new cells are named by another call to SCERRV (or the internal cells are reset at the beginning of a new link of a chain job). If possible, tests of these error cells should be made as soon after execution of NXV, NYV as possible, to avoid any possibility that they might be altered by subsequent executions of NXV, NYV.

The following practical examples show how SCERRV can provide error indicator cells in connection with POINTV. Since POINTV uses NXV and NYV only once, the named error cells will still contain indications of off-scale errors when control is returned from POINTV to the calling program. (The examples assume that the scale factors have already been established.)

Example 1
    .
    .
    .
      CALL SCERRV (KX,KY) 
      DO 300 I= 1,N 
      CALL POINTV(X,Y,NS) 
      IF (KX*KY) 700, 300, 700      Test for non-zero KX and/or KY 
 300  CONTINUE 
    .
    .
    .
 700  CALL DUMP                    Dump when an off-scale point is encountered 
Example 2
      CALL SCERRV (KX, KY) 
      M1 = 0 
      M2 = 0 
      DO 300 I= 1, N 
      CALL POINTV (X, Y, NS) 
      M1 = M1 + KX 
 300  M2 = M2 + KY 
      .
      .

In Example 2, M1 and M2 will contain the total number of points that are off-scale. The contents of these locations may be printed out at the end of the job or after all points have been plotted on each frame.

6.12 Saving and Resetting Error Indicator Cells: SERSAV, SERREV

As has been pointed out, the locations assigned by SCERRV will be used as error indicator cells until new ones are named (or a new link of a chain job is loaded). As a result, subsequent executions of NXV, NYV, whether on the same level or on a lower or higher one, will alter the contents of the error cells (setting them to 1 for an unsuccessful conversion, to 0 for a successful conversion). The only two levels involved are NXV and NYV themselves, and POINTV.

Two problems can occur. The obvious one is that indications of error may be masked by a subsequent execution of NXV, NYV. This can usually be avoided if the programmer completes error tests before there is any possibility that the contents of the error cells might be changed.

The less obvious problem is that the error cells named in one level of a program will not be accessible for error testing in other levels unless special action is taken. One way to solve this problem is to carry the error cell names in the call statements of the subprograms, not always a desirable solution.

The modules SERSAV and SERREV, used in conjunction with SCERRV, offer a convenient means for avoiding these problems in multi-level jobs. The call statements are:

      CALL SERSAV (LOCX, LOCY) 

This subprogram saves, in LOCX and LOCY, the locations of the cells that are currently being used for off-scale indicators.

      CALL SERREV(LOCX, LOCY) 

This subroutine resets the off-scale error cell locations that were saved by SERSAV.

The arguments, LOCX and LOCY, must be variable names (either fixed or floating point) which are not used for any other purpose between the execution of SERSAV and of SERREV.

7. PLOTTING AND LINE GENERATION

7.1 Plotting Data

The 64 CHARACTRON characters are shown in Figure 7-1 along with the selection code for each. Note that, for FORTRAN characters, the selection codes are the same as the BCD codes recognized by IBM equipment.

            S-C 4020 STANDARD SCIENTIFIC CHARACTERS
      NUMERIC               ALPHABETIC           OTHER FORTRAN
CHAR  DECIMAL  OCTAL   CHAR  DECIMAL  OCTAL   CHAR  DECIMAL  OCTAL   
   0     0      0         M    36     44         )    28     34      
   1     1      1         N    37     45         $    43     53      
   2     2      2         O    38     46     BLANK    48     60      
   3     3      3         P    39     47         NON-FORTRAN         
   4     4      4         Q    40     50     CHAR  DECIMAL  OCTAL    
   5     5      5         R    41     51         ∂    10     12      
   6     6      6         S    50     62         "    12     14      
   7     7      7         T    51     63         '    13     15      
   8     8     10         U    52     64         δ    14     16      
   9     9     11         V    53     65         α    15     17      
     ALPHABETIC           W    54     66         ?    31     37      
CHAR  DECIMAL  OCTAL      X    55     67         β    29     35      
   A    17     21         Y    56     70         ±    30     36      
   B    18     22         Z    57     71         π    26     32      
   C    19     23          OTHER FORTRAN         ,    42     52      
   D    20     24      CHAR  DECIMAL  OCTAL      γ    45     55      
   E    21     25         =    11     13         ∼    46     56      
   F    22     26         +    16     20         d    47     57      
   G    23     27         -    32     40         °    58     72      
   H    24     30         *    44     54         ∫    61     75      
   I    25     31         /    49     61         Σ    62     76      
   J    33     41         .    27     33         □    63     77      
   K    34     42         ,    59     73                           
   L    35     43         (    60     74                           

         SUGGESTED PLOTTING CHARACTERS AND COMBINATIONS
  . 42 52    +  16  20    C  19 23     0   0   0     φ 38,55 46,67      
  □ 38 45    +  55  67    H  24 30     φ 38,49 46,61 Φ 63,55 77,67      
  □ 63 77    *  44  54    U  52 64     Φ 63,49 77,61 
∂,∼ NOT AVAILABLE IN TYPEWRITER MODE               
Figure 7.1

Reduced to fundamentals, printing or plotting of one CHARACTRON character involves the selection and display of that character at a specified position on the raster. (A basic subprogram, PLOTV, can be used to select and display one character at a time.) The higher-level subprograms, however, contain features that make each one suitable for a specialized purpose: plotting, printing, or labeling. These specialized features of the higher-level routines make them appear to be distinctly different from each other.

7.2 Point Plotting Subprograms

Since point plotting usually involves the scaled representation of a physical phenomenon, most point plotting subprograms accept physical data coordinates for position information. During execution of these subprograms, the data coordinates are converted into raster coordinates. Scale factors must have been established for the plotting routines to use in making these conversions; this requirement can be satisfied by a prior entry to GRID1V.

Scale factors are not normally saved from link to link in a chain job. Consequently, plotting should be done within the link in which scale factors are computed.

7.3 Plotting an Array: APLOTV

APLOTV was designed for situations in which a large number of X values are stored in one array and the corresponding Y values are stored in another array. It is possible to plot the entire set of data with one entry to APLOTV. If desired, only a portion of the data can be plotted.

It is also possible to use different CHARACTRON characters as symbols to identify curves. The programmer furnishes a table (of one or more CHARACTRON characters) that will be selected cyclically. APLOTV also keeps a tally of the number of off-scale points encountered.

The calling statement is:

      CALL APLOTV (N, XARRAY, YARRAY, JX, JY, ±NC, MARKPT, IERR) 
N
N is the number of points in the arrays from which the data points are to be taken (as if all the data in the arrays are to be plotted in succession). N is normally the dimension of the arrays. The value of N may be computed by letting K in the following formulas equal the number of points to be plotted:
N = K*JX or N = K*JY, whichever is larger.
XARRAY,YARRAY
Normally, the names of the arrays of floating point data to be plotted. Since these arguments must name the locations of the data coordinates of the first point to be plotted, subscripts may be necessary. Both arrays must be in the same order of storage.
JX, JY
Fixed point positive integers giving the increments to be added to the subscripts of XARRAY and YARRAY as each point is plotted.
NC
The number of characters in the array MRKPT to be used as plotting symbols (usually the size of the array MRKPT). Positive NC indicates that MRKPT is a normal FORTRAN array. Negative NC shows that MRKPT is stored in increasing locations in core.
MARKPT
The array that contains. the selection codes of the plotting character(s) to be used., These will be used cyclically, with the first one being used again after the NCth one has been used.
To set up this information when only one character is to be used, the argument can be one of the following:
  1. An integer selection code, as 4' for the plotting dot, 38 for the alphabetic letter O, etc. (see Figure 7-1)
  2. A Hollerith argument for one FORTRAN character, as 1HO.
  3. The name of a location containing an integer, as MRKPT
If more than one character is desired, the seventh argument may be one of the following:
  1. An array of integers read in by the I format, or generated by a series of arithmetic statements: MRKPT(1) = 38; MRKPT(2) = 55, etc. Such an array must have a fixed point variable name.
  2. An array read in by the A format, one character to a location. Such an array is not restricted to integer-type names; it could be called PTMRK, for example, if the contents are not used in a computation.
IERR
The name of an error location supplied by the programmer. Any point that falls outside the grid drawn by GRID1V will not be plotted. Instead, a count of such points will be stored in IERR.

APLOTV plots only one character per point. If a center dot is desired, APLOTV may be repeated, using the plotting dot as the symbol. The use of APLOTV is illustrated by the Figure 7-2 and Figure 7-3.

In Figure 7-2, it is assumed that the data are stored in two arrays: X(1), X(2), ... , X(25), and Y(1), Y(2), ..., Y(25). A prior entry was made to GRID1V, using the statement:

      CALL GRID1V (1, 0.0, 14.0, 0.0, 180.0, 0.2, 5.0, 5, 4, 10, 8, 3, 3) 

Note that the X and Y limits cover the range of the data to be plotted. Also, since GRID1V was entered first, the necessary scale factors have been established for APLOTV. The calling statement of APLOTV for this example is the following:

      CALL APLOTV (25, X, Y, 1, 1, 1, 38, IERR) 
      or 
      CALL APLOTV (25, X, Y, 1, 1, 1, 1HO, IERR) 
N=25
The array size, 25 in this case, is equivalent to the number of points to be plotted. This can only be true when all points in each array are to be plotted.
X,Y
Names of the X and Y arrays (properly dimensioned).
JX=1, JY=1
Since every X versus Y is to be plotted, the fourth and fifth arguments are set to 1.
NC=1
Only one plotting symbol is to be used; hence the sixth argument is set to 1.
MARKPT
In the two calling sequences shown, one specifies the plotting symbol by an integer, the other uses a Hollerith character.

Figure 7-3 shows one way that APLOTV might be used to plot a family of curves. The example assumes that the XA and YA arrays are properly dimensioned. The data is stored XA(1), XA(2), ... , XA(10); corresponding Y's for the three curves are stored in the array YA in the order A(1), A(2), ... , A(10), B(1), B(2), ... , B(19), C(1), C(2), ... , C(10). PTMRK is the name of a three-word array which was loaded as the BCD equivalents (read in by the A format) of the characters O, X, and *.

In the example, A(I), B(I), and C(I) were plotted versus X(I) each time APLOTV was entered. A DO loop was used to proceed to the next value of X, so that a total of 10 entries were made to APLOTV. The coding was:

      DO 1240 I = 1, 10 
 1240 CALL APLOTV (30, XA(I), YA(I), 0, 10, 3, PTMRK, IERR) 

Note that the plotting symbols are used cyclically, returning to the first one when the array PTMRK is exhausted. If desired, a center plotting dot can be superimposed upon the plotting symbol by repeating the entries to APLOTV with the plotting dot used for PTMRK.

7.4 Plotting Individual Data Points: POINTV

For each entry to POINTV, one symbol is plotted (with or without a center dot). The coordinates may be specified as floating point data, which POINTV will convert into raster coordinates. Scale factors must have been established; this can be accomplished by a prior entry to GRID1V.

POINTV relieves the programmer of the burden of setting up a symbol table. The most suitable plotting symbols derived from CHARACTRON characters are arranged in a table, with the best choices near the beginning of the group. The symbols are selected by using integers from 1 to 48 as shown below. The calling statement is:

      CALL POINTV (X, Y, ±NS) 
X,Y
Coordinates of the point to be plotted, stated as floating point data values.
±NS
Integer which selects a plotting symbol. If NS is minus, there will be no center dot plotted. If NS is positive, a center dot will appear.

Points outside the scaled area will not be plotted. Until the programmer learns how to detect off-scale points (by a method explained in the advanced material), he should be sure that the data coordinates will fall within the limits of the scaled area.

An alternate version of this subprogram allows the programmer to specify position information in raster coordinates. This is particularly useful when the programmer wants to construct a legend in the margin, showing the symbols used and their meaning. The alternate call statement is:

      CALL POINTV (IX, IY, ±NS, ANY) 
IX, IY
Raster coordinates of the point to be plotted; fixed point.
±NS
Integer to select a plotting symbol, as stated above.
ANY
The inclusion of a fourth argument signals the subroutine that the position information is specified as raster coordinates. The form of this argument is immaterial; it may be any fixed point or floating point variable or constant.
0000-90- 008 008 DATA IS STORED X1, X2, ..X25 AND Y1, Y2,..Y25 0. 2. 4. 6. 8. 10. 12. 14. 160 120 80 40 0 CALL GRID1V(1, 0.0, 14.0, 0.0, 100.0, 0.2, 50.0, 5, 4, 10, 8, 3, 3) CALL APLOTV(25,X,Y,1,1,1,36,IERR) OR CALL APLOTV(25,X,Y,1,1,1,IHO,IERR)
Figure 7.2
XA ARRAY IS STORED X1,X2..X10 AND YA ARRAY IS STORED A1,A2..A10 B1,B2..B10 C1,C2..C10 PTHRK CONTAINS O,X,AND * LOADED UNDER FORMAT (3A1) 0 5 10 15 20 25 100 80 60 40 20 0 O O O O O O O O O O X X X X X X X X X X * * * * * * * * * * DO 1240 I-1,10 1240 CALL APLOTV(30, XA(I), YA(I),D,10,3,PTHRK,IERR)
Figure 7.3

The available symbols are shown in Figure 7-4.

NS SYMBOL NS SYMBOL NS SYMBOL NS SYMBOL 0 1 2 3 4 5 6 7 8 9 10 11 12 O X Y + * L U 0 H C V 13 14 15 16 17 18 19 20 21 22 23 24 25 Z O X 0 X O + + 0 / / - O / X - I 26 27 28 29 30 31 32 33 34 35 36 37 38 G S W Q ( ~ ) N T = D A B 39 40 41 42 43 44 45 46 47 48 E F M P R γ 2 3 7 8
Figure 7.4

An illustration of the use of POINTV appears in Figure 7-5.

THE SAME DATA PLOTTED USING POINTV INSTEAD OF APLOTV 0 5 10 15 20 25 100 80 60 40 20 0 O O O O O O O O O O / / / / / / / / / / + + + + + + + + + +
Figure 7.5

7.5 Basic Plot-Print Subprogram: PLOTV

Any one of the 64 CHARACTRON characters can be displayed at a specified raster position by using PLOTV, the basic subprogram used as a lower-level module of other routines. However, the programmer may find it useful when other plotting or printing subprograms are not suitable. The call statement is:

    
      CALL PLOTV (IX, IY, NS) 
IX, IY
Fixed point raster coordinates at which the character will be displayed.
NS
An integer which selects the character. The selection code (decimal equivalent) of the desired character should be used. (See Figure 7-1).

7.6 Line Generation: LINEV, LINE2V

LINEV connects two points by a straight line composed of vectors, joined end-to-end. The arguments for LINEV, which specify the points to be connected, must be given in raster counts. As described above, the programmer may connect two data points by a line if he first uses the functions NXV and NYV to convert the data coordinates into raster coordinates. (If there is a possibility that the data points being converted may be off-scale, the conversion results should be tested for errors before LINEV is executed.) The calling statement is:

      CALL LINEV (IX1, IY1, IX2, IY2) 
IX1, IY1
Raster coordinates of one end point.
IX2, IY2
Raster coordinates of the other end point.

Figure 7-6 contains an illustration of the use of LINEV.

4 6 8 10 12 14 16 18 20 80 70 60 50 40 30 20 METAL C METAL B METAL A T E M P E R A T U R E F
Figure 7.6

LINE2V is used to draw a line from a fixed point in some direction specified by DX and DY. The calling sequence is:

      CALL LINE2V (IX1, IY1, ±IDX, ±IDY) 
IX1, IY1
Raster coordinates of starting point.
±IDX, ±IDY
Number of raster points that the line is to be extended in the X and Y directions.

In either LINEV or LINE2V, a floating point data value may be utilized,if scaling has been established,by utilizing the function subprograms NXV, NYV as follows:

      CALL LINEV (NXV(X1), NYV(Y1), NXV(X2), NYV(Y2)) 
Figure 7-7 is an example of the use of LINE2V. Each line in the figure is produced by incrementing IX1 (IY1) by ±IDX (±IDY).

      CALL XSCALV (-511.0, 512. 0, 0, 0) 
      CALL YSCALV (-511.0, 512. 0, 0, 0) 
      Z0 = 0.0 
      Z1 = 4.0 
      Z2 = 4.0 
      CALL POINTV (Z0, Z0, -16) 
      DO 5 I= 1, 63 
      INC= I 
      JNC = -INC 
      CALL LINE2V (NXV(Z1), NYV(Z0), 0, INC) 
      CALL LINE2V (NXV(Z2), NYV(Z0), 0, JNC) 
      CALL LINE2V (NXV(Z0), NYV(Z1), JNC, 0) 
      CALL LINE2V (NXV(Z0), NYV(Z2), INC, 0) 
      Z1 = Z1+3.0 
  5   Z2 = Z2-3.0 
0 X
Figure 7.7

7.7 Dashed Line Subprograms:DOTLNV, INCRV

Calling Sequence:

      CALL DOTLNV (IX1, IY1, IX2, IY2) 
where: IX1, IY1 = start coordinates (integer values) 
       IX2, IY2 = stop  coordinates (integer values) 

The routine INCRV is used to supply the line and space size. This is set normally at 8 for the line and 4 for the space. These values may be altered, however, by calling INCRV prior to DOTLNV.

Calling Sequence:

      CALL INCRV (IL, IS) 
where: IL = desired length of line in raster units(integer value)
       IS = desired size of space  in raster units(integer value) 

If IL and IS are such that the stop coordinates (IX2, IY2) terminate in the space portion of a dash segment, the last line portion extends to the stop coordinates. Illegal values of IL or IS are ignored by INCRV. DOTLNV will then use the last used values of IL and IS.

8. TITLING AND LABELLING

8.1 Titling and Labeling Subprograms

The printing and labeling subprograms enable the programmer to affix titles and other identifying information to a picture. Three subprograms of this type will be introduced: PRINTV, APRNTV, and LABLV. Other means for printing and labeling will be given in the section on printing.

For many applications, the positions of titles and labels must be independent of the scale. Therefore, printing and labeling subprograms accept position information in raster coordinates. This contrasts with the plotting routines, which includes facilities for the conversion of data into raster counts. Titles or labels may be positioned relative to data. The conversion functions discussed later can be employed to find raster coordinates from floating point location data.

8.2 Typewriter Printing: PRINTV

The S-C 4020 has a built-in Typewriter Simulator, which prints a series of CHARACTRON characters very rapidly. The typewriter mode allows eight raster counts for the width of a character space. If typewriting exceeds 128 characters in any row and carries over to the next row, the next printing will start at the left edge of the frame, 16 raster counts below the preceding row. Writing takes place only in horizontal rows, and the characters are always upright. If the vertical advance causes the raster count to exceed 1023, printing will continue at the top of the frame, but no frame advance will occur.

In the Typewriter Mode, the machine recognizes octal codes 56 and 12 as special instructions. If these codes are accidentally used, imperfect pictures will result.

The PRINTV calling statement provides for printing characters read in by the A format, or characters specified in the call statement itself in the nH------ form.

      CALL PRINTV (N, BCDTXT, IX, IY) 
      or 
      CALL PRINTV (-N, nH------, IX, IY) 
N
The number of CHARACTRON characters to be printed. A negative sign on N signals that the second item is a Hollerith argument.
The typewriter mode is used by PRINTV until N characters have been printed.
BCDTXT
An array containing the BCD (A- or O-type format) text to be printed.
nH-------
A Hollerith argument containing the text to be printed.
IX, IY
The raster coordinates for the center of the first character. IX and IY may be any number from O to 1023.

8.3 Vertical Titles: APRNTV

This subprogram can be used to display vertical titles composed of CHARACTRON characters. Each individual character will be upright. The call statement provides for printing characters in BCD form (read in by the A format) or characters stored as a Hollerith argument. Since APRNTV does not use the Typewriter Mode, the spacing of the characters is controlled by arguments specified by the programmer. See Figure 8-1.

The call statement for APRNTV is:

      CALL APRNTV (INCRX, INCRY, N, BCDTXT, IX, IY)
      or 
      CALL APRNTV (INCRX, INCRY, -N, nH------, IX, IY) 
INCRX INCRY
Increments used to space the characters in the X or Y direction, given in raster counts. For vertical titles, INCRX will be zero and INCRY should have a negative value. (It is suggested that INCRY fall in the range between -12 and -18 for vertical titles in most applications.) Figure 8-2 shows a vertical title, with INCRY equal to -14. Using a slightly higher value for the Y increment would have spaced the letters farther apart.

The remaining arguments are as specified under PRINTV.

APRNTV was introduced earlier and used to write vertical titles. The example in Figure 8-1 shows another application of APRNTV. This frame shows that APRNTV may be used to write along certain slopes.

H E I G H T WIDTH L E N G T H CALL APRNTV(10,10,-8,6HLENGTH,40,394) H E I G H T WIDTH L E N G T H CALL APRNTV(9,-3,-8,6HLENGTH,696,399)
Figure 8.1

8.4 Display of Non-FORTRAN Characters

The characters in the last column of the table of CHARACTRON characters (Figure 7-1) require special consideration. IBM equipment does not provide for key-punching these characters, so they cannot appear in a Hollerith argument nor on an A-type format card. However, the octal equivalents of the selection codes can be read into storage by the O-type format, and APRNTV or PRINTV can be employed to display them.

A single non-FORTRAN character can easily be displayed by the basic plot-print subprogram, PLOTV, or by APLOTV, using a decimal integer as the selection code. If a character is being inserted into information otherwise printed by PRINTV, the fact that PRINTV allots 8 raster counts to each character must be taken into consideration.

8.5 Fixed Point Labels: LABLV

LABLV was developed for GRID1V to employ in labeling grid lines, but will prove helpful when the value of computed quantities must be printed. The routine performs two chief tasks: it converts a floating point quantity into a number in BCD format, with the decimal point in the proper position, and it displays the BCD number at the raster coordinates specified.

Before the BCD label is displayed, it is right adjusted in accordance with the specified decimal scale. (The number of positions to the left of the decimal point is called the decimal scale). During the right adjustment, BCD blanks are moved into the high order positions that are vacated. A specified number of characters counting leading blanks and decimal point will then be displayed.

The result of this procedure is demonstrated by the column of numbers: 150.5, 85.7, 0.3 in Figure 8-2. Notice that the three quantities have been truncated to the same number of decimal places, and that the decimal points have been aligned.

The calling statement of LABLV is:

      CALL LABLV (D, IX, IY, NCHAR, NT, NDMAX) 
D
The floating point quantity to be printed.
IX, IY
The raster coordinates which will position the first character of the label. Note that this first character may be a leading blank. If the quantity to be displayed is negative, the minus sign will be displayed one character space to the left of IX, IY.
NCHAR
Number of characters to be displayed, including leading blanks and the decimal point, if any. NCHAR is limited to 6 (or 7 if one of the characters is the decimal point).
NT
The number of times each character is to be displayed (number of over-strikes). Normally this should be 1, but 2 or more may be chosen if a darker label is desired.
NDMAX
Maximum decimal scale; i.e., maximum number of characters to be displayed to the left of the decimal point.

An integer quantity may be displayed by first changing it to floating point form and then using LABLV.

An alternate form of LABLV may be used to display labels in scientific notation. The call statement shown is used with the following changes:

-NCHAR
Number of significant figures to be displayed. NCHAR may be less than or equal to 6. The negative sign will result in the use of scientific notation.
NDMAX
May be any fixed point quantity. Since the right adjustment of these labels will not be necessary, the value of NDMAX will be ignored.

NCHAR will affect the format in the following ways:

NCHAR     FORMAT   
  1    Y.x10±YY   
  2    Y.Yx10±YY   
  3    Y.YYx10±YY   
  4    Y.YYYx10±YY   
  5    Y.YYYYx10±YY   
  6    Y.YYYYYx10±YY   

Since the space required for these labels will be greater than that required for the fixed point format, the programmer should allow NCHAR + 7 CHARACTRON character spaces in width and 1-1/2 spaces in height as a minimum; it may be necessary to allow even more to avoid overlapping other images.

EXAMPLES OF FRAMEV, PRINTV, APRNTV, AND LABLV HORIZONTAL TITLE USING PRINTV MACH NO.= 1.3 150.5 85,7 0.3 V E R T I C A L T I T L E U S I N G A P R N T V
Figure 8.2

The following FORTRAN statements were used for these examples

      CALL FRAMEV
      CALL PRINTV (-31, 31HHORIZONTAL TITLES USING PRINTV  , 200, 925 )
      CALL APRNTV (0,-14,-27, 27HVERTICAL TITLE USING APRNTV  ,0, 200 )
      CALL PRINTV (-9, 9HMACH NO.=  , 200, 850)
  C   ASSUME VALUE IN XMACH IS 1.3(FLOATING POINT)
      CALL LABLV ( XMACH,280, 250, 3, 1, 1 )
  C   ASSUME D(1), D(2) AND D(3) CONTAIN 150.5, 85.7 AND 0.3 RESPECTIVELY (FLOATING POINT)
      IY=775
      DO 410 J=1,3
      CALL LABLV (D(J), 200, IY, 5, 1, 3 )
 410  IY=IY-18

The following illustrates a scientific and a fixed point label.

CALL LABLV (579.5, 625, 1023, 5, 1, 3) RESULTS IN 579.5 
CALL LABLV (579.5, 623, 999, -4, 1, 3) RESULTS IN 5.795x10+02 

8.6 NUMBER CONVERSION: NXV,NYV

For many applications, the placement of printing and labeling is independent of the values of the data being plotted. For this reason, the printing and labeling subprograms have been designed to accept position information specified directly in raster coordinates. In addition, many other S-C 4020 subprograms, particularly the most basic ones, are designed to accept position information specified in raster coordinates.

For subprograms of this type, it is possible to position a display relative to data values by making use of the two conversion functions, NXV and NYV, described in the section on scaling.

9. PRINTING

9.1 S-C 4020 Printing

Printing can be accomplished by the S-C 4020 in any of three ways: (1) simulated typewriting, (2) plotting single characters, (3) forming characters from vectors. The obvious application of placing titles and labels on graphs has already been introduced using the routines PRINTV, APRNTV, and LABLV. PRINTV is the basic routine for using the typewriter simulator. This is the fastest means of getting information out of the computer. In this, mode information is stored as a string of characters, six to the word, and can be output at a maximum rate of 17,000 characters/second or approximately 7,000 lines/minute. Of course, this rate is never accomplished due to the necessity for frame advances every sixty-four lines. In APRNTV, the information is output one character per word transferred to the S-C 4020. This is considerably slower than the simulated typewriter mode but allows printing other than in straight horizontal lines .

This section of the manual presents the details of operation of the S-C 4020 typewriter simulator, introduces some additional control routines for use in printing applications, and routines forming characters from vectors. The vector method of forming characters is very flexible and provides for a variety of type fonts in selected sizes and aspect ratios as well as in four rotations. This is the only means at the programmer's disposal for producing rotated characters.

In addition to the basic routines, the routines SCOUTV and VCPS (the latter a separate package from the SCORS-UAIDE 006 system), will be described to aid the programmer in page formatting. The routine SCOUTV is used to output normal FORTRAN printed output on the S-C 4020. This routine utilizes the output routines implemented for the IBM 7090/7094 FORTRAN systems. The VCPS routine provides the capability of preparing printed pages with justified margins and proportional letter spacing. It also provides for mixing fonts at will to achieve special effects. These routines are described in sections X and XI.

SCOUTV is a separate routine distributed with the SCORS system. VCPS is a routine distributed upon request.

9.2 Typewriter Mode

The typewriter mode, a built-in feature of the S-C 4020, has the following characteristics:

  1. CHARACTRON characters are displayed.
  2. Once positioned and started in the typewriter mode, the S-C 4020 prints character after character, automatically spacing 8 raster counts to the right as each character is printed.
  3. The commands for the typewriter mode (except for those that start and stop typing) are simply the 6-character BCD words to be typed, transmitted without alteration. This mode, therefore, is very economical of computer time and the length of the tape used for words in the typewriter mode is held to a minimum. Since the S-C 4020 can display 6 characters per command, this mode is also economical of S-C 4020 time.
  4. When a line of typing reaches the right edge of the frame, (128 characters) an automatic carriage return takes place. Typing halts at this point and resumes at the left edge of the frame, 16 raster counts below the preceding line.
  5. If typing reaches the bottom of the frame, a return to the top of the frame occurs automatically. No automatic film advance takes place, so it is possible for typing to overlay previously displayed information.
  6. Three of the 64 CHARACTRON characters serve special purposes when they are encountered in the words of the text being typed.
    42 (Decimal) 52 (Octal)
    A carriage return,described in item 4, will occur when this character is encountered.
    10 (Decimal) 12 (Octal)
    Stop type. Typing mode is stopped, any characters remaining in the word will be ignored. The next word on tape will be interpreted by the S-C 4020 in the graphic mode.
    46 (Decimal) 56 (Octal)
    Reset is executed. This means that typing is stopped, the film is advanced, and the bright intensity mode is turned on. Any characters remaining in the word will be ignored. The next word on tape will be interpreted in the graphic mode.
    Because 42, 10, and 46 are used for these special purposes, the characters • (plotting dot), ∂ and ~ are unavailable in the typewriter mode.
  7. Typing may be started at either a specified point or at the current point. The current point is defined as the point specified by the last operation performed; i.e., either the last point plotted or typed, or the origin of the last vector or axis drawn.

9.3 System Subprograms and the Typewriter Mode

The subprograms PRINTV and LABLV, and the SCOUTV system, make use of the typewriter mode. Therefore, the output of these subprograms will be influenced by the characteristics of this mode.

Since it was not practical to require the programmer to insert a stop type code, other methods of stopping typing are used. PRINTV and LABLV insert the stop type code after the specified N characters. The SCOUTV system inserts the code in accordance with the FORMAT statement used.

It should be apparent that an incompatibility would occur if a stop type or reset code were encountered within the text being typed by PRINTV, LABLV, or SCOUTV. Any information following the special code would not be interpreted as typewriter output.

If PRINTV, LABLV, or SCOUTV printing encounters a carriage return character or the right edge of the frame, a carriage return will be made. This would interfere with the normal line advance provided in the SCOUTV system. It can be used to advantage, however, with PRINTV.

Except for the method used to stop typing, PRINTV can be considered a basic typewriter mode routine. It is a suitable lower-level module for other CHARACTRON character typing routines; in fact, it is used in this way by LABLV.

9.4 "Stop Type" Routines: STOPTV, RESETV

It is remotely possible that some unusual use of the subroutines or of the S-C 4020 could cause the typewriter mode to be in effect when the graphic mode is needed. Two subroutines are provided which ensure that the typewriter mode is no longer on.

CALL STOPTV
Turns off the typewriter mode. This has no effect on the mode if the typewriter mode is already off. However, since this statement writes a word on tape, it should be used with discretion.
GRID1V uses STOPTY to ensure that the plotting mode is in effect at the start of a new grid display.
CALL RESETV or CALL RESETV (NF)
Turns off the typewriter mode, advances the film and establishes the bright intensity mode. The argument agrees with FRAMEV.

9.5 Setting the "Current Point": PRINTV, BRITEV, FAINTV

The current point feature of the typewriter mode can be utilized if a special form of PRINTV is employed. Typing may be started at the last point plotted or printed, or at the origin of the last vector or axis line drawn, by giving one of the following statements:

      CALL PRINTV (N, BCDTXT) 
      CALL PRINTV (-N, nH-------) 

Except for the use of the current point instead of specified coordinates, this alternate form of PRINTV functions in the usual manner.

If the programmer wants to set a new current point, he may plot or print a blank at a specified position. Another method, which includes both setting the current point and establishing the Brite or Faint mode, is by one of the following statements:

      CALL BRITEV (NX, NY) 
      CALL FAINTV (NX, NY) 
NX, NY
The raster coordinates which will be set as the current point. Only a blank will be plotted at NX, NY by either of these statements.

9.6 Use of the Form Slide: FORMV

In using the S-C 4020 for printing applications, it is desirable to provide the equivalent of using preprinted forms. For this purpose, the S-C 4020 is equipped with a FORM FLASH unit to expose the film with a preprepared slide which can be precisely positioned. The CHARACTRON tube can be aligned to make the image fit the form to be used. This is a manual operation and FORM slides cannot be changed under program control.

The preparation of good FORM slides is rather expensive and therefore should only be considered for well established forms to be used hundreds of times. The FORM slide can occasionally be used for short runs if a special effect is required which is difficult or impossible to achieve by programming the S-C 4020. It must be noted here that a FORM slide should not be considered for use as a grid background for plotting since slight distortions in the image are not harmful if they affect the data and the grid at the same time but would ruin the precision of a graph drawn against a projected grid.

The FORM is projected by the statement:

      CALL FORMV 

9.7 Special Printing and Labelling Aids: HOLLV, BNBCDV

HOLLV and BNBCDV were designed as lower-level modules for the system printing and labeling subprograms. However, they can be called directly, and can sometimes be useful building blocks for the programmer's character printing and labeling subprograms.

9.8 Isolating One Character from a BCD Array: HOLLV

HOLLV selects the Nth BCD character from BCD words that are either contained in a one-dimensional FORTRAN array or given as a Hollerith argument, and stores the numerical equivalent of the selected character in a specified location. PLOTV or VCHARV can then be used to display the character. The call statement is one of the following:

      CALL HOLLV (N, BCDTXT, NS) 
      CALL HOLLV (-N, nH------, NS) 
±N
The position of the desired character within the block of BCD characters, counting from 1. If the block of characters is a FORTRAN array, N should be positive. If the BCD characters are in a Hollerith argument, the sign of N should be negative.
BCDTXT
A one-dimensional FORTRAN array that contains the BCD characters.
nH----
A Hollerith argument.
NS
The name of a location in which the numerical equivalent of the selected character will be stored. For example, if the Nth BCD character is R, the stored result will be the same as if the statement NS=41 had been used.

A practical example of HOLLV usage is illustrated by the way APRNTV uses it. The latter subprogram loops through a sequence of BCD characters, using HOLLV to select a character and PLOTV to print it. APRNTV then advances the print position and returns to the beginning of the loop for the next character.

9.9 Obtaining BCD Equivalent of a Floating Point Number: BNBCDV

BNBCDV is used by LABLV as a lower-level module to obtain the BCD equivalent of the floating point number displayed in the label. Since it converts a floating point number so as to yield the six most significant digits and the decimal scale, it can be useful also in programs that do not involve the S-C 4020. The call statement is:

      CALL BNBCDV (D, BCDWD, NDS) 
D
Floating point number to be converted into BCD.
BCDWD
Location in which the 6-character (rounded) BCD equivalent will be stored.
NDS
Location in which the decimal scale (number of digits to the left of the decimal point) will be stored.

The sign of D is ignored, and must be handled separately by the programmer.

Examples
      D = 12.345678 

The BCD equivalent of 123457 will be placed in BCDWD and the decimal scale of 2 will be stored in NDS.

      D = -.01234567 

The BCD equivalent of 123457 will be placed in BCDWD, and the decimal scale of -1 in NDS.

9.10 Program-Generated Characters: RITE2V, VCHARV, CHSIZV, RITSTV

9.11 The Vector Character Writing Subroutine: RITE2V

The RITE2V subprogram provides a means for printing variable-size characters in one of four different orientations. It uses, on a lower level, the vector charactergenerating subprogram, VCHARV.

The call statement can be either of the following:

      CALL RITE2V (IX, IY, LIMIT, K, INT, NTOT AL, NTH, BCDTXT, NL AST) 
      CALL RITE2V (IX, IY, LIMIT, K, INT, NTOTAL, -NTH, nH------, NLAST) 
IX, IY
The raster coordinates used for positioning the center of the first character to be printed.
LIMIT M
A raster position which will determine the right margin. When this limiting position is reached, writing is halted and a new line is started below the starting position of the previous line.
K
A code number which selects the direction of writing and the orientation of characters within the written text.
INT
An integer which controls intensity of the characters by controlling the number of times each vector is displayed. If overstriking for a darker character is not required, INT should be 1.
NTOTAL
An integer which specifies the number of characters to be printed.
±NTH
A character position count that specifies the location within a BCDTXT where writing is to begin. (Usually this is 1, but this argument allows printing to begin with some character in the BCDTXT other than the first.)
The sign indicates the type of storage used for the next argument. NTH should be positive if the 8th argument is a FORTRAN array. A negative value should be used if it is a Hollerith argument.
BCDTXT
The name of an array of BCD information to be written.
nH-------
A Hollerith argument. If used, a negative sign must be used with NTH to signal the subroutine that the information is in this form.
NLAST
The name of an error location (fixed point). NLAST will be set to zero if all the NTOTAL characters have been displayed. If writing must be stopped because the end of the frame has been reached, NLAST will be set to the character count where writing was stopped.

The standard character size is approximately 12 raster counts in width by 18 counts in height. The standard spacing allowance for adjacent characters is 18 raster counts, and for adjacent rows is 26 raster counts.

The programmer can alter the size of characters and spacing by means of other subroutines, discussed later in this section. He will not need to use them if the standard specifications are satisfactory for his purposes. Figure 9-1 illustrates the use of RITE2V to title a graph on any margin.

RITE2V PRODUCED THIS LINE. K= 90. LIMIT=1023 RITE2V PRODUCED THIS LINE. K= 90. LIMIT=1023 RITE2V PRODUCED THIS LINE. K= 90. LIMIT=1023 RITE2V PRODUCED THIS LINE. K= 90. LIMIT=1023
Figure 9.1

The font used here is not quite the same as the original font. See later for an exact replica

9.12 Variation in the Size of Vector Characters: CHSIZV

The width and height of vector characters can be altered by the subroutine CHSIZV (Change Size V). The call statement is:

      CALL CHSIZV (LVW, LVH) 
LVW
An integer, from 1 to l5, that controls the width of characters.
LVH
An integer, from 1 to 9, that controls the height of characters.

Obviously, LVW and LVH need not be equal, but any great disparity will result in the formation of characters that are elongated in one direction.

For the usual applications of RITE2V, the character size can be considered to be 4*LVW in width, and 6*LVH in height. These dimensions do not include the space required to prevent overlapping of adjacent characters. Examples of different proportions are shown in Figure 9-2. Notice that minimum size characters are not easily read. Adjustment of vector intensity is very critical.

Figure 9.2

IF CHSIZV is never called, the standard values of LVW=3 and LVH=3 will be used, resulting in a character size of 12 × 18 raster counts.

When CHSIZV is used to alter the standard character size, it will probably also be necessary to adjust the character spacing. The subroutine RITSTV was designed for this purpose.

9.13 Character Selection and Spacing: RITSTV

RITSTV can be used to alter spacing used by RITE2V for characters and rows. In addition, RITSTV can be used to select an alternate character set to be displayed by RITE2V. The call statement is:

      CALL RITSTV (ISPACE, IROW, TABL_V)* 
ISPACE
An integer that specifies the number of raster counts allowed for adjacent characters. This should be somewhat larger than the width of each character, to allow a gap between them.
IROW
An integer that specifies, in raster counts, the depth of adjacent rows. This should be somewhat larger than the height of a character.
TABL_V*
The name of a table of character patterns to be used. The most frequently used table, containing the alphanumeric characters, is named TABL1V. The available tables are described in the section on VECTOR CHARACTER TABLES.
WHEN RITSTV IS USED, THE TABLE NAME GIVEN AS THE THIRD ARGUMENT MUST ALSO BE GIVEN ON AN "F" CARD IN FORTRAN II or "EXTERNAL" IN FORTRAN IV.

NOTE: TABLE names larger than 9V are designated TAB_V instead of TABL+V. References to TAB_V in this section of the manual are marked with an asterisk as a reminder of this fact.

If RITSTV is called, all three arguments must be specifically stated, even though not all of them are changed, and the table name must appear on an F card or an EXTERNAL definition. The vector character tables are illustrated in Figure 9-3 and Figure 9-4.

TABL1V 0 1 2 3 4 5 6 7 8 9 00 10 20 30 40 50 60 70 TABL2V 0 1 2 3 4 5 6 7 8 9 00 10 20 TABL3V 0 1 2 3 4 5 6 7 8 9 00 10 20
Figure 9.3
Figure 9.4

If RITSTV is never called, RITE2V will use the standard values of ISPACE and IROW (18 and 26, respectively), and the standard table (TABL1V).

The following formulas are a general guide for the assignment of minimum values of ISPACE and IROW.

ISPACE = 5*LVW + 3 
IROW   = 7*LVH + 5 

9.14 Retrieval of Terminal Coordinates: RITXYV

At the time RITE2V terminates, the coordinates for the next character are set up. RITXYV retrieves these coordinates so that they can be used to determine the correct position of a special character to be inserted into a text written by RITE2V. The call statement is:

      CALL RITXYV (LX, LY) 
LX, LY
Names of the locations in which RITXYV will store the raster coordinates (IX, IY) that RITE2V has computed as the location of the next character.

9.15 Display of Individual Vector Characters: VCHARV

VCHARV is used as a lower-level subroutine by RITE2V to generate each vector character. When a single character is to be displayed, a direct call to VCHARV by the programmer will often be more convenient than a call to RITE2V, especially if the character to be displayed is a non- Hollerith or a special character.

The call statement is:

      CALL VCHARV (K, INT, ILX, ILY, NS, TABL_V)*
K
Code number which selects the orientation of the character:
  K=  90      Character will be upright
  K= 180      Character will be rotated left
  K= 270      Character will be upside down
  K= 0 or 360 Character will be rotated right
INT
An integer which controls the intensity of the character by controlling the number of times each vector is repeated. For normal intensity this should be 1, but may be greater if a darker character is desired.
ILX, ILY
Integers which specify the raster coordinates to be used to position the character. This position will be used as the lower left corner of the character pattern. (Note that this is different from the center position specified for RITE2V. )
NS
An integer which selects the character to be generated from a table of patterns. Selected by the choice of TABL_V*.
TABL_V*
The name of a table of character patterns to be used. The name of the table containing the most frequently used characters is TABL1V.
WHEN VCHARV IS CALLED DIRECTLY, THE TABLE NAME GIVEN MUST ALSO APPEAR ON AN "F" CARD OR ON "EXTERNAL" DEFINITION.

RITE2V uses the specified coordinates as the center of the first character to be displayed, but VCHARV uses the specified coordinates as the lower left corner of the character. Thus, it may be necessary to translate the coordinates when direct calls to VCHARV are used to insert characters into a line of information displayed by RITE2V. Without going into great detail on the structure of vector characters at this point, the formulas given below show the relation between the position arguments for VCHARV and for RITE2V. In these formulas, LVW and LVH are the arguments used in CHSIZV. If CHSIZV has not been used to alter these quantities, LVW = LVH = 3.

FOR
K =  90  ILX = IX - 2*LVW 
         ILY = IY - 3*LVH 
         
K = 180  ILX = IX + 3*LVH 
         ILY = IY - 2*LVW  
         
K = 270  ILX = IX + 2*LVW 
         ILY = IY + 3*LVH
         
K =0     ILX = IX - 3*LVH 
(or 360) ILY = IY + 2*LVW

9.16 Vector Character Constructions

In a preceding section, the tables of vector characters which are available in the system were presented. This section explains how vector characters are generated and how the programmer can create additional characters to be displayed by VCHARV and RITE2V.

Vector Character Formation

Given the proper specifications, VCHARV will generate any design that can be constructed by joining points on an 8 × 8 lattice with straight lines. A coordinate system in width (W) and height (H) is used to refer to positions on the lattice. Patterns are specified by giving coordinates of the positions on the lattice that are to be connected by vectors. As shown on the diagram, the W and H coordinates each can have values from 0 to 7.

H> LVW> LVH> 7> 6> 5> 4> 3> 2> 1> 0> 0> 1> 2> 3> 4> 5> 6> 7> (ILX,ILY) W
Figure 9.5

ILX, ILY are the coordinates used by VCHARV to position the character. LVW, LVH represent the distances (expressed in raster counts) from one lattice position to an adjacent position.

9.17 Character Size

The size of a character (or other design) depends upon the amount of space between adjacent positions on the lattice. The number of raster counts between positions may be specified by calling the subprogram CHSIZV. The arguments LVW and LVH indicate the desired number of raster counts between positions in width and height, respectively. If CHSIZV is never called, the values LVW = LVH = 3 raster counts will be used.

Although it is possible to assign a value as small as 1 to LVW and/or LVH, this is not practical for the majority of characters. The upper limit depends upon the particular character, and upon the restriction that no vectors in the pattern may exceed the resultant of 63 counts in the direction W, and 63 counts in the direction H. For example, if a particular pattern requires joining a position on the bottom row of the lattice with one on the top row, the maximum permissible value of LVH is 9, since 9 (raster counts) multiplied by 7 (lattice intervals) = 63 counts.

To draw these two vectors: The maximum permissible LVW, LVH counts = 9 counts To draw these two vectors: The maximum permissible LVW, LVH counts = 63 counts
Figure 9.6

9.18 Character Orientation and Placement:VCHARV

VCHARV permits a selection of four possible orientations. It rotates a character into the selected orientation by the way in which it applies the increments LVW and LVH.

The following table shows the direction of application of LVW and LVH for the four orientations.

Orientation SelectionDirections in Which Increments are Applied
KLVWLVH
90 (Upright) Positive in XPositive in Y
180 Positive in YNegative in X
270 Negative in XNegative in Y
0 (or 360) Negative in YPositive in X

To prevent characters from overlapping the edge of the frame, the orientation and the specifications of the position coordinates (ILX, ILY) must be considered. The following table shows the restrictions upon ILX, ILY for each of the four orientations. In the table, N is one less than the number of lattice positions in width used by the character, and Mis one less than the number, in height.

KILXILY
90 (Upright) 0 ≤ ILX ≤ 1023-N*LVW0 ≤ ILY ≤ -M*LVH;
180 M*LVH ≤ ILX ≤ 1023 0 ≤ ILY ≤ -N*LVW
270 N*LVW ≤ ILX ≤ 1023 M*LVH ≤ ILY ≤ 1023
0 (or 360) 0 ≤ ILX ≤ 1023-M*LVHN*LVW ≤ ILY ≤ 1023

9.19 Pattern Specification

A pattern specifies the points on the lattice to be joined by vectors. The pattern consists of a sequence of lattice coordinates arranged in the order W1, W2, H1, H2, W3, W4, H3, H4,...etc where (W1, H1) and (W2, H2) are the coordinates of the end points of the first vector in the character, (W3, H3), and (W4, H4) are coordinates of the end points of the second vector, etc. The end of a pattern is signaled by the presence of at least 12 consecutive zero bits.

Since values of W and H will not be larger than 7, the values can be packed into computer words, alloting 3 bits per value. As many words as are needed to include all coordinates may be used. The character T appears on the lattice as follows:

7> 6> 5> 4> 3> 2> 1> 0> 0> 1> 2> 3> 4> 5> 6> 7> (ILX,ILY)
Figure 9.7

The instructions for this pattern could be read in as the single octal word:

PATRN1
0   4   6   6   2   2   0   6    0   0   0   0
W1  W2  H1  H2  W3  W4  H3  H4  (End of pattern)

The pattern for M requires more than one word. It could be read in as an octal array, with a dimension of 2, in order to appear in storage in proper FORTRAN array order.

7> 6> 5> 4> 3> 2> 1> 0> 0> 1> 2> 3> 4> 5> 6> 7> (ILX,ILY)
Figure 9.8

The instructions for this pattern, in octal are:

PATRN2
0   0   0   6   0   2   6   3   2   4   3   6
W1  W2  H1  H2  W3  W4  H3  H4  W5  W6  H5  H6
PATRN2(2)
4   4   0   6   0   0   0   0   0   0   0   0
W7  W8  H7  H8  (End of pattern)

9.20 Single Pattern for VCHARV

A special form of VCHARV allows a single pattern to be furnished as a FORTRAN array. The following call statement may be used:

      CALL VCHARV (K, NT, ILX, IL Y, 0, A, 0) 
A
A one-dimensional array in which the pattern must be stored. The fifth and seventh arguments must be zero. The remainder of the arguments are as described earlier for VCHARV.

9.21 Table Structure

If the programmer has need for a number of special characters not in the system tables, he can build a table, in the FAP language, similar to the tables in Figure 9-4. As with these tables, he must use an "F" card carrying the table name.

Since the number of words in each pattern varies, a list of entries is employed in the search for a specific character pattern. The location TABL_V + 1 must contain, in its address, the location of the list of entries. Each table is compiled as if it were a FAP subprogram for FORTRAN use. Storage is FORTRAN-array type, i.e., descending storage for the table and for each individual pattern within it. Note that each individual character ends with 12 zeros. For the statement "VFD N/M, N/M, etc, N is the number of bits allotted to M, which in turn is the quantity to be used for W (or H). (The patterns illustrated are the numeric characters 0 through 5. )

*               FAP
                COUNT     25
                ENTRY     TABL9V
                VFD       9/12.9/14,18/0
ENTR9V          VFD       9/0,9/3,9/5.9/8
                VFD       3/0,3/0,3/4,3/6,3/0.3/4,3/6,3/6,12/0
                VFD       3/4,3/4,3/1,3/3,3/4,3/3,3/3,3/4,3/3,3/0.3/4,3/4
N5              VFD       3/0,3/1,3/1,3/0,3/1,3/3,6/0,3/3,3/4,3/0,3/1
                VFD       3/0,3/4,3/2,3/2,24/0
N4              VFD       3/2,3/4,6/0,3/3,3/3,3/0,3/6,3/3,3/0,3/6,3/2
                VFD       3/3,3/1,3/6,3/6,3/1,3/0,3/6,3/5,12/0
                VFD       3/3,3/4,3/3,3/4,3/4,3/4,3/4,3/5,3/4,3/3,3/5,3/6
                VFD       3/4,3/4,3/1,3/2,3/4,3/3,3/2,3/3,3/3,3/2,3/3,3/3
N3              VFD       3/0,3/1,3/1,3/0,3/1,3/3,6/0,3/3,3/4,3/0,3/1
                PZE       0
                VFD       3/4,3/4,3/5,3/4,3/4,3/0,3/4,3/0,3/0,3/4,6/0
N2              VFD       3/0,3/1,3/5,3/6,3/1,3/3,3/6,3/6,3/3,3/4,3/6,3/5
                PZE       0
N1              VFD       3/1,3/3,6/0,3/2,3/2,3/0,3/6,3/1,3/2,3/5,3/6
                VFD       3/3,3/2,3/0,3/0,3/2,3/1,3/0,3/1,12/0
                VFD       3/3,3/4,3/6,3/5,3/4,3/4,3/5,3/1,3/4,3/3,3/1,3/0
TABL9V          VFD       3/1,3/1,3/1,3/5,3/1,3/2,3/5,3/6,3/2,3/3,3/6,3/6
                PZE       ENTR9V
                END       

9.22 Character Orientation and Placement: RITE2V

If only one character is to be displayed, VCHARV is suitable, but for several characters, RITE2V can be employed more easily. Since RITE2V uses VCHARV to generate characters, much of the preceding discussion applies. However, unlike VCHARV, which uses the lower left corner of the lattice as its position reference point, RITE2V uses the center of the 5 × 7 portion of the 8 × 8 lattice.

The following diagrams show the relation between the character lattice as it is used in RITE2V and in VCHARV. The 5 × 7 lattice is shown superimposed upon the maximum 8 × 8 lattice. The asterisk indicates the reference point (IX,IY) as used by RITE2V, while the X indicates the reference point (ILX,ILY) as used by VCHARV.

K = 90 K = 0 or 360 K = 180 K = 270
Figure 9.9

Since the center is used as the character reference point by RITE2V, and since a 5 × 7 lattice is normally used, the restrictions upon the position coordinates differ slightly from those shown in the table for VCHARV. The restrictions are:

KIXIY
90 (Upright) 2*LVW ≤ IX ≤ 1023-2*LVW 3*LVH ≤ IY ≤ 1023-3*LVH
180 3*LVH ≤ IX ≤ 1023-3*LVH 2*LVW ≤ IY ≤ 1023-2*LVW
270 2*LVW ≤ IX ≤ 1023-2*LVW 3*LVH ≤ IY ≤ 1023-3*LVH
0 (or 360) 3*LVH ≤ IX ≤ 1023-3*LVH 2*LVW ≤ IY ≤ 1023-2*LVW

(One more LVH increment must be considered for the $ sign.)

The character space size and row size to be used by RITE2V depend upon the character size and the space required to prevent overlapping of characters. Since the characters in the tables normally used by RITE2V are based on a 5 × 7 lattice, the character size is, usually, 4*LVW by 6*LVH. (For the $ sign, it is 4*LVW by 7*LVH.) Also, since LVW=LVH=3, the character size is 12 by 18, unless changed by CHSIZV. The standard quantities ISPACE and IROW used by RITE2V are l8 and 24, respectively, allowing sufficient space to prevent overlapping of characters.

The description of RITSTV shows how the programmer may redefine ISPACE, IROW, and also may name a table other than TABL1V which is normally used. The table named may be one of the alternate ones provided by the system or one of the programmer's own design.

9.23 Single Pattern for RITE2V

An alternate form of RITSTV allows the programmer to furnish a single character pattern in an array. The call statement is:

      CALL RITSTV (ISPACE, IROW, A, 0) 
A
A FORTRAN array in which the programmer has stored one character pattern. "A" must not be named on an "F" card.

The last argument must be zero, to indicate to the subprogram that A is not a table. ISPACE and IROW are as defined as before.

VCHARV can also be employed to generate a single character from a pattern supplied as an array. Although VCHARV is more economical of machine time, the programmer may find it less awkward to use RITSTV to insert a character into printed information being written by RITE2V.

10. SPECIAL PRINTING

10.1 Line Printer Simulation on the S-C 4020: SCOUTV

Line printing can be simulated on the S-C 4020 by means of the SCOUTV system. Whenever the statement

      CALL SCOUTV 

appears in the program, any WRITE OUTPUT TAPE N statement, where N is the currently designated S-C 4020 output tape, will be recognized as a command to produce printed output on the S-C 4020. Any other number for N will produce standard output for the regular system. The output will be determined by the list of the WRITE OUTPUT TAPE statement and the associated FORMAT statement; S-C 4020 output will be returned instead of output from the printer.

One natural application of the SCOUTV mode is the production of printed output on film for long-term storage, making it unnecessary to keep large stacks of printed paper. The use of SCOUTV as a printer simulator is discussed on the following pages. Another application is the combination of plotting and printing on one film frame.

10.2 Basic Specifications

The following list explains most of the differences and likenesses that prevail between ordinary printing and SCOUTV printing, when there have been no programmed alterations to change the normal SCOUTV output.

  1. The camera must have been selected by a CALL CAMRAV (N) statement.
  2. A CALL SCOUTV statement is necessary to make printer simulation effective. The SCOUTV mode will not carry over from one Chain link to the next; hence a new CALL SCOUTV statement is necessary in each link.
  3. The first character of each BCD unit record is recognized as a carriage control character, as follows:
    +      No space before printing.
    
    Blank  Single space before printing.
    
    0      Double space before printing. 
    
    -      Triple space before printing.
    
    1      Frame advance (equivalent to sheet eject). 
    
    4      Four spaces before printing. (This is not an exact 
           equivalent of standard printer output.) 
    
    8      Skip to the bottom line on the frame.
    
    An incorrect carriage control character is much more critical on the S-C 4020 than on a standard printer. The S-C 4020 operator cannot override the action of these characters. Non-standard characters, or loops involving 1 or 8 can cause great waste of film.
  4. The position of print line 1 will be on the Y raster coordinate that is 23 counts from the top of the frame.
  5. In the basic SCOUTV mode, it is usually desirable to advance the film as you would eject a sheet of paper, by a carriage control character 1. The first information to be printed on the new frame will then start on print line 1. This is also true if the frame is changed as a result of the line count being exceeded.
  6. If the frame is changed by a CALL FRAMEV, the first carriage control character of the first FORMAT statement will affect the position of the information to be displayed in one of the following ways:
  7. Although the S-C 4020 printing will correspond line-for-line and page-for-page with printer output, the proportions of length-to-width will not be the same. This is illustrated by the SCOUTV examples on subsequent pages.
  8. The spacing between lines is not governed by the typewriter mode; each new line will be started 23 raster counts below the previous line, which is more generous than the spacing provided by the typewriter mode.
  9. There are 44 lines permitted per page. An attempt to write beyond the 44th line will cause the film to be advanced. Printing will continue on the new frame; the first line will be 23 raster counts from the top. The carriage control character for that line will have no effect, just as in printed output.

Figures 10-1 and Figures 10-2 show an exercise in the use of SCOUTV printer simulation, demonstrating some of the carriage controls, Hollerith character printing, integer, fixed, and floating point output, etc. Part of the exercise is a line count, including a count of lines skipped. Note that when a line count of 44 was exceeded, a new frame was begun.

CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 1 1.45 0.14*01 CARRIAGE CONTROL CHARACTER IS 9 THIS IS LINE 3 3.45 0.34*01 CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 6 6.45 0.64*01 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 10 10.45 0.10*02 CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 11 11.45 0.11*02 CARRIAGE CONTROL CHARACTER IS 0 THIS IS LINE 13 13.45 0.13*02 CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 16 16.45 0.16*02 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 20 20.45 0.20*02 CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 21 21.45 0.21*02 CARRIAGE CONTROL CHARACTER IS 0 THIS IS LINE 23 23.45 0.23*02 CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 26 26.45 0.26*02 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 30 30.45 0.30*02 CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 31 31.45 0.31*02 CARRIAGE CONTROL CHARACTER IS 0 THIS IS LINE 33 33.45 0.33*02 CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 36 36.45 0.36*02 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 40 40.45 0.40*02 CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 41 41.45 0.41*02 CARRIAGE CONTROL CHARACTER IS 0 THIS IS LINE 43 43.45 0.43*02
Figure 10.1
CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 46 46.45 0.46*02 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 50 50.45 0.50*02
Figure 10.2

10.3 SCOUTV Variations

The basic SCOUTV system treats a frame as if it were segmented into 44 print lines, starting on the 23rd raster count from the top of the frame and ending on the 1012th raster count from the top. Each print line is 23 raster counts deep. Printing begins on the first print line, and each line starts on the 24th raster count from the left of the frame.

The following discussion explains how these basic specifications can be altered in a number of ways.

Altering the Starting Line

Printing may be started on a print line other than the first by using the statement:

      CALL SCOUTV (LINE1) 
LINE1
An integer which specifies the print line on which the next printing in the SCOUTV mode will begin.

For example, if the statement CALL SCOUTV(5) is used, the next WRITE OUTPUT TAPE statement will place printing on the 5th print line (the raster position that is 5+23 counts from the top of the frame). The carriage control character (even the 1 for eject) will be ignored for that line.

For LINE1 to be in force, this statement must be executed in advance of the associated WRITE OUTPUT TAPE statement.

If no other alterations are made, LINE1 may have any value from 1 to 44, and the maximum number of lines of printing will be (45 - LINE1).

Since LINE1 will be effective only for one frame, CALL SCOUTV (LINE1) should be restated if printing is to start on the named LINE1 on the next frame.

Altering the Starting Line and Line Spacing Increments

Further alteration of the basic SCOUTV specifications may be made by using the statement:

      CALL SCOUTV (LINE1, INC) 
LINE1
An integer which specifies the print line on which the next printing in the SCOUTV mode will begin. The actual position of the first line on the frame will depend upon the value of the second argument, INC.
INC
An increment of line spacing. The frame will be considered to be segmented into print lines that are INC raster counts deep. The maximum number of print lines will be 1012/INC, since the basic limit for the bottom line is 1012 raster counts below the top of the frame.

The standard LINE1 and INC for SCOUTV are reset by a CALL SCOUTV (1,23).

The carriage control character for the first line of information to be printed following this call statement will be ignored. (Note that this also applies to the character for eject.) Therefore, printing will start on the raster coordinate that is LINE1*INC raster counts from the top of the frame.

INC will remain in effect for subsequent SCOUTV mode printing in the program until altered by another CALL SCOUTV (LINE1,INC).

For LINE1 or INC to be effective, the CALL SCOUTV (LINE1,INC) statement must be executed before the associated WRITE OUTPUT TAPE statement.

Figures 10-3 illustrates the use of SCOUTV with arguments that alter the basic specifications. Note the use of INC=16, which caused the lines to be closer than normal, enabling the same 50 lines shown on Figures 10-1 and Figures 10-2 to be printed on one frame. Since LINE1=4 and INC=16, the first line displayed is actually 416 raster counts below the top of the frame.

CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 1 1.45 0.14*01 CARRIAGE CONTROL CHARACTER IS 9 THIS IS LINE 3 3.45 0.34*01 CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 6 6.45 0.64*01 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 10 10.45 0.10*02 CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 11 11.45 0.11*02 CARRIAGE CONTROL CHARACTER IS 0 THIS IS LINE 13 13.45 0.13*02 CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 16 16.45 0.16*02 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 20 20.45 0.20*02 CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 21 21.45 0.21*02 CARRIAGE CONTROL CHARACTER IS 0 THIS IS LINE 23 23.45 0.23*02 CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 26 26.45 0.26*02 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 30 30.45 0.30*02 CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 31 31.45 0.31*02 CARRIAGE CONTROL CHARACTER IS 0 THIS IS LINE 33 33.45 0.33*02 CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 36 36.45 0.36*02 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 40 40.45 0.40*02 CARRIAGE CONTROL CHARACTER IS BLANK THIS IS LINE 41 41.45 0.41*02 CARRIAGE CONTROL CHARACTER IS 0 THIS IS LINE 43 43.45 0.43*02 CARRIAGE CONTROL CHARACTER IS - THIS IS LINE 46 46.45 0.46*02 CARRIAGE CONTROL CHARACTER IS 4 THIS IS LINE 50 50.45 0.50*02
Figure 10.3

10.4 Precise Control of Raster Positions for SCOUTV Printing: LOCSTV

In the preceding discussion, SCOUTV was presented as a means for simulating printer output on the S-C 4020. For such simulation, vertical positioning is controlled by a line count and the increment between lines. Lateral positioning is dependent upon the built-in left margin and the number of character spaces provided by the associated FORMAT statement.

The range of SGOUTV applications has been greatly extended by means of routines which permit precise control of raster positions, with the printing still under FORMAT control. Two routines, LOCSTV and LOCSAV, which permit setting and retrieval of raster positions, add the following capabilities to the SCOUTV system:

  1. Printing can be done below IY=11. (The basic SCOUTV does not permit writing below the 1012th raster position, counted from the top of the frame.)
  2. Printing can be done to the left of IX=24. (This area is inaccessible to the basic SCOUTV system, which uses a fixed left margin of IX = 24.)
  3. Printing can be started at a point which is independent of a line count, line increment, or number of character spaces. (For the basic system, which simulates line printing, printing can only be positioned in units of character widths and of print line depth.)

The LOCSTV provides these facilities by means of the call statement:

      CALL LOCSTV (IX, IY, IB) 
IX
The X-raster position to be used as the starting point of the next line of printing. Stated in another way, IX is the new left margin, which will be effective for subsequent lines and frames until another CALL LOCSTV is encountered.
The programmer must ensure that information to be printed on subsequent lines can be accommodated between IX and the right edge of the frame. IX should be specified such that 1023-IX=8* (number of characters in the line to be printed).
IY
A Y-raster position counted from the BOTTOM of the frame, to be used as a reference for subsequent lines of printing. Since the position IX, IY will be referenced as if it were the starting point of the previous line of printing, the next line will start at IX, IY only if the carriage control character + (to suppress spacing) is used.
The position of subsequent lines of SCOUTV mode printing relative to IY will depend upon the carriage control characters used and upon the value of the current line increment, INC
IY is effective only for subsequent lines on the same frame. It will be changed (reset to the top of the frame) if the frame is advanced, or if one of the forms of CALL SCOUTV intervenes between a CALL LOCSTV and the affected WRITE OUTPUT TAPE statement.
IB
Limit below which printing will not take place, expressed in raster counts from the BOTTOM of the frame. It will be effective for subsequent lines and frames until another CALL LOCSTV is encountered.

To return these indicators to the basic SCOUTV specifications, use CALL LOCSTV (24,1000, 11).

Note particularly that, unlike IX and IB, the IY reference point will not carry over from frame to frame, nor will it survive execution of a CALL SCOUTV, If the IY reference is to be used on a new frame, the CALL LOCSTV statement should be repeated.

One use of LOCSTV is illustrated in Figures 10-4.

EXERCISE IN THE USE OF LOCSTV WITH SCOUTV IN SPECIAL PRINTING APPLICATIONS ENGINEERJ. MATTEL DEPT.-GROUP282-072 EXT.2651 JOB. NO.230-30 PROJECTSABRE - SUB PARTPERISCOPE MATERIALPLASTIC MODEL NO.C 8 IN TEST NO.33T DATE10/ 5 7125.007488.457870.438271.908693.85 7196.257563.337949.148354.628780.79 7268.217636.968028.638438.178668.60 7340.897715.358108.918522.558957.29 7414.307792.518190.008607.789046.86
Figure 10.4

An illustration of how SCOUTV mode printing can be combined with a graph is shown in Figures 10-5. That example also illustrates another way to print tabular data using SCOUTV and LOCSTV.

GRAPH AND INFORMATION COMBINED ON ONE FRAME NOTE: THIS EXERCISE SHOWS FURTHER WAYS IN WHICH SCOUTV PRINTING AND LOCSTV CAN BE USED 12000 8000 7200 0 5. 10. 15. 20. 25. 30. Y = 8190.00 at X = 15.5 7125.007488.457870.438271.908693.85 7196.257563.337949.148354.628780.79 7268.217636.968028.638438.178668.60 7340.897715.358108.918522.558957.29 7414.307792.518190.008607.789046.86
Figure 10.5

10.5 Preservation (or Retrieval) of Raster Positions Used by SCOUTV: LOCSAV

The raster coordinates of the starting point of the line most recently printed in the SCOUTV mode can be stored in ISX, ISY by using the statement:

      CALL LOCSAV (ISX, ISY) 

The programmer can use this information to relate other types of S-C 4020 output to the location of the last line of print.

LOCSAV will also aid in a special situation that occurs with interrupted printing. If SCOUTV printing is interrupted on one camera in order to display one or more frames on the alternate camera, the SCOUTV printing and film advance for the alternate camera will alter the line reference information. On return to the original frame on the first camera, the programmer will be unable to resume SCOUTV printing at the next line unless he uses LOCSAV and LOCSTV. The following sequence shows the procedure that might be utilized.

      CALL SCOUTV 
      .
      .
      .
     CALL CAMRAV (35) 
     CALL FRAMEV 
     .
     .
     Write a portion of this 35mm frame, 
     using the appropriate WRITE OUTPUT TAPE 
     and FORMAT statements. 
      .
      .
      CALL LOCSAV (M1X, M1Y) 
      CALL CAMRAV (9) 
      CALL FRAMEV 
      .
      .
     Write one or more frames on the 9-inch camera, 
     using the appropriate WRITE OUTPUT TAPE and 
     FORMAT statements. 
      .
      .
      CALL LOCSTV (M1X, M1Y, 11) 
      CALL CAMRAV (35) 
      .
      .
      Continue writing on 35mm film as if no 
      interruption had taken place. 

INDEX OF SUBROUTINES

APLOTV
APRNTV
BIGV
BNBCDV
BRITEV
CAMRAV
CHSIZV
DOTLNV
DXDYV
ERMRKV
FAINTV
FORMV
FRAMEV
FRMNOV
GRID1V
HOLDIV
HOLDOV
HOLLV
INCRV
IXV
IYV
KWKPLT
LABLV
LINEV
LINE2V
LINRV
LOCSAV
LOCSTV
MSXYV
NOFRV
NONLNV
NXV
NYV
PLOT..
(PLOT)
PLOTV
PLTND
POINTV
PRINTV
RESCLV
RESETV
RITE2V
RITSTV
RITXYV
SCERRV
SCLSAV
SCOUTV
SERSAV
SERREV
SETCIV
SETCOV
SETMIV
SETMOV
SMALLV
SMXYV
STOPTV
TABL_V
TAB_V
TPNUMV
UXV
UYV
VCHARV
XAXISV
XMODV
XSCALV
YAXISV
YMODV
YSCALV