.TITLE AUXDIN de-init auxiliary task .PSECT AUXDIN .IDENT /M002/ ;+ ; AUXDIN ; Deaccesses the Index Files and any files that may still be accessed ; Prints a dismount message on the console. ; Closes the network. ; ; PARAMETERS None ; ; AUTHOR ; Daniel McCoy Informatics Inc., Palo Alto, Ca. ; ; REVISIONS ; 5 Mar 80 DSM Added multi-device support ; 4 Oct 79 DSM Version Two ;- .MCALL DIR$,CLSW$E ; AUXDIN:: ; ; Deaccess any files that are still accessed. ; Goes through LUNLST backwards to save the index files for last ; MOV #QDAC,R0 ; Point to deacces QIO DPB MOV #NACLNS-1,R1 ; Make an offset to last LUNLST entry ASL R1 ; Convert to words 10$: TST LUNLST(R1) ; Check next lun BEQ 20$ ; Zero if not accessed MOV R1,R2 ; Get ready to turn offset into a lun ASR R2 ; Convert from byte to word offset ADD #ACLUN1,R2 ; Add base lun MOV R2,Q.IOLU(R0) ; Store the lun in the DPB DIR$ R0 ; Issue the deaccess ; Don't really know what to do about an error here but we have to keep trying 20$: SUB #2,R1 ; Next entry (going backwards) BGE 10$ ; Loop if more to do ; ; Write dismount message ; Node name put into message by AUXINI MOV #DMOMSG,TIBUF ; Point to message MOV #DMOLEN,TILEN ; Get length of message DIR$ #TIQIO ; Write it out ; CLSW$E CLS ; Close out network BCS CBAD ; Check for bad directive ; RETURN ; CBAD: MOV #BADCL,R0 ; Report bad close directive JMP BADMSG ; No return .END