.MCALL .MODULE .MODULE INDU1,VERSION=03,COMMENT= ; 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. .ENABL GBL,LC .SBTTL System macros ;+ ;External macros. ;- .MCALL .READC, .CSTAT, .RELEAS, .SPFUN .MCALL .CLOSE, .HERR, .DSTAT .MCALL GCLDF$, DEFIN$, FDBDF$, FERDF$, RT5DF$ .GLOBL VOLFLG, DVSTAT DEFIN$ ;Definitions for IND files GCLDF$ ;Define GCML block offsets and symbols FDBDF$ ;Define FDB offsets FERDF$ ;Define file service error codes RT5DF$ ;RT11 definitions OPSECT INDUT1 ;+ ; This module contains an interface to the IGTDUS subroutine. ; Module TESTDV in INDUTL calls GDSTA1 in INDSU2, which then ; calls GETDUS (below). ;- $ERRTB == 0 ; Inhibit load of $ERRTB $MSARG == 0 ; Satisfy unused error trap global $NOARG == -1 ; No argument code ; Get DU or MU device status. GETDUS::SAVE ; Save some registers MOV #,R5 ; Point to the 1st argument .ASSUME F$CHAN EQ 0 MOV R1,CHANAD ; Pointer to available channel MOV R1,@R5 ; Store RAD50 device name ADD #,@R5 TST -(R5) ; Point to argument block ; Use READ block buffer for IGTDUS work space CLR $IOWNR ; Release any ownership of buffer, MOV #$INPBF,DUSWAA ; use READ block buffer for work area MOV #IGTDUS,R0 ; Point to the "Get DU Status" routine CALL CALL$F ; Go to IGTDUS ; Look at the return code, and check for particular errors CMP R0,# ; MU LOOKUP failed with Invalid Unit? BEQ 8$ ; Say NSD if so. CMP R0,# ; No such handler? (can result from BEQ 8$ ; 64-unit name in 8-unit environ) CMP R0,# ; Invalid dev (deduce from HARD ERROR) BNE 10$ ; Branch if device is valid 8$: BIS #,DVSTAT ; Indicate No Such Device (NSD) 10$: RESTOR ; Restore the registers RETURN ; to caller (GDSTA1) ...... ;+ ; IGTDUS status block. ;- PGTDUS::.WORD 7 ; IGTDUS Block - 7 arguments. .WORD 0 ; address of DEVICE NAME CHANAD: .WORD 0 ; address of CHANNEL .WORD SCR ; address of STATUS back .WORD $NOARG ; address of UNIT (no arg) .WORD $NOARG ; address of ITYPE (no arg) DUSWAA: .WORD 0 ; address of work area .WORD WASIZV ; address of work area size WASIZE =: 144. ; Allow for extended units WASIZV: .WORD WASIZE ; IGTDUS work area size .DSABL LSB ROUNDUP ; Check for overflow and roundup .END