We have been using the basic graphics routines VTPRIM supplied by DEC for a year in spite of criticisms of it (SPROGS papers 1 and 4 and various unrecorded remarks). Small changes have been made in this time to improve the way it functions, but no change has been made to its appearance to the programmer.
After discussion of future SPROGS software for the PDP15, it is apparent that it needs to be rewritten. The operations on display files is unnecessarily restrictive and some new display items would be an improvement.
The paper outlines the modifications proposed. Any comments on them should be communicated to Wade Shaw or myself by Tuesday, 6 June, as we want the package ready in a short time.
Page references (eg p3-2) are to the Graphic 15 Programming Manual.
Suggestions:-
FOG15 - Fortran Graphics on the PDP15 VAT15 VTPRAM - since it does bear a resemblance to VTPRIM
Any others ?
Instead of main files and subpictures, we will normally just refer to display files. A display file can be built or edited whether or not it is a main picture (a file that is being displayed and is not called by any other file; there can only be one main picture at any moment, therefore).
The format is the same as VTPRIM, ie
word 1 Length n word 2 What afterwards? - address of word 3 if a main picture, otherwise return address word 3 1st display order ....... ........ word n+1 Jump to location in word 2 or else it is empty: word 1 0
A file is built up in a FORTRAN integer array and is named by the first array element in the file - referred to below as 'fileid'.
The file 'fileid' is to be the main picture. The VT15 begins processing at the beginning of this file.
If the location 'fileid' = 0, then the file is taken to be a new file. An initializing parameter-setting command is included as in VTPRIM.
If fileid= -1, this means apply DINIT to the file most recently DCHOOS'd.
All subsequent file-building routines (see section 4) are to be taken to refer the file 'fileid' until another call to DCHOOS is made. DINIT does not affect this choice, it merely selects which display file is to be displayed.
It should be noted that none of the file-building routines have a 'pname' type argument.
Note that to update and display a file, calls must be made to both DINIT and DCHOOS; they are entirely separate operations.
Special value of argument is -1. This means choose the file most recently DINIT'ed.
The general form of a display file building routine is as follows:-
CALL routine-name (list of necessary arguments [,CNAME ])
where[] enclose an optional argument.
CNAME has the same function as it has in the routine PLOT in VTPRIM. In the file-building routines outlined below, CNAME is omitted.
(1) LINE (dX, dY, 0 for invisible or 1 for visible) ---as VTPRIM
(2) TEXT (string, length or 0 if no altmode to be added) ---as VTPRIM
(3) SYMB (character code) --- plots the symbol specified at the current point using the single character display instruction.
(4) GRAPH (array, number, which axis) --- as VTPRIM if CNAME not used. If CNAME is used, the length bits (top 3 bits) (see p 3-2) have the value 5. When an editing routine is to insert a new display item, the number of locations it makes available is the number of consecutive GX's or GY's it finds. The number of locations occupied by a GRAPH item is 'number', the 2nd argument.
(5) SETPT (X,Y)--- as VTPRIM except that negative X results in the beam moving only along the Y-axis and vice versa; more succinctly, SETPT produces a POINT display order corresponding to each positive argument.
(6) DOT (X,Y)--- as for SETPT except that a visible spot is plotted at the final resting place of the beam.
(7) CALL (save/restore, fileid)--- as COPY in VTPRIM.
(8) PRAMT (which features present?, list of feature values )---as PRAMTR in VTPRIM. The name PRAMTR may be retained as an alternative.
(9) STOP--- a display-processor-stop is inserted in the display file. A flag is raised which can be read by a modified form of LTORPB.
Routines, which function like REPLOT, will be provided. They will, of course, act on the currently chosen (by DCHOOS) display file. Their form will be:-
CALL routine-name (list-of-arguments, CNAME)
The 'routine-name' can be any of the names in section 4 with an R prefixed. For instance:
CALL RLINE (100, 200, 1, I(1)) or CALL RPRAMT (1+2, 0, 3, ICNAM)
Like REPLOT, all 9 subprograms can be logical functions.
There are two points to be noted.
(a) It is now possible to replace a GRAPH item, which was never possible in VTPRIM. A GRAPH item could be any length, notably greater than 7; this makes straightforward use of CNAME impossible. The convention is described in section 4.
(b) As far as possible, the R subprograms will replace one item by another without causing the display file to be started from the beginning. The VT15 will be turned off and the current display address noted. When the change is complete, the VT15 will be started from the current display address. The display file will be started from the beginning only if the current display address refers to one of the orders being replaced or if one of the orders being replaced is a DJMS*. This is to avoid a temporarily corrupt display file.
A possibly confusing consequence of this is that when a programmer writes a routine call, he may not know when it is actually used whether it will cause a display restart or not.
The routine DELETE works as before. When replacing a GRAPH item (see section 3), all the consecutive GX's (or consecutive GY's) are replaced by DNOP's.
If some error is discovered, then a routine VTERR is called. VTERR takes one integer argument which on entry represents the type of error. It is possible for a user to supply his own VTERR. The default VTERR simply types ?VTERRnn and returns to VTPRIM.
LTORPB will search for STOP flag as well as light pen hit and pushbutton hit. It will return IWICH = 3 if a stop flag is found.
Graphic 15 programming manual (the DEC manual on VTPRIM)
Sprogs papers 1 and 4 on VTPRIM.