Google
 

Trailing-Edge - PDP-10 Archives - bb-d549g-sb - dsklst.mac
There are 4 other files named dsklst.mac in the archive. Click here to see a list.
TITLE DSKLST - GIVES SUMMARY OF DSK USAGE 2 FEB 77
SUBTTL	M TIGHE/R CLEMENTS/A FRANTZ/D BLACK/JE/TW
VDSL==33
VUPDATE==0
VEDIT==4
VCUSTOM==0

JOBVER=137
LOC JOBVER
<VCUSTOM>B2+<VDSL>B11+<VUPDATE>B17+VEDIT
EXP VDSL

;COPYRIGHT (C) 1969, 1970, 1971, 1974,1975, 1976, 1977 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

;PARAMETERS FROM COMMOD.MAC

HOMNAM==0
HOMNXT==5
HOMHID==1
HOMLUN==10

BAFPTR==1
BAFCTM==2
BAFCNT==3
BAPBDU==200
BAPOTH==400

RIBPPN==1
RIBNAM==2
RIBEXT==3
RIBATT==4
RIBSIZ==5
RIBVER==6
RIBALC==11
RIBMTA==15
RIBUFD==16
RIBSTS==17
  RIPHRE==100
  RIPHWE==200
  RIPSCE==400
  RIPBDA==1
  RIPBFA==10
  RIPCRH==4
RIBXRA==34

;END PARAMETERS FROM COMMOD.MAC

RELOC
;AC'S

FL=0	;FLAG REGISTER
A=1
B=2
C=3
D=4
M=5
N=6
N1=7
T=10
TT=11
TOT=12
R=14
WD=15
CH=16
P=17

;FILES

U=1
S=2
L=3
F=4
TTY=5

;MISC

EOF=1B22

OUTSTR==3	;TTCALL OUTPUT STRING FUNCTION
INCHR==0	;TTCALL INPUT CHARACTER AND WAIT FUNCTION

;FLAGS

F.U=1		;SET IF PRINT UNITS OF FILE STRUCTURE
F.V=2		;SET IF PRINT VITAL STATISTICS (HOME BLOCKS)
F.F=4		;SET IF PRINT FILE INFORMATION
F.S=10		;SET IF PRINT SAT BLOCKS
F.B=20		;SET IF PRINT BAT BLOCKS
F.E=40		;SET IF PRINT ERROR SUMMARY
F.N=100		;SET IF NARROW PAPER TO BE USED
F.P=200		;SET IF PERFORMANCE STATISTICS TO BE LISTED
F.Q=400		;SET IF QUICK LEVEL D LISTING DESIRED
EXTFIL=40000		;SET IF CURRENT FILE HAS AN EXTENDED RIB
OTHERK==100000
LEVC=200000	;SET IF RUNNING LEVEL C
LFAIL=400000	;SET IF A LOOKUP FAILED
OPDEF	GETTAB [CALLI 41]
OPDEF	DSKCHR [CALLI 45]
OPDEF	SYSSTR [CALLI 46]
OPDEF	PJRST [JRST]

CHRLEN=13	;LENGTH OF DSKCHR VALUE LIST

CHRFST=2	;TALLY OF FREE BLOCKS ON THIS STR
CHRCHR=5	;PARAMETERS
CHRBPU=6	;BLOCKS ON THIS UNIT
CHRWPS=10	;WORDS PER SAT BLOCK ON THIS UNIT
CHRSPU=11	;SATS ON THIS UNIT
CHRK4S=12	;K FOR SWAPPING ON THIS UNIT

TYPDP==2	;KONTROLLER TYPE FOR DISK PACKS

EXLLEN=35	;LENGTH OF ARGUMENT LIST FOR EXTENDED LOOKUP

EXLPPN=RIBPPN
EXLNAM=RIBNAM
EXLEXT=RIBEXT
EXLATT=RIBATT
EXLSIZ=RIBSIZ
EXLVER=RIBVER
EXLALC=RIBALC
EXLMTA=RIBMTA
EXLUFD=RIBUFD
EXLSTS=RIBSTS
EXLXRA=RIBXRA

CR=15
LF=12
FORM=14

MAXFS=^D14	;MAXIMUM NUMBER OF FILE STRUCTURES IN SYSTEM
UNPPRF==4000	;PRIVATE STR OR UNIT BIT IN DSKCHR RETURN

STATAB=11	;GETTAB INDEX FOR TABLE CONTAINING STATES WORD
STAIND=17	;INDEX IN TABLE FOR STATES WORD
LEVDF=7B27	;7B9 IS LEVEL D FLAG (LEFT HALF)

DEVTTY=10		;DEVCHR BIT FOR TTY

TOPHIS==^D50		;HIGHEST SIZE TO CHECK FOR HISTOGRAM

DP.SER==1000	;SEARCH ERROR BIT IN BAT BLOCK ENTRIIS FOR DP UNITS
FH.SER==20000	;SEARCH ERROR BIT IN BAT BLOCK ENTRIES FOR FH UNITS
EXTERN	.JBREN

ENTRY DSKLST

DSKLST:
GO:	CALLI 0
	INIT	TTY,
	SIXBIT	.TTY.
	IBUF
	  CALLI	12
	INBUF	TTY,1
	INIT L,0
	SIXBIT /LPT/
	XWD LOB,0
	  JRST	NOOUT
	MOVE	A,[SIXBIT /DSKLST/]
	MOVSI	B,(<SIXBIT /LST/>)
	SETZB	C,FL		;CLEAR FLAG REGISTER ON THE WAY
	MOVEI	D,0
	ENTER	L,A
	  JRST	NOEN
	MOVE P,PDP
	MOVSI	A,(SIXBIT .LPT.)
	CALLI	A,4		;DEVCHR OF OUTPUT DEVICE
	TLNE	A,DEVTTY	;SKIP IF IS NOT A TTY
	TLO	FL,F.N		;SET NARROW PAPER FLAG FOR TTY

	MOVEI	M,RENTER
	MOVEM	M,.JBREN	;SET UP FOR REENTER TO CLOSE OUTPUT AND EXIT
	MOVE	M,[XWD STAIND,STATAB]
	GETTAB	M,		;GET STATES WORD
	  TLZA	M,LEVDF		;DIDN'T GET RESPONSE FROM GETTAB
	TLNN	M,LEVDF
	TLO	FL,LEVC		;SET LEVEL C BIT
	TLNN	M,LEVDF
	JRST	GO2		;JUMP IF LEVEL C
	AOSG	HELPFG
	TTCALL	OUTSTR,[ASCIZ .
/H FOR HELP.]
	TTCALL	OUTSTR,[ASCIZ .
*.]
GO2:	PUSHJ	P,GETSTR	;READ TTY, GET STR'S AND SWITCHES
	SETOM	STRIND
	TLNE	FL,LEVC
	JRST	STLEVC		;INITIALIZE LEVEL C
	TLNN	FL,F.U+F.V+F.F+F.S+F.B+F.E+F.P	;INITIALIZE LEVEL D
	TLO	FL,F.U+F.V+F.F+F.S+F.B+F.E+F.P	;IF NO FLAGS, SET ALL
	TLNE	FL,F.V		;V IMPLIES U
	TLO	FL,F.U
	TLNE	FL,F.E
	TLZ	FL,F.Q		;E IMPLIES NOT Q
	JRST	GO1
STLEVC:	MOVEI	A,1
	MOVEM	A,BLKCLS	;BLOCKS PER CLUSTER IS 1 IN LEVEL C
	TLZ	FL,F.U+F.V+F.B+F.E
	TLO	FL,F.F+F.S	;GET ONLY FILE INFO AND SAT BLOCKS
	MOVE	A,MFDPP
	MOVEM	A,SYSPP		;MFDPP IS SYSPP FOR LEVEL C

GO1:	MOVEI	M,[ASCIZ /
SUMMARY OF DISK STATUS	SUMMARY BEGUN /]

	PUSHJ	P,MSG
	PUSHJ	P,NOW
	PUSHJ	P,CRLF3
	PUSHJ	P,UFDOUT	;LIST ALL USER FILE DIRECTORIES

	MOVEI	M,[ASCIZ /
DISK SUMMARY COMPLETED /]

	PUSHJ	P,MSG
	PUSHJ	P,NOW
RENTER:	PUSHJ	P,CRLF
	RELEASE L,0		;RELEASE LPT
	CALLI	12		;***EXIT***

NOOUT:	TTCALL	OUTSTR,[ASCIZ .
CANT OPEN OUTPUT DEVICE.]
	CALLI	12

NOEN:	TTCALL	OUTSTR,[ASCIZ .
CANT ENTER OUTPUT FILE.]
	CALLI	12
UFDOUT:	AOS	A,STRIND
	MOVE	B,STRTAB(A)	;GET NEXT FILE STRUCTURE
	JUMPE	B,CPOPJ		;NO MORE
	MOVE	WD,B
	PUSHJ	P,SIXBA		;PRINT IT
	MOVEI	CH,":"
	PUSHJ	P,TYO
	MOVE	A,[XWD 1,B]
	DSKCHR	A,
	  JRST	NOSTR
	MOVEI	M,PRFMES
	TLNE	A,UNPPRF	;SKIP IF NOT PRIVATE UNIT OR STR
	PUSHJ	P,MSG		;OUTPUT PRIVATE MESSAGE
	PUSHJ	P,CRLF2
	MOVEI	A,14
	MOVEM	B,STR		;SAVE CURRENT STR
	HRRZI	C,MIB
	OPEN	S,A		;OPEN FILE STRUCTURE FOR READING MFD
	  JRST	NOSTR		;NO SUCH STR
	MOVEI	A,17
	SETZB	C,TBLKCT
	OPEN	F,A		;OPEN STR FOR LOOKING UP USER FILES
	  JRST	NOSTR
	OPEN	U,A		;OPEN STR FOR READING HOME.SYS
	  JRST	NOPEN
	MOVE A,MFDPP
	MOVSI B,(SIXBIT /UFD/)
	SETZB	C,BLKTOT	;CLEAR TOTAL NUMBER OF BLOCKS ON STR
	SETZM	XRBTOT		;CLEAR TOTAL OF EXTENDED FILES ON STR
	MOVE D,MFDPP
	LOOKUP	S,A		;LOOKUP MFD
	  JRST	NOMFD		;NO MFD
	TLNE	FL,LEVC
	JRST	NOCLS		;DONT NEED THIS STUFF IF LEVEL C
	MOVE	B,STR		;FILE STRUCTURE NAME FOR FIRST UNIT
	SETOM	SATIND		;CLEAR INDEX IN TABLE OF SAT VALUES
	MOVEI	M,UHED
	TLNE	FL,F.U
	PUSHJ	P,MSG		;IF PRINTING UNITS, PRINT HEADING FOR THEM
	MOVE	A,[SIXBIT .HOME.]
	MOVSI	B,(SIXBIT .SYS.)
	SETZ	C,
	MOVE	D,SYSPP
	LOOKUP	U,A		;LOOKUP FILE OF HOME BLOCKS, ETC.
	  JRST	NOHOM
	SETZM	BUF1		;CLEAR 1ST WORD TO FORCE 1ST INPUT
	MOVE	B,STR		;STR NAME FOR FIRST UNIT
NXTU:	AOS	N,SATIND	;INDEX FOR SAT VALUES FOR NEXT UNIT
	PUSHJ	P,STRLUN	;COMPUTE NEXT LOGICAL UNIT OF STR
	MOVEM	B,CHRBUF	;NEXT UNIT
	MOVE	A,[XWD CHRLEN,CHRBUF]
	DSKCHR	A,
	  JRST	NOCHR
	MOVE	B,CHRBUF+CHRBPU	;TOTAL NUMBER OF BLOCKS ON THIS UNIT
	ADDM	B,BLKTOT	;COUNT TOTAL NUMBER OF BLOCKS IN STR
	MOVE	C,CHRBUF+CHRWPS	;RH=WORDS PER SAT BLOCK
	HRL	C,CHRBUF+CHRSPU	;LH=NUMBER OF SAT BLOCKS
	MOVE	B,SATIND
	MOVEM	C,SATTAB(B)	;SAVE IN TABLE FOR SAT BLOCK PROCESSOR
	PUSHJ	P,PHYNAM	;CONTRUCT PHYSICAL UNIT NAME IN WD
	TLNE	FL,F.U
	PUSHJ	P,SIXBT
	PUSHJ	P,FNDHOM	;FIND HOME BLOCK FOR THIS UNIT
	  JRST	NOHOMA
	TLNN	FL,F.U
	JRST	NXTU2		;NOT PRINTING UNIT ID'S
	MOVE	WD,BUF1+HOMHID
	PUSHJ	P,SIXBT		;GIVE 'EM UNIT ID
	MOVE	WD,CHRBUF	;AND LOGICAL UNIT IN STR
	PUSHJ	P,SIXBA
	JRST	.+2
NOHOMA:	PUSHJ	P,NOHOM1
	PUSHJ	P,CRLF
NXTU2:	TLNN	FL,F.V
	JRST	NXTUL		;DONT DO VITAL STATISTICS
	PUSHJ	P,PRNTHM	;PRINT HOME BLOCK
	MOVE	N,CHRBUF+CHRK4S	;K FOR SWAPPING ON THIS UNIT
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ . K (.]
	PUSHJ	P,MSG
	MOVE	N,CHRBUF+CHRK4S
	LSH	N,3
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ . BLOCKS) ALLOCATED FOR SWAPPING ON THIS UNIT

.]
	PUSHJ	P,MSG
NXTUL:	MOVE	B,BUF1+HOMNXT	;ID OF NEXT UNIT IN STR
	JUMPN	B,NXTU		;JUMP IF NOT DONE
LSTU:	MOVE	WD,CHRBUF+CHRFST	;GET NUMBER OF BLOCKS FREE ON STR
	MOVEM	WD,BLKFRE
	LDB	N,BPC		;GET BLOCKS PER CLUSTER THIS STR
	MOVEM	N,BLKCLS
	TLNN	FL,F.V
	JRST	NOCLS
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ . BLOCKS PER CLUSTER ON THIS STR
.]
	PUSHJ	P,MSG
NOCLS:	TLNN	FL,F.F		;NO HEADING IF NO FILES PRINTED
	JRST	NOHED
	TLNE	FL,LEVC+F.Q
	JRST	NOKEY		;IF LEVEL C
	MOVEI	M,KEYHED	;PRINT KEY FOR ERROR BITS
	PUSHJ	P,MSG		;TO TELL USER WHAT EACH BIT REPRESENTS
	MOVEI	N,RIPBDA
	MOVEI	M,BDAKEY
	PUSHJ	P,KEYMSG
	MOVEI	N,RIPCRH
	MOVEI	M,CRHKEY
	PUSHJ	P,KEYMSG
	MOVEI	N,RIPBFA
	MOVEI	M,BFAKEY
	PUSHJ	P,KEYMSG
	MOVEI	N,RIPHRE
	MOVEI	M,HREKEY
	PUSHJ	P,KEYMSG
	MOVEI	N,RIPHWE
	MOVEI	M,HWEKEY
	PUSHJ	P,KEYMSG
	MOVEI	N,RIPSCE
	MOVEI	M,SCEKEY
	PUSHJ	P,KEYMSG
	PUSHJ	P,CRLF2
NOKEY:	MOVEI	M,HED1		;FIRST PART OF HEADING
	PUSHJ	P,MSG
	MOVEI	M,HED2		;RETRIEVAL PTRS IF WIDE PAPER
	TLNN	FL,F.N
	PUSHJ	P,MSG
	MOVEI	M,HED3		;NEXT PART OF HEADING
	PUSHJ	P,MSG
	MOVEI	M,DHED4		;THIS PART FOR LEVEL D
	TLNN	FL,LEVC+F.Q
	PUSHJ	P,MSG
	MOVEI	M,CHED5		;LEVEL C WIDE PAPER STUFF
	TLNN	FL,LEVC+F.Q
	MOVEI	M,DHED5		;LEVEL D WIDE PAPER STUFF
	TLNN	FL,F.N		;DO IT IF WIDE PAPER
	PUSHJ	P,MSG
	MOVEI	M,HED6		;FIRST PART OF NEXT LINE
	PUSHJ	P,MSG
	MOVEI	M,HED7		;THIS GOES WITH RETRIEVAL PTRS
	TLNN	FL,F.N		;ONLY FOR WIDE PAPER
	PUSHJ	P,MSG
	MOVEI	M,HED8		;AND THE REST OF THE STANDARD
	PUSHJ	P,MSG
	MOVEI	M,DHED9		;THIS FOR LEVEL D
	TLNN	FL,LEVC+F.Q
	PUSHJ	P,MSG
	MOVEI	M,CHED10	;LEVEL C WIDE PAPER STUFF
	TLNN	FL,LEVC+F.Q
	MOVEI	M,DHED10	;LEVEL D WIDE PAPER STUFF
	TLNN	FL,F.N		;DO IT IF WIDE PAPER
	PUSHJ	P,MSG
	PUSHJ	P,CRLF2		;FINISH UP WITH BLANK LINES

NOHED:	MOVEI	A,14
	MOVE	B,STR
	HRRZI	C,UIB
	OPEN	U,A		;OPEN STR FOR UFD
C12:	  CALLI	12
	MOVE	A,[XWD TBLKCT,TBLKCT+1]
	BLT	A,HISTO+TOPHIS+1 ;CLEAR ERROR COUNTERS
	TLNE	FL,F.F+F.E	;DO FILES IF F OR E
	JRST	RML
	TLNN	FL,F.P		;DONT DO FILES UNLESS P
	JRST	DSAT
	TLO	FL,F.Q		;ONLY NEED QUICK LOOKUPS
RML:	PUSHJ P,RDM		;GET NEXT FILE NAME FROM MFD
	  JRST	FINIS		;EOF RETURN - NO MORE
	JUMPE	WD,RML		;IGNORE IF 0
	MOVE A,WD
	PUSHJ P,RDM		;GET EXT
	  JRST	FINIS		;NO MORE
	HLRZ B,WD
	CAIE B,(SIXBIT /UFD/)	;WE ONLY WANT UFD'S
	JRST RML
	MOVEM A,USRPP
	TLNN	FL,F.F
	JRST	RML2		;NOT PRINTING FILES - STILL MUST ALLOCATE
	MOVEI M,UFDMSG		;GOTCHA!
	PUSHJ P,MSG		;PRINT UFD FOR USER PJ,PG
	HLRZ N,USRPP
	PUSHJ P,OCTPRT
	PUSHJ P,COMMA
	HRRZ N,USRPP
	PUSHJ P,OCTPRT
	PUSHJ P,CRLF2
RML2:	TLNN	FL,LEVC+F.Q
	JRST	RML1		;EXTENDED LOOKUP IF LEVEL D
	HLLZ	B,WD		;REGULAR FOR LEVEL C
	SETZB	C,UBLKCT
	MOVE	D,MFDPP
	LOOKUP	U,A
	  JRST	NOUFD
	JRST	RML3
RML1:	MOVEM	A,LOOKBF+EXLNAM	;EXTENDED LOOKUP FOR LEVEL D
	MOVSI	A,(SIXBIT /UFD/)
	MOVEM	A,LOOKBF+EXLEXT
	MOVE	A,MFDPP
	MOVEM	A,LOOKBF+EXLPPN
	MOVEI	A,EXLLEN-1
	MOVEM	A,LOOKBF
	LOOKUP U,LOOKBF
	  JRST NOUFD
RML3:	SETZM	UBLKCT		;BUT IS ALREADY COUNTED IN TOTAL ALLOCATION
	SETZM	UFILCT		;BECAUSE MFD IS A UFD AND IS IN ITSELF
RUL:	PUSHJ P,RDU		;GET NEXT USER FILE FROM UFD
	  JRST	DONEU		;EOF RETURN - NO MORE
	JUMPE	WD,RUL		;IGNORE 0
	MOVEM WD,LOOKBF+EXLNAM
	PUSHJ P,RDU		;GET EXT
	  JRST	DONEU
	MOVEM WD,LOOKBF+EXLEXT
	MOVEM	WD,RTVPTR	;SAVE RETRIEVAL POINTER
	TLNN	FL,LEVC+F.Q
	JRST	RUL4
	HLLZ	B,WD		;LEVEL C LOOKUP
	MOVE	A,LOOKBF+EXLNAM	;GET FILE NAME
	SETZ	C,
	MOVE	D,USRPP		;USER'S PPN
	LOOKUP	F,A
	  TLOA	FL,LFAIL	;LOOKUP FAILED
	TLZ	FL,LFAIL
	MOVE	M,[XWD A,LKRET]
	BLT	M,LKRET+3
	JRST	RUL3
RUL4:	MOVE	WD,USRPP		;EXTENDED LOOKUP FOR LEVEL D
	MOVEM	WD,LOOKBF+EXLPPN
	MOVEI	WD,EXLLEN-1
	MOVEM	WD,LOOKBF
	LOOKUP F,LOOKBF
	  TLOA	FL,LFAIL	;SET FAIL BIT AND SKIP TO JUMP TO RUL3
	TLZA	FL,LFAIL	;CLEAR FAIL BIT AND SKIP SO WONT JUMP
	JRST	RUL3
	PUSHJ	P,LEVDUB	;COUNT BLOCKS ALLOCATED
	MOVE	A,LOOKBF+EXLSTS	;SEE IF ANY ERROR BITS SET FOR THIS FILE
	TRNE	A,RIPHRE
	AOS	HREFIL		;HARD READ ERROR
	TRNE	A,RIPHWE
	AOS	HWEFIL		;HARD WRITE ERROR
	TRNE	A,RIPSCE
	AOS	SCEFIL		;SOFTWARE CHECKSUM ERROR
	TRNE	A,RIPBDA
	AOS	BDAFIL		;ERROR FOUND BY DAMAGE ASSESSMENT CUSP
	TRNE	A,RIPBFA
	AOS	BFAFIL		;ERROR BOUND BY FAILSAFE
	TRNE	A,RIPCRH
	AOS	CRHFIL		;PARTIALLY WRITTEN FILE CLOSED AFTER MONITOR STOPPED
RUL3:	AOS	UFILCT		;COUNT USER FILES
	TLNN	FL,F.F
	JRST	RULA
	HLRZ A,LOOKBF+EXLEXT	;GET EXT
	CAIE A,(SIXBIT /UFD/)	;UFD'S HAVE ODDBALL FILE NAMES
	JRST RUL1
	HLRZ N,LOOKBF+EXLNAM	;NAMELY, PROJ, PROG  IN OCTAL
	PUSHJ P,OCTPRT
	PUSHJ P,COMMA
	HRRZ N,LOOKBF+EXLNAM
	PUSHJ P,OCTPRT
	HRRZ	N,LOOKBF+EXLNAM
	TRNN	N,770000	;IF PROG NUMBER MORE THEN 4 DIGITS, SPACE NOT TAB
	JRST	RUL7		;USE A TAB
	PUSHJ	P,SPC		;USE A SPACE
	JRST	RUL2
RUL7:	PUSHJ P,TAB
	JRST RUL2
RUL1:	MOVE WD,LOOKBF+EXLNAM	;ORDINARY FILES HAVE SIXBIT NAMES
	PUSHJ P,SIXBT
RUL2:	HLLZ WD,LOOKBF+EXLEXT	;EXT
	TLZE	FL,EXTFIL	;SKIP IF FILE NOT EXTENDED
	HRRI	WD,(SIXBIT /*  /)	;APPEND ASTERRISK TO EXTENSION
	PUSHJ P,SIXBT
	TLNE	FL,F.N		;SKIP IF DOING WIDE PAPER
	JRST	RUL5
	HRRZ	N,RTVPTR	;DO THE RETRIEVAL POINTER
	MOVEI	T,6
	PUSHJ	P,OCTSPC
	PUSHJ P,TAB
RUL5:	TLNN	FL,LFAIL	;DID LOOKUP FAIL?
	JRST LWIN		;NO
	MOVEI M,LFMSG		;YES
	PUSHJ P,MSG
	HRRZ N,LKRET+1
	TLNN	FL,LEVC+F.Q		;SKIP IF LEVEL C
	HRRZ	N,LOOKBF+EXLEXT	;LEVEL D ERROR CODE
	PUSHJ P,OCTPRT		;PRINT ERROR CODE
	TLNN	FL,LEVC+F.Q
	JRST	RUL6		;NOTHING MORE TO SAY IF LEVEL D
	MOVEI	T,4
	PUSHJ	P,TAB
	SOJG	T,.-1
	JRST	DRET		;PRINT LOOKUP BLOCK ANYWAY
RUL6:	PUSHJ	P,CRLF
	JRST	RUL

LWIN:	LDB	A,ADATEP	;GET LAST DATE ACCESSED
	TLNN	FL,LEVC+F.Q
	LDB	A,ADATED	;LEVEL D ACCESS DATE
	PUSHJ P,DATE
	LDB A,CTIMEP		;CREATION TIME
	TLNN	FL,LEVC+F.Q
	LDB	A,CTIMED	;LEVEL D CREATION TIME
	IDIVI A,^D60
	MOVEI	T,2
	MOVE	N,A
	PUSHJ	P,DECZRO
	MOVEI	T,2
	MOVE	N,B
	PUSHJ	P,DECZRO
	PUSHJ	P,SPC
	LDB	A,CDATEP	;CREATION DATE
	TLNN	FL,LEVC+F.Q
	LDB	A,CDATED	;LEVEL D CREATION DATE
	LDB 	N, CDAT1P	;HI-ORDER BITS OF CREATION DATE
	TLNN	FL, LEVC+F.Q
	LDB	N, CDAT1D	;HI-ORDER BITS OF LEVEL D CREATION DATE
	DPB	N, [POINT 3, A, 23]   ;PUT DATE TOGETHER
	PUSHJ	P,DATE
	LDB N,PROTP		;ACCESS PRIVILEGES
	TLNN	FL,LEVC+F.Q
	LDB	N,PROTD		;LEVEL D PROTECTION
	MOVEI	T,3
	PUSHJ	P,OCTZRO
	LDB N,MODEP		;MODE
	TLNN	FL,LEVC+F.Q
	LDB	N,MODED		;LEVEL D MODE
	MOVEI	T,3
	PUSHJ	P,OCTSPC
	PUSHJ	P,SPC
RULA:	MOVE	N,LOOKBF+EXLSIZ	;WORDS WRITTEN
	MOVE	TT,LOOKBF+EXLALC;BLOCKS ALLOCATED
	TLNN	FL,LEVC+F.Q
	JRST	LWIN3
	HLRE	N,LKRET+3	;GET BLOCKS IF + OR WORDS IF -
	CAILE	N,0		;SKIP IF WORDS
	IMULI	N,200		;CONVERT TO WORDS
	MOVMS	N		;N=WORDS WRITTEN
	MOVE	T,N
	ADDI	T,177
	ASH	T,-7		;T=BLOCKS WRITTEN
	ADDM	T,UBLKCT	;COUNT BLOCKS WRITTEN
	IDIVI	T,^D126		;NOW FIGURE OUT HOW MANY RIBS
	CAILE	TT,^D122
	AOS	UBLKCT
	AOS	UBLKCT
	ADDM	T,UBLKCT
	MOVE	TT,N		;TT=WORDS WRITTEN
	ADDI	TT,177
	ASH	TT,-7		;=BLOCKS WRITTEN
LWIN3:	MOVE	T,N		;T=WORDS WRITTEN
	ADDI	T,177
	LSH	T,-7		;CONVERT TO BLOCKS WRITTEN
	CAILE	T,TOPHIS+1	;SKIP IF WITHIN HISTOGRAM
	MOVEI	T,TOPHIS+1	;NOTE OFF TOP
	AOS	HISTO(T)	;COUNT NUMBER OF FILES OF THIS LENGTH
	TLNN	FL,F.F
	JRST	RUL
	MOVEI	T,7		;N=WORDS WRITTEN, TT=BLOCKS ALLOC
	PUSHJ	P,DECSPC	;PRINT WORDS WRITTEN
	PUSHJ	P,SPC
	MOVE	N,TT		;BLOCKS ALLOCATED
	MOVEI	T,7
	PUSHJ	P,DECSPC	;PRINT BLOCKS ALLOCATED
LWIN5:	TLNE	FL,LEVC+F.Q
	JRST	DRET		;LEVEL C, GIVE INFO FROM LOOKUP BLOCK
	LDB	N,ERRBTS	;GET ERROR BITS
	MOVEI	T,5
	PUSHJ	P,OCTSPC
	TLNE	FL,F.N
	JRST	NAR1
	PUSHJ	P,TAB
	MOVE	WD,LOOKBF+EXLMTA	;TAPE FILE IS SAVED ON
	PUSHJ	P,SIXBT
	HLRZ	N,LOOKBF+EXLVER	;PROG MAKING LAST CHANGE
	PUSHJ	P,OCTPRT
	PUSHJ	P,COMMA
	HRRZ	N,LOOKBF+EXLVER	;VERSION NUMBER
	PUSHJ	P,OCTPRT
NAR1:	PUSHJ	P,CRLF
	JRST	RUL

DRET:	TLNE	FL,F.N		;SKIP THIS IF NARROW PAPER
	JRST	DRET2
	PUSHJ	P,TAB
	HRRZ	N,LKRET+1	;RIGHT HALF OF WORD 2
	MOVEI	T,6
	PUSHJ	P,OCTZRO
	PUSHJ	P,TAB
	MOVE	N,LKRET+2	;WORD 3
	PUSHJ	P,OCT12
	PUSHJ	P,SPC
	PUSHJ	P,SPC
	MOVE	N,LKRET+3	;WORD 4
	PUSHJ	P,OCT12
DRET2:	PUSHJ	P,CRLF
	JRST	RUL
KEYMSG:	PUSHJ	P,TAB		;TAB
	PUSHJ	P,OCTPRT	;BIT IS IN N
	PJRST	MSG		;ADDRESS OF MESSAGE IN M

LEVDUB:	MOVE	A,LOOKBF+EXLALC	;NUMBER OF BLOCKS ALLOCATED FOR THIS FILE
	MOVE	B,LOOKBF+EXLSIZ	;NUMBER OF WORDS WRITTEN
	ADDM	B,TWRDW		;COUNT TOTAL WORDS WRITTEN
	IDIVI	B,^D128		;CONVERT TO BLOCKS
	CAIE	C,0		;IF NON-0, DONT COUNT THIS BLOCK WASTED
	ADDI	B,1
	ADDI	B,2		;+2 FOR RIBS (NOT COUNTED IN BLOCKS WRITTEN)
	SKIPL	LOOKBF+EXLXRA	;SKIP IF EXTENDED RIB EXISTS
	JRST	DUB2		;NO, PROCEED
	ADDI	B,2		;MAKE A STAB AT NUMBER OF ADDITIONAL BLOCKS FOR RIBS
	TLO	FL,EXTFIL	;FLAG FOR PRINTING
	AOS	XRBTOT		;ADD TO NUMBER OF EXTENDED FILES
DUB2:	SUBM	A,B		;B = BLOCKS WASTED
	CAMGE	B,BLKCLS	; (NOT COUNTING BLOCK PARTIALLY WRITTEN)
	JRST	DUB1		;IF MORE THAN 1 CLUSTER, SOMETHING ELSE HAPPENING
	PUSH	P,C		;SAVE C
	IDIV	B,BLKCLS	;GET NUMBER OF BLOCKS WASTED IN LAST CLUSTER WRITTEN
	ADDM	B,ECLUS		;COUNT COMPLETELY UNWRITTEN CLUSTERS
	MOVE	B,C		;BLOCKS WASTED IN PARTIALLY WRITTEN CLUSTERS
	POP	P,C		;RESTORE C
DUB1:	MOVNS	C		;- NUMBER OF WORDS WRITTEN IN LAST BLOCK
	ADDM	B,WASTEB	;COUNT WASTED BLOCKS
	CAIE	C,0		;IF 0 WORDS WRITTEN IN LAST BLOCK,
	ADDI	C,^D128		; COUNTED AS BLOCK, ELSE 128-C=WASTED WORDS
	ADDM	C,WASTEW
	ADDM	A,UBLKCT
	POPJ	P,

NOSTR:	MOVEI	M,[ASCIZ .NO SUCH FILE STRUCTURE
.]
	PUSHJ	P,MSG
	JRST	UFDOUT

NOMFD:	MOVEI	M,[ASCIZ .NO MFD
.]
	PUSHJ	P,MSG
	JRST	UFDOUT
NOUFD:	MOVEI M,NOUMSG
	TLNE	FL,F.F
	PUSHJ P,MSG
	JRST	RML

NOCHR:	MOVEI	M,[ASCIZ .DSKCHR.]
	SKIPA	B,CHRBUF		;B IS STR NAME
NOPEN:	MOVEI	M,[ASCIZ .OPEN.]
	PUSHJ	P,MSG
	MOVEI	M,[ASCIZ . FAILED FOR UNIT .]
	PUSHJ	P,MSG
	MOVE	WD,B
	PUSHJ	P,SIXBA
	PUSHJ	P,CRLF
	JRST	NOCHR1

NOHOM:	MOVEI	M,[ASCIZ /
NO HOME.SYS
/]
	PUSHJ	P,MSG
NOCHR1:	MOVE	B,STR
	MOVEM	B,CHRBUF
	MOVE	A,[XWD CHRBPU+1,CHRBUF]
	DSKCHR	A,
	  JFCL
	JRST	LSTU

PRNTHM:	MOVEI	M,HOMMSG	;PRINT HOME BLOCK
	PUSHJ	P,MSG
	PJRST	BLKPRT
DONEU:	MOVE	N,UFILCT	;NUMBER OF USER FILES
	ADDM	N,TFILCT	;TOTAL NUMBER OF FILES
	MOVE	N,UBLKCT	;ADD USER'S BLOCKS TO TOTAL FOR STR
	ADDM	N,TBLKCT
	TLNN	FL,F.F
	JRST	RML		;IF NOT PRINTING FILES TO NEXT USER
	PUSHJ	P,CRLF
	PUSHJ	P,TAB
	PUSHJ	P,DECPRT	;PRINT NUMBER OF BLOCKS ALLOCATED
	MOVEI	M,BLKMSG
	PUSHJ	P,MSG
	MOVE	N,UBLKCT
	LSH	N,7
	PUSHJ	P,DECPRT	;= WORDS
	MOVEI	M,UBLKMG
	PUSHJ	P,MSG
	MOVEI	M,AVEMSG	;NOW GET AVERAGE FILE SIZE
	PUSHJ	P,MSG
	MOVE	N,UFILCT	;COUNT 1 FILE FOR UFD
	PUSHJ	P,DECPRT
	MOVEI	M,AVEMS1
	PUSHJ	P,MSG
	MOVE	N,UBLKCT	;BLOCKS ALLOCATED
	IDIV	N,UFILCT	;COMPUTE AVERAGE FILE SIZE
	PUSHJ	P,DECPRT	;AND PRINT
	MOVEI	M,UBLK1
	PUSHJ	P,MSG
	JRST	RML

FINIS:	TLNN	FL,F.F		;IF NOT PRINTING FILES, MOVE ON
	JRST	DSAT
	PUSHJ	P,CRLF3
	PUSHJ	P,TAB
	MOVE	N,TBLKCT	;TOTAL NUMBER OF BLOCKS ALLOCATED ON STR
	PUSHJ	P,DECPRT
	MOVEI	M,BLKMSG
	PUSHJ	P,MSG
	MOVE	N,TBLKCT
	ASH	N,7		;IN WORDS
	PUSHJ	P,DECPRT
	MOVEI	M,TBLKMG
	PUSHJ	P,MSG
	MOVEI	M,AVEMSG	;NOW GET AVERAGE FILE SIZE
	PUSHJ	P,MSG
	MOVE	N,TFILCT	;NUMBER OF FILES
	PUSHJ	P,DECPRT	;AND PRINT
	MOVEI	M,AVEMS1
	PUSHJ	P,MSG
	MOVE	N,TBLKCT
	IDIV	N,TFILCT	;COMPUTE AVERAGE FILE SIZE
	PUSHJ	P,DECPRT
	MOVEI	M,UBLK1
	PUSHJ	P,MSG
	PUSHJ	P,TAB
	MOVE	N,XRBTOT	;GET COUNT OF EXTENDED FILES
	PUSHJ	P,DECPRT
	MOVEI	M,EXTMSG	;EXTENDED FILE MESSAGE
	PUSHJ	P,MSG
DSAT:	SETSTS	U,17		;CHANGE TO DUMP MODE
	MOVE A,[SIXBIT /*SAT*/]	;LOOKUP SAT FILE
	TLNN	FL,LEVC		;SKIP IF NOT LEVEL D
	MOVSI	A,(SIXBIT .SAT.) ;NAME IS CHANGED IN LEVEL D
	MOVSI B,(SIXBIT /SYS/)
	MOVEI C,0
	MOVE D,SYSPP
	LOOKUP U,A
	  JRST DSAT.E		;NOPE
	SETZB	TT,TOT
	SETOM LASTN		;FOR COMPARISONS
	SETZM SAME		;NON-ZERO WHEN MULTIPLES
	TLNE	FL,LEVC		;FOR LEVEL D, SKIP 1ST CLUSTER
	JRST	DSAT.I
	SETOB	T,SATIND	;INITIALIZE POINTERS TO SATTAB
	JRST	DSAT.S		;(1ST RIB REQUIRES A FULL CLUSTER)
DSAT.I:	INPUT U,BUF1L		;GET NEXT BLOCK
	STATZ	U,EOF
	JRST	DSAT.T		;ALL DONE

	AOS TT		;COUNT SAT BLOCKS READ

;COUNT FREE BLOCKS

	MOVEI	C,^D128*^D36
	TLNE	FL,LEVC		;SKIP IF RUNNING LEVEL D SOFTWARE
	JRST	DSAT2
	MOVE	N,SATIND
	SOJG	T,DSATN		;JUMP IF MORE SAT BLOCKS FOR THIS UNIT
	AOS	N,SATIND	;BUMP INDEX TO NEXT UNIT
	TLNN	FL,F.S
	JRST	NOSATP
	MOVEI	CH,FORM
	PUSHJ	P,TYO
	MOVEI	M,[ASCIZ .SAT BLOCKS FOR .]
	PUSHJ	P,MSG
	PUSHJ	P,STRLUN	;COMPUTE SIXBIT LOGICAL UNIT NUMBER OF THIS UNIT
	MOVE	WD,B
	PUSHJ	P,SIXBT
	PUSHJ	P,CRLF2
	MOVE	N,SATIND	;RESTORE INDEX OF THIS SAT
NOSATP:	HLRZ	T,SATTAB(N)	;GET NUMBER OF SAT BLOCKS FOR NEXT UNIT
DSATN:	HRRZ	C,SATTAB(N)	;GET NUMBER OF WORDS IN THIS SAT BLOCK
	IMULI	C,^D36		;CONVERT TO BITS TO SCAN
DSAT2:	MOVEI	N,0		;N WILL BE COUNT OF FREE BLOCKS
	MOVE A,[XWD 440100,BUF1]

DSAT.C:	SOJL	C,DSAT.F
	ILDB D,A
	JUMPN	D,DSAT.C
	AOJA N,DSAT.C		;COUNT FREE CLUSTERS (=0 BITS)
DSAT.F:	IMUL	N,BLKCLS	;CONVERT TO FREE BLOCKS
	MOVEM N,SAVEN		;SAVE FOR LATER PRINTING
	ADD TOT,N		;ADD TO GRAND TOTAL
	CAME N,LASTN		;# FREE SAME AS PREVIOUS
	JRST DSAT.O		;NO
	MOVEM TT,SAME		;REMEMBER SAT BLOCK #
	JRST DSAT.S

DSAT.O:	MOVE	N,SAVEN
	MOVEM	N,LASTN		;SAVE # IN BLOCK TO BE PRINTED
	TLNN	FL,F.S
	JRST	DSAT.S
	SKIPE SAME	;ANY MULTIPLES?
	PUSHJ P,PRMULT		;YES. PUBLISH FACT.
	MOVEI	M,SATMSG
	PUSHJ	P,MSG
	MOVE	N,TT
	PUSHJ	P,OCTPRT
	PUSHJ P,SPC
	PUSHJ P,SPC
	MOVE N,SAVEN
	PUSHJ P,DECPRT
	MOVEI M,FREMSG
	PUSHJ P,MSG		;PRINT # OF FREE BLOCKS

;PRINT CONTENTS OF SAT BLOCK

	SKIPE	SAVEN		;DON'T PRINT IF NONE FREE
	PUSHJ	P,BLKPRT	;PRINT THIS SAT BLOCK

DSAT.S:	MOVE	N,BLKCLS	;GET BLOCKS PER CLUSTER
DSATS1:	SOJE	N,DSAT.I	;NOW SKIP THE REST OF THE BLOCKS IN THIS CLUSTER
	INPUT	U,BUF1L		;SINCE ONLY WRITTEN IN FIRST BLOCK OF CLUSTER
	STATO	U,EOF		;TO KEEP SAT BLOCKS NEAR THE REGION THEY REPRESENT
	JRST	DSATS1

DSAT.T:	TLNN	FL,F.S
	JRST	DSAT.E		;IF NOT PRINTING SAT BLOCKS, MOVE ON
	SKIPE SAME		;ANY UNPRINTED MULTIPLES?
	PUSHJ P,PRMULT		;YES
	PUSHJ	P,CRLF2
	MOVE	N,TOT		;TOTAL FREE BLOCKS
	PUSHJ	P,DECPRT
	MOVEI	M,BLKMSG
	PUSHJ	P,MSG
	MOVE	N,TOT
	LSH	N,7		;IN WORDS
	PUSHJ	P,DECPRT
	MOVEI	M,TOTMSG
	PUSHJ	P,MSG
DSAT.E:	TLNE	FL,LEVC
	JRST	NOSUM		;NO BAT BLOCKS OR ERROR SUMMARY IF LEVEL C
	MOVEM	TOT,TOTSAT
	TLNN	FL,F.B		;SKIP IF BAT BLOCKS WANTED
	JRST	ESUM		;NO, MOVE ON
	MOVE	A,[SIXBIT .HOME.]	;LOOKUP HOME.SYS BECAUSE
	MOVSI	B,(SIXBIT .SYS.)	;BAT BLOCK FOLLOWS HOME BLOCK
	SETZ	C,
	MOVE	D,SYSPP
	LOOKUP	U,A
	  JRST	ESUM
	SETOM	SATIND
	SETZM	BUF1		;FORCE 1ST INPUT
BATB:	AOS	N,SATIND	;GET NEXT LOGICAL UNIT IN STR NUMBER
	PUSHJ	P,FNDHOM	;FIND HOME BLOCK FOR THIS UNIT
	  JRST	ESUM
	MOVE	WD,BUF1+HOMHID	;WD=UNIT ID
	PUSHJ	P,STRLUN
	MOVEI	CH,FORM		;B=SIXBIT LOG UNIT IN STR
	PUSHJ	P,TYO		;EJECT PAGE FOR NEATNESS
	MOVEI	M,BATHED
	PUSHJ	P,MSG
	EXCH	B,WD		;B=UNIT ID, WD=LOG UNIT
	PUSHJ	P,SIXBA		;PRINT LOG UNIT
	MOVEI	CH,"("
	PUSHJ	P,TYO
	MOVEM	WD,CHRBUF
	MOVE	WD,B		;WD=UNIT ID
	PUSHJ	P,SIXBA
	MOVEI	M,[ASCIZ .) CURRENTLY ON .]
	PUSHJ	P,MSG
	MOVE	A,[XWD CHRCHR+1,CHRBUF]
	DSKCHR	A,
	  JRST	BATB1
	PUSHJ	P,PHYNAM
	LDB	TT,KONTYP	;SAVE KONTROLLER TYPE
	PUSHJ	P,SIXBA
	PUSHJ	P,CRLF
	STATZ	U,20000		;SKIP UNLESS EOF
	JRST	BATB1
	MOVE	B,BUF1+HOMNXT
	INPUT	U,BUF1L		;NEXT BLOCK SHOULD BE BAT BLOCK
	MOVSI	A,(SIXBIT .BAT.)
	CAME	A,BUF1		;CHECK BLOCK NAME
	JRST	BATB1		;NOT A BAT BLOCK
	TLZ	FL,OTHERK
	MOVEI	M,[ASCIZ /
BAD SECTORS (MAP) = /]
	PUSHJ	P,MSG
	LDB	N,SECBAD	;GET NUMBER OF BAD SECTORS
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ /  BAD REGIONS (MAP) = /]
	PUSHJ	P,MSG
	LDB	N,MAPBAD	;BAD REGIONS FOUND BY MAP PROGRAM
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ /  BAD REGIONS (MON) = /]
	PUSHJ	P,MSG
	HRRZ	N,BUF1+BAFCNT	;BAD REGIONS FOUND BY MONITOR
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ \	CONTROLLER DEVICE CODE (MAP) = \]
	PUSHJ	P,MSG
	LDB	N,MAPKDC
	LSH	N,2
	PUSHJ	P,OCTPRT
	PUSHJ	P,BLKPRT	;NOW ZAP OUT THE WHOLE BLOCK
	MOVE	TOT,BUF1+BAFPTR
	ADDI	TOT,BUF1
	HLRE	A,TOT		;A=-NUMBER OF WORDS FOR PTRS
	MOVNS	A
	ADDI	A,-1(TOT)	;A=PTR TO LAST WORD
BATB3:	SKIPE	-1(A)
	JRST	BATB4
	SUBI	A,2
	CAILE	A,(TOT)
	JRST	BATB3
	JRST	BATB2
BATB4:	MOVEI	M,[ASCIZ .BAD REGIONS LISTED MOST RECENTLY FOUND FIRST:

.]
	PUSHJ	P,MSG
BATB5:	MOVE	C,(A)
	TLZ	C,777000
	PUSHJ	P,PBNPRT	;PRINT PHYSICAL DISK ADDRESS
	MOVEI	M,[ASCIZ \	= BLOCK \]
	PUSHJ	P,MSG
	HRRZ	N,(A)
	PUSHJ	P,PAREQ
	MOVE	N,(A)
	TLZ	N,777000
	PUSHJ	P,DECPRT
	PUSHJ	P,DOTPAR
	LDB	C,BAYNBB	;# BAD BLOCKS THIS REGION
	JUMPE	C,ONLY1		;JUMP IF ONLY 1 BLOCK
	MOVEI	M,[ASCIZ . THROUGH
.]
	PUSHJ	P,MSG
	HRRZ	D,(A)
	ADD	C,D		;C=LAST BLOCK
	PUSHJ	P,PBNPRT
	MOVEI	M,[ASCIZ \	= \]
	PUSHJ	P,MSG
	LDB	C,BAYNBB
	MOVEI	N,1(C)
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ \. BAD BLOCKS\]
	PUSHJ	P,MSG
ONLY1:	MOVEI	M,[ASCIZ .
FOUND ON .]
	PUSHJ	P,MSG
	MOVSI	WD,BAPOTH
	TDNN	WD,-1(A)	;SKIP IF FOUND ON ANOTHER KONTROLLER
	JRST	ONLY1F		;NO
	MOVEI	CH,"*"
	PUSHJ	P,TYO
	TLO	FL,OTHERK
ONLY1F:	MOVE	WD,KONSIX(TT)
	PUSH	P,A
	PUSHJ	P,SIXBA
	POP	P,A
	LDB	CH,BAYLKN
	ADDI	CH,"A"
	PUSHJ	P,TYO
	MOVEI	M,[ASCIZ . UNIT(S) .]
	PUSHJ	P,MSG
	MOVSI	C,BAPBDU
	MOVEI	D,7
ONLY1A:	TDNE	C,-1(A)
	JRST	ONLY1B
	LSH	C,-1
	TRNN	C,-1
	SOJA	D,ONLY1A
	JRST	ONLY1E
ONLY1B:	MOVE	N,D
	PUSHJ	P,OCTPRT
	JRST	ONLY1D
ONLY1C:	TDNN	C,-1(A)
	JRST	ONLY1D
	PUSHJ	P,COMMA
	PUSHJ	P,OCTPRT
ONLY1D:	LSH	C,-1
	TRNN	C,-1
	AOJA	D,ONLY1C
ONLY1E:	MOVEI	M,[ASCIZ \ PROCESSOR \]
	PUSHJ	P,MSG
	LDB	N,BAYPRN
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ \.
TYPE OF ERROR = \]
	PUSHJ	P,MSG
	HLRZ	N,(A)
	MOVEI	T,6
	PUSHJ	P,OCTZRO
	MOVE	N,(A)
	TLNE	N,20000
	MOVEI	M,[ASCIZ .	DATA ERROR.]
	TLNE	N,10000
	MOVEI	M,[ASCIZ .	SEARCH OR HEADER ERROR.]
	TLNE	N,30000
	PUSHJ	P,MSG
	PUSHJ	P,CRLF2
	SUBI	A,2
	CAILE	A,(TOT)
	JRST	BATB5
	MOVEI	M,[ASCIZ \
* ALSO FOUND ON SOME OTHER CONTROLLER OR PROCESSOR
\]
	TLNE	FL,OTHERK	;SKIP IF NO REGIONS FOUND BAD ON ANOTHER KONTROLLER
	PUSHJ	P,MSG
	JRST	BATB2
BATB1:	MOVEI	M,[ASCIZ /NO BAT BLOCK
/]
	PUSHJ	P,MSG
	STATO	U,20000
BATB2:	JUMPN	B,BATB		;LOOP IF MORE HOME BLOCKS
ESUM:	TLNN	FL,F.E
	JRST	NOSUM		;DON'T WANT ERROR SUMMARY
	MOVEI	M,WASMS1
	PUSHJ	P,MSG
	MOVE	N,WASTEW	;NUMBER OF WORDS IN WASTED IN PARTIALLY WRITTEN BLOCKS
	PUSHJ	P,DECPRT
	PUSHJ	P,SLASH
	MOVE	N,TWRDW		;TOTAL WORDS WRITTEN
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ . = .]
	PUSHJ	P,MSG
	MOVE	N,WASTEW
	IMULI	N,^D100		;EXPRESSED AS A PERCENTAGE
	IDIV	N,TWRDW
	PUSHJ	P,DECPRT
	PUSHJ	P,%CRLF
	MOVEI	M,WASMS2
	PUSHJ	P,MSG
	MOVE	N,WASTEB	;WASTED BLOCKS IN PARTIALLY WRITTEN CLUSTERS
	PUSHJ	P,DECPRT
	PUSHJ	P,SLASH
	MOVE	N,ECLUS
	IMUL	N,BLKCLS	;CONVERT UNWRITTEN CLUSTERS TO BLOCKS
	MOVE	N1,TBLKCT
	SUBM	N1,N
	MOVEM	N,SATIND	;SAVE FOR LATER DIVIDE
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ . = .]
	PUSHJ	P,MSG
	MOVE	N,WASTEB	;EXPRESSED AS A PERCENTAGE OF BLOCKS ALLOCATED
	IMULI	N,^D100
	IDIV	N,SATIND
	PUSHJ	P,DECPRT
	PUSHJ	P,%CRLF
	MOVEI	M,WASMS3
	PUSHJ	P,MSG
	MOVE	N,BLKTOT	;TOTAL BLOCKS ON STR
	SUB	N,TBLKCT	;COMPUTED FREE = TOTAL - USED
	SKIPN	BLKTOT		;SKIP UNLESS CANT COMPUTE FREE BLOCKS
	MOVE	N,BLKFRE
	CAMN	N,BLKFRE	;COMPARE WITH FREE BLOCKS FROM DSKCHR
	CAME	N,TOTSAT	;AND WITH 0 BITS IN SAT
	CAIA			;IF DISCREPANCY, PRINT
	JRST	ALLMAT		;NO PROB
	MOVEI	M,MISMSG
	PUSHJ	P,MSG
	PUSHJ	P,DECPRT	;PRINT COMPUTED FREE BLOCKS
	MOVE	N,BLKTOT
	SUB	N,TBLKCT
	SKIPN	BLKTOT		;SKIP UNLESS CANT COMPUTE FREE BLOCKS
	MOVE	N,BLKFRE
	CAMGE	N,[^D99999999]	;SKIP IF OVERFLOWED 8 CHARS
	PUSHJ	P,TAB		;ELSE OUTPUT TAB TO COMPENSATE
	PUSHJ	P,TAB		;ALWAYS DO THIS ONE
	MOVE	N,BLKFRE	;FROM DSKCHR
	PUSHJ	P,DECPRT
	MOVE	N,BLKFRE
	CAMGE	N,[^D99999999]
	PUSHJ	P,TAB		;AGAIN A TAB IF NECESSARY
	PUSHJ	P,TAB		;AND ALWAYS NECESSARY
	MOVE	N,TOTSAT	;AND FROM SAT
	PUSHJ	P,DECPRT
	PUSHJ	P,CRLF
ALLMAT:	MOVEI	M,ERRHED
	PUSHJ	P,MSG
	MOVE	N,HWEFIL	;NUMBER OF FILES WITH HARD WRITE ERRORS
	PUSHJ	P,DECPRT
	PUSHJ	P,TAB
	MOVE	N,HREFIL	;NUMBER OF FILES WITH HARD READ ERRORS
	PUSHJ	P,DECPRT
	PUSHJ	P,TAB
	MOVE	N,SCEFIL	;SOFTWARE CHECKSUM ERRORS
	PUSHJ	P,DECPRT
	PUSHJ	P,TAB
	MOVE	N,BDAFIL	;FILES FOUND BAD BY DAMAGE ASSESSMENT PROG
	PUSHJ	P,DECPRT
	PUSHJ	P,TAB
	MOVE	N,BFAFIL	;BY FAILSAFE
	PUSHJ	P,DECPRT
	PUSHJ	P,TAB
	MOVE	N,CRHFIL	;PARTIALLY WRITTEN FILES CLOSED AFTER MONITOR STOPPED
	PUSHJ	P,DECPRT
	PUSHJ	P,CRLF
NOSUM:	TLNN	FL,F.P		;SKIP IF PERFORMANCE STATISTICS DESIRED
	JRST	NOPERF
	MOVEI	CH,FORM
	PUSHJ	P,TYO
	MOVEI	M,HISHED	;HISTOGRAM HEADER
	PUSHJ	P,MSG
	SETZ	T,		;START AT BEGINNING
HISLOP:	PUSHJ	P,HISLIN	;OUTPUT LENGTH OF FILE AND NUMBER OF FILES
	CAIE	T,TOPHIS	;SEE IF REACHED TOP
	AOJA	T,HISLOP	;NO, KEEP GOING
	MOVEI	M,[ASCIZ .GE .]
	PUSHJ	P,MSG
	ADDI	T,1
	PUSHJ	P,HISLIN
NOPERF:	MOVEI	CH,FORM		;FORM FEED
	PUSHJ	P,TYO
	RELEAS	U,0
	RELEAS	F,0
	RELEAS	S,0
	JRST	UFDOUT

HISLIN:	MOVE	N,T		;NUMBER OF BLOCKS WRITTEN
	PUSHJ	P,DECPRT
	PUSHJ	P,TAB
	PUSHJ	P,TAB
	MOVE	N,HISTO(T)		;NUMBER OF FILES OF THAT LENGTH
	PUSHJ	P,DECPRT
	PJRST	CRLF2

PRMULT:	PUSHJ P,CRLF2
	MOVE N,LASTN
	PUSHJ P,DECPRT
	MOVEI M,THRUMS
	PUSHJ P,MSG
	MOVE N,SAME
	PUSHJ P,OCTPRT
	PUSHJ P,CRLF2
	SETZM SAME
	POPJ P,

PHYNAM:	LDB	B,KONTYP	;GET CONTROLLER TYPE OF NEXT UNIT
	MOVE	WD,KONSIX(B)	;SIXBIT MNEMONIC
	LDB	B,KONNUM	;GET CONTROLLER NUMBER
	MOVEI	CH,41(B)	;CONVERT TO SIXBIT FOR A, B, C ETC.
	TLO	WD,(CH)		;STORE IN NAME
	LDB	B,UNINUM	;GET UNIT NUMBER
	MOVEI	CH,20(B)	;CONVERT TO SIXBIT SYMBOL
	DPB	CH,[POINT 6,WD,23]
	POPJ	P,

PBNPRT:	MOVEI	M,[ASCIZ .CYLINDER .]
	PUSHJ	P,MSG
	HRRZ	D,CHRBUF+CHRCHR
	IDIV	C,D		;C=CYL, D=REMAINDER
	MOVE	N,C
	PUSHJ	P,PAREQ
	MOVE	N,C
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ \.)	SURFACE \]
	PUSHJ	P,MSG
	MOVE	C,D
	LDB	D,[POINT 9,CHRBUF+CHRCHR,17]
	IDIV	C,D		;C=SURFACE, D=SECTOR
	MOVE	N,C
	PUSHJ	P,PAREQ
	MOVE	N,C
	PUSHJ	P,DECPRT
	MOVEI	M,[ASCIZ \.)	SECTOR \]
	PUSHJ	P,MSG
	MOVE	N,D
	PUSHJ	P,PAREQ
	MOVE	N,D
	PUSHJ	P,DECPRT
DOTPAR:	JSP	M,MSG
	ASCIZ	\.)\

PAREQ:	PUSHJ	P,OCTPRT
	JSP	M,MSG
	ASCIZ	. (= .
STRLUN:	MOVE	B,STR
	MOVE	T,[POINT 6,B]
	ILDB	CH,T
	JUMPN	CH,.-1		;FIND END OF STR NAME
	MOVEI	CH,B
	CAIE	CH,(T)
	POPJ	P,		;CUT IF STR NAME TOO LONG
	TLNN	T,770000
	POPJ	P,
	IDIVI	N,^D10
	JUMPE	N,STRLU1
	ADDI	N,20
	DPB	N,T
	IBP	T
STRLU1:	ADDI	N1,20
	TLNE	T,770000
	DPB	N1,T
	POPJ	P,

NOHOM1:	MOVEI	M,[ASCIZ /NO HOME BLOCK/]
	PJRST	MSG

BLKPRT:	PUSHJ	P,CRLF2		;OCTAL DUMP OF BLOCK AT BUF1
	MOVE A,[XWD -200,BUF1]
DSAT.L:	TLNN A,7
	PUSHJ P,CRLF
	MOVE N,0(A)
	PUSHJ P,OCT12
	PUSHJ P,SPC
	AOBJN A,DSAT.L
	JRST	CRLF2

NXTU1:	STATZ	U,20000		;SKIP IF EOF
	POPJ	P,
	INPUT	U,BUF1L		;READ NEXT BLOCK IN HOME.SYS
FNDHOM:	MOVSI	WD,(SIXBIT .HOM.)
	CAME	WD,BUF1+HOMNAM	;SKIP IF IT IS A HOME BLOCK
	JRST	NXTU1		;NO, READ NEXT BLOCK
	MOVE	WD,BUF1+HOMLUN	;SEE IF IT IS THIS UNIT
	CAMLE	WD,SATIND
	POPJ	P,		;NO, PAST IT
	CAME	WD,SATIND	;SKIP IF IT IS THIS UNIT
	JRST	NXTU1
CPOPJ1:	AOS	(P)
	POPJ	P,
GETSTR:	SETOM	STRIND		;SET INDEX IN FILE STR TABLE TO -1
	TLNE	FL,LEVC
	JRST	EXC
STR1:	SETZ	WD,
	MOVE	TT,[POINT 6,WD]
	PUSHJ	P,SSP		;GET FIRST NON-SPACE CHAR
STR2:	MOVE	C,[XWD -COML,COMLST]
	JRST	DISPAT		;DISPATCH

COMLST:	XWD	CR,COMMAC
	XWD	LF,EXIT
	XWD	"/",SWITCH
	XWD	":",COMMAC
	XWD	",",COMMAC
COML=.-COMLST
	CHAR

	DEFINE	CML(A)<IRP A,<XWD "A",A'SW>>

SWLST:	XWD	CR,STR1
	XWD	LF,EXIT
	CML	<U,V,F,S,B,E,N,H,P,Q>
SWLL=.-SWLST
	SYNERR

SWITCH:	JUMPE	WD,SW1		;IF WD NON-ZERO, TIS A FILE STR
	AOS	CH,STRIND	;BUMP INDEX
	CAIGE	CH,MAXFS	;IF TOO MANY, IGNORE IT
	MOVEM	WD,STRTAB(CH)
SW1:	PUSHJ	P,GETCHR	;NEXT CHAR IS SWITCH CHAR
	MOVE	C,[XWD -SWLL,SWLST]	;GO TO PROPER ROUTINE

DISPAT:	HLRZ	D,(C)
	CAIE	CH,(D)
	AOBJN	C,DISPAT
	HRRZ	D,(C)
	JRST	(D)

	DEFINE	CODSW(A)<IRP A,<
A'SW:	TLO	FL,F.'A
	JRST	STR1
>>

	CODSW	<U,V,F,S,B,E,N,P,Q>

HSW:	TTCALL	OUTSTR,HELPMS
HSW1:	PUSHJ	P,GETCHR	;IGNORE REST OF LINE
	CAIE	CH,LF
	JRST	HSW1
	JRST	GETSTR

CHAR:	CAIG	CH,40
	JRST	SYNERR		;IF BREAK CHAR, WE DON'T GET IT
	SUBI	CH,40		;MAKE SIXBT
	TLNE	TT,770000
	IDPB	CH,TT
	PUSHJ	P,GETCHR	;GET NEXT CHAR
	JRST	STR2		;END KEEP ON

SYNERR:	TTCALL	OUTSTR,[ASCIZ .
?SYNTAX ERROR.]
	CALLI	12
COMMAC:	JUMPE	WD,STR1		;IF NO STR, FORGET IT
	AOS	TT,STRIND	;BUMP INDEX TO STR TABLE
	CAIGE	TT,MAXFS	;IF TOO BIG, DONT STORE
	MOVEM	WD,STRTAB(TT)
	CAIE	CH,CR
	JRST	STR1

EXIT:	AOSE	A,STRIND
	POPJ	P,		;IF STR'S WERE NAMED, WAS NOT -1
	SETZ	B,		;NONE NAMED MEANS USE ALL
EX1:	SYSSTR	A,		;NEXT STR IN SYSTEM
	  SETZ	A,
	MOVEM	A,STRTAB(B)
	JUMPE	A,CPOPJ		;0 MEANS LAST
	AOJA	B,EX1

EXC:	SETZ	B,
	MOVE	C,[SIXBIT .DPA0.]
EX2A:	MOVE	A,[XWD 1,C]
	DSKCHR	A,		;SEE IF NEXT UNIT EXISTS
	  JRST	EX2B		;NO MORE
	MOVEM	C,STRTAB(B)	;DO INDIVIDUAL UNITS FOR LEVEL C
	MOVEI	A,010000	;BUMP NAME TO NEXT UNIT
	ADD	C,A
	AOJA	B,EX2A
EX2B:	JUMPG	B,CPOPJ		;EXIT IF ANY PACKS EXIST
	MOVSI	A,(SIXBIT .DSK.) ;ELSE USE DSK
	MOVEM	A,STRTAB
	POPJ	P,

SSP:	PUSHJ	P,GETCHR	;GET NEXT CHAR FROM USER
	CAIE	CH,40		;IGNORE IF SPACE
	CAIN	CH,11		;OR TAB
	JRST	SSP
	POPJ	P,		;EXIT

GETCHR:	SOSG	IBUF+2		;INPUT NEXT CHAR FROM USER
	INPUT	TTY,
	ILDB	CH,IBUF+1
	JUMPE	CH,GETCHR	;IGNORE NULLS
	CAIN	CH,177		;AND RUBOUTS
	JRST	GETCHR
	CAIL	CH,175		;CONVERT TO STANDARD ALTMODE
	MOVEI	CH,33
	CAIL	CH,140		;CONVERT UPPER CASE TO LOWER CASE
	TRZ	CH,40
	POPJ	P,

SLASH:	JSP	M,MSG
	ASCIZ	./.

%CRLF:	JSP	M,MSG
	ASCIZ	/%
/

CRLF3:	PUSHJ	P,CRLF
CRLF2:	PUSHJ	P,CRLF
CRLF:	JSP	M,MSG
	ASCIZ	/
/
MSG:	HRLI M,440700
MSGL:	ILDB CH,M
	JUMPE CH,CPOPJ
	PUSHJ P,TYO
	JRST MSGL

NOW:	CALLI	A,23		;GET TIME IN MILLISECONDS
	IDIVI	A,^D60000
	MOVE	C,B
	IDIVI	C,^D1000	;SECONDS IN C
	IDIVI	A,^D60		;HOURS IN A, MINUTES IN B
	HRREI	D,-2
	SKIPA	CH,[40]
NOWLUP:	MOVEI	CH,":"
	PUSHJ	P,TYO
	MOVEI	T,2
	MOVE	N,C(D)
	PUSHJ	P,DECZRO
	AOJLE	D,NOWLUP
	PUSHJ	P,SPC
	PUSHJ	P,SPC
	CALLI	A,14		;GET DATE

DATE:	IDIVI A,^D31
	MOVEI N,1(B)
	MOVEI	T,2
	PUSHJ	P,DECZRO
	IDIVI A,^D12
	MOVE B,MONTAB(B)
	MOVEI C,0
	MOVEI M,B
	PUSHJ P,MSG
	MOVEI N,^D64(A)
	PUSHJ P,DECPRT

SPC2:	PUSHJ	P,SPC
SPC:	MOVEI CH,40
	JRST TYO

COMMA:	MOVEI CH,","
	JRST TYO
TAB:	MOVEI CH,11
TYO:	SOSG LOB+2
	OUTPUT L,0
	IDPB CH,LOB+1
	POPJ P,0

DECSPC:	SKIPA	CH,[40]
DECZRO:	MOVEI	CH,"0"
	MOVEI	R,^D10
	JRST	RJRDXP
OCTSPC:	SKIPA	CH,[40]
OCTZRO:	MOVEI	CH,"0"
	MOVEI	R,^D8
RJRDXP:	MOVE	N1,R
JUSTFY:	SOJLE	T,RDXPRT
	CAMGE	N,N1
	PUSHJ	P,TYO
	IMUL	N1,R
	JRST	JUSTFY

DECPRT:	SKIPA R,[12]
OCTPRT:	MOVEI R,10
RDXPRT:	IDIVI N,(R)
	HRLM N1,0(P)
	SKIPE N
	PUSHJ P,RDXPRT
	HLRZ CH,0(P)
	ADDI CH,"0"
	JRST TYO

OCT12:	MOVEI R,^D12
OCT12L:	MOVEI N1,6
	ROTC N,3
	MOVEI CH,0(N1)
	PUSHJ P,TYO
	SOJG R,OCT12L
CPOPJ:	POPJ P,0
RDM:	SOSG MIB+2
	INPUT S,0
	ILDB WD,MIB+1
	STATO	S,EOF
	AOS	(P)
	POPJ P,0

RDU:	SOSG UIB+2
	INPUT U,0
	ILDB WD,UIB+1
	STATO	U,EOF
	AOS	(P)
	POPJ P,0

SIXBT:	MOVE	A,[POINT 6,WD]
SIXBT1:	ILDB CH,A
	ADDI CH,40
	PUSHJ P,TYO
	TLNE A,770000
	JRST SIXBT1
	PJRST TAB

SIXBA:	MOVE	A,[POINT 6,WD]
SIXBA1:	ILDB	CH,A
	JUMPE	CH,CPOPJ
	ADDI	CH,40
	PUSHJ	P,TYO
	TLNE	A,770000
	JRST	SIXBA1
	POPJ	P,
UFILCT:	0
UBLKCT:	0
;***	THESE MUST NOT BE SEPARATED
TBLKCT:	0
TFILCT:	0
TWRDW:	0
ECLUS:	0
WASTEW:	0
WASTEB:	0
HWEFIL:	0
HREFIL:	0
SCEFIL:	0
BDAFIL:	0
BFAFIL:	0
CRHFIL:	0
HISTO:	BLOCK	TOPHIS+2
;***	END MUST NOT SEPARATE

LKRET:	BLOCK 4

ADATEP:	POINT 15,LKRET+1,35
CDATEP:	POINT 12,LKRET+2,35
CDAT1P:	POINT 3,LKRET+1,20		;HIGH ORDER BITS OF CR DATE
CTIMEP:	POINT 11,LKRET+2,23
MODEP:	POINT 4,LKRET+2,12
PROTP:	POINT 9,LKRET+2,8

ADATED:	POINT	15,LOOKBF+EXLEXT,35
CDATED:	POINT	12,LOOKBF+EXLATT,35
CDAT1D:	POINT 3,LOOKBF+EXLEXT,20	;HIGH-ORDER BITS OF EXT CR DATE
CTIMED:	POINT	11,LOOKBF+EXLATT,23
MODED:	POINT	4,LOOKBF+EXLATT,12
PROTD:	POINT	9,LOOKBF+EXLATT,8

DEFINE MONMAC(A)<IRP A,<ASCII /-A-/>>
MONTAB:
MONMAC<JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC>
PDP:	XWD -20,.
	BLOCK 20

LOB:	BLOCK 3
MIB:	BLOCK 3
UIB:	BLOCK 3

MFDPP:	XWD	1,1
SYSPP:	XWD 1,4
USRPP:	0

SAME:	0		;0 IF NO MULTIPLES
LASTN:	0		;# FREE IN LAST SAT BLOCK
SAVEN:	0		;# FREE IN CURRENT SAT BLOCK

THRUMS:	ASCIZ /. BLOCKS FREE THROUGH SAT BLOCK /

SATMSG:	ASCIZ /
SAT BLOCK /
BUF1L:	IOWD 200,BUF1
	0
BUF1:	BLOCK 200
HELPMS:	ASCIZ	\
TYPE IN NAMES OF FILE STRUCTURES TO BE PRINTED, PLUS SWITCHES TO SELECT
THOSE SEGMENTS OF THE LISTING DESIRED.  SWITCHES INCLUDE:

/U - PRINT UNITS COMPRISING FILE STRUCTURE
/V - PRINT VITAL STATISTICS (HOME BLOCK)
/F - PRINT FILE INFORMATION
/S - PRINT SAT BLOCKS
/B - PRINT BAT BLOCKS
/E - PRINT ERROR SUMMARY
/P - PRINT PERFORMANCE SUMMARY
/Q - PRINT QUICK LISTING (SHORT LOOKUPS INSTEAD OF EXTENDED)
/N - NARROW PAPER
/H - TYPE THIS TEXT

IF NO SWITCHES ARE SPECIFIED, ALL SEGMENTS ARE PRINTED.  IF NO FILE
STRUCTURES ARE SPECIFIED, ALL FILE STRUCTURES WILL BE PRINTED, SO
CARRIAGE RETURN SPECIFIES A COMPLETE LISTING.
*\

BLKMSG:	ASCIZ	/. BLOCKS ( = /

TOTMSG:	ASCIZ	/. WORDS) TOTAL DISK SPACE REMAINING.




/
UBLKMG:	ASCIZ	/. WORDS) TOTAL DISK SPACE ALLOCATED TO THIS USER.

/
TBLKMG:	ASCIZ	/. WORDS) TOTAL DISK SPACE USED BY ALL USERS' FILES.

/
AVEMSG:	ASCIZ	/	AVERAGE FILE SIZE FOR /
AVEMS1:	ASCIZ	/ FILES (INCLUDING UFD'S) = /
UBLK1:	ASCIZ	/ BLOCKS

/
EXTMSG:	ASCIZ	/. EXTENDED FILES (INDICATED BY "*" FOLLOWING EXTENSION)
/
HOMMSG:	ASCIZ	/
HOME BLOCK/
MISMSG:	ASCIZ	/
DISCREPANCIES IN NUMBER OF FREE BLOCKS
COMPUTED	DSKCHR		SAT BLOCKS
/
UHED:	ASCIZ	/
UNIT	UNIT ID	LOG UNIT IN STR
/
FREMSG:	ASCIZ /. FREE BLOCKS LEFT IN THIS SAT BLOCK/
HED1:	ASCIZ	/FILE	EXT	/
HED2:	ASCIZ	/RETRVL	/
HED3:	ASCIZ	/  ACCESS      CREATION     PRV MODE WORDS  BLOCKS/
DHED4:	ASCIZ	/ ERR /
CHED5:	ASCIZ	/	DIRECTORY INFO PLACED/
DHED5:	ASCIZ	/	TAPE	VERSION/
HED6:	ASCIZ	/
 NAME		/
HED7:	ASCIZ	/POINTR	/
HED8:	ASCIZ	/   DATE    TIME   DATE		   WRITTEN  ALLOC/
DHED9:	ASCIZ	/ BITS/
CHED10:	ASCIZ	/	IN LOOKUP BLOCK/
DHED10:	ASCIZ	/	LABEL/
ERRHED:	ASCIZ	/
NUMBER OF FILES WITH EACH TYPE OF ERROR

HARD	HARD	SOFT	DAMAGE	FAILSA	CRASH
WRITE	READ	CHECK	ASSESS
/
BATHED:	ASCIZ	/BAT BLOCK FOR UNIT /
WASMS1:	ASCIZ	.
PER CENT WORDS WASTED IN PARTIALLY WRITTEN BLOCKS/TOTAL WORDS WRITTEN = .
WASMS2:	ASCIZ	.
PER CENT BLOCKS WASTED IN PARTIALLY WRITTEN CLUSTERS/TOTAL BLOCKS ALLOCATED = .
WASMS3:	ASCIZ	.(TOTAL BLOCKS ALLOCATED DOES NOT INCLUDE BLOCKS IN CLUSTERS WHICH ARE ALLOCATED BUT COMPLETELY UNWRITTEN)
.
KEYHED:	ASCIZ	/
KEY FOR ERROR BITS:

	BIT	MEANING

/
HWEKEY:	ASCIZ	.	HARDWARE DATA WRITE ERROR
.
HREKEY:	ASCIZ	.	HARDWARE DATA READ ERROR
.
SCEKEY:	ASCIZ	.	SOFTWARE CHECKSUM OR REDUNDANCY ERROR
.
BDAKEY:	ASCIZ	.	ERROR FOUND BY DAMAGE ASSESSMENT PROGRAM
.
BFAKEY:	ASCIZ	.	ERROR FOUND BY FAILSAFE
.
CRHKEY:	ASCIZ	.	PARTIALLY WRITTEN FILE CLOSED AFTER MONITOR STOPPED
.
UFDMSG:	ASCIZ /
UFD FOR /
LFMSG:	ASCIZ /LOOKUP FAILURE: /
NOUMSG:	ASCIZ /
	CAN'T READ UFD
/
PRFMES:	ASCIZ / (PRIVATE)/
HISHED:	ASCIZ .BLOCKS WRITTEN	NUMBER OF FILES

.
SECBAD:	POINT	9,BUF1+BAFCTM,8
MAPBAD:	POINT	9,BUF1+BAFCTM,17
MAPKDC:	POINT	7,BUF1+BAFCTM,24
BAYNBB:	POINT	9,-1(A),8	;# BAD BLOCKS THIS REGION
BAYLKN:	POINT	3,-1(A),20
BAYPRN:	POINT	14,-1(A),35
ERRBTS:	POINT	10,LOOKBF+EXLSTS,35
BPC:	POINT	9,CHRBUF+CHRCHR,8
KONTYP:	POINT	6,A,26
KONNUM:	POINT	3,A,29
UNINUM:	POINT	3,A,35
KONSIX:	SIXBIT	.DR.
	SIXBIT	.FH.
	SIXBIT	.DP.
	SIXBIT	.MF.
HELPFG:	-1

XLIST
LIT
LIST

UFDBLK:	BLOCK	1
SATIND:	BLOCK	1
STR:	BLOCK	1
STRIND:	BLOCK	1
STRTAB:	BLOCK	MAXFS+1
CHRBUF:	BLOCK	CHRLEN
BLKTOT:	BLOCK	1
XRBTOT:	BLOCK	1
SATTAB:	BLOCK	^D64
BLKCLS:	BLOCK	1
BLKFRE:	BLOCK	1
LOOKBF:	BLOCK	EXLLEN
TOTSAT:	BLOCK	1
RTVPTR:	BLOCK	1
IBUF:	BLOCK	3
DSKEND:	END GO