.MCALL .MODULE .MODULE INDU2,VERSION=01,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 .SPFUN, .DSTAT .MCALL GCLDF$, DEFIN$, FDBDF$, FERDF$, RT5DF$ .GLOBL 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 INDUT2 SF.TAB =: 372 ; SPFUN code for READ TRANSLATION TABLE I/O ;+ ; This module contains an interface to the LDSTAT subroutine. ; It is called by TESTDV in INDUTL, though the IND root at LDSTAR. ; It is purposefully a small piece of code with a 450 (decimal) ; word buffer for the full extended-unit LD translation table. ;- .SBTTL LDSTAT - Get status of LD device ;+ ; Employ SPFUN SF.TAB (#372) on LD handler to read the translation ; table. Determine whether the specified unit is ON- or OFF-LINE, ; mounted, enabled, etc. ; ; On entry, ; R1 = pointer to FCB ; ; On return, ; R0 = LD.FLG for the specified unit ; R1 = pointer to FCB ; C-SET indicates OFF_LINE ; C-CLEAR indicates ON_LINE ; ; R4 is preserved ; R2,R3,R5 are NOT preserved ;- .ENABL LSB TRATBL: .BLKW 450. ;Buffer for LD translation table LDSTAT::MOV #TRATBL,R2 ;Point to translation table buffer .SPFUN #EMTBLK,@R1,#SF.TAB,R2,#<+2+<64.*7>>,#0,#0 BCS 10$ ;Return immediately on error TST (R2)+ ;Point to LD.NUM MOVB (R2)+,R0 ;Get number of units (LD.NUM) INC R2 ;Point to tables MOV R2,R3 ;R3 -> start of tables MOV R0,-(SP) ;LD.NUM... ASL R0 ;*2 ADD (SP)+,R0 ;*3 ASL R0 ;*6 ADD R0,R3 ;R3 -> to filespecs associated with LD units MOV CSIBLK+10,R0 ;Get unit number ASL R0 ;Double to get offset for specified unit ADD R0,R2 ;Add offset to start to get unit's status ASL R0 ;Complete shift to multiply by 10 ASL R0 ; ADD R0,R3 ;Add off. to get filespec associated with unit 10$: SEC MOV @R2,R0 ;*C* Is it active? BPL 20$ ;*C* Branch if no .DSTAT #DVINFO,R3 ;*C* Get status of device under LD unit 20$: MOV @R2,R0 ;*C* return with LD.FLG in R0 RETURN .DSABL LSB ROUNDUP ; Check for overflow and roundup .END