.TITLE CLLINE.MAC 89e17a 03-Oct-84/17-May-89. .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 03-Oct-84/17-May-89. ;03-Oct-84 Original creation. ;25-Feb-86 Revised for V6.0. Changed the ICNTSP routine ; description. ;19-Mar-87 Revised for V6.2. Added NAB Software disclaimer. ; Added the IRXOFF, IRDTR, and the ILDTR routines. ; Added the DOIT1 subroutine. ;17-May-89 Revised for V6.40a. Added the ICLXF and ICLRST ; routines. Corrected error in the IlDTR and ; DOIT1 routines. .PAGE .SBTTL DESCRIPTION 03-Oct-84/17-May-89. ; This module contains the communication line support routines. The ; module is a part of the TSXLIB library of FORTRAN callable TSX-Plus ; EMT support routines. ; The ICNTSP routine controls the transmit/receive speed of a ; communication line. ; ; Calling sequences: ; ; CALL ICNTSP ( LINUM, ISPCD [, IERR ] ) ; or ; IERR = ICNTSP ( LINUM, ISPCD ) ; ; where: LINUM is the number of the line for which speed is ; to be set. If equal to zero, the speed is set ; for the line on which the program is running. ; Operator privilege is required to change the ; speed on a line other than the one on which the ; program is running. ; ; ISPCD is a speed code as follows: ; ; Code Speed Code Speed ; ; 0 50 8 1800 ; ; 1 75 9 2000 ; ; 2 110 10 2400 ; ; 3 134.5 11 3600 ; ; 4 150 12 4800 ; ; 5 300 13 7200 ; ; 6 600 14 9600 ; ; 7 1200 15 19200 ; ; IERR is negative or one of the following: ; ; 1 the job does not have TERMINAL ; privilege. ; ; 2 an invalid line number was ; specified. ; The IRXOFF routine resets the XOFF (CTRL-S) state of a terminal line. ; This only affects XOFFs received by the system from the terminal and ; not XOFFs sent to the terminal by the system. ; ; Calling sequences: ; ; CALL IRXOFF ( LINUM [, IERR ] ) ; or ; IERR = IRXOFF ( LINUM ) ; ; where: LINUM is the number of the line on which the XOFF ; state is to be reset. TERMINAL privilege is ; required if the line to be affected is not the ; line on which the job is running. ; ; IERR is negative or one of the following: ; ; 1 the job does not have TERMINAL ; privilege. ; ; 2 an invalid line number was specified. ; The IRDTR routine raises the DTR status of communication and ; timesharing lines. ; ; Calling sequences: ; ; CALL IRDTR ( LINUM [, IERR ] ) ; or ; IERR = IRDTR ( LINUM ) ; ; where: LINUM is the number of the line whose DTR status ; is to be raised. TERMINAL privilege is ; required if the line number is not the same ; the one on which the job is running. ; ; IERR is negative or one of the following: ; ; 1 the job does not have TERMINAL ; privilege. ; ; 2 an invalid line number was specified. ; The ILDTR routine lowers the DTR status of communication and ; timesharing lines. ; ; Calling sequences: ; ; CALL ILDTR ( LINUM [, IERR ] ) ; or ; IERR = ILDTR ( LINUM ) ; ; where: LINUM is the number of the line whose DTR status ; is to be lowered. TERMINAL privilege is ; required if the line number is not the same ; the one on which the job is running. ; ; IERR is negative or one of the following: ; ; 1 the job does not have TERMINAL ; privilege. ; ; 2 an invalid line number was specified. ; The IRDRCL routine redirects the connection of communication and ; timesharing lines. ; ; Calling sequences: ; ; CALL IRDRCL (ICLNO,LINUM [ ,IERR ] ) ; or ; IERR = IRDRCL (ICLNO,LINUM) ; ; where: ICLNO is the CL unit number. ; ; LINUM is the number of a timesharing line or ; dedicated CL. ; ; IERR is negative or one of the following: ; ; 1 User does not have TERMINAL ; privilege. ; ; 2 Invalid CL unit number. ; ; 3 Invalid timesharing line number. ; ; 4 Line already assigned to a CL unit. ; ; 5 Timesharing user logged onto line. ; ; 6 CL unit busy. ; Clear the XOFF received flag and transmit an XON for a CL unit. ; ; Calling sequences: ; ; CALL ICLXF ( ICLNO [ ,IERR ] ) ; or ; IERR = ICLXF ( ICLNO ) ; ; where: ICLNO is the CL unit number. ; ; IERR is negative or one of the following: ; ; 1 job issuing the request does not have ; TERMINAL privilege. ; ; 2 invalid CL unit number specified. ; ; 7 specified CL unit is not assigned to ; a line. ; ; 8 Job issuing the request does not have ; BYPASS privilege. ; Reset a CL unit by emptying its input silo and output ring buffer, ; stop sending any break, clearing XOFF received, sending an XON, ; clearing an end-of-file status, and reseting line and column numbers. ; ; Calling sequences: ; ; CALL ICLRST ( ICLNO [ ,IERR ] ) ; or ; IERR = ICLRST ( ICLNO ) ; ; where: ICLNO is the CL unit number. ; ; IERR is negative or one of the following: ; ; 1 job issuing the request does not have ; TERMINAL privilege. ; ; 2 invalid CL unit number specified. ; ; 7 specified CL unit is not assigned to ; a line. ; ; 8 Job issuing the request does not have ; BYPASS privilege. .PAGE .SBTTL DIRECTIVES 03-Oct-84/17-May-89. .IDENT \89e17a\ ;tell linker our version .PSECT TSXLIB,I .GLOBL TSLBID .WORD TSLBID .DSABL GBL .SBTTL ASSIGNMENTS 03-Oct-84/. ERRBYT = 52 ;EMT error code locationn NOERR = -1 ;code for no error condition .PAGE .SBTTL ENTRY POINTS 03-Oct-84/17-May-89. ; Control the transmit/receive speed of a communication line. ; ICNTSP::MOV #154 ,R1 ;EMT code CALL DOIT ;Control the speed RETURN ; Reset a communication or a timesharing line's XOFF status. ; IRXOFF::MOV #154 ,R1 ;EMT code. MOV #1 ,R2 ;EMT ID CALL DOIT1 ;Reset the status RETURN ; Raise a communication or a timesharing line's DTR status. ; IRDTR:: MOV #154 ,R1 ;EMT code MOV #2 ,R2 ;EMT ID CALL DOIT1 ;Raise the status RETURN ; Lower a communication or a timesharing line's DTR status. ; ILDTR:: MOV #154 ,R1 ;EMT code MOV #3 ,R2 ;EMT ID CALL DOIT1 ;Lower the status RETURN ; Redirect a communication or timesharing line. ; IRDRCL::MOV #155 ,R1 ;EMT code CALL DOIT ;Redirect the line RETURN ; Clear a CL unit's XOFF received flag and transmit an XON. ; ICLXF:: MOV #155 ,R1 ;EMT code MOV #1 ,R2 ;EMT id CALL DOIT1 ;clear the XOFF RETURN ; Reset a CL unit. ; ICLRST::MOV #155 ,R1 ;EMT code MOV #2 ,R2 ;EMT id CALL DOIT1 ;Reset the CL unit RETURN .PAGE .SBTTL SUPPORTING SUBROUTINES 03-Oct-84/17-May-89. DOIT: MOV @4(R5) ,-(SP) ;pass argument 2 MOV @2(R5) ,-(SP) ;pass argument 1 CLR -(SP) ;lo byte = 0 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, then MOVB @#ERRBYT,R1 ; get its code 1$: CMPB #3 ,(R5) ;subroutine error return? BNE 2$ ; no MOV R1 ,@6(R5) ; yes 2$: MOV R1 ,R0 ;function error return ADD #6 ,SP ;adjust the stack pointer RETURN DOIT1: CLR -(SP) ;dummy argument 2 MOV @2(R5) ,-(SP) ;pass argument 1 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, then MOVB @#ERRBYT,R1 ; get its 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 ;adjust the stack pointer RETURN .SBTTL END 03-Oct-84/. .END