.MCALL .MODULE .MODULE SCCA,VERSION=06,COMMENT=<[I|M]SCCA/SYSLIB>,IDENT=NO,LIB=YES ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. .SBTTL Module Declarations .NLIST .ENABL LC .DSABL GBL .NLIST CND .LIST ;+ ; ; FACILITY: ; ; RT-11 System Subroutine Library (SYSLIB) ; ; ENVIRONMENT: ; ; The I-form routine can be used by any job running in a single- ; or multi-job environment. ; ; The M-form routine can be used by any job running in a single- ; or multi-job mapped environment. ; ; INCLUDE FILES: ; ; SYSMAC.SML ; RT-11 system macro library. .MCALL .ASSUME ; Check assumptions macro. .MCALL .SCCA ; SCCA programmed request. ; ; EQUATED SYMBOLS: ; SCC.SCODE = 35*400 ; SCCA's programmed request code. S.LMOD = 0 ; Local mode of SCCA operation. S.GMOD = 1 ; Global mode of SCCA operation. ; ; EXTERNAL REFERENCES: ; .GLOBL $NXADR ; Entry point to next address routine. .GLOBL $NXVAL ; Entry point to next value routine. .GLOBL $SYSLB ; Include system library work area. .WEAK $MSARG ; Trap code for missing argument .GLOBL $AMODE ;Routine to process AMODE argument ; ;- .SBTTL {_|I|M}SCCA - Fortran Callable Routine ;+ ; ; FUNCTIONAL DESCRIPTION: ; ; The SCCA routine provides a CTRL/C intercept to: ; ; 1) inhibit a CTRL/C abort ; 2) indicate that a CTRL/C command is active ; 3) distinguish between single and double CTRL/C commands ; 4) return previous SCCA mode ; ; Calling the SCCA routine with no 'iflag' argument disables CTRL/C ; intercepts. ; ; CALLING SEQUENCE: ; ; i = [I]SCCA ( [iflag] [, itype] [, amode] ) ; CALL [I]SCCA ( [iflag] [, itype] [, amode] ) ; ; INPUT PARAMETERS: ; ; R5 address of argument list ; 0(R5) argument count ; 2(R5) address of terminal status word; if argument is omitted, ; value is defaulted to 0 ; 4(R5) address of SCCA type; if argument is omitted, SCCA's mode ; is defaulted to LOCAL ; 6(R5) address of a string specifying the asynchronous terminal ; status word address space {U|S} ; ; RETURNED FUNCTION VALUE: ; ; R0 address of previous SCCA terminal status word ; -19. invalid AMODE argument value ; ;- .PSECT SYS$I .ENABL LSB ISCCA:: MSCCA:: SCCA:: MOV (R5)+,R4 ;R4 (low byte) contains argument count CLR R0 ;Default to disable control-C trapping CALL $NXADR ;Get iflag argument MOV R0,-(SP) ;Move terminal status word to EMT area ; (built on stack in reverse order) .Assume S.LMOD EQ 0 CLR R0 ;Default itype to LOCAL CALL $NXVAL ;Get itype CMP R0,#S.GMOD ;Is it valid? (LOCAL=0, GLOBAL=1) BHI ERR ;Nope... ; ; Enable/disable CTRL/C interception ; BIS #SCC.SCODE,R0 ;Merge in EMT code MOV R0,-(SP) ; and move to EMT area on stack CALL $AMODE ;Process AMODE argument BCS 10$ ;Invalid AMODE argument, ; error code (-19.) in R0 BIS (SP)+,2(SP) ;Set address space bit .SCCA SP,CODE=NOSET ;Enable/disable ctrl/c interception. 10$: CMP (SP)+,(SP)+ ;Dump EMT area from stack RETURN ; and return to caller ERR: TRAP $MSARG ;Report missing arguments RETURN .DSABL LSB .END