.MCALL .MODULE .MODULE ICLOSZ,03,COMMENT=,IDENT=NO,LIB=YES,GLOBAL=.CLOSZ ; 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 ; ; ENVIRONMENT: ; ; This routine can be used by any job running in a single-job ; or multi-job environment. ; ; CALLABLE ENTRIES: ; ; ICLOSZ ; ; INCLUDE FILES: ; ; SYSMAC.SML ; RT-11 system macro library .MCALL .CLOSZ ; CLOSZ programmed request ; EXTERNAL REFERENCES: ; .GLOBL $NXVAL ; Entry point to next value routine .GLOBL $NXADR ; Entry point to next address routine .GLOBL $SYSLB ; Include system library work area .GLOBL $ERRM0 ; Entry point to error conversion routine .GLOBL $ARGER .SBTTL ICLOSZ - Fortran-callable Routine ; ; ++ ; FUNCTIONAL DESCRIPTION: ; ; The ICLOSZ function terminates activity on a channel, frees it for use ; in another operation, and sets the file size. ; ; CALLING SEQUENCE: ; ; i = ICLOSZ (chan, size) ; ; INPUT PARAMETERS: ; ; R5 - address of ICLOSZ argument block ; 0(R5) - argument count of ICLOSZ call ; 2(R5) - address of the integer value of the RT-11 channel to be used ; 4(R5) - address of the file size in blocks ; ; OUTPUT PARAMETERS/RETURNED FUNCTION VALUE: ; ; i = 0 - Normal return ; -2 - Size too big ; -3 - Operation invalid (internal error) ; -4 - Protected file exists ; -257. - Required argument missing ; ; -- .PSECT SYS$I,I CLOSZ:: ICLOSZ:: MOV (R5)+,R4 ;Get count CALL $NXADR ;Get channel address BCS 10$ ;Required arg missing MOVB @R0,R1 ;Get channel number CALL $NXVAL ;Get file size BCS 10$ ;Required arg missing MOV R0,-(SP) ;Save it TST -(SP) ;Reserve a word .CLOSZ SP,R1 ;Send the request BIT (SP)+,(SP)+ ;*C* align stack CALLR $ERRM0 ;Process any error 10$: MOV #$ARGER,R0 ;Required arg missing RETURN .END