.MCALL .MODULE, .NLCSI .MODULE GUWK,RELEASE=V00,VERSION=30,COMMENT= .ENABLE LC,LSB .NLIST CND .LIST MEB ;+ ;************************************************************************ ;*.ST UPDATE WORKSTATION * ;*.PAGE * ;*.X UPDATE WORKSTATION * ;*.X WORKSTATION * ;*.X GUWK * ;*.LIT * ;************************************************************************ ;* UPDATE WORKSTATION WSOP,WSAC Lma * ;* * ;* FORTRAN calling sequence: * ;* SUBROUTINE GUWK (WKID, REGFL) * ;* * ;* Input parameters: * ;* INTEGER WKID workstation identifier * ;* INTEGER REGFL update regeneration flag (GPOSTP, * ;* GPERFO) * ;* * ;* Functional Description * ;* Parameters: * ;* In workstation identifier N * ;* In regeneration flag (PERFORM, SUPRESS) E * ;* * ;* Effect: All deferred actions for the specified workstation are * ;* executed (without intermediate clearing of the display * ;* surface). If the regeneration flag is set to PERFORM * ;* and the 'new frame action necessary at update' entry in * ;* the workstation state list is YES, then the following * ;* actions are executed in the given sequence: * ;* * ;* a) The display surface is cleared only if the 'display * ;* surface empty' entry in the workstation state list * ;* is NOTEMPTY. The entry is set to EMPTY. * ;* * ;* b) If the 'workstation transformation update state' * ;* entry in the workstation state list is PENDING, the * ;* 'current workstation window' and 'current work- * ;* station viewport' entries in the workstation state * ;* list are assigned the values of the 'requested * ;* workstation window' and 'requested workstation view- * ;* port entries; the 'workstation transformation up- * ;* date state' entry is set to NOTPENDING. * ;* * ;* c) All visible segments stored on this workstation * ;* (i.e. contained in the 'set of stored segments for * ;* this workstation' in the workstation state list) are * ;* redisplayed. This action typically causes the * ;* 'display surface empty' entry in the workstation * ;* state list to be set to be set to NOTEMPTY * ;* * ;* d) The 'new frame action necessary at update' entry in * ;* the workstation state list is set to NO. * ;* * ;* Note: If the regeneration flag is PERFORM, UPDATE WORK- * ;* STATION suspends the effect of SET DEFERRAL STATE. In * ;* that case, it is equivalent to the following sequence * ;* of functions: * ;* * ;* INQUIRE WORKSTATION STATE; * ;* save deferral state; * ;* SET DEFERRAL STATE (ASAP, ALLOWED); * ;* set deferral state to saved value; * ;* * ;* If the value of the 'new frame action necessary at * ;* update' entry is NO or the regeneration flag is * ;* SUPPRESS, UPDATE WORKSTATION merely initiates the * ;* transmission of blocked data. If the value of the entry * ;* 'new frame action necessary at update' is YES and the * ;* regeneration flag is PERFORM, UPDATE WORKSTATION be- * ;* haves as REDRAW ALL SEGMENTS ON WORKSTATION. * ;* * ;* The 'new frame action necessary at update' entry in the * ;* workstation state list is set to YES during deferred * ;* action generation if both of the following are true * ;* (see 4.5): * ;* * ;* a) an action causing modification of the picture is * ;* actually deferred on that workstation; * ;* * ;* b) the workstation display surface does not allow * ;* modification of the image without redrawing the * ;* whole picture (for example, plotter, storage tube * ;* display). * ;* * ;* * ;* References: 4.5.3 * ;* 4.5.4 * ;* 4.5.5 * ;* * ;* Errors: * ;* 7 GKS not in proper state: GKS shall be either in the * ;* state WSOP, WSAC or SGOP * ;* 20 Specified workstation identifier is invalid * ;* 25 Specified workstation is not open * ;* 33 Specified workstation is of category MI * ;* 35 Specified workstation is of category INPUT * ;* 36 Specified workstation is Workstation Independent * ;* Segment Storage * ;************************************************************************ ;*.ELI * ;************************************************************************ ;- .LIBRARY /GKS.MLB/ .MCALL $GKS $GKS .LIBRARY /CGI.MLB/ .MCALL $CGI $CGI .LIBRARY /UTL.MLB/ .MCALL $UTL $UTL .LIBRARY /ERR.MLB/ .MCALL $ERR $ERR .NLIST .INCLUDE /GOPSTA.INC/ .INCLUDE /GKSSL.INC/ .INCLUDE /WSSL.INC/ .INCLUDE /CGIVTD.INC/ .INCLUDE /GERROR.INC/ .LIST ; Workstation ID .PSECT G$$COD,RW,I,LCL,REL,CON GUWK:: $ER007 $ER020 $ER025 $ER033 $ER035 $ER036 PUSH R5 ; Save R5. $VMPC @2(R5) ; Make the picture current. POP R5 ; Restore R5. CMP WS$IRM(R0),#GPERFO ; Regeneration flag set to PERFORM? BNE 40$ ; Branch if not. CMP WS$NFA(R0),#GYES; New frame action necessary at update? BNE 40$ ; Branch if not. 10$: PUSH R0,R5 ; Save R0 and R5. $VPVS @2(R5) ; Prepare the view surface. POP R5,R0 ; Restore R5 and R0. MOV #GEMPTY,WS$DSE(R0) ; Set 'Display Surface Empty' to EMPTY. 20$: CMP WS$TUS(R0),#GPEND ; Update the workstation transform? BNE 30$ MOV R0,R1 MOV R0,R2 ADD #WS$RWW,R1 ADD #WS$CWW,R2 PUSH R2 .REPT 4* MOV (R1)+,(R2)+ .ENDR POP R2 MOV R2,R3 ADD #2*FLTSIZ,R3 PUSH R0,R5 $VVE @2(R5),R2,R3 POP R5,R0 MOV R0,R1 MOV R0,R2 ADD #WS$RWV,R1 ADD #WS$CWV,R2 PUSH R2 .REPT 4* MOV (R1)+,(R2)+ .ENDR POP R2 MOV R2,R3 ADD #2*FLTSIZ,R3 PUSH R0,R5 $VDV @2(R5),R2,R3 POP R5,R0 MOV #GNPEND,WS$TUS(R0) ; Set the Transformation Update State to ; NOT PENDING. 30$: MOV #GNO,WS$NFA(R0) ; Set 'New Frame Action Necessary at Update' ; to NO. 40$: RTS PC .END