.MCALL .MODULE .MODULE IDSTAT,VERSION=04,COMMENT=,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 ; ; ENVIRONMENT: ; ; This routine can be used by any job running in a single-job ; or multi-job environment, but cannot be called from a ; completion or interrupt service routine. It uses "TRAP" to ; provide error processing. ; ; INCLUDE FILES: ; ; SYSMAC.SML ; RT-11 system macro library. .MCALL .DSTATUS ; DSTATUS programmed request. ; ; EXTERNAL REFERENCES: ; .GLOBL $SYSLB ; Include system library work area. .GLOBL $ERRP0 ; Entry point to EMT error conversion routine. .GLOBL $NXADR ; Entry point to next address routine. .WEAK $MSARG ; Trap code for missing argument .SBTTL IDSTAT - Fortran-callable Routine ; ++ ; FUNCTIONAL DESCRIPTION: ; ; The IDSTAT function obtains information about a particular device. ; ; CALLING SEQUENCE: ; ; i = IDSTAT( devnam, cblk ) ; ; INPUT PARAMETERS: ; ; R5 - address of IDSTAT's argument block ; ; 0(R5) - argument count of IDSTAT call ; 2(R5) - address of Radix-50 device name ; 4(R5) - address of four-word area to receive device information ; ; ; OUTPUT PARAMETERS: ; ; R0 - get device info status ; ; istat - four-word area loaded with device information: ; word 1 - device status word ; word 2 - size of handler (in bytes) ; word 3 - entry point of handler (non-zero implies that ; handler is in memory) ; word 4 - size of device (in 512-byte blocks); zero for ; sequential-access devices ; ; RETURNED FUNCTION VALUE: ; ; 0 - normal return ; 1 - device not found in monitor tables ; ; -- .PSECT SYS$I DSTAT:: IDSTAT:: MOV (R5)+,R4 ; R4(low byte) <- argument count. CALL $NXADR ; Get -> 'dnam' argument BCS ERR ; If CS, error - 'chan' argt wasn't supplied MOV R0,R3 ; R3 <- address of device name to interrogate CALL $NXADR ; Get -> 'idstat' argument BCS ERR ; If CS, error - 'addr' argt wasn't supplie MOV R0,R2 ; R2 <- address of 'idstat' argument .DSTATUS R2,R3 ; Get information for specified device CALLR $ERRP0 ; Get and convert any errors (status in R0) ERR: TRAP $MSARG ; Handle any missing arguments in call RETURN .END