.TITLE WINDOW.MAC 87c26a 19-Feb-86/26-Mar-87. .ENABL LC ; Author: N. A. Bourgeois, Jr. ; NAB Software Services, Inc. ; PO Box 20009 ; Albuquerque, NM 87154 ; The code and information in this software is subject to ; change without notice and should not be construed as a ; commitment by NAB Software Services, Inc. NAB Software ; Services,Inc. assumes no responsibility for any errors ; that may appear in this software. ; ; ; NOTICE ; ; This software is sponsored by NAB Software Services, Inc. ; Neither NAB Software Services, Inc., nor any of their ; employees, nor any of their contractors, subcontractors, ; or their employees makes any warranty, express or implied, ; or assumes any legal liability or responsibility for the ; accuracy, completeness or usefulness of any information, ; apparatus, product or process disclosed, or represents ; that its use would not infringe privately owned rights. .SBTTL EDIT RECORD 19-Feb-86/26-Mar-87. ;19-Feb-86 Original creation. .PAGE .SBTTL DESCRIPTION 19-Feb-86/. ; This module contains the windowing support routines. The module ; is a part of the library of FORTRAN callable TSX-Plus EMT support ; routines. ; The ICRWND routine creates a window. ; ; Calling sequences: ; ; CALL ICRWND ( ID, IFLG, IWDTH, ISCRL, IDCPY, IDJB, IERR ) ; or ; IERR = ICRWND ( ID, IFLG, IWDTH, ISCRL, IDCPY, IDJB ) ; ; where: ID is a window identification number in the range ; of 1 to 26. ; ; IFLG is one of the following: ; ; 0 the window is a temporary window. ; ; 1 the window is a permanent window. ; ; IWDTH is thw width of the window in columns and ; should not exceed 132. ; ; ISCRL is the number of lines which are allowed to ; scroll off the window when the window is not ; connected to the terminal. Specify 0 to ; disallow scrolling and 255 to allow unlimited ; scrolling. ; ; IDCPY is the window identification number of the ; window from which to copy certain window ; characteristics. Specify 0 if no other ; window's characteristics are to be copied. ; ; IDJB is the job number of the window from which ; to copy certain window characteristics. ; Specify 0 to use the current job. ; ; IERR is negative or one of the following: ; ; 0 window management is not included in ; the system. ; ; 1 the maximum allowed number of windows ; are already in use. ; ; 2 unable to create the window. Job may ; not have SYSGBL privilege or sufficient ; memory may not be available. ; The ISLWND routine selects a window. ; ; Calling sequences: ; ; CALL ISLWND ( ID, IERR ) ; or ; IERR = ISLWND ( ID ) ; ; where: ID is the window identification number of the ; window to be selected. ; ; IERR is negative or one of the following: ; ; 0 window management is not included ; in the system. ; ; 3 unable to locate a window with the ; specified window identification ; number. ; The IDLWND routine deletes a window. ; ; Calling sequences: ; ; CALL IDLWND ( ID [, IERR ] ) ; or ; IERR = IDLWND ( ID ) ; ; where: ID is the window identification number of the ; window to be deleted. ; ; IERR is negative or one of the following. ; ; 0 window management support is not ; available on the system. ; ; 3 unable to locate the window with the ; specified window identification number. ; The ISPWND routine suspends window processing. ; ; Calling sequence: ; ; CALL ISPWND ; The IRSWND routine resumes window processing. ; ; Calling sequence: ; ; CALL IRSWND ; The IPRWND routine prints the contents of a window. ; ; Calling sequences: ; ; CALL IPRWND ( ID, IERR ) ; or ; IERR = IPRWND ( ID ) .PAGE .SBTTL DIRECTIVES 19-Feb-86/26-Mar-87. .IDENT \87c26a\ ;tell linker our version .PSECT TSXLIB,I .GLOBL TSLBID .WORD TSLBID .DSABL GBL .SBTTL ASSIGNMENTS 19-Feb-86/. ERRBYT = 52 ;EMT error code location NOERR = -1 .PAGE .SBTTL ENTRY POINTS 19-Feb-86/. ; Create a window. ; ICRWND::MOV #161 ,R1 ;EMT code CLR R2 ;EMT id CALL DOIT ;create the window RETURN ; Select a window. ; ISLWND::MOV #161 ,R1 ;EMT code MOV #1 ,R2 ;EMT id CALL DOIT1 ;select the window RETURN ; Delete a window. ; IDLWND::MOV #161 ,R1 ;EMT code MOV #2 ,R2 ;EMT id CALL DOIT2 ;delete the window RETURN ; Suspend window processing. ISPWND::MOV #161 ,R1 ;EMT code MOV #3 ,R2 ;EMT id CALL DOIT3 ;suspend window processing RETURN ; Resume window processing. ; IRSWND::MOV #161 ,R1 ;EMT code MOV #4 ,R2 ;EMT id CALL DOIT3 ;resume window processing RETURN ; Print the contents of a window. ; IPRWND::MOV #161 ,R1 ;EMT code MOV #5 ,R2 ;EMT id CALL DOIT1 ;print the contents RETURN .PAGE .SBTTL SUPPORTING SUBROUTINES 19-Feb-86/. DOIT: CLR -(SP) ;null argument MOV @12(R5) ,-(SP) ;pass argument five MOV SP ,R0 ;pass MOVB @14(R5) ,1(R0) ; argument six MOV @10(R5) ,-(SP) ;pass argument three MOV SP ,R0 ;pass MOVB @6(R5) ,1(R0) ; argument four MOV @4(R5) ,-(SP) ;pass argument one MOV SP ,R0 ;pass MOVB @2(R5) ,1(R0) ; argument two MOV R2 ,-(SP) ;lo byte = EMT id MOV SP ,R0 ;set up the pointer MOVB R1 ,1(R0) ;hi byte = EMT code MOV #NOERR ,R1 ;code for no error EMT 375 ;let TSX do it BCC 1$ ; if no error CLR R1 ; if error, MOVB @#ERRBYT,R1 ; get the code 1$: CMPB #7 ,(R5) ;subroutine error return? BNE 2$ ; no MOV R1 ,@16(R5) ; yes 2$: MOV R1 ,R0 ;function error return ADD #12 ,SP ;fix the stack pointer RETURN DOIT1: CLR -(SP) ;null argument MOV @2(R5) ,-(SP) ;pass the argument MOV R2 ,-(SP) ;lo byte = EMT id MOV SP ,R0 ;set up the pointer MOVB R1 ,1(R0) ;hi byte = EMT code MOV #NOERR ,R1 ;code for no error EMT 375 ;let TSX do it BCC 1$ ; if no error CLR R1 ; if error, MOVB @#ERRBYT,R1 ; get the code 1$: CMPB #2 ,(R5) ;subroutine error return? BNE 2$ ; no MOV R1 ,@4(R5) ; yes 2$: MOV R1 ,R0 ;function error return ADD #6 ,SP ;fix the stack pointer RETURN DOIT2: MOV @2(R5) ,-(SP) ;pass the argument MOV R2 ,-(SP) ;lo byte = EMT id MOV SP ,R0 ;set up the pointer MOVB R1 ,1(R0) ;hi byte = EMT code MOV #NOERR ,R1 ;code for no error EMT 375 ;let TSX do it BCC 1$ ; if no error CLR R1 ; if error, MOVB @#ERRBYT,R1 ; get the code 1$: CMP #2 ,(R5) ;subroutine error return? BNE 2$ ; no MOV R1 ,@4(R5) ; yes 2$: MOV R1 ,R0 ;function error return RETURN DOIT3: MOV R2 ,-(SP) ;lo byte = EMT id MOV SP ,R0 ;set up the pointer MOVB R1 ,1(R0) ;hi byte = EMT code EMT 375 ;let TSX do it RETURN .SBTTL END 19-Feb-86/. .END