My aim, in this paper, is to give my interpretation of the Fortran routines. This information has been acquired by a study of the listing of VTPRIM that I obtained at Maynard in August. It is not complete but presumably is as much as was written at the time. The Draft Manual and the listing do not always agree.
There are to different types of display file defined in the manual. These are the main file and the sub file. The manual implies that there is a close correspondence between the two files. In fact both files have an identical format. The difference only appears in the way they are used. The basic structure of a display file is given in Fig. 1. The file is headed by two words that are not display instructions. The first, F0, contains the length of the display file less one. The second word, F1, contains the address of the next display instruction to be executed after this display file. The file is concluded by a DJMP indirect to the address contained in F1. All instructions between F1 and the DJMP are display orders for generating lines, points and text on the screen.
In order that a file should be a main file, the file must be executed continuously. As soon as the file has been executed, it is necessary to circle back and execute the file again. This is easily done by having the address F2 in the word F1 as shown in Fig. 2.
To make any file the main file all that is necessary is to store the address of F2 in F1 and start the display processor executing at F2. A sub file is executed by jumping to it from the main file or another sub file using the DJMS instruction. The DJMS instruction plants the return address in the location specified and starts executing at the next order. Consequently the instruction:-
DJMS F1
will execute the display file given in Fig. 1 as a sub file. Note that the same file can act equally well as a main file and a subfile. Of course only a single file can be a main file at any one time. Fig. 3 indicates how three files F, R and S are linked together. If F is defined as the main file then all three will be displayed while if R is specified as the main file only R and S will be displayed.
The package provides routines for defining either a main file or a sub file and subsequently adding further instructions to the end of it. Although the format of the two types of file is the same, the action required on altering the file could be different. The basic problem is that the updating of the file is done by the PDP15 processor while the VT15 processor is executing the file. Care must be taken that the VT15 processor does not execute a file which is malformed due to the PDP15 processor being in the middle of updating it. In the package, the main file is updated by turning the display off before updating it. Once this has been done, the display is started again.
It is not obvious that a subfile is being displayed. Consequently it would presumably to too drastic an action to turn the display off. Instead. the DJMP* instruction is moved to instruction position F2 in Fig. 1 and the display order usually in this position is saved in a temporary Store. The file is then updated and, on completion, the DJMP" is returned to its usual position. During the updating, the subfile will turn into a null file and so will disappear from the screen. Once completed, the display will reappear. Presumably the time of the complete operation will be so short as not to be noticeable.
The standard routines provided for adding drawing commands to the end of a main file or a subfile are as follows:-
SUBFILE MAIN FILE LINE (DX, DY, IT, PNAME) PLOT (1, DX, DY, IT, GNAME) TEXT (STR, PNAME) PLOT (3, STR, CNAME) COPY (RST, PNAME1, PNAME) PLOT (0, RET, PNAME1, CNAME) GRAPH (DTA, N, A, PNAME) PRAMTR (FEATR, VALUE, PNAME) PLOT (3,FEATR, VALUE, CNAME)
The ordering given here is the MODE ordering used in the routine INIT. Notice that this is a different ordering from the one used in the first argument of PLOT. This is typical of the rather inelegant code used in the package. One point to note is that it is not possible to generate a call equivalent to GRAPH in the Main File. This seems absurd especially as you can force a call in the main file by defining it initially as a subfile. Similarly the procedure
SETPT (X, Y, CNAME)
has no equivalent routine to define an absolute display position in the subfile. This is less necessary but there may well be occasions where it is required. It is obvious to me that there should be a complete set of orders for generating both a main file and a subfile. The two are interchangeable so there is no reason why this absurd situation should exist.
The last argument in both sets of routines is optional. In the subfile routines, the argument NAME is the address of the first instruction in the subfile to which these display commands are to be added. If it is not present then it is assumed that the subfile to be used is the one that was last used. As there is only one main file, it is unnecessary to specify the address of the file. However editing commands are available for the main file (REPLOT and DELETE) and the argument CNAME returns the address and length of the display orders compiled for this routine call. This allows an editing routine to determine the length of the space available.
Again there is minor and unnatural differences between the facilities provided. It would seem natural, for example, to always
**********Rest of file missing**************