.MCALL .MODULE .MODULE GQNT,RELEASE=V00,VERSION=30,COMMENT= .ENABLE LC .NLIST CND .LIST MEB ;+ ;************************************************************************ ;*.ST INQUIRE NORMALIZATION TRANSFORMATION * ;*.PAGE * ;*.X NORMALIZATION TRANSFORMATION * ;*.X GQNT * ;*.LIT * ;************************************************************************ ;* INQUIRE NORMALIZATION TRANSFORMATION * ;* GKCL,GKOP,WSOP,WSAC,SGOP Lma * ;* * ;* FORTRAN calling sequence: * ;* SUBROUTINE GQNT (NTNR, ERRIND, WINDOW, VIEWPT) * ;* * ;* Input parameters: * ;* INTEGER NTNR normalization transformation number * ;* * ;* Output parameters: * ;* INTEGER ERRIND error indicator * ;* REAL WINDOW(4) window limits in world coordinates * ;* WXMIN, WXMAX, WYMIN, WYMAX * ;* REAL VIEWPT(4) viewport limits in normalized device * ;* coordinates * ;* VXMIN, VXMAX, VYMIN, VYMAX * ;* * ;* Parameters: * ;* In normalization transformation number (0..n) I * ;* Out error indicator I * ;* Out window limits WC 4xR * ;* Out viewport limits NDC 4xR * ;* * ;* Effect: If the inquired information is available, the error * ;* indicator is returned as 0 and the values are returned * ;* in the output parameters. * ;* * ;* If the inquired information is not available, the * ;* values returned in the output parameters are implement- * ;* ation dependent and the error indicator is set to one * ;* of the following error numbers to indicate the reason * ;* for non-availability: * ;* * ;* 8 GKS not in proper state: GKS shall be in one * ;* of the states GKOP, WSOP, WSAC or SGOP. * ;* 50 Transformation number is invalid * ;* * ;* References: * ;* 4.4.2 * ;* 4.11.2 * ;* * ;* Errors: * ;* none * ;************************************************************************ ;*.ELI * ;************************************************************************ ;- ;; .NLIST .INCLUDE /GOPSTA.INC/ .INCLUDE /GDESTB.INC/ .LIST .PSECT G$$COD,RW,I,LCL,REL,CON GQNT:: CLR @4(R5) ; Clear the error indicator. TST G$OPST ; Is GKS in state GKOP, WSOP, WSAC or SGOP? BNE 10$ ; Branch if it is. MOV #8.,@4(R5) ; GKS not in proper state. BR 40$ 10$: TST @2(R5) ; Check fot N.T. # in the rage 0-4. BGE 30$ 20$: MOV #50.,@4(R5) ; Invalid N.T. number. BR 40$ 30$: CMP #4,@2(R5) BLT 20$ 40$: MOV @2(R5),R0 ; Use the N.T. number as a counter. CLR R1 ; R1 will point to the requested N.T. BR 60$ 50$: ADD #>,R1 60$: SOB R0,50$ MOV 6(R5),R0 ; Address of window limits. MOV #<4*>,R2 70$: MOV (R1)+,(R0)+ SOB R2,70$ MOV 10(R5),R0 ; Address of viewport limits. MOV #<4*>,R2 80$: MOV (R1)+,(R0)+ SOB R2,80$ RTS PC ; Return .END