.TITLE VDQ -- LIST VIRTUAL DISKS QIO SCORES .IDENT /V1.0/ .ENABLE LC ; ;****************************************************************************** ; ; This software is provided on an "as is" basis only. Caterpillar Tractor Co., ; disclaims all warranties on the program, including without limitation, all ; implied warranties of merchantablity and fitness. ; ; Full permission and consent is hereby given to DECUS and to the DECUS ; special interest groups to reproduce, distribute, and publish and permit ; others to reproduce in whole or in part, in any form and without restriction ; this program and any information relating thereto ; ;****************************************************************************** ; .MCALL EXIT$S,QIOW$,DIR$,DCBDF$ DCBDF$ QOUT: QIOW$ IO.WVB,5,1,,,, OUTBUF: .BLKB 132. .EVEN IOS: .WORD 0,0 ULEN: .WORD 0 ISTRNG: .ASCIZ /%15%1S%T.%9>/ .EVEN ARGBLK: .WORD 0 .WORD IOS START: MOV $DEVHD,R4 ;get start of DCB'S 1$: CMP D.NAM(R4),#"VD ;virtual disk DCB? BEQ 2$ ;branch if yes MOV D.LNK(R4),R4 ;get next DCB BNE 1$ ;try again if there are more BR DONE ;otherwise just give up 2$: MOV D.UCB(R4),R5 ;get 1st UCB addr MOVB D.UNIT(R4),R0 ;get lowest unit number MOVB D.UNIT+1(R4),R3 ;get highest unit number MOV D.UCBL(R4),ULEN ;get UCB length SUB R0,R3 ;get # units - 1 INC R3 ;R3 = # units TST -(SP) ;get a place on the stack LOOP: MOV #OUTBUF,R0 ;starting addr of output block MOV #5,R4 ;# of VD's on a line MOV #0,(SP) ;clear output count LOOP2: MOVB U.UNIT(R5),ARGBLK ;get unit number MOV U.QIO(R5),IOS+2 ;get QIO count MOV U.QIO+2(R5),IOS ; " " " MOV #ISTRNG,R1 ;addr of input string MOV #ARGBLK,R2 ;starting addr of argument block CALL $EDMSG ADD R1,(SP) ;add total bytes output so far ADD ULEN,R5 ;point to next UCB DEC R3 ;decrement UCB counter BEQ DONE ;branch if no more UCB's SOB R4,LOOP2 ;branch if print line not full MOV (SP),QOUT+Q.IOPL+2 ;get number of bytes to output DIR$ #QOUT ;output data BR LOOP ;start on next print line DONE: MOV (SP),QOUT+Q.IOPL+2 ;get number of bytes to output DIR$ #QOUT ;output data EXIT$S .END START