Google
 

Trailing-Edge - PDP-10 Archives - BB-H311B-RM - rsx20f-swskit/listings/vfy.lis
There are no other files named vfy.lis in the archive.
VFY M0520, VERIFY FILES 11 VOLU	MACRO M1108  06-DEC-77 00:10
TABLE OF CONTENTS

    7-   1	**** VFY VERSION M0520 ****
    7-  21	MACRO INVOCATIONS AND ASSEMBLY PARAMETERS
    8-  67	READ/WRITE STORAGE
    9- 150	READ ONLY TABLES
VFY M0520, VERIFY FILES 11 VOLU	MACRO M1108  06-DEC-77 00:10  PAGE 7


      1						.TITLE	VFY M0520, VERIFY FILES 11 VOLUME
						.SBTTL	**** VFY VERSION M0520 ****
						.IDENT	/M0520/
      2					; ALTERED FRIDAY 10-JAN-75  10:45
      3					;
      4					; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      6
      7					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      8					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
      9					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     10					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     11
     12					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     13					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     14					; EQUIPMENT CORPORATION.
     15
     16					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     17					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     18					;
     19					; PETER H. LIPMAN 12-APRIL-73
     20					;
     21						.SBTTL	MACRO INVOCATIONS AND ASSEMBLY PARAMETERS
     22					;
     23
     24	000000					FLDSOF			;DEFINE THE FILE DESCRIPTOR OFFSETS
     25						.MCALL	CSI$,FCSBT$
     26	000000					CSI$			;DEFINE THE CSI CONTROL BLOCK OFFSETS LOCALLLY
     27	000000					FCSBT$			;DEFINE THE FCS BIT VALUES LOCALLY
     28
     29						.MCALL	FSRSZ$,FDBDF$,FDAT$A,FDRC$A,FDOP$A,GCMLB$
     30						.MCALL	CSI$SW,CSI$SV,CSI$ND
     31
     32					;
     33		000001 				INXFID==1		;FILE ID FOR INDEX FILE
     34		000002 				BITFID==2		;BIT MAP FILE ID
     35		000014 				S.STBK==12.		;SIZE OF STATISTICS BLOCK IN BYTES
     36		000040 				CS.SWF==40		;CSI$2 STATUS BIT FOR "SWITCH FOUND"
     37
     38					; BITS IN VERIFY CONTROL WORD
     39		000001 				UPDATE==1		;SET IF UPDATING THE REAL BIT MAP
     40		000002 				RBUILD==2		;SET IF REBUILDING THE REAL BIT MAP
     41		000004 				FREEBT==4		;SET IF PRINTING OUT FREE BLOCKS
     42		000010 				IDBIT==10		;SET IF IDENTIFYING VERSION
     43		000020 				UPDINX==20		;SET IF UPDATING INDEX FILE
     44		000040 				UNDLBT==40		;SET IF UNDELETING FILES MARKED FOR DEL
     45		000100 				LOSTBT==100		;SCAN FOR LOST FILES
     46		000200 				LISTBT==200		;LIST THE INDEX FILE
     47		000400 				RDCKBT==400		;SET IF READING ALL BLOCKS OF ALL FILES
     48		100000 				PASS2==100000		;SET IF 2ND PASS OF INDEX/BITMAP CHECK
     49
     50					; BITS IN THE OUTPUT CONTROL WORD - OUTCTL
     51		000001 				HDROK==1			;SET IF HEADER IS IN CORE
     52		000002 				OUTID==2			;IF SET, ID HAS ALREADY BEEN OUTPUT
     53		000004 				DEVATT==4		;IF SET, DEVICE IS ATTACHED
     54					;
     55					; BITS IN THE TEMP FILE CONTROL WORD
VFY M0520, VERIFY FILES 11 VOLU	MACRO M1108  06-DEC-77 00:10  PAGE 7-1
MACRO INVOCATIONS AND ASSEMBLY PARAMETERS

     56					;
     57		000001 				DELMAN==1		;FILE MUST BE MANUALLY DELETED
     58		000002 				SAMDEV==2		;FILE IS ON DEVICE BEING VERIFIED
     59					;
     60					; LOGICAL UNIT ASSIGNMENTS
     61		000002 				CMDLUN==2		;COMMAND OUTPUT LOGICAL UNIT
     62		000003 				BITLUN==3		;REAL BIT MAP
     63		000004 				TBTLUN==4		;TEMP BIT MAP
     64		000005 				OUTLUN==5		;LISTING OUTPUT FILE
     65		000006 				INXLUN==6		;LUN FOR INDEX FILE
VFY M0520, VERIFY FILES 11 VOLU	MACRO M1108  06-DEC-77 00:10  PAGE 8
READ/WRITE STORAGE

     67						.SBTTL	READ/WRITE STORAGE
     68					;
     69					; IMPURE (READ/WRITE) STORAGE
     70					;
     71	000000					.PSECT
     72	000000					FSRSZ$	0		;FILE STORAGE REGION SET UP DYNAMICALLY
     73	000000					IMPURE
     74
     75	000000				FDBOUT::FDBDF$
     76	000140					FDAT$A	R.VAR,FD.CR
     77	000140					FDRC$A	FD.PLC,OUTREC,OURCSZ
     78	000140					FDOP$A	OUTLUN,OFNPT,OUDFLT
     79	000140				BITMAP::FDBDF$
     80	000300					FDRC$A	FD.RAN,BITWRD,2
     81	000300					FDOP$A	BITLUN,IFNPT,BITDFN
     82	000300				RDCHK::				;READ CHECK USES TEMP BIT MAP FDB
     83	000300				TBTMAP::FDBDF$
     84	000440					FDAT$A	R.FIX,,2
     85	000440					FDRC$A	FD.RAN,BITWRD,2
     86	000440					FDOP$A	TBTLUN,TBFNPT,TBTDFN
     87	000440				INDEX::FDBDF$
     88	000600					FDRC$A	FD.PLC!FD.RAN,INXBIT,512.
     89	000600					FDOP$A	INXLUN,,INXDFN
     90
     91	000600				GCMLCB::GCMLB$	1,VFY
     92	001206				CSIBLK::.BLKB	C.SIZE
     93					;
     94					; FILE NAME DESCRIPTORS FROM CSI$2
     95	001262				IFNPT::	.BLKB	S.FIDS+S.APPD
     96		001276'				INSPEC==IFNPT+N.SPEC
     97	001306				OFNPT::	.BLKB	S.FIDS+S.APPD
     98		001322'				OUSPEC==OFNPT+N.SPEC
     99	001332				TBFNPT::.BLKB	S.FIDS+S.APPD
    100		001346'				TBSPEC==TBFNPT+N.SPEC
    101
    102					;
    103					; ***** DO NOT REORDER THE FOLLOWING LINES
    104	001356				OUDFLT::NMBLK$			;OUTPUT FILE DEFAULT NAME BLOCK
    105					; BUFFERS FOR VARIOUS OPERATIONS
    106	001414				OUTREC::.BLKB	132.		;RECORD BUFFER FOR LISTING FILE
    107		000204 				OURCSZ==.-OUTREC
    108					; ***** DO NOT REORDER THE PRECEEDING LINES
    109					;
    110
    111	001620				BITWRD::.BLKW	1		;BUFFER FOR BITMAPS, 2 BYTE RECORDS
    112	001622				BITBUF::			;BUFFER FOR COUNTING BITS IN BITMAP
    113	001622				INXBIT::.BLKW	256.		;BUFFER FOR INDEX FILE BIT MAP
    114	002622				STBLK::	.BLKW	S.STBK		;BUFFER FOR STATISTICS BLOCK
    115	002652				MOPRM::	.BLKW	8.		;PARAMETER BLOCK FOR EDMSG
    116
    117					; MISCELLANEOUS STORAGE
    118	002672				VFYCTL::.BLKW	1		;CONTROL BITS, SET BY CSI$2
    119	002674				OUTCTL::.BLKW	1		;CONTROL BITS FOR LISTING FILE
    120	002676				TMPCTL::.BLKW	1		;CONTROL BITS FOR TEMP FILE
    121	002700				NXTFID::.BLKW	3
    122	002706				DIRID::	.BLKW	1		;DIRECTORY ID BEING SCANNED IN /LO
    123	002710				LBN::	.BLKW	2		;CURRENT LOGICAL BLOCK NUMBER
VFY M0520, VERIFY FILES 11 VOLU	MACRO M1108  06-DEC-77 00:10  PAGE 8-1
READ/WRITE STORAGE

    124	002714				MAXLBN::.BLKW	2		;LARGEST POSSIBLE LBN
    125	002720				MAXFNU::.BLKW	1		;LARGEST FILE NO. ON THIS VOLUME
    126	002722				MAPOFF::.BLKW	1		;NO. OF RECORDS BEFORE FIRST BIT WORD
    127	002724				INXOFF::.BLKW	1		;FILE ID +INXOFF ==VBN OF HEADER IN INDEX
    128	002726				NBTBLK::.BLKW	1		;NO. OF BIT MAP BLOCKS
    129	002730				FBTBLK::.BLKW	1		;FIRST VBN OF BIT MAP BLOCKS
    130	002732				SINXBT::.BLKW	1		;NO. OF INDEX FILE BIT MAP BLOCKS
    131	002734				SAVSP::	.BLKW	1		;SAVED STACK POINTER
    132	002736				NMULT::	.BLKW	1		;COUNT OF MULTIPLE ALLOC ERRORS
    133	002740				NFREE::	.BLKW	1		;COUNT OF BLOCK FREE ERRORS
    134	002742				NBAD::	.BLKW	1		;COUNT OF BAD LBN'S
    135	002744				LOSTCT::.BLKW	1		;COUNT OF LOST FILES
    136	002746				MLTALC::.BLKW	1		;NO. OF MULTIPLE ALLOCATION ERRORS (VOL)
    137	002750	000000 	000000 		.DYSIZ::.LIMIT			;NO. OF BYTES OF DYNAMIC MEMORY
    138		002752'				.TOPAD==.DYSIZ+2	;ADDRESS OF DYNAMIC MEMORY BUFFERS
    139	002754				.DYBUF::.BLKW	1		;ADDRESS OF CURRENTLY ALLOCATED DYNAMIC BUF
    140	002756				.DYBYT::.BLKW	1		;SIZE OF CURRENTLY ALLOCATED DYNAMIC BUF
    141	002760				.RCBLK::.BLKW	1		;READ CHECK BLOCK COUNT
    142
    143						.IF	EQ,R$$DYM	;IF NO DYNAMIC MEMORY FACILITY AVAILABLE
    144						.PSECT	$$DYB1,D
    145					.DYB1::
    146						.PSECT	$$DYB2,D
    147					.DYB2::
    148						.ENDC
VFY M0520, VERIFY FILES 11 VOLU	MACRO M1108  06-DEC-77 00:10  PAGE 9
READ ONLY TABLES

    150						.SBTTL	READ ONLY TABLES
    151	002762					PURE.D
    152					;
    153					; SWITCH TABLE
    154	000036				CSISWT::CSI$SW	UP,UPDATE,VFYCTL,SET,,0
    155	000046					CSI$SW	RE,RBUILD!UPDATE,VFYCTL,SET,,0
    156	000056					CSI$SW	FR,FREEBT,VFYCTL,SET,,0
    157	000066					CSI$SW	ID,IDBIT,VFYCTL,SET,,0
    158	000076					CSI$SW	DE,UNDLBT!UPDINX,VFYCTL,SET,,0
    159	000106					CSI$SW	LO,LOSTBT,VFYCTL,SET,,0
    160	000116					CSI$SW	LI,LISTBT,VFYCTL,SET,,0
    161	000126					CSI$SW	RC,RDCKBT,VFYCTL,SET,,RCVAL
    162	000136					CSI$ND
    163					;
    164					; VALUE TABLE FOR READ CHECK BLOCK COUNT
    165					;
    166	000140				RCVAL:	CSI$SV	DECIMAL,.RCBLK,2
    167	000144					CSI$ND
    168
    169
    170					; DEFAULT FILE NAMES
    171	000146				BITDFN::NMBLK$	BITMAP,SYS,1,SY,0
    172	000204				TBTDFN::NMBLK$	BIT,TMP,,SY,0
    173	000242				INXDFN::NMBLK$	INDEXF,SYS,1,SY,0
    174					;
    175	000300	015172 			DIRTYP::.RAD50	/DIR/
    176	000302	000004'			.ABORT::.WORD	RSTART		;ERROUX RETURN VIA JMP @.ABORT
    177	000304	000000G			.FREP1::.WORD	FREEPR		;XFER VECTOR TO PRINT FREE BLOCKS
    178	000306	000000G			.LOST1::.WORD	LOST		;XFER VECTOR TO LOST FILE SCANNER
    179	000310	000000G			.OPNF1::.WORD	OPENF		;XFER VECTOR TO OPEN ROUTINES
    180					;
    181	000312	000000 			SSTTAB::.WORD	0		;ODD ADDRESS TRAP
    182	000314	000000 				.WORD	0		;MEMORY PROTECTION VIOLATION
    183	000316	000000 				.WORD	0		;T BIT OR BPT INSTRUCTION
    184	000320	000000 				.WORD	0		;IOT INSTRUCTION
    185	000322	000000 				.WORD	0		;RESERVED INSTRUCTION
    186	000324	000000 				.WORD	0		;NON RSX EMT
    187	000326	000000G				.WORD	.ERTRP		;TRAP INSTRUCTION
    188					;
    189					; DIRECTORY NAME FOR THE MFD
    190					;
    191	000000					.PSECT
    192		000001 				MSGBL.=1		;FORCE GLOBAL DEFINITIONS
    193	000000					MSG	MFDN,<[0,0]>
    194						.EVEN
    195	000000					PURE.I
    196	000000	000167 	000000G		START:	JMP	.INIT		;INITIALIZE AND GET COMMAND
    197	000004	000167 	000000G		RSTART::JMP	.RSTAR		;GET NEXT COMMAND
    198					;
    199					;
    200		000000'				.END	START
VFY M0520, VERIFY FILES 11 VOLU	MACRO M1108  06-DEC-77 00:10  PAGE 9-1
SYMBOL TABLE

BITBUF  001622RG    005	FD.RAN= 000002   	F.RTYP= 000000   	NBAD    002742RG    005	R.VAR = 000002
BITDFN  000146RG    003	FD.REC= 000001   	F.STBK= 000036   	NBTBLK  002726RG    005	SAMDEV= 000002 G
BITFID= 000002 G 	FD.RWM= 000001   	F.UNIT= 000136   	NB.DEV= 000200   	SAVSP   002734RG    005
BITLUN= 000003 G 	FD.SDI= 000020   	F.URBD= 000020   	NB.DIR= 000100   	SINXBT  002732RG    005
BITMAP  000140RG    005	FD.SQD= 000040   	F.VBN = 000064   	NB.NAM= 000004   	SSTTAB  000312RG    003
BITWRD  001620RG    005	FD.TTY= 000004   	F.VBSZ= 000060   	NB.SD1= 000400   	START   000000R     006
CMDLUN= 000002 G 	FD.WBH= 000002   	GCMLCB  000600RG    005	NB.SD2= 001000   	STBLK   002622RG    005
CSIBLK  001206RG    005	FO.APD= 000106   	GE.BIF= 177775   	NB.SNM= 000040   	S.APPD= 000010
CSISWT  000036RG    003	FO.MFY= 000002   	GE.CLO= 000004   	NB.STP= 000020   	S.BFHD= 000020
CS.DIF= 000002   	FO.RD = 000001   	GE.COM= 000001   	NB.SVR= 000010   	S.FATT= 000016
CS.DVF= 000004   	FO.UPD= 000006   	GE.EOF= 177766   	NB.TYP= 000002   	S.FDB = 000140
CS.EQU= 000040   	FO.WRT= 000016   	GE.IND= 000002   	NB.VER= 000001   	S.FIDS= 000014
CS.INP= 000001   	FREEBT= 000004 G 	GE.IOR= 177777   	NFREE   002740RG    005	S.FNAM= 000006
CS.MOR= 000020   	FREEPR= ****** GX	GE.LC = 000010   	NMULT   002736RG    005	S.FNB = 000036
CS.NMF= 000001   	F.ALOC= 000040   	GE.MDE= 177774   	NXTFID  002700RG    005	S.FNBW= 000017
CS.OUT= 000002   	F.BBFS= 000062   	GE.OPR= 177776   	N.DEVD= 000000   	S.FNTY= 000004
CS.SWF= 000040 G 	F.BDB = 000070   	G.CMLD= 000146   	N.DID = 000024   	S.FTYP= 000002
CS.WLD= 000010   	F.BGBC= 000057   	G.DPRM= 000160   	N.DIRD= 000004   	S.NFEN= 000020
C.CMLD= 000002   	F.BKDN= 000026   	G.ERR = 000140   	N.DVNM= 000032   	S.STBK= 000014 G
C.DEVD= 000006   	F.BKDS= 000020   	G.ISIZ= 000020   	N.FID = 000000   	TBFNPT  001332RG    005
C.DIRD= 000012   	F.BKEF= 000050   	G.LPDL= 000040   	N.FLID= 000016   	TBSPEC= 001346RG    005
C.DSDS= 000006   	F.BKP1= 000051   	G.MODE= 000141   	N.FNAM= 000006   	TBTDFN  000204RG    003
C.FILD= 000016   	F.BKST= 000024   	G.PSDS= 000142   	N.FNMD= 000010   	TBTLUN= 000004 G
C.MKW1= 000024   	F.BKVB= 000064   	HDROK = 000001 G 	N.FTYP= 000014   	TBTMAP  000300RG    005
C.MKW2= 000026   	F.CNTG= 000034   	IDBIT = 000010 G 	N.FVER= 000016   	TMPCTL  002676RG    005
C.SIZE= 000054   	F.DFNB= 000046   	IDNTMG= 000000RG    002	N.NEXT= 000022   	UNDLBT= 000040 G
C.STAT= 000001   	F.DSPT= 000044   	IDNTSZ= 000021 G 	N.SPEC= 000014   	UPDATE= 000001 G
C.SWAD= 000022   	F.DVNM= 000134   	IFNPT   001262RG    005	N.STAT= 000020   	UPDINX= 000020 G
C.TYPR= 000000   	F.EFBK= 000010   	INDEX   000440RG    005	N.UNIT= 000034   	VFYCTL  002672RG    005
DELMAN= 000001 G 	F.EFN = 000050   	INSPEC= 001276RG    005	OFNPT   001306RG    005	$$    = 000000
DEVATT= 000004 G 	F.EOBB= 000032   	INXBIT  001622RG    005	OPENF = ****** GX	$$$   = 000760R     005
DIRID   002706RG    005	F.ERR = 000052   	INXDFN  000242RG    003	OUDFLT  001356RG    005	.ABORT  000302RG    003
DIRTYP  000300RG    003	F.FACC= 000043   	INXFID= 000001 G 	OURCSZ= 000204 G 	.DYBUF  002754RG    005
FA.APD= 000100   	F.FFBY= 000014   	INXLUN= 000006 G 	OUSPEC= 001322RG    005	.DYBYT  002756RG    005
FA.CRE= 000010   	F.FNAM= 000110   	INXOFF  002724RG    005	OUTCTL  002674RG    005	.DYSIZ  002750RG    005
FA.EXT= 000004   	F.FNB = 000102   	LBN     002710RG    005	OUTID = 000002 G 	.ERTRP= ****** GX
FA.NSP= 000100   	F.FTYP= 000116   	LISTBT= 000200 G 	OUTLUN= 000005 G 	.FREP1  000304RG    003
FA.RD = 000001   	F.FVER= 000120   	LOST  = ****** GX	OUTREC  001414RG    005	.FSRCB= ****** G
FA.SHR= 000040   	F.HIBK= 000004   	LOSTBT= 000100 G 	PASS2 = 100000 G 	.INIT = ****** GX
FA.TMP= 000020   	F.LUN = 000042   	LOSTCT  002744RG    005	RBUILD= 000002 G 	.LOST1  000306RG    003
FA.WRT= 000002   	F.MBCT= 000054   	MAPOFF  002722RG    005	RCVAL   000140R     003	.MSGFN  000000RG    003
FBTBLK  002730RG    005	F.MBC1= 000055   	MAXFNU  002720RG    005	RDCHK   000300RG    005	.OPNF1  000310RG    003
FDBOUT  000000RG    005	F.MBFG= 000056   	MAXLBN  002714RG    005	RDCKBT= 000400 G 	.RCBLK  002760RG    005
FD.BLK= 000010   	F.NRBD= 000024   	MFDNMG= 000030RG    002	RSTART  000004RG    006	.RSTAR= ****** GX
FD.CCL= 000002   	F.NREC= 000030   	MFDNSZ= 000005 G 	R$$DPB= 000001   	.TOPAD= 002752RG    005
FD.CR = 000002   	F.OVBS= 000030   	MLTALC  002746RG    005	R$$DYM= 000001   	...GBL= 000000
FD.DIR= 000010   	F.RACC= 000016   	MOIDMG= 000021RG    002	R$$EIS= 000000   	...PC1= 000600R     005
FD.FTN= 000001   	F.RATT= 000001   	MOIDSZ= 000007 G 	R$$MSG= 000000   	...PC2= 000276R     003
FD.INS= 000010   	F.RCNM= 000034   	MOPRM   002652RG    005	R$$11M= 000001   	...PC3= 000600R     005
FD.PLC= 000004   	F.RCTL= 000017   	MSGBL.= 000001   	R.FIX = 000001   	...TPC= 000140
FD.RAH= 000001   	F.RSIZ= 000002

. ABS.	000000	   000
      	000000	   001
MSGSTR	000035	   002
PURE$D	000330	   003
$$FSR1	000000	   004
VFY M0520, VERIFY FILES 11 VOLU	MACRO M1108  06-DEC-77 00:10  PAGE 9-2
SYMBOL TABLE

IMPURE	002762	   005
PURE$I	000010	   006
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  5959 WORDS  ( 24 PAGES)
DYNAMIC MEMORY:  7328 WORDS  ( 28 PAGES)
ELAPSED TIME:  00:01:04
[65,10]VFY,[65,20]VFY/-SP=[43,30]PIPMAC,[65,30]VFY
VFYCMD M0104, VFY COMMAND RECEI	MACRO M1108  06-DEC-77 00:11
TABLE OF CONTENTS

    7-   1	**** VFYCMD VERSION M0104 ****
    7-  28	COMMAND RECEIVER
VFYCMD M0104, VFY COMMAND RECEI	MACRO M1108  06-DEC-77 00:11  PAGE 7


      1						.TITLE	VFYCMD M0104, VFY COMMAND RECEIVER
						.SBTTL	**** VFYCMD VERSION M0104 ****
						.IDENT	/M0104/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  19 FEB 75  14:35
      4					;
      5					; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      6					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      7
      8					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      9					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     10					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     11					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     12
     13					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     14					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     15					; EQUIPMENT CORPORATION.
     16
     17					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     18					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     19					;
     20					; PETER H. LIPMAN 5-NOV-74
     21					;
     22	000000					FLDSOF			;DEFINE THE DESCRIPTOR POINTER OFFSETS
     23						.MCALL	GCMLD$
     24	000000					GCMLD$			;DEFINE THE GCML BLOCK OFFSETS LOCALLY
     25						.MCALL	CALL,RETURN,FINIT$,GLUN$S,GPRT$S,GTSK$S,CLOSE$
     26						.MCALL	CSI$1,CSI$2,EXIT$S
     27
     28						.SBTTL	COMMAND RECEIVER
     29	000000					PURE.I
     30					;
     31	000000				NOROOM:	ERROUT	ER17		;NOT ENOUGH DYNAMIC MEMORY
	000000	104402 				TRAP	X
	000002	000000G				.WORD	ER17SZ
	000004	000000G				.WORD	ER17MG
     32	000006				EXIT:	EXIT$S
     33
     34					;
     35					; INITIALIZE VFY - STARTUP ONLY
     36					;
     37	000014	010667 	000000G		.INIT::	MOV	SP,SAVSP
     38	000020					FINIT$			;INITIALIZE FCS
     39	000024					GLUN$S	#CMDLUN,#OUDFLT+N.DVNM ;GET THE CMD OUTPUT DEVICE AND UNIT
     40	000042	105067 	000000C			CLRB	OUDFLT+N.UNIT+1
     41
     42						.IF	GT,R$$DYM
     43	000046					GPRT$S	,#OUTREC	;GET PARTITION PARAMETERS TO GET BASE ADR
     44	000064	013700 	000000G			MOV	@#$DSW,R0	;R0=BASE ADDRESS OF TASK
     45	000070					GTSK$S	#OUTREC		;GET TASK PARAMETERS
     46	000102	066700 	000032G			ADD	OUTREC+G.TSTS,R0 ;R0=TOP OF "APPARENT" ADDRESS SPACE
     47
     48						.IFF
     49						MOV	#.DYB1,.TOPAD	;SET TOPAD TO BASE OF DYNAMIC REGION
     50						MOV	#.DYB2,R0	;AND R0 TO TOP OF IT
     51						.ENDC
     52
VFYCMD M0104, VFY COMMAND RECEI	MACRO M1108  06-DEC-77 00:11  PAGE 7-1
COMMAND RECEIVER

     53	000106	166700 	000000G			SUB	.TOPAD,R0	;R0=NO. OF BYTES OF DYNAMIC MEMORY
     54	000112	100002 				BPL	5$		; BRANCH IF LESS THAN 16K
     55	000114	012700 	077777 			MOV	#77777,R0	; LIMIT SPACE TO 16K TO AVOID BLOWING RQLCB
     56	000120	042700 	000003 		5$:	BIC	#3,R0		;FILE STORAGE REGION MUST HAVE MULT OF 4 BYTES
     57	000124	020027 	000000C			CMP	R0,#4*<1000+S.BFHD> ;ENOUGH BUFFER SPACE TO RUN AT ALL?
     58	000130	103723 				BLO	NOROOM		;BRANCH IF NO
     59	000132	010067 	000000G			MOV	R0,.DYSIZ	;SET SIZE IN BYTES OF DYNAMIC MEMORY
     60	000136	016767 	000000G	000000G		MOV	.TOPAD,.DYBUF	;STORE ADDRESS OF BUFFER TO RELEASE TO FSR
     61	000144	010067 	000000G			MOV	R0,.DYBYT	;STORE SIZE OF BUFFER TO RELEASE TO FSR
     62	000150	112767 	000000C	000000C		MOVB	#FD.TTY!FD.REC!FD.CCL,GCMLCB+F.RCTL ;MCR COMMAND IS FROM TTY
     63	000156	152767 	000004 	000141G		BISB	#GE.CLO,GCMLCB+G.MODE ;GCML MUST ALWAYS CLOSE CMD FILE
     64
     65					; RESTART ENTRY POINT, CLOSE FILES
     66	000164				.RSTAR::
     67	000164	016706 	000000G			MOV	SAVSP,SP
     68	000170					CLOSE$	#BITMAP
     69	000200	012700 	000000G			MOV	#INDEX,R0
     70	000204	005060 	000000G			CLR	F.HIBK(R0)
     71	000210	005060 	000002G			CLR	F.HIBK+2(R0)
     72	000214	005060 	000000G			CLR	F.EFBK(R0)
     73	000220	005060 	000002G			CLR	F.EFBK+2(R0)
     74	000224	005060 	000000G			CLR	F.FFBY(R0)
     75	000230					CLOSE$	R0
     76	000234					CLOSE$	#TBTMAP
     77	000244	032767 	000000G	000000G		BIT	#DELMAN,TMPCTL	;MUST IT NOW BE MANUALLY  DELETED?
     78	000252	001403 				BEQ	10$		;BRANCH IF NO
     79	000254					ERROUT	DL01,0		;YES, TELL THE USER
	000254	104406 				TRAP	X
	000256	000000G				.WORD	DL01SZ
	000260	000000G				.WORD	DL01MG
     80	000262	012700 	000000G		10$:	MOV	#FDBOUT,R0
     81	000266					CALL	DETACH		;DETACH DEVICE IF NECESSARY
     82	000272					CLOSE$	R0		;AND CLOSE LISTING FILE
     83
     84					; GET ANOTHER COMMAND FROM THE COMMAND INPUT MEDIUM
     85	000276	016701 	000000G			MOV	.DYBYT,R1	;ANY DYNAMIC BUFFER TO RELEASE?
     86	000302	001410 				BEQ	15$		;BRANCH IF NO
     87	000304	013700 	000000G			MOV	@#.FSRPT,R0	;ADDRESS OF LIST HEAD FOR FSR
     88	000310	016702 	000000G			MOV	.DYBUF,R2	;ADDRESS OF BUFFER TO RELEASE
     89	000314					CALL	$RLCB		;RELEASE IT TO THE FILE STORAGE REGION
     90	000320	005067 	000000G			CLR	.DYBYT		;SAY THAT BUFFER IS RELEASED
     91	000324	005067 	000000G		15$:	CLR	VFYCTL
     92	000330	005067 	000000G			CLR	TMPCTL
     93	000334	005067 	000000G			CLR	MLTALC
     94	000340	005067 	000000G			CLR	.RCBLK
     95	000344					CALL	GETCML		;GET THE NEXT COMMAND LINE
     96	000350	103616 				BCS	EXIT		;EXIT IF ERROR
     97					;
     98					; GOT A COMMAND, CHECK IT'S SYNTAX
     99	000352					CSI$1	#CSIBLK,GCMLCB+G.CMLD+2,GCMLCB+G.CMLD
    100	000376	016067 	000002 	000146G		MOV	C.CMLD(R0),GCMLCB+G.CMLD
    101	000404	103002 				BCC	25$
    102					;
    103					; SYNTAX ERROR
    104	000406					CALL	.SYNER
    105
    106					; GOT A SYNTACTICALLY CORRECT COMMAND LINE
VFYCMD M0104, VFY COMMAND RECEI	MACRO M1108  06-DEC-77 00:11  PAGE 7-2
COMMAND RECEIVER

    107					; NOW GET THE LISTING OUTPUT SPEC, THE TEMP BIT MAP SPEC
    108					; FROM THE OUTPUT SIDE OF THE CMD LINE, AND THE DEVICE TO
    109					; BE VERIFIED FROM THE INPUT SIDE.
    110	000412	012701 	000000G		25$:	MOV	#OFNPT,R1	;GET THE LISTING FILE SPEC
    111	000416					CALL	OUTCSI
    112	000422	103473 				BCS	80$		;BRANCH IF BAD SWITCH
    113	000424	012701 	000000G			MOV	#TBFNPT,R1	;GET THE TEMP BIT FILE SPEC
    114	000430					CALL	OUTCSI
    115	000434	103466 				BCS	80$
    116	000436	012701 	000000G			MOV	#IFNPT,R1
    117	000442					CALL	INCSI		;GET THE DEVICE TO  VERIFY
    118	000446	103461 				BCS	80$
    119	000450	012767 	000000G	000000C		MOV	#OFNPT,FDBOUT+F.DSPT ;INIT F.FNPT ASSUMING INPUT AND
    120	000456	012767 	000000G	000000C		MOV	#IFNPT,BITMAP+F.DSPT ;OUTPUT SPECS ARE PRESENT
    121	000464	012767 	000000G	000000C		MOV	#IFNPT,INDEX+F.DSPT
    122	000472	012767 	000000G	000000C		MOV	#TBFNPT,TBTMAP+F.DSPT
    123	000500	005767 	000000G			TST	INSPEC		;WAS INPUT SPECIFIER PRESENT
    124	000504	001010 				BNE	50$		;BRANCH IF YES
    125	000506	012767 	000000G	000000C		MOV	#OFNPT,BITMAP+F.DSPT ;USE OUTPUT SPEC FOR INPUT
    126	000514	012767 	000000G	000000C		MOV	#OFNPT,INDEX+F.DSPT
    127	000522	005067 	000000C			CLR	FDBOUT+F.DSPT	;SAY NO OUTPUT FILE NAME, USE DEFAULT
    128	000526	005767 	000000G		50$:	TST	TBSPEC		;IF NO TEMP BIT MAP SPEC
    129	000532	001002 				BNE	60$
    130	000534	005067 	000000C			CLR	TBTMAP+F.DSPT	;USE THE DEFAULT
    131	000540	016701 	000000C		60$:	MOV	BITMAP+F.DSPT,R1
    132	000544	012761 	000000G	000004 		MOV	#MFDNSZ,N.DIRD(R1) ;SET THE MFD DIRECTORY NAME
    133	000552	012761 	000000G	000006 		MOV	#MFDNMG,N.DIRD+2(R1)
    134	000560	032761 	000033 	000014 		BIT	#CS.DIF!CS.NMF!CS.WLD!CS.MOR,N.SPEC(R1)
    135	000566	001014 				BNE	85$		;ONLY DEVICE SHOULD BE SPECIFIED
    136	000570	032767 	000000G	000000G		BIT	#IDBIT,VFYCTL	;IDENTIFY THE VERSION?
    137	000576	001403 				BEQ	75$		;BRANCH IF NO
    138	000600					ERROUX	IDNT		;YES, TYPE THE VERSION
	000600	104403 				TRAP	X
	000602	000000G				.WORD	IDNTSZ
	000604	000000G				.WORD	IDNTMG
    139	000606	000177 	000000G		75$:	JMP	@.OPNF1
    140
    141					; ILLEGAL SWITCH OR VALUE
    142	000612				80$:	ERROUX	ER13
	000612	104403 				TRAP	X
	000614	000000G				.WORD	ER13SZ
	000616	000000G				.WORD	ER13MG
    143
    144					; ILLEGAL DEVICE SPECIFICATION
    145	000620				85$:	ERROUX	ER10
	000620	104403 				TRAP	X
	000622	000000G				.WORD	ER10SZ
	000624	000000G				.WORD	ER10MG
    146					;
    147					;
    148		000001 				.END
VFYCMD M0104, VFY COMMAND RECEI	MACRO M1108  06-DEC-77 00:11  PAGE 7-3
SYMBOL TABLE

BITMAP= ****** GX	ER13MG= ****** GX	G.ISIZ= 000020   	INSPEC= ****** GX	S.FNBW= 000017
CMDLUN= ****** GX	ER13SZ= ****** GX	G.LUCW= 000004   	MFDNMG= ****** GX	S.FNTY= 000004
CSIBLK= ****** GX	ER17MG= ****** GX	G.LUFB= 000003   	MFDNSZ= ****** GX	S.FTYP= 000002
CS.DIF= 000002   	ER17SZ= ****** GX	G.LUNA= 000000   	MLTALC= ****** GX	S.NFEN= 000020
CS.DVF= 000004   	EXIT    000006R     002	G.LUNU= 000002   	NOROOM  000000R     002	TBFNPT= ****** GX
CS.EQU= 000040   	FDBOUT= ****** GX	G.MODE= 000141   	N.DEVD= 000000   	TBSPEC= ****** GX
CS.INP= 000001   	FD.CCL= ****** GX	G.PRFW= 000004   	N.DIRD= 000004   	TBTMAP= ****** GX
CS.MOR= 000020   	FD.REC= ****** GX	G.PRPB= 000000   	N.DVNM= ****** GX	TMPCTL= ****** GX
CS.NMF= 000001   	FD.TTY= ****** GX	G.PRPS= 000002   	N.FLID= 000016   	VFYCTL= ****** GX
CS.OUT= 000002   	F.DSPT= ****** GX	G.PSDS= 000142   	N.FNMD= 000010   	X     = 000003
CS.WLD= 000010   	F.EFBK= ****** GX	G.TSFW= 000024   	N.SPEC= 000014   	$DSW  = ****** GX
C.CMLD= 000002   	F.FFBY= ****** GX	G.TSGC= 000017   	N.UNIT= ****** GX	$RLCB = ****** GX
C.DEVD= 000006   	F.HIBK= ****** GX	G.TSMT= 000022   	OFNPT = ****** GX	$$    = 000067
C.DIRD= 000012   	F.RCTL= ****** GX	G.TSNL= 000020   	OUDFLT= ****** GX	$$$OST= 000034
C.DSDS= 000006   	GCMLCB= ****** GX	G.TSPC= 000016   	OUTCSI= ****** GX	.CLOSE= ****** G
C.FILD= 000016   	GETCML= ****** GX	G.TSPN= 000004   	OUTREC= ****** GX	.CSI1 = ****** G
C.MKW1= 000024   	GE.BIF= 177775   	G.TSPR= 000014   	PAR$$$= 000027   	.DYBUF= ****** GX
C.MKW2= 000026   	GE.CLO= 000004   	G.TSRN= 000010   	R$$DPB= 000001   	.DYBYT= ****** GX
C.SIZE= 000054   	GE.COM= 000001   	G.TSTN= 000000   	R$$DYM= 000001   	.DYSIZ= ****** GX
C.STAT= 000001   	GE.EOF= 177766   	G.TSTS= 000032   	R$$EIS= 000000   	.FINIT= ****** G
C.SWAD= 000022   	GE.IND= 000002   	G.TSVA= 000026   	R$$11M= 000001   	.FSRPT= ****** GX
C.TYPR= 000000   	GE.IOR= 177777   	G.TSVL= 000030   	SAVSP = ****** GX	.INIT   000014RG    002
DELMAN= ****** GX	GE.LC = 000010   	IDBIT = ****** GX	S.APPD= 000010   	.OPNF1= ****** GX
DETACH= ****** GX	GE.MDE= 177774   	IDNTMG= ****** GX	S.BFHD= ****** GX	.RCBLK= ****** GX
DL01MG= ****** GX	GE.OPR= 177776   	IDNTSZ= ****** GX	S.FDB = 000140   	.RSTAR  000164RG    002
DL01SZ= ****** GX	G.CMLD= 000146   	IFNPT = ****** GX	S.FIDS= 000014   	.SYNER= ****** GX
ER10MG= ****** GX	G.DPRM= 000160   	INCSI = ****** GX	S.FNAM= 000006   	.TOPAD= ****** GX
ER10SZ= ****** GX	G.ERR = 000140   	INDEX = ****** GX	S.FNB = 000036   	...TPC= 000140

. ABS.	000000	   000
      	000000	   001
PURE$I	000626	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  5541 WORDS  ( 22 PAGES)
DYNAMIC MEMORY:  6272 WORDS  ( 24 PAGES)
ELAPSED TIME:  00:00:41
[65,10]VFYCMD,[65,20]VFYCMD/-SP=[43,30]PIPMAC,[65,30]VFYCMD
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12
TABLE OF CONTENTS

    7-   1	**** VFYSBR VERSION M0103 ****
    7-  25	SCAN THE HEADERS IN THE INDEX FILE
    8- 131	RDCKHD - READ AND CHECK HEADER
    9- 187	LBNBIT - CONVERT LBN TO WORD AND BIT NUMBER
   10- 218	FIXEOF, BITREC, DETACH, SETREC
   11- 270	READ AND VERIFY HEADER
   12- 329	LISTING OUTPUT SUBROUTINE - USES EDMSG
   15- 437	GET A BLOCK POINTER FROM MAP (COMMON)
   16- 480	FORMAT STRINGS
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 7


      1						.TITLE	VFYSBR M0103, VFY - ROOT SUBROUTINES
						.SBTTL	**** VFYSBR VERSION M0103 ****
						.IDENT	/M0103/
      2					; ALTERED MONDAY 4-NOV-74 14:25
      3					;
      4					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      5
      6					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      7					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
      8					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
      9					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     10
     11					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     12					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     13					; EQUIPMENT CORPORATION.
     14
     15					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     16					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     17					;
     18					; PETER H. LIPMAN 28-OCT-74
     19					;
     20						.MCALL	CALL,CALLR,RETURN,FDAT$R,FDRC$R
     21						.MCALL	OPEN$W,OPNS$R,OPNS$M,GET$,PUT$
     22
     23	000000					PURE.I
     24
     25						.SBTTL	SCAN THE HEADERS IN THE INDEX FILE
     26					;
     27					; SCAN FOR BITS ON IN THE INDEX FILE BIT MAP
     28					; FOR EACH BIT FOUND, READ AND VERIFY THE CORRESPONDING FILE HEADER
     29					;
     30					;
     31					; MOVE BITMAP ADDRESSED BY R1, TO BITMAP ADDRESSED BY R2
     32	000000	010160 	000002G		MULSCN::MOV	R1,F.RCNM+2(R0)
     33	000004					GET$	R0,,,RDERR
     34	000016	005201 				INC	R1
     35	000020	010260 	000002G			MOV	R2,F.RCNM+2(R0)
     36	000024					PUT$	R0,,,WRTERR
     37	000036	005202 				INC	R2
     38	000040					SOB	R3,MULSCN
     39	000044	012701 	000002 			MOV	#2,R1		;RESET RECORD SIZE TO 2 BYTES
     40	000050	012702 	000000G			MOV	#BITWRD,R2
     41	000054					CALL	SETREC
     42	000060	012700 	000000G		INXSC2::MOV	#INDEX,R0
     43	000064	012704 	000003 		INXSCN::MOV	#3,R4		;FIRST VBN OF INDEX FILE BIT MAP
     44	000070	016705 	000000G			MOV	SINXBT,R5	;NO. OF BLOCKS
     45	000074	010046 				MOV	R0,-(SP)
     46					;
     47	000076	011600 			INXSC1::MOV	@SP,R0
     48	000100	010460 	000002G			MOV	R4,F.RCNM+2(R0)
     49	000104					FDRC$R	R0,#FD.RAN	;TEMPORARILY MOVE MODE
     50	000112					GET$	R0,,,RDERR	;READ INDEX FILE BIT MAP PAGE
     51	000124					FDRC$R	R0,#FD.RAN!FD.PLC ;BACK TO PARTIAL LOCATE MODE
     52	000132	012703 	000400 			MOV	#256.,R3	;NO. OF WORDS IN BLOCK
     53	000136	016002 	000002G			MOV	F.NRBD+2(R0),R2	;ADDRESS OF BLOCK
     54	000142	012200 			10$:	MOV	(R2)+,R0	;GET NEXT BIT WORD
     55	000144	012701 	000020 			MOV	#16.,R1		;16 BITS PER WORD
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 7-1
SCAN THE HEADERS IN THE INDEX FILE

     56	000150	005267 	000000G		20$:	INC	NXTFID
     57	000154	006000 				ROR	R0		;DOES THIS FILE ID EXITS
     58	000156	103002 				BCC	40$		;BRANCH IF NO
     59	000160					CALL	RDCKHD		;YES, CHECK THIS HEADER
     60	000164				40$:	SOB	R1,20$		;NEXT BIT IN WORD
     61	000170					SOB	R3,10$		;NEXT WORD IN BLOCK
     62	000174	005204 				INC	R4
     63	000176					SOB	R5,INXSC1	;NEXT BLOCK IN INDEX FILE BIT MAP
     64	000202	005726 				TST	(SP)+		;CLEAR THE FDB ADDRESS FROM THE STACK
     65	000204	032767 	000000C	000000G		BIT	#LISTBT!RDCKBT,VFYCTL
     66	000212	001015 				BNE	45$		;BRANCH IF LIST OR READ CHECK COMMAND
     67	000214	032767 	000000G	000000G		BIT	#LOSTBT,VFYCTL
     68	000222	001413 				BEQ	50$		;BRANCH IF NOT LOST COMMAND
     69	000224	012702 	000000G			MOV	#MOPRM,R2	;SAY HOW MANY FILES WERE LOST
     70	000230	016712 	000000G			MOV	LOSTCT,@R2
     71	000234	005212 				INC	@R2		;STARTED AT -1
     72	000236	012701 	000263'			MOV	#LO31MG,R1
     73	000242					CALL	OUT1
     74	000246	000167 	000000G		45$:	JMP	RSTART
     75					;
     76					; NOW PRINT OUT HOW MUCH ROOM IS FREE ACCORDING TO BOTH MAPS
     77	000252	012700 	000000G		50$:	MOV	#TBTMAP,R0	;FREE SPACE ACCORDING TO INDEX FILE
     78	000256	012703 	000417'			MOV	#LO42MG,R3
     79	000262					CALL	OUTFRE
     80					;
     81	000266	012700 	000000G			MOV	#BITMAP,R0	;FREE SPACE ACCORDING TO BIT MAP
     82	000272	012703 	000443'			MOV	#LO43MG,R3
     83	000276					CALL	OUTFRE
     84					;
     85	000302	012701 	000465'			MOV	#LO46MG,R1	;EXTRA CR,LF
     86	000306	005002 				CLR	R2
     87	000310					CALL	OUT1
     88					;
     89	000314	032767 	000000G	000000G		BIT	#PASS2,VFYCTL	;ALREADY DONE 2ND PASS?
     90	000322	001055 				BNE	80$		;BRANCH IF YES
     91	000324	005767 	000000G			TST	MLTALC		;ANY MULTIPLE ALLOCATION ERRORS?
     92	000330	001452 				BEQ	80$		;BRANCH IF NO, ALL DONE
     93					;
     94					; TAKE A 2ND PASS TO GET NAMES AND ID'S OF ALL FILES THAT SHARE BLOCKS
     95	000332	052767 	000000G	000000G		BIS	#PASS2,VFYCTL	;NOTE THAT WE'RE IN 2ND PASS
     96	000340	012701 	000322'			MOV	#LO32MG,R1
     97	000344	005002 				CLR	R2
     98	000346	132767 	000000G	000000C		BITB	#FD.TTY,FDBOUT+F.RCTL ;IF OUTPUT TO TTY
     99	000354	001401 				BEQ	65$
    100	000356	005201 				INC	R1		;SKIP THE FORM FEED
    101	000360				65$:	CALL	OUT1		;RESCAN HEADER LINE
    102	000364	005067 	000000G			CLR	NXTFID
    103	000370	012700 	000000G			MOV	#BITMAP,R0
    104	000374	012701 	000002 			MOV	#2,R1
    105	000400	012702 	000000G			MOV	#BITWRD,R2
    106	000404					CALL	SETREC		;SET RECORD SIZE TO 2 FOR BITMAP
    107	000410					FDRC$R	#TBTMAP,#FD.RAN
    108	000422	012701 	001000 			MOV	#512.,R1
    109	000426	012702 	000000G			MOV	#INXBIT,R2
    110	000432					CALL	SETREC		;SET RECORD SIZE TO 1 BLOCK
    111					; SET UP TO MOVE THE MULT ALLOC BIT MAP OVER THE REGULAR BIT MAP
    112	000436	016703 	000000G			MOV	NBTBLK,R3
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 7-2
SCAN THE HEADERS IN THE INDEX FILE

    113	000442	016702 	000000G			MOV	FBTBLK,R2	;R2=DESTINATION ADDRESS
    114	000446	010201 				MOV	R2,R1
    115	000450	060301 				ADD	R3,R1		;R1=SOURCE OF BITMAP
    116					;
    117					; MOVE THE MULTIPLE ALLOCATION BIT MAP INTO POSITION, AND START RESCAN
    118	000452	000167 	177322 			JMP	MULSCN
    119					;
    120					;
    121	000456	000167 	000000G		80$:	JMP	RSTART
    122
    123
    124					; READ ERROR ON FILE IN R0
    125	000462				RDERR::	ERROUX	ER11,0,0
	000462	104427 				TRAP	X
	000464	000000G				.WORD	ER11SZ
	000466	000000G				.WORD	ER11MG
    126
    127					; WRITE ERROR ON FILE IN R0
    128	000470				WRTERR::ERROUX	ER12,0,0
	000470	104427 				TRAP	X
	000472	000000G				.WORD	ER12SZ
	000474	000000G				.WORD	ER12MG
    129
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 8
RDCKHD - READ AND CHECK HEADER

    131						.SBTTL	RDCKHD - READ AND CHECK HEADER
    132					;
    133					; READ AND CHECK ALLOCATION FOR FILE HEADER
    134					; PRESERVES ALL REGISTERS
    135	000476				RDCKHD::CALL	$SAVAL
    136	000502	012700 	000000G			MOV	#INDEX,R0
    137	000506					CALL	INIOUT
    138	000512	016705 	000000G			MOV	NXTFID,R5	;FILE ID TO BE CHECKED
    139	000516	010560 	000002G			MOV	R5,F.RCNM+2(R0) ;SET UP TO READ THE HEADER
    140	000522	066705 	000000G			ADD	INXOFF,R5	;FORM VBN IN INDEX FILE
    141	000526	020560 	000002G			CMP	R5,F.HIBK+2(R0)	;BEYOND EOF?
    142	000532	101056 				BHI	50$		;BRANCH IF YES, ERROR
    143	000534					CALL	RDHEDR		;READ AND VERIFY THE FILE HEADER
    144	000540	103463 				BCS	60$		;BRANCH IF HEADER WAS NO GOOD
    145	000542	052767 	000000G	000000G		BIS	#HDROK,OUTCTL	;NOTE THAT HEADER IS IN CORE
    146	000550	032767 	000000G	000000G		BIT	#LISTBT,VFYCTL	;LISTING THE INDEX FILE?
    147	000556	001052 				BNE	55$		;BRANCH IF YES
    148	000560	032767 	000000G	000000G		BIT	#RDCKBT,VFYCTL	;READ CHECK OF THE FILES?
    149	000566	001402 				BEQ	5$		;BRANCH IF NO
    150	000570					CALLR	RDFIL		;YES, GO READ THE ENTIRE FILE
    151					;
    152					; IS THE FILE THE TEMP FILE?  IF IT IS SKIP IT FOR THE
    153					; /LO COMMANDS, AND DON'T CHECK THE DELETE BIT
    154					;
    155	000574	026167 	000000G	000000C	5$:	CMP	HH.FNU(R1),TBTMAP+F.FNB+N.FID ;FILE NUMBER?
    156	000602	001022 				BNE	10$
    157	000604	026167 	000000G	000000C		CMP	HH.FSQ(R1),TBTMAP+F.FNB+N.FID+2 ;FILE SEQUENCE NO.
    158	000612	001016 				BNE	10$
    159	000614	026767 	000000C	000000C		CMP	INDEX+F.DVNM,TBTMAP+F.DVNM ;DEVICE?
    160	000622	001012 				BNE	10$
    161	000624	026767 	000000C	000000C		CMP	INDEX+F.UNIT,TBTMAP+F.UNIT ;UNIT?
    162	000632	001006 				BNE	10$
    163					;
    164					; THIS IS THE TEMP FILE
    165					;
    166	000634	032767 	000000G	000000G		BIT	#LOSTBT,VFYCTL	;LOST FILE SCAN?
    167	000642	001024 				BNE	80$		;BRANCH IF YES, ,DON'T REPORT IT
    168	000644					CALLR	CONCK1		;NO, CHECK CONSISTENCY, BUT NOT DEL BIT
    169	000650	032767 	000000G	000000G	10$:	BIT	#LOSTBT,VFYCTL	;SCANNING FOR LOST FILES?
    170	000656	001402 				BEQ	20$		;BRANCH IF NO
    171	000660					CALLR	ENTERL		;YES, ENTER THIS ONE IN THE LOST FILE DIR
    172	000664				20$:	CALLR	CONCHK		;CHECK THE CONSISTENCY
    173					;
    174					; HEADER IS BEYOND INDEX FILE END OF FILE
    175					;
    176	000670	012701 	000470'		50$:	MOV	#LO47MG,R1	;FILE HEADER BEYOND INDEX FILE EOF
    177	000674	005002 				CLR	R2
    178	000676					CALL	OUTC
    179	000702	000402 				BR	60$
    180					;
    181					; LIST THE FILE
    182					;
    183	000704				55$:	CALL	HDROUT
    184	000710				60$:	CALL	TRMOUT
    185	000714				80$:	RETURN
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 9
LBNBIT - CONVERT LBN TO WORD AND BIT NUMBER

    187						.SBTTL	LBNBIT - CONVERT LBN TO WORD AND BIT NUMBER
    188					; CONVERT LBN TO WORD NUMBER AND BIT NUMBER
    189					; INPUT
    190					;	R2,R3	=HIGH, LOW ORDER LBN
    191					; OUTPUT
    192					;	R2,R3	=WORD NUMBER-(1ST WORD=0)
    193					;	R1	=MASK FOR DESIRED BIT
    194	000716	012701 	000001 		LBNBIT::MOV	#1,R1
    195	000722	010346 				MOV	R3,-(SP)
    196	000724	042716 	177760 			BIC	#177760,@SP
    197
    198						.IF	GT,R$$EIS
    199						ASH	(SP)+,R1
    200						ASHC	#-4,R2
    201
    202						.IFF
    203	000730	001403 				BEQ	20$
    204	000732	006301 			10$:	ASL	R1		;SHIFT R1 LEFT BY COUNT ON STACK
    205	000734	005316 				DEC	(SP)		;FORMING BIT MASK
    206	000736	003375 				BGT	10$
    207	000740	005726 			20$:	TST	(SP)+		;POP THE SHIFT COUNT
    208	000742	012746 	000004 			MOV	#4,-(SP)	;RIGHT SHIFT COUPLED R2,R3 BY 4
    209	000746	006202 			30$:	ASR	R2
    210	000750	006003 				ROR	R3
    211	000752	005316 				DEC	(SP)
    212	000754	003374 				BGT	30$
    213	000756	005726 				TST	(SP)+		;POP THE EXHAUSTED SHIFT COUNT
    214						.ENDC
    215
    216	000760					RETURN
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 10
FIXEOF, BITREC, DETACH, SETREC

    218						.SBTTL	FIXEOF, BITREC, DETACH, SETREC
    219					; USE THE FILE SIZE FROM THE STATISTICS BLOCK TO SET EFBK AND FFBY
    220	000762	016046 	000000G		FIXEOF::MOV	F.HIBK(R0),-(SP)
    221	000766	056026 	000002G			BIS	F.HIBK+2(R0),(SP)+ ;IF HIBK IS ZERO
    222	000772	001025 				BNE	20$
    223	000774	005060 	000002G			CLR	F.VBN+2(R0)	;FIX UP THE EOF AND CURRENT BLOCK NO
    224	001000	016760 	000004G	000000G		MOV	STBLK+4,F.EFBK(R0)
    225	001006	016760 	000006G	000002G		MOV	STBLK+6,F.EFBK+2(R0)
    226	001014	016760 	000004G	000000G		MOV	STBLK+4,F.HIBK(R0)
    227	001022	016760 	000006G	000002G		MOV	STBLK+6,F.HIBK+2(R0)
    228	001030	062760 	000001 	000002G		ADD	#1,F.EFBK+2(R0)
    229	001036	005560 	000000G			ADC	F.EFBK(R0)
    230	001042	005060 	000000G			CLR	F.FFBY(R0)
    231	001046				20$:	RETURN
    232					; R0=FDB,R2,R3=RECORD NO RELATIVE TO BEGINNING OF MAP AREA
    233	001050	010260 	000000G		BITREC::MOV	R2,F.RCNM(R0)	;SET THE DESIRED RECORD NUMBER
    234	001054	010360 	000002G			MOV	R3,F.RCNM+2(R0)
    235	001060	066760 	000000G	000002G		ADD	MAPOFF,F.RCNM+2(R0) ;ADD IN THE OFFSET
    236	001066	005560 	000000G			ADC	F.RCNM(R0)
    237	001072					RETURN
    238					;
    239					; DETACH THE OUTPUT LISTING DEVICE IF NECESSARY
    240	001074	005760 	000000G		DETACH::TST	F.BDB(R0)	;IF CLOSED, DON'T DETACH
    241	001100	001422 				BEQ	20$
    242	001102	032767 	000000G	000000G		BIT	#DEVATT,OUTCTL	;IF NOT RECORDED ATTACHED, DON'T DETACH
    243	001110	001416 				BEQ	20$
    244	001112	042767 	000000G	000000G		BIC	#DEVATT,OUTCTL	;RECORD DEVICE DETACHED
    245	001120	012701 	000000G			MOV	#IO.DET,R1
    246	001124	005002 				CLR	R2
    247	001126					CALL	.XQIO		;ISSUE THE DETACH QI/O
    248	001132	103005 				BCC	20$
    249	001134					ERROUT	ER06,0,0	;FAILED TO DETACH
	001134	104426 				TRAP	X
	001136	000000G				.WORD	ER06SZ
	001140	000000G				.WORD	ER06MG
    250	001142	000167 	000000G			JMP	RSTART
    251	001146				20$:	RETURN
    252					;
    253					;+
    254					; SET RECORD SIZE AND BUFFER
    255					; CALLING SEQUENCE:
    256					;	CALL	SETREC
    257					; INPUTS:
    258					;	R0=FDB
    259					;	R1=RECORD SIZE
    260					;	R2=RECORD BUFFER ADDRESS
    261					; OUTPUTS:
    262					;	ALL REGISTERS PRESERVED
    263					;-
    264	001150	010160 	000000G		SETREC::MOV	R1,F.NRBD(R0)
    265	001154	010260 	000002G			MOV	R2,F.NRBD+2(R0)	;NEXT RECORD BUFFER ADDRESS AND SIZE
    266	001160					FDAT$R	R0,,,R1
    267	001164					FDRC$R	R0,,R2,R1
    268	001174					RETURN
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 11
READ AND VERIFY HEADER

    270						.SBTTL	READ AND VERIFY HEADER
    271					;+
    272					; READ AND VERIFY FILE HEADER
    273					; INPUTS:
    274					;	R0=FDB ADDRESS
    275					; OUTPUTS:
    276					;	ALL REGISTERS ALTERED
    277					;	C=0 FOR CORRECTLY READ AND VERIFIED HEADER, R1=ADDRESS OF HEADER
    278					;	C=1 IF HEADER WAS BAD, MESSAGE ALREADY SENT
    279					;-
    280	001176	066760 	000000G	000002G	RDHEDR::ADD	INXOFF,F.RCNM+2(R0)
    281	001204					GET$	R0
    282	001210	103412 				BCS	50$		;BRANCH IF I/O ERROR READING HEADER
    283	001212	016001 	000002G			MOV	F.NRBD+2(R0),R1
    284	001216	026761 	000000G	000000G		CMP	NXTFID,HH.FNU(R1) ;DOES FILE ID AGREE
    285	001224	001010 				BNE	60$		;BRANCH IF BAD DATA
    286	001226					CALL	VFYHDR		;CONSISTENCY CHECK, PARITY CHECK
    287	001232	103405 				BCS	60$		;BRANCH IF FAILED TESTS
    288	001234					RETURN
    289					;
    290					; READ ERROR ON FILE HEADER
    291	001236	012701 	000162'		50$:	MOV	#LO20MG,R1
    292	001242					CALLR	HDRERR
    293					;
    294					; BAD FILE HEADER, DATA IS INCONSISTENT
    295	001246	012701 	000242'		60$:	MOV	#LO21MG,R1
    296	001252	005002 				CLR	R2
    297	001254					CALL	OUTC
    298	001260	000261 			99$:	SEC
    299	001262					RETURN
    300					;
    301					; VERIFY THE HEADER BLOCK
    302	001264	012704 	000377 		VFYHDR::MOV	#255.,R4	;NUMBER OF WORDS TO SUM
    303	001270	005003 				CLR	R3		;COLLECT CHECKSUM HERE
    304	001272	010102 				MOV	R1,R2
    305	001274	062203 			10$:	ADD	(R2)+,R3	;ADDITIVE CHECKSUM
    306	001276					SOB	R4,10$
    307	001302	021203 				CMP	@R2,R3		;CHECKSUM OK?
    308	001304	001011 				BNE	60$		;BRANCH IF NO
    309					;
    310					; FILE NUMBER MUST BE NON-ZERO AND SMALLER THAN MAXFNU
    311	001306	005761 	000000G			TST	HH.FNU(R1)
    312	001312	001406 				BEQ	60$		;ERROR IF FILE NUMBER IS 0
    313	001314	026167 	000000G	000000G		CMP	HH.FNU(R1),MAXFNU
    314	001322	101002 				BHI	60$		;ERROR IF LARGER THAN MAX
    315	001324	000241 				CLC			;HEADER IS OK
    316	001326					RETURN
    317					; HEADER IS BAD
    318	001330	000261 			60$:	SEC
    319	001332					RETURN
    320					;
    321					; I/O ERROR READING OR WRITING INDEX FILE
    322	001334	012702 	000000G		HDRERR::MOV	#MOPRM,R2
    323	001340	116000 	000000G			MOVB	F.ERR(R0),R0
    324	001344	010012 				MOV	R0,@R2
    325	001346					CALL	OUTC
    326	001352	000261 				SEC
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 11-1
READ AND VERIFY HEADER

    327	001354					RETURN
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 12
LISTING OUTPUT SUBROUTINE - USES EDMSG

    329						.SBTTL	LISTING OUTPUT SUBROUTINE - USES EDMSG
    330
    331					; OUTPUT MSG WITH LOGICAL BLOCK NUMBER, R1=FORMAT STRING
    332	001356	012702 	000000G		OUTLB::	MOV	#MOPRM,R2
    333	001362	016712 	000000G			MOV	LBN,@R2
    334	001366	016762 	000002G	000002 		MOV	LBN+2,2(R2)
    335	001374					CALLR	OUTC
    336					;
    337					; OUTPUT MESSAGE FIRST CHECKING THAT HEADER HAS BEEN WRITTEN
    338					; R1=FORMAT STRING, R2=PARAMETER BLOCK ADDRESS, PARAMETERS
    339					; ARE ALL FILLED IN.
    340	001400	032767 	000000G	000000G	OUTC::	BIT	#OUTID,OUTCTL
    341	001406	001002 				BNE	OUT1
    342	001410					CALL	HDROUT		;PUT THE HEADER OUT
    343
    344					; OUTPUT MESSAGE, R1=FORMAT STRING, R2=PARAM BLOCK, FILLED IN
    345	001414	016700 	000000C		OUT1::	MOV	FDBOUT+F.NRBD+2,R0
    346	001420					CALL	$EDMSG
    347	001424				OUT2::	PUT$	#FDBOUT,,R1,WRTERR
    348	001446					RETURN
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 13
LISTING OUTPUT SUBROUTINE - USES EDMSG

    350					; OUTPUT HEADER IDENTIFYING THE FILE WHICH THE SUBSEQUENT
    351					; ERROR REPORTS REFERENCE.  PUT OUT THE ID AND THE FILE NAME
    352					; PRESERVE ALL BUT R0
    353	001450	004567 	000000G		HDROUT::JSR	R5,.SAVR1
    354	001454	012700 	000000G			MOV	#FDBOUT,R0
    355	001460	132760 	000000G	000000G		BITB	#FD.TTY,F.RCTL(R0) ;IF TTY, ATTACH
    356	001466	001416 				BEQ	6$
    357	001470	012701 	000000G			MOV	#IO.ATT,R1
    358	001474	005002 				CLR	R2
    359	001476					CALL	.XQIO
    360	001502	103005 				BCC	4$
    361	001504					ERROUT	ER07,0,0
	001504	104426 				TRAP	X
	001506	000000G				.WORD	ER07SZ
	001510	000000G				.WORD	ER07MG
    362	001512	000167 	000000G			JMP	RSTART
    363	001516	052767 	000000G	000000G	4$:	BIS	#DEVATT,OUTCTL	;NOTE THAT DEVICE IS ATTACHED
    364	001524	032767 	000000G	000000G	6$:	BIT	#RDCKBT,VFYCTL	;USE READ CHECK HEADER FORMAT?
    365	001532	001403 				BEQ	8$		;BRANCH IF NO
    366	001534					CALL	RCHDOU		;YES, OUTPUT THE HEADER
    367	001540	000443 				BR	40$		;AND EXIT
    368	001542	162706 	000026 		8$:	SUB	#11.*2,SP
    369	001546	010600 				MOV	SP,R0
    370	001550	010002 				MOV	R0,R2
    371	001552	032767 	000000G	000000G		BIT	#HDROK,OUTCTL
    372	001560	001007 				BNE	10$		;BRANCH IF HEADER IS IN CORE
    373	001562	012701 	000040'			MOV	#LO02MG,R1	;OTHERWISE JUST USE FILE NO.
    374	001566	016720 	000000G			MOV	NXTFID,(R0)+
    375	001572	016720 	000002G			MOV	NXTFID+2,(R0)+
    376	001576	000420 				BR	20$
    377
    378					; OUTPUT THE FULL FILE ID AND FILE NAME FROM THE HEADER
    379	001600	016704 	000000C		10$:	MOV	INDEX+F.NRBD+2,R4
    380	001604	016420 	000000G			MOV	HH.FNU(R4),(R0)+ ;FILE NUMBER
    381	001610	016420 	000000G			MOV	HH.FSQ(R4),(R0)+ ;FILE SEQUENCE NUMBER
    382	001614					CALL	MVFNAM
    383	001620	116420 	000000G			MOVB	HH.GC(R4),(R0)+
    384	001624	105020 				CLRB	(R0)+
    385	001626	116420 	000000G			MOVB	HH.PC(R4),(R0)+
    386	001632	105020 				CLRB	(R0)+
    387	001634	012701 	000000'			MOV	#LO01MG,R1
    388	001640				20$:	CALL	OUT1
    389	001644	062706 	000026 			ADD	#11.*2,SP
    390	001650	052767 	000000G	000000G	40$:	BIS	#OUTID,OUTCTL	;NOTE ID SENT
    391	001656					RETURN
    392					;
    393					;+
    394					; MOVE FILE NAME FROM FILE HEADER
    395					; INPUTS:
    396					;	R0=DESTINATION
    397					;	R4=ADDRESS OF FILE HEADER
    398					; OUTPUTS:
    399					;	R0 UPDATED TO NEXT WORD BEYOND FILE NAME
    400					;	R1,R3 ALTERED
    401					;	R2,R4,R5 PRESERVED
    402					;-
    403	001660	005001 			MVFNAM::CLR	R1
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 13-1
LISTING OUTPUT SUBROUTINE - USES EDMSG

    404	001662	156401 	000000G			BISB	HH.IDO(R4),R1
    405	001666	006301 				ASL	R1
    406	001670	060401 				ADD	R4,R1
    407	001672	012703 	000001G			MOV	#S.FNTY+1,R3	;NO. OF WORDS IN NAME, TYPE, AND VER
    408	001676	012120 			15$:	MOV	(R1)+,(R0)+
    409	001700					SOB	R3,15$
    410	001704					RETURN
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 14
LISTING OUTPUT SUBROUTINE - USES EDMSG

    412					; INITIALIZE FOR ERROR OUTPUT ABOUT A GIVEN FILE
    413	001706	005067 	000000G		INIOUT::CLR	OUTCTL
    414	001712	005067 	000000G			CLR	NBAD
    415	001716	005067 	000000G			CLR	NMULT
    416	001722	005067 	000000G			CLR	NFREE
    417	001726					RETURN
    418
    419					; TERMINATE OUTPUT FOR A GIVEN FILE
    420	001730	012700 	000000G		TRMOUT::MOV	#FDBOUT,R0
    421	001734					CALL	DETACH
    422	001740	016700 	000000G			MOV	NMULT,R0
    423	001744	056700 	000000G			BIS	NFREE,R0
    424	001750	056700 	000000G			BIS	NBAD,R0
    425	001754	001415 				BEQ	30$		;BRANCH IF NO ERRORS
    426
    427					; PUT OUT SUMMARY OF ERRORS
    428	001756	012700 	000000G			MOV	#MOPRM,R0
    429	001762	010002 				MOV	R0,R2
    430	001764	016720 	000000G			MOV	NMULT,(R0)+
    431	001770	016720 	000000G			MOV	NFREE,(R0)+
    432	001774	016720 	000000G			MOV	NBAD,(R0)+
    433	002000	012701 	000056'			MOV	#LO07MG,R1
    434	002004					CALL	OUT1
    435	002010				30$:	RETURN
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 15
GET A BLOCK POINTER FROM MAP (COMMON)

    437					.SBTTL	GET A BLOCK POINTER FROM MAP (COMMON)
    438
    439					;CALL:	JSR	PC,GETBKP 	;RETURNS IN LINE,CLOSED
    440					;STACK:	01 --- NO INTERNAL CALLS
    441
    442					;IN:	R0 - POINTS TO MAP DESCRIPTOR HM.PNT IN HEADER
    443					;	R5 - POINTS TO BLOCK MAP ENTRY TO GET
    444
    445					;OUT:	C=1 - END OF MAP REGION ENCOUNTERED
    446					;	C=0 - REGISTERS SET AS FOLLOWS:
    447					;	R2,R3 - LOGICAL BLOCK OF POINTER ENTRY
    448					;	R4 - COUNT OF BLOCKS IN POINTER
    449					;	R5 - POINTS TO BYTE PAST ABOVE ENTRY
    450					;	R0,R1 - GRACIOUSLY LEFT ALONE.
    451
    452	002012	005002 			GETBKP::CLR	R2		;GET # OF WORDS USED
    453	002014	156002 	000000C			BISB	HM.USE-HM.PNT(R0),R2
    454	002020	006302 				ASL	R2		;WORDS TO BYTES
    455	002022	060002 				ADD	R0,R2		;GET FIRST UNUSED SLOT
    456	002024	020205 				CMP	R2,R5		;JUMP IF NOW AT END OF MAP
    457	002026	001431 				BEQ	98$
    458	002030	010246 				MOV	R2,-(SP)	;SAVE END POINTER
    459	002032	012504 				MOV	(R5)+,R4	;GET COUNT
    460	002034	005002 				CLR	R2		;CLEAR HIGH ORDER BLOCK #
    461	002036	126027 	000000C	000003 		CMPB	HM.BN-HM.PNT(R0),#3	;CHECK FORMAT
    462	002044	101005 				BHI	11$		;JUMP IF 2,4
    463	002046	103405 				BLO	12$		;JUMP IF 2,2
    464	002050	150402 				BISB	R4,R2		;GET HIGH 8 BITS OF BLOCK #
    465	002052	105004 				CLRB	R4		;GET 1,3 COUNT
    466	002054	000304 				SWAB	R4
    467	002056	000401 				BR	12$		;GO GET LOW ORDER
    468	002060	012502 			11$:	MOV	(R5)+,R2	;GET HIGH ORDER BLOCK #
    469	002062	012503 			12$:	MOV	(R5)+,R3	;GET LOW ORDER BLOCK #
    470	002064	005204 				INC	R4		;DELIVER TRUE COUNT
    471	002066	022605 				CMP	(SP)+,R5	;CHECK IF STILL IN TABLE
    472	002070	103011 				BCC	99$		;JUMP FOR SUCCESS
    473	002072	005267 	000000G			INC	NBAD
    474	002076	012701 	000132'			MOV	#LO10MG,R1
    475	002102	012702 	000000G			MOV	#MOPRM,R2
    476	002106					CALL	OUTC
    477	002112	000261 			98$:	SEC			;FLAG FAILURE
    478	002114	000207 			99$:	RTS	PC		;RETURN
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 16
FORMAT STRINGS

    480						.SBTTL	FORMAT STRINGS
    481
    482	000000					.PSECT
    483	000000					MSG	LO01,<FILE ID %P,%P %X  >
    484	000000					MSGZ	,<OWNER [%O,%O]>
    485	000000					MSGZ	LO02,<FILE ID %P,%P>
    486	000000					MSGZ	LO07,<	SUMMARY: MULT = %D.  FREE = %D.  BAD = %D.>
    487	000000					MSGZ	LO10,<	HEADER MAP OUT OF SYNC>
    488	000000					MSGZ	LO20,<	I/O ERROR READING FILE HEADER - ERROR CODE %D.>
    489	000000					MSGZ	LO21,<	BAD FILE HEADER>
    490	000000					MSG1	LO31,<<15><12><11>^%D. LOST FILES WERE FOUND^>
    491	000000					MSG1	,<<15><12><0>>
    492	000000					MSG1	LO32,<<14>^RESCAN OF VOLUME TO FIND ALL FILES ^>
    493	000000					MSGZ	,<WITH MULTIPLE ALLOCATION>
    494	000000					MSGZ	LO42,<%NINDEX  INDICATES >
    495	000000					MSGZ	LO43,<BITMAP INDICATES >
    496	000000					MSGZ	LO46,<%N>
    497	000000					MSGZ	LO47,<	FILE HEADER DOES NOT EXIST>
    498						.EVEN
    499					;
    500					;
    501		000001 				.END
VFYSBR M0103, VFY - ROOT SUBROU	MACRO M1108  06-DEC-77 00:12  PAGE 16-1
SYMBOL TABLE

BITMAP= ****** GX	F.HIBK= ****** GX	IO.ATT= ****** GX	LO46SZ= 000003   	RDERR   000462RG    002
BITREC  001050RG    002	F.NRBD= ****** GX	IO.DET= ****** GX	LO47MG= 000470R     003	RDFIL = ****** GX
BITWRD= ****** GX	F.RACC= ****** GX	LBN   = ****** GX	LO47SZ= 000034   	RDHEDR  001176RG    002
CONCHK= ****** GX	F.RCNM= ****** GX	LBNBIT  000716RG    002	MAPOFF= ****** GX	RSTART= ****** GX
CONCK1= ****** GX	F.RCTL= ****** GX	LISTBT= ****** GX	MAXFNU= ****** GX	R$$DPB= 000001
DETACH  001074RG    002	F.RSIZ= ****** GX	LOSTBT= ****** GX	MG    = 000366R     003	R$$DYM= 000001
DEVATT= ****** GX	F.UNIT= ****** GX	LOSTCT= ****** GX	MLTALC= ****** GX	R$$EIS= 000000
ENTERL= ****** GX	F.URBD= ****** GX	LO01MG= 000000R     003	MOPRM = ****** GX	R$$MSG= 000000
ER06MG= ****** GX	F.VBN = ****** GX	LO01SZ= 000022   	MULSCN  000000RG    002	R$$11M= 000001
ER06SZ= ****** GX	GETBKP  002012RG    002	LO02MG= 000040R     003	MVFNAM  001660RG    002	SETREC  001150RG    002
ER07MG= ****** GX	HDRERR  001334RG    002	LO02SZ= 000016   	NBAD  = ****** GX	SINXBT= ****** GX
ER07SZ= ****** GX	HDROK = ****** GX	LO07MG= 000056R     003	NBTBLK= ****** GX	STBLK = ****** GX
ER11MG= ****** GX	HDROUT  001450RG    002	LO07SZ= 000054   	NFREE = ****** GX	SZ    = 000031
ER11SZ= ****** GX	HH.FNU= ****** GX	LO10MG= 000132R     003	NMULT = ****** GX	S.FNTY= ****** GX
ER12MG= ****** GX	HH.FSQ= ****** GX	LO10SZ= 000030   	NXTFID= ****** GX	TBTMAP= ****** GX
ER12SZ= ****** GX	HH.GC = ****** GX	LO20MG= 000162R     003	N.FID = ****** GX	TRMOUT  001730RG    002
FBTBLK= ****** GX	HH.IDO= ****** GX	LO20SZ= 000060   	OUTC    001400RG    002	VFYCTL= ****** GX
FDBOUT= ****** GX	HH.PC = ****** GX	LO21MG= 000242R     003	OUTCTL= ****** GX	VFYHDR  001264RG    002
FD.PLC= ****** GX	HM.BN = ****** GX	LO21SZ= 000021   	OUTFRE= ****** GX	WRTERR  000470RG    002
FD.RAN= ****** GX	HM.PNT= ****** GX	LO31MG= 000263R     003	OUTID = ****** GX	X     = 000026
FD.TTY= ****** GX	HM.USE= ****** GX	LO31SZ= 000034   	OUTLB   001356RG    002	$EDMSG= ****** GX
FIXEOF  000762RG    002	INDEX = ****** GX	LO32MG= 000322R     003	OUT1    001414RG    002	$SAVAL= ****** GX
F.BDB = ****** GX	INIOUT  001706RG    002	LO32SZ= 000044   	OUT2    001424RG    002	$$    = 000067
F.DVNM= ****** GX	INXBIT= ****** GX	LO42MG= 000417R     003	PAR$$$= 000027   	$$$T1 = 000067
F.EFBK= ****** GX	INXOFF= ****** GX	LO42SZ= 000024   	PASS2 = ****** GX	.GET  = ****** G
F.ERR = ****** GX	INXSCN  000064RG    002	LO43MG= 000443R     003	RCHDOU= ****** GX	.PUT  = ****** G
F.FFBY= ****** GX	INXSC1  000076RG    002	LO43SZ= 000022   	RDCKBT= ****** GX	.SAVR1= ****** GX
F.FNB = ****** GX	INXSC2  000060RG    002	LO46MG= 000465R     003	RDCKHD  000476RG    002	.XQIO = ****** GX

. ABS.	000000	   000
      	000000	   001
PURE$I	002116	   002
MSGSTR	000524	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  4439 WORDS  ( 18 PAGES)
DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:00:53
[65,10]VFYSBR,[65,20]VFYSBR/-SP=[43,30]PIPMAC,[65,30]VFYSBR
VFYCCK M0100, VFY - CONSISTENCY	MACRO M1108  06-DEC-77 00:13
TABLE OF CONTENTS

    7-   1	**** VFYCCK VERSION M0100 ****
    8-  77	CKLBN - CHECK ALLOCATION OF THE LBN
    9- 123	MULTAL, BLKFRE
   10- 160	WRITE FILE HEADER
   10- 188	FORMAT STRINGS
VFYCCK M0100, VFY - CONSISTENCY	MACRO M1108  06-DEC-77 00:13  PAGE 7


      1						.TITLE	VFYCCK M0100, VFY - CONSISTENCY CHECK LOGIC
						.SBTTL	**** VFYCCK VERSION M0100 ****
						.IDENT	/M0100/
      2					; ALTERED  THURSDAY 31-OCT-74 9:35
      3					;
      4					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      5
      6					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      7					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
      8					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
      9					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     10
     11					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     12					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     13					; EQUIPMENT CORPORATION.
     14
     15					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     16					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     17					;
     18					; PETER H. LIPMAN 31-OCT-74
     19					;
     20						.MCALL	CALL,CALLR,RETURN,GET$,PUT$
     21
     22	000000					PURE.I
     23
     24					;+
     25					;
     26					; ** CONCHK - PERFORM THE HEADER MAP AREA CONSISTENCY CHECK
     27					;
     28					; INPUTS:
     29					;
     30					;	R1=ADDRESS OF HEADER
     31					;	INDEX*F.NRBD+2=ADDRESS OF HEADER
     32					;
     33					; OUTPUTS:
     34					;
     35					;
     36					;	ALL REGISTERS ALTERED
     37					;
     38					;-
     39	000000	132761 	000000G	000000G	CONCHK::BITB	#HS.MDL,HH.CHS(R1) ;IS FILE MARKED FOR DELETE?
     40	000006	001432 				BEQ	20$		;BRANCH IF NO
     41					;
     42					; FILE IS MARKED FOR DELETE
     43					;
     44	000010	012701 	000117'			MOV	#LO17MG,R1	;FILE IS MARKED FOR DELETE
     45	000014	005002 				CLR	R2
     46	000016					CALL	OUTC
     47	000022	032767 	000000G	000000G		BIT	#UNDLBT,VFYCTL	;UNDELETING DELETED FILES
     48	000030	001421 				BEQ	20$		;BRANCH IF NO
     49	000032	012700 	000000G			MOV	#INDEX,R0
     50	000036	016760 	000000G	000002G		MOV	NXTFID,F.RCNM+2(R0)
     51	000044	016001 	000002G			MOV	F.NRBD+2(R0),R1
     52	000050	142761 	000000G	000000G		BICB	#HS.MDL,HH.CHS(R1) ;RESET THE MARKED FOR DELETE BIT
     53	000056					CALL	WTHEDR
     54	000062	016760 	000000G	000002G		MOV	NXTFID,F.RCNM+2(R0)
     55	000070					CALL	RDHEDR		;RE-READ THE HEADER, REESTABLISH CONTEXT
VFYCCK M0100, VFY - CONSISTENCY	MACRO M1108  06-DEC-77 00:13  PAGE 7-1
**** VFYCCK VERSION M0100 ****

     56	000074				20$:
     57					;
     58					; ENTER HERE TO CHECK THE CONSISTENCY BUT IGNORE THE MARKED FOR DELETE BIT
     59					;
     60	000074	016701 	000000C		CONCK1::MOV	INDEX+F.NRBD+2,R1
     61	000100	005000 				CLR	R0
     62	000102	156100 	000000G			BISB	HH.MAP(R1),R0
     63	000106	006300 				ASL	R0
     64	000110	060100 				ADD	R1,R0
     65	000112	062700 	000000G			ADD	#HM.PNT,R0
     66	000116	010005 				MOV	R0,R5
     67	000120				40$:	CALL	GETBKP		;GET THE NEXT CLUSTER OF BLOCKS
     68	000124	103002 				BCC	50$
     69	000126					CALLR	TRMOUT		;NO MORE BLOCKS, ALL DONE
     70					; R2,R3=LBN,R4=NO. OF BLOCKS
     71	000132				50$:	CALL	CKLBN		;CHECK ALLOCATION OF THAT LBN
     72	000136	062703 	000001 			ADD	#1,R3		;DO NEXT BLOCK IN CLUSTER
     73	000142	005502 				ADC	R2
     74	000144					SOB	R4,50$
     75	000150	000763 				BR	40$		;END OF CLUSTER, GET NEXT ONE
VFYCCK M0100, VFY - CONSISTENCY	MACRO M1108  06-DEC-77 00:13  PAGE 8
CKLBN - CHECK ALLOCATION OF THE LBN

     77						.SBTTL	CKLBN - CHECK ALLOCATION OF THE LBN
     78					; R1=BIT MASK, R2,R3=RECORD NUMBER
     79					; CHECK THE ALLOCATION OF THE LBN
     80	000152	004567 	000000G		CKLBN::	JSR	R5,.SAVR1
     81	000156	010046 				MOV	R0,-(SP)
     82	000160	010267 	000000G			MOV	R2,LBN		;SAVE CURRENT LOGICAL BLOCK NO.
     83	000164	010367 	000002G			MOV	R3,LBN+2
     84	000170	020267 	000000G			CMP	R2,MAXLBN
     85	000174	001002 				BNE	5$
     86	000176	020367 	000002G			CMP	R3,MAXLBN+2
     87	000202	103407 			5$:	BLO	10$
     88
     89					; BLOCK NUMBER OUT OF RANGE
     90	000204	005267 	000000G			INC	NBAD
     91	000210	012701 	000033'			MOV	#LO04MG,R1
     92	000214					CALL	OUTLB		;REPORT BAD BLOCK NUMBER
     93	000220	000475 				BR	50$		;AND SKIP THE BIT MAP CHECKS
     94	000222				10$:	CALL	LBNBIT
     95	000226	012700 	000000G			MOV	#TBTMAP,R0	;CHECK THE TEMP BIT MAP
     96	000232					CALL	BITREC
     97	000236					GET$	R0,,,RDERR
     98	000250	030167 	000000G			BIT	R1,BITWRD	;SHOULD BE SET=FREE
     99	000254	001005 				BNE	20$		;BRANCH IF IT IS OK
    100	000256	005267 	000000G			INC	NMULT
    101	000262					CALL	MULTAL		;MULTIPLE ALLOCATION
    102	000266	000411 				BR	25$
    103	000270	040167 	000000G		20$:	BIC	R1,BITWRD	;MARK IT ALLOCATED
    104	000274					CALL	BITREC
    105	000300					PUT$	R0,,,WRTERR
    106	000312	012700 	000000G		25$:	MOV	#BITMAP,R0	;NOW CHECK THE REAL BIT MAP
    107	000316					CALL	BITREC
    108	000322					GET$	R0,,,RDERR
    109	000334	030167 	000000G			BIT	R1,BITWRD	;SHOULD ALREADY BE ALLOCATE
    110	000340	001425 				BEQ	50$		;BRANCH IF IT IS
    111	000342	032767 	000000G	000000G		BIT	#RBUILD,VFYCTL	;REBUILDING BIT MAP?
    112	000350	001004 				BNE	30$		;BRANCH IF YES, SKIP ERROR MSG
    113	000352	005267 	000000G			INC	NFREE
    114	000356					CALL	BLKFRE		;BLOCK IN USE, MARKED FREE
    115	000362	032767 	000000G	000000G	30$:	BIT	#UPDATE,VFYCTL  ;FIXING THIS TYPE OF ERROR?
    116	000370	001411 				BEQ	50$		;BRANCH IF NO
    117	000372	040167 	000000G			BIC	R1,BITWRD
    118	000376					CALL	BITREC		;UPDATE BIT TABLE
    119	000402					PUT$	R0,,,WRTERR
    120	000414	012600 			50$:	MOV	(SP)+,R0
    121	000416					RETURN
VFYCCK M0100, VFY - CONSISTENCY	MACRO M1108  06-DEC-77 00:13  PAGE 9
MULTAL, BLKFRE

    123						.SBTTL	MULTAL, BLKFRE
    124					; RECORD MULTIPLE ALLOCATION ERROR
    125					; CALLING SEQUENCE:
    126					;	CALL	MULTAL
    127					; INPUTS:
    128					;	R0=TEMP BIT MAP FDB ADDRESS
    129					;	R1=BIT TO TEST IN WORD
    130					;	R2,R3 =WORD NUMBER TO TEST
    131					; OUTPUTS:
    132					;	ALL REGISTERS PRESERVED
    133					; OPERATION:
    134					;	RECORDS THE MULTIPLY ALLOCATED BLOCK IN THE MULT ALLOC
    135					; PORTION OF THE TEMP BITMAP, AND SEND THE ERROR MESSAGE TO THE LISTING
    136					;-
    137	000420				MULTAL::CALL	$SAVAL
    138	000424	005267 	000000G			INC	MLTALC		;COUNT THESE ERRORS
    139	000430	016705 	000000G			MOV	NBTBLK,R5	;NO. OF BLOCKS IN BITMAP
    140	000434	000305 				SWAB	R5		;MULTIPLY BY 256.
    141	000436	105005 				CLRB	R5
    142	000440	060503 				ADD	R5,R3
    143	000442	005502 				ADC	R2
    144					; NOW R2,R3 ARE THE WORD NO. INTO THE MULTIPLE ALLOCATION BITMAP
    145	000444					CALL	BITREC
    146	000450					GET$	R0,,,RDERR
    147	000462	040167 	000000G			BIC	R1,BITWRD
    148	000466					CALL	BITREC
    149	000472					PUT$	R0,,,WRTERR	;NOTE BLOCK IN USE
    150	000504	012701 	000000'			MOV	#LO03MG,R1
    151	000510					CALL	OUTLB
    152	000514					RETURN
    153					;
    154					; BLOCK WAS FOUND FREE. SHOULD HAVE BEEN MARKED IN USE
    155	000516				BLKFRE::CALL	$SAVAL
    156	000522	012701 	000063'			MOV	#LO06MG,R1
    157	000526					CALL	OUTLB
    158	000532					RETURN
VFYCCK M0100, VFY - CONSISTENCY	MACRO M1108  06-DEC-77 00:13  PAGE 10
WRITE FILE HEADER

    160						.SBTTL	WRITE FILE HEADER
    161					;+
    162					; WRITE FILE HEADER
    163					; INPUTS:
    164					;	R0=FDB ADDRESS
    165					;	F.RCNM = FILE ID, MUST ADD IN OFFSET
    166					; OUTPUTS:
    167					;	C=0 IF OK, C=1 IF ERROR, MESSAGE WRITTEN IF ERROR
    168					;	IF SUCCESSFUL, ALL REGISTERS PRESERVED
    169					;	IF UNSUCCESSFUL, ALL REGISTERS ARE ALTERED
    170					;-
    171	000534				WTHEDR::CALL	$SAVAL
    172	000540	012704 	000377 			MOV	#255.,R4
    173	000544	016002 	000002G			MOV	F.NRBD+2(R0),R2
    174	000550	005003 				CLR	R3
    175	000552	062203 			10$:	ADD	(R2)+,R3	;CALCULATE NEW CHECKSUM
    176	000554					SOB	R4,10$
    177	000560	010312 				MOV	R3,@R2		;STORE THE NEW CHECKSUM
    178	000562	066760 	000000G	000002G		ADD	INXOFF,F.RCNM+2(R0)
    179	000570	005560 	000000G			ADC	F.RCNM(R0)
    180	000574					CALL	.POSRC
    181	000600	103404 				BCS	20$
    182	000602					PUT$	R0
    183	000606	103401 				BCS	20$
    184	000610					RETURN
    185	000612	012701 	000152'		20$:	MOV	#LO22MG,R1	;ERROR WRITING INDEX FILE
    186	000616					CALLR	HDRERR
    187
    188						.SBTTL	FORMAT STRINGS
    189	000000					.PSECT
    190
    191	000000					MSGZ	LO03,<	MULTIPLE ALLOCATION	%O,%P>
    192	000000					MSGZ	LO04,<	BAD BLOCK NUMBER	%O,%P>
    193	000000					MSGZ	LO06,<	BLOCK IS MARKED FREE	%O,%P>
    194	000000					MSGZ	LO17,<	FILE IS MARKED FOR DELETE>
    195	000000					MSGZ	LO22,<	I/O ERROR WRITING FILE HEADER - ERROR CODE %D.>
    196						.EVEN
    197					;
    198					;
    199		000001 				.END
VFYCCK M0100, VFY - CONSISTENCY	MACRO M1108  06-DEC-77 00:13  PAGE 10-1
SYMBOL TABLE

BITMAP= ****** GX	HM.PNT= ****** GX	LO17SZ= 000033   	OUTLB = ****** GX	UNDLBT= ****** GX
BITREC= ****** GX	HS.MDL= ****** GX	LO22MG= 000152R     003	PAR$$$= 000000   	UPDATE= ****** GX
BITWRD= ****** GX	INDEX = ****** GX	LO22SZ= 000060   	RBUILD= ****** GX	VFYCTL= ****** GX
BLKFRE  000516RG    002	INXOFF= ****** GX	MAXLBN= ****** GX	RDERR = ****** GX	WRTERR= ****** GX
CKLBN   000152RG    002	LBN   = ****** GX	MLTALC= ****** GX	RDHEDR= ****** GX	WTHEDR  000534RG    002
CONCHK  000000RG    002	LBNBIT= ****** GX	MULTAL  000420RG    002	R$$DPB= 000001   	$SAVAL= ****** GX
CONCK1  000074RG    002	LO03MG= 000000R     003	NBAD  = ****** GX	R$$DYM= 000001   	$$    = 000067
F.NRBD= ****** GX	LO03SZ= 000033   	NBTBLK= ****** GX	R$$EIS= 000000   	$$$T1 = 000067
F.RCNM= ****** GX	LO04MG= 000033R     003	NFREE = ****** GX	R$$MSG= 000000   	.GET  = ****** G
GETBKP= ****** GX	LO04SZ= 000030   	NMULT = ****** GX	R$$11M= 000001   	.POSRC= ****** GX
HDRERR= ****** GX	LO06MG= 000063R     003	NXTFID= ****** GX	TBTMAP= ****** GX	.PUT  = ****** G
HH.CHS= ****** GX	LO06SZ= 000034   	OUTC  = ****** GX	TRMOUT= ****** GX	.SAVR1= ****** GX
HH.MAP= ****** GX	LO17MG= 000117R     003

. ABS.	000000	   000
      	000000	   001
PURE$I	000622	   002
MSGSTR	000232	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  3509 WORDS  ( 14 PAGES)
DYNAMIC MEMORY:  4160 WORDS  ( 16 PAGES)
ELAPSED TIME:  00:00:28
[65,10]VFYCCK,[65,20]VFYCCK/-SP=[43,30]PIPMAC,[65,30]VFYCCK
VFYFRE M0100, VFY - FREE COMMAN	MACRO M1108  06-DEC-77 00:13
TABLE OF CONTENTS

    7-   1	**** VFYFRE VERSION M0100 ****
    7-  24	FREE BLOCKS COMMAND
    8- 169	FORMAT STRINGS
VFYFRE M0100, VFY - FREE COMMAN	MACRO M1108  06-DEC-77 00:13  PAGE 7


      1						.TITLE	VFYFRE M0100, VFY - FREE COMMAND
						.SBTTL	**** VFYFRE VERSION M0100 ****
						.IDENT	/M0100/
      2					; ALTERED TUESDAY 29-OCT-74 8:45
      3					;
      4					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      5
      6					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      7					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
      8					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
      9					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     10
     11					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     12					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     13					; EQUIPMENT CORPORATION.
     14
     15					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     16					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     17					;
     18					; PETER H. LIPMAN 28-OCT-74
     19					;
     20						.MCALL	CALL,RETURN,GET$
     21
     22	000000					PURE.I
     23
     24						.SBTTL	FREE BLOCKS COMMAND
     25					;+
     26					; OUTPUT THE COUNT OF FREE BLOCKS - ADD TMP FILE BACK IN
     27					;
     28					; INPUTS:
     29					;
     30					;	R0=BITMAP FDB ADDRESS
     31					;	R3=FORMAT STRING FOR MESSAGE
     32					;
     33					; OUTPUTS:
     34					;
     35					;	ALL REGISTERS ALTERED
     36					;-
     37	000000	010346 			OUTFRE::MOV	R3,-(SP)	;SAVE FORMAT STRING
     38	000002					CALL	MAPFRE		;RETURNS R1,R2=FREE COUNT
     39	000006	032767 	000000G	000000G		BIT	#SAMDEV,TMPCTL	;IF TMP FILE IS ON THIS DEVICE
     40	000014	001403 				BEQ	10$
     41	000016	066702 	000000C			ADD	TBTMAP+F.HIBK+2,R2 ;ADD TMP FILE BLOCKS BACK IN
     42	000022	005501 				ADC	R1
     43	000024	012603 			10$:	MOV	(SP)+,R3
     44	000026	005004 				CLR	R4
     45	000030					CALL	PRTFRE		;AND PRINT OUT THE RESULT
     46	000034					RETURN
     47					;
     48					; R0=FDB ADDRESS OF BITMAP, FILE IS OPEN
     49	000036				FREEPR::CALL	MAPFRE		;GET COUNT OF FREE BLOCKS
     50	000042	012703 	000000G			MOV	#MOPRM,R3
     51	000046	010304 				MOV	R3,R4
     52	000050	010013 				MOV	R0,@R3
     53	000052	062723 	000000G			ADD	#F.DVNM,(R3)+	;ADDRESS OF DEVICE NAME
     54	000056	016023 	000000G			MOV	F.UNIT(R0),(R3)+ ;UNIT NUMBER
     55	000062	012703 	000046'			MOV	#LO45MG,R3
VFYFRE M0100, VFY - FREE COMMAN	MACRO M1108  06-DEC-77 00:13  PAGE 7-1
FREE BLOCKS COMMAND

     56	000066					CALL	PRTFRE
     57	000072	000167 	000000G			JMP	RSTART
     58					;+
     59					; PRINT THE FREE BLOCK INFORMATION
     60					; CALLING SEQUENCE:
     61					;	CALL	PRTFRE
     62					; INPUTS:
     63					;	R1,R2 = FREE BLOCK COUNT (R2 = LOW ORDER BITS)
     64					;	R3=FORMAT STRING FOR INITIAL MESSAGE
     65					;	R4=PARAMETER BLOCK ADDRESS FOR INITIAL MESSAGE
     66					;	MAXLBN, MAXLBN+2 = TOTAL BLOCKS ON DEVICE
     67					; OUTPUTS:
     68					;	ALL REGISTERS ALTERED
     69					; OPERATION:
     70					;	CALL EDMSG WITH FIRST PART OF MESSAGE AS SPECIFIED IN
     71					; THE FORAMT STRING AND PARAMETER BLOCK ADDRESS
     72					;	THEN IT FORMATS THE STRING:
     73					;	NNN. BLOCKS FREE, NNN. BLOCKS USED OUT OF NNN.
     74					; WHERE THE NNN VALUES ARE ALL COVERTED FROM DOUBLE PRECISION BINARY
     75					;-
     76	000076	010246 			PRTFRE::MOV	R2,-(SP)
     77	000100	010146 				MOV	R1,-(SP)	;SP = ADR OF DBL PRECISION FREE COUNT
     78	000102	010301 				MOV	R3,R1		;SET UP TO CALL EDMSG
     79	000104	010402 				MOV	R4,R2
     80	000106	016700 	000000C			MOV	FDBOUT+F.NRBD+2,R0 ;CONVERTS STRING INTO OUTPUT BUFFER
     81	000112					CALL	$EDMSG
     82	000116	010601 				MOV	SP,R1		;R1=ADR OF 2 WORD FREE COUNT
     83	000120	005002 				CLR	R2		;ZERO SUPPRESS
     84	000122					CALL	$CDDMG		;CONVERT DBL PRECISION TO DECIMAL MAG
     85	000126	012701 	000000'			MOV	#LO40MG,R1
     86	000132	005002 				CLR	R2
     87	000134					CALL	$EDMSG		;". BLOCKS FREE "
     88					;
     89					; CALCULATE HOW MANY BLOCKS ARE USED
     90	000140	016701 	000000G			MOV	MAXLBN,R1
     91	000144	016702 	000002G			MOV	MAXLBN+2,R2
     92	000150	166602 	000002 			SUB	2(SP),R2
     93	000154	005601 				SBC	R1
     94	000156	162601 				SUB	(SP)+,R1
     95	000160	010216 				MOV	R2,@SP
     96	000162	010146 				MOV	R1,-(SP)
     97	000164	010601 				MOV	SP,R1		;R1=ADR OF 2 WORD USED COUNT
     98	000166	005002 				CLR	R2		;ZERO SUPPRESS
     99	000170					CALL	$CDDMG		;CONVERT TO MAGNITUDE DECIMAL
    100	000174	022626 				CMP	(SP)+,(SP)+	;CLEAR 2 WORDS FROM STACK
    101	000176	012701 	000020'			MOV	#LO41MG,R1
    102	000202	005002 				CLR	R2
    103	000204					CALL	$EDMSG		;". BLOCKS USED OUT OF "
    104	000210	012701 	000000G			MOV	#MAXLBN,R1	;R1=ADR OF 2 WORD TOTAL BLOCK COUNT
    105	000214	005002 				CLR	R2
    106	000216					CALL	$CDDMG
    107	000222	112720 	000056 			MOVB	#'.,(R0)+
    108	000226	010001 				MOV	R0,R1		;CALCULATE STRING LENGTH IN R1
    109	000230	166701 	000000C			SUB	FDBOUT+F.NRBD+2,R1
    110	000234					CALL	OUT2		;OUTPUT THE LINE
    111	000240					RETURN
VFYFRE M0100, VFY - FREE COMMAN	MACRO M1108  06-DEC-77 00:13  PAGE 8
FREE BLOCKS COMMAND

    113					;
    114					; COUNT THE FREE BLOCKS IN A BIT MAP
    115					; INPUTS:
    116					;	R0=FDB OF DESIRED BIT MAP
    117					;	FBTBLK = FIRST VBN OF BIT MAP BLOCKS
    118					;	NBTBLK = NO. OF BIT MAP BLOCKS
    119					; OUTPUTS:
    120					;	R1,R2=NO. OF FREE BLOCKS
    121					;	R0 PRESERVED, R3-R5 ALTERED
    122	000242	010046 			MAPFRE::MOV	R0,-(SP)
    123	000244	012701 	001000 			MOV	#512.,R1
    124	000250	012702 	000000G			MOV	#BITBUF,R2
    125	000254					CALL	SETREC		;SET 1 BLOCK RECORDS
    126	000260	016760 	000000G	000002G		MOV	FBTBLK,F.RCNM+2(R0)
    127	000266	016704 	000000G			MOV	MAXLBN,R4
    128	000272	016705 	000002G			MOV	MAXLBN+2,R5	;NUMBER OF BLOCKS TO CHECK
    129	000276	016703 	000000G			MOV	NBTBLK,R3	;NUMBER OF BIT MAP BLOCKS
    130	000302	005002 				CLR	R2
    131	000304	005001 				CLR	R1
    132	000306	011600 			10$:	MOV	@SP,R0
    133	000310					CALL	BITCNT
    134	000314	060002 				ADD	R0,R2
    135	000316	005501 				ADC	R1
    136	000320	162705 	010000 			SUB	#10000,R5
    137	000324	005604 				SBC	R4
    138	000326					SOB	R3,10$
    139	000332	012600 				MOV	(SP)+,R0
    140	000334					RETURN
    141					;
    142					; COUNT THE FREE BLOCKS IN THE BIT MAP BLOCK ABOUT TO BE READ
    143					; INPUTS:
    144					;	R0=FDB OF BIT MAP FILE, RECORD NUMBER SET TO NEXT BLOCK TO READ
    145					;	R4,R5=NO. OF LOGICAL BLOCKS LEFT TO CHECK IN BITMAP
    146					; OUTPUTS:
    147					;	R0=COUNT OF FREE BLOCKS
    148					;	R1-R5 PRESERVED
    149	000336				BITCNT::GET$	R0,,,RDERR
    150	000350	004567 	000000G			JSR	R5,.SAVR1	;SAVE REGISTERS R1-R5
    151	000354	005000 				CLR	R0		;INIT FREE BLOCK COUNTER
    152	000356	005704 				TST	R4		;IF HIGH ORDER BITS OF LBN COUNT NOT 0
    153	000360	001402 				BEQ	10$
    154	000362	012705 	010000 			MOV	#10000,R5	;GUARANTEE THAT WE CHECK ALL BITS
    155	000366	012704 	000400 		10$:	MOV	#256.,R4	; NO. OF WORDS
    156	000372	012703 	000000G			MOV	#BITBUF,R3	;STARTING ADDRESS OF WORDS
    157	000376	012702 	000020 		20$:	MOV	#16.,R2		;NO. OF BITS PER WORD
    158	000402	012301 				MOV	(R3)+,R1	;GET NEXT WORD TO R1
    159	000404	000241 			30$:	CLC
    160	000406	006001 				ROR	R1
    161	000410	103001 				BCC	40$
    162	000412	005200 				INC	R0		;COUNT BITS THAT ARE ON
    163	000414	005305 			40$:	DEC	R5
    164	000416	001404 				BEQ	50$		;BRANCH IF RUN OUT OF BLOCKS TO CHECK
    165	000420					SOB	R2,30$
    166	000424					SOB	R4,20$
    167	000430				50$:	RETURN
    168
    169						.SBTTL	FORMAT STRINGS
VFYFRE M0100, VFY - FREE COMMAN	MACRO M1108  06-DEC-77 00:13  PAGE 8-1
FORMAT STRINGS

    170	000000					.PSECT
    171
    172	000000					MSGZ	LO40,<. BLOCKS FREE, >
    173	000000					MSGZ	LO41,<. BLOCKS USED OUT OF >
    174	000000					MSGZ	LO45,<%N%2A%O: HAS >
    175						.EVEN
    176					;
    177					;
    178		000001 				.END
VFYFRE M0100, VFY - FREE COMMAN	MACRO M1108  06-DEC-77 00:13  PAGE 8-2
SYMBOL TABLE

BITBUF= ****** GX	F.UNIT= ****** GX	MAXLBN= ****** GX	RSTART= ****** GX	TBTMAP= ****** GX
BITCNT  000336RG    002	LO40MG= 000000R     003	MOPRM = ****** GX	R$$DPB= 000001   	TMPCTL= ****** GX
FBTBLK= ****** GX	LO40SZ= 000020   	NBTBLK= ****** GX	R$$DYM= 000001   	$CDDMG= ****** GX
FDBOUT= ****** GX	LO41MG= 000020R     003	OUTFRE  000000RG    002	R$$EIS= 000000   	$EDMSG= ****** GX
FREEPR  000036RG    002	LO41SZ= 000026   	OUT2  = ****** GX	R$$MSG= 000000   	$$    = 000067
F.DVNM= ****** GX	LO45MG= 000046R     003	PAR$$$= 000000   	R$$11M= 000001   	$$$T1 = 000067
F.HIBK= ****** GX	LO45SZ= 000016   	PRTFRE  000076RG    002	SAMDEV= ****** GX	.GET  = ****** G
F.NRBD= ****** GX	MAPFRE  000242RG    002	RDERR = ****** GX	SETREC= ****** GX	.SAVR1= ****** GX
F.RCNM= ****** GX

. ABS.	000000	   000
      	000000	   001
PURE$I	000432	   002
MSGSTR	000064	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  3143 WORDS  ( 13 PAGES)
DYNAMIC MEMORY:  4160 WORDS  ( 16 PAGES)
ELAPSED TIME:  00:00:20
[65,10]VFYFRE,[65,20]VFYFRE/-SP=[43,30]PIPMAC,[65,30]VFYFRE
VFYLOS M0104, VFY - LOST COMMAN	MACRO M1108  06-DEC-77 00:14
TABLE OF CONTENTS

    7-   1	**** VFYLOS VERSION M0104 ****
    7-  27	SCAN FOR LOST FILES COMMAND
    8-  85	SCAN ALL DIRECTORY FILES
   10- 252	FORMAT STRINGS
VFYLOS M0104, VFY - LOST COMMAN	MACRO M1108  06-DEC-77 00:14  PAGE 7


      1						.TITLE	VFYLOS M0104, VFY - LOST COMMAND
						.SBTTL	**** VFYLOS VERSION M0104 ****
						.IDENT	/M0104/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  19 FEB 75  14:36
      4					;
      5					; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      6					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      7
      8					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      9					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     10					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     11					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     12
     13					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     14					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     15					; EQUIPMENT CORPORATION.
     16
     17					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     18					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     19					;
     20					; PETER H. LIPMAN 28-OCT-74
     21					;
     22						.MCALL	CALL,RETURN,FDAT$R,FDRC$R,FDOP$R
     23						.MCALL	GET$,PUT$,OPNS$R,OPNT$D,CLOSE$
     24
     25	000000					PURE.I
     26
     27						.SBTTL	SCAN FOR LOST FILES COMMAND
     28	000000				LOST::	FDAT$R	#TBTMAP,#R.FIX,#0,#512.
     29	000024					FDRC$R	R0,#FD.RAN,,#512.
     30	000040					OPNT$D	R0		;CREATE A TEMPORARY FILE
     31	000060	103550 				BCS	80$
     32	000062	012701 	000002 			MOV	#2,R1
     33	000066	066701 	000000G			ADD	SINXBT,R1	;R1 = NO. OF BLOCKS NEEDED
     34	000072	005002 				CLR	R2		;NON CONTIGUOUS ALLOCATION
     35	000074					CALL	.EXTND		;EXTEND THE FILE TO THE DESIRED SIZE
     36	000100	103543 				BCS	85$		;BRANCH IF ERROR
     37					;
     38					; COPY THE INDEX FILE BIT MAP TO THE TEMP FILE
     39	000102	012767 	000003 	000000C		MOV	#3,INDEX+F.RCNM+2
     40	000110	012767 	000003 	000000C		MOV	#3,TBTMAP+F.RCNM+2
     41	000116	016701 	000000G			MOV	SINXBT,R1		;R1 = NO. OF BLOCKS
     42	000122				30$:	GET$	#INDEX,,,RDERR
     43	000140					PUT$	#TBTMAP,INDEX+F.NRBD+2,,WRTERR
     44	000164					SOB	R1,30$
     45	000170	012701 	000002 			MOV	#2,R1
     46	000174	012702 	000000G			MOV	#BITWRD,R2
     47	000200					CALL	SETREC		;SET TEMP FILE TO 1 WORD RECORDS
     48	000204	012767 	001001 	000000G		MOV	#<2*256.>+1,MAPOFF
     49					;
     50					; SET UP TO USE THE BITMAP FDB FOR READING THE DIRECTORY FILES
     51	000212					FDRC$R	#BITMAP,#FD.PLC,,#S.NFEN ;RECORD SIZE 8. WORDS
     52	000232	012701 	000000G			MOV	#INDEX,R1
     53	000236	016160 	000000G	000000G		MOV	F.DVNM(R1),F.DVNM(R0) ;USE INDEX FILE DEVICE
     54	000244	016160 	000000G	000000G		MOV	F.UNIT(R1),F.UNIT(R0)
     55	000252	016160 	000000C	000000C		MOV	F.FNB+N.DID(R1),F.FNB+N.FID(R0) ;WANT TO OPEN MFD
VFYLOS M0104, VFY - LOST COMMAN	MACRO M1108  06-DEC-77 00:14  PAGE 7-1
SCAN FOR LOST FILES COMMAND

     56	000260	016160 	000000C	000000C		MOV	F.FNB+N.DID+2(R1),F.FNB+N.FID+2(R0)
     57	000266	016160 	000000C	000000C		MOV	F.FNB+N.DID+4(R1),F.FNB+N.FID+4(R0)
     58	000274					CALL	DIRSCN		;SCAN ALL DIRECTORIES
     59					;
     60					; AT THIS POINT, ALL BITS STILL SET IN THE BIT MAP IN THE TEMP FILE
     61					; ARE LOST FILES.
     62					; PREPARE TO USE BITMAP FOR ENTERING FILES IN THE LOST FILE DIRECTORY
     63	000300	016002 	000000G			MOV	F.DSPT(R0),R2
     64	000304	012762 	000005 	000000G		MOV	#LSDRSZ,N.DIRD(R2) ;SET DIRECTORY STRING
     65	000312	012762 	000000'	000002G		MOV	#LSDRMG,N.DIRD+2(R2)
     66	000320	012701 	000000C			MOV	#BITMAP+F.FNB,R1
     67	000324	005003 				CLR	R3
     68	000326					CALL	.PARSE
     69	000332	103002 				BCC	40$		;BRANCH IF DIRECTORY FOUND
     70	000334	005061 	000000G			CLR	N.DID(R1)	;INDICATE DIRECTORY NOT AVAILABLE
     71	000340				40$:	FDOP$R	R0,,#0,R1
     72	000350	012767 	177777 	000000G		MOV	#-1,LOSTCT
     73	000356	012700 	000000G			MOV	#TBTMAP,R0
     74	000362	012701 	001000 			MOV	#512.,R1
     75	000366	012702 	000000G			MOV	#INXBIT,R2
     76	000372					CALL	SETREC		;SET TMP FILE TO 1 BLOCK RECORDS
     77	000376	000167 	000000G			JMP	INXSCN
     78					;
     79					; FAILED TO OPEN TEMP FILE
     80	000402				80$:	ERROUX	ER03,0,0
	000402	104427 				TRAP	X
	000404	000000G				.WORD	ER03SZ
	000406	000000G				.WORD	ER03MG
     81					;
     82					; FAILED TO EXTEND TEMP FILE
     83	000410				85$:	ERROUX	ER04,0,0
	000410	104427 				TRAP	X
	000412	000000G				.WORD	ER04SZ
	000414	000000G				.WORD	ER04MG
VFYLOS M0104, VFY - LOST COMMAN	MACRO M1108  06-DEC-77 00:14  PAGE 8
SCAN ALL DIRECTORY FILES

     85						.SBTTL	SCAN ALL DIRECTORY FILES
     86					;+
     87					; OPEN AND SCAN THE DIRECTORY FILE SET UP IN THE BITMAP FDB
     88					; INPUTS:
     89					;	BITMAP FDB SET UP WITH FILE ID, DEVICE AND UNIT.
     90					; OUTPUTS:
     91					;	RESETS THE BIT IN THE INDEX FILE BIT MAP (TEMP FILE)
     92					;	FOR EACH FILE ID ENCOUNTERED
     93					; OPERATION:
     94					;	CALLED RECURSIVELY EACH TIME A FILE IS FOUND WITH THE TYPE
     95					; "DIR".  IF THE BIT FOR THAT FILE WAS ALREADY RESET, THEN THAT
     96					; DIRECTORY HAS ALREADY BEEN SCANNED.  IT IS ASSUMED THAT ALL FILES
     97					; OF TYPE "DIR" WHICH HAVE FIXED LENGTH 8. WORD RECORDS ARE DIRECTORIES
     98	000416	012700 	000000G		DIRSCN:	MOV	#BITMAP,R0
     99	000422					CALL	OPDIR		;OPEN THE DIRECTORY FILE
    100	000426	103541 				BCS	75$
    101	000430	022760 	000000G	000000G		CMP	#S.NFEN,F.RSIZ(R0)
    102	000436	001131 				BNE	60$		;BRANCH IF NOT A DIRECTORY FILE
    103	000440	122760 	000000G	000000G		CMPB	#R.FIX,F.RTYP(R0)
    104	000446	001125 				BNE	60$
    105	000450	012700 	000000G		10$:	MOV	#BITMAP,R0
    106	000454				15$:	GET$	R0
    107	000460	103514 				BCS	50$		;BRANCH IF EOF OR ERROR
    108	000462	017003 	000002G			MOV	@F.NRBD+2(R0),R3 ;R3=FILE ID
    109	000466	001772 				BEQ	15$		;BRANCH IF NULL ENTRY
    110	000470	020367 	000000G			CMP	R3,MAXFNU
    111	000474	101367 				BHI	15$		;BRANCH IF FILE ID IS OUT OF RANGE
    112	000476	005002 				CLR	R2
    113	000500	005303 				DEC	R3		;BECAUSE FILE ID'S BEGIN AT 1
    114	000502					CALL	LBNBIT
    115	000506	012700 	000000G			MOV	#TBTMAP,R0
    116	000512					CALL	BITREC
    117	000516					GET$	R0,,,RDERR
    118	000530	030167 	000000G			BIT	R1,BITWRD	;RESET THE BIT UNLESS IT ALREADY IS ZERO
    119	000534	001745 				BEQ	10$
    120	000536					CALL	BITREC
    121	000542	040167 	000000G			BIC	R1,BITWRD
    122	000546					PUT$	R0,,,WRTERR
    123	000560	012700 	000000G			MOV	#BITMAP,R0
    124	000564	016001 	000002G			MOV	F.NRBD+2(R0),R1
    125	000570	026761 	000000G	000000G		CMP	DIRTYP,N.FTYP(R1) ;POTENTIAL DIRECTORY FILE?
    126	000576	001324 				BNE	10$		;BRANCH IF NOT
    127	000600	016046 	000002G			MOV	F.RCNM+2(R0),-(SP) ;PREPARE TO RECUR
    128	000604	016046 	000000C			MOV	F.FNB+N.FID(R0),-(SP)
    129	000610	016046 	000000C			MOV	F.FNB+N.FID+2(R0),-(SP)
    130	000614	016046 	000000C			MOV	F.FNB+N.FID+4(R0),-(SP)
    131	000620					CLOSE$	R0
    132	000624	103445 				BCS	78$
    133	000626	016160 	000000G	000000C		MOV	N.FID(R1),F.FNB+N.FID(R0)
    134	000634	016160 	000002G	000000C		MOV	N.FID+2(R1),F.FNB+N.FID+2(R0)
    135	000642	016160 	000004G	000000C		MOV	N.FID+4(R1),F.FNB+N.FID+4(R0)
    136	000650					CALL	DIRSCN
    137					;
    138					; SET UP TO RESTORE CONTEXT AND REOPEN PREVIOUS FILE
    139	000654	012660 	000000C			MOV	(SP)+,F.FNB+N.FID+4(R0)
    140	000660	012660 	000000C			MOV	(SP)+,F.FNB+N.FID+2(R0)
    141	000664	012660 	000000C			MOV	(SP)+,F.FNB+N.FID(R0)
VFYLOS M0104, VFY - LOST COMMAN	MACRO M1108  06-DEC-77 00:14  PAGE 8-1
SCAN ALL DIRECTORY FILES

    142	000670	012601 				MOV	(SP)+,R1	;RECORD NUMBER TO R1
    143	000672					CALL	OPDIR		;OPEN THE DIRECTORY FILE
    144	000676	103415 				BCS	75$
    145	000700	010160 	000002G			MOV	R1,F.RCNM+2(R0)
    146	000704					CALL	.POSRC
    147	000710	103261 				BCC	15$		;CONTINUE SCANNING THIS FILE
    148					;
    149					; ERROR READING DIRECTORY FILE - PROBABLY EOF
    150	000712	122760 	000000G	000000G	50$:	CMPB	#IE.EOF,F.ERR(R0)
    151	000720	001014 				BNE	85$		;BRANCH IF REAL ERROR
    152	000722				60$:	CLOSE$	R0
    153	000726	103406 				BCS	80$
    154	000730					RETURN
    155					;
    156					; FAILED TO OPEN DIRECTORY FILE
    157	000732	012701 	000063'		75$:	MOV	#LO24MG,R1
    158	000736	000407 				BR	90$
    159					;
    160					; FAILED TO CLOSE DIRECTORY FILE
    161	000740	062706 	000010 		78$:	ADD	#8.,SP
    162	000744	012701 	000121'		80$:	MOV	#LO25MG,R1
    163	000750	000402 				BR	90$
    164					;
    165					; I/O ERROR READING DIRECTORY FILE
    166	000752	012701 	000160'		85$:	MOV	#LO26MG,R1
    167	000756	010046 			90$:	MOV	R0,-(SP)
    168	000760	005002 				CLR	R2
    169	000762					CALL	OUT1
    170	000766	011600 				MOV	(SP),R0
    171	000770	012701 	000465'			MOV	#LO35MG,R1
    172	000774	012702 	000000G			MOV	#MOPRM,R2
    173	001000	116003 	000000G			MOVB	F.ERR(R0),R3
    174	001004	010312 				MOV	R3,(R2)
    175	001006	016762 	000000G	000002 		MOV	DIRID,2(R2)
    176	001014	016762 	000002G	000004 		MOV	DIRID+2,4(R2)
    177	001022					CALL	OUT1
    178	001026	012600 				MOV	(SP)+,R0
    179	001030					CLOSE$	R0
    180	001034					RETURN
    181					;
    182					; OPEN THE DIRECTORY FILE, SAVING IT'S FILE ID FOR ERROR PRINTOUT
    183					;
    184	001036	016067 	000000C	000000G	OPDIR:	MOV	F.FNB+N.FID(R0),DIRID
    185	001044	016067 	000000C	000002G		MOV	F.FNB+N.FID+2(R0),DIRID+2
    186	001052					OPNS$R	R0
    187	001064					RETURN
VFYLOS M0104, VFY - LOST COMMAN	MACRO M1108  06-DEC-77 00:14  PAGE 9
SCAN ALL DIRECTORY FILES

    189					;
    190					; INDICATE THAT THIS FILE WAS LOST, AND PUT IT IN LOST FILE DIRECTORY
    191	001066				ENTERL::
    192	001066	016704 	000000C			MOV	INDEX+F.NRBD+2,R4 ; R4 = ADDRESS OF HEADER BLOCK
    193	001072	005003 				CLR	R3
    194	001074	156403 	000000G			BISB	HH.MAP(R4),R3	; GET OFFSET TO MAP AREA
    195	001100	006303 				ASL	R3		; CONVERT TO BYTE OFFSET
    196	001102	060304 				ADD	R3,R4		; R4 = ADDRESS OF MAP AREA
    197	001104	105764 	000000G			TSTB	HM.ESQ(R4)	; CHECK EXTENSION SEQMENT NUMBER
    198	001110	001401 				BEQ	10$
    199	001112					RETURN			; RETURN IF NON-ZERO, SINCE
    200									; EXTENSION HEADERS DO NOT
    201									; CONSTITUTE LOST FILES
    202	001114	005267 	000000G		10$:	INC	LOSTCT
    203	001120	001025 				BNE	30$
    204					; FIRST LOST FILE, PUT OUT HEADER MESSAGE
    205	001122	012701 	000005'			MOV	#LO23MG,R1
    206	001126	005002 				CLR	R2
    207	001130					CALL	OUT1
    208	001134	012702 	000000G			MOV	#MOPRM,R2
    209	001140	012712 	000005 			MOV	#LSDRSZ,@R2
    210	001144	012762 	000000'	000002 		MOV	#LSDRMG,2(R2)
    211	001152	012701 	000221'			MOV	#LO27MG,R1
    212	001156	005767 	000000C			TST	BITMAP+F.FNB+N.DID ;DIRECTORY AVAILABLE?
    213	001162	001002 				BNE	20$		;BRANCH IF YES
    214	001164	012701 	000272'			MOV	#LO28MG,R1	;SAY DIRECTORY NOT AVAILABLE
    215	001170				20$:	CALL	OUT1
    216	001174				30$:	CALL	HDROUT
    217	001200	005767 	000000C			TST	BITMAP+F.FNB+N.DID ;IF NO DIRECTORY ID
    218	001204	001451 				BEQ	80$		;DON'T TRY TO ENTER THESE FILES
    219	001206	012700 	000000C			MOV	#BITMAP+F.FNB,R0
    220					; SET UP FILE ID, NAME, TYPE, AND VERSION FROM FILE HEADER
    221	001212	016704 	000000C			MOV	INDEX+F.NRBD+2,R4
    222	001216	016420 	000000G			MOV	HH.FNU(R4),(R0)+ ;SET FILE ID
    223	001222	016420 	000000G			MOV	HH.FSQ(R4),(R0)+
    224	001226	005020 				CLR	(R0)+
    225	001230					CALL	MVFNAM		;SET UP FILE NAME
    226	001234	012700 	000000G			MOV	#BITMAP,R0
    227	001240	012701 	000000C			MOV	#BITMAP+F.FNB,R1
    228	001244				35$:	CALL	.ENTER
    229	001250	103021 				BCC	50$		;BRANCH IF ENTER WORKED OK
    230					;
    231					; FAILED TO ENTER  - IF DUPLICATE, ZERO THE VERSION AND TRY AGAIN
    232	001252	122760 	000000G	000000G		CMPB	#IE.DUP,F.ERR(R0)
    233	001260	001003 				BNE	40$
    234	001262	005061 	000000G			CLR	N.FVER(R1)
    235	001266	000766 				BR	35$
    236					;
    237					; ERROR ON ENTER
    238	001270	116003 	000000G		40$:	MOVB	F.ERR(R0),R3
    239	001274	012702 	000000G			MOV	#MOPRM,R2
    240	001300	010312 				MOV	R3,@R2
    241	001302	012701 	000355'			MOV	#LO29MG,R1
    242	001306					CALL	OUTC
    243	001312	000406 				BR	80$
    244					;
    245					; SUCCESSFULLY ENTERED
VFYLOS M0104, VFY - LOST COMMAN	MACRO M1108  06-DEC-77 00:14  PAGE 9-1
SCAN ALL DIRECTORY FILES

    246	001314	012701 	000424'		50$:	MOV	#LO30MG,R1
    247	001320	012702 	000000C			MOV	#BITMAP+F.FNAM,R2
    248	001324					CALL	OUTC		;TELL ENTERED NAME OF FILE
    249	001330				80$:	CALL	TRMOUT
    250	001334					RETURN
VFYLOS M0104, VFY - LOST COMMAN	MACRO M1108  06-DEC-77 00:14  PAGE 10
FORMAT STRINGS

    252						.SBTTL	FORMAT STRINGS
    253
    254	000000					.PSECT
    255	000000					MSG	LSDR,<[1,3]>	;LOST FILE DIRECTORY
    256	000000					MSGZ	LO23,<THE FOLLOWING FILES WERE NOT IN ANY DIRECTORY>
    257	000000					MSGZ	LO24,<FAILED TO OPEN DIRECTORY FILE>
    258	000000					MSGZ	LO25,<FAILED TO CLOSE DIRECTORY FILE>
    259	000000					MSGZ	LO26,<I/O ERROR READING DIRECTORY FILE>
    260	000000					MSGZ	LO27,<	THEY HAVE BEEN ENTERED IN DIRECTORY %VA>
    261	000000					MSG	LO28,<	THEY ARE STILL LOST, COULD NOT FIND DIRECTORY>
    262	000000					MSGZ	,< %VA>
    263	000000					MSGZ	LO29,<	FAILED TO ENTER FILE - ERROR CODE %D.>
    264	000000					MSGZ	LO30,<	FILE SUCCESSFULLY ENTERED AS %X>
    265	000000					MSGZ	LO35,<	ERROR CODE %D. - FILE ID %P,%P>
    266						.EVEN
    267					;
    268					;
    269		000001 				.END
VFYLOS M0104, VFY - LOST COMMAN	MACRO M1108  06-DEC-77 00:14  PAGE 10-1
SYMBOL TABLE

BITMAP= ****** GX	F.FACC= ****** GX	LBNBIT= ****** GX	LSDRMG= 000000R     003	R$$11M= 000001
BITREC= ****** GX	F.FNAM= ****** GX	LOST    000000RG    002	LSDRSZ= 000005   	R.FIX = ****** GX
BITWRD= ****** GX	F.FNB = ****** GX	LOSTCT= ****** GX	MAPOFF= ****** GX	SETREC= ****** GX
DIRID = ****** GX	F.NRBD= ****** GX	LO23MG= 000005R     003	MAXFNU= ****** GX	SINXBT= ****** GX
DIRSCN  000416R     002	F.RACC= ****** GX	LO23SZ= 000056   	MG    = 000350R     003	SZ    = 000005
DIRTYP= ****** GX	F.RATT= ****** GX	LO24MG= 000063R     003	MOPRM = ****** GX	S.NFEN= ****** GX
ENTERL  001066RG    002	F.RCNM= ****** GX	LO24SZ= 000036   	MVFNAM= ****** GX	TBTMAP= ****** GX
ER03MG= ****** GX	F.RSIZ= ****** GX	LO25MG= 000121R     003	N.DID = ****** GX	TRMOUT= ****** GX
ER03SZ= ****** GX	F.RTYP= ****** GX	LO25SZ= 000037   	N.DIRD= ****** GX	WRTERR= ****** GX
ER04MG= ****** GX	F.UNIT= ****** GX	LO26MG= 000160R     003	N.FID = ****** GX	X     = 000027
ER04SZ= ****** GX	F.URBD= ****** GX	LO26SZ= 000041   	N.FTYP= ****** GX	$$    = 000067
FA.SHR= ****** GX	HDROUT= ****** GX	LO27MG= 000221R     003	N.FVER= ****** GX	$$$T1 = 000067
FA.TMP= ****** GX	HH.FNU= ****** GX	LO27SZ= 000051   	OPDIR   001036R     002	.CLOSE= ****** G
FD.PLC= ****** GX	HH.FSQ= ****** GX	LO28MG= 000272R     003	OUTC  = ****** GX	.ENTER= ****** GX
FD.RAN= ****** GX	HH.MAP= ****** GX	LO28SZ= 000056   	OUT1  = ****** GX	.EXTND= ****** GX
FO.RD = ****** GX	HM.ESQ= ****** GX	LO29MG= 000355R     003	PAR$$$= 000000   	.GET  = ****** G
FO.WRT= ****** GX	IE.DUP= ****** GX	LO29SZ= 000047   	RDERR = ****** GX	.MRKDL= ****** GX
F.DFNB= ****** GX	IE.EOF= ****** GX	LO30MG= 000424R     003	R$$DPB= 000001   	.OPEN = ****** G
F.DSPT= ****** GX	INDEX = ****** GX	LO30SZ= 000041   	R$$DYM= 000001   	.PARSE= ****** GX
F.DVNM= ****** GX	INXBIT= ****** GX	LO35MG= 000465R     003	R$$EIS= 000000   	.POSRC= ****** GX
F.ERR = ****** GX	INXSCN= ****** GX	LO35SZ= 000040   	R$$MSG= 000000   	.PUT  = ****** G

. ABS.	000000	   000
      	000000	   001
PURE$I	001336	   002
MSGSTR	000525	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  4429 WORDS  ( 18 PAGES)
DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:00:47
[65,10]VFYLOS,[65,20]VFYLOS/-SP=[43,30]PIPMAC,[65,30]VFYLOS
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14
TABLE OF CONTENTS

    7-   1	**** VFYOPN VERSION M0111 ****
    7-  25	OPEN THE LISTING, BITMAP, TEMP, AND INDEX FILES
    9- 242	INITIALIZE THE BIT MAP FILES
   10- 317	OPEN ROUTINES FOR THE LISTING AND INDEX FILES
   11- 390	FORMAT STRINGS
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 7


      1						.TITLE	VFYOPN M0111, OPEN THE FILES
						.SBTTL	**** VFYOPN VERSION M0111 ****
						.IDENT	/M0111/
      2					; ALTERED FRIDAY 10-JAN-75 11:20
      3					;
      4					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      5
      6					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      7					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
      8					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
      9					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     10
     11					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     12					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     13					; EQUIPMENT CORPORATION.
     14
     15					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     16					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     17					;
     18					; PETER H. LIPMAN 28-OCT-74
     19					;
     20						.MCALL	CALL,RETURN,GET$,PUT$,FDAT$R,FDRC$R,FDOP$R
     21						.MCALL	OPEN$R,OPEN$W,OPEN$M,OPNT$D,OPNS$R,OPNS$M
     22
     23	000000					PURE.I
     24
     25						.SBTTL	OPEN THE LISTING, BITMAP, TEMP, AND INDEX FILES
     26					;
     27					; OPEN THE LISTING AND BIT MAP FILES
     28	000000				OPENF::	CALL	OPNOUT		;OPEN THE LISTING FILE
     29	000004	103455 				BCS	17$		;BRANCH IF FAILED
     30	000006	032767 	000000C	000000G		BIT	#LISTBT!RDCKBT!LOSTBT,VFYCTL ;IF /LI, /LO, OR /RC
     31	000014	001402 				BEQ	4$
     32	000016	000167 	000724 			JMP	50$		;NO BITMAP OR TEMP FILES NEEDED
     33					;
     34					; OPEN THE BITMAP FILE
     35	000022	005067 	000000C		4$:	CLR	BITMAP+F.FNB+N.FID+2 ;SO I CAN SEE IF IT WAS FOUND
     36	000026	012700 	000000G		8$:	MOV	#BITMAP,R0
     37	000032	012760 	000000G	000000G		MOV	#STBLK,F.STBK(R0)
     38	000040					FDOP$R	R0,,,#BITDFN
     39	000046					FDRC$R	R0,#FD.PLC!FD.RAN
     40	000054	032767 	000000G	000000G		BIT	#UPDATE,VFYCTL
     41	000062	001406 				BEQ	10$
     42	000064					OPEN$M	R0		;OPEN THE BIT MAP FOR MODIFY
     43	000076	000405 				BR	15$
     44	000100				10$:	OPEN$R	R0		;OPEN THE BIT MAP FOR READ ONLY
     45	000112	103030 			15$:	BCC	20$		;BRANCH IF SUCCESSFULLY OPENED
     46	000114	122760 	000000G	000000G		CMPB	#IE.PRI,F.ERR(R0) ;REPORT PRIVILEGE VIOLATION IF ANY
     47	000122	001403 				BEQ	16$
     48	000124	005760 	000000C			TST	F.FNB+N.FID+2(R0)
     49	000130	001405 				BEQ	18$		;BRANCH IF FAILED TO FIND FILE ID
     50	000132				16$:	ERROUT	ER02,0,0	;FAILED TO OPEN BITMAP FILE
	000132	104426 				TRAP	X
	000134	000000G				.WORD	ER02SZ
	000136	000000G				.WORD	ER02MG
     51	000140	000167 	000000G		17$:	JMP	RSTART
     52	000144	012760 	000000G	000000C	18$:	MOV	#BITFID,F.FNB+N.FID(R0) ;USE KNOWN ID, AND TRY AGAIN
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 7-1
OPEN THE LISTING, BITMAP, TEMP, AND INDEX FILES

     53	000152	012760 	000000G	000000C		MOV	#BITFID,F.FNB+N.FID+2(R0)
     54	000160	012701 	000104'			MOV	#LO19MG,R1	;REPORT FAILURE TO FIND BITMAP
     55	000164	005002 				CLR	R2
     56	000166					CALL	OUT1
     57	000172	000715 				BR	8$
     58	000174				20$:	CALL	FIXEOF
     59	000200					FDAT$R	R0,#R.FIX	;FIXED LENGTH RECORDS
     60					;
     61					; GET THE HIGHEST LOGICAL BLOCK NUMBER ON THE DEVICE
     62					; READ THE STORAGE CONTROL BLOCK
     63	000206	012701 	001000 			MOV	#512.,R1
     64	000212	012702 	000000G			MOV	#INXBIT,R2
     65	000216					CALL	SETREC		;512 BYTE RECORDS
     66	000222					GET$	R0,,,RDERR	;READ VBN 1
     67	000234	016005 	000002G			MOV	F.NRBD+2(R0),R5	;R5=POINTER TO STORAGE CONTROL BLOCK
     68	000240	016703 	000006G			MOV	STBLK+6,R3	;R3=ACTUAL SIZE OF FILE
     69	000244	005303 				DEC	R3		;NO. OF BLOCKS OF BITMAPS
     70	000246	010367 	000000G			MOV	R3,NBTBLK	;SAVE NO OF BIT MAP BLOCKS
     71	000252	005002 				CLR	R2
     72
     73						.IF	GT,R$$EIS
     74						ASHC	#12.,R2		;MULTIPLY R2,R3 BY 10000
     75						MOV	R2,R0
     76						MOV	R3,R1		;RESULT TO R0,R1
     77
     78						.IFF
     79	000254	012700 	010000 			MOV	#10000,R0
     80	000260					CALL	$DMUL		;MULTIPLY R2,R3 BY R0, RESULT TO R0,R1
     81						.ENDC
     82
     83	000264	010067 	000000G			MOV	R0,MAXLBN	;STORE LARGEST POSSIBLE LBN
     84	000270	010167 	000002G			MOV	R1,MAXLBN+2	;GIVEN THE NO. OF BIT MAP BLOCKS
     85					;
     86					; NOW TRY TO ESTABLISH THE CORRECT MAX LBN FROM THE STORAGE CONTROL BLOCK
     87					;
     88	000274	005003 				CLR	R3
     89	000276	156503 	000003 			BISB	3(R5),R3	;NO. OF BITMAP BLOCK ACCORDING TO SCB
     90	000302	020367 	000000G			CMP	R3,NBTBLK	;IS THE SCB CORRECT?
     91	000306	001027 				BNE	35$		;BRANCH IF NO
     92	000310	006303 				ASL	R3		;SKIP 2 WORDS FOR EACH BLOCK
     93	000312	006303 				ASL	R3
     94	000314	060305 				ADD	R3,R5
     95	000316	062705 	000004 			ADD	#4,R5		;AND SKIP THE FIRST 2 WORDS
     96	000322	012502 				MOV	(R5)+,R2	;R5 POINTS AT MAX LBN
     97	000324	011503 				MOV	(R5),R3
     98					;
     99					; AT THIS POINT R0, R1 = THEORETIC MAX LBN, R2, R3 = MAX LBN FROM STORAGE
    100					; CONTROL BLOCK.  IN ORDER TO TRUST THE SCB VALUES, THEY MUST BE
    101					; BOUNDED BY THE THEORETIC MAX AND THAT VALUE -10000
    102					;
    103	000326	020200 				CMP	R2,R0
    104	000330	001001 				BNE	25$
    105	000332	020301 				CMP	R3,R1
    106	000334	101014 			25$:	BHI	35$		;BRANCH IF R2,R3 NOT .LE. R0,R1
    107	000336	162701 	010000 			SUB	#10000,R1
    108	000342	005600 				SBC	R0
    109	000344	020200 				CMP	R2,R0
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 7-2
OPEN THE LISTING, BITMAP, TEMP, AND INDEX FILES

    110	000346	001001 				BNE	27$
    111	000350	020301 				CMP	R3,R1
    112	000352	101405 			27$:	BLOS	35$		;BRANCH IF R2,R3 NOT .GT. R0,R1 - 10000
    113	000354	010267 	000000G			MOV	R2,MAXLBN	;ASSUME STORAGE CONTROL BLOCK MAX IS VALID
    114	000360	010367 	000002G			MOV	R3,MAXLBN+2
    115	000364	000432 				BR	38$
    116	000366	012701 	000420'		35$:	MOV	#LO71MG,R1	;STORAGE CONTROL BLOCK BAD
    117	000372	005002 				CLR	R2
    118	000374					CALL	OUT1
    119	000400	012701 	000511'			MOV	#LO72MG,R1
    120	000404	005002 				CLR	R2
    121	000406					CALL	OUT1
    122	000412	012701 	000604'			MOV	#LO73MG,R1
    123	000416	032767 	000000G	000000G		BIT	#FREEBT,VFYCTL
    124	000424	001007 				BNE	36$		;BRANCH IF /FREE COMMAND
    125	000426	012701 	000652'			MOV	#LO74MG,R1
    126	000432	005002 				CLR	R2
    127	000434					CALL	OUT1
    128	000440	012701 	000764'			MOV	#LO75MG,R1
    129	000444	005002 			36$:	CLR	R2
    130	000446					CALL	OUT1
    131	000452	012700 	000000G		38$:	MOV	#BITMAP,R0
    132	000456	012767 	000002 	000000G		MOV	#2,FBTBLK	;VBN OF FIRST BIT MAP BLOCK
    133	000464	012767 	000401 	000000G		MOV	#257.,MAPOFF	;NO. OF RECORDS TO ADD TO RECORD NO
    134	000472					FDRC$R	R0,#FD.RAN
    135	000500	032767 	000000G	000000G		BIT	#FREEBT,VFYCTL	;PRINT FREE BLOCKS LEFT?
    136	000506	001402 				BEQ	40$
    137	000510	000177 	000000G			JMP	@.FREP1		;YES
    138	000514	012701 	000002 		40$:	MOV	#2,R1
    139	000520	012702 	000000G			MOV	#BITWRD,R2
    140	000524					CALL	SETREC		;2 BYTE RECORDS
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 8
OPEN THE LISTING, BITMAP, TEMP, AND INDEX FILES

    142					;
    143					; OPEN THE TEMPORARY BIT MAP
    144					; THIS FILE IDEALLY SHOULD NOT BE ON THE DEVICE BEING VERIFIED.
    145					; IN THE CASE THAT THE STORAGE MAP IS BEING UPDATED BY VERIFY, THIS FILE
    146					; MUST NOT BE DELETED BY VERIFY, SINCE THIS MAY CAUSE THE FILE
    147					; PRIMITIVES TO UNDO THE UPDATE PERFORMED BY VERIFY.
    148					;	THEREFORE, IF THE TMP FILE MUST BE ON THE DEVICE BEING
    149					; VERIFIED, AND THE STORAGE MAP IS BEING UPDATED, THEN VERIFY
    150					; WILL NOT DELETE THE TEMP FILE, AND THE USER MUST DISMOUNT THE VOLUME
    151					; AND REMOUNT IT AND THEN DELETE THE TMP FILE.
    152	000530					FDAT$R	#TBTMAP,#R.FIX,#0,#2
    153	000554					FDRC$R	R0,#FD.RAN,#BITWRD,#2
    154					;
    155					; GET THE DEVICE NAME AND UNIT FOR THE TEMP FILE
    156					;
    157	000576	012701 	000000C			MOV	#TBTMAP+F.FNB,R1
    158	000602	016002 	000000G			MOV	F.DSPT(R0),R2
    159	000606	016003 	000000G			MOV	F.DFNB(R0),R3
    160	000612					CALL	.PRSDV		;PARSE THE DEVICE NAME
    161	000616	103570 				BCS	85$
    162	000620	026067 	000000G	000000C		CMP	F.DVNM(R0),BITMAP+F.DVNM ;SAME DEVICE AS BEING VERIFIED?
    163	000626	001024 				BNE	45$		;BRANCH IF NOT
    164	000630	026067 	000000G	000000C		CMP	F.UNIT(R0),BITMAP+F.UNIT ;SAME UNIT AS WELL?
    165	000636	001020 				BNE	45$		;BRANCH IF NOT
    166	000640	052767 	000000G	000000G		BIS	#SAMDEV,TMPCTL	;TEMP FILE IS ON DEVICE BEING VERIFIED
    167	000646	032767 	000000G	000000G		BIT	#UPDATE,VFYCTL	;IF UPDATING STORAGE MAP
    168	000654	001411 				BEQ	45$
    169	000656	052767 	000000G	000000G		BIS	#DELMAN,TMPCTL	;THE TEMP FILE MUST BE MANUALLY DELETED
    170	000664					OPEN$W	R0		;CREATE THE TEMP FILE
    171	000676	000410 				BR	48$
    172	000700				45$:	OPNT$D	R0		;CREATE AND MARK TEMP FILE FOR DELETE
    173	000720	103527 			48$:	BCS	85$
    174					;
    175					; CREATE TEMP BITM WITH ROOM FOR 2 MAPS
    176	000722	016701 	000000G			MOV	NBTBLK,R1
    177	000726	006301 				ASL	R1		;2* NO. OF BIT MAP BLOCKS
    178	000730	066701 	000000G			ADD	FBTBLK,R1	;PLUS THE 1ST VBN OF BIT MAP
    179	000734	005301 				DEC	R1		;-1 TO GET NO. OF BLOCKS
    180	000736	005002 				CLR	R2		;R2=NON CONTIGUOUS ALLOCATION
    181	000740					CALL	.EXTND		;ALLOCATE SPACE
    182	000744	103512 				BCS	78$
    183					;
    184					; OPEN THE INDEX FILE AND INITIALIZE
    185	000746				50$:	CALL	OPNINX
    186	000752	103515 				BCS	99$
    187	000754	032767 	000000G	000000G		BIT	#LOSTBT,VFYCTL	;/LO COMMAND?
    188	000762	001402 				BEQ	55$		;BRANCH IF NO
    189	000764	000177 	000000G			JMP	@.LOST1		;YES, GO DO THE LOST FILE SCAN
    190	000770	012702 	000000G		55$:	MOV	#MOPRM,R2
    191	000774	012712 	000000C			MOV	#INDEX+F.DVNM,@R2
    192	001000	016762 	000000C	000002 		MOV	INDEX+F.UNIT,2(R2)
    193	001006	012701 	000211'			MOV	#LO33MG,R1	;TITLE LINE FOR BITMAP/INDEX CONSISTENCY
    194	001012	032767 	000000C	000000G		BIT	#LISTBT!RDCKBT,VFYCTL
    195	001020	001005 				BNE	60$		;BRANCH IF LISTING OR READ CHECK
    196	001022	012701 	000211'			MOV	#LO33MG,R1	;TITLE LINE FOR BITMAP/INDEX CONSISTENCY
    197	001026					CALL	OUT1
    198	001032	000472 				BR	INIBIT		;GO DO THE CONSISTENCY CHECK
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 8-1
OPEN THE LISTING, BITMAP, TEMP, AND INDEX FILES

    199	001034	012701 	000275'		60$:	MOV	#LO34MG,R1	;TITLE FOR INDEX FILE LISTING
    200	001040	032767 	000000G	000000G		BIT	#LISTBT,VFYCTL	;ARE WE LISTING THE INDEX FILE?
    201	001046	001045 				BNE	70$		;BRANCH IF YES
    202					;
    203					; DOING A READ CHECK ON THE SPECIFIED DEVICE, CALCULATE AND
    204					; PRINT THE BLOCK COUNT TO BE USED IN READING THE FILES
    205					;
    206	001050	016700 	000000C			MOV	FDBOUT+F.BBFS,R0 ;BUFFER SPACE NEEDED BY LISTING FILE
    207	001054	062700 	000000C			ADD	#<<3*S.BFHD>+2000>,R0 ;TOTAL BUFFER SPACE NEEDED BY FCS
    208	001060	016701 	000000G			MOV	.DYSIZ,R1	;NO OF BYTES OF DYNAMIC MEMORY
    209	001064	160001 				SUB	R0,R1		;FORM NO. OF BYTES LEFT FOR READ CHECK BUF
    210	001066	042701 	000777 			BIC	#777,R1		;TRUNCATE TO INTEGRAL NO. OF BLOCKS
    211	001072	001447 				BEQ	110$		;BRANCH IF NOT ENOUGH SPACE LEFT
    212	001074	010146 				MOV	R1,-(SP)
    213	001076	010246 				MOV	R2,-(SP)
    214	001100	013700 	000000G			MOV	@#.FSRPT,R0
    215	001104					CALL	$RQCB		;ALLOCATE A BUFFER
    216	001110	103440 				BCS	110$		;BRANCH IF NO ROOM
    217	001112	012602 				MOV	(SP)+,R2
    218	001114	012601 				MOV	(SP)+,R1
    219	001116	010067 	000000G			MOV	R0,.DYBUF	;SAVE ADDRESS OF BUFFER
    220	001122	010167 	000000G			MOV	R1,.DYBYT	;AND IT'S SIZE IN BYTES
    221	001126	000301 				SWAB	R1
    222	001130	006201 				ASR	R1		;MAX BLOCKS AVAILABLE
    223	001132	016700 	000000G			MOV	.RCBLK,R0	;DID USER SPECIFY A BLOCKING FACTOR?
    224	001136	001402 				BEQ	62$		;BRANCH IF NO, USE THE DEFAULT
    225	001140	020001 				CMP	R0,R1		;DID HE ASK FOR MORE THAN IS AVAILABLE?
    226	001142	101401 				BLOS	65$		;BRANCH IF NO, USE HIS NUMBER
    227	001144	010100 			62$:	MOV	R1,R0		;USE THE DEFAULT (MAX) NO. OF BUFFERS
    228	001146	010067 	000000G		65$:	MOV	R0,.RCBLK	;SET NO. OF BLOCKS TO USE
    229	001152	010062 	000004 			MOV	R0,4(R2)	;SET NO. OF BLOCKS TO PRINT
    230	001156	012701 	000332'			MOV	#LO50MG,R1	;READ CHECK TITLE MESSAGE
    231	001162				70$:	CALL	OUT1
    232	001166	000167 	000000G			JMP	INXSC2
    233					;
    234					; FAILED TO EXTEND TEMPORARY BIT MAP
    235	001172				78$:	ERROUX	ER04,0,0
	001172	104427 				TRAP	X
	001174	000000G				.WORD	ER04SZ
	001176	000000G				.WORD	ER04MG
    236
    237					; FAILED TO OPEN TEMPORARY BIT MAP FILE
    238	001200				85$:	ERROUX	ER03,0,0
	001200	104427 				TRAP	X
	001202	000000G				.WORD	ER03SZ
	001204	000000G				.WORD	ER03MG
    239	001206	000167 	000000G		99$:	JMP	RSTART
    240	001212				110$:	ERROUX	ER17		;NOT ENOUGH DYNAMIC MEMORY SPACE
	001212	104403 				TRAP	X
	001214	000000G				.WORD	ER17SZ
	001216	000000G				.WORD	ER17MG
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 9
INITIALIZE THE BIT MAP FILES

    242						.SBTTL	INITIALIZE THE BIT MAP FILES
    243					;
    244					; INITIALIZE THE TEMPORARY BIT MAP AND THE REAL ONE IF REBUILDING
    245	001220	016767 	000000G	000000C	INIBIT:	MOV	MAPOFF,TBTMAP+F.RCNM+2
    246	001226	016767 	000000G	000000C		MOV	MAPOFF,BITMAP+F.RCNM+2
    247	001234	016704 	000000G			MOV	MAXLBN,R4
    248	001240	016705 	000002G			MOV	MAXLBN+2,R5
    249
    250
    251						.IF	GT,R$$EIS
    252						ASHC	#-4,R4
    253
    254						.IFF
    255	001244	012746 	000004 			MOV	#4,-(SP)	;RIGHT SHIFT R4, R5 4 BITS
    256	001250	006204 			10$:	ASR	R4
    257	001252	006005 				ROR	R5
    258	001254	005316 				DEC	(SP)
    259	001256	003374 				BGT	10$
    260	001260	005726 				TST	(SP)+		;POP THE EXHAUSTED SHIFT COUNT
    261						.ENDC
    262
    263	001262	010546 				MOV	R5,-(SP)	;KEEP TRACK OF WORDS WRITTEN IN LAST BLOCK
    264	001264	012767 	177777 	000000G		MOV	#-1,BITWRD	;BIT SET MEANS BLOCK FREE
    265	001272					CALL	INILP		;WRITE -1 WORDS INTO BIT MAP
    266	001276	016701 	000002G			MOV	MAXLBN+2,R1
    267	001302	005002 				CLR	R2
    268	001304	042701 	177760 			BIC	#177760,R1
    269
    270						.IF	EQ,R$$EIS
    271	001310	001404 				BEQ	30$
    272	001312	000261 			20$:	SEC
    273	001314	006102 				ROL	R2		;SHIFT 1 BITS INTO R2 (R1) TIMES
    274	001316	005301 				DEC	R1
    275	001320	003374 				BGT	20$
    276	001322				30$:
    277
    278						.IFF
    279						MOV	#-1,R3
    280						ASHC	R1,R2		;SHIFT BITS INTO R2, COUNT IN R1
    281						.ENDC
    282
    283	001322	010267 	000000G			MOV	R2,BITWRD	;SAME BITS SET
    284	001326	012705 	000001 			MOV	#1,R5
    285	001332	005216 				INC	@SP		;NOTE ONE MORE WORD WRITTEN
    286	001334					CALL	INILP
    287					; FILL REMAINING WORDS IN LAST BLOCK WITH 0
    288	001340	012705 	000400 			MOV	#256.,R5
    289	001344	012603 				MOV	(SP)+,R3
    290	001346	042703 	177400 			BIC	#177400,R3
    291	001352	160305 				SUB	R3,R5		;R5=NO. OF WORDS LEFT IN BLOCK
    292	001354	005067 	000000G			CLR	BITWRD		;ZERO THESE
    293	001360					CALL	INILP
    294	001364	012701 	001000 			MOV	#512.,R1	;SET THE FILE TO 1 BLOCK RECORDS
    295	001370	012702 	000000G			MOV	#INXBIT,R2
    296	001374					CALL	SETREC
    297	001400	016703 	000000G			MOV	NBTBLK,R3	;NO. OF BLOCKS IN BITMAP
    298	001404	016701 	000000G			MOV	FBTBLK,R1	;STARTING BLOCK NO. OF REGULAR BITMAP
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 9-1
INITIALIZE THE BIT MAP FILES

    299	001410	010102 				MOV	R1,R2
    300	001412	060302 				ADD	R3,R2		;STARTING BLOCK NO. OF MULT ALLOC BITMAP
    301	001414	000167 	000000G			JMP	MULSCN
    302					;
    303					; R4,R5=DBL PRECISION NO. OF WORDS TO PUT ; R0-R3 PRESERVED R4,R5=0
    304	001420	012700 	000000G		INILP:	MOV	#TBTMAP,R0
    305	001424				10$:	PUT$	R0,,,WRTERR	;PUT A RECORD IN TEMP BIT MAP
    306	001436	032767 	000000G	000000G		BIT	#RBUILD,VFYCTL	;READ IF REBUILDING REAL BIT MAP
    307	001444	001411 				BEQ	20$
    308	001446					PUT$	#BITMAP,,,WRTERR ;PUT A RECORD IN THE REAL BIT MAP
    309	001464	012700 	000000G			MOV	#TBTMAP,R0
    310	001470	162705 	000001 		20$:	SUB	#1,R5		;DOUBLE PRECISION SOB
    311	001474	005604 				SBC	R4
    312	001476	010546 				MOV	R5,-(SP)
    313	001500	050426 				BIS	R4,(SP)+
    314	001502	001350 				BNE	10$
    315	001504					RETURN
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 10
OPEN ROUTINES FOR THE LISTING AND INDEX FILES

    317						.SBTTL	OPEN ROUTINES FOR THE LISTING AND INDEX FILES
    318					;+
    319					; OPEN THE OUTPUT FILE FOR LISTING OUTPUT
    320					; INPUTS:
    321					;	NONE
    322					; OUTPUTS:
    323					;	C=0 IF SUCCESSFUL
    324					;	C=1 IF FAILED TO OPEN - ERROR MESSAGE PRINTED
    325					;	ALL REGISTERS ALTERED
    326					;-
    327	001506				OPNOUT:	OPEN$W	#FDBOUT
    328	001524	103415 				BCS	50$
    329	001526	132760 	000000G	000000G		BITB	#FD.TTY,F.RCTL(R0) ;UNLESS OUTPUT TO TTY
    330	001534	001007 				BNE	10$
    331	001536	112770 	000014 	000002G		MOVB	#14,@F.NRBD+2(R0) ;PUT OUT A FORM FEED
    332	001544	012701 	000001 			MOV	#1,R1
    333	001550					CALL	OUT2
    334	001554	000241 			10$:	CLC
    335	001556					RETURN
    336					;
    337					; FAILED TO OPEN THE LISTING FILE
    338	001560				50$:	ERROUT	ER14,0,0	;FAILED TO OPEN LISTING FILE
	001560	104426 				TRAP	X
	001562	000000G				.WORD	ER14SZ
	001564	000000G				.WORD	ER14MG
    339	001566	000261 				SEC
    340	001570					RETURN
    341					;
    342					;+
    343					; OPEN THE INDEX FILE AND INITIALIZE SOME LOCATIONS
    344					; INPUTS:
    345					;	NONE
    346					; OUTPUTS:
    347					;	C=0 IF SUCCESSFUL
    348					;	C=1 IF FAILED TO OPEN - ERROR MESSAGE SENT
    349					;	ALL REGISTERS ALTERED
    350					;-
    351	001572	005067 	000000C		OPNINX:	CLR	INDEX+F.FNB+N.FID+2 ;SO I CAN TELL IF FIND WORKED
    352	001576	012700 	000000G		45$:	MOV	#INDEX,R0
    353	001602	012760 	000000G	000000G		MOV	#STBLK,F.STBK(R0)
    354	001610	032767 	000000G	000000G		BIT	#UPDINX,VFYCTL	;IF DESIRE TO UPDATE INDEX FILE
    355	001616	001406 				BEQ	50$
    356	001620					OPNS$M	R0		;OPEN FOR SHARED MODIFY
    357	001632	000405 				BR	55$
    358	001634				50$:	OPNS$R	R0		;OTHERWISE JUST OPEN FOR SHARED READ
    359	001646	103030 			55$:	BCC	INIINX		;BRANCH IF OPENED SUCCESSFULLY
    360	001650	122760 	000000G	000000G		CMPB	#IE.PRI,F.ERR(R0) ;IF PRIVILEGE VIOLATION, JUST REPORT IT
    361	001656	001417 				BEQ	90$
    362	001660	005760 	000000C			TST	F.FNB+N.FID+2(R0) ;IF FAILED TO FIND FILE ID
    363	001664	001014 				BNE	90$
    364	001666	012760 	000000G	000000C		MOV	#INXFID,F.FNB+N.FID(R0) ;USE THE KNOWN FILE ID
    365	001674	012760 	000000G	000000C		MOV	#INXFID,F.FNB+N.FID+2(R0)
    366	001702	012701 	000000'			MOV	#LO18MG,R1	;AND REPORT THE FAILURE
    367	001706	005002 				CLR	R2
    368	001710					CALL	OUT1
    369	001714	000730 				BR	45$		;NOW GO OPEN THE FILE BY ID
    370					;
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 10-1
OPEN ROUTINES FOR THE LISTING AND INDEX FILES

    371					; FAILED TO OPEN INDEX FILE
    372	001716				90$:	ERROUT	ER15,0,0
	001716	104426 				TRAP	X
	001720	000000G				.WORD	ER15SZ
	001722	000000G				.WORD	ER15MG
    373	001724	000261 				SEC
    374	001726					RETURN
    375					;
    376					; SET UP THE INDEX FILE ATTRIBUTE SECTION
    377	001730				INIINX::FDAT$R	R0,#R.FIX,,#512. ;FIX INDEX FILE ATTRIBUTE SECTION
    378	001744					CALL	FIXEOF
    379	001750	012760 	000002 	000002G		MOV	#2,F.RCNM+2(R0)	;READ THE HOME BLOCK
    380	001756					GET$	R0,,,RDERR
    381	001770	016002 	000002G			MOV	F.NRBD+2(R0),R2
    382	001774	016267 	000006 	000000G		MOV	6(R2),MAXFNU	;MAX FILE NUMBER
    383	002002	011202 				MOV	@R2,R2
    384	002004	010267 	000000G			MOV	R2,SINXBT	;NO. OF BLOCKS IN INDEX FILE BITMAP
    385	002010	062702 	000002 			ADD	#2,R2
    386	002014	010267 	000000G			MOV	R2,INXOFF	;FILE ID + INXOFF = VBN OF FILE HEADER
    387	002020	005067 	000000G			CLR	NXTFID
    388	002024					RETURN
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 11
FORMAT STRINGS

    390						.SBTTL	FORMAT STRINGS
    391	000000					.PSECT
    392
    393	000000					MSG	LO18,<FAILED TO FIND INDEXF.SYS;1 IN MFD>
    394	000000					MSGZ	,< - WILL OPEN INDEX BY FILE ID 1,1>
    395	000000					MSG	LO19,<FAILED TO FIND BITMAP.SYS;1 IN MFD>
    396	000000					MSGZ	,< - WILL OPEN BITMAP BY FILE ID 2,2>
    397	000000					MSG	LO33,<%NCONSISTENCY CHECK OF INDEX AND BITMAP>
    398	000000					MSG1	,<^ ON %2A%O:^<15><12><0>>
    399	000000					MSG1	LO34,<^LISTING OF INDEX ON %2A%O:^<15><12><0>>
    400	000000					MSG	LO50,<READ CHECK OF FILES ON %2A%O: - BLOCKING FACTOR %D.>
    401	000000					MSG1	,<<15><12><0>>
    402	000000					MSG	LO71,<STORAGE CONTROL BLOCK (VBN 1 OF BITMAP.SYS) IS >
    403	000000					MSGZ	,<CORRUPTED>
    404	000000					MSG	LO72,<CONTINUING WITH AN APPROXIMATION OF THE >
    405	000000					MSGZ	,<SIZE OF THE VOLUME>
    406	000000					MSGZ	LO73,<ONLY THE "BLOCKS FREE" VALUE IS VALID>
    407	000000					MSG	LO74,<THE "BLOCKS USED" VALUE IS VALID IN THE LINE >
    408	000000					MSGZ	,<BEGINNING "INDEX  INDICATES">
    409	000000					MSG	LO75,<THE "BLOCKS FREE" VALUE IS VALID IN THE LINE >
    410	000000					MSGZ	,<BEGINNING "BITMAP INDICATES">
    411						.EVEN
    412					;
    413					;
    414		000001 				.END
VFYOPN M0111, OPEN THE FILES	MACRO M1108  06-DEC-77 00:14  PAGE 11-1
SYMBOL TABLE

BITDFN= ****** GX	FO.WRT= ****** GX	INXSC2= ****** GX	MG    = 001041R     003	SZ    = 000035
BITFID= ****** GX	FREEBT= ****** GX	LISTBT= ****** GX	MOPRM = ****** GX	S.BFHD= ****** GX
BITMAP= ****** GX	F.BBFS= ****** GX	LOSTBT= ****** GX	MULSCN= ****** GX	TBTMAP= ****** GX
BITWRD= ****** GX	F.DFNB= ****** GX	LO18MG= 000000R     003	NBTBLK= ****** GX	TMPCTL= ****** GX
DELMAN= ****** GX	F.DSPT= ****** GX	LO18SZ= 000042   	NXTFID= ****** GX	UPDATE= ****** GX
ER02MG= ****** GX	F.DVNM= ****** GX	LO19MG= 000104R     003	N.FID = ****** GX	UPDINX= ****** GX
ER02SZ= ****** GX	F.ERR = ****** GX	LO19SZ= 000042   	OPENF   000000RG    002	VFYCTL= ****** GX
ER03MG= ****** GX	F.FACC= ****** GX	LO33MG= 000211R     003	OPNINX  001572R     002	WRTERR= ****** GX
ER03SZ= ****** GX	F.FNB = ****** GX	LO33SZ= 000047   	OPNOUT  001506R     002	X     = 000026
ER04MG= ****** GX	F.NRBD= ****** GX	LO34MG= 000275R     003	OUT1  = ****** GX	$DMUL = ****** GX
ER04SZ= ****** GX	F.RACC= ****** GX	LO34SZ= 000035   	OUT2  = ****** GX	$RQCB = ****** GX
ER14MG= ****** GX	F.RATT= ****** GX	LO50MG= 000332R     003	PAR$$$= 000000   	$$    = 000067
ER14SZ= ****** GX	F.RCNM= ****** GX	LO50SZ= 000063   	RBUILD= ****** GX	$$$T1 = 000067
ER15MG= ****** GX	F.RCTL= ****** GX	LO71MG= 000420R     003	RDCKBT= ****** GX	.DYBUF= ****** GX
ER15SZ= ****** GX	F.RSIZ= ****** GX	LO71SZ= 000057   	RDERR = ****** GX	.DYBYT= ****** GX
ER17MG= ****** GX	F.RTYP= ****** GX	LO72MG= 000511R     003	RSTART= ****** GX	.DYSIZ= ****** GX
ER17SZ= ****** GX	F.STBK= ****** GX	LO72SZ= 000050   	R$$DPB= 000001   	.EXTND= ****** GX
FA.SHR= ****** GX	F.UNIT= ****** GX	LO73MG= 000604R     003	R$$DYM= 000001   	.FREP1= ****** GX
FA.TMP= ****** GX	F.URBD= ****** GX	LO73SZ= 000046   	R$$EIS= 000000   	.FSRPT= ****** GX
FBTBLK= ****** GX	IE.PRI= ****** GX	LO74MG= 000652R     003	R$$MSG= 000000   	.GET  = ****** G
FDBOUT= ****** GX	INDEX = ****** GX	LO74SZ= 000055   	R$$11M= 000001   	.LOST1= ****** GX
FD.PLC= ****** GX	INIBIT  001220R     002	LO75MG= 000764R     003	R.FIX = ****** GX	.MRKDL= ****** GX
FD.RAN= ****** GX	INIINX  001730RG    002	LO75SZ= 000055   	SAMDEV= ****** GX	.OPEN = ****** G
FD.TTY= ****** GX	INILP   001420R     002	MAPOFF= ****** GX	SETREC= ****** GX	.PRSDV= ****** GX
FIXEOF= ****** GX	INXBIT= ****** GX	MAXFNU= ****** GX	SINXBT= ****** GX	.PUT  = ****** G
FO.MFY= ****** GX	INXFID= ****** GX	MAXLBN= ****** GX	STBLK = ****** GX	.RCBLK= ****** GX
FO.RD = ****** GX	INXOFF= ****** GX

. ABS.	000000	   000
      	000000	   001
PURE$I	002026	   002
MSGSTR	001076	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  4835 WORDS  ( 19 PAGES)
DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:01:08
[65,10]VFYOPN,[65,20]VFYOPN/-SP=[43,30]PIPMAC,[65,30]VFYOPN
VFYRCK M0105, VFY - READ CHECK 	MACRO M1108  06-DEC-77 00:15
TABLE OF CONTENTS

    7-   1	**** VFYRCK VERSION M0105 ****
    7-  24	RDFIL - READ THE DATA BLOCKS OF THE FILE - READ CHECK
    8- 114	RDBLK - READ VIRTUAL BLOCK(S) OF FILE
    9- 171	RDCKER - REPORT READ CHECK ERROR
   10- 242	READ CHECK HEADER OUTPUT MESSAGE
   10- 295	FORMAT STRINGS
VFYRCK M0105, VFY - READ CHECK 	MACRO M1108  06-DEC-77 00:15  PAGE 7


      1						.TITLE	VFYRCK M0105, VFY - READ CHECK LOGIC
						.SBTTL	**** VFYRCK VERSION M0105 ****
						.IDENT	/M0105/
      2					; ALTERED FRIDAY 10-JAN-75 14:50
      3					;
      4					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      5
      6					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      7					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
      8					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
      9					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     10
     11					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     12					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     13					; EQUIPMENT CORPORATION.
     14
     15					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     16					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     17					;
     18					; PETER H. LIPMAN 28-OCT-74
     19					;
     20						.MCALL	CALL,CALLR,RETURN,OPNS$R,CLOSE$,WSIG$S
     21
     22	000000					PURE.I
     23
     24						.SBTTL	RDFIL - READ THE DATA BLOCKS OF THE FILE - READ CHECK
     25					;+
     26					;
     27					; ** RDFIL - READ ALL THE BLOCK OF THE FILE SPECIFIED BY THE HEADER
     28					;		IN THE INDEX FILE FDB RECORD POINTER
     29					;
     30					; INPUTS:
     31					;
     32					;	INDEX+F.NRBD+2 CONTAINS THE ADDRESS OF THE FILE HEADER (FID)
     33					;	INDEX+F.DVNM, F.UNIT CONTAIN THE DEVICE AND UNIT
     34					;
     35					; OUTPUTS:
     36					;
     37					;	ALL REGISTERS PRESERVED
     38					;
     39					;	THE ROUTINE OPENS THE SPECIFIED FILE AND READS ALL THE
     40					; DATA BLOCKS, REPORTING ANY ERRORS AS IT GOES.
     41					;
     42					;-
     43	000000				RDFIL::	CALL	$SAVAL
     44	000004	012700 	000000G			MOV	#RDCHK,R0	;R0=READ CHECK FDB
     45	000010	012701 	000000C			MOV	#RDCHK+F.FNB,R1	;R1=FNB PORTION OF THE FDB
     46	000014	016702 	000000C			MOV	INDEX+F.NRBD+2,R2 ;R2=ADDRESS OF HEADE
     47	000020	016261 	000000G	000000G		MOV	HH.FNU(R2),N.FID(R1) ;SET UP TO OPEN BY FILE ID
     48	000026	016261 	000000G	000002G		MOV	HH.FSQ(R2),N.FID+2(R1) ;STORING FILE NUMBER AND FILE SEQUENCE
     49	000034	016761 	000000C	000000G		MOV	INDEX+F.FNB+N.DVNM,N.DVNM(R1) ;STORE DEVICE NAME
     50	000042	016761 	000000C	000000G		MOV	INDEX+F.FNB+N.UNIT,N.UNIT(R1) ;STORE UNIT
     51	000050	012703 	000000G			MOV	#STBLK,R3	;R3=ADDRESS OF STATISTICS BLOCK
     52	000054	010360 	000000G			MOV	R3,F.STBK(R0)	;READ STATISTICS BLOCK ON OPEN
     53	000060					OPNS$R	R0,,,#FD.RWM	;OPEN THE FILE IN READ/WRITE MODE
     54	000100	103503 				BCS	100$		;BRANCH IF FAILED
     55	000102					CALL	FIXEOF
VFYRCK M0105, VFY - READ CHECK 	MACRO M1108  06-DEC-77 00:15  PAGE 7-1
RDFIL - READ THE DATA BLOCKS OF THE FILE - READ CHECK

     56	000106	022323 				CMP	(R3)+,(R3)+	;POINT TO 3RD WORD OF STATISTICS BLOCK
     57	000110	012360 	000000G			MOV	(R3)+,F.HIBK(R0) ;USE REAL SIZE OF FILE
     58	000114	012360 	000002G			MOV	(R3)+,F.HIBK+2(R0)
     59					;
     60					; MOVE THE ATTRIBUTES TO THE HEADER SO THAT RCHDOU CAN PRINT THEM
     61					; IF AN ERROR OCCURS.
     62					;
     63	000120	010001 				MOV	R0,R1		;R1=ADDRESS OF RECORD ATTRIBUTES TO MOVE
     64	000122	062702 	000000G			ADD	#HH.UAT,R2	;R2=ADDRESS OF RECORD ATTRIBUTES IN HEADER
     65	000126	012705 	000000C			MOV	#S.FATT/2,R5	;R5=NO. OF WORDS TO MOVE
     66	000132	012122 			5$:	MOV	(R1)+,(R2)+	;MOVE THE ATTRIBUTES
     67	000134					SOB	R5,5$
     68					;
     69					; NOW USE THE STATISTICS BLOCK AS A 5 WORD PARAMETER BLOCK FOR
     70					; THE QIO READ VIRTUAL BLOCK.  INITIALIZE IT NOW
     71					;
     72	000140	012713 	000001 			MOV	#1,(R3)		;SET VBN 1
     73	000144	005043 				CLR	-(R3)
     74	000146	005043 				CLR	-(R3)		;NO CARRIAGE CONTROL
     75	000150	005043 				CLR	-(R3)		;COUNT FIELD
     76	000152	016743 	000000G			MOV	.DYBUF,-(R3)	;BUFFER ADDRESS
     77					;
     78					; R3 NOW POINTS TO THE FRONT OF THE PARAMETER BLOCK FOR THE QI/O READ
     79					;
     80	000156	016705 	000000G		10$:	MOV	.RCBLK,R5	;R5=NO. OF BLOCKS TO BE READ IN EACH QI/O
     81	000162	005760 	000000G		20$:	TST	F.HIBK(R0)	;IF HIGH ORDER COUNT NON ZERO, XFER MAX
     82	000166	001006 				BNE	40$
     83	000170	020560 	000002G			CMP	R5,F.HIBK+2(R0) ;IF FEWER BLOCKS LEFT THAN MAX
     84	000174	101403 				BLOS	40$
     85	000176	016005 	000002G			MOV	F.HIBK+2(R0),R5	;USE WHAT'S LEFT
     86	000202	001446 				BEQ	110$		;BRANCH IF NONE LEFT, ALL DONE
     87	000204				40$:	CALL	RDBLK		;READ THE VIRTUAL BLOCK(S)
     88	000210	103034 				BCC	70$		;DO THE NEXT CHUNK IF SUCCESSFUL
     89	000212	012701 	000065'			MOV	#LO49MG,R1	;FORMAT STRING FOR ERROR MESSAGE
     90	000216	022705 	000001 			CMP	#1,R5		;IF BLOCKING FACTOR IS 1
     91	000222	001002 				BNE	45$
     92	000224	012701 	000157'			MOV	#LO51MG+1,R1	;USE THE OTHER MESSAGE MINUS THE 1ST TAB
     93	000230				45$:	CALL	RDCKER		;OUTPUT THE ERROR MESSAGE
     94	000234	022705 	000001 			CMP	#1,R5		;BLOCKING FACTOR OF 1?
     95	000240	001420 				BEQ	70$		;BRANCH IF YES, SKIP THE SINGLE READS
     96	000242	010546 				MOV	R5,-(SP)	;SAVE THE NO. OF BLOCKS TOREAD 1 AT A TIME
     97	000244	012705 	000001 			MOV	#1,R5		;USE BLOCKING FACTOR OF 1
     98	000250				50$:	CALL	RDBLK		;READ THE NEXT BLOCK
     99	000254	103004 				BCC	60$		;BRANCH IF THIS ONE'S OK
    100	000256	012701 	000156'			MOV	#LO51MG,R1	;FORMAT STRING FOR ERROR MESSAGE
    101	000262					CALL	RDCKER		;OUTPUT THE ERROR MESSAGE
    102	000266				60$:	CALL	RCNXT		;SET UP FOR NEXT BLOCKS TO BE READ
    103	000272	005316 				DEC	(SP)		;ANY MORE BLOCKS TO XFER?
    104	000274	003365 				BGT	50$		;BRANCH IF YES, GO XFER ANOTHER
    105	000276	005726 				TST	(SP)+		;POP THE EXHAUSTED COUNT
    106	000300	000726 				BR	10$		;AND GO GET THE NEXT CHUNK OF VBN'S
    107	000302				70$:	CALL	RCNXT		;SET UP FOR NEXT BLOCKS TO BE READ
    108	000306	000725 				BR	20$		;AND GO READ THEM
    109	000310	012701 	000000'		100$:	MOV	#LO48MG,R1	;FAILED TO OPEN THE FILE
    110	000314					CALL	HDRERR
    111	000320				110$:	CLOSE$	#RDCHK
    112	000330					CALLR	TRMOUT
VFYRCK M0105, VFY - READ CHECK 	MACRO M1108  06-DEC-77 00:15  PAGE 8
RDBLK - READ VIRTUAL BLOCK(S) OF FILE

    114						.SBTTL	RDBLK - READ VIRTUAL BLOCK(S) OF FILE
    115					;+
    116					;
    117					; ** RDBLK - READ THE SPECIFIED NO. OF BLOCKS OF THE FILE
    118					;
    119					; INPUTS:
    120					;
    121					;	R0=FDB FOR OPEN FILE
    122					;	R3=PARAMETER BLOCK FOR QI/O READ VIRTUAL BLOCK
    123					;		EVERYTHING IS FILLED IN BUT BYTE COUNT TO READ
    124					;	R5= NUMBER OF BLOCKS TO READ
    125					;
    126					; OUTPUTS:
    127					;
    128					;	C=0 IF SUCCESSFUL, C=1 IF ERROR
    129					;	R0,R3,R5 PRESERVED, R1,R2,R4 ALTERED
    130					;
    131					;-
    132	000334	010504 			RDBLK::	MOV	R5,R4		;CALCULATE BYTE COUNT TO BE READ
    133	000336	000304 				SWAB	R4
    134	000340	006304 				ASL	R4
    135	000342	010463 	000002 			MOV	R4,2(R3)	;AND STORE IT IN THE QI/O PARAMETER BLOCK
    136	000346	012701 	000000G		20$:	MOV	#IO.RVB,R1	;I/O FUNCTION CODE FOR READ VIRTUAL
    137	000352	012702 	000005 			MOV	#5,R2		;PARAMETER BLOCK IN R3 HAS 5 PARAMS
    138	000356					CALL	.XQIO		;ISSUE THE QI/O AND WAIT
    139	000362	103011 				BCC	40$		;BRANCH IF SUCCESSFUL
    140	000364	022760 	000000C	000000G		CMP	#IE.NOD&377,F.ERR(R0) ;NO DYNAMIC MEMORY AVAILABLE?
    141	000372	001004 				BNE	30$		;BRANCH IF SOME OTHER ERROR
    142	000374					WSIG$S			;WAIT FOR A SIGNIFICANT EVENT
    143	000402	000761 				BR	20$		;AND TRY AGAIN
    144	000404	000261 			30$:	SEC
    145	000406				40$:	RETURN
    146					;
    147					;+
    148					;
    149					; ** RCNXT - SET UP FOR NEXT BLOCK(S) TO READ CHECK
    150					;
    151					; INPUTS:
    152					;
    153					;	R0=FDB ADDRESS
    154					;	R3=ADDRESS OF PARAMETER BLOCK FOR QI/O READ VIRTUAL
    155					;	R5=NO. OF BLOCKS JUST READ
    156					;
    157					; OUTPUTS:
    158					;
    159					;	ALL REGISTERS PRESERVED
    160					;	SUBTRACT BLOCK COUNT FROM F.HIBK(R0), F.HIBK+2(R0)
    161					;		I.E. NUMBER OF BLOCKS REMAINING TO READ
    162					;	ADD BLOCK COUNT TO 6(R3), 10(R3) - NEXT VBN TO READ
    163					;
    164					;-
    165	000410	160560 	000002G		RCNXT:	SUB	R5,F.HIBK+2(R0)
    166	000414	005660 	000000G			SBC	F.HIBK(R0)	;UPDATE NO. OF BLOCKS LEFT TO BE READ
    167	000420	060563 	000010 			ADD	R5,10(R3)
    168	000424	005563 	000006 			ADC	6(R3)		;AND NEXT VBN TO BE READ
    169	000430					RETURN
VFYRCK M0105, VFY - READ CHECK 	MACRO M1108  06-DEC-77 00:15  PAGE 9
RDCKER - REPORT READ CHECK ERROR

    171						.SBTTL	RDCKER - REPORT READ CHECK ERROR
    172					;
    173					;+
    174					;
    175					; ** RDCKER - REPORT READ CHECK ERROR
    176					;
    177					; INPUTS:
    178					;
    179					;	R0=FDB OF FILE WITH ERROR
    180					;	R1=FORMAT STRING FOR THE OUTPUT MESSAGE
    181					;	R3=PARAMETER BLOCK TO QIO READ VIRTUAL BLOCK
    182					;	INDEX+F.NRBD+2=HEADER ADDRESS FOR THE FILE
    183					;
    184					; OUTPUTS:
    185					;
    186					;	R0,R3,R5 PRESERVED, R1,R2,R4 ALTERED
    187					;
    188					;	THIS ROUTINE LISTS THE VIRTUAL BLOCK, THE LOGICAL BLOCK, AND
    189					; THE ERROR CODE OF THE BLOCK THAT COULD NOT BE READ.  A HEADER LINE IS
    190					; LISTED FOR THE FIRST ERROR PER FILE IDENTIFYING THE FILE BY ID AND NAME
    191					;
    192					;-
    193	000432	010046 			RDCKER:	MOV	R0,-(SP)	;SAVE R0
    194	000434	010346 				MOV	R3,-(SP)	;SAVE R3
    195	000436	010546 				MOV	R5,-(SP)	;AND R5 TOO
    196	000440	010146 				MOV	R1,-(SP)	;SAVE FORMAT STRING ADDRESS
    197	000442	012701 	000000G			MOV	#MOPRM,R1	;R1=PARAMETER LIST FOR EDTMG
    198	000446	016302 	000006 			MOV	6(R3),R2	;R2,R3 =VBN
    199	000452	016303 	000010 			MOV	10(R3),R3
    200	000456	010221 				MOV	R2,(R1)+	;STORE VBN IN PARAMETER LIST
    201	000460	010321 				MOV	R3,(R1)+
    202	000462	005021 				CLR	(R1)+		;SAVE ROOM AND ZERO THE LBN
    203	000464	005021 				CLR	(R1)+
    204	000466	116000 	000000G			MOVB	F.ERR(R0),R0
    205	000472	010021 				MOV	R0,(R1)+	;STORE ERROR CODE FROM FCS
    206	000474	010221 				MOV	R2,(R1)+	;VBN FOR TEMP STORE
    207	000476	010311 				MOV	R3,(R1)		;(R1)=LOW ORDER, -2(R1)=HIGH ORDER
    208	000500	016700 	000000C			MOV	INDEX+F.NRBD+2,R0 ;R0 =HEADER ADDRESS
    209	000504	005005 				CLR	R5
    210	000506	156005 	000000G			BISB	HH.MAP(R0),R5	;R5=WORD OFFSET TO MAP AREA OF HEADER
    211	000512	006305 				ASL	R5		;BYTE OFFSET
    212	000514	060005 				ADD	R0,R5		;ADDRESS OF MAP AREA IN HEADER
    213	000516	062705 	000000G			ADD	#HM.PNT,R5	;ADDRESS OF 1ST RETRIEVAL POINTER
    214	000522	010500 				MOV	R5,R0
    215	000524				20$:	CALL	GETBKP		;RETURN NEXT RETRIEVAL POINTER
    216	000530	103417 				BCS	60$		;BRANCH IF NONE LEFT
    217					;
    218					; R4=COUNT OF BLOCKS IN THE RETRIEVAL POINTER, R2,R3 =LBN
    219					;
    220	000532	005761 	177776 			TST	-2(R1)		;HIGH ORDER VBN BITS SET?
    221	000536	001002 				BNE	30$		;BRANCH IF YES, JUST COUNT THIS POINTER
    222	000540	020411 				CMP	R4,(R1)		;DOES THIS RTRV PTR CONTAIN THE VBN?
    223	000542	103004 				BHIS	40$		;BRANCH IF YES
    224	000544	160411 			30$:	SUB	R4,(R1)		;COUNT VBN'S JUST PASSED
    225	000546	005661 	177776 			SBC	-2(R1)
    226	000552	000764 				BR	20$		;AND TRY NEXT RETRIEVAL POINTER
    227	000554	005311 			40$:	DEC	(R1)
VFYRCK M0105, VFY - READ CHECK 	MACRO M1108  06-DEC-77 00:15  PAGE 9-1
RDCKER - REPORT READ CHECK ERROR

    228	000556	061103 				ADD	(R1),R3		;FORM LBN+LEFT OVER COUNT -1
    229	000560	005502 				ADC	R2
    230	000562	024141 				CMP	-(R1),-(R1)	;BACK UP TO LBN FIELD
    231	000564	010341 				MOV	R3,-(R1)	;AND STORE THE LBN
    232	000566	010241 				MOV	R2,-(R1)
    233	000570	012702 	000000G		60$:	MOV	#MOPRM,R2
    234	000574	012601 				MOV	(SP)+,R1	;R1=FORMAT STRING ADDRESS
    235	000576					CALL	OUTC		;OUTPUT THE ERROR MESSAGE
    236	000602	012605 				MOV	(SP)+,R5	;RESTORE R5
    237	000604	012603 				MOV	(SP)+,R3	;RESTORE R3
    238	000606	012600 				MOV	(SP)+,R0	;AND R0
    239	000610					RETURN			;AND EXIT
    240
VFYRCK M0105, VFY - READ CHECK 	MACRO M1108  06-DEC-77 00:15  PAGE 10
READ CHECK HEADER OUTPUT MESSAGE

    242						.SBTTL	READ CHECK HEADER OUTPUT MESSAGE
    243					;
    244					;+
    245					;
    246					; ** RCHDOU - READ CHECK HEADER MESSAGE OUTPUT
    247					;
    248					; INPUTS:
    249					;
    250					;	INDEX+F.NRBD+2 = ADDRESS OF HEADER
    251					;
    252					; OUTPUTS:
    253					;
    254					;	ALL REGISTERS ALTERED
    255					;
    256					; OPERATION:
    257					;
    258					;	THE OUTPUT APPEARS AS FOLLOWS
    259					; FILE ID N1,N2  NAME.TYP;VER SPACE USED/ALLOCATED
    260					;
    261					;-
    262	000612	016700 	000000G		RCHDOU::MOV	.DYBUF,R0
    263	000616	010002 				MOV	R0,R2		;USE THIS SPACE FOR PARAMETERS BLOCK
    264	000620	016704 	000000C			MOV	INDEX+F.NRBD+2,R4 ;ADDRESS OF HEADER
    265	000624	016446 	000000G			MOV	HH.FNU(R4),-(SP) ;USE FILE NUMBER FROM FILE HEADER
    266	000630	032767 	000000G	000000G		BIT	#HDROK,OUTCTL	;ASSUMING HEADER IS OK
    267	000636	001002 				BNE	5$		;BRANCH IF IT IS
    268	000640	016716 	000000G			MOV	NXTFID,(SP)	;OTHERWISE USE FILE NUMBER FROM NXTFID
    269	000644	012620 			5$:	MOV	(SP)+,(R0)+	;STORE THE FILE NUMBER
    270	000646	016420 	000000G			MOV	HH.FSQ(R4),(R0)+ ;FILE SEQUENCE NUMBER
    271	000652					CALL	MVFNAM		;FILE NAME
    272	000656	016700 	000000C			MOV	FDBOUT+F.NRBD+2,R0
    273	000662	012701 	000247'			MOV	#LO70MG,R1
    274	000666					CALL	$EDMSG		;CONVERT THIS MUCH TO A STRING
    275	000672	010401 				MOV	R4,R1		;HEADER ADDRESS
    276	000674	062701 	000000C			ADD	#HH.UAT+F.EFBK,R1 ;ADDRESS OF DBL PRECISION EOF BLOCK NO.
    277	000700	005764 	000000C			TST	HH.UAT+F.FFBY(R4) ;IF FFBY = 0
    278	000704	001004 				BNE	10$
    279	000706	162761 	000001 	000002 		SUB	#1,2(R1)	;EFBK IS ONE TOO BIG
    280	000714	005611 				SBC	(R1)
    281	000716	005002 			10$:	CLR	R2		;ZERO SUPPRESS
    282	000720					CALL	$CDDMG		;CONVERT DBL PRECISION DECIMAL
    283	000724	112720 	000056 			MOVB	#'.,(R0)+	;PUT IN DECIMAL POINT
    284	000730	112720 	000057 			MOVB	#'/,(R0)+	;"/"
    285	000734	010401 				MOV	R4,R1
    286	000736	062701 	000000C			ADD	#HH.UAT+F.HIBK,R1 ;ADDRESS OF DBL PRECISION LAST VBN
    287	000742	005002 				CLR	R2
    288	000744					CALL	$CDDMG		;CONVERT DBL PRECISION DECIMAL
    289	000750	112720 	000056 			MOVB	#'.,(R0)+	;ADD A DECIMAL POINT
    290	000754	010001 				MOV	R0,R1		;CALCULATE SIZE OF MESSAGE
    291	000756	166701 	000000C			SUB	FDBOUT+F.NRBD+2,R1
    292	000762					CALLR	OUT2		;OUTPUT THE MESSAGE AND RETURN
    293
    294
    295						.SBTTL	FORMAT STRINGS
    296	000000					.PSECT
    297
    298	000000					MSGZ	LO48,<	FAILED TO OPEN FILE FOR READ CHECK - ERROR CODE %D.>
VFYRCK M0105, VFY - READ CHECK 	MACRO M1108  06-DEC-77 00:15  PAGE 10-1
FORMAT STRINGS

    299	000000					MSG	LO49,<	ERROR STARTING AT VBN %O,%P, LBN %O,%P>
    300	000000					MSGZ	,< - ERROR CODE %D.>
    301	000000					MSG	LO51,<	         ERROR AT VBN %O,%P, LBN %O,%P>
    302	000000					MSGZ	,< - ERROR CODE %D.>
    303	000000					MSG1	LO70,<<12>^FILE ID %P,%P  %X  ^<0>>
    304						.EVEN
    305					;
    306					;
    307		000001 				.END
VFYRCK M0105, VFY - READ CHECK 	MACRO M1108  06-DEC-77 00:15  PAGE 10-2
SYMBOL TABLE

FA.SHR= ****** GX	GETBKP= ****** GX	LO49SZ= 000047   	OUT2  = ****** GX	STBLK = ****** GX
FDBOUT= ****** GX	HDRERR= ****** GX	LO51MG= 000156R     003	PAR$$$= 000027   	SZ    = 000022
FD.RWM= ****** GX	HDROK = ****** GX	LO51SZ= 000047   	RCHDOU  000612RG    002	S.FATT= ****** GX
FIXEOF= ****** GX	HH.FNU= ****** GX	LO70MG= 000247R     003	RCNXT   000410R     002	TRMOUT= ****** GX
FO.RD = ****** GX	HH.FSQ= ****** GX	LO70SZ= 000025   	RDBLK   000334RG    002	$CDDMG= ****** GX
F.EFBK= ****** GX	HH.MAP= ****** GX	MG    = 000225R     003	RDCHK = ****** GX	$EDMSG= ****** GX
F.ERR = ****** GX	HH.UAT= ****** GX	MOPRM = ****** GX	RDCKER  000432R     002	$SAVAL= ****** GX
F.FACC= ****** GX	HM.PNT= ****** GX	MVFNAM= ****** GX	RDFIL   000000RG    002	$$    = 000067
F.FFBY= ****** GX	IE.NOD= ****** GX	NXTFID= ****** GX	R$$DPB= 000001   	.CLOSE= ****** G
F.FNB = ****** GX	INDEX = ****** GX	N.DVNM= ****** GX	R$$DYM= 000001   	.DYBUF= ****** GX
F.HIBK= ****** GX	IO.RVB= ****** GX	N.FID = ****** GX	R$$EIS= 000000   	.OPEN = ****** G
F.NRBD= ****** GX	LO48MG= 000000R     003	N.UNIT= ****** GX	R$$MSG= 000000   	.RCBLK= ****** GX
F.RACC= ****** GX	LO48SZ= 000065   	OUTC  = ****** GX	R$$11M= 000001   	.XQIO = ****** GX
F.STBK= ****** GX	LO49MG= 000065R     003	OUTCTL= ****** GX

. ABS.	000000	   000
      	000000	   001
PURE$I	000766	   002
MSGSTR	000274	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  3984 WORDS  ( 16 PAGES)
DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:00:31
[65,10]VFYRCK,[65,20]VFYRCK/-SP=[43,30]PIPMAC,[65,30]VFYRCK
VFYMSG M0010, ERROR MESSAGES FO	MACRO M1108  06-DEC-77 00:16
TABLE OF CONTENTS

    7-   1	**** VFYMSG VERSION M0010 ****
VFYMSG M0010, ERROR MESSAGES FO	MACRO M1108  06-DEC-77 00:16  PAGE 7


      1						.TITLE	VFYMSG M0010, ERROR MESSAGES FOR VFY
						.SBTTL	**** VFYMSG VERSION M0010 ****
						.IDENT	/M0010/
      2					; ALTERED TUESDAY 26-NOV-74 14:45
      3					;
      4					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      5					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      6
      7					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      8					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
      9					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     10					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     11
     12					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     13					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     14					; EQUIPMENT CORPORATION.
     15
     16					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     17					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     18					;
     19					; PETER H. LIPMAN 18-SEP-73
     20					;
     21
     22						.IF	NDF,R$$MSG
     23						.IF	GT,R$$11M
     24						R$$MSG=0		;NO MESSAGE FILE FOR RSX11M
     25						.IFF
     26						R$$MSG=1		;MESSAGE FILE IS SEPARATE FOR 11D
     27						.ENDC
     28						.ENDC
     29					;
     30		000001 				MSGBL.=1		;FORCE GLOBAL DEFINITIONS
     31		000000 				MSGCT.=0		;INIT THE MESSAGE COUNT
     32
     33	000000					MSG	ER01,<ILLEGAL DEVICE>
     34	000000					MSG	ER02,<OPEN FAILURE ON BIT MAP>
     35	000000					MSG	ER03,<OPEN FAILURE ON TEMPORARY FILE>
     36	000000					MSG	ER04,<FAILED TO ALLOCATE SPACE FOR TEMP FILE>
     37	000000					MSG	ER06,<FAILED TO DETACH DEVICE>
     38	000000					MSG	ER07,<FAILED TO ATTACH DEVICE>
     39	000000					MSG	ER10,<COMMAND SYNTAX ERROR>
     40	000000					MSG	ER11,<I/O ERROR ON INPUT FILE>
     41	000000					MSG	ER12,<I/O ERROR ON OUTPUT FILE>
     42	000000					MSG	ER13,<ILLEGAL SWITCH>
     43	000000					MSG	ER14,<OPEN FAILURE ON LISTING FILE>
     44	000000					MSG	ER15,<OPEN FAILURE ON INDEX FILE>
     45	000000					MSG	ER17,<NO DYNAMIC MEMORY AVAILABLE - PARTITION TOO SMALL>
     46
     47					;
     48					; THE FOLLOWING MESSAGES ARE RESIDENT EVEN IF USING A MESSAGE FILE
     49					;
     50		000000 				T=R$$MSG
     51		000000 				R$$MSG=0
     52	000000					MSG1	DL01,<^TO COMPLETE THE STORAGE MAP UPDATE,^<15><12>>
     53	000000					MSG1	,<^DISMOUNT THE VOLUME IMMEDIATELY.  THEN^<15><12>>
     54		000115 				DL01SZ=DL01SZ+SZ
     55	000000					MSG	,<MOUNT IT AND DELETE THE FOLLOWING FILE:>
VFYMSG M0010, ERROR MESSAGES FO	MACRO M1108  06-DEC-77 00:16  PAGE 7-1
**** VFYMSG VERSION M0010 ****

     56		000164 				DL01SZ=DL01SZ+SZ
     57		000000 				R$$MSG=T
     58					;
     59					;
     60		000001 				.END
VFYMSG M0010, ERROR MESSAGES FO	MACRO M1108  06-DEC-77 00:16  PAGE 7-2
SYMBOL TABLE

DL01MG= 000517RG    002	ER04MG= 000103RG    002	ER11MG= 000253RG    002	ER15MG= 000404RG    002	R$$DPB= 000001
DL01SZ= 000164 G 	ER04SZ= 000046 G 	ER11SZ= 000027 G 	ER15SZ= 000032 G 	R$$DYM= 000001
ER01MG= 000000RG    002	ER06MG= 000151RG    002	ER12MG= 000302RG    002	ER17MG= 000436RG    002	R$$EIS= 000000
ER01SZ= 000016 G 	ER06SZ= 000027 G 	ER12SZ= 000030 G 	ER17SZ= 000061 G 	R$$MSG= 000000
ER02MG= 000016RG    002	ER07MG= 000200RG    002	ER13MG= 000332RG    002	MG    = 000634R     002	R$$11M= 000001
ER02SZ= 000027 G 	ER07SZ= 000027 G 	ER13SZ= 000016 G 	MSGBL.= 000001   	SZ    = 000047
ER03MG= 000045RG    002	ER10MG= 000227RG    002	ER14MG= 000350RG    002	MSGCT.= 000000   	T     = 000000
ER03SZ= 000036 G 	ER10SZ= 000024 G 	ER14SZ= 000034 G

. ABS.	000000	   000
      	000000	   001
MSGSTR	000703	   002
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  2785 WORDS  ( 11 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:20
[65,10]VFYMSG,[65,20]VFYMSG/-SP=[43,30]PIPMAC,[65,30]VFYMSG