The VT15 Graphic Display Device Handler provides an interface between the user and the hardware. In general, it conforms to the conventions of the Keyboard Monitor System, as described in DEC manual Monitors, ADVANCED Software System. Input or output functions are initiated by standard user program commands and all display interrupt management is done automatically by the handler. The primary goals of the device handler are to relieve the user from writing his own device handling subprograms and to centralize all direct communication between the PDF 15 and the display processor. To start up a display, the user generates a display file consisting of display commands then calls the device handler to start it running. To interact with it, the device handler is used to read display controller registers and to dispatch on appropriate interrupts.
The macro .INIT causes the display to be initialised and must be given before any other I/O macro to the display is issued. The display is initialised according to four words of standard settings contained in the handler. The user may substitute his own settings for any of these.
The Device Handler is connected to the Monitor Interrupt system (PIC or API) in the same manner as other system device handlers.
The form is:
.INIT A, F, R A = Device Assignment Table (.DAT) slot number F = initialization flag 0 use standard display initialization 1 user's initialization is pointed to by R R = optional pointer to user's initialization settings If F = 1, R points to a word containing initial settings. If F = 0 and R = 1, clearing the READ BUSY switch is the only action taken by the handler. The expansion is: LOC CAL + F(7-8) + A(9-I7) LOC+1 1 LOC+2 R
The normal settings are:
Initialisation IOT
SIC (703024) Set Initial Conditions - SIC sets up a number of status registers in the display. The instruction enables five display flags onto the Interrupt Line. The IOT is issued with settings loaded in the AC in the following format:
0 Sets the Stop Flag Interrupt Enable Flop 1 Sets the LP Flag Interrupt Enable Flop 2 Sets the Edge Flag Interrupt Enable Flop 3 Sets the PB Hit Interrupt Enable Flop 4 Sets External Stop Interrupt Enable Flop 5 Clears Stop Flag 6 Clears LP Flag 7 Clears Edge Flag 8 Clears PB Flag 9 Clears External Stop Flag 10 Allow a Change in Virtual Paper Size 11 New Virtual Paper Size 12 New Virtual Paper Size Bits 11 and 12 (New Paper Size) 00 9.5 inch (10 bits) 1024 raster units 01 10 inch (10 bits) 2048 raster units 10 28.4 inch (10 bits) 3072 raster units 11 38 inch (12 bits) 4096 raster units
The .READ macro is used for input to the user program from the hardware registers of the. display controller. The user may select standard groups of registers to be read, in response to each possible display interrupt flag, or he may indicate his own group of flags and registers. This is done with an optional descriptive word following the .READ macro, the first five bits of that word indicate which interrupts are of interest and the next nine indicate the registers to read if any of those interrupts are set.
The form is:
.READ A, M, L, W NSTD
where NSTD = optional word describing non-standard groups. The variables A = .DAT slot number, M = type of read:
0 = READ,PB,XP,YP,S1,S2 Read now, no interrupts 1 = READ,PB,XP,YP,DPC,S1,S2,NR If stop flag interrupt flag is set 2 = READ,FB,XP,YP,DPC,S1,S2,NR If pushbutton interrupt flag is set 3 = READ,PB,XP,YPSDPC,S1,S2,NR If lightpen interrupt flag is set 4 = READ,PB,XP,YP,DPC,S1,S2,NR If edge flag interrupt flag is set 5 = READ,PB,XP,YP,DPC,S1,S2,NR If external stop interrupt flag is set 7 = NSTD specifies registers and interrupt flags as follows: Bit 0 on service internal stop interrupt Bit 1 on service pushbutton interrupt Bit 2 on service lightpen interrupt Bit 3 on service edge flag interrupt Bit 4 on service external stop interrupt Bit 5 on read pushbuttons (PB) Bit 6 on READ X position register (XP) Bit 7 on READ Y position register (YP) Bit 8 on READ DISPLAY program counter (DPC) Bit 9 on READ STATUS one (S1) Bit 10 on READ STATUS TWO (S2) Bit 11 on READ NAME REGISTER (NR) Bit 12 on READ SLAVE GROUP 1 (SG1) Bit 13 on READ SLAVE GROUP 2 (SG2)
L = return buffer address, C(1) = descriptive word showing what this interrupt was and which registers were read in the order listed above. C(L+1) = contents of first register actually read, C(L+2) = contents of second register read, etc. W = 1 (W must equal 1).
The expansion is:
LOG CAL + M(6-8) + A(9-17) LOC+1 10 LOC+2 L LOC+3 -W /DECIMAL LOC+4 NSTD
.READ determines interrupts to be serviced and turns on read busy flag.
The .WRITE macro is used to transmit information from the user program to the display controller, once a display file has been generated. Its location is passed on to the display controller by a call to .WRITE, and the display starts up.
.WRITE is also used to stop the display, by issuing an external stop, and to start the display if it has been stopped. A .WRITE to the display is done immediately and requires no waiting.
The form is:
.WRITE A, M, L, W A = .DAT slot number M = type of write, where 0 = restart display (L not required) 1 = resume display after internal stop Note: The display is automatically resumed after LP or EDGE violation interrupt. 2 = stop display (external stop) 4 = start display pointed to by L L = display file starting address W = not used
The expansion is:
LOC CAL + M(6-8) + A(9-17) LOC+1 11 LOC+2 L .DEC LOC+3 .W /DECIMAL
The .WAIT macro is used to synchronise the user program with the interrupt activity of the display. .WAIT is only defined with respect to .READ. If a .WAIT is given, the user program waits until the previous .READ has completed, that is, the interrupt has occurred. If the previous .READ specified more than one kind of interrupt flag, the descriptive word(s) in the input buffer can be interrogated to determine what flags were set. .WAIT does not initiate any display activity.
The form is:
.WAIT A
The variable A = .DAT slot number.
The expansion is:
LOC CAL + A(9-17) LOC+1 12
.WAIT allows a previous .READ to be completed and turns off input busy flag.
The .WAITR macro allows the user program to proceed in line if the previous .READ is complete. If the previous .READ is not complete, control is given to the location in the user program specified by the .WAITR call. This allows the user to branch to some other part of his program while waiting for the .READ to finish. The user must continue to check for completion by periodically issuing .WAITRs or by issuing a .WAIT.
The form is:
.WAITR A, ADDR
The variables A = .DAT slot number, and ADDR = location in the user program to branch to if input is not completed.
The expansion is:
LOC CAL+1000 + A(9-17) LOC+1 12 LOC+2 ADDR
The .CLOSE macro is used to terminate the current display. External STOP and CLEAR flags IOTs are issued. It is up to the user to save the display file if desired.
The form is
.CLOSE A
where A = .DAT slot number. The expansion is:
LOC CAL + A(9-17) LOC+1 6
The .FSTAT macro checks the status of a file specified by the file entry block. On return, the AC will contain zero and bits 0-2 of LOC+2 will also be zero, stating that the device was non-file oriented.
The form is:
.FSTAT A, D
where the variables A = .DAT slot number, and D = starting address of three word block of storage in user area containing the file name and extension of the file name whose presence on the device associated with .DAT slot A is to be examined.
The expansion is:
LOC CAL+3000 + A(9-17) LOC+1 2 LOC+2 D
The following system I/O macros are ignored by the VT15 display device, handler:
1. .DLETE 2. .RENAM 3. .ENTER 4. .CLEAR 5. .MTAPE 6. .SEEK 7. .TRAN