A number of new output devices are available in SPROGS. The appropriate DVOUT settings (*2.4) are:
64.0 = Tektronix storage tube 128.0 = User-defined device 256.0 = User-defined device 512.0 = Hewlett-Packard pen plotter
As before, it is possible to select more than one device at a time.
The Tektronix 4010 is a storage tube display that can be connected to MOP either by a Teletype line (at 110 bits per second) or a faster, 1200 bits per second, line. Anything written on the screen remains there until the whole screen is erased (either by program or by the PAGE button). Jobs which generate output for the Tektronix must assign an ALLCHAR file to output channel TP0, for example:
#TP0 MYFILE(ALLCHAR)
SPROGS will send the appropriate data to the file, beginning with a clear screen command, and sufficient null characters to allow the screen to settle before anything is drawn. On encountering an ADVFLM, the system will output two asterisks at the top left-hand corner of the screen, and continue with the next frame. No more clear screen commands will be issued. The basic screen size is 1023 by 780.
When the job has run, the picture can be drawn by logging in at a Tektronix, and listing the file:
LISTFILE MYFILE
If the file contains more than one frame of output, the frames will be superimposed. The macro FRSPLIT can be used to separate frames into distinct files, which can then be listed individually:
FRSPLIT INTK MYFILE,OUT ONEFRAME,FRAMES 20
will provide 20 separate files ONEFRAME(1/FRME) to ONEFRAME(20/FRME), each of which can then be listed. These files should be erased when no longer required to avoid large numbers of useless files in the filestore.
The Tektronix also has some cross-hairs, which can be positioned by the user, and whose coordinates can be read by program. This, however, entails having an on-line core image, which involves making a special request to Operations Branch. The routine:
TKREAD(CH,X,Y)
this will cause the cross-hairs to illuminate. These can be positioned by thumb-wheels. On pressing any character followed by ACCEPT (CTRL-SHFT-K on the Tektronix), the routine will return the SPROGS character number (CH) and the X,Y coordinates of the cross-hairs. The user program is halted during this action.
It is possible to save a basic file of Tektronix orders (*4.7) for later use. Thus:
STSAV(ANAME('FRED'),64.0) orders FISAV
can be used. When FRED is drawn, the contents of the file are copied directly to the output device.
The Hewlett-Packard plotter is a small pen plotter which can be run on a 110 bits per second Teletype line. It is connected to the line, together with a Teletype, and ignores all characters until the sequence:
PLTL
is received. It then expects strings of X,Y coordinates until the sequence:
PLTT
There are 4 coloured pens available. It is, however, a very slow device, and complicated pictures should be avoided.
To generate output, the user must define OUTPUT 99 in his Program Description Segment. This means that he cannot make use of the standard SPROGS default (*A12) and should include the other required statements in his own Program Description Segment. Output 99 should be linked to a LP channel and a suitable file assigned:
OUTPUT 99 = LP3 #LP3 MYFILE
This file is a normal GRAPHIC file.
When the job has finished, the user can draw the picture by listing the file at a terminal to which the plotter has been attached:
LISTFILE MYFILE
On encountering an ADVFLM, the system will output the message:
PLTT ** ADVANCE FRAME PLTL
and continue with the next frame. If the colour routines are used, then, on change of colour, the system will output the message:
PLTT ** COLOUR N PLTL
where N is the colour number,Listing a file with many frames or colour will cause the messages to be printed at the terminal, but all pictures will be superimposed. The macro FRSPLIT can be used to split the file into a number of separate files, each of which will hold a separate frame or a separate colour section:
FRSPLIT INHP MYFILE,OUT ONEFRAME,FRAMES 20
The first line in a separated file will contain either the colour message or the advance frame message. It is then possible to change the pen or the paper before listing such a file.
The basic addressable raster is 9999 by 9999. However, the felt pens do not provide great precision. Also, there are no built-in hardware characters, so PLOT has no effect.
Some dummy routines have been provided so that a user can drive his own devices. DVOUT settings 128 and 256 will select one of these sets. The user must provide the following routines:
128 256 NW8ST NW9ST initialise device, called from DVOUT NW8ADV NW9ADV advance frame, called from ADVFLM NW8FIN NW9FIN close device, called from ENDSPR NW8VEC (X1,Y1,X2,Y2,INT,IC) draw line from (X1,Y1) to (X2,Y2) with intensity INT and colour IC. NW9VEC (X1,Y1,X2,Y2,INT,IC) called from TODXY NW8CH (X,Y,ICH,INT,IC) plot character whose SPROGS number NW9CH (X,Y,ICH,INT,IC) is ICH at (X,Y), with intensity INT and colour IC, called from PLOT.
If, however, the device does not require initialising, the user need not supply a NW8ST routine. In all cases, if no routine is supplied by the user, the system will insert a dummy routine.
Various routines have been defined to set up regions and select devices (*2.8). These have been standardised and new ones added. In each case, region 1 is set up and selected with limits (0,0,1023,1023), and region 0 is set as the base region for the particular device. In the case of the Tektronix, a square area on the right of the screen is selected, rather than the whole rectangular area.
SDHARD Device 1, SD4020 hardcopy (0,1023,1023,0) region 0 SDFILM Device 2, SD4020 microfilm
The above two have not had their definition altered.
LPGRAF Device 8, Lineprinter graphical (0,0,119,119) region 0 TKTRON Device 64, Tektronix (224,0,1023,779) region 0 HPACK Device 512, Hewlett-Packard (0,0,9999,9999) region 0
The following routines also set region 2.
LPHARD Device 1 and device 8 LPFILM Device 2 and device 8
If any of these routines are used at the start of a program, it is no longer necessary to call STSPR.
Using LIMIT after any of these will provide the user with his own coordinate system over the whole screen area.
In order to ease the job of remembering the device number settings, various one-word COMMON blocks have been initialised and can be accessed by the user. These values can then be used in:
DVOUT (*2.4) RGPRM (*2.4) STSAV (*4.7)
The COMMON block names are:
SDM SD4020 microfilm 1.0 SDK SD4020 hardcopy 2.0 XLPG Lineprinter graphical 8.0 XLP Lineprinter 16.0 SDHM Both SD4020 cameras 32.0 TK Tektronix 64.0 OWN8 User-defined 128.0 OWN9 User-defined 256.0 HP Hewlett-Packard 512.0
and can be included in the user program, for example:
COMMON/TK/TK .... CALL DVOUT(TK)
Normally, all the device routines will be loaded with a program, even if they are not used. In order to save space, it is possible to prevent the inclusion of those routines which are not used. The dummy routines are defined in (*10.7), but more have now been added. The full set is:
NOSD NOLPG NOLP NOTK NONEW NOHP
Calling any of these will remove routines for SD4020, lineprinter graphical, lineprinter, Tektronix, user-defined output and Hewlett-Packard respectively.
The current standard frame size for Lineprinter graphical is 120 by 120, suitable for lineprinter paper. However, it is possible to decrease this frame size by:
LPGSZE(X)
Setting:
LPGSZE(70.0)
for example, and setting up the base region limits as (0,0,69,69), would produce a file suitable for direct listing at a Teletype.
Although the region scissoring can correctly keep the width in bounds, failure to use LPGSZE would result in 120 lines always being printed, even if most were blank.
These two routines previously only operated if SD4020 was selected (*10.4). This restriction has now been lifted in preparation for the FR80.
The arguments to this routine have been altered to allow for the more varied I/O streams available (*A4). The specification of this routine now is:
SETIO(XC,XV) Reset the IO stream number used by facility XC to XV. XC = 1.0 File listing 2.0 Errors 3.0 Tracing 4.0 Lineprinter output 5.0 SD4020 operator output 6.0 SD4020 user output 7.0 Hewlett-Packard pen plotter output
Thus:
SETIO(7.0,5.0)
would change the Hewlett-Packard pen plotter stream from 99 to 5. Any new streams used must be connected to a channel in the user's Program Description Segment.