Google
 

Trailing-Edge - PDP-10 Archives - BB-H311B-RM - rsx20f-swskit/listings/pix.lis
There are no other files named pix.lis in the archive.
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55
TABLE OF CONTENTS

    7-   1	**** PIP VERSION M1325 ****
    8-  45	ASSEMBLY PARAMETERS
    9-  97	READ/WRITE DATA AND WORKING STORAGE
   10- 201	READ ONLY TABLES
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55  PAGE 7


      1						.TITLE	PIP M1325, RSX FILE UTILITY
						.SBTTL	**** PIP VERSION M1325 ****
						.IDENT	/M1325/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  1 MAR 76  14:32
      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 4-JAN-73;
     21					;
     22					; MACROS
     23					;
     24					; INVOKE FCS MACROS
     25					;
     26	000000					FLDSOF			;DEFINE THE FILE DESCRIPTOR OFFSETS
     27						.MCALL	FDOFF$,CSI$,GCMLD$,FCSBT$
     28	000000					FDOFF$	DEF$L
     29	000000					CSI$			;DEFINE THE CSI BLOCK OFFSETS
     30	000000					GCMLD$			;DEFINE THE GET COMMAND LINE OFFSETS
     31	000000					FCSBT$	DEF$L
     32					;
     33						.MCALL	CSI$SV,CSI$SW,CSI$ND,GCMLB$
     34						.MCALL	FDAT$A,FDBDF$,FDOP$A,FDRC$A,FSRSZ$,NMBLK$
     35					;
     36					; DEFINE THE COMMAND BITS, THE FIRST ARGUMENT IS THE ROUTINE
     37					; ADDRESS TO JMP OFF TO.  THE SECOND IS THE BIT NAME
     38					; BITVAL IS ASSUMED SET UP TO THE FIRST BIT NUMBER TO BE USED.
     39						.MACRO	CMDBIT	ROUTIN,BITNAM
     40						.WORD	ROUTIN
     41						BITNAM==BITVAL
     42						BITVAL=BITVAL*2
     43						.ENDM	CMDBIT
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55  PAGE 8
ASSEMBLY PARAMETERS

     45						.SBTTL	ASSEMBLY PARAMETERS
     46					;
     47		000003 				INLUN==3		;LUN FOR INPUT FILE
     48		000004 				OUTLUN==4		;LUN FOR OUTPUT FILE
     49		000002 				CMOLUN==2		;LUN FOR COMMAND OUTPUT
     50		000001 				FNAEFN==1		;EVENT FLAG USED FOR FIND IN DIR LIST
     51		000002 				RATEFN==2		;EVENT FLAG USED FOR READ ATTRIBUTES (/LI)
     52		000003 				RWEFN==3		;EVENT FLAG FOR READ WRITE MODE COPY
     53		000011 				DFDRSZ==9.		;SIZE OF LARGEST DEFAULT DIR STRING
     54		000011 				TAB=='I-100		;TAB CHARACTER
     55		054523 				SYDEV=="SY		;SYSTEM DEVICE
     56		000000 				SYUNIT==0		;SYSTEM UNIT NO.
     57		000054 				S.WUIC==S.FNB+14.	;SIZE OF WILD UIC SCRATCH STORAGE
     58		001400 				NB.SDI==NB.SD1!NB.SD2	;WILD CARD DIRECTORY
     59		001470 				NB.SFL==NB.SVR!NB.STP!NB.SNM!NB.SDI ;* IN NAME, TYPE, VERS, DIR
     60		000070 				NB.SFN==NB.SNM!NB.STP!NB.SVR ;* IN NAME, TYPE, VER
     61
     62
     63					;
     64					; COPY CONTROL WORD BITS- LOCAL SWITCHES ON EACH FILE SPECIFIER
     65		000002 				UFDBIT==2		;SET TO CREATE UFD'S AS NEEDED
     66		000004 				CNTGBT==4		;SET TO FORCE CONTIGUOUS OUTPUT FILE
     67		000010 				MFDBIT==10		;OPERATE ON THE MFD
     68					; ***** THE FOLLOWING FOUR VALUES MUST REMAIN IN THEIR CURRENT ORDER
     69		000020 				WOPROB==20		;WORLD PROTECTION SPECIFIED
     70		000040 				GRPROB==40		;GROUP PROTECTION SPECIFIED
     71		000100 				OWPROB==100		;OWNER PROTECTION SPECIFED
     72		000200 				SYPROB==200		;SYSTEM PROTECTION SPECIFIED
     73					; ***** THE PRECEEDING FOUR VALUES MUST REMAIN IN THEIR CURRENT ORDER
     74					;
     75					; OTHER COPY CONTROL BITS OVERLAP PROTECTION BITS
     76					;
     77		000020 				BSZBIT==20		;BLOCK SIZE SPECIFIED FOR FILE
     78		000040 				RWDBIT==40		;REWIND BEFORE OPEN
     79		001000 				FIDBIT==1000		;FILE ID MANUALLY SPECIFIED
     80		002000 				BLKBIT==2000		;SIZE OF OUTPUT FILE SPECIFIED TO COPY
     81		004000 				NTCNTG==4000		;NOT CONTIGUOUS CONTROL BIT (COPY)
     82		010000 				NVERBT==10000		;SET IF NOT PRESERVING VERSION ON COPY
     83		020000 				SPSDBT==20000		;SET IF SUPERSEDE FILE ON COPY
     84		040000 				FOWNBT==40000		;SET TO FORCE FILE OWNER TO OUTPUT UIC
     85		100000 				FRSTIM==100000		;FIRST TIME THROUGH A GIVEN OPERATION
     86					;
     87		000060 				FILCL ==BSZBIT!RWDBIT	;FILE LOCAL SWITCHES THAT DO NOT DEFAULT
     88					;
     89					; DEFINITIONS OF OFFSETS USED IN  FILE HEADER
     90		001001 				HA.UI==2*400+1		;WRITE USER ATTRIBUTES
     91		001002 				HA.FP==2*400+2		;SET FILE PROTECTION ATTRIBUTE CODE
     92		000403 				HA.CHU==1*400+3		;SET FILE CHARACTERISTICS ATTRIBUTE CODE
     93									;FOR WRITING THE USER CHARACTERISTICS
     94		000012 				S.STBK==10.		;SIZE OF STATISTICS BLOCK IN BYTES
     95		004000 				ILCLSW==NTCNTG		;INIT LOCAL SWITCHES TO THIS
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55  PAGE 9
READ/WRITE DATA AND WORKING STORAGE

     97						.SBTTL	READ/WRITE DATA AND WORKING STORAGE
     98	000000					.PSECT
     99	000000					FSRSZ$	0		;FILE STORAGE REGION IS DYNAMICALLY SET UP
    100									;GET CMD LINE NOW CLOSES FILE EACH TIME
    101	000000					IMPURE
    102					;
    103					;
    104	000000				FDBOUT::FDBDF$			;ALLOCATE SPACE FOR THE OUTPUT FDB
    105	000140					FDOP$A	OUTLUN,OFNPT	;LUN, FNPT
    106
    107	000140				FDBIN::	FDBDF$
    108	000300					FDRC$A	FD.PLC		;PARTIAL LOCATE MODE
    109	000300					FDOP$A	INLUN,IFNPT	;LUN, FNPT
    110
    111	000300				DIFDB::	FDBDF$			;FDB FOR CREATING DIRECTORIES ONLY
    112	000440					FDOP$A	OUTLUN		;USE LUN OF OUTPUT FILE
    113	000440					FDAT$A	R.FIX,,16.	;16 BYTE FIXED LENGTH RECORDS
    114	000440					FDRC$A	FD.RWM		;READ/WRITE MODE TO AVOID I/O BUFFER
    115
    116	000440				STBLK::	.BLKB	S.STBK
    117	000452				IOSTBK::.BLKW	2		;I/O STATUS BLOCK FOR READ/WRITE MD COPY
    118	000456				FNASTS::.BLKW	2		;I/O STATUS BLOCK FOR FIND QI/O (/LI)
    119					;
    120					; ***** DO NOT SEPARATE THE FOLLOWING LINES
    121					;
    122	000462				CODEV::	.BLKW	1		;SAVED CMD OUTPUT DEVICE NAME
    123	000464				COUNIT::.BLKW	1		;CMD OUTPUT UNIT
    124	000466				LINBUF::.BLKB	144.		;LINE BUFFER USED BY DIR LIST
    125									;UP TO 2 TTY LINES LONG
    126		000220 				LINBFS==.-LINBUF
    127					;
    128					; ***** DO NOT SEPARATE THE PRECEEDING LINES
    129					;
    130
    131					; ***** DO NOT SEPARATE THE FOLLOWING LINES
    132	000706				IFNPT::	.BLKB	S.FIDS+S.APPD	;INPUT FILE AND DEVICE DESIGNATORS
    133		000722'				INSPEC==IFNPT+N.SPEC
    134	000732				IWUIC::	.BLKB	S.WUIC		;SCRATCH STORAGE FOR WILD UIC LOGIC
    135	001006				OFNPT::	.BLKB	S.FIDS+S.APPD	;OUTPUT FILE AND DEVICE DESIGNATORS
    136		001022'				OUSPEC==OFNPT+N.SPEC
    137	001032				OWUIC::	.BLKB	S.WUIC
    138					; ***** DO NOT SEPARATE THE PRECEEDING LINES
    139
    140	001106				SYDFLT::NMBLK$			;DEFAULT DEVICE = SYSTEM DEVICE
    141	001144				NAMBLK::NMBLK$			;SCRATCH NAME BLOCK
    142	001202				NMBLK1::NMBLK$
    143					;
    144	001240				GCMLCB::GCMLB$	4,PIP		;CONTROL BLOCK FOR GET COMMAND LINE
    145									;UP TO 4 LEVELS OF INDIRECTION
    146	001726				CSIBLK::.BLKB	C.SIZE		;CONTROL BLK FOR CMD STRING INTERPRETER
    147					;
    148					; OTHER SCRATCH LOCATIONS
    149	002002				CMDWRD::.BLKW	2		;COMMAND BITS ARE HERE
    150	002006				CPYCTL::.BLKW	1		;CONTROLLING BITS ARE HERE
    151	002010				SAVSP::	.BLKW	1		;SAVE THE STACK POINTER
    152	002012				VERSAV::.BLKW	1		;SAVE VERSION NUMBER FROM PARSE
    153	002014				INRACC::.BLKW	1		;F.RACC FOR THE INPUT FDB
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55  PAGE 9-1
READ/WRITE DATA AND WORKING STORAGE

    154	002016				OURACC::.BLKW	1		;F.RACC FOR THE OUTPUT FDB
    155	002020				DEFDIR::.BLKB	DFDRSZ		;DEFAULT DIRECTORY STRING STORED HERE
    156						.EVEN
    157					;
    158					; ***** DO NOT SEPARATE OR REORDER THE FOLLOWING
    159	002032				WORPRO::.BLKB	4
    160	002036				GROPRO::.BLKB	4
    161	002042				OWNPRO::.BLKB	4
    162	002046				SYSPRO::.BLKB	4
    163	002052	177777 			PROWRD::.WORD	-1
    164					; ***** DO NOT SEPARATE OR REORDER THE PRECEEDING LINES
    165					;
    166	002054	000000 			SPLCNT::.WORD	0		;NO. OF COPIES TO SPOOL
    167	002056	000000 			BUFSIZ::.WORD	0		;SIZE OF BLOCK BUFFER
    168	002060	000000 			OBFSIZ::.WORD	0		; SIZE OF OUTPUT BUFFER
    169	002062	000001 			PURGCT::.WORD	1		;NO. OF VERSIONS TO PRESERVE
    170	002064	000120 			LPTLEN::.WORD	80.		;DEFAULT DIRECTORY LISTING WIDTH
    171	002066				BLKCNT::.BLKW	1		;NO. OF BLOCKS TO ALLOCATE TO OUT FILE
    172	002070				.LCLSW::.BLKW	1		;INITIAL VALUE FOR LOCAL SWITCHES
    173	002072				.OULCL::.BLKW	1		;LOCAL SWITCHES ON 1ST OUTPUT SPEC
    174	002074	054523 			.DEFDV::.WORD	SYDEV		;DEFAULT DEVICE
    175	002076	000000 			.DEFUN::.WORD	SYUNIT		;DEFAULT UNIT
    176	002100				.EXTSZ::.BLKW	1		;SIZE OF INPUT FILE (+ CONTIG, - = NOT)
    177	002102				.FOWNR::.BLKW	1		;UIC FOR THE FILE OWNER IF /FO SWITCH
    178	002104	000000 	000000 		.DYBLK::.LIMIT			;BLOCKS OF DYNAMIC MEMORY AVAILABLE
    179		002106'				.TOPAD==.DYBLK+2	;ADDRESS OF DYNAMIC MEMORY BUFFER(S)
    180	002110				.DYSIZ::.BLKW	1		;SIZE IN BYTES OF DYNAMIC MEMORY REGION
    181	002112				.DYBUF::.BLKW	1		;ADDRESS OF DYNAMIC BUFFER IN USE
    182	002114				.DYBYT::.BLKW	1		;SIZE IN BYTES OF DYNAMIC BUFFER IN USE
    183					;
    184					; READ ATTRIBUTE CONTROL BLOCK
    185					;
    186						.IF	GT,R$$DPB	;IF NEW DPB FORMATS
    187	002116	   367 	   012 		RATCTL::.BYTE	-9.,S.STBK	;READ ATTRIBUTES - STATISTICS BLOCK
    188	002120	000440'				.WORD	STBLK
    189	002122	   366 	   000 			.BYTE	-10.,0		;FILE HEADER
    190	002124	000000 			.HDRAD::.WORD	0
    191	002126	000000 				.WORD	0		;END OF ATTRIBUTE LIST
    192						.ENDC
    193
    194						.IF	EQ,R$$DYM	;IF NO DYNAMIC MEMORY FACILITY
    195						.PSECT	$$DYB1,D
    196					DYB1::
    197						.PSECT	$$DYB2,D
    198					DYB2::
    199						.ENDC
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55  PAGE 10
READ ONLY TABLES

    201						.SBTTL	READ ONLY TABLES
    202	002130					PURE.D
    203					;
    204					; READ ONLY TABLES AND CONTROL BLOCKS
    205					; COMMAND TABLE - FORMAT COMMAND,BIT
    206		000001 				BITVAL=1
    207	000036				CMDTBL::
    208	000036					CMDBIT	DIRLST,LSTBIT	;ON IF LISTING DIRECTORY
    209	000040					CMDBIT	DIRLST,SHTLST	;ON IF LISTING DIRECTORY BRIEF MODE
    210	000042					CMDBIT	DIRLST,EVRYBT	;ON IF LISTING DIRECTORY FULL MODE
    211	000044					CMDBIT	DIRLST,TOTLBT	;ON IF LISTING DIRECTORY TOTAL BLOCKS ONLY
    212	000046					CMDBIT	DELETE,DELBIT	;ON IF DELETING THE OUTPUT FILE(S)
    213	000050					CMDBIT	DELETE,PURGBT	;ON IF PURGING FILES
    214	000052					CMDBIT	REMOVE,RMVBIT	;REMOVE A DIRECTORY ENTRY
    215	000054					CMDBIT	PIPID,IDBIT	;TYPE THE PIP IDENTIFIER
    216	000056					CMDBIT	.SETDF,DFLTBT	;CHANGE DEFAULT DEVICE OR UIC
    217	000060					CMDBIT	UNLOCK,UNLKBT	;UNLOCK A LOCKED FILE
    218	000062					CMDBIT	PROTCT,PROTBT	;SET FILE  PROTECTION
    219					;
    220					; TABLE FOR COMMAND BITS IN SECOND WORD
    221					;
    222		000001 				BITVAL=1
    223	000064				CMDTB2::
    224	000064					CMDBIT	SPOOL,SPLBIT	;SPOOL FOR PRINTING AND DELETE
    225	000066					CMDBIT	RENAME,RNMBIT	;RENAME INPUT FILE TO OUTPUT NAME
    226	000070					CMDBIT	ENTER,ENTRBT	;ENTER A DIRECTORY ENTRY
    227	000072					CMDBIT	COPY,MERGBT	;MERGE COMMAND
    228	000074					CMDBIT	COPY,APPDBT	;APPEND FILES
    229	000076					CMDBIT	COPY,UPDTBT	;UPDATE (REWRITE) FILE
    230	000100					CMDBIT	.FREE,FREEBT	;PRINT FREE SPACE ON VOLUME
    231	000102					CMDBIT	TRUNC,TRNBIT	;TRUNCATE FILE TO EOF
    232					;
    233					; COMMAND STRING INTERPRETER SWITCH TABLE
    234	000104				CSISWT::CSI$SW	DI,LSTBIT,CMDWRD,SET,,0 ;DIRECTORY LISTING SWITCH
    235	000114					CSI$SW	LI,LSTBIT,CMDWRD,SET,,0 ;SYNONYM FOR DIR LISTING CMD
    236	000124					CSI$SW	BR,SHTLST,CMDWRD,SET,,0 ;SHORT FORM DIRECTORY LISTING
    237	000134					CSI$SW	FU,EVRYBT,CMDWRD,SET,,FULVAL ;FULL DIRECTORY LISTING
    238	000144					CSI$SW	TB,TOTLBT,CMDWRD,SET,,0 ;LIST DIRECTORY TOTALS ONLY
    239	000154					CSI$SW	DE,DELBIT,CMDWRD,SET,,0 ;DELETE SWITCH
    240	000164					CSI$SW	PU,PURGBT,CMDWRD,SET,,PURGVL ;PURGE ALL BUT NEWEST VERSION
    241	000174					CSI$SW	RM,RMVBIT,CMDWRD,SET,,0 ;REMOVE A DIRECTORY ENTRY
    242	000204					CSI$SW	ID,IDBIT,CMDWRD,SET,,0 ;ID SWITCH - TYPE PIP'S IDENT
    243	000214					CSI$SW	DF,DFLTBT,CMDWRD,SET,,0 ;SET DEFAULT DEVICE OR UIC
    244	000224					CSI$SW	UI,DFLTBT,CMDWRD,SET,,0 ;SET DEFAULT UIC
    245	000234					CSI$SW	UN,UNLKBT,CMDWRD,SET,,0 ;UNLOCK A LOCKED FILE
    246	000244					CSI$SW	PR,PROTBT,CMDWRD,SET,,PRVAL ;SET FILE PROTECTION
    247	000254					CSI$SW	SP,SPLBIT,CMDWRD+2,SET,,SPVAL ;SPOOL THE FILES FOR PRINTING
    248	000264					CSI$SW	RE,RNMBIT,CMDWRD+2,SET,,0 ;RENAME SWITCH
    249	000274					CSI$SW	EN,ENTRBT,CMDWRD+2,SET,,0 ;ENTER A DIRECTORY ENTRY
    250	000304					CSI$SW	ME,MERGBT,CMDWRD+2,SET,,0 ;MERGE INPUT FILES
    251	000314					CSI$SW	AP,APPDBT,CMDWRD+2,SET,,0 ;APPEND COMMAND
    252	000324					CSI$SW	UP,UPDTBT,CMDWRD+2,SET,,0 ;UPDATE (REWRITE) CMD
    253	000334					CSI$SW	FR,FREEBT,CMDWRD+2,SET,,0 ;FREE SPACE ON VOLUME
    254	000344					CSI$SW	TR,TRNBIT,CMDWRD+2,SET,,0 ;TRUNCATE FILE TO EOF
    255					;
    256					; CPYCTL SWITCHES, MODIFY COMMANDS, LOCAL TO THE SPECIFIER
    257	000354					CSI$SW	UF,UFDBIT,CPYCTL,SET,,0 ;CREATE UFD'S AS NEEDED
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55  PAGE 10-1
READ ONLY TABLES

    258	000364					CSI$SW	CO,CNTGBT!NTCNTG,CPYCTL,SET,NEG,0 ;FORCE CONTIGUOUS COPY
    259	000374					CSI$SW	MF,MFDBIT,CPYCTL,SET,,0 ;LIST THE MFD FOR SPECIFIED DEVICE
    260	000404					CSI$SW	WO,WOPROB,CPYCTL,SET,,WOVAL ;WORLD PROTECTION
    261	000414					CSI$SW	GR,GRPROB,CPYCTL,SET,,GRVAL ;GROUP PROTECTION
    262	000424					CSI$SW	OW,OWPROB,CPYCTL,SET,,OWVAL ;OWNER PROTECTION
    263	000434					CSI$SW	SY,SYPROB,CPYCTL,SET,,SYVAL ;SYSTEM PROTECTION
    264	000444					CSI$SW	BS,BSZBIT,CPYCTL,SET,,BSVAL ;BLOCK SIE SPECIFIED
    265	000454					CSI$SW	RW,RWDBIT,CPYCTL,SET,,0 ;REWIND BEFORE OPEN
    266	000464					CSI$SW	FI,FIDBIT,CPYCTL,SET,,FIDVAL ;FILE ID SPECIFIED
    267	000474					CSI$SW	BL,BLKBIT,CPYCTL,SET,,BLKVAL ;NO OF BLOCKS TO ALLOCATE
    268	000504					CSI$SW	NV,NVERBT,CPYCTL,SET,,0 ;COPY TO NEW VERSION
    269	000514					CSI$SW	SU,SPSDBT,CPYCTL,SET,,0 ;SUPERSEDE EXISTING FILES ON COPY
    270	000524					CSI$SW	FO,FOWNBT,CPYCTL,SET,,0 ;FORCE FILE OWNER TO OUTPUT UIC
    271	000534					CSI$ND			;END OF SWITCHES
    272					; VALUE TABLES FOR PROTECTION CODES
    273	000536				WOVAL::	CSI$SV	ASCII,WORPRO,4
    274	000542					CSI$ND
    275	000544				GRVAL::	CSI$SV	ASCII,GROPRO,4
    276	000550					CSI$ND
    277	000552				OWVAL::	CSI$SV	ASCII,OWNPRO,4
    278	000556					CSI$ND
    279	000560				SYVAL::	CSI$SV	ASCII,SYSPRO,4
    280	000564					CSI$ND
    281	000566				PRVAL::	CSI$SV	NUMERIC,PROWRD,2
    282	000572					CSI$ND
    283					;
    284					; VALUE TABLE FOR PURGE SWITCH, NO OF VERSIONS TO PRESERVE
    285	000574				PURGVL::CSI$SV	NUMERIC,PURGCT,2
    286	000600					CSI$ND
    287					;
    288					; VALUE TABLE FOR SPOOL SWITCH - NUMBER OF COPIES
    289	000602				SPVAL::	CSI$SV	NUMERIC,SPLCNT,2
    290	000606					CSI$ND
    291					;
    292					; VALUE TABLE FOR BLOCK SIZE SWITCH
    293	000610				BSVAL:	CSI$SV	NUMERIC,BUFSIZ,2
    294	000614					CSI$ND
    295					;
    296					; VALUE TABLE FOR FILE ID SWITCH
    297	000616				FIDVAL::CSI$SV	NUMERIC,FILID,2
    298	000622					CSI$SV	NUMERIC,FILID+2,2
    299	000626					CSI$SV	NUMERIC,FILID+4,2
    300	000632					CSI$ND
    301					;
    302					; VALUE TABLE FOR /FULL DIRECTORY LISTING SWITCH (OUTPUT WIDTH)
    303	000634				FULVAL::CSI$SV	NUMERIC,LPTLEN,2
    304	000640					CSI$ND
    305					;
    306					; VALUE TABLE FOR /BLOCK SWITCH TO COPY (SPECIFY OUTPUT FILE SIZE)
    307	000642				BLKVAL::CSI$SV	NUMERIC,BLKCNT,2
    308	000646					CSI$ND
    309
    310	000650	000000 			SSTTAB::.WORD	0		;ODD ADDRESS TRAP
    311	000652	000000 				.WORD	0		;MEMORY PROTECTION VIOLATION
    312	000654	000000 				.WORD	0		;T BIT OR BPT INSTRUCTION
    313	000656	000000 				.WORD	0		;IOT INSTRUCTION
    314	000660	000000 				.WORD	0		;RESERVED INSTRUCTION
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55  PAGE 10-2
READ ONLY TABLES

    315	000662	000000 				.WORD	0		;NON RSX EMT
    316	000664	000000G				.WORD	.ERTRP		;TRAP INSTRUCTION
    317
    318		000007 				SSTENT=<.-SSTTAB>/2	;NO. OF SST ENTRIES IN TABLE
    319
    320	000666	000000G			.ABORT::.WORD	.RSTAR		;ERRPX AND ERROUX RETURN BY JMP @ .ABORT
    321
    322	000670					PURE.I
    323	000000	000167 	000000G		START::	JMP	.INIT
    324	000004				CLOSX::
    325	000004	000167 	000000G		AGAIN::	JMP	.RSTAR
    326					;
    327					;
    328		000000'				.END	START
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55  PAGE 10-3
SYMBOL TABLE

AGAIN   000004RG    006	FA.WRT= 000002   	F.HIBK= 000004   	MFDBIT= 000010 G 	RWDBIT= 000040 G
APPDBT= 000020 G 	FDBIN   000140RG    005	F.LUN = 000042   	MOIDMG= 000021RG    002	RWEFN = 000003 G
BITVAL= 000400   	FDBOUT  000000RG    005	F.MBCT= 000054   	MOIDSZ= 000007 G 	R$$DPB= 000001
BLKBIT= 002000 G 	FD.BLK= 000010   	F.MBC1= 000055   	NAMBLK  001144RG    005	R$$DYM= 000001
BLKCNT  002066RG    005	FD.CCL= 000002   	F.MBFG= 000056   	NB.DEV= 000200   	R$$EIS= 000000
BLKVAL  000642RG    003	FD.CR = 000002   	F.NRBD= 000024   	NB.DIR= 000100   	R$$MSG= 000000
BSVAL   000610R     003	FD.DIR= 000010   	F.NREC= 000030   	NB.NAM= 000004   	R$$11M= 000001
BSZBIT= 000020 G 	FD.FTN= 000001   	F.OVBS= 000030   	NB.SDI= 001400 G 	R.FIX = 000001
BUFSIZ  002056RG    005	FD.INS= 000010   	F.RACC= 000016   	NB.SD1= 000400   	R.VAR = 000002
CLOSX   000004RG    006	FD.PLC= 000004   	F.RATT= 000001   	NB.SD2= 001000   	SAVSP   002010RG    005
CMDTBL  000036RG    003	FD.RAH= 000001   	F.RCNM= 000034   	NB.SFL= 001470 G 	SHTLST= 000002 G
CMDTB2  000064RG    003	FD.RAN= 000002   	F.RCTL= 000017   	NB.SFN= 000070 G 	SPLBIT= 000001 G
CMDWRD  002002RG    005	FD.REC= 000001   	F.RSIZ= 000002   	NB.SNM= 000040   	SPLCNT  002054RG    005
CMOLUN= 000002 G 	FD.RWM= 000001   	F.RTYP= 000000   	NB.STP= 000020   	SPOOL = ****** GX
CNTGBT= 000004 G 	FD.SDI= 000020   	F.STBK= 000036   	NB.SVR= 000010   	SPSDBT= 020000 G
CODEV   000462RG    005	FD.SQD= 000040   	F.UNIT= 000136   	NB.TYP= 000002   	SPVAL   000602RG    003
COPY  = ****** GX	FD.TTY= 000004   	F.URBD= 000020   	NB.VER= 000001   	SSTENT= 000007
COUNIT  000464RG    005	FD.WBH= 000002   	F.VBN = 000064   	NMBLK1  001202RG    005	SSTTAB  000650RG    003
CPYCTL  002006RG    005	FIDBIT= 001000 G 	F.VBSZ= 000060   	NTCNTG= 004000 G 	START   000000RG    006
CSIBLK  001726RG    005	FIDVAL  000616RG    003	GCMLCB  001240RG    005	NVERBT= 010000 G 	STBLK   000440RG    005
CSISWT  000104RG    003	FILCL = 000060 G 	GE.BIF= 177775   	N.DEVD= 000000   	SYDEV = 054523 G
CS.DIF= 000002   	FILID = ****** GX	GE.CLO= 000004   	N.DID = 000024   	SYDFLT  001106RG    005
CS.DVF= 000004   	FNAEFN= 000001 G 	GE.COM= 000001   	N.DIRD= 000004   	SYPROB= 000200 G
CS.EQU= 000040   	FNASTS  000456RG    005	GE.EOF= 177766   	N.DVNM= 000032   	SYSPRO  002046RG    005
CS.INP= 000001   	FOWNBT= 040000 G 	GE.IND= 000002   	N.FID = 000000   	SYUNIT= 000000 G
CS.MOR= 000020   	FO.APD= 000106   	GE.IOR= 177777   	N.FLID= 000016   	SYVAL   000560RG    003
CS.NMF= 000001   	FO.MFY= 000002   	GE.LC = 000010   	N.FNAM= 000006   	S.APPD= 000010
CS.OUT= 000002   	FO.RD = 000001   	GE.MDE= 177774   	N.FNMD= 000010   	S.BFHD= 000020
CS.WLD= 000010   	FO.UPD= 000006   	GE.OPR= 177776   	N.FTYP= 000014   	S.FATT= 000016
C.CMLD= 000002   	FO.WRT= 000016   	GROPRO  002036RG    005	N.FVER= 000016   	S.FDB = 000140
C.DEVD= 000006   	FREEBT= 000100 G 	GRPROB= 000040 G 	N.NEXT= 000022   	S.FIDS= 000014
C.DIRD= 000012   	FRSTIM= 100000 G 	GRVAL   000544RG    003	N.SPEC= 000014   	S.FNAM= 000006
C.DSDS= 000006   	FULVAL  000634RG    003	G.CMLD= 000146   	N.STAT= 000020   	S.FNB = 000036
C.FILD= 000016   	F.ALOC= 000040   	G.DPRM= 000160   	N.UNIT= 000034   	S.FNBW= 000017
C.MKW1= 000024   	F.BBFS= 000062   	G.ERR = 000140   	OBFSIZ  002060RG    005	S.FNTY= 000004
C.MKW2= 000026   	F.BDB = 000070   	G.ISIZ= 000020   	OFNPT   001006RG    005	S.FTYP= 000002
C.SIZE= 000054   	F.BGBC= 000057   	G.LPDL= 000120   	OURACC  002016RG    005	S.NFEN= 000020
C.STAT= 000001   	F.BKDN= 000026   	G.MODE= 000141   	OUSPEC= 001022RG    005	S.STBK= 000012 G
C.SWAD= 000022   	F.BKDS= 000020   	G.PSDS= 000142   	OUTLUN= 000004 G 	S.WUIC= 000054 G
C.TYPR= 000000   	F.BKEF= 000050   	HA.CHU= 000403 G 	OWNPRO  002042RG    005	TAB   = 000011 G
DEFDIR  002020RG    005	F.BKP1= 000051   	HA.FP = 001002 G 	OWPROB= 000100 G 	TOTLBT= 000010 G
DELBIT= 000020 G 	F.BKST= 000024   	HA.UI = 001001 G 	OWUIC   001032RG    005	TRNBIT= 000200 G
DELETE= ****** GX	F.BKVB= 000064   	IDBIT = 000200 G 	OWVAL   000552RG    003	TRUNC = ****** GX
DFDRSZ= 000011 G 	F.CNTG= 000034   	IDNTMG= 000000RG    002	PIPID = ****** GX	UFDBIT= 000002 G
DFLTBT= 000400 G 	F.DFNB= 000046   	IDNTSZ= 000021 G 	PROTBT= 002000 G 	UNLKBT= 001000 G
DIFDB   000300RG    005	F.DSPT= 000044   	IFNPT   000706RG    005	PROTCT= ****** GX	UNLOCK= ****** GX
DIRLST= ****** GX	F.DVNM= 000134   	ILCLSW= 004000 G 	PROWRD  002052RG    005	UPDTBT= 000040 G
ENTER = ****** GX	F.EFBK= 000010   	INLUN = 000003 G 	PRVAL   000566RG    003	VERSAV  002012RG    005
ENTRBT= 000004 G 	F.EFN = 000050   	INRACC  002014RG    005	PURGBT= 000040 G 	WOPROB= 000020 G
EVRYBT= 000004 G 	F.EOBB= 000032   	INSPEC= 000722RG    005	PURGCT  002062RG    005	WORPRO  002032RG    005
FA.APD= 000100   	F.ERR = 000052   	IOSTBK  000452RG    005	PURGVL  000574RG    003	WOVAL   000536RG    003
FA.CRE= 000010   	F.FACC= 000043   	IWUIC   000732RG    005	RATCTL  002116RG    005	$$    = 000000
FA.EXT= 000004   	F.FFBY= 000014   	LINBFS= 000220 G 	RATEFN= 000002 G 	$$$   = 001420R     005
FA.NSP= 000100   	F.FNAM= 000110   	LINBUF  000466RG    005	REMOVE= ****** GX	.ABORT  000666RG    003
FA.RD = 000001   	F.FNB = 000102   	LPTLEN  002064RG    005	RENAME= ****** GX	.DEFDV  002074RG    005
FA.SHR= 000040   	F.FTYP= 000116   	LSTBIT= 000001 G 	RMVBIT= 000100 G 	.DEFUN  002076RG    005
FA.TMP= 000020   	F.FVER= 000120   	MERGBT= 000010 G 	RNMBIT= 000002 G 	.DYBLK  002104RG    005
PIP M1325, RSX FILE UTILITY	MACRO M1108  05-DEC-77 23:55  PAGE 10-4
SYMBOL TABLE

.DYBUF  002112RG    005	.FOWNR  002102RG    005	.INIT = ****** GX	.RSTAR= ****** GX	...PC1= 001240R     005
.DYBYT  002114RG    005	.FREE = ****** GX	.LCLSW  002070RG    005	.SETDF= ****** GX	...PC2= 001442R     005
.DYSIZ  002110RG    005	.FSRCB= ****** G 	.MSGFN  000000RG    003	.TOPAD= 002106RG    005	...PC3= 001240R     005
.ERTRP= ****** GX	.HDRAD  002124RG    005	.OULCL  002072RG    005	...GBL= 000000   	...TPC= 000020
.EXTSZ  002100RG    005

. ABS.	000000	   000
      	000000	   001
MSGSTR	000030	   002
PURE$D	000670	   003
$$FSR1	000000	   004
IMPURE	002130	   005
PURE$I	000010	   006
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  6160 WORDS  ( 25 PAGES)
DYNAMIC MEMORY:  7328 WORDS  ( 28 PAGES)
ELAPSED TIME:  00:01:16
[63,10]PIP,[63,20]PIP/-SP=[63,30]PIPMAC,PIP
PIPDSP M0216, PIP COMMAND RECEI	MACRO M1108  05-DEC-77 23:56
TABLE OF CONTENTS

    7-   1	**** PIPDSP VERSION M0216 ****
    8-  34	COMMAND RECEIVER AND DISPATCHER
PIPDSP M0216, PIP COMMAND RECEI	MACRO M1108  05-DEC-77 23:56  PAGE 7


      1						.TITLE	PIPDSP M0216, PIP COMMAND RECEIVER & DISPATCHER
						.SBTTL	**** PIPDSP VERSION M0216 ****
						.IDENT	/M0216/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  28 JAN 75  22:20
      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 30-JAN-74;
     21					;
     22					; MACROS
     23					;
     24					; INVOKE FCS MACROS
     25					;
     26	000000					FLDSOF			;DEFINE THE FILE DESCRIPTOR OFFSETS
     27						.MCALL	CSI$
     28	000000					CSI$
     29						.MCALL	GCMLD$
     30	000000					GCMLD$
     31						.MCALL	CALL,RETURN,FINIT$,GLUN$S,EXIT$S,CSI$1,CSI$2,SVTK$S
     32						.MCALL	GTSK$S,GPRT$S
PIPDSP M0216, PIP COMMAND RECEI	MACRO M1108  05-DEC-77 23:56  PAGE 8
COMMAND RECEIVER AND DISPATCHER

     34						.SBTTL	COMMAND RECEIVER AND DISPATCHER
     35	000000					PURE.I
     36					;
     37					; INITIAL STARTING POINT
     38
     39						.ENABL	LSB
     40
     41	000000	010667 	000000G		.INIT::	MOV	SP,SAVSP
     42	000004	112767 	000000C	000000C		MOVB	#FD.TTY!FD.REC!FD.CCL,GCMLCB+F.RCTL ;MAKE MCR LEVEL LIKE TTY
     43	000012	152767 	000004 	000141G		BISB	#GE.CLO,GCMLCB+G.MODE ;FORCE GCML TO CLOSE CMD FILE EACH TIME
     44	000020					FINIT$
     45	000024					GLUN$S	#CMOLUN,#CODEV	;GET DEVICE AND UNIT OF COMMAND OUTPUT LUN
     46	000042	105067 	000001G			CLRB	COUNIT+1	;ZERO FLAGS BYTE IN UNIT WORD
     47
     48						.IF	GT,R$$DYM
     49	000046					GPRT$S	,#LINBUF	;GET PARTITION PARAMETERS
     50	000064	013700 	000000G			MOV	@#$DSW,R0	;GET BASE ADDRESS OF THE TASK
     51	000070					GTSK$S	#LINBUF		;GET TASK PARAMETERS
     52	000102	066700 	000032G			ADD	LINBUF+G.TSTS,R0 ;TOP OF AVAILABLE SPACE
     53
     54						.IFF
     55						MOV	#DYB1,.TOPAD
     56						MOV	#DYB2,R0
     57						.ENDC
     58
     59	000106	166700 	000000G			SUB	.TOPAD,R0	;NO. OF BYTES AVAILABLE FOR DYNAMIC MEM
     60	000112	042700 	000003 			BIC	#3,R0		;MULTIPLE OF 4 BYTES IN FILE STORAGE REGION
     61	000116	010067 	000000G			MOV	R0,.DYSIZ	;NO. OF BYTES OF DYNAMIC MEMORY
     62	000122	012767 	000001 	000000G		MOV	#1,.MBFCT	;ASSUME SINGLE BUFFERING
     63	000130	020027 	000000C			CMP	R0,#<4*<1000+S.BFHD>+1000> ;ENOUGH FOR DOUBLE BUFFERING?
     64	000134	103402 				BLO	10$		;BRANCH IF NOT
     65	000136	005267 	000000G			INC	.MBFCT		;YES, DEFAULT TO DOUBLE BUFFERING
     66	000142	016767 	000000G	000000G	10$:	MOV	.TOPAD,.DYBUF	;FAKE AN ALLOCATED BUFFER
     67	000150	010067 	000000G			MOV	R0,.DYBYT	;SO THAT .DYREL WILL RETURN IT TO FSR
     68	000154	042700 	000777 			BIC	#777,R0
     69	000160	000300 				SWAB	R0
     70	000162	006200 				ASR	R0		;NO. OF BLOCKS AVAILABLE
     71	000164	010067 	000000G			MOV	R0,.DYBLK	;STORE THE BLOCK COUNT
     72	000170	001006 				BNE	.RSTAR
     73	000172					ERROUT	DY01		;NOT ENOUGH DYNAMIC MEMORY
	000172	104402 				TRAP	X
	000174	000000G				.WORD	DY01SZ
	000176	000000G				.WORD	DY01MG
     74	000200				EXIT:	EXIT$S
     75					;
     76					; RESTART HERE FOR SUBSEQUENT COMMANDS
     77					;
     78	000206				.RSTAR::
     79	000206	016706 	000000G			MOV	SAVSP,SP
     80	000212					CALL	CLOSE		;CLOSE ANY FILES LEFT OPEN
     81	000216					CALL	.DYREL		;RELEASE ANY BUFFER IN USE TO FSR
     82	000222					CALL	TDRDEL
     83	000226	005067 	000000G			CLR	CMDWRD		;INIT FLAGS WORD
     84	000232	005067 	000002G			CLR	CMDWRD+2
     85	000236	012767 	177777 	000000G		MOV	#-1,PROWRD	;NO PROTECTION VALUE SPECIFIED
     86	000244					CALL	GETCML		;GET THE NEXT COMMAND LINE
     87	000250	103753 				BCS	EXIT
PIPDSP M0216, PIP COMMAND RECEI	MACRO M1108  05-DEC-77 23:56  PAGE 8-1
COMMAND RECEIVER AND DISPATCHER

     88	000252					CSI$1	#CSIBLK,GCMLCB+G.CMLD+2,GCMLCB+G.CMLD ;CHECK CMD SYNTAX
     89	000276	016067 	000002 	000146G		MOV	C.CMLD(R0),GCMLCB+G.CMLD ;FIX STRING SIZE (COMPRESSED)
     90	000304	103552 				BCS	SERR2		;BRANCH IF SYNTAX ERROR
     91
     92					; LOOK AT ALL THE SPECIFIERS TO GET THE GLOBAL FLAG
     93	000306	012700 	000000G			MOV	#CSIBLK,R0
     94	000312				20$:	CSI$2	R0,OUTPUT,#CSISWT
     95	000330	103462 				BCS	40$
     96	000332	132760 	000020 	000001 		BITB	#CS.MOR,C.STAT(R0)
     97	000340	001364 				BNE	20$
     98	000342				30$:	CSI$2	R0,INPUT,#CSISWT
     99	000360	103526 				BCS	SERR3
    100	000362	132760 	000020 	000001 		BITB	#CS.MOR,C.STAT(R0)
    101	000370	001364 				BNE	30$
    102					;
    103					; NOW RESET CSI
    104	000372					CSI$1	R0,GCMLCB+G.CMLD+2,GCMLCB+G.CMLD
    105	000412	103507 				BCS	SERR2
    106	000414	012767 	000000G	000000G		MOV	#ILCLSW,CPYCTL	;INIT THE LOCAL FLAGS REGISTER
    107	000422	012767 	000000G	000000G		MOV	#ILCLSW,.LCLSW	;INITIAL VALUE FOR LOCAL SWITHCES
    108					;
    109					; INIT ALL THE LOCAL SWITCHES SINCE CSI$2 SCAN SET THEM TO
    110					; LAST VALUES ON LAST LOCAL SWITCH IN THE LIST
    111	000430					CALL	INIPRO		;INIT THE PROTECTION SUBSWITCHES
    112	000434	012767 	000001 	000000G		MOV	#1,PURGCT	;INIT THE COUNT OF FILES TO BE PRESERVED
    113	000442	005067 	000000G			CLR	BLKCNT		;INIT BLOCK COUNT (OUTPUT FILE SIZE)
    114					;
    115					; SET UP THE OUTPUT SPEC AND THE 1ST INPUT SPEC
    116	000446	012701 	000000G			MOV	#OFNPT,R1
    117	000452					CALL	OUTCSI		;GET THE FIRST OUTPUT SPEC
    118	000456	103467 				BCS	SERR3		;BRANCH IF ERROR
    119	000460	016767 	000000G	000000G		MOV	CPYCTL,.OULCL	;SAVE LOCAL SWITCHES FROM 1ST OUT SPEC
    120	000466	012701 	000000G			MOV	#IFNPT,R1
    121	000472					CALL	INCSI		;GET THE FIRST INPUT SPEC
    122	000476	103457 			40$:	BCS	SERR3
    123	000500	032767 	000000C	000000G		BIT	#SHTLST!EVRYBT!TOTLBT,CMDWRD ; CHECK FOR LISTING OPTIONS
    124	000506	001403 				BEQ	50$		; BRANCH IF NONE
    125	000510	042767 	000000G	000000G		BIC	#LSTBIT,CMDWRD	; OVERRIDE /LI
    126	000516	016702 	000000G		50$:	MOV	CMDWRD,R2
    127	000522	001022 				BNE	DISPAT
    128	000524	016702 	000002G			MOV	CMDWRD+2,R2	; NOTHING IN FIRST WORD, TRY THE SECOND
    129	000530	001027 				BNE	DISPT2
    130					;
    131					; ALLOW SUBSWITCHES TO SPECIFY COMMAND SWITCH IF NONE SPECIFIED
    132	000532	016703 	000000G			MOV	CPYCTL,R3
    133	000536	032703 	000000G			BIT	#NTCNTG,R3	;/-CO SWITCH SPECIFIED?
    134	000542	001420 				BEQ	60$		;IF ZERO THEN YES, COPY COMMAND
    135	000544	032703 	000000C			BIT	#WOPROB!GRPROB!OWPROB!SYPROB,R3
    136	000550	001415 				BEQ	60$		;COPY IF NO OTHER IMPLIED COMMAND
    137	000552	012702 	000000G			MOV	#PROTBT,R2	;ASSUME /PROTECTION
    138	000556	042703 	000000C			BIC	#WOPROB!GRPROB!OWPROB!SYPROB!FIDBIT!NTCNTG,R3
    139	000562	001030 				BNE	SERR4		; CHECK FOR CONFLICTING SWITCHES
    140	000564	010267 	000000G			MOV	R2,CMDWRD
    141					;
    142					; DISPATCH TO THE REQUESTED FUNCTION
    143					;
    144	000570	005767 	000002G		DISPAT:	TST	CMDWRD+2	;CHECK FOR DUPLICATE COMMANDS
PIPDSP M0216, PIP COMMAND RECEI	MACRO M1108  05-DEC-77 23:56  PAGE 8-2
COMMAND RECEIVER AND DISPATCHER

    145	000574	001023 				BNE	SERR4		; YES - GET OUT
    146	000576	012700 	000000G			MOV	#CMDTBL,R0	; POINT TO COMMAND TABLE #1
    147	000602	000404 				BR	70$
    148
    149	000604	012702 	000000G		60$:	MOV	#MERGBT,R2	;EXECUTE THE COPY COMMAND
    150	000610	012700 	000000G		DISPT2:	MOV	#CMDTB2,R0	; POINT TO COMMAND TABLE #2
    151
    152	000614	006002 			70$:	ROR	R2		; SCAN FOR A COMMAND BIT
    153	000616	103402 				BCS	80$		; BRANCH IF FOUND
    154	000620	005720 				TST	(R0)+		; OTHERWISE BUMP TO NEXT TABLE ENTRY
    155	000622	000774 				BR	70$		; AND TRY AGAIN
    156
    157					; BIT FOUND IN COMMAND WORD - NO MORE SHOULD BE PRESENT
    158	000624	005702 			80$:	TST	R2
    159	000626	001006 				BNE	SERR4
    160	000630	000130 				JMP	@(R0)+		;GO EXECUTE THE COMMAND
    161
    162						.DSABL	LSB
PIPDSP M0216, PIP COMMAND RECEI	MACRO M1108  05-DEC-77 23:56  PAGE 9
COMMAND RECEIVER AND DISPATCHER

    164					;
    165					; SYNTAX ERROR FROM CSI$1
    166					; FORM ONE STRING WITH SYNTAX ERROR MSG AND PIECE OF CMD LINE
    167	000632				SERR2:	CALL	.SYNER
    168					;
    169					; BAD SWITCH OR VALUE FROM CSI$2
    170	000636				SERR3:	ERROUX	CR02
	000636	104403 				TRAP	X
	000640	000000G				.WORD	CR02SZ
	000642	000000G				.WORD	CR02MG
    171					;
    172					;MULTIPLE COMMAND SWITCHES FOUND
    173	000644				SERR4:	ERROUX	CR03
	000644	104403 				TRAP	X
	000646	000000G				.WORD	CR03SZ
	000650	000000G				.WORD	CR03MG
    174					;
    175					; OUTPUT PIP VERSION IDENTIFIER
    176	000652				PIPID::	ERROUX	IDNT
	000652	104403 				TRAP	X
	000654	000000G				.WORD	IDNTSZ
	000656	000000G				.WORD	IDNTMG
    177					;
    178					;
    179		000001 				.END
PIPDSP M0216, PIP COMMAND RECEI	MACRO M1108  05-DEC-77 23:56  PAGE 9-1
SYMBOL TABLE

BLKCNT= ****** GX	C.SIZE= 000054   	G.ISIZ= 000020   	MERGBT= ****** GX	S.FNAM= 000006
CLOSE = ****** GX	C.STAT= 000001   	G.LUCW= 000004   	NTCNTG= ****** GX	S.FNB = 000036
CMDTBL= ****** GX	C.SWAD= 000022   	G.LUFB= 000003   	N.DEVD= 000000   	S.FNBW= 000017
CMDTB2= ****** GX	C.TYPR= 000000   	G.LUNA= 000000   	N.DIRD= 000004   	S.FNTY= 000004
CMDWRD= ****** GX	DISPAT  000570R     002	G.LUNU= 000002   	N.FLID= 000016   	S.FTYP= 000002
CMOLUN= ****** GX	DISPT2  000610R     002	G.MODE= 000141   	N.FNMD= 000010   	S.NFEN= 000020
CODEV = ****** GX	DY01MG= ****** GX	G.PRFW= 000004   	N.SPEC= 000014   	TDRDEL= ****** GX
COUNIT= ****** GX	DY01SZ= ****** GX	G.PRPB= 000000   	OFNPT = ****** GX	TOTLBT= ****** GX
CPYCTL= ****** GX	EVRYBT= ****** GX	G.PRPS= 000002   	OUTCSI= ****** GX	WOPROB= ****** GX
CR02MG= ****** GX	EXIT    000200R     002	G.PSDS= 000142   	OWPROB= ****** GX	X     = 000003
CR02SZ= ****** GX	FD.CCL= ****** GX	G.TSFW= 000024   	PAR$$$= 000000   	$DSW  = ****** GX
CR03MG= ****** GX	FD.REC= ****** GX	G.TSGC= 000017   	PIPID   000652RG    002	$$    = 000067
CR03SZ= ****** GX	FD.TTY= ****** GX	G.TSMT= 000022   	PROTBT= ****** GX	$$$OST= 000034
CSIBLK= ****** GX	FIDBIT= ****** GX	G.TSNL= 000020   	PROWRD= ****** GX	.CSI1 = ****** G
CSISWT= ****** GX	F.RCTL= ****** GX	G.TSPC= 000016   	PURGCT= ****** GX	.CSI2 = ****** G
CS.DIF= 000002   	GCMLCB= ****** GX	G.TSPN= 000004   	R$$DPB= 000001   	.DYBLK= ****** GX
CS.DVF= 000004   	GETCML= ****** GX	G.TSPR= 000014   	R$$DYM= 000001   	.DYBUF= ****** GX
CS.EQU= 000040   	GE.BIF= 177775   	G.TSRN= 000010   	R$$EIS= 000000   	.DYBYT= ****** GX
CS.INP= 000001   	GE.CLO= 000004   	G.TSTN= 000000   	R$$11M= 000001   	.DYREL= ****** GX
CS.MOR= 000020   	GE.COM= 000001   	G.TSTS= 000032   	SAVSP = ****** GX	.DYSIZ= ****** GX
CS.NMF= 000001   	GE.EOF= 177766   	G.TSVA= 000026   	SERR2   000632R     002	.FINIT= ****** G
CS.OUT= 000002   	GE.IND= 000002   	G.TSVL= 000030   	SERR3   000636R     002	.INIT   000000RG    002
CS.WLD= 000010   	GE.IOR= 177777   	IDNTMG= ****** GX	SERR4   000644R     002	.LCLSW= ****** GX
C.CMLD= 000002   	GE.LC = 000010   	IDNTSZ= ****** GX	SHTLST= ****** GX	.MBFCT= ****** GX
C.DEVD= 000006   	GE.MDE= 177774   	IFNPT = ****** GX	SYPROB= ****** GX	.OULCL= ****** GX
C.DIRD= 000012   	GE.OPR= 177776   	ILCLSW= ****** GX	S.APPD= 000010   	.RSTAR  000206RG    002
C.DSDS= 000006   	GRPROB= ****** GX	INCSI = ****** GX	S.BFHD= ****** GX	.SYNER= ****** GX
C.FILD= 000016   	G.CMLD= 000146   	INIPRO= ****** GX	S.FDB = 000140   	.TOPAD= ****** GX
C.MKW1= 000024   	G.DPRM= 000160   	LINBUF= ****** GX	S.FIDS= 000014   	...TPC= 000140
C.MKW2= 000026   	G.ERR = 000140   	LSTBIT= ****** GX

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

VIRTUAL MEMORY USED:  5540 WORDS  ( 22 PAGES)
DYNAMIC MEMORY:  6272 WORDS  ( 24 PAGES)
ELAPSED TIME:  00:00:41
[63,10]PIPDSP,[63,20]PIPDSP/-SP=[63,30]PIPMAC,PIPDSP
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57
TABLE OF CONTENTS

    7-   1	**** PIPCPY VERSION M0231 ****
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 7


      1						.TITLE	PIPCPY M0231, COPY COMMAND-PIP
						.SBTTL	**** PIPCPY VERSION M0231 ****
						.IDENT	/M0231/
      2					; ALTERED:
      3					; DEBORAH HOLTZ GILLESPIE  6 JAN 76 14:00(***)
      4					; ANDREW C. GOLDSTEIN  1 MAR 76  14:41
      5					;
      6					; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      7					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      8
      9					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     10					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     11					; OF DEC'S COPYRIGHT NOTICE)ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     12					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     13
     14					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     15					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     16					; EQUIPMENT CORPORATION.
     17
     18					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     19					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     20					;
     21					; PETER H. LIPMAN	2-MAY-74
     22					;
     23						.IF	GT,R$$11M
     24						.MACRO	OPEN$	A1,A2,A3,A4,A5,A6,A7,A8,A9
     25						.MCALL	OFNB$
     26						OFNB$	A1,A2,A3,A4,A5,A6,A7,A8,A9
     27						.ENDM	OPEN$
     28					;
     29						.MACRO	GET$	A1,A2,A3,A4
     30						.MCALL	GET$S
     31						GET$S	A1,A2,A3,A4
     32						.ENDM	GET$
     33					;
     34						.MACRO	PUT$	A1,A2,A3,A4
     35						.MCALL	PUT$S
     36						PUT$S	A1,A2,A3,A4
     37						.ENDM	PUT$
     38					;
     39						.ENDC
     40
     41	000000					FLDSOF
     42						.MCALL	CSI$,FDOF$L,FCSBT$,IOERR$
     43	000000					CSI$
     44	000000					FDOF$L			;DEFINE FDB OFFSETS LOCALLY
     45	000000					FCSBT$			;DEFINE FDB BITS AND VALUES LOCALLY
     46	000000					IOERR$			;DEFINE I/O ERROR CODES LOCALLY
     47						.MCALL	CALL,RETURN
     48						.MCALL	FDRC$R,FDAT$R,FDBF$R
     49						.MCALL	OPEN$R,OPEN$U,OPEN$A,OPEN$,OFNB$W,CLOSE$
     50						.MCALL	PUT$,GET$,QIO$,DIR$,WTSE$S,WSIG$S
     51					;
     52	000000					MSG1	LPHD,<<14>>	;HEADER FOR COPY TO LP:
     53
     54	000000					IMPURE
     55
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 7-1
**** PIPCPY VERSION M0231 ****

     56	000000				QIODPB:	QIO$	,,RWEFN,,IOSTBK,,<,,,,>
     57		000014 				Q.XFAD=Q.IOPL		;TRANSFER ADDRESS OFFSET
     58		000016 				Q.XFSZ=Q.IOPL+2		;TRANSFER SIZE OFFSET
     59		000022 				Q.XFVB=Q.IOPL+6		;TRANSFER VBN OFFSET
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 8
**** PIPCPY VERSION M0231 ****

     61	000026					PURE.I
     62
     63					; COPY THE INPUT FILE TO THE OUTPUT FILE
     64	000000				COPY::
     65	000000	016767 	000000G	000000G		MOV	.OULCL,.LCLSW	;LOCAL OUTPUT SWITCHES APPLY
     66									;TO ALL INPUT SPECIFIERS
     67	000006	042767 	000000G	000000G		BIC	#FILCL,.LCLSW	;KOCK DOWN SWITCHES THAT DON'T DEFAULT
     68	000014	016767 	000000G	000000G		MOV	BUFSIZ,OBFSIZ	;SAVE OUTPUT BUFFER SIZE
     69	000022	032767 	000000G	000002G		BIT	#APPDBT,CMDWRD+2
     70	000030	001403 				BEQ	10$
     71	000032	052767 	000000G	000002G		BIS	#MERGBT,CMDWRD+2	;APPEND OR UPDATE IMPLY MERGE
     72	000040	005767 	000000G		10$:	TST	INSPEC		;ANY INPUT FILE SPEC AT ALL?
     73	000044	001003 				BNE	30$
     74	000046					ERROUX	CP02		;NOTHING TO COPY!
	000046	104403 				TRAP	X
	000050	000000G				.WORD	CP02SZ
	000052	000000G				.WORD	CP02MG
     75					; INITIALIZE THE DEFAULT NAME BLOCKS AND PUT ADDRESSES IN FDB'S
     76	000054	012767 	000000G	000046G	30$:	MOV	#NAMBLK,FDBOUT+F.DFNB
     77	000062	005001 				CLR	R1
     78	000064	005002 				CLR	R2
     79	000066					CALL	STNMBK		;INIT "NAMBLK"
     80	000072	012700 	000000G			MOV	#NMBLK1,R0
     81	000076	010067 	000046G			MOV	R0,FDBIN+F.DFNB
     82					; R1 AND R2 SHOULD STILL CONTAIN 0
     83	000102					CALL	STNBK1		;INIT NAMBLK IN R0
     84	000106	012767 	000000G	000044G		MOV	#IFNPT,FDBIN+F.DSPT ;INIT DESCRIPTOR POINTERS
     85	000114	012767 	000000G	000044G		MOV	#OFNPT,FDBOUT+F.DSPT
     86	000122	012700 	000000G			MOV	#FDBOUT,R0
     87	000126	112760 	000016 	000043 		MOVB	#FO.WRT,F.FACC(R0) ; SET INTENT TO CAUSE SPOOLING
     88	000134					CALL	PARSE		;PARSE THE OUTPUT FILE NAME
     89	000140	103014 				BCC	40$
     90	000142	032767 	000000G	000000G		BIT	#UFDBIT,CPYCTL	; CHECK FOR UFD CREATION MODE
     91	000150	001404 				BEQ	35$		; NO
     92	000152	126027 	000052 	177746 		CMPB	F.ERR(R0),#IE.NSF ; CHECK FOR NO SUCH FILE
     93	000160	001404 				BEQ	40$		; IGNORE AT THIS LEVEL
     94	000162				35$:	CALL	PRSERR		;FAILED TO PARSE OUTPUT FILE NAME
     95	000166	000167 	000000G			JMP	CLOSX
     96	000172				40$:	CALL	CWLDUI		;CHECK FOR LEGAL WILD UIC
     97	000176	103003 				BCC	42$		;BRANCH IF OK
     98	000200					ERROUX	CP01		;ONLY [*,*] IS LEGAL FOR OUTPUT
	000200	104403 				TRAP	X
	000202	000000G				.WORD	CP01SZ
	000204	000000G				.WORD	CP01MG
     99	000206	032761 	000000G	000020 	42$:	BIT	#NB.SFN,N.STAT(R1) ;NO WILD CARDS IN NAME?
    100	000214	001431 				BEQ	46$		;BRANCH IF YES
    101	000216	016102 	000020 			MOV	N.STAT(R1),R2
    102	000222	042702 	000000C			BIC	#^C<NB.SFN>,R2
    103	000226	022702 	000000G			CMP	#NB.SFN,R2	;*.*;* ?
    104	000232	001412 				BEQ	44$		;BRANCH IF YES, OK
    105	000234	022702 	000060 			CMP	#NB.SNM!NB.STP,R2 ;*.* ?
    106	000240	001004 				BNE	43$		;BRANCH IF NO, ILLEGAL  USE OF *
    107	000242	032761 	000001 	000020 		BIT	#NB.VER,N.STAT(R1) ;NOT EXPLICIT VERSION
    108	000250	001403 				BEQ	44$		;BRANCH IF YES, OK
    109	000252				43$:	ERROUX	CP04,1		;ILLEGAL * IN OUTPUT NAME
	000252	104413 				TRAP	X
	000254	000000G				.WORD	CP04SZ
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 8-1
**** PIPCPY VERSION M0231 ****

	000256	000000G				.WORD	CP04MG
    110	000260	042767 	000001 	000000G	44$:	BIC	#CS.NMF,OUSPEC	;NORMALIZE WILD CARD OUTPUT NAME
    111	000266	005067 	000010G			CLR	OFNPT+N.FNMD
    112	000272	042761 	000000G	000020 		BIC	#NB.SFN,N.STAT(R1)
    113	000300	032767 	000001 	000000G	46$:	BIT	#CS.NMF,OUSPEC	;IF EXPLICIT OUTPUT FILE NAME
    114	000306	001013 				BNE	54$		;BRANCH IF YES
    115	000310	032767 	000000C	000002G		BIT	#MERGBT!UPDTBT,CMDWRD+2	;MERGE, APPEND, OR UPDATE REQUEST?
    116	000316	001416 				BEQ	60$		;BRANCH IF NO
    117	000320	132760 	000010 	000017 		BITB	#FD.DIR,F.RCTL(R0)
    118	000326	001412 				BEQ	60$		;OK IF NON DIRECTORY DEVICE
    119	000330					ERROUX	CP05,1		;MUST HAVE EXPLICIT OUTPUT FILE NAME
	000330	104413 				TRAP	X
	000332	000000G				.WORD	CP05SZ
	000334	000000G				.WORD	CP05MG
    120	000336	032767 	000030 	000000G	54$:	BIT	#CS.MOR!CS.WLD,INSPEC ;MULTIPLE INPUT FILES?
    121	000344	001403 				BEQ	60$
    122					;
    123					; EXPLICIT OUTPUT FILE NAME AND MULTIPLE INPUT FILES IMPLY A MERGE
    124	000346	052767 	000000G	000002G		BIS	#MERGBT,CMDWRD+2
    125	000354	012700 	000000G		60$:	MOV	#FDBIN,R0
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 9
**** PIPCPY VERSION M0231 ****

    127
    128	000360				COPY2:	CALL	PARSE		;PARSE THE FILE NAME
    129	000364	103004 				BCC	10$
    130	000366					CALL	PRSERR
    131	000372	000167 	002254 			JMP	CPYNXT
    132	000376	016067 	000120 	000000G	10$:	MOV	F.FVER(R0),VERSAV
    133	000404	052767 	000000G	000000G		BIS	#FRSTIM,CPYCTL	;FIRST FIND OPERATION NOT DONE YET
    134	000412	032767 	000001 	000000G		BIT	#CS.NMF,INSPEC	;ALLOW NULL INPUT FILE NAME TO = *.*;*
    135	000420	001021 				BNE	CPYWLD
    136	000422	005762 	000016 			TST	N.FLID(R2)	;UNLESS FILE ID SPECIFIED
    137	000426	001016 				BNE	CPYWLD
    138	000430	132760 	000010 	000017 		BITB	#FD.DIR,F.RCTL(R0) ;OR UNLESS NON DIRECTORY DEVICE
    139	000436	001412 				BEQ	CPYWLD
    140	000440	052761 	000000G	000020 		BIS	#NB.SFN,N.STAT(R1) ;SINCE WILD CARDS ON INPUT SIDE
    141	000446	032767 	000001 	000000G		BIT	#CS.NMF,OUSPEC	;OUTPUT FILE NAME IMPLIES MERGE
    142	000454	001403 				BEQ	CPYWLD
    143	000456	052767 	000000G	000002G		BIS	#MERGBT,CMDWRD+2
    144	000464	016760 	000000G	000120 	CPYWLD:	MOV	VERSAV,F.FVER(R0)
    145	000472					CALL	FNDNXT
    146	000476	103004 				BCC	COPY1		;BRANCH IF SUCCESSFUL
    147					;
    148					; ERROR FROM LOOKUP
    149	000500					CALL	FNDERR
    150	000504	000167 	002142 			JMP	CPYNXT
    151	000510	005067 	000000G		COPY1:	CLR	OURACC
    152	000514	012767 	000004 	000000G		MOV	#FD.PLC,INRACC
    153	000522	032767 	000001 	000000G		BIT	#CS.NMF,OUSPEC	;IS OUTPUT FILE NAME EXPLICIT
    154	000530	001073 				BNE	40$		;BRANCH IF YES
    155	000532	010002 				MOV	R0,R2
    156	000534	062702 	000110 			ADD	#F.FNAM,R2	;R2=ADR OF FNAME IN NAME BLOCK
    157	000540	005001 				CLR	R1		;R1= DIRECTORY ID FIELD
    158	000542					CALL	STNMBK		;STORE INTO NAMBLK
    159					;
    160					; IF THE OUTPUT DIRECTORY IS WILD CARD, USE THE INPUT DIR ID
    161	000546	032767 	000000G	000020G		BIT	#NB.SDI,OWUIC+N.STAT
    162	000554	001412 				BEQ	10$
    163	000556	016702 	000044G			MOV	FDBOUT+F.DSPT,R2
    164	000562	016703 	000044G			MOV	FDBIN+F.DSPT,R3
    165	000566	016362 	000004 	000004 		MOV	N.DIRD(R3),N.DIRD(R2)
    166	000574	016362 	000006 	000006 		MOV	N.DIRD+2(R3),N.DIRD+2(R2)
    167					;
    168					; DEFAULT FILE VERSION TO THAT OF INPUT FILE UNLESS DEVICE AND
    169					; DIRECTORY ARE THE SAME.
    170	000602	032767 	000000G	000000G	10$:	BIT	#NVERBT,CPYCTL	;FORCING NEW OUTPUT FILE VERSION?
    171	000610	001016 				BNE	30$		;BRANCH IF YES
    172	000612	016767 	000120G	000016G		MOV	FDBIN+F.FVER,NAMBLK+N.FVER
    173	000620					CALL	SAME		;***SAME UNIT,DEV,DIR?
    174	000624	103435 				BCS	40$		;***NOT THE SAME
    175	000626	032767 	000000G	000122G		BIT	#NB.SFL,FDBIN+F.FNB+N.STAT
    176	000634	001427 				BEQ	35$
    177					; WILD CARD COPY TO SAME DEVICE, DIRECTORY IS ILLEGAL
    178	000636					ERROUT	CP03
	000636	104402 				TRAP	X
	000640	000000G				.WORD	CP03SZ
	000642	000000G				.WORD	CP03MG
    179	000644	000421 				BR	32$
    180					;
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 9-1
**** PIPCPY VERSION M0231 ****

    181					; PRODUCE NEW VERSION OF FILE, DON'T PRESERVE THE INPUT FILE'S VERSION NUMBER
    182					;
    183	000646	032767 	000010 	000122G	30$:	BIT	#NB.SVR,FDBIN+F.FNB+N.STAT ;IF WILD VERSION SPECIFIED
    184	000654	001012 				BNE	31$		;ERROR
    185					; ***IF MULTIPLE RECORD COPY WITH LATEST VERSION IMPLIED(NAME.*
    186					; ***OR *.TYP) AND /NV SWITCH, THEN INFINITE LOOP PROBLEM RESULTS
    187					; ***WHEN UNIT,DEVICE,DIRECTORY ARE THE SAME.
    188					; ***NAME.TYP IS SINGLE RECORD COPY OPERATION SO LATEST VERSION OK
    189					; ***WITH /NV SWITCH.
    190	000656	032767 	000060 	000122G		BIT	#NB.SNM!NB.STP,FDBIN+F.FNB+N.STAT	;WILD CARD
    191	000664	001413 				BEQ	35$		;***NO SO OK
    192	000666	005767 	000000G			TST	VERSAV		;***ORIGINAL VER #, LATEST VERSION IMPLIED?
    193	000672	001010 				BNE	35$		;***IF 1ST OR SPECIFIC #, OK
    194	000674					CALL	SAME		;***SAME DEV, UNIT,DIR?
    195	000700	103405 				BCS	35$		;***NOT THE SAME
    196	000702				31$:	ERROUT	CP15		;THEN ILLEGAL
	000702	104402 				TRAP	X
	000704	000000G				.WORD	CP15SZ
	000706	000000G				.WORD	CP15MG
    197	000710	000167 	001736 		32$:	JMP	CPYNXT
    198	000714	005067 	000016G		35$:	CLR	NAMBLK+N.FVER	;FORCE DEFAULT (NEW) OUTPUT FILE VERSION
    199					;
    200					; NOW SEE IF CAN COPY IN BLOCK MODE INSTEAD OF RECORD MODE
    201	000720	005767 	000070G		40$:	TST	FDBOUT+F.BDB	;IF OUTPUT FILE IS ALREADY OPEN
    202	000724	001107 				BNE	CPYOPN		;SET UP RECORD ORIENTED INPUT FILE
    203	000726	032767 	000000G	000002G		BIT	#MERGBT,CMDWRD+2	;IF 1ST FILE OF MERGE
    204	000734	001406 				BEQ	50$		;BRANCH IF NOT
    205	000736					FDBF$R	#FDBIN,,#512.	;FORCE STANDARD BUF SIZE, AVOID FRAGMENTING FSR1
    206	000750	000475 				BR	CPYOPN		;AND USE RECORD ORIENTED COPY
    207	000752	026767 	000062G	000062G	50$:	CMP	FDBIN+F.BBFS,FDBOUT+F.BBFS ;BLOCK SIZES THE SAME?
    208	000760	001071 				BNE	CPYOPN		;BRANCH IF NO, RECORD ORIENTED COPY
    209	000762	026727 	000062G	001000 		CMP	FDBIN+F.BBFS,#1000 ;MUST BE 1000 BYTE BLOCKS
    210	000770	001065 				BNE	CPYOPN		;BRANCH IF NOT
    211					;
    212					; BOTH MUST BE BLOCK ORIENTED AND NON SEQUENTIAL
    213	000772	132767 	000041 	000017G		BITB	#FD.REC!FD.SQD,FDBIN+F.RCTL
    214	001000	001061 				BNE	CPYOPN
    215	001002	132767 	000041 	000017G		BITB	#FD.REC!FD.SQD,FDBOUT+F.RCTL
    216	001010	001055 				BNE	CPYOPN
    217					;
    218					; BOTH FILES ARE BLOCK ORIENTED AND THE SAME BLOCK SIZE, USE READ/WRITE
    219					;
    220	001012	026767 	000000G	000000G		CMP	.DYSIZ,.DYBYT	; SEE IF DYNAMIC BUFFER IS ALLOCATED
    221	001020	001412 				BEQ	60$		; BRANCH IF YES
    222					;
    223					; FAKE AN ALLOCATION OF THE ENTIRE DYNAMIC BUFFER REGION. WE CANNOT
    224					; CALL $RQLCB SINCE THE DESIRED SIZE MAY BE OVER 16K AND CAUSE
    225					; SIGN PROBLEMS.
    226					;
    227	001022					CALL	.DYREL		; RELEASE ANYTHING THAT'S ALLOCATED
    228	001026	016767 	000000G	000000G		MOV	.DYSIZ,.DYBYT	; SET ALLOCATED SIZE
    229	001034	013700 	000000G			MOV	@#.FSRPT,R0	; GET FSR2 ADDRESS
    230	001040	011067 	000000G			MOV	(R0),.DYBUF	; SET BUFFER ADDRESS
    231	001044	005010 				CLR	(R0)		; MARK ENTIRE FSR ALLOCATED
    232
    233	001046	012700 	000000G		60$:	MOV	#FDBIN,R0
    234	001052	012767 	000001 	000000G		MOV	#FD.RWM,INRACC
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 9-2
**** PIPCPY VERSION M0231 ****

    235	001060	012767 	000001 	000000G		MOV	#FD.RWM,OURACC
    236	001066	000426 				BR	CPYOPN
    237
    238
    239					; ***IS INPUT AND OUTPUT ON THE SAME DEVICE,UNIT,DIRECTORY?
    240					; ***OUTPUT:  C=0 YES, C=1 NO
    241
    242	001070	026767 	000134G	000134G	SAME:	CMP	FDBIN+F.DVNM,FDBOUT+F.DVNM	;***SAME DEVICE?
    243	001076	001020 				BNE	10$		;***NOT THE SAME DEVICE
    244	001100	026767 	000136G	000136G		CMP	FDBIN+F.UNIT,FDBOUT+F.UNIT	;***SAME UNIT?
    245	001106	001014 				BNE	10$		;***NOT SAME UNIT
    246	001110	012704 	000003 			MOV	#3,R4		;***THREE WORDS DESCRIBE DIRECTORY
    247	001114	012702 	000126G			MOV	#FDBIN+F.FNB+N.DID,R2	;***INPUT DIR. ADDR.
    248	001120	012703 	000126G			MOV	#FDBOUT+F.FNB+N.DID,R3	;***OUTPUT DIR ADDR
    249	001124	022223 			5$:	CMP	(R2)+,(R3)+	;***INPUT=OUTPUT?
    250	001126	001004 				BNE	10$		;***NOT EQUAL
    251	001130					SOB	R4,5$		;***MORE TO GO?
    252	001134	000241 				CLC			;***YES,THEY'RE THE SAME
    253	001136					RETURN
    254	001140	000261 			10$:	SEC			;***NOT THE SAME
    255	001142					RETURN
    256
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 10
**** PIPCPY VERSION M0231 ****

    258
    259	001144				CPYOPN:
    260	001144	012701 	000000G			MOV	#CPYCTL,R1	;POINT TO COPY CONTROL SWITCHES
    261	001150	016702 	000000G			MOV	BUFSIZ,R2	;GET BUFFER SIZE SPEC, IF ANY
    262	001154					CALL	GETBR		;SET UP BUFFER SIZE AND REWIND CONTROL
    263	001160	012701 	000000G			MOV	#STBLK,R1	;R1=ADDRESS OF STATISTICS BLOCK
    264	001164	132760 	000040 	000017 		BITB	#FD.SQD,F.RCTL(R0) ;IF SEQUENTIAL DEVICE
    265	001172	001002 				BNE	10$		;DON'T READ THE STATISTICS BLOCK
    266	001174	010160 	000036 			MOV	R1,F.STBK(R0)	;OTHERWISE READ IT AT OPEN TIME
    267	001200	005021 			10$:	CLR	(R1)+		;ZERO THE LBN IN THE STATISTICS BLOCK
    268	001202	005021 				CLR	(R1)+
    269	001204	005021 				CLR	(R1)+		;AND ZERO THE SIZE FIELD
    270	001206	005011 				CLR	(R1)		;LEAVING R1 POINTING AT LOW ORDER SIZE
    271	001210					OPEN$R	R0,,,INRACC	;OPEN THE INPUT FILE
    272	001230	103002 				BCC	20$		;
    273	001232	000167 	001572 			JMP	CERR51		;FAILED TO OPEN INPUT FILE
    274
    275					;
    276					; FIX UP THE STATISTICS BLOCK IF THIS WAS A SEQUENTIAL DEVICE. HIBK+2 WILL
    277					; CONTAIN THE SIZE IF FLE WAS CONTIGUOUS.
    278					;
    279	001236				20$:	;CLR	F.ACTL(R0)	; SHUT OFF REWIND IF SET
    280	001236	132760 	000040 	000017 		BITB	#FD.SQD,F.RCTL(R0) ;IF SEQUENTIAL DEVICE
    281	001244	001405 				BEQ	30$		;
    282	001246	016011 	000006 			MOV	F.HIBK+2(R0),(R1) ;FIX UP FILE SIZE
    283	001252	001402 				BEQ	30$		;BRANCH IF NOT CONTIGUOUS
    284	001254	005261 	177774 			INC	-4(R1)		;MAKE LBN IN STAT BLOCK NON-ZERO
    285					;
    286					; ESTABLISH SIZE AND CONTIGUOUS ATTRIBUTE FOR THE INPUT FILE
    287					;
    288	001260				30$:
    289	001260	005004 			EXTSIZ:	CLR	R4		;ASSUME NON CONTIGUOUS
    290	001262	011105 				MOV	(R1),R5		;R5=SIZE OF FILE SPACE ALLOCATED
    291	001264	005741 				TST	-(R1)
    292	001266	014146 				MOV	-(R1),-(SP)	;IF BOTH LBN WORDS ARE 0
    293	001270	054126 				BIS	-(R1),(SP)+	;THEN FILE IS NON CONTIGUOUS
    294	001272	001404 				BEQ	10$		;BRANCH IF NOT CONTIGUOUS
    295	001274	032767 	000000G	000000G		BIT	#NTCNTG,CPYCTL	;/-CO SWITCH?
    296	001302	001012 				BNE	30$		;BRANCH IF COPYING CONTIGUOUS
    297					;
    298					; USE FILE SIZE FROM RECORD ATTRIBUTE
    299					;
    300	001304	016005 	000012 		10$:	MOV	F.EFBK+2(R0),R5	;R5=VBN OF END OF FILE
    301	001310	005760 	000014 			TST	F.FFBY(R0)	;UNLESS FFBY=0
    302	001314	001001 				BNE	20$		;
    303	001316	005305 				DEC	R5		;IN WHICH CASE IT IS ONE TOO BIG
    304	001320	032767 	000000G	000000G	20$:	BIT	#CNTGBT,CPYCTL	;FORCE CONTIGUOUS?
    305	001326	001401 				BEQ	40$		;BRANCH IF NO
    306	001330	005204 			30$:	INC	R4		;CONTIGUOUS ALLOCATION
    307					;
    308					; SEE IF USER WANTS TO OVERRIDE THE EXTEND SIZE. IF HE SAID /BL:N, THEN
    309					; USE THAN EXTEND SIZE.
    310					;
    311	001332	032767 	000000G	000000G	40$:	BIT	#BLKBIT,CPYCTL	;/BL SWITCH SPECIFIED?
    312	001340	001402 				BEQ	50$		;BRANCH IF NO
    313	001342	016705 	000000G			MOV	BLKCNT,R5	;USE SPECIFIED SIZE
    314	001346	005704 			50$:	TST	R4		;IS EXTEND CONTIGUOUS?
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 10-1
**** PIPCPY VERSION M0231 ****

    315	001350	001001 				BNE	60$		;BRANCH IF YES
    316	001352	005405 				NEG	R5		;NEGATIVE FOR NON CONTIGUOUS
    317	001354	010567 	000000G		60$:	MOV	R5,.EXTSZ	;SAVE THE EXTEND INFO
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 11
**** PIPCPY VERSION M0231 ****

    319
    320					;
    321					; NOW PREPARE TO OPEN THE OUTPUT FILE
    322					;
    323	001360				OUTOPN:
    324	001360	010001 				MOV	R0,R1		;PRESERVE THE INPUT FDB IN R1
    325	001362	012700 	000000G			MOV	#FDBOUT,R0	;OUTPUT FDB
    326	001366	005760 	000070 			TST	F.BDB(R0)	;
    327	001372	001402 				BEQ	5$
    328	001374	000167 	000440 			JMP	ISOPEN		;BRANCH IF OUTPUT FILE IS ALEADY OPEN
    329
    330	001400				5$:	CALL	COPYAT		; COPY RECORD ATTRIBUTES TO OUTPUT
    331	001404	012701 	000000G			MOV	#.OULCL,R1	;POINT TO OUTPUT LOCAL SWITCHES
    332	001410	016702 	000000G			MOV	OBFSIZ,R2	;GET OUTPUT BUFFER SPEC
    333	001414					CALL	GETBR		;SET UP REWIND CONTROL AND BUFFER SIZE
    334	001420	022760 	050114 	000134 		CMP	#"LP,F.DVNM(R0)	;IF OUTPUT TO LINE PRINTER
    335	001426	001003 				BNE	10$		;
    336	001430					FDBF$R	R0,,#132.	;OVERRIDE BUFFER SIZE
    337	001436				10$:	FDRC$R	R0,OURACC
    338	001444					CALL	PRSREG
    339	001450					CALL	.PARSE
    340	001454	103065 				BCC	15$
    341	001456	126027 	000052 	177746 		CMPB	F.ERR(R0),#IE.NSF ; SEE IF DIRECTORY DOES NOT EXIST
    342	001464	001410 				BEQ	11$		; BRANCH IF YES
    343	001466	032767 	000000G	000000G		BIT	#UFDBIT,CPYCTL	; SEE IF DIRECTORY CREATION ENABLED
    344	001474	001004 				BNE	11$		; YES
    345	001476					CALL	PRSERR
    346	001502	000167 	000000G			JMP	CLOSX
    347
    348					;
    349					; WATCH THIS!! THE DIRECTORY DOES NOT EXIST, SO WE WILL CREATE ONE
    350					; ON THE FLY. OBSERVE THAT THE FAILURE FROM PARSE HAS LEFT THE
    351					; NAME BLOCK OF FDBOUT SET UP TO DO THE ENTER IN THE MFD - THE
    352					; DIRECTORY NAME IS ALL SET UP.
    353					;
    354	001506	062700 	000110 		11$:	ADD	#F.FNB+6,R0	; POINT TO NAME BLOCK LESS FID
    355	001512	012701 	000014 			MOV	#S.FNB/2-3,R1	; WORD COUNT TO COPY
    356	001516	012702 	000110G			MOV	#DIFDB+F.FNB+6,R2 ; ADDRESS OF DIRECTORY NAME BLOCK
    357	001522	012022 			12$:	MOV	(R0)+,(R2)+	; COPY THE NAME BLOCK
    358	001524					SOB	R1,12$
    359
    360	001530					CALL	.RFOWN		; SAVE CURRENT FILE OWNER WORD
    361	001534	010146 				MOV	R1,-(SP)
    362	001536	016701 	000132G			MOV	DIFDB+F.FNB+N.DID+4,R1 ; GET UIC FOR DIRECTORY
    363	001542					CALL	.WFOWN		; AND SET IT UP
    364	001546					FDAT$R	#DIFDB,,,,#1	; SET FOR 1 BLOCK CONTIGUOUS
    365	001560					OFNB$W	R0		; CREATE IT ALREADY
    366	001572	006102 				ROL	R2		; SAVE THE C BIT
    367	001574	012601 				MOV	(SP)+,R1	; RESTORE FILE OWNER WORD
    368	001576					CALL	.WFOWN
    369	001602	006002 				ROR	R2		; GET BACK C BIT
    370	001604	103003 				BCC	14$
    371	001606				13$:	ERROUX	CP16,0,0	; FAILED TO CREATE DIRECTORY
	001606	104427 				TRAP	X
	001610	000000G				.WORD	CP16SZ
	001612	000000G				.WORD	CP16MG
    372
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 11-1
**** PIPCPY VERSION M0231 ****

    373	001614				14$:	CLOSE$	R0		; CLOSE THE FILE
    374	001620	103772 				BCS	13$
    375	001622	012700 	000000G			MOV	#FDBOUT,R0	; RESTORE R0
    376	001626	000703 				BR	10$		; AND TRY CREATING OUTPUT AGAIN
    377
    378	001630				15$:	CALL	.GFOWN		;SET UP FILE OWNER FOR /FO SWITCH
    379	001634	032767 	000000C	000002G		BIT	#APPDBT!UPDTBT,CMDWRD+2
    380	001642	001020 				BNE	OPENAU		;BRANCH IF APPENDING OR UPDATING
    381					;
    382					; CREATING A NEW FILE
    383					;
    384						.IF	GT,R$$DPB	;IF NEW DPB FORMAT
    385	001644					FDAT$R	R0,,,,.EXTSZ	;SET INITIALIZE ALLOCATION
    386
    387
    388						.IFF			;IF OLD DPB FORMAT
    389						MOV	.EXTSZ,R1	;ONLY SET INITIAL SIZE IF CONTIGUOUS
    390						BLT	20$		;BRANCH IF NOT CONTIGUOUS
    391						FDAT$R	R0,,,,R1	;
    392					20$:				;
    393						.ENDC
    394
    395	001652	012705 	000116 			MOV	#FO.WRT!FA.NSP,R5 ;ASSUME NOT SUPERSEDING
    396	001656	032767 	000000G	000000G		BIT	#SPSDBT,CPYCTL	;IS SUPERSEDE DESIRED
    397	001664	001402 				BEQ	30$		;BRANCH IF NO
    398	001666	012705 	000016 			MOV	#FO.WRT,R5	;
    399	001672				30$:	OPEN$	R0,R5		;OPEN A NEW FILE
    400	001702	000431 				BR	OPNCHK
    401
    402					;
    403					; OPEN FOR APPEND OR UPDATE
    404					;
    405	001704				OPENAU:
    406	001704	032767 	000000G	000002G		BIT	#APPDBT,CMDWRD+2
    407	001712	001020 				BNE	20$		;BRANCH IF OPEN FOR APPEND
    408	001714					OPEN$U	R0		;OPEN FOR UPDATE (REWRITE THE FILE)
    409	001726	103417 				BCS	OPNCHK
    410	001730					CALL	COPYAT		; COPY RECORD ATTRIBUTES TO OUTPUT
    411	001734	005060 	000010 			CLR	F.EFBK(R0)	; BUT ZERO EOF MARK
    412	001740	012760 	000001 	000012 		MOV	#1,F.EFBK+2(R0)
    413	001746	005060 	000014 			CLR	F.FFBY(R0)
    414	001752	000432 				BR	ISOPEN
    415	001754				20$:	OPEN$A	R0		;OPEN FOR APPEND (ADD TO END OF FILE)
    416	001766	103024 			OPNCHK:	BCC	ISOPEN
    417	001770	000167 	000446 			JMP	CERR2
    418					;
    419					; SUBROUTINE TO COPY RECORD ATTRIBUTES FROM INPUT FDB TO OUTPUT
    420					;
    421	001774				COPYAT:	FDAT$R	R0,FDBIN+F.RTYP,FDBIN+F.RATT,FDBIN+F.RSIZ
    422					;	BITB	#CH.AND,FDBIN+F.CHR ; SEE IF INPUT IS ANSI MAGTAPE
    423					;	BEQ	10$		; BRANCH IF NO
    424					;	BITB	#CH.AND,F.CHR(R0) ; SEE IF OUTPUT IS ANSI MAGTAPE
    425					;	BNE	10$		; BRANCH IS YES
    426					;	BICB	#FD.BLK,F.RATT(R0) ;  CLEAR BLOCKING BIT ON OUTPUT
    427	002016				10$:	RETURN
    428					;
    429					; SUBROUTINE TO SET UP REWIND CONTROL AND BUFFER SIZE FOR
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 11-2
**** PIPCPY VERSION M0231 ****

    430					; INPUT AND OUTPUT FILES.
    431					;
    432					; INPUTS:
    433					;	R0 = FDB
    434					;	R1 = ADDR OF SWITCH WORD
    435					;	R2 = BUFFER SIZE
    436					;
    437	002020	032711 	000000G		GETBR:	BIT	#BSZBIT,(R1)	;CHECK IF BLOCK SIZE SPECIFIED
    438	002024	001402 				BEQ	10$		;BRANCH IF NO
    439	002026	010260 	000030 			MOV	R2,F.OVBS(R0)	; YES - SET IT UP
    440	002032	032711 	000000G		10$:	BIT	#RWDBIT,(R1)	;CHECK IF REWIND SPECIFIED
    441					;	BEQ	20$		;BANCH IF NO
    442					;	MOV	#FA.ENB!FA.RWD,F.ACTL(R0) ;SET IT UP
    443					;	BIC	#RWDBIT,(R1)	;REWIND IS ONCE ONLY
    444	002036				20$:	RETURN
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 12
**** PIPCPY VERSION M0231 ****

    446					;
    447					; BOTH FILES ARE NOW OPEN. IF RECORD ORIENTED COPY, ALLOCATE REMAINING
    448					; BUFFER SPACE AS A RECORD BUFFER
    449					;
    450	002040				ISOPEN:	;CLR	F.ACTL(R0)	; SHUT OFF REWIND IF SET
    451	002040	032760 	000001 	000016 		BIT	#FD.RWM,F.RACC(R0) ; SEE IF BLOCK COPY IN USE
    452	002046	001040 				BNE	4$		; YES - NO RECORD BUFFER NEEDED
    453	002050					FDRC$R	R0,,#0,#0	;NO USER RECORD BUFFER
    454	002060	005001 				CLR	R1
    455	002062	013702 	000000G			MOV	@#.FSRPT,R2	; GET BUFFER FREE LIST HEAD FROM FSR2
    456	002066	011202 			1$:	MOV	(R2),R2		; CHAIN TO NEXT FREE AREA
    457	002070	001406 				BEQ	2$		; BRANCH IF NO MORE
    458	002072	026201 	000002 			CMP	2(R2),R1	; SEE IF THIS SPACE IS LARGER THAN PREVIOUS
    459	002076	101773 				BLOS	1$		; NO, KEEP LOOKING
    460	002100	016201 	000002 			MOV	2(R2),R1	; YES, CONSIDER THIS SPACE
    461	002104	000770 				BR	1$		; BUT KEEP TRYING
    462
    463	002106	005701 			2$:	TST	R1		; SEE IF WE FOUND ANYTHING
    464	002110	001005 				BNE	3$
    465	002112	012700 	000000G			MOV	#FDBIN,R0
    466	002116					ERROUX	DY01,0		;NOT ENOUGH BUFFER SPACE
	002116	104407 				TRAP	X
	002120	000000G				.WORD	DY01SZ
	002122	000000G				.WORD	DY01MG
    467	002124				3$:	CALL	.DYALC		;ALLOCATE THE EXTRA AS LARGEST POSSIBLE REC BUF
    468	002130					FDRC$R	#FDBIN,,.DYBUF,.DYBYT
    469					;
    470					; OUTPUT FILE IS OPEN - SEE IF EXTEND IS NECESSARY
    471					;
    472	002150	012700 	000000G		4$:	MOV	#FDBOUT,R0
    473	002154	132760 	000041 	000017 		BITB	#FD.REC!FD.SQD,F.RCTL(R0) ;DON'T EXTEND REC OR SEQ DEV
    474	002162	001040 				BNE	30$
    475	002164	016003 	000006 			MOV	F.HIBK+2(R0),R3	;LOW ORDER SIZE OF FILE IN BLOCKS
    476	002170	016002 	000004 			MOV	F.HIBK(R0),R2	;HIGH ORDER SIZE OF FILE
    477	002174	166003 	000012 			SUB	F.EFBK+2(R0),R3	;CALCULATE SPACE AVAILABLE
    478	002200	005602 				SBC	R2
    479	002202	166002 	000010 			SUB	F.EFBK(R0),R2
    480	002206	005760 	000014 			TST	F.FFBY(R0)	;IF FFBY=0
    481	002212	001003 				BNE	10$		;
    482	002214	062703 	000001 			ADD	#1,R3		;SUBTRACTED ONE TOO MANY
    483	002220	005502 				ADC	R2		;
    484	002222	005702 			10$:	TST	R2		;BRANCH IF HIGH ORDER NON-ZERO, (NO EXTEND)
    485	002224	001055 				BNE	40$
    486	002226	016701 	000000G			MOV	.EXTSZ,R1
    487	002232	002001 				BGE	20$
    488	002234	005401 				NEG	R1		;R1=SIZE OF INPUT FILE
    489	002236	160301 			20$:	SUB	R3,R1		;R1=NO. OF ADDITIONAL BLOCKS NEEDED
    490	002240	003447 				BLE	40$		;BRANCH IF EXTEND UNNECESSARY
    491	002242	005002 				CLR	R2		;NON CONTIGUOUS EXTEND
    492	002244					CALL	.EXTND
    493	002250	103043 				BCC	40$
    494					;
    495					; FAILED TO EXTEND-IGNORE FCP STACK OVERFLOW AND DO DEFAULT EXTEND AS
    496					; FILE IS WRITTEN.
    497					;
    498	002252	122760 	177706 	000052 		CMPB	#IE.STK,F.ERR(R0) ;FCP STACK OVERFLOW?
    499	002260	001131 				BNE	CERR52		;BRANCH IF OTHER ERROR
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 12-1
**** PIPCPY VERSION M0231 ****

    500	002262	000436 				BR	40$		;
    501	002264				30$:	CALL	RECATT		;ATTACH A RECORD DEVICE
    502	002270	103512 				BCS	CERR3
    503	002272	022760 	050114 	000134 		CMP	#"LP,F.DVNM(R0)	;IF OUTPUT TO LP
    504	002300	001027 				BNE	40$
    505	002302					FDAT$R	R0,#R.VAR,#0
    506	002314					PUT$	R0,#LPHDMG,#LPHDSZ ;START WITH A FORM FEED
    507	002334	103532 				BCS	CERR1		;BRANCH IF WRITE ERROR
    508	002336					FDAT$R	R0,FDBIN+F.RTYP,FDBIN+F.RATT,FDBIN+F.RSIZ
    509
    510	002360				40$:
    511	002360	012701 	000000G		COPYGO:	MOV	#FDBIN,R1	;SET R1, R2 TO FDB ADDRESSES
    512	002364	012702 	000000G			MOV	#FDBOUT,R2	;TO GAIN SPEED IN COPY LOOP
    513	002370	132761 	000001 	000016 		BITB	#FD.RWM,F.RACC(R1)
    514	002376	001402 				BEQ	40$
    515	002400	000167 	000452 			JMP	CPYBLK		;BRANCH IF COPYING IN BLOCK MODE
    516					;
    517					; COPY IN RECORD MODE
    518	002404				40$:	GET$	R1
    519	002412	103507 				BCS	CPYEOF		;BRANCH IF ERROR IN READ, EOF?
    520	002414	016767 	000026G	000026G		MOV	FDBIN+F.NRBD+2,FDBOUT+F.NRBD+2 ; SET OUTPUT ADDRESS
    521	002422	016767 	000024G	000024G		MOV	FDBIN+F.NRBD,FDBOUT+F.NRBD ; AND SIZE
    522					;	MOV	FDBIN+F.SEQN,FDBOUT+F.SEQN ; COPY RECORD SEQUENCE NO.
    523	002430					PUT$	R2
    524	002436	103362 				BCC	40$		;DO NEXT RECORD IF ALL IS WELL
    525	002440	000470 				BR	CERR1		;WRITE ERROR
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 13
**** PIPCPY VERSION M0231 ****

    527					;
    528					; FAILED TO OPEN OUTPUT FILE
    529	002442				CERR2:	;CLR	F.ACTL(R0)	; SHUT OFF REWIND IF SET
    530	002442	122760 	177750 	000052 		CMPB	#IE.DFU,F.ERR(R0) ;ALLOCATION FAILURE?
    531	002450	001426 				BEQ	CERR53		;BRANCH IF YES
    532	002452	122760 	177707 	000052 		CMPB	#IE.DUP,F.ERR(R0) ;FILE ALREADY EXISTS?
    533	002460	001404 				BEQ	10$		;BRANCH IF YES
    534	002462					ERROUT	OP02,0,0	;FAILED TO OPEN OUTPUT FILE
	002462	104426 				TRAP	X
	002464	000000G				.WORD	OP02SZ
	002466	000000G				.WORD	OP02MG
    535	002470	000410 				BR	20$
    536	002472				10$:	ERROUT	OP08,0		;OUTPUT FILE ALREADY EXISTS
	002472	104406 				TRAP	X
	002474	000000G				.WORD	OP08SZ
	002476	000000G				.WORD	OP08MG
    537	002500	032767 	000000G	000002G		BIT	#MERGBT,CMDWRD+2	;IF MERGING
    538	002506	001001 				BNE	20$		;THEN CAN'T CONTINUE WITH NEXT FILE
    539	002510	000463 				BR	COPYX		;OTHERWISE GO DO NEXT FILE
    540	002512	000167 	000000G		20$:	JMP	CLOSX
    541					;
    542					; FAILE TO ATTACH THE TTY
    543	002516				CERR3:	ERROUT	DI06,0,0
	002516	104426 				TRAP	X
	002520	000000G				.WORD	DI06SZ
	002522	000000G				.WORD	DI06MG
    544	002524	000455 				BR	COPYX
    545					;
    546					; EXTEND FAILURE AT OPEN TIME
    547					;
    548	002526	012702 	000001 		CERR53:	MOV	#1,R2		;ASSUME IT WAS CONTIGUOUS EXTEND
    549	002532	016701 	000000G			MOV	.EXTSZ,R1
    550	002536	002002 				BGE	CERR52		;BRANCH IF IT WAS CONTIGUOUS
    551	002540	005002 				CLR	R2		;NON-CONTIGUOUS
    552	002542	005401 				NEG	R1
    553					;
    554					; FAILED TO EXTEND THE OUTPUT FILE
    555					; R1 = DESIRED SIZE OF EXTEND, R2=0 FOR NON-CONTIGUOUS EXTEND, 1 FOR
    556					; CONTIGUOUS REQUEST.
    557					;
    558	002544	122760 	177750 	000052 	CERR52:	CMPB	#IE.DFU,F.ERR(R0) ;DEVICE FULL?
    559	002552	001016 				BNE	30$		;BRANCH IF SOME OTHER ERROR
    560	002554	005702 				TST	R2		;ASKING FOR CONTIGUOUS SPACE?
    561	002556	001010 				BNE	20$		;BRANCH IF YES
    562	002560	010146 				MOV	R1,-(SP)	;SAVE EXTEND SIZE
    563	002562					ERROUT	CP11,0		;COULDN'T ALLOCATE ANY SPACE
	002562	104406 				TRAP	X
	002564	000000G				.WORD	CP11SZ
	002566	000000G				.WORD	CP11MG
    564	002570	022627 	000024 			CMP	(SP)+,#20.	;IF RELATIVELY LARGE SPACE WAS NEEDED
    565	002574	101031 				BHI	COPYX		;GO TRY NEXT FILE
    566	002576	000407 				BR	40$		;OTHERWISE STOP THE COPY LOOP NOW
    567	002600				20$:	ERROUT	CP10,0		;FAILED TO FIND CONTIGUOUS SPACE
	002600	104406 				TRAP	X
	002602	000000G				.WORD	CP10SZ
	002604	000000G				.WORD	CP10MG
    568	002606	000424 				BR	COPYX		;GO TRY TO COPY NEXT FILE
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 13-1
**** PIPCPY VERSION M0231 ****

    569	002610				30$:	ERROUT	CP12,0,0	;COULDN'T EXTEND - PRINT REASON
	002610	104426 				TRAP	X
	002612	000000G				.WORD	CP12SZ
	002614	000000G				.WORD	CP12MG
    570	002616	000167 	000000G		40$:	JMP	CLOSX		;EXIT FROM THE COPY LOOP
    571					;
    572					; WRITE ERROR
    573	002622				CERR1:	ERROUT	CP14,0,0
	002622	104426 				TRAP	X
	002624	000000G				.WORD	CP14SZ
	002626	000000G				.WORD	CP14MG
    574	002630	000413 				BR	COPYX
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 14
**** PIPCPY VERSION M0231 ****

    576	002632	122760 	177766 	000052 	CPYEOF:	CMPB	#IE.EOF,F.ERR(R0)
    577	002640	001407 				BEQ	COPYX
    578					;
    579					; READ ERROR
    580	002642				CERR6:	ERROUT	CP13,0,0
	002642	104426 				TRAP	X
	002644	000000G				.WORD	CP13SZ
	002646	000000G				.WORD	CP13MG
    581	002650	000403 				BR	COPYX
    582
    583	002652	042767 	000000G	000122G	CPYNXT:	BIC	#NB.SFL,FDBIN+F.FNB+N.STAT
    584	002660				COPYX:	CALL	CLSIN		;CLOSE INPUT FILE
    585	002664					CALL	.DYREL		; RELEASE THE RECORD BUFFER TO KEEP FSR CLEAN
    586	002670	032767 	000000G	000002G		BIT	#MERGBT,CMDWRD+2 ;AND THE OUTPUT FILE UNLESS MERGE MODE
    587	002676	001033 				BNE	10$
    588	002700	005767 	000070G			TST	FDBOUT+F.BDB	;NEED TO CLOSE OUTPUT FILE?
    589	002704	001426 				BEQ	5$		;BRANCH IF ALREADY CLOSED
    590	002706	016746 	000102G			MOV	FDBOUT+F.FNB+N.FID,-(SP) ;SAVE OUTPUT FILE ID
    591	002712					CALL	CLSOUT		;CLOSE THE OUTPUT FILE
    592	002716	012602 				MOV	(SP)+,R2	;R2=SAVED FILE NUMBER
    593	002720	016703 	000000G			MOV	.FOWNR,R3	;IF NO FILE OWNER SPECIFIED
    594	002724	001416 				BEQ	5$		;DON'T WRITE ATTRIBUTES
    595	002726	010260 	000102 			MOV	R2,F.FNB+N.FID(R0) ;OTHERWISE RESTORE THE FILE ID
    596	002732	005046 				CLR	-(SP)		;SET UP ATTRIBUTE LIST
    597	002734	012746 	000000G			MOV	#.FOWNR,-(SP)	;ADDRESS OF FILE OWNER
    598	002740	012746 	000000G			MOV	#HA.UI,-(SP)	;WRITE FILE OWNER ATTRIBUTE
    599	002744	010601 				MOV	SP,R1		;R1=ADDRESS OF ATTRIBUTE LIST
    600	002746					CALL	WRTATT		;ISSUE THE WRITE ATTRIBUTES QI/O AND WAIT
    601	002752	062706 	000006 			ADD	#6,SP		;POP THE ATTRIBUTE LIST
    602	002756	005067 	000102G			CLR	FDBOUT+F.FNB+N.FID ;ZERO THE FILE NUMBER AGAIN
    603	002762	005067 	000000G		5$:	CLR	BLKCNT		;RESET ONLY IF NOT A MERGE OPERATION
    604	002766	012700 	000000G		10$:	MOV	#FDBIN,R0	;R0=INPUT FDB ADDRESS
    605	002772					CALL	NXTFIL		;IS THERE A WILD CARD FILE?
    606	002776	103405 				BCS	CPYNX1		;BRANCH IF NO
    607	003000	042767 	000000G	000000G		BIC	#FRSTIM,CPYCTL	;SAY "NOT THE FIRST TIME"
    608	003006	000167 	175452 			JMP	CPYWLD
    609	003012				CPYNX1:	CALL	NXTIN		;GET THE NEXT INPUT SPECIFIER
    610	003016	103402 				BCS	10$		;BRANCH IF NO MORE SPECS
    611	003020	000167 	175334 			JMP	COPY2
    612	003024	000167 	000000G		10$:	JMP	CLOSX
    613
    614					; FAILED TO OPEN INPUT FILE
    615	003030				CERR51:	;CLR	F.ACTL(R0)	; SHUT OFF REWIND IF SET
    616	003030	122760 	177746 	000052 		CMPB	#IE.NSF,F.ERR(R0)  ;WAS FILE NOT FOUND?
    617	003036	001003 				BNE	CERR13		;BRANCH IF SOME OTHER ERROR
    618	003040					CALL	FNDERR
    619	003044	000705 				BR	COPYX
    620	003046				CERR13:	ERROUT	OP01,0,0
	003046	104426 				TRAP	X
	003050	000000G				.WORD	OP01SZ
	003052	000000G				.WORD	OP01MG
    621	003054	000701 				BR	COPYX
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 15
**** PIPCPY VERSION M0231 ****

    623					;
    624					; COPY IN BLOCK MODE
    625	003056	016767 	000000G	000014'	CPYBLK:	MOV	.DYBUF,QIODPB+Q.XFAD ;PUT BUFFER ADDRESS IN DPB
    626	003064	016704 	000010G			MOV	FDBIN+F.EFBK,R4
    627	003070	016705 	000012G			MOV	FDBIN+F.EFBK+2,R5 ;R4,R5 = NO.OF BLOCK IN USE
    628	003074	005767 	000014G			TST	FDBIN+F.FFBY	 ;ONE TOO BIG IF FFBY=0
    629	003100	001003 				BNE	10$
    630	003102	162705 	000001 			SUB	#1,R5
    631	003106	005604 				SBC	R4
    632	003110	005067 	000022'		10$:	CLR	QIODPB+Q.XFVB
    633	003114	012767 	000001 	000024'		MOV	#1,QIODPB+Q.XFVB+2 ;START AT VBN 1
    634	003122	016703 	000000G		20$:	MOV	.DYBLK,R3	;R3=NO. OF BLOCKS AVAILABLE IN BUFFER
    635	003126	005704 				TST	R4		;IF MORE THAN 65K BLOCKS LEFT
    636	003130	001004 				BNE	30$		;TRANSFER MAX BUFFER SIZE
    637	003132	020503 				CMP	R5,R3		;OR IF MORE BLOCKS THAN BUFFER SPACE
    638	003134	101002 				BHI	30$		;TRANSFER MAX BUFFER SIZE
    639	003136	010503 				MOV	R5,R3		;OTHERWISE USE WHAT'S LEFT
    640	003140	001434 				BEQ	40$		;BRANCH IF NONE LEFT, ALL DONE
    641	003142	010301 			30$:	MOV	R3,R1
    642	003144	000301 				SWAB	R1
    643	003146	006301 				ASL	R1		;CONVERT BLOCK COUNT TO BYTE COUNT
    644	003150	010167 	000016'			MOV	R1,QIODPB+Q.XFSZ ;AND STORE IT IN THE DPB
    645	003154	012767 	000000G	000002'		MOV	#IO.RVB,QIODPB+Q.IOFN ;I/O FUNCTION CODE FOR READ VIRTUAL
    646	003162	012700 	000000G			MOV	#FDBIN,R0
    647	003166					CALL	RWGO		;PERFORM THE READ
    648	003172	103623 				BCS	CERR6		;BRANCH IF ERROR
    649	003174	012767 	000000G	000002'		MOV	#IO.WVB,QIODPB+Q.IOFN ;I/O FUCNTION CODE FOR WRITE VIRTUAL
    650	003202	012700 	000000G			MOV	#FDBOUT,R0
    651	003206					CALL	RWGO		;WRITE THE BLOCK
    652	003212	103603 				BCS	CERR1
    653	003214	160305 				SUB	R3,R5
    654	003216	005604 				SBC	R4		;R4,R5 = NO. OF BLOCKS LEFT TO TRANSFER
    655	003220	060367 	000024'			ADD	R3,QIODPB+Q.XFVB+2
    656	003224	005567 	000022'			ADC	QIODPB+Q.XFVB	;UPDATE THE NEXT VBN
    657	003230	000734 				BR	20$		;GO DO THE NEXT SET OF VBN'S
    658	003232	016767 	000010G	000010G	40$:	MOV	FDBIN+F.EFBK,FDBOUT+F.EFBK ;SET OUTPUT EOF
    659	003240	016767 	000012G	000012G		MOV	FDBIN+F.EFBK+2,FDBOUT+F.EFBK+2
    660	003246	016767 	000014G	000014G		MOV	FDBIN+F.FFBY,FDBOUT+F.FFBY
    661	003254	000167 	177400 			JMP	COPYX
    662					;+
    663					; START UP A READ OR WRITE VIRTUAL BLOCK FOR BLOCK MODE COPY
    664					;
    665					; INPUTS:
    666					;
    667					;	R0=FDB ADDRESS
    668					;
    669					; OUTPUTS:
    670					;
    671					;	C=0 IF SUCCESSFUL, C=1 IF ERROR
    672					;	F.ERR(R0) SET TO ERROR CODE IF ERROR
    673					;	ALL REGISTERS PRESERVED
    674					;
    675					;-
    676	003260	116067 	000042 	000004'	RWGO:	MOVB	F.LUN(R0),QIODPB+Q.IOLU
    677	003266	005060 	000052 		10$:	CLR	F.ERR(R0)
    678	003272					DIR$	#QIODPB		;ISSUE THE QI/O
    679	003300	103416 				BCS	20$
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 15-1
**** PIPCPY VERSION M0231 ****

    680	003302					WTSE$S	#RWEFN		;WAIT FOR COMPLETION
    681	003314	116760 	000000G	000052 		MOVB	IOSTBK,F.ERR(R0) ;SET ERROR IF ANY
    682	003322	002415 				BLT	30$		;BRANCH IF ERROR
    683	003324	026767 	000002G	000016'		CMP	IOSTBK+2,QIODPB+Q.XFSZ ;ALL BYTES TRANSFERRED?
    684	003332	001021 				BNE	50$		;BRANCH IF NO, ERROR
    685	003334					RETURN
    686	003336	013760 	000000G	000052 	20$:	MOV	@#$DSW,F.ERR(R0) ;PICK UP REASON FOR QI/O FAILURE
    687	003344	022760 	000000G	000052 		CMP	#IE.UPN,F.ERR(R0) ;OUT OF DYNAMIC MEMORY?
    688	003352	001405 				BEQ	40$		;YES, WAIT AND TRY AGAIN
    689	003354	000413 				BR	60$
    690	003356	122760 	177751 	000052 	30$:	CMPB	#IE.NOD,F.ERR(R0) ;NO DYNAMIC MEMORY AVAILABLE?
    691	003364	001007 				BNE	60$
    692	003366				40$:	WSIG$S			;YES, WAIT AND TRY AGAIN
    693	003374	000734 				BR	10$
    694	003376	112760 	177761 	000052 	50$:	MOVB	#IE.ABO,F.ERR(R0) ;FAILED TO TRANSFER DESIRED COUNT, ABORT
    695	003404	000261 			60$:	SEC
    696	003406					RETURN
    697
    698					;
    699					;
    700		000001 				.END
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 15-2
SYMBOL TABLE

APPDBT= ****** GX	CS.EQU= 000040   	FRSTIM= ****** GX	IE.BTP= 177725   	IE.WLK= 177764
BLKBIT= ****** GX	CS.INP= 000001   	F.ALOC= 000040   	IE.BVR= 177701   	IE.2DV= 177720
BLKCNT= ****** GX	CS.MOR= 000020   	F.BBFS= 000062   	IE.BYT= 177755   	IFNPT = ****** GX
BSZBIT= ****** GX	CS.NMF= 000001   	F.BDB = 000070   	IE.CKS= 177742   	INRACC= ****** GX
BUFSIZ= ****** GX	CS.OUT= 000002   	F.BGBC= 000057   	IE.CLO= 177732   	INSPEC= ****** GX
CERR1   002622R     004	CS.WLD= 000010   	F.BKDN= 000026   	IE.CON= 177752   	IOSTBK= ****** GX
CERR13  003046R     004	CWLDUI= ****** GX	F.BKDS= 000020   	IE.DAA= 177770   	IO.RVB= ****** GX
CERR2   002442R     004	C.CMLD= 000002   	F.BKEF= 000050   	IE.DAO= 177763   	IO.WVB= ****** GX
CERR3   002516R     004	C.DEVD= 000006   	F.BKP1= 000051   	IE.DFU= 177750   	ISOPEN  002040R     004
CERR51  003030R     004	C.DIRD= 000012   	F.BKST= 000024   	IE.DNA= 177771   	IS.BV = 000005
CERR52  002544R     004	C.DSDS= 000006   	F.BKVB= 000064   	IE.DNR= 177775   	IS.CR = 006401
CERR53  002526R     004	C.FILD= 000016   	F.CNTG= 000034   	IE.DUN= 177767   	IS.ESC= 015401
CERR6   002642R     004	C.MKW1= 000024   	F.DFNB= 000046   	IE.DUP= 177707   	IS.PND= 000000
CLOSX = ****** GX	C.MKW2= 000026   	F.DSPT= 000044   	IE.EBX= 177776   	IS.RDD= 000002
CLSIN = ****** GX	C.SIZE= 000054   	F.DVNM= 000134   	IE.EOF= 177766   	IS.SUC= 000001
CLSOUT= ****** GX	C.STAT= 000001   	F.EFBK= 000010   	IE.EOT= 177702   	LPHDMG= 000000R     002
CMDWRD= ****** GX	C.SWAD= 000022   	F.EFN = 000050   	IE.EOV= 177765   	LPHDSZ= 000001
CNTGBT= ****** GX	C.TYPR= 000000   	F.EOBB= 000032   	IE.EXP= 177676   	MERGBT= ****** GX
COPY    000000RG    004	DIFDB = ****** GX	F.ERR = 000052   	IE.FEX= 177717   	NAMBLK= ****** GX
COPYAT  001774R     004	DI06MG= ****** GX	F.FACC= 000043   	IE.FHE= 177705   	NB.DEV= 000200
COPYGO  002360R     004	DI06SZ= ****** GX	F.FFBY= 000014   	IE.FOP= 177713   	NB.DIR= 000100
COPYX   002660R     004	DY01MG= ****** GX	F.FNAM= 000110   	IE.HFU= 177744   	NB.NAM= 000004
COPY1   000510R     004	DY01SZ= ****** GX	F.FNB = 000102   	IE.IFC= 177776   	NB.SDI= ****** GX
COPY2   000360R     004	EXTSIZ  001260R     004	F.FTYP= 000116   	IE.IFU= 177747   	NB.SD1= 000400
CPYBLK  003056R     004	FA.APD= 000100   	F.FVER= 000120   	IE.ILL= 177726   	NB.SD2= 001000
CPYCTL= ****** GX	FA.CRE= 000010   	F.HIBK= 000004   	IE.ISQ= 177703   	NB.SFL= ****** GX
CPYEOF  002632R     004	FA.EXT= 000004   	F.LUN = 000042   	IE.LCK= 177745   	NB.SFN= ****** GX
CPYNXT  002652R     004	FA.NSP= 000100   	F.MBCT= 000054   	IE.MBK= 177721   	NB.SNM= 000040
CPYNX1  003012R     004	FA.RD = 000001   	F.MBC1= 000055   	IE.MOD= 177753   	NB.STP= 000020
CPYOPN  001144R     004	FA.SHR= 000040   	F.MBFG= 000056   	IE.NBF= 177731   	NB.SVR= 000010
CPYWLD  000464R     004	FA.TMP= 000020   	F.NRBD= 000024   	IE.NBK= 177727   	NB.TYP= 000002
CP01MG= ****** GX	FA.WRT= 000002   	F.NREC= 000030   	IE.NFI= 177704   	NB.VER= 000001
CP01SZ= ****** GX	FDBIN = ****** GX	F.OVBS= 000030   	IE.NLN= 177733   	NMBLK1= ****** GX
CP02MG= ****** GX	FDBOUT= ****** GX	F.RACC= 000016   	IE.NNC= 177674   	NTCNTG= ****** GX
CP02SZ= ****** GX	FD.BLK= 000010   	F.RATT= 000001   	IE.NOD= 177751   	NVERBT= ****** GX
CP03MG= ****** GX	FD.CCL= 000002   	F.RCNM= 000034   	IE.NSF= 177746   	NXTFIL= ****** GX
CP03SZ= ****** GX	FD.CR = 000002   	F.RCTL= 000017   	IE.OFL= 177677   	NXTIN = ****** GX
CP04MG= ****** GX	FD.DIR= 000010   	F.RSIZ= 000002   	IE.ONP= 177773   	N.DEVD= 000000
CP04SZ= ****** GX	FD.FTN= 000001   	F.RTYP= 000000   	IE.OVR= 177756   	N.DID = 000024
CP05MG= ****** GX	FD.INS= 000010   	F.STBK= 000036   	IE.PRI= 177760   	N.DIRD= 000004
CP05SZ= ****** GX	FD.PLC= 000004   	F.UNIT= 000136   	IE.RAC= 177724   	N.DVNM= 000032
CP10MG= ****** GX	FD.RAH= 000001   	F.URBD= 000020   	IE.RAT= 177723   	N.FID = 000000
CP10SZ= ****** GX	FD.RAN= 000002   	F.VBN = 000064   	IE.RBG= 177730   	N.FLID= 000016
CP11MG= ****** GX	FD.REC= 000001   	F.VBSZ= 000060   	IE.RCN= 177722   	N.FNAM= 000006
CP11SZ= ****** GX	FD.RWM= 000001   	GETBR   002020R     004	IE.RER= 177740   	N.FNMD= 000010
CP12MG= ****** GX	FD.SDI= 000020   	HA.UI = ****** GX	IE.RNM= 177715   	N.FTYP= 000014
CP12SZ= ****** GX	FD.SQD= 000040   	IE.ABO= 177761   	IE.RSU= 177757   	N.FVER= 000016
CP13MG= ****** GX	FD.TTY= 000004   	IE.ALN= 177736   	IE.SNC= 177735   	N.NEXT= 000022
CP13SZ= ****** GX	FD.WBH= 000002   	IE.BAD= 177777   	IE.SPC= 177772   	N.SPEC= 000014
CP14MG= ****** GX	FILCL = ****** GX	IE.BBE= 177710   	IE.SQC= 177734   	N.STAT= 000020
CP14SZ= ****** GX	FNDERR= ****** GX	IE.BDI= 177714   	IE.SRE= 177762   	N.UNIT= 000034
CP15MG= ****** GX	FNDNXT= ****** GX	IE.BDR= 177716   	IE.STK= 177706   	OBFSIZ= ****** GX
CP15SZ= ****** GX	FO.APD= 000106   	IE.BDV= 177711   	IE.UPN= ****** GX	OFNPT = ****** GX
CP16MG= ****** GX	FO.MFY= 000002   	IE.BHD= 177700   	IE.VER= 177774   	OPENAU  001704R     004
CP16SZ= ****** GX	FO.RD = 000001   	IE.BLK= 177754   	IE.WAC= 177743   	OPNCHK  001766R     004
CS.DIF= 000002   	FO.UPD= 000006   	IE.BNM= 177712   	IE.WAT= 177741   	OP01MG= ****** GX
CS.DVF= 000004   	FO.WRT= 000016   	IE.BTF= 177675   	IE.WER= 177737   	OP01SZ= ****** GX
PIPCPY M0231, COPY COMMAND-PIP	MACRO M1108  05-DEC-77 23:57  PAGE 15-3
SYMBOL TABLE

OP02MG= ****** GX	Q.IOPL= 000014   	R.VAR = 000002   	UFDBIT= ****** GX	.DYSIZ= ****** GX
OP02SZ= ****** GX	Q.IOPR= 000007   	SAME    001070R     004	UPDTBT= ****** GX	.EXTND= ****** GX
OP08MG= ****** GX	Q.IOSB= 000010   	SPSDBT= ****** GX	VERSAV= ****** GX	.EXTSZ= ****** GX
OP08SZ= ****** GX	Q.XFAD= 000014   	STBLK = ****** GX	WRTATT= ****** GX	.FOWNR= ****** GX
OURACC= ****** GX	Q.XFSZ= 000016   	STNBK1= ****** GX	X     = 000026   	.FSRPT= ****** GX
OUSPEC= ****** GX	Q.XFVB= 000022   	STNMBK= ****** GX	$DSW  = ****** GX	.GETSQ= ****** G
OUTOPN  001360R     004	RECATT= ****** GX	S.APPD= 000010   	$$    = 000067   	.GFOWN= ****** GX
OWUIC = ****** GX	RWDBIT= ****** GX	S.FATT= 000016   	$$MSG = 000000   	.LCLSW= ****** GX
PARSE = ****** GX	RWEFN = ****** GX	S.FDB = 000140   	$$$ARG= 000013   	.OPFNB= ****** G
PAR$$$= 000002   	RWGO    003260R     004	S.FIDS= 000014   	$$$OST= 000014   	.OULCL= ****** GX
PRSERR= ****** GX	R$$DPB= 000001   	S.FNAM= 000006   	.CLOSE= ****** G 	.PARSE= ****** GX
PRSREG= ****** GX	R$$DYM= 000001   	S.FNB = 000036   	.DYALC= ****** GX	.PUTSQ= ****** G
QIODPB  000000R     003	R$$EIS= 000000   	S.FNBW= 000017   	.DYBLK= ****** GX	.RFOWN= ****** GX
Q.IOAE= 000012   	R$$MSG= 000000   	S.FNTY= 000004   	.DYBUF= ****** GX	.WFOWN= ****** GX
Q.IOEF= 000006   	R$$11M= 000001   	S.FTYP= 000002   	.DYBYT= ****** GX	...GBL= 000000
Q.IOFN= 000002   	R.FIX = 000001   	S.NFEN= 000020   	.DYREL= ****** GX	...TPC= 000140
Q.IOLU= 000004

. ABS.	000000	   000
      	000000	   001
MSGSTR	000001	   002
IMPURE	000026	   003
PURE$I	003410	   004
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  7929 WORDS  ( 31 PAGES)
DYNAMIC MEMORY:  8384 WORDS  ( 32 PAGES)
ELAPSED TIME:  00:01:55
[63,10]PIPCPY,[63,20]PIPCPY/-SP=[63,30]PIPMAC,PIPCPY
PIPDEF M0004, SET DEFAULT COMMA	MACRO M1108  05-DEC-77 23:59
TABLE OF CONTENTS

    7-   1	**** PIPDEF VERSION M0004 ****
PIPDEF M0004, SET DEFAULT COMMA	MACRO M1108  05-DEC-77 23:59  PAGE 7


      1						.TITLE	PIPDEF M0004, SET DEFAULT COMMAND-PIP
						.SBTTL	**** PIPDEF VERSION M0004 ****
						.IDENT	/M0004/
      2					;
      3					; COPYRIGHT   1974,  DIGITAL  EQUIPMENT  CORP.,  MAYNARD,   MASS.
      4					;
      5					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
      6					; ON A  SINGLE COMPUTER SYSTEM AND CAN BE  COPIED (WITH INCLUSION
      7					; OF DEC'S COPYRIGHT  NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
      8					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
      9					;
     10					; THE  INFORMATION  IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     11					; NOTICE  AND  SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     12					; EQUIPMENT CORPORATION.
     13					;
     14					; DEC  ASSUMES NO  RESPONSIBILITY  FOR  THE  USE  OR  RELIABILITY
     15					; OF  ITS  SOFTWARE ON  EQUIPMENT WHICH  IS  NOT SUPPLIED BY DEC.
     16					;
     17					; PETER H. LIPMAN	14-MAY-74
     18					;
     19	000000					FLDSOF
     20						.MCALL	CSI$,FDOF$L,CALL,RETURN
     21	000000					CSI$			;DEFINE CSI OFSETS
     22	000000					FDOF$L			;DEFINE FDB OFFSETS LOCALLY
     23					;
     24					; SET DEFAULT DEVICE OR DIRECTORY
     25					;
     26	000000				.SETDF::
     27	000000	005767 	000000G			TST	INSPEC		;NO INPUT SPECIFIER ALLOWED
     28	000004	001014 				BNE	10$		;BRANCH IF BAD SYNTAX
     29	000006	032767 	000031 	000000G		BIT	#CS.NMF!CS.MOR!CS.WLD,OUSPEC ;ONLY DEV OR UIC ALLOWED
     30	000014	001010 				BNE	10$		;BRANCH IF BAD SYNTAX
     31	000016	032767 	000006 	000000G		BIT	#CS.DVF!CS.DIF,OUSPEC ;EXPLICIT DEV OR DIR?
     32	000024	001007 				BNE	20$		;BRANCH IF YES, OK SYNTAX
     33	000026	032767 	000000G	000000G		BIT	#MFDBIT,CPYCTL	;SET UIC TO THE MFD?
     34	000034	001003 				BNE	20$		;YES, SYNTAX IS OK
     35	000036				10$:	ERROUX	DF01		;BAD SYNTAX FOR /DFAULT SWITCH
	000036	104403 				TRAP	X
	000040	000000G				.WORD	DF01SZ
	000042	000000G				.WORD	DF01MG
     36	000044	032767 	000004 	000000G	20$:	BIT	#CS.DVF,OUSPEC	;IS USER CHANGING THE DEFAULT DEVICE?
     37	000052	001402 				BEQ	30$		;BRANCH IF NO
     38	000054					CALL	SETDEV		;YES, GO SET THE NEW DEFAULT
     39	000060	032767 	000002 	000000G	30$:	BIT	#CS.DIF,OUSPEC	;IS HE CHANGING THE DEFAULT DIRECTORY?
     40	000066	001004 				BNE	40$		;BRANCH IF YES
     41	000070	032767 	000000G	000000G		BIT	#MFDBIT,CPYCTL
     42	000076	001402 				BEQ	50$		;BRANCH IF NO SETTING DEFAULT UIC
     43	000100				40$:	CALL	SETUIC		;CHANGE THE DEFAULT UIC
     44	000104	000167 	000000G		50$:	JMP	CLOSX
PIPDEF M0004, SET DEFAULT COMMA	MACRO M1108  05-DEC-77 23:59  PAGE 8
**** PIPDEF VERSION M0004 ****

     46					;
     47					; SET DEFAULT DEVICE AND UNIT
     48					;
     49	000110	012700 	000000G		SETDEV:	MOV	#FDBOUT,R0
     50	000114	012701 	000000G			MOV	#NMBLK1,R1
     51	000120	012702 	000000G			MOV	#OFNPT,R2
     52	000124	005003 				CLR	R3
     53	000126					CALL	.PRSDV		;PARSE THE DEVICE NAME
     54	000132	103407 				BCS	20$
     55	000134	016167 	000032 	000000G		MOV	N.DVNM(R1),.DEFDV
     56	000142	016167 	000034 	000000G		MOV	N.UNIT(R1),.DEFUN
     57	000150					RETURN
     58	000152				20$:	CALL	PRSERR
     59	000156					RETURN
     60
     61					;
     62					; SET DEFAULT UIC
     63					;
     64	000160	032767 	000002 	000000G	SETUIC:	BIT	#CS.DIF,OUSPEC	;EXPLICIT DIRECTORY SPECIFIED?
     65	000166	001006 				BNE	10$		;BRANCH IF IT IS
     66	000170	032767 	000000G	000000G		BIT	#MFDBIT,CPYCTL	;BETTER BE MFD SWITCH
     67	000176	001424 				BEQ	50$		;BRANCH IF NOT, ERROR
     68	000200	005001 				CLR	R1
     69	000202	000415 				BR	40$		;SET NULL DEFAULT DIRECTORY - GETS MFD
     70	000204	016702 	000004G		10$:	MOV	OFNPT+N.DIRD,R2	;R2=SIZE OF DIRECTORY STRING
     71	000210	016703 	000006G			MOV	OFNPT+N.DIRD+2,R3 ;R3=ADDR OF DIRECTORY STRING
     72	000214	022702 	000000G			CMP	#DFDRSZ,R2	;IS STRING LONGER THAN SPACE ALLOCATED?
     73	000220	002413 				BLT	50$		;BRANCH IF YES
     74	000222	012701 	000000G			MOV	#DEFDIR,R1
     75	000226					CALL	MVSTRG		;MOVE STRING TO DEFAULT DIRECTORY AREA
     76	000232	016701 	000004G			MOV	OFNPT+N.DIRD,R1	;R1=SIZE
     77	000236	012702 	000000G		40$:	MOV	#DEFDIR,R2	;R2=ADR OF DEF DIR STRING
     78	000242					CALL	.WDFDR		;CALL FCS TO SET THE DEFAULT
     79	000246					RETURN
     80	000250				50$:	ERROUX	UI01		;SYNTAX ERROR
	000250	104403 				TRAP	X
	000252	000000G				.WORD	UI01SZ
	000254	000000G				.WORD	UI01MG
     81
     82					;
     83					;
     84		000001 				.END
PIPDEF M0004, SET DEFAULT COMMA	MACRO M1108  05-DEC-77 23:59  PAGE 8-1
SYMBOL TABLE

CLOSX = ****** GX	DF01SZ= ****** GX	F.FNB = 000102   	MFDBIT= ****** GX	R$$11M= 000001
CPYCTL= ****** GX	FDBOUT= ****** GX	F.FTYP= 000116   	MVSTRG= ****** GX	SETDEV  000110R
CS.DIF= 000002   	F.ALOC= 000040   	F.FVER= 000120   	NMBLK1= ****** GX	SETUIC  000160R
CS.DVF= 000004   	F.BBFS= 000062   	F.HIBK= 000004   	N.DEVD= 000000   	S.APPD= 000010
CS.EQU= 000040   	F.BDB = 000070   	F.LUN = 000042   	N.DID = 000024   	S.FATT= 000016
CS.INP= 000001   	F.BGBC= 000057   	F.MBCT= 000054   	N.DIRD= 000004   	S.FDB = 000140
CS.MOR= 000020   	F.BKDN= 000026   	F.MBC1= 000055   	N.DVNM= 000032   	S.FIDS= 000014
CS.NMF= 000001   	F.BKDS= 000020   	F.MBFG= 000056   	N.FID = 000000   	S.FNAM= 000006
CS.OUT= 000002   	F.BKEF= 000050   	F.NRBD= 000024   	N.FLID= 000016   	S.FNB = 000036
CS.WLD= 000010   	F.BKP1= 000051   	F.NREC= 000030   	N.FNAM= 000006   	S.FNBW= 000017
C.CMLD= 000002   	F.BKST= 000024   	F.OVBS= 000030   	N.FNMD= 000010   	S.FNTY= 000004
C.DEVD= 000006   	F.BKVB= 000064   	F.RACC= 000016   	N.FTYP= 000014   	S.FTYP= 000002
C.DIRD= 000012   	F.CNTG= 000034   	F.RATT= 000001   	N.FVER= 000016   	S.NFEN= 000020
C.DSDS= 000006   	F.DFNB= 000046   	F.RCNM= 000034   	N.NEXT= 000022   	UI01MG= ****** GX
C.FILD= 000016   	F.DSPT= 000044   	F.RCTL= 000017   	N.SPEC= 000014   	UI01SZ= ****** GX
C.MKW1= 000024   	F.DVNM= 000134   	F.RSIZ= 000002   	N.STAT= 000020   	X     = 000003
C.MKW2= 000026   	F.EFBK= 000010   	F.RTYP= 000000   	N.UNIT= 000034   	$$    = 000067
C.SIZE= 000054   	F.EFN = 000050   	F.STBK= 000036   	OFNPT = ****** GX	.DEFDV= ****** GX
C.STAT= 000001   	F.EOBB= 000032   	F.UNIT= 000136   	OUSPEC= ****** GX	.DEFUN= ****** GX
C.SWAD= 000022   	F.ERR = 000052   	F.URBD= 000020   	PRSERR= ****** GX	.PRSDV= ****** GX
C.TYPR= 000000   	F.FACC= 000043   	F.VBN = 000064   	R$$DPB= 000001   	.SETDF  000000RG
DEFDIR= ****** GX	F.FFBY= 000014   	F.VBSZ= 000060   	R$$DYM= 000001   	.WDFDR= ****** GX
DFDRSZ= ****** GX	F.FNAM= 000110   	INSPEC= ****** GX	R$$EIS= 000000   	...TPC= 000140
DF01MG= ****** GX

. ABS.	000000	   000
      	000256	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  3624 WORDS  ( 15 PAGES)
DYNAMIC MEMORY:  4160 WORDS  ( 16 PAGES)
ELAPSED TIME:  00:00:20
[63,10]PIPDEF,[63,20]PIPDEF/-SP=[63,30]PIPMAC,PIPDEF
PIPDEL M0212, DELETE & REMOVE C	MACRO M1108  05-DEC-77 23:59
TABLE OF CONTENTS

    7-   1	**** PIPDEL VERSION M0212 ****
PIPDEL M0212, DELETE & REMOVE C	MACRO M1108  05-DEC-77 23:59  PAGE 7


      1						.TITLE	PIPDEL M0212, DELETE & REMOVE COMMANDS-PIP
						.SBTTL	**** PIPDEL VERSION M0212 ****
						.IDENT	/M0212/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  2 OCT 75  18:19
      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	2-MAY-74
     21
     22	000000					FLDSOF
     23						.MCALL	CALL,RETURN,DELET$
     24
     25
     26	000000					PURE.I
     27
     28					; DELETE THE SPECIFIED FILES
     29
     30	000000				REMOVE::
     31	000000				DELETE::CALL	FSTOUT
     32	000004	012700 	000000G		DELET1:	MOV	#FDBOUT,R0
     33	000010					CALL	PARSE
     34	000014	103010 				BCC	10$
     35	000016					CALL	PRSERR		;FAILED TO PARSE FILE NAME
     36					;
     37					; PRIVILEGE VIOLATION FROM PARSE PROBABLY MEANS DEVICE NOT MOUNTED
     38					;
     39	000022	122767 	000000G	000000C		CMPB	#IE.PRI,FDBOUT+F.ERR
     40	000030	001145 				BNE	DELNXT
     41	000032	000167 	000000G			JMP	CLOSX		;EXIT FROM DELETE LOOP IF NOT MOUNTED
     42	000036	132760 	000000G	000000G	10$:	BITB	#FD.DIR,F.RCTL(R0) ;MUST BE A DIRECTORY DEVICE
     43	000044	001003 				BNE	15$		;BRANCH IF IT IS
     44	000046					ERROUX	DI08,1		;ERROR
	000046	104413 				TRAP	X
	000050	000000G				.WORD	DI08SZ
	000052	000000G				.WORD	DI08MG
     45	000054	052767 	000000G	000000G	15$:	BIS	#FRSTIM,CPYCTL
     46	000062	032767 	000000G	000000G		BIT	#RMVBIT,CMDWRD	;SKIP EXPLICIT FILE ID CHECK IF REMOVE
     47	000070	001007 				BNE	18$
     48	000072					CALL	USEFID
     49	000076	103404 				BCS	18$		;BRANCH IF NO EXPLICIT FILE ID
     50	000100	042761 	000000G	000000G		BIC	#NB.SFL,N.STAT(R1) ;EXPLICIT FILE ID WAS INPUT
     51	000106	000431 				BR	22$		;JUST DO THE MARK FOR DELETE
     52	000110	032767 	000000G	000000G	18$:	BIT	#PURGBT,CMDWRD	;PURGE MODE FOR THIS FILE?
PIPDEL M0212, DELETE & REMOVE C	MACRO M1108  05-DEC-77 23:59  PAGE 7-1
**** PIPDEL VERSION M0212 ****

     53	000116	001124 				BNE	DELPUR		;BRANCH IF YES
     54	000120					CALL	WLDVER		;DISALLOW WILD CARDS WITH DEFAULT VER
     55	000124	103507 				BCS	DELNXT
     56	000126	032761 	000000C	000000G		BIT	#NB.SVR!NB.VER,N.STAT(R1) ;VERSION MUST BE EXPLICIT
     57	000134	001004 				BNE	20$
     58	000136					ERROUT	DE04,1		;VERSION NO. NOT EXPLICIT OR WILD CARD
	000136	104412 				TRAP	X
	000140	000000G				.WORD	DE04SZ
	000142	000000G				.WORD	DE04MG
     59	000144	000477 				BR	DELNXT
     60	000146				20$:	CALL	RMVNXT		;REMOVE THE FILE FROM THE DIRECTORY
     61	000152	103425 				BCS	30$		;BRANCH IF ERROR
     62	000154	042767 	000000G	000000G		BIC	#FRSTIM,CPYCTL
     63	000162	032767 	000000G	000000G		BIT	#RMVBIT,CMDWRD	;IF REMOVE COMMAND
     64	000170	001012 				BNE	25$		;SKIP THE MARK FOR DELETE
     65	000172	010146 			22$:	MOV	R1,-(SP)
     66	000174	012701 	000000G			MOV	#IO.DEL,R1	;FUNCTION CODE FOR MARK FOR DELETE
     67	000200	012702 	000001 			MOV	#1,R2
     68	000204	010603 				MOV	SP,R3		;1 ADDITIONAL PARAM ON TOP OF STACK
     69	000206					CALL	.XQIO		;ISSUE THE MARK FOR DELETE AND WAIT
     70	000212	012601 				MOV	(SP)+,R1
     71	000214	103420 				BCS	40$
     72	000216				25$:	CALL	NXTFIL		;ANY MORE FILES IN THIS FILE SPEC?
     73	000222	103351 				BCC	20$		;BRANCH IF YES - DELETING A CLASS
     74	000224	000447 				BR	DELNXT		;DONE WITH THIS SPECIFIER
     75					;
     76					; ERROR FROM REMOVE - NO SUCH FILE WOULD INDICATE DONE
     77	000226				30$:	CALL	RMVERR
     78	000232	116705 	000000C			MOVB	FDBOUT+F.ERR,R5	;R5=ERROR CODE
     79	000236	122705 	000000G			CMPB	#IE.NSF,R5	;IF NO SUCH FILE, THEN GO DO NEXT SPEC
     80	000242	001440 				BEQ	DELNXT
     81	000244	122705 	000000G			CMPB	#IE.WER,R5	; CHECK FOR WRITE ERROR (UNIT WRITE LOCKED)
     82	000250	001035 				BNE	DELNXT		; ANYTHING ELSE, TRY NEXT FILE SPEC
     83	000252	000167 	000000G			JMP	CLOSX		;TERMINATE THE DELETE OPERATION
     84					;
     85					; FAILED TO MARK FILE FOR DELETION
     86	000256				40$:	ERROUT	DE01,0,0
	000256	104426 				TRAP	X
	000260	000000G				.WORD	DE01SZ
	000262	000000G				.WORD	DE01MG
     87					;
     88					; NOW REENTER THE REMOVED DIRECTORY ENTRY TO FIX THINGS UP
     89	000264	012700 	000000G			MOV	#FDBOUT,R0
     90	000270	016002 	000000G			MOV	F.DSPT(R0),R2
     91	000274	005762 	000016 			TST	N.FLID(R2)
     92	000300	001021 				BNE	DELNXT		;IF EXPLICIT FILE ID, SKIP THIS
     93	000302	012701 	000000C			MOV	#FDBOUT+F.FNB,R1
     94	000306	016146 	000000G			MOV	N.NEXT(R1),-(SP) ;SAVE FIND/REMOVE NEXT POINTER
     95	000312					CALL	.ENTER
     96	000316	012661 	000000G			MOV	(SP)+,N.NEXT(R1)
     97	000322	103335 				BCC	25$		;BRANCH IF REENTER WORKED
     98					;
     99					; NOW WE REALLY HAVE TROUBLE, COULDN'T PUT DIRECTORY ENTRY BACK
    100					; FILE IS LOST, SHOULD AT LEAST TYPE FILE ID - BUT NOT YET DOING SO
    101	000324					ERROUT	DE02,0,0
	000324	104426 				TRAP	X
	000326	000000G				.WORD	DE02SZ
PIPDEL M0212, DELETE & REMOVE C	MACRO M1108  05-DEC-77 23:59  PAGE 7-2
**** PIPDEL VERSION M0212 ****

	000330	000000G				.WORD	DE02MG
    102					;
    103					; SET UP TO GO DO THE NEXT FILE
    104	000332	012700 	000000G			MOV	#FDBOUT,R0
    105	000336	012701 	000000C			MOV	#FDBOUT+F.FNB,R1
    106	000342	000725 				BR	25$
    107					; GO GET THE NEXT FILE SPECIFIER IF ANY MORE IN THE LIST
    108	000344	012767 	000001 	000000G	DELNXT:	MOV	#1,PURGCT
    109	000352					CALL	NXTOUT
    110	000356	103402 				BCS	10$
    111	000360	000167 	177420 			JMP	DELET1		;GO DO THE NEXT FILE SPECIFIER
    112	000364	000167 	000000G		10$:	JMP	AGAIN		;NO MORE FILES IN LIST
    113					;
    114					; PURGE MODE FOR THIS FILE SPECIFIER (LOCAL SWITCH)
    115					; DELETE ALL BUT THE MOST RECENT VERSION OF THE SPECIFIED
    116					; FILE(S).  IF THE OPTIONAL VALUE IS SPECIFIED, THEN IF N IS
    117					; THE MOST RECENT VERSION AND M IS THE VALUE, THEN VERSION N-M+1
    118					; THOUGH VERSION N WILL NOT BE DELETED. I.E THE MOST RECENT M
    119					; VERSIONS WILL NOT BE DELETED WHERE THE VERSIONS ARE ASSUMED
    120					; CONSECUTIVELY NUMBERED
    121	000370	052761 	000000G	000000G	DELPUR:	BIS	#NB.SVR,N.STAT(R1) ;USER NEED NOT TYPE WILD VERSION
    122	000376				10$:	CALL	FNDNXT		;FIND THE NEXT FILE IN THE CLASS
    123	000402	103503 				BCS	80$
    124	000404	042767 	000000G	000000G		BIC	#FRSTIM,CPYCTL
    125	000412	016146 	000000G			MOV	N.NEXT(R1),-(SP) ;SAVE FIND NEXT POINTER
    126	000416	016146 	000000G			MOV	N.STAT(R1),-(SP) ;AND STATUS BITS
    127	000422	005061 	000000G			CLR	N.NEXT(R1)	;START AT BEGINNING OF DIRECTORY
    128	000426	005061 	000000G			CLR	N.STAT(R1)	;NO WILD CARDS
    129	000432	005061 	000000G			CLR	N.FVER(R1)	;FIND THE MOST RECENT VERSION NO.
    130	000436					CALL	FINDFL
    131	000442	103466 				BCS	85$
    132	000444	016105 	000000G			MOV	N.FVER(R1),R5	;SAVE THE NEWEST VERSION
    133	000450	166705 	000000G			SUB	PURGCT,R5	;R5=HIGHEST DELETABLE VERSION
    134	000454	003443 				BLE	28$		;BRANCH IF NONE TO DELETE IN THIS CLASS
    135	000456	005061 	000000G			CLR	N.NEXT(R1)
    136	000462	052760 	000000G	000000C	20$:	BIS	#NB.SVR,F.FNB+N.STAT(R0) ;FIND WILD CARD VERSION
    137	000470				25$:	CALL	FINDFL
    138	000474	103436 				BCS	30$
    139	000476	026105 	000000G			CMP	N.FVER(R1),R5
    140	000502	101372 				BHI	25$		;BRANCH IF TOO NEW TO DELETE
    141	000504	016146 	000000G			MOV	N.NEXT(R1),-(SP)
    142	000510	005061 	000000G			CLR	N.NEXT(R1)
    143	000514	005061 	000000G			CLR	N.STAT(R1)
    144	000520					DELET$	R0		;DELETE THIS ONE
    145	000524	012661 	000000G			MOV	(SP)+,N.NEXT(R1)
    146	000530	103354 				BCC	20$		;GO FIND THE NEXT ONE
    147					;
    148					; ERROR FROM DELETE
    149	000532	010046 				MOV	R0,-(SP)
    150	000534	010546 				MOV	R5,-(SP)
    151	000536					ERROUT	DE09,0,0
	000536	104426 				TRAP	X
	000540	000000G				.WORD	DE09SZ
	000542	000000G				.WORD	DE09MG
    152	000544	012605 				MOV	(SP)+,R5
    153	000546	012600 				MOV	(SP)+,R0
    154					;
PIPDEL M0212, DELETE & REMOVE C	MACRO M1108  05-DEC-77 23:59  PAGE 7-3
**** PIPDEL VERSION M0212 ****

    155					; FILE PROCESSOR WRITE ERROR AT THIS POINT PROBABLY MEANS THAT THE
    156					; VOLUME IS WRITE LOCKED, STOP THE DELETE LOOP NOW.
    157					;
    158	000550	122767 	000000G	000000C		CMPB	#IE.WER,FDBOUT+F.ERR
    159	000556	001341 				BNE	20$
    160	000560	000167 	000000G			JMP	CLOSX
    161	000564	112760 	000000G	000000G	28$:	MOVB	#IE.NSF,F.ERR(R0)
    162					;
    163					; DONE PURGING THIS FILE NAME, GO GET ANOTHER
    164	000572	012661 	000000G		30$:	MOV	(SP)+,N.STAT(R1)
    165	000576	012661 	000000G			MOV	(SP)+,N.NEXT(R1)
    166	000602	122760 	000000G	000000G		CMPB	#IE.NSF,F.ERR(R0)
    167	000610	001672 				BEQ	10$
    168					;
    169					; FILE NOT FOUND, PROBABLY ALL DONE
    170	000612				80$:	CALL	FNDERR
    171	000616	000652 				BR	DELNXT
    172	000620	062706 	000004 		85$:	ADD	#4,SP
    173	000624	000772 				BR	80$
    174
    175					;
    176					;
    177		000001 				.END
PIPDEL M0212, DELETE & REMOVE C	MACRO M1108  05-DEC-77 23:59  PAGE 7-4
SYMBOL TABLE

AGAIN = ****** GX	DE09MG= ****** GX	F.RCTL= ****** GX	N.FVER= ****** GX	R$$DPB= 000001
CLOSX = ****** GX	DE09SZ= ****** GX	IE.NSF= ****** GX	N.NEXT= ****** GX	R$$DYM= 000001
CMDWRD= ****** GX	DI08MG= ****** GX	IE.PRI= ****** GX	N.SPEC= 000014   	R$$EIS= 000000
CPYCTL= ****** GX	DI08SZ= ****** GX	IE.WER= ****** GX	N.STAT= ****** GX	R$$11M= 000001
DELETE  000000RG    002	FDBOUT= ****** GX	IO.DEL= ****** GX	PARSE = ****** GX	S.APPD= 000010
DELET1  000004R     002	FD.DIR= ****** GX	NB.SFL= ****** GX	PAR$$$= 000000   	S.FIDS= 000014
DELNXT  000344R     002	FINDFL= ****** GX	NB.SVR= ****** GX	PRSERR= ****** GX	USEFID= ****** GX
DELPUR  000370R     002	FNDERR= ****** GX	NB.VER= ****** GX	PURGBT= ****** GX	WLDVER= ****** GX
DE01MG= ****** GX	FNDNXT= ****** GX	NXTFIL= ****** GX	PURGCT= ****** GX	X     = 000026
DE01SZ= ****** GX	FRSTIM= ****** GX	NXTOUT= ****** GX	REMOVE  000000RG    002	$$    = 000067
DE02MG= ****** GX	FSTOUT= ****** GX	N.DEVD= 000000   	RMVBIT= ****** GX	.DELET= ****** G
DE02SZ= ****** GX	F.DSPT= ****** GX	N.DIRD= 000004   	RMVERR= ****** GX	.ENTER= ****** GX
DE04MG= ****** GX	F.ERR = ****** GX	N.FLID= 000016   	RMVNXT= ****** GX	.XQIO = ****** GX
DE04SZ= ****** GX	F.FNB = ****** GX	N.FNMD= 000010

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

VIRTUAL MEMORY USED:  3100 WORDS  ( 13 PAGES)
DYNAMIC MEMORY:  4160 WORDS  ( 16 PAGES)
ELAPSED TIME:  00:00:21
[63,10]PIPDEL,[63,20]PIPDEL/-SP=[63,30]PIPMAC,PIPDEL
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00
TABLE OF CONTENTS

    7-   1	**** PIPDIR VERSION M0216 ****
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 7


      1						.TITLE	PIPDIR M0216, LIST DIRECTORY COMMAND-PIP
						.SBTTL	**** PIPDIR VERSION M0216 ****
						.IDENT	/M0216/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  19 FEB 75  14:30
      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	2-MAY-74
     21					;
     22						.IF	GT,R$$11M
     23						.MACRO	PUT$	A1,A2,A3,A4
     24						.MCALL	PUT$S
     25						PUT$S	A1,A2,A3,A4
     26						.ENDM	PUT$
     27						.ENDC
     28	000000					FLDSOF
     29						.MCALL	CSI$
     30	000000					CSI$
     31
     32						.MCALL	CALL,RETURN,QIO$S,WTSE$S
     33						.MCALL	FDBF$R,FDAT$R,OPEN$W,OFNB$W,PUT$,GTIM$S
     34
     35
     36		000014 				FF=14			;FORM FEED CHARACTER
     37					;
     38					; DIRECTORY LISTING  - CONVERSION STRINGS
     39	000000					MSGZ	LI01,< FILE ID %P,%P,%O>
     40	000000					MSGZ	LI02,<%N%X>
     41	000000					MSG	LI03,<READ ATTRIBUTES ERR - >
     42	000000					MSG	TOTH,<STORAGE USED/ALLOCATED FOR >
     43	000000					MSGZ	DIRH,<DIRECTORY %2A%O:>
     44	000000					MSGZ	TIME,<%N%Y %2Z>
     45	000000					MSGZ	TOT1,<%N%N	TOTAL OF >
     46	000000					MSGZ	TOT2,<. BLOCKS IN %D. FILES>
     47	000000					IMPURE
     48
     49					;
     50					; ***** DO NOT SEPARATE THE FOLLOWING
     51					;
     52	000000				FILCNT:	.BLKW	1		;COUNT OF FILES IN THIS DIRECTORY
     53	000002				FILUSD:	.BLKW	2		;COUNT OF BLOCKS USED
     54	000006				FILALC:	.BLKW	2		;COUNT OF BLOCKS ALLOCATED
     55					;
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 7-1
**** PIPDIR VERSION M0216 ****

     56					; ***** DO NOT SEPARATE THE PRECEEDING
     57					;
     58	000012				USDMSG:	.BLKW	1		;0 IF NO "USED" MESSAGE IS TO BE OUTPUT
     59									;END OF MESSAGE POINTER IF MSG NEEDS TO BE TYPED
     60	000014				DIHDMG:	.BLKW	1		;0 IF NO DIRECTORY HEADER MESSAGE TO TYPE
     61									;END OF MESSAGE PTR IF NEED TO OUTPUT HDR
     62	000016				DIROUT:	.BLKW	1		;0 IF NO OUTPUT DONE YET
     63									;NON ZERO IF ANY OUTPUT HAS BEEN DONE
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 8
**** PIPDIR VERSION M0216 ****

     65	000020					PURE.I
     66
     67					; LIST THE DIRECTORY TO THE SPECIFIED OUTPUT FILE
     68
     69	000000	012767 	000000G	000000C	DIRLST::MOV	#OFNPT,FDBIN+F.DSPT ;ASSUME NO LISTING FILE SPEC
     70	000006	012767 	000000G	000000C		MOV	#NAMBLK,FDBIN+F.DFNB
     71	000014	012767 	000000G	000000C		MOV	#IFNPT,FDBOUT+F.DSPT	;NULL DSPT IF NO INPUT SPEC
     72	000022	012767 	000000G	000000C		MOV	#SYDFLT,FDBOUT+F.DFNB
     73	000030	016767 	000000G	000000C		MOV	CODEV,SYDFLT+N.DVNM ;DEFAULT OUTPUT TO CO:
     74	000036	016767 	000000G	000000C		MOV	COUNIT,SYDFLT+N.UNIT
     75	000044	012767 	000000G	000000G		MOV	#FD.PLC,INRACC
     76	000052	012767 	000000G	000000G		MOV	#FD.PLC,OURACC
     77	000060	005767 	000000G			TST	INSPEC		;WAS THERE AN INPUT SPEC?
     78	000064	001423 				BEQ	10$		;BRANCH IF NO
     79	000066	016767 	000000G	000000G		MOV	.OULCL,.LCLSW	;LOCAL SWITCHES ON OUTSPEC ARE STICKY
     80	000074	012767 	000000G	000000C		MOV	#IFNPT,FDBIN+F.DSPT ;USE INPUT SPECIFIER FOR DIRECTORY
     81	000102	012767 	000000G	000000C		MOV	#OFNPT,FDBOUT+F.DSPT ;OUTPUT SPEC FOR LISTING
     82	000110	032767 	000003 	000000G		BIT	#CS.DIF!CS.NMF,OUSPEC ;IF OUTPUT FILE NAME SPECIFIED
     83	000116	001406 				BEQ	10$
     84	000120	012767 	000000G	000000C		MOV	#SYDEV,SYDFLT+N.DVNM ;DEFAULT TO SY0:
     85	000126	012767 	000000G	000000C		MOV	#SYUNIT,SYDFLT+N.UNIT
     86					;
     87					; NORMAL DIRECTORY LISTING
     88	000134	005001 			10$:	CLR	R1		;R1 MEANS NO DEFAULT DIRECTORY ID
     89	000136	005002 				CLR	R2		;NO DEFAULT FILE NAME AND TYPE
     90	000140					CALL	STNMBK		;INIT THE NAMBLK
     91	000144	005067 	000012'			CLR	USDMSG		;NO TOTAL LINE TO BE TYPED
     92	000150	005067 	000016'			CLR	DIROUT		;NO OUTPUT DONE YET
     93	000154	012701 	000000C			MOV	#<<<LINBFS+3>&177774>+1000>,R1
     94	000160					CALL	.DYALC		;ALLOCATE A LINE AND HEADER BUFFER
     95	000164	062700 	000000C			ADD	#<<LINBFS+3>&177774>,R0 ;CALCULATE HEADER BUFFER ADDRESS
     96	000170	010067 	000000G			MOV	R0,.HDRAD	;AND SAVE IT
     97					;
     98					; HERE FOR EACH NEW DIRECTORY SPECIFIER
     99					;
    100	000174	012700 	000000G		DIRLS1:	MOV	#FDBIN,R0
    101	000200					CALL	PARSE
    102	000204	103004 				BCC	20$
    103	000206					CALL	PRSERR
    104	000212	000167 	000000G			JMP	CLOSX
    105	000216	016267 	000014 	000000G	20$:	MOV	N.SPEC(R2),INSPEC ;MOV OUSPEC TO INSPEC IF NO LIST FILE
    106	000224	132760 	000000G	000000G		BITB	#FD.DIR,F.RCTL(R0)
    107	000232	001003 				BNE	25$		;BRANCH IF DIRECTORY DEVICE
    108	000234					ERROUX	DI08,1
	000234	104413 				TRAP	X
	000236	000000G				.WORD	DI08SZ
	000240	000000G				.WORD	DI08MG
    109	000242	016067 	000000G	000000G	25$:	MOV	F.FVER(R0),VERSAV
    110	000250	005762 	000016 			TST	N.FLID(R2)	;IF FILE ID WAS SPECIFIED, USE IT
    111	000254	001412 				BEQ	40$
    112	000256	016261 	000016 	000000G		MOV	N.FLID(R2),N.DID(R1) ;PUT FILE ID IN DIRECTORY ID SLOT
    113	000264	016261 	000020 	000002G		MOV	N.FLID+2(R2),N.DID+2(R1)
    114	000272	016261 	000022 	000004G		MOV	N.FLID+4(R2),N.DID+4(R1)
    115	000300	000407 				BR	DIRLS2		;NEW DIRECTORY TO LIST
    116	000302	032767 	000006 	000000G	40$:	BIT	#CS.DIF!CS.DVF,INSPEC ;NEW DIRECTORY?
    117	000310	001003 				BNE	DIRLS2		;BRANCH IF YES
    118	000312	005767 	000000C			TST	FDBOUT+F.BDB	;IF NOT FIRST DIRECTORY (OUT FILE OPEN)
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 8-1
**** PIPDIR VERSION M0216 ****

    119	000316	001020 				BNE	DIRLS3		;THEN NOT A NEW DIRECTORY
    120	000320	016700 	000012'		DIRLS2:	MOV	USDMSG,R0	;PRINT "M BLOCKS USED IN N FILES"
    121	000324	001404 				BEQ	10$		;BRANCH IF NOTHING TO PRINT
    122	000326	005067 	000012'			CLR	USDMSG		;SO IT WON'T BE DONE AGAIN
    123	000332					CALL	EDTPT1		;OUTPUT THE"TOTAL" MESSAGE
    124	000336	012702 	000005 		10$:	MOV	#5,R2		;NO. OF WORDS OF FILE AND SIZE COUNTING
    125	000342	012701 	000000'			MOV	#FILCNT,R1	;REINIT THE COUNTS FOR THE NEW DIRECTORY
    126	000346	005021 			20$:	CLR	(R1)+
    127	000350					SOB	R2,20$
    128	000354	005267 	000014'			INC	DIHDMG		;FORCE THIS NON ZERO INDICATING NEW DIR
    129	000360	032767 	000001 	000000G	DIRLS3:	BIT	#CS.NMF,INSPEC	;IF NOT LISTING ENTIRE DIRECTORY
    130	000366	001006 				BNE	45$		;BRANCH IF NOT LISTING ENTIRE DIRECTORY
    131					;
    132					; LISTING ENTIRE DIRECTORY
    133	000370	052767 	000001 	000000G		BIS	#CS.NMF,INSPEC	;SAY THAT FILE NAME WAS SPECIFIED
    134	000376	052767 	000000G	000000C		BIS	#NB.SFN,FDBIN+F.FNB+N.STAT ;IT WAS *.*;*
    135	000404	052767 	000000G	000000G	45$:	BIS	#FRSTIM,CPYCTL
    136	000412	012700 	000000G			MOV	#FDBOUT,R0
    137	000416	005760 	000000G			TST	F.BDB(R0)
    138	000422	001044 				BNE	60$		;BRANCH IF LISTING FILE ALREADY OPEN
    139	000424					FDAT$R	R0,#R.VAR,#0	;VARIABLE LENGTH, NO CARRIAGE CONTROL
    140					; OVERIDE DEFAULT BUFFER SIZE FOR LONG PARTIAL LOCATE MODE PUTS
    141	000436					FDBF$R	R0,,#LINBFS,#3 ;FORCE 3 BUFS
    142					;
    143						.IF	EQ,R$$11M
    144						OPEN$W	R0,,,OURACC,#LINBUF,#LINBFS
    145						.IFF
    146	000452					CALL	PARSE
    147	000456	103004 				BCC	58$
    148	000460					CALL	PRSERR		;ERROR FROM PARSE
    149	000464	000167 	000000G			JMP	CLOSX
    150	000470				58$:	OFNB$W	R0,,,OURACC,#LINBUF,#LINBFS
    151						.ENDC
    152					;
    153	000524	103563 				BCS	94$		;BRANCH IF FAILED TO OPEN OUTPUT FILE
    154	000526					CALL	RECATT		;ATTACH DEVICE IF TTY
    155	000532	103551 				BCS	82$		;BRANCH IF FAILED
    156	000534	016700 	000000G		60$:	MOV	.DYBUF,R0
    157	000540	005767 	000016'			TST	DIROUT		;HAS THERE BEEN ANY OUTPUT YET?
    158	000544	001007 				BNE	62$		;BRANCH IF YES
    159	000546	132767 	000000G	000000C		BITB	#FD.TTY,FDBOUT+F.RCTL
    160	000554	001003 				BNE	62$
    161	000556	112720 	000014 			MOVB	#FF,(R0)+	;FORM FEED IF NOT TTY
    162	000562	000407 				BR	65$
    163	000564	112720 	000015 		62$:	MOVB	#15,(R0)+
    164	000570	012701 	000012 			MOV	#12,R1		;A FEW BLANK LINES FOR TTY
    165	000574	110120 				MOVB	R1,(R0)+
    166	000576	110120 				MOVB	R1,(R0)+
    167	000600	110120 				MOVB	R1,(R0)+
    168	000602	010046 			65$:	MOV	R0,-(SP)
    169	000604					CALL	STFIND		;START THE FIRST FIND OPERATION
    170	000610	012600 				MOV	(SP)+,R0
    171	000612	016746 	000000C			MOV	FDBIN+F.UNIT,-(SP)
    172	000616	012746 	000000C			MOV	#FDBIN+F.DVNM,-(SP)
    173	000622	010602 				MOV	SP,R2
    174	000624	012701 	000110'			MOV	#DIRHMG,R1
    175	000630	032767 	000000G	000000G		BIT	#TOTLBT,CMDWRD	;IF JUST LISTING TOTALS
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 8-2
**** PIPDIR VERSION M0216 ****

    176	000636	001402 				BEQ	66$
    177	000640	012701 	000055'			MOV	#TOTHMG,R1	;USE THE OTHER MESSAGE
    178	000644				66$:	CALL	$EDMSG		;"DIRECTORY DK0:"
    179	000650	022626 				CMP	(SP)+,(SP)+
    180	000652	016702 	000000C			MOV	FDBIN+F.DSPT,R2
    181	000656	005762 	000016 			TST	N.FLID(R2)	;WAS FILE ID OF DIRECTORY FILE GIVEN
    182	000662	001023 				BNE	70$		;BRANCH IF YES
    183					; DIRECTORY NAME
    184	000664	132767 	000000G	000000C		BITB	#FD.SDI,FDBIN+F.RCTL ;IF SINGLE DIRECTORY DEVICE
    185	000672	001025 				BNE	75$		;DON'T PRINT DIRECTORY NAME
    186	000674	016701 	000000C			MOV	FDBIN+F.DSPT,R1
    187	000700	016102 	000006 			MOV	N.DIRD+2(R1),R2	;R2=ADDRESS OF DIRECTORY STRING
    188	000704	016101 	000004 			MOV	N.DIRD(R1),R1	;R1=SIZE OF DIRECTORY STRING
    189	000710	001004 				BNE	67$		;BRANCH IF STRING IS NOT NULL
    190	000712					CALL	.RDFDR		;OTHERWISE USE DEFAULT DIRECTORY
    191	000716	005701 				TST	R1		;IF NULL DEFAULT DIRECTORY
    192	000720	001412 				BEQ	75$		;SKIP PRINTING THE DIRECTORY NAME
    193	000722	112220 			67$:	MOVB	(R2)+,(R0)+	;MOVE THE DIRECTORY STRING
    194	000724					SOB	R1,67$
    195	000730	000406 				BR	75$
    196					; LISTING DIRECTORY BY FILE ID
    197	000732	062702 	000016 		70$:	ADD	#N.FLID,R2
    198	000736	012701 	000000'			MOV	#LI01MG,R1
    199	000742					CALL	$EDMSG		;"FILE ID 401,5743"
    200	000746	032767 	000000G	000000G	75$:	BIT	#SHTLST,CMDWRD	;IF BRIEF DIRECTORY LISTING
    201	000754	001013 				BNE	78$		;SKIP THE DATE AND TIME
    202	000756	016702 	000000G			MOV	.HDRAD,R2
    203	000762					GTIM$S	R2		;READ TIME OF DAY
    204	000772	103434 				BCS	88$
    205	000774	012701 	000131'			MOV	#TIMEMG,R1
    206	001000					CALL	$EDMSG
    207	001004	112720 	000015 		78$:	MOVB	#15,(R0)+
    208	001010	112720 	000012 			MOVB	#12,(R0)+
    209	001014	005767 	000014'			TST	DIHDMG		;ZERO IF ALREADY TYPED HEADER
    210	001020	001415 				BEQ	80$
    211	001022	010067 	000014'			MOV	R0,DIHDMG	;NOTE HEADER MESSAGE TO BE TYPED
    212	001026	016701 	000000C			MOV	FDBIN+F.FNB+N.STAT,R1
    213	001032	042701 	000000C			BIC	#^C<NB.SDI!NB.SNM!NB.STP>,R1
    214	001036	022701 	000000C			CMP	#<NB.SDI!NB.SNM!NB.STP>,R1 ;IF [*,*]*.* (OR [*,*]*.*;*)
    215	001042	001004 				BNE	80$
    216	001044	005067 	000014'			CLR	DIHDMG		;PRINT THE DIRECTORY HEADER
    217	001050					CALL	EDTPT1		;WHETHER OR NOT THE DIRECTORY IS EMPTY
    218	001054	000414 			80$:	BR	GTENT		;OTHERWISE OUTPUT IT LATER
    219					;
    220					; FAILED TO ATTACH THE TTY
    221	001056				82$:	ERROUX	DI06,0,0
	001056	104427 				TRAP	X
	001060	000000G				.WORD	DI06SZ
	001062	000000G				.WORD	DI06MG
    222					;
    223					; FAILED TO GET TIME INFORMATION
    224	001064				88$:	ERROUX	DI07
	001064	104403 				TRAP	X
	001066	000000G				.WORD	DI07SZ
	001070	000000G				.WORD	DI07MG
    225	001072	000403 				BR	98$
    226					;
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 8-3
**** PIPDIR VERSION M0216 ****

    227					; FAILED TO OPEN LISTING FILE
    228	001074				94$:	ERROUT	OP02,0,0
	001074	104426 				TRAP	X
	001076	000000G				.WORD	OP02SZ
	001100	000000G				.WORD	OP02MG
    229	001102	000167 	000000G		98$:	JMP	CLOSX
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 9
**** PIPDIR VERSION M0216 ****

    231	001106	032767 	000000G	000000C	GTENT:	BIT	#NB.SFN,FDBIN+F.FNB+N.STAT ;ANY WILD CARDS?
    232	001114	001004 				BNE	10$		;BRANCH IF YES
    233	001116	032767 	000000G	000000G		BIT	#FRSTIM,CPYCTL	;IF FIRST FIND, DO IT
    234	001124	001416 				BEQ	15$		;OTHERWISE STOP NOW
    235	001126	042767 	000000G	000000G	10$:	BIC	#FRSTIM,CPYCTL	;NO LONGER THE FIRST TIME
    236	001134	012700 	000000G			MOV	#FDBIN,R0
    237	001140	012702 	000000G			MOV	#FNAEFN,R2	;R2=EVENT FLAG FOR PENDING FIND QI/O
    238	001144	012701 	000000G			MOV	#FNASTS,R1	;R1 = I/O STATUS BLOCK ADR FOR FIND
    239	001150					CALL	WATQIO		;WAIT FOR THE LAST FIND QI/O TO COMPLETE
    240	001154	103004 				BCC	20$		;BRANCH IF IT WAS SUCCESSFUL
    241	001156					CALL	FNDERR		;NORMAL TERMINATION IF NO SUCH FILE
    242	001162	000167 	000514 		15$:	JMP	LSTNXT
    243	001166	005267 	000000'		20$:	INC	FILCNT		;COUNT THIS FILE
    244	001172	016700 	000014'			MOV	DIHDMG,R0	;SEE IF DIRECTORY HEADER MSG TO OUTPUT
    245	001176	001404 				BEQ	25$		;BRANCH IF NONE
    246	001200	005067 	000014'			CLR	DIHDMG		;ONLY OUTPUT IT ONCE
    247	001204					CALL	EDTPT1
    248	001210	012701 	000000C		25$:	MOV	#FDBIN+F.FNB,R1
    249	001214	012700 	000000G			MOV	#NMBLK1,R0
    250	001220	012702 	000000G			MOV	#S.FNBW,R2	;R2 = SIZE IN WORDS OF FILE NAME BLOCK
    251	001224	012120 			30$:	MOV	(R1)+,(R0)+	;MOVE FDB'S FNB TO NMBLK1
    252	001226					SOB	R2,30$
    253					;
    254					; R0=FILE NAME BLOCK ADDRESS TO LIST DIRECTORY FROM
    255					;
    256	001232	032767 	000000G	000000G		BIT	#SHTLST,CMDWRD	;IF BRIEF MODE LISTING
    257	001240	001031 				BNE	50$		;SKIP THE READ ATTRIBUTES
    258					;
    259					; START UP THE READ ATTRIBUTES, WAIT FOR COMPLETION LATER
    260					;
    261
    262						.IF	EQ,R$$DPB	;IF OLD DPB FORMAT
    263						QIO$S	#IO.RAT,#INLUN,#RATEFN,,#IOSTBK,,<#NMBLK1,#HDBLK,#STBLK>
    264						.IFF			;IF NEW DPB FORMAT
    265	001242					QIO$S	#IO.RAT,#INLUN,#RATEFN,,#IOSTBK,,<#NMBLK1,#RATCTL,,,,>
    266						.ENDC
    267
    268	001314	103003 				BCC	50$		;BRANCH IF QIO WAS OK
    269	001316	113767 	000000G	000000G		MOVB	@#$DSW,IOSTBK	;SET ERROR CODE FOR WAIT TO SEE
    270					;
    271					; START THE NEXT FIND NAME QI/O UNLESS JUST LISTING ONE FILE
    272					;
    273	001324	032767 	000000G	000000C	50$:	BIT	#NB.SFN,FDBIN+F.FNB+N.STAT
    274	001332	001402 				BEQ	60$		;BRANCH IF NO WILD CARDS
    275	001334					CALL	STFIND		;START UP THE NEXT FIND QI/O
    276	001340	012702 	000000G		60$:	MOV	#NMBLK1,R2	;R2=FILE NAME BLOCK ADDRESS
    277	001344	016700 	000000C			MOV	FDBOUT+F.NRBD+2,R0 ;R0=ADDRESS TO STORE STRING TO PUT$
    278	001350	062702 	000000G			ADD	#N.FNAM,R2	;POINT AT FILE NAME FIELD
    279	001354	012701 	000022'			MOV	#LI02MG,R1
    280	001360					CALL	$EDMSG		;CONVERT THE FILE NAME
    281	001364	032767 	000000G	000000G		BIT	#SHTLST,CMDWRD
    282	001372	001116 				BNE	DIRPUT
    283	001374	162701 	000002 			SUB	#2,R1		;DON'T COUNT CR,LF
    284	001400	012705 	000000G			MOV	#HDRTB1,R5
    285	001404					CALL	HDFILL		;ADD BLANKS TO FILL THE FIELD
    286	001410					CALL	EDTPUT		;OUTPUT THE FILE NAME FIELD
    287	001414	012700 	000000G			MOV	#FDBIN,R0
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 9-1
**** PIPDIR VERSION M0216 ****

    288	001420	012702 	000000G			MOV	#RATEFN,R2	;EVENT FLAG FOR READ ATTRIBUTES
    289	001424	012701 	000000G			MOV	#IOSTBK,R1	;I/O STATUS BLOCK FOR RD ATT
    290	001430					CALL	WATQIO		;WAIT FOR I/O DONE ON THE READ ATTRIB
    291	001434	103501 				BCS	RDATER		;BRANCH IF ERROR
    292					;
    293					; IF SEQUENTIAL DEVICE, THEN EFBK IS WRONG
    294					; PUTTING ZERO IN WILL TELL HDRMG TO PRINT ALLOCATED SPACE
    295	001436	016705 	000000G			MOV	.HDRAD,R5	;R5=ADDRESS OF FILE HEADER
    296	001442	132767 	000000G	000000C		BITB	#FD.SQD,FDBIN+F.RCTL
    297	001450	001402 				BEQ	70$
    298	001452	005065 	000000C			CLR	HH.UAT+F.EFBK+2(R5)
    299	001456	016500 	000000C		70$:	MOV	HH.UAT+F.EFBK(R5),R0 ;R0,R1 = EOF FROM RECORD ATTRIBUTES
    300	001462	016501 	000000C			MOV	HH.UAT+F.EFBK+2(R5),R1
    301	001466	001007 				BNE	72$		;IF BOTH ZERO, THEN USE REAL FILE SIZE
    302	001470	005700 				TST	R0
    303	001472	001005 				BNE	72$
    304	001474	016700 	000004G			MOV	STBLK+4,R0	;R0, R1 = REAL FILE SIZE (ALLOCATED)
    305	001500	016701 	000006G			MOV	STBLK+6,R1
    306	001504	000406 				BR	76$
    307	001506	005765 	000000C		72$:	TST	HH.UAT+F.FFBY(R5) ;IF FFBY = 0 THEN EFBK IS 1 TOO BIG
    308	001512	001003 				BNE	76$
    309	001514	162701 	000001 			SUB	#1,R1		;MAKE IT SMALLER
    310	001520	005600 				SBC	R0
    311	001522	060167 	000004'		76$:	ADD	R1,FILUSD+2	;RECORD THIS FILE'S USED SPACE
    312	001526	005500 				ADC	R0
    313	001530	060067 	000002'			ADD	R0,FILUSD
    314	001534	066767 	000006G	000010'		ADD	STBLK+6,FILALC+2 ;AND RECORD SPACE ALLOCATED
    315	001542	005567 	000006'			ADC	FILALC
    316	001546	066767 	000004G	000006'		ADD	STBLK+4,FILALC
    317	001554	016700 	000000C			MOV	FDBOUT+F.NRBD+2,R0
    318	001560	010501 				MOV	R5,R1		;R1=ADDRESS OF HEADER
    319	001562	012702 	000000G			MOV	#STBLK,R2	;R2=ADDRESS OF STATISTICS BLOCK
    320	001566	005003 				CLR	R3		;NO FILE NAME, NOT LONG FORM
    321	001570	032767 	000000C	000000G		BIT	#EVRYBT!TOTLBT,CMDWRD
    322	001576	001412 				BEQ	80$
    323	001600	012703 	000002 			MOV	#2,R3		;LONG FORM, STILL NO FILE NAME
    324	001604	132767 	000000G	000000C		BITB	#FD.TTY,FDBOUT+F.RCTL
    325	001612	001004 				BNE	80$
    326					; FOR OTHER THAN TTY OUTPUT, SET LENGTH OF LINE IN 2ND BYTE OF R3
    327	001614	000303 				SWAB	R3
    328	001616	056703 	000000G			BIS	LPTLEN,R3
    329	001622	000303 				SWAB	R3
    330	001624				80$:	CALL	HDRMG		;CONVERT THE FILE HEADER INFO
    331	001630				DIRPUT:	CALL	EDTPUT
    332	001634	000167 	177246 			JMP	GTENT
    333					;
    334					;ERROR READING ATTRIBUTES
    335	001640	005367 	000000'		RDATER:	DEC	FILCNT		;DON'T COUNT FILES THAT CAN'T BE LISTED
    336	001644	016701 	000000C			MOV	FDBOUT+F.NRBD+2,R1
    337	001650	012702 	000026 			MOV	#LI03SZ,R2
    338	001654	012703 	000027'			MOV	#LI03MG,R3
    339	001660					CALL	MVSTRG
    340	001664	010100 				MOV	R1,R0
    341	001666	116701 	000000C			MOVB	FDBIN+F.ERR,R1
    342	001672					CALL	FCSERR		;CONVERT FCS ERROR TO MESSAGE
    343	001676	000167 	177726 			JMP	DIRPUT
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 10
**** PIPDIR VERSION M0216 ****

    345	001702	005067 	000012'		LSTNXT:	CLR	USDMSG		;NO "TOTAL" MESSAGE
    346	001706	032767 	000000G	000000G		BIT	#SHTLST,CMDWRD	;IF BRIEF MODE, DON'T LIST TOTALS
    347	001714	001054 				BNE	10$
    348	001716	005767 	000000'			TST	FILCNT		;IF NO FILES, SKIP THE TOTAL MESSAGE
    349	001722	001003 				BNE	3$
    350	001724	005767 	000014'			TST	DIHDMG		;IF DIRECTORY HEADER WAS PRINTED, ALLOW TOTALS
    351	001730	001046 				BNE	10$
    352	001732	016700 	000000G		3$:	MOV	.DYBUF,R0	;ADDRESS OF BUFFER TO BUILD MESSAGE
    353	001736	012701 	000142'			MOV	#TOT1MG,R1
    354	001742	005002 				CLR	R2
    355	001744					CALL	$EDMSG
    356	001750	012701 	000002'			MOV	#FILUSD,R1	;ADDRESS OF USED COUNT
    357	001754	005002 				CLR	R2		;SUPPRESS LEAD ZEROES
    358	001756					CALL	$CDDMG		;CONVERT TO DOUBLE PRECISION DECIMAL
    359	001762	032767 	000000C	000000G		BIT	#EVRYBT!TOTLBT,CMDWRD	;IF FULL DIRECTORY LISTING
    360	001770	001411 				BEQ	5$
    361	001772	112720 	000056 			MOVB	#'.,(R0)+	;ALSO OUTPUT ALLOCATED SPACE
    362	001776	112720 	000057 			MOVB	#'/,(R0)+
    363	002002	012701 	000006'			MOV	#FILALC,R1	;ADDRESS OF ALLOCATED SPACE
    364	002006	005002 				CLR	R2
    365	002010					CALL	$CDDMG
    366	002014	012701 	000161'		5$:	MOV	#TOT2MG,R1
    367	002020	012702 	000000'			MOV	#FILCNT,R2	;ADDRESS OF FILE COUNT
    368	002024					CALL	$EDMSG
    369	002030	022767 	000001 	000000'		CMP	#1,FILCNT	;IF ONLY 1 FILE
    370	002036	001001 				BNE	8$
    371	002040	005300 				DEC	R0		;STRIP OFF THE S FROM "FILES"
    372	002042	010067 	000012'		8$:	MOV	R0,USDMSG	;SAVE END POINTER OF MESSAGE
    373	002046				10$:	CALL	CLSIN
    374	002052	012700 	000000G			MOV	#FDBIN,R0
    375	002056					CALL	PRSREG
    376	002062					CALL	.NXDIR		;NEXT WILD CARD DIRECTORY IF ANY
    377	002066	103402 				BCS	20$
    378	002070	000167 	176224 			JMP	DIRLS2
    379	002074				20$:	CALL	FNDERR		;ERR MESSAGE IF NOT IE.NSF
    380	002100	012700 	000000G			MOV	#FDBIN,R0
    381	002104	016001 	000000G			MOV	F.DSPT(R0),R1
    382	002110	012702 	000000G			MOV	#INCSI,R2
    383	002114	020127 	000000G			CMP	R1,#IFNPT
    384	002120	001402 				BEQ	30$
    385	002122	012702 	000000G			MOV	#OUTCSI,R2
    386	002126				30$:	CALL	NXINOU		;GET NEXT SPECIFIER IF ANY
    387	002132	103402 				BCS	40$
    388	002134	000167 	176034 			JMP	DIRLS1
    389	002140	016700 	000012'		40$:	MOV	USDMSG,R0	;SEE IF TOTAL MESSAGE TO BE PRINTED
    390	002144	001010 				BNE	45$
    391	002146	005767 	000016'			TST	DIROUT		;IF NO OUTPUT HAS BEEN DONE YET
    392	002152	001003 				BNE	42$
    393	002154					ERROUX	FI03		;SAY NO SUCH FILES
	002154	104403 				TRAP	X
	002156	000000G				.WORD	FI03SZ
	002160	000000G				.WORD	FI03MG
    394	002162	016700 	000000G		42$:	MOV	.DYBUF,R0	;OTHERWISE JUST OUTPUT A FEW LF'S
    395	002166	112720 	000015 		45$:	MOVB	#15,(R0)+	;CR
    396	002172	012701 	000012 			MOV	#12,R1
    397	002176	110120 				MOVB	R1,(R0)+	;LF
    398	002200	132767 	000000G	000000C		BITB	#FD.TTY,FDBOUT+F.RCTL ;IF OUTPUT TO TERMINAL DEVICE
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 10-1
**** PIPDIR VERSION M0216 ****

    399	002206	001402 				BEQ	50$
    400	002210	110120 				MOVB	R1,(R0)+	;ADD 2 MORE LF'S
    401	002212	110120 				MOVB	R1,(R0)+
    402	002214				50$:	CALL	EDTPT1
    403	002220	000167 	000000G		60$:	JMP	CLOSX
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 11
**** PIPDIR VERSION M0216 ****

    405					;
    406					; OUTPUT RECORD TO LISTING FILE
    407					; INPUTS:
    408					;	R0=POINTER TO END OF STRING
    409					;	FDBOUT+F.NRBD+2 = ADDRESS OF BEGIN OF STRING
    410					; OUTPUTS:
    411					;	R0 ALTERED, OTHERS PRESERVED
    412					; OPERATION:
    413					;	IF I/O ERROR TO LISTING FILE, GIVES ERROR MESSAGE AND
    414					; TERMINATES.  DOES NOT RETURN IN THIS CASE
    415
    416						.ENABL	LSB
    417
    418					;
    419					; HERE TO PRINT THE DIRECTORY HEADER MESSAGE AND TOTAL MESSAGE
    420					;
    421	002224	010067 	000016'		EDTPT1:	MOV	R0,DIROUT	;NOTE THAT OUTPUT HAS BEEN DONE
    422	002230	010146 				MOV	R1,-(SP)	; SAVE REGISTERS
    423	002232	010246 				MOV	R2,-(SP)
    424	002234	016701 	000000G			MOV	.DYBUF,R1	; ADDRESS OF RECORD TO PUT
    425	002240	016702 	000000C			MOV	FDBOUT+F.NRBD+2,R2 ; GET ADDRESS OF RECORD BUFFER
    426	002244	160100 				SUB	R1,R0		; COMPUTE BYTE COUNT
    427	002246	001426 				BEQ	8$		; EXIT ON NULL RECORD
    428	002250	010067 	000000C			MOV	R0,FDBOUT+F.NRBD ; SET RECORD SIZE IN FDB
    429	002254	112122 			1$:	MOVB	(R1)+,(R2)+	; COPY THE RECORD INTO THE BUFFER
    430	002256					SOB	R0,1$
    431	002262	012602 				MOV	(SP)+,R2	; RESTORE REGISTERS
    432	002264	012601 				MOV	(SP)+,R1
    433	002266	000411 				BR	5$
    434					;
    435					; HERE TO PRINT OUT THE DIRECTORY LISTING TEXT FOR EACH FILE
    436					;
    437	002270	032767 	000000G	000000G	EDTPUT:	BIT	#TOTLBT,CMDWRD	;IF JUST PRINTING TOTALS
    438	002276	001012 				BNE	8$		;DON'T PRINT THE DIRECTORY ENTRIES
    439	002300	010067 	000000C			MOV	R0,FDBOUT+F.NRBD
    440	002304	166767 	000000C	000000C		SUB	FDBOUT+F.NRBD+2,FDBOUT+F.NRBD
    441	002312				5$:	PUT$	#FDBOUT
    442	002322	103401 				BCS	10$
    443	002324				8$:	RETURN
    444	002326				10$:	ERROUX	CP14,0,0
	002326	104427 				TRAP	X
	002330	000000G				.WORD	CP14SZ
	002332	000000G				.WORD	CP14MG
    445
    446						.DSABL	LSB
    447
    448					;
    449					; START UP A FIND QI/O OPERATION
    450					;
    451					; INPUTS:
    452					;	NONE
    453					; OUPTUTS:
    454					;	R0=INPUT FDB ADDRESS
    455					;	R1=(R0)+F.FNB
    456					;	R2=0
    457					;
    458	002334	012700 	000000G		STFIND:	MOV	#FDBIN,R0
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 11-1
**** PIPDIR VERSION M0216 ****

    459	002340	012701 	000000C			MOV	#FDBIN+F.FNB,R1
    460	002344	005002 				CLR	R2
    461	002346	016761 	000000G	000000G		MOV	VERSAV,N.FVER(R1)
    462	002354					CALL	.WLDVC		;SPECIAL DEFAULT VERSION LOGIC?
    463	002360	103006 				BCC	5$		;BRANCH IF NO
    464	002362					CALL	.FNDNX		;DO THE SPECIAL FIND
    465	002366	116067 	000000G	000000G		MOVB	F.ERR(R0),FNASTS ;SET STATUS SO WAIT WILL WORK
    466	002374					RETURN
    467	002376				5$:
    468						.IF	EQ,R$$DPB	;IF OLD DPB FORMAT
    469						QIO$S	#IO.FNA,#INLUN,#FNAEFN,,#FNASTS,,<R1>
    470						.IFF			;IF NEW DPB FORMAT
    471	002376					QIO$S	#IO.FNA,#INLUN,#FNAEFN,,#FNASTS,,<,,,,,R1>
    472						.ENDC
    473
    474	002444	103003 				BCC	10$
    475	002446	113767 	000000G	000000G		MOVB	@#$DSW,FNASTS	;PUT ERROR BYTE WHERE WAIT WILL FIND IT
    476	002454				10$:	RETURN
    477					;
    478					; WAIT FOR THE COMPLETION OF A PREVIOUSLY ISSUED QI/O
    479					; INPUTS:
    480					;	R0=FDB ADDRESS, SET F.ERR
    481					;	R1=I/O STATUS BLOCK ADDRESS
    482					;	R2=EVENT FLAG NUMBER
    483					; OUTPUT:
    484					;	C=0 IF OPERATION WAS COMPLETED SUCCESSFULLY
    485					;	C=1 IF ERROR, F.ERR(R0) SET TO REASON
    486					;	ALL REGISTERS PRESERVED
    487					;
    488	002456	000241 			WATQIO:	CLC
    489	002460	111160 	000000G			MOVB	(R1),F.ERR(R0)	;SEE IF OPERATION COMPLETE FIRST
    490	002464	001005 				BNE	20$		;BRANCH IF IT IS
    491	002466					WTSE$S	R2		;WAIT FOR SPECIFIED EVENT FLAG
    492	002476	000767 				BR	WATQIO
    493	002500	003001 			20$:	BGT	30$
    494	002502	000261 				SEC
    495	002504				30$:	RETURN
    496
    497					;
    498					;
    499		000001 				.END
PIPDIR M0216, LIST DIRECTORY CO	MACRO M1108  06-DEC-77 00:00  PAGE 11-2
SYMBOL TABLE

CLOSX = ****** GX	DI07SZ= ****** GX	F.RATT= ****** GX	NB.SFN= ****** GX	STNMBK= ****** GX
CLSIN = ****** GX	DI08MG= ****** GX	F.RCTL= ****** GX	NB.SNM= ****** GX	SYDEV = ****** GX
CMDWRD= ****** GX	DI08SZ= ****** GX	F.RTYP= ****** GX	NB.STP= ****** GX	SYDFLT= ****** GX
CODEV = ****** GX	EDTPT1  002224R     004	F.UNIT= ****** GX	NMBLK1= ****** GX	SYUNIT= ****** GX
COUNIT= ****** GX	EDTPUT  002270R     004	F.URBD= ****** GX	NXINOU= ****** GX	S.APPD= 000010
CPYCTL= ****** GX	EVRYBT= ****** GX	GTENT   001106R     004	N.DEVD= 000000   	S.FIDS= 000014
CP14MG= ****** GX	FCSERR= ****** GX	G.TICP= 000016   	N.DID = ****** GX	S.FNBW= ****** GX
CP14SZ= ****** GX	FDBIN = ****** GX	G.TICT= 000014   	N.DIRD= 000004   	TIMEMG= 000131R     002
CS.DIF= 000002   	FDBOUT= ****** GX	G.TIDA= 000004   	N.DVNM= ****** GX	TIMESZ= 000011
CS.DVF= 000004   	FD.DIR= ****** GX	G.TIHR= 000006   	N.FLID= 000016   	TOTHMG= 000055R     002
CS.EQU= 000040   	FD.PLC= ****** GX	G.TIMI= 000010   	N.FNAM= ****** GX	TOTHSZ= 000033
CS.INP= 000001   	FD.SDI= ****** GX	G.TIMO= 000002   	N.FNMD= 000010   	TOTLBT= ****** GX
CS.MOR= 000020   	FD.SQD= ****** GX	G.TISC= 000012   	N.FVER= ****** GX	TOT1MG= 000142R     002
CS.NMF= 000001   	FD.TTY= ****** GX	G.TIYR= 000000   	N.SPEC= 000014   	TOT1SZ= 000017
CS.OUT= 000002   	FF    = 000014   	HDFILL= ****** GX	N.STAT= ****** GX	TOT2MG= 000161R     002
CS.WLD= 000010   	FILALC  000006R     003	HDRMG = ****** GX	N.UNIT= ****** GX	TOT2SZ= 000026
C.CMLD= 000002   	FILCNT  000000R     003	HDRTB1= ****** GX	OFNPT = ****** GX	USDMSG  000012R     003
C.DEVD= 000006   	FILUSD  000002R     003	HH.UAT= ****** GX	OP02MG= ****** GX	VERSAV= ****** GX
C.DIRD= 000012   	FI03MG= ****** GX	IFNPT = ****** GX	OP02SZ= ****** GX	WATQIO  002456R     004
C.DSDS= 000006   	FI03SZ= ****** GX	INCSI = ****** GX	OURACC= ****** GX	X     = 000027
C.FILD= 000016   	FNAEFN= ****** GX	INLUN = ****** GX	OUSPEC= ****** GX	$CDDMG= ****** GX
C.MKW1= 000024   	FNASTS= ****** GX	INRACC= ****** GX	OUTCSI= ****** GX	$DSW  = ****** GX
C.MKW2= 000026   	FNDERR= ****** GX	INSPEC= ****** GX	PARSE = ****** GX	$EDMSG= ****** GX
C.SIZE= 000054   	FO.WRT= ****** GX	IOSTBK= ****** GX	PAR$$$= 000027   	$$    = 000067
C.STAT= 000001   	FRSTIM= ****** GX	IO.FNA= ****** GX	PRSERR= ****** GX	$$$ARG= 000006
C.SWAD= 000022   	F.BDB = ****** GX	IO.RAT= ****** GX	PRSREG= ****** GX	$$$OST= 000020
C.TYPR= 000000   	F.DFNB= ****** GX	LINBFS= ****** GX	RATCTL= ****** GX	$$$T1 = 000014
DIHDMG  000014R     003	F.DSPT= ****** GX	LINBUF= ****** GX	RATEFN= ****** GX	.DYALC= ****** GX
DIRHMG= 000110R     002	F.DVNM= ****** GX	LI01MG= 000000R     002	RDATER  001640R     004	.DYBUF= ****** GX
DIRHSZ= 000021   	F.EFBK= ****** GX	LI01SZ= 000022   	RECATT= ****** GX	.FNDNX= ****** GX
DIRLST  000000RG    004	F.ERR = ****** GX	LI02MG= 000022R     002	R$$DPB= 000001   	.HDRAD= ****** GX
DIRLS1  000174R     004	F.FACC= ****** GX	LI02SZ= 000005   	R$$DYM= 000001   	.LCLSW= ****** GX
DIRLS2  000320R     004	F.FFBY= ****** GX	LI03MG= 000027R     002	R$$EIS= 000000   	.NXDIR= ****** GX
DIRLS3  000360R     004	F.FNB = ****** GX	LI03SZ= 000026   	R$$MSG= 000000   	.OPFNB= ****** G
DIROUT  000016R     003	F.FVER= ****** GX	LPTLEN= ****** GX	R$$11M= 000001   	.OULCL= ****** GX
DIRPUT  001630R     004	F.MBCT= ****** GX	LSTNXT  001702R     004	R.VAR = ****** GX	.PUTSQ= ****** G
DI06MG= ****** GX	F.NRBD= ****** GX	MVSTRG= ****** GX	SHTLST= ****** GX	.RDFDR= ****** GX
DI06SZ= ****** GX	F.OVBS= ****** GX	NAMBLK= ****** GX	STBLK = ****** GX	.WLDVC= ****** GX
DI07MG= ****** GX	F.RACC= ****** GX	NB.SDI= ****** GX	STFIND  002334R     004

. ABS.	000000	   000
      	000000	   001
MSGSTR	000207	   002
IMPURE	000020	   003
PURE$I	002506	   004
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  5720 WORDS  ( 23 PAGES)
DYNAMIC MEMORY:  6272 WORDS  ( 24 PAGES)
ELAPSED TIME:  00:01:02
[63,10]PIPDIR,[63,20]PIPDIR/-SP=[63,30]PIPMAC,PIPDIR
PIPFRE M0106, PIP - PRINT FREE 	MACRO M1108  06-DEC-77 00:01
TABLE OF CONTENTS

    7-   1	**** PIPFRE VERSION M0106 ****
    8-  51	PRINT FREE SPACE ON VOLUME
   10- 229	FORMAT STRINGS
PIPFRE M0106, PIP - PRINT FREE 	MACRO M1108  06-DEC-77 00:01  PAGE 7


      1						.TITLE	PIPFRE M0106, PIP - PRINT FREE SPACE ON VOLUME
						.SBTTL	**** PIPFRE VERSION M0106 ****
						.IDENT	/M0106/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  1 MAR 76  14:30
      4					; ALTERED WEDNESDAY 8-JAN-75 12:30
      5					; ALTERED TUESDAY 19-NOV-74 16:40
      6					;
      7					; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      8
      9					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     10					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     11					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     12					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     13
     14					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     15					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     16					; EQUIPMENT CORPORATION.
     17
     18					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     19					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     20					;
     21					; PETER H. LIPMAN 8-NOV-74
     22					;
     23	000000					FLDSOF			;DEFINE DESCRIPTOR POINTER OFFSETS
     24						.MCALL	CSI$
     25	000000					CSI$			;DEFINE THE CSI CONTROL BLOCK OFFSETS
     26
     27						.IF	GT,R$$11M
     28						.MACRO	OPEN$	FDB,FACC
     29						.MCALL	OFNB$
     30						OFNB$	FDB,<FACC>
     31						.ENDM	OPEN$
     32						.ENDC
     33
     34						.MCALL	CALL,RETURN,FDOP$R,FDAT$R,FDRC$R,FDBK$R,NMBLK$
     35						.MCALL	OPEN$,QIO$S,WTSE$S,READ$,WAIT$
     36
     37	000000					IMPURE
     38	000000				MAXLBN:	.BLKW	2		;MAXIMUM NO. OF BLOCKS ON VOLUME
     39	000004				NBTBLK:	.BLKW	1		;NO. OF BIT MAP BLOCKS ON VOLUME
     40	000006				MOPRM:	.BLKW	2		;PARAMETER STORAGE FOR CALL TO EDTMG
     41
     42
     43	000012					PURE.D
     44
     45	000000				FRDFNB:	NMBLK$	BITMAP,SYS,1,SY,0
     46
     47	000000					.PSECT
     48
     49	000000					MSG	MFDN,<[0,0]>
PIPFRE M0106, PIP - PRINT FREE 	MACRO M1108  06-DEC-77 00:01  PAGE 8
PRINT FREE SPACE ON VOLUME

     51						.SBTTL	PRINT FREE SPACE ON VOLUME
     52
     53	000000					PURE.I
     54
     55	000000				.FREE::
     56	000000	005767 	000000G			TST	INSPEC		;NO INPUT SPECIFER ALLOWED
     57	000004	001150 				BNE	90$		;BRANCH IF SYNTAX ERROR
     58	000006	032767 	000033 	000000G		BIT	#CS.DIF!CS.NMF!CS.WLD!CS.MOR,OUSPEC
     59	000014	001144 				BNE	90$		;BRANCH IF SYNTAX ERROR
     60	000016	012701 	001000 			MOV	#1000,R1
     61	000022					CALL	.DYALC		;ALLOCATE A BUFFER TO READ THE BITMAP
     62	000026					FDRC$R	#FDBIN,#FD.RWM
     63	000040					FDBK$R	R0,.DYBUF,#1000
     64	000054					FDOP$R	R0,,#OFNPT,#FRDFNB
     65	000070	016767 	000000G	000032'		MOV	.DEFDV,FRDFNB+N.DVNM ; USE DEFAULT DEVICE
     66	000076	016767 	000000G	000034'		MOV	.DEFUN,FRDFNB+N.UNIT ; AND DEFAULT UNIT
     67	000104	012760 	000000G	000000G		MOV	#STBLK,F.STBK(R0) ;READ STATISTICS BLOCK ON OPEN
     68	000112	012767 	000005 	000004G		MOV	#MFDNSZ,OFNPT+N.DIRD ;FORCE MFD DIRECTORY NAME
     69	000120	012767 	000000'	000006G		MOV	#MFDNMG,OFNPT+N.DIRD+2
     70
     71						.IF	GT,R$$11M
     72	000126					CALL	PRSREG		;SET UP FOR CALL TO PARSE
     73	000132					CALL	.PARSE
     74	000136	103004 				BCC	20$		;BRANCH IF SUCCESSFUL
     75	000140					CALL	PRSERR		;ISSUE THE ERROR MESSAGE
     76	000144	000167 	000000G			JMP	CLOSX
     77	000150				20$:
     78						.ENDC
     79
     80	000150					OPEN$	R0,#FO.RD!FA.SHR
     81	000162	103003 				BCC	60$
     82	000164				50$:	ERROUX	FR01,1,0	;FAILED TO OPEN BITMAP FILE
	000164	104433 				TRAP	X
	000166	000000G				.WORD	FR01SZ
	000170	000000G				.WORD	FR01MG
     83	000172	016705 	000006G		60$:	MOV	STBLK+6,R5
     84	000176	010560 	000002G			MOV	R5,F.HIBK+2(R0)	;FIX UP FDB SO EOF IS RIGHT
     85	000202	005205 				INC	R5
     86	000204	010560 	000002G			MOV	R5,F.EFBK+2(R0)	;EOF = 1ST BYTE OF NEXT BLOCK
     87	000210	005060 	000000G			CLR	F.FFBY(R0)
     88	000214					READ$	R0		;READ VBN 1
     89	000220	103445 				BCS	RDERR
     90	000222					WAIT$	R0
     91	000226	103442 				BCS	RDERR		;BRANCH IF ERROR
     92	000230	016701 	000000G			MOV	.DYBUF,R1
     93	000234	116103 	000003 			MOVB	3(R1),R3	;NO. OF BIT MAP BLOCKS
     94	000240	010367 	000004'			MOV	R3,NBTBLK
     95	000244	006303 				ASL	R3		;CALCULATE ADDRESS OF MAXLBN
     96	000246	006303 				ASL	R3
     97	000250	060301 				ADD	R3,R1
     98	000252	062701 	000004 			ADD	#4,R1		;4 PLUS 2 WORDS FOR EACH BIT MAP BLOCK
     99	000256	012167 	000000'			MOV	(R1)+,MAXLBN
    100	000262	011167 	000002'			MOV	@R1,MAXLBN+2
    101					;
    102					; R0=FDB ADDRESS OF BITMAP, FILE IS OPEN
    103	000266					CALL	MAPFRE		;GET COUNT OF FREE BLOCKS
    104	000272	012703 	000006'			MOV	#MOPRM,R3
PIPFRE M0106, PIP - PRINT FREE 	MACRO M1108  06-DEC-77 00:01  PAGE 8-1
PRINT FREE SPACE ON VOLUME

    105	000276	010304 				MOV	R3,R4
    106	000300	010013 				MOV	R0,@R3
    107	000302	062723 	000000G			ADD	#F.DVNM,(R3)+	;ADDRESS OF DEVICE NAME
    108	000306	016023 	000000G			MOV	F.UNIT(R0),(R3)+ ;UNIT NUMBER
    109	000312	012703 	000053'			MOV	#LO45MG,R3
    110	000316					CALL	PRTFRE
    111	000322	000167 	000000G			JMP	CLOSX
    112	000326				90$:	ERROUX	CR01		;SYNTAX ERROR
	000326	104403 				TRAP	X
	000330	000000G				.WORD	CR01SZ
	000332	000000G				.WORD	CR01MG
    113	000334				RDERR:	ERROUX	CP13,0,0	;READ ERROR
	000334	104427 				TRAP	X
	000336	000000G				.WORD	CP13SZ
	000340	000000G				.WORD	CP13MG
PIPFRE M0106, PIP - PRINT FREE 	MACRO M1108  06-DEC-77 00:01  PAGE 9
PRINT FREE SPACE ON VOLUME

    115					;+
    116					; PRINT THE FREE BLOCK INFORMATION
    117					; CALLING SEQUENCE:
    118					;	CALL	PRTFRE
    119					; INPUTS:
    120					;	R1,R2 = FREE BLOCK COUNT (R2 = LOW ORDER BITS)
    121					;	R3=FORMAT STRING FOR INITIAL MESSAGE
    122					;	R4=PARAMETER BLOCK ADDRESS FOR INITIAL MESSAGE
    123					;	MAXLBN, MAXLBN+2 = TOTAL BLOCKS ON DEVICE
    124					; OUTPUTS:
    125					;	ALL REGISTERS ALTERED
    126					; OPERATION:
    127					;	CALL EDMSG WITH FIRST PART OF MESSAGE AS SPECIFIED IN
    128					; THE FORAMT STRING AND PARAMETER BLOCK ADDRESS
    129					;	THEN IT FORMATS THE STRING:
    130					;	NNN. BLOCKS FREE, NNN. BLOCKS USED OUT OF NNN.
    131					; WHERE THE NNN VALUES ARE ALL COVERTED FROM DOUBLE PRECISION BINARY
    132					;-
    133	000342	010246 			PRTFRE:	MOV	R2,-(SP)
    134	000344	010146 				MOV	R1,-(SP)	;SP = ADR OF DBL PRECISION FREE COUNT
    135	000346	010301 				MOV	R3,R1		;SET UP TO CALL EDMSG
    136	000350	010402 				MOV	R4,R2
    137	000352	012700 	000000G			MOV	#LINBUF,R0	;CONVERTS STRING INTO OUTPUT BUFFER
    138	000356					CALL	$EDMSG
    139	000362	010601 				MOV	SP,R1		;R1=ADR OF 2 WORD FREE COUNT
    140	000364	005002 				CLR	R2		;ZERO SUPPRESS
    141	000366					CALL	$CDDMG		;CONVERT DBL PRECISION TO DECIMAL MAG
    142	000372	012701 	000005'			MOV	#LO40MG,R1
    143	000376	005002 				CLR	R2
    144	000400					CALL	$EDMSG		;". BLOCKS FREE "
    145					;
    146					; CALCULATE HOW MANY BLOCKS ARE USED
    147	000404	016701 	000000'			MOV	MAXLBN,R1
    148	000410	016702 	000002'			MOV	MAXLBN+2,R2
    149	000414	166602 	000002 			SUB	2(SP),R2
    150	000420	005601 				SBC	R1
    151	000422	162601 				SUB	(SP)+,R1
    152	000424	010216 				MOV	R2,@SP
    153	000426	010146 				MOV	R1,-(SP)
    154	000430	010601 				MOV	SP,R1		;R1=ADR OF 2 WORD USED COUNT
    155	000432	005002 				CLR	R2		;ZERO SUPPRESS
    156	000434					CALL	$CDDMG		;CONVERT TO MAGNITUDE DECIMAL
    157	000440	022626 				CMP	(SP)+,(SP)+	;CLEAR 2 WORDS FROM STACK
    158	000442	012701 	000025'			MOV	#LO41MG,R1
    159	000446	005002 				CLR	R2
    160	000450					CALL	$EDMSG		;". BLOCKS USED OUT OF "
    161	000454	012701 	000000'			MOV	#MAXLBN,R1	;R1=ADR OF 2 WORD TOTAL BLOCK COUNT
    162	000460	005002 				CLR	R2
    163	000462					CALL	$CDDMG
    164	000466	112720 	000056 			MOVB	#'.,(R0)+
    165	000472	112720 	000015 			MOVB	#15,(R0)+	;ADD CR
    166	000476	112720 	000012 			MOVB	#12,(R0)+	;AND LF
    167	000502	162700 	000000G			SUB	#LINBUF,R0	;R0=NO. OF BYTES TO WRITE
    168	000506					QIO$S	#IO.WVB,#CMOLUN,#FNAEFN,,,,<#LINBUF,R0,#0>
    169	000546	103405 				BCS	20$
    170	000550					WTSE$S	#FNAEFN
    171	000562				20$:	RETURN
PIPFRE M0106, PIP - PRINT FREE 	MACRO M1108  06-DEC-77 00:01  PAGE 10
PRINT FREE SPACE ON VOLUME

    173					;
    174					; COUNT THE FREE BLOCKS IN A BIT MAP
    175					; INPUTS:
    176					;	R0=FDB OF DESIRED BIT MAP
    177					;	FBTBLK = FIRST VBN OF BIT MAP BLOCKS
    178					;	NBTBLK = NO. OF BIT MAP BLOCKS
    179					; OUTPUTS:
    180					;	R1,R2=NO. OF FREE BLOCKS
    181					;	R0 PRESERVED, R3-R5 ALTERED
    182	000564	010046 			MAPFRE:	MOV	R0,-(SP)
    183	000566	016704 	000000'			MOV	MAXLBN,R4
    184	000572	016705 	000002'			MOV	MAXLBN+2,R5	;NUMBER OF BLOCKS TO CHECK
    185	000576	016703 	000004'			MOV	NBTBLK,R3	;NUMBER OF BIT MAP BLOCKS
    186	000602	005002 				CLR	R2
    187	000604	005001 				CLR	R1
    188	000606	011600 			10$:	MOV	@SP,R0
    189	000610					CALL	BITCNT
    190	000614	060002 				ADD	R0,R2
    191	000616	005501 				ADC	R1
    192	000620	162705 	010000 			SUB	#10000,R5
    193	000624	005604 				SBC	R4
    194	000626					SOB	R3,10$
    195	000632	012600 				MOV	(SP)+,R0
    196	000634					RETURN
    197					;
    198					; COUNT THE FREE BLOCKS IN THE BIT MAP BLOCK ABOUT TO BE READ
    199					; INPUTS:
    200					;	R0=FDB OF BIT MAP FILE, RECORD NUMBER SET TO NEXT BLOCK TO READ
    201					;	R4,R5=NO. OF LOGICAL BLOCKS LEFT TO CHECK IN BITMAP
    202					; OUTPUTS:
    203					;	R0=COUNT OF FREE BLOCKS
    204					;	R1-R5 PRESERVED
    205	000636				BITCNT:	READ$	R0
    206	000642	103434 				BCS	60$
    207	000644					WAIT$	R0
    208	000650	103431 				BCS	60$
    209	000652	004567 	000000G			JSR	R5,.SAVR1	;SAVE REGISTERS R1-R5
    210	000656	005000 				CLR	R0		;INIT FREE BLOCK COUNTER
    211	000660	005704 				TST	R4		;IF HIGH ORDER BITS OF LBN COUNT NOT 0
    212	000662	001402 				BEQ	10$
    213	000664	012705 	010000 			MOV	#10000,R5	;GUARANTEE THAT WE CHECK ALL BITS
    214	000670	012704 	000400 		10$:	MOV	#256.,R4	;NO. OF WORDS
    215	000674	016703 	000000G			MOV	.DYBUF,R3	;R3=ADDRESS OF BITMAP BLOCK
    216	000700	012702 	000020 		20$:	MOV	#16.,R2		;NO. OF BITS PER WORD
    217	000704	012301 				MOV	(R3)+,R1	;GET NEXT WORD TO R1
    218	000706	000241 			30$:	CLC
    219	000710	006001 				ROR	R1
    220	000712	103001 				BCC	40$
    221	000714	005200 				INC	R0		;COUNT BITS THAT ARE ON
    222	000716	005305 			40$:	DEC	R5
    223	000720	001404 				BEQ	50$		;BRANCH IF RUN OUT OF BLOCKS TO CHECK
    224	000722					SOB	R2,30$
    225	000726					SOB	R4,20$
    226	000732				50$:	RETURN
    227	000734	000167 	177374 		60$:	JMP	RDERR
    228
    229						.SBTTL	FORMAT STRINGS
PIPFRE M0106, PIP - PRINT FREE 	MACRO M1108  06-DEC-77 00:01  PAGE 10-1
FORMAT STRINGS

    230	000000					.PSECT
    231
    232	000000					MSGZ	LO40,<. BLOCKS FREE, >
    233	000000					MSGZ	LO41,<. BLOCKS USED OUT OF >
    234	000000					MSGZ	LO45,<%N%N%2A%O: HAS >
    235						.EVEN
    236					;
    237					;
    238		000001 				.END
PIPFRE M0106, PIP - PRINT FREE 	MACRO M1108  06-DEC-77 00:01  PAGE 10-2
SYMBOL TABLE

BITCNT  000636R     005	C.STAT= 000001   	IO.WVB= ****** GX	N.FVER= 000016   	S.FNTY= 000004
CLOSX = ****** GX	C.SWAD= 000022   	LINBUF= ****** GX	N.NEXT= 000022   	S.FTYP= 000002
CMOLUN= ****** GX	C.TYPR= 000000   	LO40MG= 000005R     004	N.SPEC= 000014   	S.NFEN= 000020
CP13MG= ****** GX	FA.SHR= ****** GX	LO40SZ= 000020   	N.STAT= 000020   	X     = 000027
CP13SZ= ****** GX	FDBIN = ****** GX	LO41MG= 000025R     004	N.UNIT= 000034   	$CDDMG= ****** GX
CR01MG= ****** GX	FD.RWM= ****** GX	LO41SZ= 000026   	OFNPT = ****** GX	$EDMSG= ****** GX
CR01SZ= ****** GX	FNAEFN= ****** GX	LO45MG= 000053R     004	OUSPEC= ****** GX	$$    = 000067
CS.DIF= 000002   	FO.RD = ****** GX	LO45SZ= 000020   	PAR$$$= 000000   	$$$ARG= 000003
CS.DVF= 000004   	FRDFNB  000000R     003	MAPFRE  000564R     005	PRSERR= ****** GX	$$$T1 = 000011
CS.EQU= 000040   	FR01MG= ****** GX	MAXLBN  000000R     002	PRSREG= ****** GX	.DEFDV= ****** GX
CS.INP= 000001   	FR01SZ= ****** GX	MFDNMG= 000000R     004	PRTFRE  000342R     005	.DEFUN= ****** GX
CS.MOR= 000020   	F.BKDS= ****** GX	MFDNSZ= 000005   	RDERR   000334R     005	.DYALC= ****** GX
CS.NMF= 000001   	F.DFNB= ****** GX	MOPRM   000006R     002	R$$DPB= 000001   	.DYBUF= ****** GX
CS.OUT= 000002   	F.DSPT= ****** GX	NBTBLK  000004R     002	R$$DYM= 000001   	.FREE   000000RG    005
CS.WLD= 000010   	F.DVNM= ****** GX	N.DEVD= 000000   	R$$EIS= 000000   	.OPFNB= ****** G
C.CMLD= 000002   	F.EFBK= ****** GX	N.DID = 000024   	R$$MSG= 000000   	.PARSE= ****** GX
C.DEVD= 000006   	F.FACC= ****** GX	N.DIRD= 000004   	R$$11M= 000001   	.READ = ****** G
C.DIRD= 000012   	F.FFBY= ****** GX	N.DVNM= 000032   	STBLK = ****** GX	.SAVR1= ****** GX
C.DSDS= 000006   	F.HIBK= ****** GX	N.FID = 000000   	S.APPD= 000010   	.WAIT = ****** G
C.FILD= 000016   	F.RACC= ****** GX	N.FLID= 000016   	S.FIDS= 000014   	...PC1= 000000
C.MKW1= 000024   	F.STBK= ****** GX	N.FNAM= 000006   	S.FNAM= 000006   	...PC2= 000034R     003
C.MKW2= 000026   	F.UNIT= ****** GX	N.FNMD= 000010   	S.FNB = 000036   	...PC3= 000000
C.SIZE= 000054   	INSPEC= ****** GX	N.FTYP= 000014   	S.FNBW= 000017   	...TPC= 000036

. ABS.	000000	   000
      	000000	   001
IMPURE	000012	   002
PURE$D	000036	   003
MSGSTR	000073	   004
PURE$I	000740	   005
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  5384 WORDS  ( 22 PAGES)
DYNAMIC MEMORY:  6272 WORDS  ( 24 PAGES)
ELAPSED TIME:  00:00:44
[63,10]PIPFRE,[63,20]PIPFRE/-SP=[63,30]PIPMAC,PIPFRE
PIPPRO M0206, SET FILE PROTECTI	MACRO M1108  06-DEC-77 00:01
TABLE OF CONTENTS

    7-   1	**** PIPPRO VERSION M0206 ****
PIPPRO M0206, SET FILE PROTECTI	MACRO M1108  06-DEC-77 00:01  PAGE 7


      1						.TITLE	PIPPRO M0206, SET FILE PROTECTION COMMAND-PIP
						.SBTTL	**** PIPPRO VERSION M0206 ****
						.IDENT	/M0206/
      2					; ALTERED WEDNESDAY 8-JAN-75 12:00
      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	2-MAY-74
     19
     20						.MCALL	FDOF$L
     21	000000					FDOF$L			;DEFINE FDB OFFSETS LOCALLY
     22						.MCALL	CALL,RETURN
     23					; EXAMPLE:
     24					;	TEST.DAT;5/PRO/WOR:R/OWN:RWE/GRP:R/SYS:RWE
     25					; THE SUB SWITCHES ARE
     26					;	/SYSTEM
     27					;	/OWNER
     28					;	/GROUP
     29					;	/WORLD
     30					; THE VALUES FOR ANY OF THESE SWITCHES IS UP TO 4 ASCII
     31					; CHARACTERS IN ANY ORDER WHERE:
     32					;	R=READ PRIVILEGE
     33					;	W=WRITE PRIVILEGE
     34					;	E=EXTEND PRIVILEGE
     35					;	D=DELETE PRIVILEGE
     36					; IF A GIVEN SUB SWITCH IS SPECIFIED AND NO VALUE FOR THAT SWITCH IS
     37					; SPECIFIED, THEN NO PRIVILEGES ARE GRANTED FOR THAT
     38					; GROUP.  IF A GIVEN SUB SWITCH ISN'T MENTIONED, THE PRIVILEGES
     39					; FOR THAT GROUP ARE UNCHANGED.
     40					;
     41
     42
     43	000000					PURE.I
     44
     45	000000				PROTCT::
     46	000000	012701 	001000 			MOV	#1000,R1	;ALLOCATE A HEADER BUFFER
     47	000004					CALL	.DYALC
     48	000010	010067 	000000G			MOV	R0,.HDRAD	;AND SAVE IT'S ADDRESS IN .HDRAD
     49	000014					CALL	FSTOUT		;SET UP FOR FIRST FILE IN OUTPUT LIST
     50	000020	012700 	000000G			MOV	#FDBOUT,R0
     51	000024	052767 	000000G	000000G	PROTC1:	BIS	#FRSTIM,CPYCTL
     52	000032					CALL	PARSE
     53	000036	103003 				BCC	10$
     54	000040					CALL	PRSERR
     55	000044	000545 				BR	PRONXT
PIPPRO M0206, SET FILE PROTECTI	MACRO M1108  06-DEC-77 00:01  PAGE 7-1
**** PIPPRO VERSION M0206 ****

     56	000046	132760 	000000G	000017 	10$:	BITB	#FD.DIR,F.RCTL(R0) ;MUST BE A DIRECTORY DEVICE
     57	000054	001003 				BNE	20$		;BRANCH IF IT IS
     58	000056					ERROUX	DI08,1		;ERROR
	000056	104413 				TRAP	X
	000060	000000G				.WORD	DI08SZ
	000062	000000G				.WORD	DI08MG
     59	000064	016067 	000120 	000000G	20$:	MOV	F.FVER(R0),VERSAV
     60	000072	016760 	000000G	000120 	PROTC2:	MOV	VERSAV,F.FVER(R0)
     61	000100					CALL	FNDNXT
     62	000104	103512 				BCS	70$
     63	000106	042767 	000000G	000000G		BIC	#FRSTIM,CPYCTL
     64	000114					CALL	.GFOWN		;SET UP FILE OWNER FOR /FO OPTION
     65					;
     66					; READ ATTRIBUTES
     67	000120	016702 	000000G			MOV	PROWRD,R2
     68	000124	022702 	177777 			CMP	#-1,R2		;WAS PROTECTION VALUE SPECIFIED
     69	000130	001050 				BNE	65$		;BRANCH IF YES, DON'T READ ATTRIBUTES
     70	000132	012701 	000102G			MOV	#FDBOUT+F.FNB,R1
     71	000136					CALL	RDATT
     72	000142	103476 				BCS	85$		;BRANCH IF FAILED TO READ ATTRIBUTES
     73	000144	012701 	000004 			MOV	#4,R1		;NUMBER OF GROUPS
     74	000150	016703 	000000G			MOV	.HDRAD,R3
     75	000154	016303 	000000G			MOV	HH.FP(R3),R3	;R3=CURRENT PROTECTION
     76	000160	005002 				CLR	R2
     77	000162	012704 	000000G			MOV	#WOPROB,R4	;WORLD PROTECTION BIT
     78	000166	012705 	000000G			MOV	#WORPRO,R5	;ADR FOR ARRAY OF PROT CODES
     79	000172				40$:
     80						.IF	GT,R$$EIS
     81						ASHC	#4,R2		;SHIFT NEXT GROUP INTO R2
     82						.IFF
     83	000172	012746 	000004 			MOV	#4,-(SP)
     84	000176	006303 			42$:	ASL	R3		;COMBINED SHIFT 1 BIT
     85	000200	006102 				ROL	R2
     86	000202	005316 				DEC	(SP)		;4 TIMES
     87	000204	003374 				BGT	42$
     88	000206	005726 				TST	(SP)+
     89						.ENDC
     90
     91	000210	030467 	000000G			BIT	R4,CPYCTL	;SWITCH SPECIFIED FOR THIS GROUP
     92	000214	001003 				BNE	45$		;BRANCH IF YES
     93	000216	062705 	000004 			ADD	#4,R5		;SKIP PROTECTION CODES FOR THIS GROUP
     94	000222	000410 				BR	60$
     95	000224	052702 	000017 		45$:	BIS	#17,R2		;YES, SET (NO ACCESS) PROTECTION BITS
     96	000230	012700 	000004 			MOV	#4,R0		;LOOK AT 4 CHARS OF PROT CODE
     97	000234				50$:	CALL	PROBIT
     98	000240					SOB	R0,50$
     99	000244	006304 			60$:	ASL	R4		;BIT FOR NEXT PROTECTION GROUP
    100	000246					SOB	R1,40$
    101					;
    102					; NOW R2=NEW PROTECTION CODE WORD, WRITE ATTRIBUTES
    103	000252	010277 	000000G		65$:	MOV	R2,@.HDRAD
    104	000256	010605 				MOV	SP,R5		;PRESERVE THE STACK POINTER
    105	000260	005046 				CLR	-(SP)		;PUSH THE ATTRIBUTE LIST
    106	000262	016746 	000000G			MOV	.HDRAD,-(SP)	;WRITE THE PROTECTION WORD
    107	000266	012746 	000000G			MOV	#HA.FP,-(SP)
    108	000272	005767 	000000G			TST	.FOWNR		;FORCING FILE OWNER THE SAME AS DIRECTORY
    109	000276	001404 				BEQ	68$		;BRANCH IF NO
PIPPRO M0206, SET FILE PROTECTI	MACRO M1108  06-DEC-77 00:01  PAGE 7-2
**** PIPPRO VERSION M0206 ****

    110	000300	012746 	000000G			MOV	#.FOWNR,-(SP)	;WRITE THE FILE OWNER
    111	000304	012746 	000000G			MOV	#HA.UI,-(SP)
    112	000310	010601 			68$:	MOV	SP,R1
    113	000312	012700 	000000G			MOV	#FDBOUT,R0
    114	000316	010546 				MOV	R5,-(SP)	;R5 IS DESTOYED BY WRITE ATT ERROR
    115	000320					CALL	WRTATT		;ISSUE THE WRITE ATTRIBUTES QI/O AND WAIT
    116	000324	012605 				MOV	(SP)+,R5
    117	000326	010506 				MOV	R5,SP		;RESTORE THE STACK
    118	000330	000406 				BR	PRONX1
    119					;
    120					; FAILED TO FIND FILE
    121	000332				70$:	CALL	FNDERR
    122	000336	000410 				BR	PRONXT
    123					;
    124					; FAILED TO READ ATTRIBUTES
    125	000340				85$:	ERROUT	UN02,0,0
	000340	104426 				TRAP	X
	000342	000000G				.WORD	UN02SZ
	000344	000000G				.WORD	UN02MG
    126					;
    127					; COME HERE TO CONTINUE WITH NEXT WILD CARD FILE
    128	000346	012700 	000000G		PRONX1:	MOV	#FDBOUT,R0
    129	000352					CALL	NXTFIL		;ANY MORE FILES IN THIS FILE SPEC?
    130	000356	103245 				BCC	PROTC2		;BRANCH IF YES, PROCESS THE NEXT
    131					;
    132					; DO NEXT FILE IN LIST IF ANY MORE
    133	000360				PRONXT:	CALL	INIPRO		;REINIT THE PROTECTION VALUES
    134	000364					CALL	NXTOUT
    135	000370	103215 				BCC	PROTC1		;BRANCH IF MORE FILES TO DO
    136	000372	000167 	000000G			JMP	CLOSX
    137					;
    138					; CHECK CHAR @R5 AGAINST CHARS "RWED", IF ONE OF THOSE, CLEAR
    139					; APPROPRIATE BIT IN R2.  BUMP R5 ON EXIT
    140	000376	122715 	000122 		PROBIT:	CMPB	#'R,@R5
    141	000402	001002 				BNE	10$
    142	000404	042702 	000000G			BIC	#HF.RDV,R2
    143	000410	122715 	000127 		10$:	CMPB	#'W,@R5
    144	000414	001002 				BNE	20$
    145	000416	042702 	000000G			BIC	#HF.WRV,R2
    146	000422	122715 	000105 		20$:	CMPB	#'E,@R5
    147	000426	001002 				BNE	30$
    148	000430	042702 	000000G			BIC	#HF.EXT,R2
    149	000434	122725 	000104 		30$:	CMPB	#'D,(R5)+
    150	000440	001002 				BNE	40$
    151	000442	042702 	000000G			BIC	#HF.DEL,R2
    152	000446				40$:	RETURN
    153					;
    154					;
    155		000001 				.END
PIPPRO M0206, SET FILE PROTECTI	MACRO M1108  06-DEC-77 00:01  PAGE 7-3
SYMBOL TABLE

CLOSX = ****** GX	F.DSPT= 000044   	F.RCNM= 000034   	N.FID = 000000   	S.FATT= 000016
CPYCTL= ****** GX	F.DVNM= 000134   	F.RCTL= 000017   	N.FNAM= 000006   	S.FDB = 000140
DI08MG= ****** GX	F.EFBK= 000010   	F.RSIZ= 000002   	N.FTYP= 000014   	S.FNAM= 000006
DI08SZ= ****** GX	F.EFN = 000050   	F.RTYP= 000000   	N.FVER= 000016   	S.FNB = 000036
FDBOUT= ****** GX	F.EOBB= 000032   	F.STBK= 000036   	N.NEXT= 000022   	S.FNBW= 000017
FD.DIR= ****** GX	F.ERR = 000052   	F.UNIT= 000136   	N.STAT= 000020   	S.FNTY= 000004
FNDERR= ****** GX	F.FACC= 000043   	F.URBD= 000020   	N.UNIT= 000034   	S.FTYP= 000002
FNDNXT= ****** GX	F.FFBY= 000014   	F.VBN = 000064   	PARSE = ****** GX	S.NFEN= 000020
FRSTIM= ****** GX	F.FNAM= 000110   	F.VBSZ= 000060   	PROBIT  000376R     002	UN02MG= ****** GX
FSTOUT= ****** GX	F.FNB = 000102   	HA.FP = ****** GX	PRONXT  000360R     002	UN02SZ= ****** GX
F.ALOC= 000040   	F.FTYP= 000116   	HA.UI = ****** GX	PRONX1  000346R     002	VERSAV= ****** GX
F.BBFS= 000062   	F.FVER= 000120   	HF.DEL= ****** GX	PROTCT  000000RG    002	WOPROB= ****** GX
F.BDB = 000070   	F.HIBK= 000004   	HF.EXT= ****** GX	PROTC1  000024R     002	WORPRO= ****** GX
F.BGBC= 000057   	F.LUN = 000042   	HF.RDV= ****** GX	PROTC2  000072R     002	WRTATT= ****** GX
F.BKDN= 000026   	F.MBCT= 000054   	HF.WRV= ****** GX	PROWRD= ****** GX	X     = 000026
F.BKDS= 000020   	F.MBC1= 000055   	HH.FP = ****** GX	PRSERR= ****** GX	$$    = 000067
F.BKEF= 000050   	F.MBFG= 000056   	INIPRO= ****** GX	RDATT = ****** GX	.DYALC= ****** GX
F.BKP1= 000051   	F.NRBD= 000024   	NXTFIL= ****** GX	R$$DPB= 000001   	.FOWNR= ****** GX
F.BKST= 000024   	F.NREC= 000030   	NXTOUT= ****** GX	R$$DYM= 000001   	.GFOWN= ****** GX
F.BKVB= 000064   	F.OVBS= 000030   	N.DID = 000024   	R$$EIS= 000000   	.HDRAD= ****** GX
F.CNTG= 000034   	F.RACC= 000016   	N.DVNM= 000032   	R$$11M= 000001   	...TPC= 000140
F.DFNB= 000046   	F.RATT= 000001

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

VIRTUAL MEMORY USED:  3704 WORDS  ( 15 PAGES)
DYNAMIC MEMORY:  4160 WORDS  ( 16 PAGES)
ELAPSED TIME:  00:00:23
[63,10]PIPPRO,[63,20]PIPPRO/-SP=[63,30]PIPMAC,PIPPRO
PIPREN M0207, RENAME AND ENTER 	MACRO M1108  06-DEC-77 00:02
TABLE OF CONTENTS

    7-   1	**** PIPREN VERSION M0207 ****
PIPREN M0207, RENAME AND ENTER 	MACRO M1108  06-DEC-77 00:02  PAGE 7


      1						.TITLE	PIPREN M0207, RENAME AND ENTER COMMANDS-PIP
						.SBTTL	**** PIPREN VERSION M0207 ****
						.IDENT	/M0207/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  4 AUG 75  10:17
      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
     21					; PETER H. LIPMAN	2-MAY-74
     22	000000					FLDSOF
     23						.MCALL	CSI$,FDOF$L,FCSBT$,IOERR$
     24	000000					CSI$
     25	000000					FDOF$L			;DEFINE THE FDB OFFSETS LOCALLY
     26	000000					FCSBT$			;DEFINE THE FDB BITS AND VALUES LOCALLY
     27	000000					IOERR$			;DEFINE THE I/O ERROR CODES LOCALLY
     28
     29						.MCALL	CALL,RETURN,FDOP$R
     30
     31
     32	000000					PURE.I
     33
     34					; RENAME INPUT FILE TO OUTPUT NAME
     35	000000				ENTER::
     36	000000	016767 	000000G	000000G	RENAME::MOV	.OULCL,.LCLSW	;LOCAL SWITCHES ON OUTSPEC ARE STICKY
     37	000006	005767 	000000G			TST	INSPEC		;REQUIRE AN INPUT SPECIFIER
     38	000012	001003 				BNE	10$
     39	000014					ERROUX	CP02		;ILLEGAL COMMAND
	000014	104403 				TRAP	X
	000016	000000G				.WORD	CP02SZ
	000020	000000G				.WORD	CP02MG
     40	000022	005767 	000000G		10$:	TST	OFNPT+N.DEVD	;IF NO EXPLICIT OUTPUT DEVICE
     41	000026	001006 				BNE	30$
     42	000030	016767 	000000G	000000G		MOV	IFNPT+N.DEVD,OFNPT+N.DEVD ;USE THE INPUT DEV SPEC
     43	000036	016767 	000002G	000002G		MOV	IFNPT+N.DEVD+2,OFNPT+N.DEVD+2
     44	000044	012700 	000000G		30$:	MOV	#SYDFLT,R0
     45	000050	005001 				CLR	R1
     46	000052	005002 				CLR	R2
     47	000054					CALL	STNBK1		;INIT SYSDFLT NAMBLK
     48	000060					FDOP$R	#FDBOUT,,#OFNPT,#SYDFLT
     49	000100					CALL	PARSE
     50	000104	103004 				BCC	40$
     51	000106					CALL	PRSERR		;ERROR FROM PARSE
     52	000112	000167 	000000G			JMP	CLOSX
PIPREN M0207, RENAME AND ENTER 	MACRO M1108  06-DEC-77 00:02  PAGE 7-1
**** PIPREN VERSION M0207 ****

     53	000116	032767 	000001 	000000G	40$:	BIT	#CS.NMF,OUSPEC	;NULL FILE NAME = *.*;*
     54	000124	001003 				BNE	45$
     55	000126	052761 	000000G	000020 		BIS	#NB.SFN,N.STAT(R1)
     56	000134				45$:	CALL	CWLDUI		;CHECK FOR LEGAL WILD CARD UIC
     57	000140	103003 				BCC	50$
     58	000142					ERROUX	CP01
	000142	104403 				TRAP	X
	000144	000000G				.WORD	CP01SZ
	000146	000000G				.WORD	CP01MG
     59	000150	005761 	000016 		50$:	TST	N.FVER(R1)	;IF 0 VERSION NUMBER
     60	000154	001007 				BNE	60$
     61	000156	032761 	000001 	000020 		BIT	#NB.VER,N.STAT(R1) ;AND EXPLICITLY 0
     62	000164	001403 				BEQ	60$
     63	000166	052767 	000000G	000000G		BIS	#NVERBT,CPYCTL ;FORCE NEW VERSION BIT
     64	000174				60$:	FDOP$R	#FDBIN,,#IFNPT,#NAMBLK
     65	000214	005001 				CLR	R1
     66	000216	005002 				CLR	R2
     67	000220					CALL	STNMBK		;INIT DEFAULT NAMBLK
     68	000224	005767 	000000G			TST	IFNPT+N.DEVD	;IF NO EXPLICIT INPUT DEVICE
     69	000230	001006 				BNE	RENAM1
     70	000232	016767 	000134G	000032G		MOV	FDBOUT+F.DVNM,NAMBLK+N.DVNM ;USE OUTPUT DEVICE
     71	000240	016767 	000136G	000034G		MOV	FDBOUT+F.UNIT,NAMBLK+N.UNIT
     72	000246	052767 	000000G	000000G	RENAM1:	BIS	#FRSTIM,CPYCTL
     73	000254					CALL	PARSE		;PARSE THE INPUT SPEC
     74	000260	103004 				BCC	1$
     75	000262					CALL	PRSERR
     76	000266	000167 	000544 			JMP	RNMNXT
     77	000272	132760 	000010 	000017 	1$:	BITB	#FD.DIR,F.RCTL(R0) ;MUST BE A DIRECTORY DEVICE
     78	000300	001003 				BNE	2$		;BRANCH IF IT IS
     79	000302					ERROUX	DI08,1		;ERROR
	000302	104413 				TRAP	X
	000304	000000G				.WORD	DI08SZ
	000306	000000G				.WORD	DI08MG
     80	000310	016067 	000120 	000000G	2$:	MOV	F.FVER(R0),VERSAV
     81	000316	026767 	000134G	000134G		CMP	FDBIN+F.DVNM,FDBOUT+F.DVNM
     82	000324	001004 				BNE	3$		;BRANCH IF DEVICES ARE DIFFERENT
     83	000326	026767 	000136G	000136G		CMP	FDBIN+F.UNIT,FDBOUT+F.UNIT
     84	000334	001405 				BEQ	4$
     85					; DEVICES ARE DIFFERENT - ERROR
     86	000336				3$:	ERROUT	RE04,0
	000336	104406 				TRAP	X
	000340	000000G				.WORD	RE04SZ
	000342	000000G				.WORD	RE04MG
     87	000344	000167 	000466 			JMP	RNMNXT
     88	000350	032767 	000000G	000002G	4$:	BIT	#ENTRBT,CMDWRD+2
     89	000356	001005 				BNE	5$
     90	000360					CALL	WLDVER		;WILD CARD VERSION CHECK IF RENAME
     91	000364	103002 				BCC	5$
     92	000366	000167 	000444 			JMP	RNMNXT
     93	000372	032767 	000001 	000000G	5$:	BIT	#CS.NMF,INSPEC	;NULL INPUT FILE NAME = *.*;*
     94	000400	001006 				BNE	8$
     95	000402	005762 	000016 			TST	N.FLID(R2)	;R2 FROM PARSE, FILE ID SPECIFIED?
     96	000406	001003 				BNE	8$		;BRANCH IF YES
     97	000410	052761 	000000G	000020 		BIS	#NB.SFN,N.STAT(R1) ;R1 FROM PARSE, SET WILD CARDS
     98	000416	032767 	000000G	000002G	8$:	BIT	#ENTRBT,CMDWRD+2
     99	000424	001004 				BNE	10$		;BRANCH IF ENTER RATHER THAN RENAME
    100	000426					CALL	RMVNXT
PIPREN M0207, RENAME AND ENTER 	MACRO M1108  06-DEC-77 00:02  PAGE 7-2
**** PIPREN VERSION M0207 ****

    101	000432	103574 				BCS	70$
    102	000434	000406 				BR	15$
    103	000436	016760 	000000G	000120 	10$:	MOV	VERSAV,F.FVER(R0)
    104	000444					CALL	FNDNXT		;FIND NEXT IF ENTERING
    105	000450	103570 				BCS	75$
    106	000452	042767 	000000G	000000G	15$:	BIC	#FRSTIM,CPYCTL
    107					;
    108					; SET WILD CARD OR UNSPECIFIED FIELDS OF OUTPUT FILE NAME BLOCK TO
    109					; EQUIVALENT INPUT FILE NAME BLOCK FIELDS
    110	000460	012701 	000102G			MOV	#FDBOUT+F.FNB,R1
    111	000464	016102 	000020 			MOV	N.STAT(R1),R2
    112	000470	012703 	000004 			MOV	#NB.NAM,R3
    113
    114						.IF	GT,R$$EIS
    115						XOR	R3,R2
    116						.IFF
    117	000474					CALL	XOR
    118						.ENDC
    119
    120	000500	032702 	000044 			BIT	#NB.NAM!NB.SNM,R2 ;WILD CARD OR UNSPECIFIED NAME?
    121	000504	001411 				BEQ	20$		;BRANCH IF NO
    122	000506	016061 	000110 	000006 		MOV	F.FNAM(R0),N.FNAM(R1) ;USE DEFAULT NAME
    123	000514	016061 	000112 	000010 		MOV	F.FNAM+2(R0),N.FNAM+2(R1)
    124	000522	016061 	000114 	000012 		MOV	F.FNAM+4(R0),N.FNAM+4(R1)
    125	000530	012703 	000002 		20$:	MOV	#NB.TYP,R3
    126						.IF	GT,R$$EIS
    127						XOR	R3,R2
    128						.IFF
    129	000534					CALL	XOR
    130						.ENDC
    131
    132	000540	032702 	000022 			BIT	#NB.TYP!NB.STP,R2 ;WILD CARD OR UNSPECIFIED TYPE?
    133	000544	001403 				BEQ	30$		;BRANCH IF NO
    134	000546	016061 	000116 	000014 		MOV	F.FTYP(R0),N.FTYP(R1) ;USE DEFAULT TYPE
    135	000554	012703 	000001 		30$:	MOV	#NB.VER,R3
    136
    137						.IF	GT,R$$EIS
    138						XOR	R3,R2
    139						.IFF
    140	000560					CALL	XOR
    141						.ENDC
    142
    143	000564	032702 	000011 			BIT	#NB.VER!NB.SVR,R2 ;WILD CARD OR UNSPECIFIED VERSION?
    144	000570	001403 				BEQ	40$		;BRANCH IF NO
    145	000572	016061 	000120 	000016 		MOV	F.FVER(R0),N.FVER(R1) ;USE DEFAULT VERSION
    146					;
    147					; FOR ENTER, IF OUTPUT DIRECTORY IS WILD CARD, AND FOR RENAME,
    148					; IF OUTPUT DIRECTORY IS WILD CARD OR NULL, USE INPUT DIRECTORY
    149	000600	012703 	000100 		40$:	MOV	#NB.DIR,R3
    150						.IF	GT,R$$EIS
    151						XOR	R3,R2
    152						.IFF
    153	000604					CALL	XOR
    154						.ENDC
    155	000610	032767 	000000G	000002G		BIT	#ENTRBT,CMDWRD+2 ; SEE IF THIS IS AN ENTER
    156	000616	001403 				BEQ	41$		; NO
    157	000620	032702 	000000G			BIT	#NB.SDI,R2	; CHECK FOR WILD CARD UIC ONLY
PIPREN M0207, RENAME AND ENTER 	MACRO M1108  06-DEC-77 00:02  PAGE 7-3
**** PIPREN VERSION M0207 ****

    158	000624	000402 				BR	43$
    159	000626	032702 	000000C		41$:	BIT	#NB.DIR!NB.SDI,R2 ; CHECK FOR WILD OR DEFAULT UIC
    160	000632	001411 			43$:	BEQ	42$
    161	000634	016061 	000126 	000024 		MOV	F.FNB+N.DID(R0),N.DID(R1)
    162	000642	016061 	000130 	000026 		MOV	F.FNB+N.DID+2(R0),N.DID+2(R1)
    163	000650	016061 	000132 	000030 		MOV	F.FNB+N.DID+4(R0),N.DID+4(R1)
    164	000656	016061 	000102 	000000 	42$:	MOV	F.FNB+N.FID(R0),N.FID(R1) ;SET FILE ID TO ENTER
    165	000664	016061 	000104 	000002 		MOV	F.FNB+N.FID+2(R0),N.FID+2(R1)
    166	000672	016061 	000106 	000004 		MOV	F.FNB+N.FID+4(R0),N.FID+4(R1)
    167	000700	012700 	000000G			MOV	#FDBOUT,R0
    168	000704	032767 	000000G	000000G		BIT	#NVERBT,CPYCTL	;IF NEW VERSION DESIRED
    169	000712	001402 				BEQ	44$
    170	000714	005061 	000016 			CLR	N.FVER(R1)	;ZERO THE VERSION TO BE ENTERED
    171	000720				44$:	CALL	.ENTER
    172	000724	103030 				BCC	50$
    173					;
    174					; ERROR FROM ENTER, IF RENAMING, MUST REENTER THE ORIGINAL NAME
    175	000726	116004 	000052 			MOVB	F.ERR(R0),R4
    176	000732	022704 	177707 			CMP	#IE.DUP,R4	;IF DUPLICATE ENTRY
    177	000736	001002 				BNE	45$
    178	000740	012704 	177717 			MOV	#IE.FEX,R4	;USE FILE ALREADY EXITS ERROR
    179	000744				45$:	ERROUT	RE02,0,R4
	000744	104446 				TRAP	X
	000746	000000G				.WORD	RE02SZ
	000750	000000G				.WORD	RE02MG
    180	000752	032767 	000000G	000002G		BIT	#ENTRBT,CMDWRD+2
    181	000760	001012 				BNE	50$
    182	000762	012700 	000000G			MOV	#FDBIN,R0
    183	000766	012701 	000102G			MOV	#FDBIN+F.FNB,R1
    184	000772					CALL	.ENTER		;REENTER THE REMOVED ENTRY
    185	000776	103003 				BCC	50$
    186	001000					ERROUT	RE03,0,0	;FILE IS LOST
	001000	104426 				TRAP	X
	001002	000000G				.WORD	RE03SZ
	001004	000000G				.WORD	RE03MG
    187	001006	012700 	000000G		50$:	MOV	#FDBIN,R0
    188	001012					CALL	NXTFIL		;ANY MORE FILES IN THIS FILE SPECIFIER?
    189	001016	103407 				BCS	RNMNXT		;BRANCH IF NO
    190	001020	000167 	177372 			JMP	8$
    191					;
    192					; ERROR FROM REMOVE NEXT
    193	001024				70$:	CALL	RMVERR
    194	001030	000402 				BR	RNMNXT
    195					;
    196					; ERROR FROM FIND NEXT
    197	001032				75$:	CALL	FNDERR		;OTHERWISE, NORMAL FIND ERROR
    198					;
    199					; GET NEXT INPUT FILE SPECIFIER TO RENAME
    200	001036				RNMNXT:	CALL	NXTIN
    201	001042	103002 				BCC	10$
    202	001044	000167 	000000G			JMP	CLOSX
    203	001050	000167 	177172 		10$:	JMP	RENAM1
    204						.IF	EQ,R$$EIS
    205					;
    206					; ROUTINE TO DO XOR R3,R2 ON NON-EIS MACHINES
    207					;
    208	001054	010246 			XOR:	MOV	R2,-(SP)
PIPREN M0207, RENAME AND ENTER 	MACRO M1108  06-DEC-77 00:02  PAGE 7-4
**** PIPREN VERSION M0207 ****

    209	001056	040302 				BIC	R3,R2
    210	001060	042603 				BIC	(SP)+,R3
    211	001062	050302 				BIS	R3,R2
    212	001064					RETURN
    213
    214						.ENDC
    215
    216					;
    217					;
    218		000001 				.END
PIPREN M0207, RENAME AND ENTER 	MACRO M1108  06-DEC-77 00:02  PAGE 7-5
SYMBOL TABLE

CLOSX = ****** GX	FD.SDI= 000020   	F.URBD= 000020   	IE.OVR= 177756   	N.FTYP= 000014
CMDWRD= ****** GX	FD.SQD= 000040   	F.VBN = 000064   	IE.PRI= 177760   	N.FVER= 000016
CPYCTL= ****** GX	FD.TTY= 000004   	F.VBSZ= 000060   	IE.RAC= 177724   	N.NEXT= 000022
CP01MG= ****** GX	FD.WBH= 000002   	IE.ABO= 177761   	IE.RAT= 177723   	N.SPEC= 000014
CP01SZ= ****** GX	FNDERR= ****** GX	IE.ALN= 177736   	IE.RBG= 177730   	N.STAT= 000020
CP02MG= ****** GX	FNDNXT= ****** GX	IE.BAD= 177777   	IE.RCN= 177722   	N.UNIT= 000034
CP02SZ= ****** GX	FO.APD= 000106   	IE.BBE= 177710   	IE.RER= 177740   	OFNPT = ****** GX
CS.DIF= 000002   	FO.MFY= 000002   	IE.BDI= 177714   	IE.RNM= 177715   	OUSPEC= ****** GX
CS.DVF= 000004   	FO.RD = 000001   	IE.BDR= 177716   	IE.RSU= 177757   	PARSE = ****** GX
CS.EQU= 000040   	FO.UPD= 000006   	IE.BDV= 177711   	IE.SNC= 177735   	PAR$$$= 000027
CS.INP= 000001   	FO.WRT= 000016   	IE.BHD= 177700   	IE.SPC= 177772   	PRSERR= ****** GX
CS.MOR= 000020   	FRSTIM= ****** GX	IE.BLK= 177754   	IE.SQC= 177734   	RENAME  000000RG    002
CS.NMF= 000001   	F.ALOC= 000040   	IE.BNM= 177712   	IE.SRE= 177762   	RENAM1  000246R     002
CS.OUT= 000002   	F.BBFS= 000062   	IE.BTF= 177675   	IE.STK= 177706   	RE02MG= ****** GX
CS.WLD= 000010   	F.BDB = 000070   	IE.BTP= 177725   	IE.VER= 177774   	RE02SZ= ****** GX
CWLDUI= ****** GX	F.BGBC= 000057   	IE.BVR= 177701   	IE.WAC= 177743   	RE03MG= ****** GX
C.CMLD= 000002   	F.BKDN= 000026   	IE.BYT= 177755   	IE.WAT= 177741   	RE03SZ= ****** GX
C.DEVD= 000006   	F.BKDS= 000020   	IE.CKS= 177742   	IE.WER= 177737   	RE04MG= ****** GX
C.DIRD= 000012   	F.BKEF= 000050   	IE.CLO= 177732   	IE.WLK= 177764   	RE04SZ= ****** GX
C.DSDS= 000006   	F.BKP1= 000051   	IE.CON= 177752   	IE.2DV= 177720   	RMVERR= ****** GX
C.FILD= 000016   	F.BKST= 000024   	IE.DAA= 177770   	IFNPT = ****** GX	RMVNXT= ****** GX
C.MKW1= 000024   	F.BKVB= 000064   	IE.DAO= 177763   	INSPEC= ****** GX	RNMNXT  001036R     002
C.MKW2= 000026   	F.CNTG= 000034   	IE.DFU= 177750   	IS.BV = 000005   	R$$DPB= 000001
C.SIZE= 000054   	F.DFNB= 000046   	IE.DNA= 177771   	IS.CR = 006401   	R$$DYM= 000001
C.STAT= 000001   	F.DSPT= 000044   	IE.DNR= 177775   	IS.ESC= 015401   	R$$EIS= 000000
C.SWAD= 000022   	F.DVNM= 000134   	IE.DUN= 177767   	IS.PND= 000000   	R$$11M= 000001
C.TYPR= 000000   	F.EFBK= 000010   	IE.DUP= 177707   	IS.RDD= 000002   	R.FIX = 000001
DI08MG= ****** GX	F.EFN = 000050   	IE.EBX= 177776   	IS.SUC= 000001   	R.VAR = 000002
DI08SZ= ****** GX	F.EOBB= 000032   	IE.EOF= 177766   	NAMBLK= ****** GX	STNBK1= ****** GX
ENTER   000000RG    002	F.ERR = 000052   	IE.EOT= 177702   	NB.DEV= 000200   	STNMBK= ****** GX
ENTRBT= ****** GX	F.FACC= 000043   	IE.EOV= 177765   	NB.DIR= 000100   	SYDFLT= ****** GX
FA.APD= 000100   	F.FFBY= 000014   	IE.EXP= 177676   	NB.NAM= 000004   	S.APPD= 000010
FA.CRE= 000010   	F.FNAM= 000110   	IE.FEX= 177717   	NB.SDI= ****** GX	S.FATT= 000016
FA.EXT= 000004   	F.FNB = 000102   	IE.FHE= 177705   	NB.SD1= 000400   	S.FDB = 000140
FA.NSP= 000100   	F.FTYP= 000116   	IE.FOP= 177713   	NB.SD2= 001000   	S.FIDS= 000014
FA.RD = 000001   	F.FVER= 000120   	IE.HFU= 177744   	NB.SFN= ****** GX	S.FNAM= 000006
FA.SHR= 000040   	F.HIBK= 000004   	IE.IFC= 177776   	NB.SNM= 000040   	S.FNB = 000036
FA.TMP= 000020   	F.LUN = 000042   	IE.IFU= 177747   	NB.STP= 000020   	S.FNBW= 000017
FA.WRT= 000002   	F.MBCT= 000054   	IE.ILL= 177726   	NB.SVR= 000010   	S.FNTY= 000004
FDBIN = ****** GX	F.MBC1= 000055   	IE.ISQ= 177703   	NB.TYP= 000002   	S.FTYP= 000002
FDBOUT= ****** GX	F.MBFG= 000056   	IE.LCK= 177745   	NB.VER= 000001   	S.NFEN= 000020
FD.BLK= 000010   	F.NRBD= 000024   	IE.MBK= 177721   	NVERBT= ****** GX	VERSAV= ****** GX
FD.CCL= 000002   	F.NREC= 000030   	IE.MOD= 177753   	NXTFIL= ****** GX	WLDVER= ****** GX
FD.CR = 000002   	F.OVBS= 000030   	IE.NBF= 177731   	NXTIN = ****** GX	X     = 000026
FD.DIR= 000010   	F.RACC= 000016   	IE.NBK= 177727   	N.DEVD= 000000   	XOR     001054R     002
FD.FTN= 000001   	F.RATT= 000001   	IE.NFI= 177704   	N.DID = 000024   	$$    = 000067
FD.INS= 000010   	F.RCNM= 000034   	IE.NLN= 177733   	N.DIRD= 000004   	$$MSG = 000000
FD.PLC= 000004   	F.RCTL= 000017   	IE.NNC= 177674   	N.DVNM= 000032   	.ENTER= ****** GX
FD.RAH= 000001   	F.RSIZ= 000002   	IE.NOD= 177751   	N.FID = 000000   	.LCLSW= ****** GX
FD.RAN= 000002   	F.RTYP= 000000   	IE.NSF= 177746   	N.FLID= 000016   	.OULCL= ****** GX
FD.REC= 000001   	F.STBK= 000036   	IE.OFL= 177677   	N.FNAM= 000006   	...GBL= 000000
FD.RWM= 000001   	F.UNIT= 000136   	IE.ONP= 177773   	N.FNMD= 000010   	...TPC= 000140

. ABS.	000000	   000
      	000000	   001
PURE$I	001066	   002
ERRORS DETECTED:  0
PIPREN M0207, RENAME AND ENTER 	MACRO M1108  06-DEC-77 00:02  PAGE 7-6
SYMBOL TABLE


VIRTUAL MEMORY USED:  6932 WORDS  ( 28 PAGES)
DYNAMIC MEMORY:  8384 WORDS  ( 32 PAGES)
ELAPSED TIME:  00:00:50
[63,10]PIPREN,[63,20]PIPREN/-SP=[63,30]PIPMAC,PIPREN
PIPSPL M0207, SPOOL COMMAND-PIP	MACRO M1108  06-DEC-77 00:03
TABLE OF CONTENTS

    7-   1	**** PIPSPL VERSION M0207 ****
PIPSPL M0207, SPOOL COMMAND-PIP	MACRO M1108  06-DEC-77 00:03  PAGE 7


      1						.TITLE	PIPSPL M0207, SPOOL COMMAND-PIP
						.SBTTL	**** PIPSPL VERSION M0207 ****
						.IDENT	/M0207/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  6 FEB 76  15:23
      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	2-MAY-74
     21
     22						.IF	GT,R$$11M
     23						.MACRO	OPEN$	A1,A2,A3,A4,A5,A6,A7,A8,A9
     24						.MCALL	OFNB$
     25						OFNB$	A1,A2,A3,A4,A5,A6,A7,A8,A9
     26						.ENDM	OPEN$
     27						.ENDC
     28					;
     29						.MCALL	FDOF$L,FCSBT$
     30	000000					FDOF$L			;DEFINE THE FDB OFFSETS LOCALLY
     31	000000					FCSBT$			;DEFINE THE FDB BITS AND VALUES LOCALLY
     32					;
     33						.MCALL	CALL,RETURN,FDRC$R
     34						.MCALL	OPEN$R,PRINT$,CLOSE$
     35
     36	000000					PURE.I
     37
     38					; SPOOL THE SPECIFIED LIST OF FILES FOR PRINTING AND DELETE THEM
     39	000000				SPOOL::	CALL	FSTOUT
     40	000004					FDRC$R	#FDBOUT,#FD.RWM
     41	000016	052767 	000000G	000000G	SPOOL1:	BIS	#FRSTIM,CPYCTL
     42	000024	000167 	000152 			JMP	SPLNXT		;INHIBIT SPOOLING
     43						.IF	LE,R$$11M
     44						BIT	#FIDBIT,CPYCTL	; CHECK FOR /FI SWITCH
     45						BNE	80$		; CAN'T DO IT - OUT
     46						.ENDC
     47	000030					CALL	PARSE
     48	000034	103443 				BCS	60$
     49	000036	016067 	000120 	000000G		MOV	F.FVER(R0),VERSAV
     50	000044	016760 	000000G	000120 	10$:	MOV	VERSAV,F.FVER(R0)
     51	000052					CALL	FNDNXT
     52	000056	103435 				BCS	68$
     53	000060	042767 	000000G	000000G		BIC	#FRSTIM,CPYCTL
     54	000066	016701 	000000G			MOV	SPLCNT,R1	; GET COPY COUNT
     55	000072	001403 				BEQ	14$
PIPSPL M0207, SPOOL COMMAND-PIP	MACRO M1108  06-DEC-77 00:03  PAGE 7-1
**** PIPSPL VERSION M0207 ****

     56	000074	020127 	000144 			CMP	R1,#100.	; CHECK AGAINST LIMIT
     57	000100	101402 				BLOS	15$		; OK
     58	000102	012701 	000001 		14$:	MOV	#1,R1		; DEFAULT TO 1
     59
     60	000106				15$:	OPEN$R	R0		;OPEN THE FILE
     61	000120	103417 				BCS	70$
     62					; SPOOL THE OPEN FILE FOR PRINTING, SPOOLER WILL CLOSE, PRINT AND
     63					; DELETE THE FILE
Q    64	000122					PRINT$	R0
     65	000122	103424 				BCS	75$
     66	000124					SOB	R1,15$		; LOOP ON COPY COUNT
     67	000130				20$:	CLOSE$	R0		;CERTAIN CONDITIONS WILL LEAVE IT OPEN
     68	000134					CALL	NXTFIL		;ANY MORE FILES IN THIS FILE SPEC?
     69	000140	103420 				BCS	SPLNXT		;BRANCH IF NO
     70	000142	000740 				BR	10$		;GO FIND THE NEXT FILE
     71					;
     72					; PARSE ERROR
     73	000144				60$:	CALL	PRSERR
     74	000150	000414 				BR	SPLNXT
     75					;
     76					; FAILED TO FIND FILE
     77	000152				68$:	CALL	FNDERR
     78	000156	000411 				BR	SPLNXT
     79					;
     80					; OPEN FAILURE
     81	000160				70$:	ERROUT	OP01,0,0
	000160	104426 				TRAP	X
	000162	000000G				.WORD	OP01SZ
	000164	000000G				.WORD	OP01MG
     82	000166	012700 	000000G			MOV	#FDBOUT,R0
     83	000172	000756 				BR	20$
     84					;
     85					; ERROR FROM PRINT$
     86	000174				75$:	ERROUT	SP01,0
	000174	104406 				TRAP	X
	000176	000000G				.WORD	SP01SZ
	000200	000000G				.WORD	SP01MG
     87						.IF	LE,R$$11M
     88						BR	SPLNXT
     89					;
     90					; ATTEMPT TO SPOOL FILE BY FILE ID - NOT SUPPORTED
     91					80$:	ERROUT	SP02
     92						.ENDC
     93					;
     94					; GO GET THE NEXT FILE IN THE LIST TO BE SPOOLED
     95	000202				SPLNXT:	CALL	NXTOUT
     96	000206	103402 				BCS	10$
     97	000210	000167 	177602 			JMP	SPOOL1
     98	000214	000167 	000000G		10$:	JMP	CLOSX
     99
    100					;
    101					;
    102		000001 				.END
PIPSPL M0207, SPOOL COMMAND-PIP	MACRO M1108  06-DEC-77 00:03  PAGE 7-2
SYMBOL TABLE

CLOSX = ****** GX	FNDNXT= ****** GX	F.FACC= 000043   	NB.DIR= 000100   	R$$DYM= 000001
CPYCTL= ****** GX	FO.APD= 000106   	F.FFBY= 000014   	NB.NAM= 000004   	R$$EIS= 000000
FA.APD= 000100   	FO.MFY= 000002   	F.FNAM= 000110   	NB.SD1= 000400   	R$$11M= 000001
FA.CRE= 000010   	FO.RD = 000001   	F.FNB = 000102   	NB.SD2= 001000   	R.FIX = 000001
FA.EXT= 000004   	FO.UPD= 000006   	F.FTYP= 000116   	NB.SNM= 000040   	R.VAR = 000002
FA.NSP= 000100   	FO.WRT= 000016   	F.FVER= 000120   	NB.STP= 000020   	SPLCNT= ****** GX
FA.RD = 000001   	FRSTIM= ****** GX	F.HIBK= 000004   	NB.SVR= 000010   	SPLNXT  000202R     002
FA.SHR= 000040   	FSTOUT= ****** GX	F.LUN = 000042   	NB.TYP= 000002   	SPOOL   000000RG    002
FA.TMP= 000020   	F.ALOC= 000040   	F.MBCT= 000054   	NB.VER= 000001   	SPOOL1  000016R     002
FA.WRT= 000002   	F.BBFS= 000062   	F.MBC1= 000055   	NXTFIL= ****** GX	SP01MG= ****** GX
FDBOUT= ****** GX	F.BDB = 000070   	F.MBFG= 000056   	NXTOUT= ****** GX	SP01SZ= ****** GX
FD.BLK= 000010   	F.BGBC= 000057   	F.NRBD= 000024   	N.DID = 000024   	S.FATT= 000016
FD.CCL= 000002   	F.BKDN= 000026   	F.NREC= 000030   	N.DVNM= 000032   	S.FDB = 000140
FD.CR = 000002   	F.BKDS= 000020   	F.OVBS= 000030   	N.FID = 000000   	S.FNAM= 000006
FD.DIR= 000010   	F.BKEF= 000050   	F.RACC= 000016   	N.FNAM= 000006   	S.FNB = 000036
FD.FTN= 000001   	F.BKP1= 000051   	F.RATT= 000001   	N.FTYP= 000014   	S.FNBW= 000017
FD.INS= 000010   	F.BKST= 000024   	F.RCNM= 000034   	N.FVER= 000016   	S.FNTY= 000004
FD.PLC= 000004   	F.BKVB= 000064   	F.RCTL= 000017   	N.NEXT= 000022   	S.FTYP= 000002
FD.RAH= 000001   	F.CNTG= 000034   	F.RSIZ= 000002   	N.STAT= 000020   	S.NFEN= 000020
FD.RAN= 000002   	F.DFNB= 000046   	F.RTYP= 000000   	N.UNIT= 000034   	VERSAV= ****** GX
FD.REC= 000001   	F.DSPT= 000044   	F.STBK= 000036   	OP01MG= ****** GX	X     = 000006
FD.RWM= 000001   	F.DVNM= 000134   	F.UNIT= 000136   	OP01SZ= ****** GX	$$    = 000067
FD.SDI= 000020   	F.EFBK= 000010   	F.URBD= 000020   	PARSE = ****** GX	.CLOSE= ****** G
FD.SQD= 000040   	F.EFN = 000050   	F.VBN = 000064   	PAR$$$= 000000   	.OPFNB= ****** G
FD.TTY= 000004   	F.EOBB= 000032   	F.VBSZ= 000060   	PRSERR= ****** GX	...GBL= 000000
FD.WBH= 000002   	F.ERR = 000052   	NB.DEV= 000200   	R$$DPB= 000001   	...TPC= 000140
FNDERR= ****** GX

. ABS.	000000	   000
      	000000	   001
PURE$I	000220	   002
ERRORS DETECTED:  1

VIRTUAL MEMORY USED:  4422 WORDS  ( 18 PAGES)
DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:00:28
[63,10]PIPSPL,[63,20]PIPSPL/-SP=[63,30]PIPMAC,PIPSPL
PIPTRN M0002, TRUNCATE COMMAND-	MACRO M1108  06-DEC-77 00:03
TABLE OF CONTENTS

    7-   1	**** PIPTRN VERSION M0002 ****
PIPTRN M0002, TRUNCATE COMMAND-	MACRO M1108  06-DEC-77 00:03  PAGE 7


      1						.TITLE	PIPTRN M0002, TRUNCATE COMMAND-PIP
						.SBTTL	**** PIPTRN VERSION M0002 ****
						.IDENT	/M0002/
      2					; ALTERED:
      3					; ANDREW C. GOLDSTEIN  23 FEB 76  13:17
      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	2-MAY-74
     21
     22						.IF	GT,R$$11M
     23						.MACRO	OPEN$	A1,A2,A3,A4,A5,A6,A7,A8,A9
     24						.MCALL	OFNB$
     25						OFNB$	A1,A2,A3,A4,A5,A6,A7,A8,A9
     26						.ENDM	OPEN$
     27						.ENDC
     28					;
     29						.MCALL	FDOF$L,FCSBT$
     30	000000					FDOF$L			;DEFINE THE FDB OFFSETS LOCALLY
     31	000000					FCSBT$			;DEFINE THE FDB BITS AND VALUES LOCALLY
     32					;
     33						.MCALL	CALL,RETURN,FDRC$R
     34						.MCALL	OPEN$U,PRINT$,CLOSE$
     35
     36	000000					PURE.I
     37
     38					; TRUNCATE THE SPECIFIED LIST OF FILES
     39	000000				TRUNC::	CALL	FSTOUT
     40	000004					FDRC$R	#FDBOUT,#FD.RWM
     41	000016	052767 	000000G	000000G	TRUNC1:	BIS	#FRSTIM,CPYCTL
     42
     43
     44						.IF DF XYZ
     45
     46
     47						CALL	PARSE
     48						BCS	60$
     49						MOV	F.FVER(R0),VERSAV
     50					10$:	MOV	VERSAV,F.FVER(R0)
     51						CALL	FNDNXT
     52						BCS	68$
     53						BIC	#FRSTIM,CPYCTL
     54						OPEN$U	R0		;OPEN THE FILE
     55						BCS	70$
PIPTRN M0002, TRUNCATE COMMAND-	MACRO M1108  06-DEC-77 00:03  PAGE 7-1
**** PIPTRN VERSION M0002 ****

     56					;
     57					; TRUNCATE AND CLOSE THE FILE
     58					;
     59						CALL	.TRNCL
     60						BCS	75$
     61					20$:	CLOSE$	R0		;CERTAIN CONDITIONS WILL LEAVE IT OPEN
     62						CALL	NXTFIL		;ANY MORE FILES IN THIS FILE SPEC?
     63						BCS	TRNNXT		;BRANCH IF NO
     64						BR	10$		;GO FIND THE NEXT FILE
     65					;
     66					; PARSE ERROR
     67					60$:	CALL	PRSERR
     68						BR	TRNNXT
     69					;
     70					; FAILED TO FIND FILE
     71					68$:	CALL	FNDERR
     72						BR	TRNNXT
     73					;
     74					; OPEN FAILURE
     75					70$:	ERROUT	OP01,0,0
     76						MOV	#FDBOUT,R0
     77						BR	20$
     78					;
     79					; ERROR FROM TRUNCATE
     80					75$:	ERROUT	TR01,0
     81						BR	20$
     82					;
     83					; GO GET THE NEXT FILE IN THE LIST TO BE TRUNCATED
     84
     85						.ENDC
     86
     87	000024				TRNNXT:	CALL	NXTOUT
     88	000030	103402 				BCS	10$
     89	000032	000167 	177760 			JMP	TRUNC1
     90	000036	000167 	000000G		10$:	JMP	CLOSX
     91
     92					;
     93					;
     94		000001 				.END
PIPTRN M0002, TRUNCATE COMMAND-	MACRO M1108  06-DEC-77 00:03  PAGE 7-2
SYMBOL TABLE

CLOSX = ****** GX	FD.TTY= 000004   	F.EFN = 000050   	F.STBK= 000036   	N.STAT= 000020
CPYCTL= ****** GX	FD.WBH= 000002   	F.EOBB= 000032   	F.UNIT= 000136   	N.UNIT= 000034
FA.APD= 000100   	FO.APD= 000106   	F.ERR = 000052   	F.URBD= 000020   	PAR$$$= 000027
FA.CRE= 000010   	FO.MFY= 000002   	F.FACC= 000043   	F.VBN = 000064   	R$$DPB= 000001
FA.EXT= 000004   	FO.RD = 000001   	F.FFBY= 000014   	F.VBSZ= 000060   	R$$DYM= 000001
FA.NSP= 000100   	FO.UPD= 000006   	F.FNAM= 000110   	NB.DEV= 000200   	R$$EIS= 000000
FA.RD = 000001   	FO.WRT= 000016   	F.FNB = 000102   	NB.DIR= 000100   	R$$11M= 000001
FA.SHR= 000040   	FRSTIM= ****** GX	F.FTYP= 000116   	NB.NAM= 000004   	R.FIX = 000001
FA.TMP= 000020   	FSTOUT= ****** GX	F.FVER= 000120   	NB.SD1= 000400   	R.VAR = 000002
FA.WRT= 000002   	F.ALOC= 000040   	F.HIBK= 000004   	NB.SD2= 001000   	S.FATT= 000016
FDBOUT= ****** GX	F.BBFS= 000062   	F.LUN = 000042   	NB.SNM= 000040   	S.FDB = 000140
FD.BLK= 000010   	F.BDB = 000070   	F.MBCT= 000054   	NB.STP= 000020   	S.FNAM= 000006
FD.CCL= 000002   	F.BGBC= 000057   	F.MBC1= 000055   	NB.SVR= 000010   	S.FNB = 000036
FD.CR = 000002   	F.BKDN= 000026   	F.MBFG= 000056   	NB.TYP= 000002   	S.FNBW= 000017
FD.DIR= 000010   	F.BKDS= 000020   	F.NRBD= 000024   	NB.VER= 000001   	S.FNTY= 000004
FD.FTN= 000001   	F.BKEF= 000050   	F.NREC= 000030   	NXTOUT= ****** GX	S.FTYP= 000002
FD.INS= 000010   	F.BKP1= 000051   	F.OVBS= 000030   	N.DID = 000024   	S.NFEN= 000020
FD.PLC= 000004   	F.BKST= 000024   	F.RACC= 000016   	N.DVNM= 000032   	TRNNXT  000024R     002
FD.RAH= 000001   	F.BKVB= 000064   	F.RATT= 000001   	N.FID = 000000   	TRUNC   000000RG    002
FD.RAN= 000002   	F.CNTG= 000034   	F.RCNM= 000034   	N.FNAM= 000006   	TRUNC1  000016R     002
FD.REC= 000001   	F.DFNB= 000046   	F.RCTL= 000017   	N.FTYP= 000014   	$$    = 000067
FD.RWM= 000001   	F.DSPT= 000044   	F.RSIZ= 000002   	N.FVER= 000016   	...GBL= 000000
FD.SDI= 000020   	F.DVNM= 000134   	F.RTYP= 000000   	N.NEXT= 000022   	...TPC= 000140
FD.SQD= 000040   	F.EFBK= 000010

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

VIRTUAL MEMORY USED:  4298 WORDS  ( 17 PAGES)
DYNAMIC MEMORY:  5216 WORDS  ( 20 PAGES)
ELAPSED TIME:  00:00:22
[63,10]PIPTRN,[63,20]PIPTRN/-SP=[63,30]PIPMAC,PIPTRN
PIPUNL M0202, UNLOCK COMMAND-PI	MACRO M1108  06-DEC-77 00:04
TABLE OF CONTENTS

    7-   1	**** PIPUNL VERSION M0202 ****
PIPUNL M0202, UNLOCK COMMAND-PI	MACRO M1108  06-DEC-77 00:04  PAGE 7


      1						.TITLE	PIPUNL M0202, UNLOCK COMMAND-PIP
						.SBTTL	**** PIPUNL VERSION M0202 ****
						.IDENT	/M0202/
      2					; ALTERED WEDNESDAY 8-JAN-75 12: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	2-MAY-74
     19
     20						.MCALL	FDOF$L
     21	000000					FDOF$L			;DEFINE THE FDB OFFSETS LOCALLY
     22					;
     23						.MCALL	CALL,RETURN
     24
     25
     26	000000					PURE.I
     27
     28					; UNLOCK A LOCKED FILE
     29	000000				UNLOCK::
     30	000000	012701 	001000 			MOV	#1000,R1
     31	000004					CALL	.DYALC		;ALLOCATE A HEADER BUFFER
     32	000010	010067 	000000G			MOV	R0,.HDRAD	;AND SAVE IT'S ADDRESS
     33	000014					CALL	FSTOUT
     34	000020	012700 	000000G			MOV	#FDBOUT,R0
     35	000024	052767 	000000G	000000G	UNLCK1:	BIS	#FRSTIM,CPYCTL
     36	000032					CALL	PARSE
     37	000036	103003 				BCC	10$
     38	000040					CALL	PRSERR
     39	000044	000465 				BR	ULKNXT
     40	000046	016067 	000120 	000000G	10$:	MOV	F.FVER(R0),VERSAV
     41	000054	016760 	000000G	000120 	UNLCK2:	MOV	VERSAV,F.FVER(R0)
     42	000062					CALL	FNDNXT
     43	000066	103441 				BCS	65$
     44	000070	042767 	000000G	000000G		BIC	#FRSTIM,CPYCTL
     45					; READ THE FILE ATTRIBUTES
     46	000076					CALL	RDATT
     47	000102	103436 				BCS	70$
     48					;
     49					; NOW VERIFY THAT FILE IS LOCKED
     50	000104	016705 	000000G			MOV	.HDRAD,R5	;ADDRESS OF HEADER BUFFER TO R5
     51	000110	062705 	000000G			ADD	#HH.CHU,R5	;R5=ADDRESS OF CHARACTERISTICS BYTE
     52	000114	132715 	000000G			BITB	#HS.PHL,(R5)
     53	000120	001420 				BEQ	40$		;BRANCH HF FILE NOT LOCKED
     54	000122	142715 	000000G			BICB	#HS.PHL,(R5)	;CLEAR THE LOCK BIT
     55					;
PIPUNL M0202, UNLOCK COMMAND-PI	MACRO M1108  06-DEC-77 00:04  PAGE 7-1
**** PIPUNL VERSION M0202 ****

     56					; SET UP TO WRITE THE USER CHARACTERISTICS BACK TO THE FILE
     57					; FIRST PUT AN ATTRIBUTE BLOCK ON THE STACK
     58	000126	005046 				CLR	-(SP)
     59	000130	010546 				MOV	R5,-(SP)	;ADDRESS OF BYTE TO WRITE
     60	000132	012746 	000000G			MOV	#HA.CHU,-(SP)	;ATTRIBUTE CODE AND BYTE COUNT
     61	000136	010601 				MOV	SP,R1		;R1=ADDRESS OF ATTRIBUTE BLOCK
     62	000140					CALL	WRTATT		;WRITE THE ATTRIBUTES
     63	000144	062706 	000006 			ADD	#6,SP		;CLEAN UP THE STACK
     64	000150	000416 				BR	ULKNX1
     65					;
     66					; BAD SYNTAX FOR UNLOCK COMMAND
     67	000152				20$:	ERROUT	UN04
	000152	104402 				TRAP	X
	000154	000000G				.WORD	UN04SZ
	000156	000000G				.WORD	UN04MG
     68	000160	000422 				BR	UNLKX1
     69					;
     70					; FILE ALREADY UNLOCKED
     71	000162				40$:	ERROUT	UN03,0
	000162	104406 				TRAP	X
	000164	000000G				.WORD	UN03SZ
	000166	000000G				.WORD	UN03MG
     72	000170	000406 				BR	ULKNX1
     73					;
     74					; FIND ERROR
     75	000172				65$:	CALL	FNDERR
     76	000176	000410 				BR	ULKNXT
     77					;
     78					; ERROR FROM READ ATTRIBUTES
     79	000200				70$:	ERROUT	UN02,0,0
	000200	104426 				TRAP	X
	000202	000000G				.WORD	UN02SZ
	000204	000000G				.WORD	UN02MG
     80					;
     81					; COME HERE TO CONTINUE WITH NEXT FILE IN WILD CARD CLASS
     82	000206	012700 	000000G		ULKNX1:	MOV	#FDBOUT,R0
     83	000212					CALL	NXTFIL		;ANY MORE FILES IN THIS FILE SPEC?
     84	000216	103316 				BCC	UNLCK2		;BRANCH IF YES
     85					;
     86					; COME HERE TO CONTINUE WITH THE NEXT FILE SPECIFIER
     87	000220				ULKNXT:	CALL	NXTOUT
     88	000224	103277 				BCC	UNLCK1
     89	000226	000167 	000000G		UNLKX1:	JMP	CLOSX
     90
     91					;
     92					;
     93		000001 				.END
PIPUNL M0202, UNLOCK COMMAND-PI	MACRO M1108  06-DEC-77 00:04  PAGE 7-2
SYMBOL TABLE

CLOSX = ****** GX	F.DVNM= 000134   	F.RATT= 000001   	N.FVER= 000016   	ULKNXT  000220R     002
CPYCTL= ****** GX	F.EFBK= 000010   	F.RCNM= 000034   	N.NEXT= 000022   	ULKNX1  000206R     002
FDBOUT= ****** GX	F.EFN = 000050   	F.RCTL= 000017   	N.STAT= 000020   	UNLCK1  000024R     002
FNDERR= ****** GX	F.EOBB= 000032   	F.RSIZ= 000002   	N.UNIT= 000034   	UNLCK2  000054R     002
FNDNXT= ****** GX	F.ERR = 000052   	F.RTYP= 000000   	PARSE = ****** GX	UNLKX1  000226R     002
FRSTIM= ****** GX	F.FACC= 000043   	F.STBK= 000036   	PRSERR= ****** GX	UNLOCK  000000RG    002
FSTOUT= ****** GX	F.FFBY= 000014   	F.UNIT= 000136   	RDATT = ****** GX	UN02MG= ****** GX
F.ALOC= 000040   	F.FNAM= 000110   	F.URBD= 000020   	R$$DPB= 000001   	UN02SZ= ****** GX
F.BBFS= 000062   	F.FNB = 000102   	F.VBN = 000064   	R$$DYM= 000001   	UN03MG= ****** GX
F.BDB = 000070   	F.FTYP= 000116   	F.VBSZ= 000060   	R$$EIS= 000000   	UN03SZ= ****** GX
F.BGBC= 000057   	F.FVER= 000120   	HA.CHU= ****** GX	R$$11M= 000001   	UN04MG= ****** GX
F.BKDN= 000026   	F.HIBK= 000004   	HH.CHU= ****** GX	S.FATT= 000016   	UN04SZ= ****** GX
F.BKDS= 000020   	F.LUN = 000042   	HS.PHL= ****** GX	S.FDB = 000140   	VERSAV= ****** GX
F.BKEF= 000050   	F.MBCT= 000054   	NXTFIL= ****** GX	S.FNAM= 000006   	WRTATT= ****** GX
F.BKP1= 000051   	F.MBC1= 000055   	NXTOUT= ****** GX	S.FNB = 000036   	X     = 000026
F.BKST= 000024   	F.MBFG= 000056   	N.DID = 000024   	S.FNBW= 000017   	$$    = 000067
F.BKVB= 000064   	F.NRBD= 000024   	N.DVNM= 000032   	S.FNTY= 000004   	.DYALC= ****** GX
F.CNTG= 000034   	F.NREC= 000030   	N.FID = 000000   	S.FTYP= 000002   	.HDRAD= ****** GX
F.DFNB= 000046   	F.OVBS= 000030   	N.FNAM= 000006   	S.NFEN= 000020   	...TPC= 000140
F.DSPT= 000044   	F.RACC= 000016   	N.FTYP= 000014

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

VIRTUAL MEMORY USED:  3609 WORDS  ( 15 PAGES)
DYNAMIC MEMORY:  4160 WORDS  ( 16 PAGES)
ELAPSED TIME:  00:00:21
[63,10]PIPUNL,[63,20]PIPUNL/-SP=[63,30]PIPMAC,PIPUNL
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04
TABLE OF CONTENTS

    7-   1	**** PIPSBR VERSION M0211 ****
    8-  86	FSTOUT, NXTOUT, NXTIN, WLDVER, CWLDUI
    9- 177	STNMBK, STNBK1 - INITIALIZE NAME BLOCK ROUTINES
   10- 226	PARSE, FNDNXT, FINDFL, RMVNXT
   12- 377	USEFID, PRSREG
   13- 418	COMMON ERROR ROUTINES
   14- 463	DYNAMIC MEMORY ALLOCATION AND RELEASE ROUTINES
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 7


      1						.TITLE	PIPSBR M0211, COMMAND SUBROUTINES-PIP
						.SBTTL	**** PIPSBR VERSION M0211 ****
						.IDENT	/M0211/
      2					; ALTERED TUESDAY 21-JAN-75 8:00
      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	2-MAY-74
     20
     21	000000					FLDSOF
     22						.MCALL	CSI$
     23	000000					CSI$
     24
     25						.MCALL	CALL,RETURN,CLOSE$,FDBF$R
     26
     27	000000					PURE.I
     28
     29					;  CLOSE THE INPUT AND OUTPUT FILES
     30	000000				CLOSE::	CALL	CLSIN
     31	000004	012700 	000000G		CLSOUT::MOV	#FDBOUT,R0
     32	000010					FDBF$R	R0,,,#0		;FORCE DEFAULT BUFFER COUNT
     33	000014	005760 	000000G			TST	F.BDB(R0)	;DON'T THINK ABOUT DETACHING IF CLOSED
     34	000020	001417 				BEQ	15$
     35	000022	132760 	000000G	000000G		BITB	#FD.REC,F.RCTL(R0) ;IF OUTPUT FILE IS REC DEV
     36	000030	001413 				BEQ	15$
     37	000032	012701 	000000G			MOV	#IO.DET,R1	;DETACH IT BEFORE CLOSING
     38	000036	005002 				CLR	R2
     39	000040					CALL	.XQIO
     40	000044	103005 				BCC	15$
     41	000046					ERROUT	OP06,0,0	;FAILED TO DETACH
	000046	104426 				TRAP	X
	000050	000000G				.WORD	OP06SZ
	000052	000000G				.WORD	OP06MG
     42	000054	012700 	000000G			MOV	#FDBOUT,R0	;R0 CLOBBERED BY ERROR PRINTING
     43	000060				15$:	CLOSE$	R0
     44	000064	103003 				BCC	20$
     45	000066					ERROUT	OP05,0,0
	000066	104426 				TRAP	X
	000070	000000G				.WORD	OP05SZ
	000072	000000G				.WORD	OP05MG
     46	000074				20$:	RETURN
     47					;
     48					; CLOSE THE INPUT FILE
     49	000076				CLSIN::	CLOSE$	#FDBIN
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 7-1
**** PIPSBR VERSION M0211 ****

     50	000106	103003 				BCC	10$
     51	000110					ERROUT	OP04,0,0
	000110	104426 				TRAP	X
	000112	000000G				.WORD	OP04SZ
	000114	000000G				.WORD	OP04MG
     52	000116				10$:	RETURN
     53					;+
     54					; ATTACH DEVICE IF IT IS A RECORD DEVICE.
     55					; CALLING SEQUENCE:
     56					;	CALL	RECATT
     57					; INPUTS:
     58					;	R0=FDB
     59					; OUTPUTS:
     60					;	C=0 IF OK, C=1 IF ERROR, F.ERR SET
     61					;	R1,R2 ALTERED, OTHERS PRESERVED
     62					;-
     63	000120	132760 	000000G	000000G	RECATT::BITB	#FD.REC,F.RCTL(R0)
     64	000126	000406 				BR	10$		;BRANCH IF NOTHING TO DO
     65
     66
     67					;
     68					;	N O T E -- ABOVE BEQ CHANGED TO BR TO INHIBIT ATTACHES
     69					;
     70
     71
     72	000130	012701 	000000G			MOV	#IO.ATT,R1
     73	000134	005002 				CLR	R2		;NO, EXTRA PARAMS IN DPB
     74	000136					CALL	.XQIO
     75	000142					RETURN			;NOTE THAT C BIT IS CORRECT
     76	000144	000241 			10$:	CLC
     77	000146					RETURN
     78					;
     79					; INIT THE PROTECTION VALUES TO ZERO
     80	000150	012701 	000000G		INIPRO::MOV	#WORPRO,R1
     81	000154	012702 	000000C			MOV	#<PROWRD-WORPRO>/2,R2
     82	000160	005021 			25$:	CLR	(R1)+
     83	000162					SOB	R2,25$
     84	000166					RETURN
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 8
FSTOUT, NXTOUT, NXTIN, WLDVER, CWLDUI

     86						.SBTTL	FSTOUT, NXTOUT, NXTIN, WLDVER, CWLDUI
     87					;
     88					; SET UP FOR FIRST OUTPUT SPEC - USED BY COMMANDS WHICH HAVE A LIST
     89					; OF OUTPUT SPECS AND NO INPUT SPECS
     90	000170	005767 	000000G		FSTOUT::TST	INSPEC		;NO INPUT SPECIFIER ALLOWED
     91	000174	001405 				BEQ	10$
     92	000176					ERROUT	CR01		;BAD SYNTAX
	000176	104402 				TRAP	X
	000200	000000G				.WORD	CR01SZ
	000202	000000G				.WORD	CR01MG
     93	000204	000167 	000000G			JMP	AGAIN
     94	000210	012767 	000000G	000000C	10$:	MOV	#NAMBLK,FDBOUT+F.DFNB ;SET UP DEFAULT NAME BLOCK
     95	000216	012767 	000000G	000000C		MOV	#OFNPT,FDBOUT+F.DSPT ;AND DESCRIPTOR POINTER
     96					; INITIALIZE THE DEFAULT NAME BLOCK
     97	000224	005002 				CLR	R2		;NO FILE NAME AND TYPE
     98	000226	005001 				CLR	R1		;ZERO DIRECTORY ID
     99	000230					CALL	STNMBK		;USES DEFAULT SYS DEVICE
    100	000234					RETURN
    101					; SET UP FOR NEXT OUTPUT IN LIST IF ANY, RETURN C=0 IF READY WITH
    102					; ANOTHER FILE, C=1 IF NO MORE IN LIST, OR IF ERROR
    103	000236	012700 	000000G		NXTOUT::MOV	#FDBOUT,R0
    104	000242	012701 	000000G			MOV	#OFNPT,R1
    105	000246	012702 	000000G			MOV	#OUTCSI,R2
    106	000252	000406 				BR	NXTIN1
    107	000254	012700 	000000G		NXTIN::	MOV	#FDBIN,R0
    108	000260	012701 	000000G			MOV	#IFNPT,R1
    109	000264	012702 	000000G			MOV	#INCSI,R2
    110	000270				NXTIN1::CALL	NXINOU
    111	000274					RETURN
    112					;
    113					; SET UP FOR NEXT INPUT OR OUTPUT SPEC
    114					; INPUTS:
    115					;	R0=FDB
    116					;	R1=ADDRESS OF CSI FILE NAME DESCRIPTOR
    117					;	R2=ADDR OF INCSI OR OUTCSI AS APPROPRIATE
    118	000276				NXINOU::	CLOSE$	R0
    119	000302	103415 				BCS	80$
    120	000304	032761 	000020 	000014 		BIT	#CS.MOR,N.SPEC(R1)
    121	000312	001420 				BEQ	95$
    122	000314	016767 	000000G	000000G		MOV	.LCLSW,CPYCTL
    123	000322					CALL	@R2
    124	000324	103410 				BCS	85$		;BRANCH IF BAD SWITCH OR VALUE
    125					;
    126					; IF PREVIOUS FILE NAME/TYPE WAS EXPLICIT, BUT NOT A WILD CARD
    127					; THEN USE THAT NAME/TYPE AS A DEFAULT FOR THE NEXT SPECIFIER
    128	000326					CALL	.DFLTN		;SET NEXT DEFAULT FILE NAME AND TYPE
    129	000332	000241 				CLC
    130	000334					RETURN
    131					;
    132					; CLOSE FAILURE
    133	000336				80$:	ERROUT	OP05,0,0
	000336	104426 				TRAP	X
	000340	000000G				.WORD	OP05SZ
	000342	000000G				.WORD	OP05MG
    134	000344	000403 				BR	95$
    135					;
    136					; BAD SWITCH
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 8-1
FSTOUT, NXTOUT, NXTIN, WLDVER, CWLDUI

    137	000346				85$:	ERROUT	CR02,1
	000346	104412 				TRAP	X
	000350	000000G				.WORD	CR02SZ
	000352	000000G				.WORD	CR02MG
    138	000354	000261 			95$:	SEC
    139	000356					RETURN
    140					;
    141					; CHECK IF WILD CARDS ARE PRESENT IN NAME OR TYPE, THAT VERSION
    142					; IS EXPLICIT OR WILD CARD
    143					; INPUTS:
    144					;	R0=FDB
    145					;	R1=FILE NAME BLOCK
    146					; OUTPUTS:
    147					;	C=0 IF OK, AND ALL REGISTERS PRESERVED
    148					;	C=1 IF NOT OK, ALL REGISTERS ALTERED
    149	000360				WLDVER::CALL	.WLDVC
    150	000364	103004 				BCC	10$
    151	000366					ERROUT	DE04,1
	000366	104412 				TRAP	X
	000370	000000G				.WORD	DE04SZ
	000372	000000G				.WORD	DE04MG
    152	000374	000261 				SEC
    153	000376				10$:	RETURN
    154					;
    155					;+
    156					; CHECK FOR LEGAL WILD CARD UIC, RESTRICT TO [*,*]
    157					; USED ONLY TO RESTRICT OUTPUT UIC'S
    158					; CALLING SEQUENCE:
    159					;	CALL	CWLDUI
    160					; INPUTS:
    161					;	R0=FDB
    162					; OUTPUTS:
    163					;	C=0 IFLEGAL, C=1 IF NOT
    164					;	ALL REGISTERS PRESERVED
    165					;-
    166	000400	032760 	000000G	000000C	CWLDUI::BIT	#NB.SDI,F.FNB+N.STAT(R0) ;LEGAL IF NO WILD UIC'S
    167	000406	001407 				BEQ	20$
    168	000410	016046 	000000C			MOV	F.FNB+N.STAT(R0),-(SP)
    169	000414	042716 	000000C			BIC	#^C<NB.SDI>,@SP
    170	000420	022726 	000000G			CMP	#NB.SDI,(SP)+
    171	000424	001002 				BNE	30$
    172	000426	000241 			20$:	CLC
    173	000430					RETURN
    174	000432	000261 			30$:	SEC
    175	000434					RETURN
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 9
STNMBK, STNBK1 - INITIALIZE NAME BLOCK ROUTINES

    177						.SBTTL	STNMBK, STNBK1 - INITIALIZE NAME BLOCK ROUTINES
    178					;+
    179					; SET UP THE FILE NAME BLOCK, NAMBLK, WITH THE FILE NAME, AND TYPE
    180					; THE DIRECTORY ID, AND THE DEVICE AND UNIT
    181					; CALLING SEQUENCE:
    182					;	JSR	PC,STNMBK
    183					; INPUTS:
    184					;	R1=VALUE TO BE STORED IN FIRST 2 LOC OF DIRECTORY ID
    185					;		=0 FOR NORMAL CASE OF NO DEFAULT DIRECTORY ID
    186					;		=-1 TO DEFAULT TO MFD
    187					;	R2=POINTER TO NAME AND TYPE TO MOVE IN
    188					;		OR = 0 IF DESIRE NULL DEFAULTS FOR FILE NAME AND TYPE
    189					; OUTPUTS:
    190					;	R0,R1,R5 PRESERVED, R3,R4 ALTERED
    191					;	R2 ALTERED IF IT POINTS AT A NAME TO MOVE, PRESERVED IF 0
    192					; OPERATION:
    193					;	ZEROS THE SPECIFIED FILE NAME BLOCK AND SET UP THE SPECIFIED
    194					; DIRECTORY ID (VALUE FROM R1), THE SYSTEM
    195					; DEVICE AND UNIT, AND THE DEFAULT FILE NAME AND TYPE IF R2 NON ZERO.
    196					;
    197					; ALTERNATE ENTRY POINT:
    198					;	JSR	PC,STNBK1
    199					; INPUTS:
    200					;	R0 = NAMBLK ADDRESS TO INITIALIZE
    201					;	OTHERWISE, SAME AS ABOVE
    202					;-
    203	000436	010046 			STNMBK::MOV	R0,-(SP)
    204	000440	012700 	000000G			MOV	#NAMBLK,R0
    205	000444					CALL	STNBK1
    206	000450	012600 				MOV	(SP)+,R0
    207	000452					RETURN
    208					;
    209	000454	010003 			STNBK1::MOV	R0,R3		;ZERO THE FILE NAME BLOCK
    210	000456	012704 	000000G			MOV	#S.FNBW,R4	;NO. OF WORDS IN FNB
    211	000462	005023 			10$:	CLR	(R3)+
    212	000464					SOB	R4,10$
    213	000470	010160 	000000G			MOV	R1,N.DID(R0)	;STORE DEFAULT DIRECTORY ID
    214	000474	010160 	000002G			MOV	R1,N.DID+2(R0)
    215	000500	016760 	000000G	000000G		MOV	.DEFDV,N.DVNM(R0) ;SET DEFAULT DEVICE
    216	000506	016760 	000000G	000000G		MOV	.DEFUN,N.UNIT(R0) ;AND UNIT
    217	000514	005702 				TST	R2		;IF DEFAULT NAME AND TYPE SPECIFIED
    218	000516	001410 				BEQ	40$
    219	000520	010003 				MOV	R0,R3		;MOVE THEM IN
    220	000522	062703 	000000G			ADD	#N.FNAM,R3
    221	000526	012704 	000000G			MOV	#S.FNTY,R4	;NUMBER OF WORDS TO MOVE
    222	000532	012223 			20$:	MOV	(R2)+,(R3)+	;MOVE FILE NAME AND TYPE
    223	000534					SOB	R4,20$
    224	000540				40$:	RETURN
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 10
PARSE, FNDNXT, FINDFL, RMVNXT

    226						.SBTTL	PARSE, FNDNXT, FINDFL, RMVNXT
    227					;+
    228					; PARSE THE FILE NAME BLOCK
    229					; CALLING SEQUENCE:
    230					;	CALL	PARSE
    231					; INPUTS:
    232					;	R0=FDB
    233					; OUTPUTS:
    234					;	C=0 IF SUCCESSFUL, C=1 IF FAILURE
    235					;	R1=FILE NAME BLOCK
    236					;	R2=FILE DESCRIPTOR POINTER
    237					;	R3=DEFAULT FILE NAME BLOCK
    238					;	R0,R4,R5 PRESERVED
    239					; OPERATION:
    240					;	HANDLES WILD CARD UIC PARSE
    241					;-
    242	000542	010446 			PARSE::	MOV	R4,-(SP)
    243	000544					CALL	PRSREG
    244	000550	005762 	000016 			TST	N.FLID(R2)	;/FI SWITCH SPECIFIED?
    245	000554	001403 				BEQ	5$		;BRANCH IF NOT
    246	000556					CALL	.PRSDV		;JUST PARSE THE DEVICE NAME
    247	000562	000407 				BR	20$
    248	000564	005704 			5$:	TST	R4
    249	000566	001403 				BEQ	10$		;BRANCH IF CALLING .PARSE
    250	000570					CALL	.WPARS
    251	000574	000402 				BR	20$
    252	000576				10$:	CALL	.PARSE
    253	000602	012604 			20$:	MOV	(SP)+,R4
    254	000604					RETURN
    255					;
    256					;+
    257					; FIND THE NEXT FILE IN THIS (OR NEXT) DIRECTORY
    258					; CALLING SEQUENCE:
    259					;	CALL	FNDNXT
    260					; INPUTS:
    261					;	R0=FDB ADDRESS
    262					; OUTPUTS:
    263					;	C=0 IF SUCCESSFUL, C=1 IF FAILURE
    264					;	R1=FILE NAME BLOCK
    265					;	R0,R2-R5 PRESERVED
    266					; OPERATION:
    267					;	FIND WILL USE EXPLICIT FILE ID IF SPECIFIED, AND WILL CROSS
    268					; DIRECTORIES IF WILD CARD UIC IS SPECIFIED
    269					;-
    270	000606	010001 			FNDNXT::MOV	R0,R1
    271	000610	062701 	000000G			ADD	#F.FNB,R1
    272	000614					CALL	USEFID
    273	000620	103011 				BCC	20$
    274	000622	010246 				MOV	R2,-(SP)
    275	000624	016002 	000000G			MOV	F.DSPT(R0),R2
    276	000630	001402 				BEQ	10$
    277	000632	062702 	000024 			ADD	#S.FIDS+S.APPD,R2
    278	000636				10$:	CALL	.FNDNX
    279	000642	012602 				MOV	(SP)+,R2
    280	000644				20$:	RETURN
    281					;
    282					;+
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 10-1
PARSE, FNDNXT, FINDFL, RMVNXT

    283					; FIND NEXT FILE, DO NOT ALLOW FILE ID OR CROSS DIRECTORY SEARCH
    284					; CALLING SEQUENCE:
    285					;	CALL	FINDFL
    286					; INPUTS:
    287					;	R0=FDB ADDRESS
    288					; OUTPUTS:
    289					;	C=0 IF SUCCESSFUL, C=1 IF ERROR
    290					;	R1= FILE NAME BLOCK
    291					;	R0,R2-R5 PRESERVED
    292					;-
    293	000646	010001 			FINDFL::MOV	R0,R1
    294	000650	062701 	000000G			ADD	#F.FNB,R1
    295	000654	010246 				MOV	R2,-(SP)
    296	000656	005002 				CLR	R2
    297	000660					CALL	.FNDNX
    298	000664	012602 				MOV	(SP)+,R2
    299	000666					RETURN
    300					;
    301					;+
    302					; IS THERE ANOTHER FILE TO OPERATE ON IN THIS FILE SPECIFIER
    303					; CALLING SEQUENCE:
    304					;	CALL	NXTFIL
    305					; INPUTS:
    306					;	R0=FDB
    307					; OUTPUTS:
    308					;	C=0 IF THERE IS ANOTHER FILE, C=1 IF NOT
    309					;	R0,R5 PRESERVED
    310					;	R1 = FILE NAME BLOCK
    311					;	R2,R3,R4 ALTERED
    312					; OPERATION:
    313					;	SETS UP FOR THE NEXT FNDNXT, RMVNXT CALL BY CHECKING IF
    314					; A WILD CARD NAME OR DIRECTORY WAS SPECIFIED.  THIS ROUTINE WILL
    315					; CROSS DIRECTORIES IF A WILD CARD UIC IS SPECIFIED WITH NO WILD
    316					; CARDS IN THE FILE NAME.
    317					;-
    318	000670	000261 			NXTFIL::SEC			;ASSUME NO WILD CARDS
    319	000672	032760 	000000G	000000C		BIT	#NB.SFL,F.FNB+N.STAT(R0) ;ANY WILD CARDS?
    320	000700	001411 				BEQ	20$		;BRANCH IF NO
    321	000702	000241 				CLC			;NOW ASSUME SUCCESSFUL
    322	000704	032760 	000000G	000000C		BIT	#NB.SFN,F.FNB+N.STAT(R0) ;* IN NAME, TYPE, VERSION
    323	000712	001004 				BNE	20$		;BRANCH IF YES
    324					;
    325					; NO WILD CARDS IN NAME, BUT WILD CARD UIC, CROSS DIRECTORIES NOW
    326					;
    327	000714					CALL	PRSREG		;SET UP REGISTERS
    328	000720					CALL	.NXDIR		;AND CHAIN TO NEXT DIRECTORY
    329	000724				20$:	RETURN
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 11
PARSE, FNDNXT, FINDFL, RMVNXT

    331					;+
    332					; REMOVE NEXT FILE, ALLOWS CROSS DIRECTORY OPERATION
    333					; INPUTS:
    334					;	R0=FDB
    335					; OUTPUTS:
    336					;	C=0 IF REMOVED, C=1 IF ERROR
    337					;	R1=FILE NAME BLOCK ADDRESS
    338					;	OTHER REGISTERS PRESERVED
    339					; OPERATION:
    340					;	HANDLES THE SPECIAL CASE OF EXPLICIT FILE NAME AND TYPE AND
    341					; DEFAULT VERSION (0 OR -1) BY DOING A FIND AND THEN A REMOVE.  ALL
    342					; OTHER CASES JUST DO THE REMOVE.
    343					;	IF WILD CARD DIRECTORY WAS SPECIFIED, RMVNXT WILL
    344					; AUTOMATICALLY CROSS TO THE NEXT DIRECTORY.
    345					;-
    346	000726	010001 			RMVNXT::MOV	R0,R1
    347	000730	062701 	000000G			ADD	#F.FNB,R1
    348	000734					CALL	USEFID
    349	000740	103047 				BCC	70$
    350	000742	032761 	000000G	000000G	5$:	BIT	#NB.SFN,N.STAT(R1) ;IF WILD CARDS
    351	000750	001014 				BNE	30$		;JUST DO THE REMOVE
    352	000752	005761 	000000G			TST	N.FVER(R1)	;IF DEFAULT NEWEST VERSION
    353	000756	001404 				BEQ	10$		;MUST DO FIND FIRST
    354	000760	022761 	177777 	000000G		CMP	#-1,N.FVER(R1)	;IF DEFAULT OLDEST VERSION
    355	000766	001005 				BNE	30$
    356	000770				10$:	CALL	.FIND		;MUST DO THE FIND FIRST
    357	000774	103404 				BCS	50$
    358	000776	005061 	000000G			CLR	N.NEXT(R1)
    359	001002				30$:	CALL	.REMOV
    360	001006	103024 			50$:	BCC	70$
    361	001010	032761 	000000G	000000G		BIT	#NB.SDI,N.STAT(R1) ;ANY WILD UIC'S
    362	001016	001420 				BEQ	70$		;BRANCH IF NO
    363	001020	122760 	000000G	000000G		CMPB	#IE.NSF,F.ERR(R0) ;"NO SUCH FILE" ERROR
    364	001026	001013 				BNE	60$
    365	001030	010246 				MOV	R2,-(SP)
    366	001032	010346 				MOV	R3,-(SP)
    367	001034	010446 				MOV	R4,-(SP)
    368	001036					CALL	PRSREG
    369	001042					CALL	.NXDIR		;GET NEXT WILD DIRECTORY IF ANY
    370	001046	012604 				MOV	(SP)+,R4
    371	001050	012603 				MOV	(SP)+,R3
    372	001052	012602 				MOV	(SP)+,R2
    373	001054	103332 				BCC	5$
    374	001056	000261 			60$:	SEC
    375	001060				70$:	RETURN
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 12
USEFID, PRSREG

    377						.SBTTL	USEFID, PRSREG
    378					;
    379					; CHECK IF FILE ID WAS MANUALLY SPECIFIED
    380					; IF IT WAS, MOVE IT TO THE FILE ID OF F.FNB, RETURN C=0
    381					; IF NOT, RETURN C=1
    382					; ALL REGISTER PRESERVED
    383	001062	010246 			USEFID::MOV	R2,-(SP)
    384	001064	016002 	000000G			MOV	F.DSPT(R0),R2
    385	001070	001414 				BEQ	10$
    386	001072	016261 	000016 	000000G		MOV	N.FLID(R2),N.FID(R1) ;WAS FILE ID MANUALLY SPECIFIED
    387	001100	001410 				BEQ	10$		;BRANCH IF NO
    388	001102	016261 	000020 	000002G		MOV	N.FLID+2(R2),N.FID+2(R1)
    389	001110	016261 	000022 	000004G		MOV	N.FLID+4(R2),N.FID+4(R1)
    390	001116	000241 				CLC
    391	001120	000401 				BR	20$		;NOTE CARRY BIT MUST BE CLEAR
    392	001122	000261 			10$:	SEC
    393	001124	012602 			20$:	MOV	(SP)+,R2
    394	001126					RETURN
    395					;
    396					;+
    397					; SET UP REGISTERS FOR CALL TO .WPARS, .NXDIR
    398					; CALLING SEQUENCE:
    399					;	CALL	PRSREG
    400					; INPUTS:
    401					;	R0=FDB ADDRESS
    402					; OUTPUTS:
    403					;	R0=FDB ADDRESS
    404					;	R1=FILE NAME BLOCK
    405					;	R2=FILE DESCRIPTOR POINTER
    406					;	R3=DEFAULT FILE NAME BLOCK
    407					;	R4=S.FIDS+S.APPD;(F.DSPT(R0))
    408					;-
    409	001130	010001 			PRSREG::MOV	R0,R1
    410	001132	062701 	000000G			ADD	#F.FNB,R1
    411	001136	016002 	000000G			MOV	F.DSPT(R0),R2
    412	001142	016003 	000000G			MOV	F.DFNB(R0),R3
    413	001146	010204 				MOV	R2,R4
    414	001150	001402 				BEQ	10$
    415	001152	062704 	000024 			ADD	#S.FIDS+S.APPD,R4
    416	001156				10$:	RETURN
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 13
COMMON ERROR ROUTINES

    418						.SBTTL	COMMON ERROR ROUTINES
    419					;
    420					; ERROR FROM PARSE
    421	001160	122760 	000000G	000000G	PRSERR::CMPB	#IE.NSF,F.ERR(R0) ;NO SUCH FILE?
    422	001166	001004 				BNE	20$
    423	001170					ERROUT	DI05,1		;CAN'T FIND DIRECTORY FILE
	001170	104412 				TRAP	X
	001172	000000G				.WORD	DI05SZ
	001174	000000G				.WORD	DI05MG
    424	001176					RETURN
    425	001200	122760 	000000G	000000G	20$:	CMPB	#IE.PRI,F.ERR(R0) ;PROTECTION VIOLATION
    426	001206	001404 				BEQ	30$
    427	001210					ERROUT	DE08,1,0
	001210	104432 				TRAP	X
	001212	000000G				.WORD	DE08SZ
	001214	000000G				.WORD	DE08MG
    428	001216					RETURN
    429					; PROTECTION VIOLATION  PROBABLY INDICATES
    430					; THAT THE DEVICE WAS NEVER MOUNTED
    431	001220				30$:	ERROUT	OP07,1
	001220	104412 				TRAP	X
	001222	000000G				.WORD	OP07SZ
	001224	000000G				.WORD	OP07MG
    432	001226					RETURN
    433					;
    434					; FIND ERROR - IF NO SUCH FILE, NO ERROR MESSAGE
    435					; R0=FDB, R1=FNB, ALL REGISTERS ALTERED
    436	001230	032767 	000000G	000000G	FNDERR::BIT	#FRSTIM,CPYCTL	;IF NOT THE FIRST TIM
    437	001236	001010 				BNE	20$
    438	001240	122760 	000000G	000000G		CMPB	#IE.NSF,F.ERR(R0) ;AND IF "NO SUCH FILE"
    439	001246	001403 				BEQ	10$		;NO ERROR MESSAGE
    440					;
    441					; OTHER ERROR THAN "NO SUCH FILE" - NOT THE FIRST FIND
    442	001250					ERROUT	FI01,1,0
	001250	104432 				TRAP	X
	001252	000000G				.WORD	FI01SZ
	001254	000000G				.WORD	FI01MG
    443	001256				10$:	RETURN
    444					;
    445					; ERROR ON FIRST FIND
    446	001260	122760 	000000G	000000G	20$:	CMPB	#IE.NSF,F.ERR(R0)
    447	001266	001004 				BNE	30$
    448	001270					ERROUT	FI03,1		;NO SUCH FILE
	001270	104412 				TRAP	X
	001272	000000G				.WORD	FI03SZ
	001274	000000G				.WORD	FI03MG
    449	001276					RETURN
    450	001300				30$:	ERROUT	FI02,1,0	;CANNOT FIND FILE
	001300	104432 				TRAP	X
	001302	000000G				.WORD	FI02SZ
	001304	000000G				.WORD	FI02MG
    451	001306					RETURN
    452					;
    453					; REMOVE ERROR - LIKE FNDERR ABOVE
    454	001310	122760 	000000G	000000G	RMVERR::CMPB	#IE.NSF,F.ERR(R0)
    455	001316	001744 				BEQ	FNDERR		;IF NO SUCH FILE, THEN USE FNDERR
    456	001320	122760 	000000G	000000G		CMPB	#IE.PRI,F.ERR(R0) ;IF PROTECTION VIOLATION
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 13-1
COMMON ERROR ROUTINES

    457	001326	001004 				BNE	10$
    458	001330					ERROUT	RM02,1,0	;PROBABLY INDICATES DISK WRITE PROTECTED
	001330	104432 				TRAP	X
	001332	000000G				.WORD	RM02SZ
	001334	000000G				.WORD	RM02MG
    459	001336					RETURN
    460	001340				10$:	ERROUT	RM01,1,0
	001340	104432 				TRAP	X
	001342	000000G				.WORD	RM01SZ
	001344	000000G				.WORD	RM01MG
    461	001346					RETURN
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 14
DYNAMIC MEMORY ALLOCATION AND RELEASE ROUTINES

    463						.SBTTL	DYNAMIC MEMORY ALLOCATION AND RELEASE ROUTINES
    464					;+
    465					; ALLOCATE BUFFER OF THE SPECIFIED SIZE (R1 BYTES) FROM THE FILE STORAGE REGION
    466					; CALLING SEQUENCE
    467					;	CALL	.DYALC
    468					; INPUTS:
    469					;	R1=BYTE COUNT TO ALLOCATE
    470					; OUTPUTS:
    471					;	R0=ADDRESS ALLOCATED
    472					;	R1-R5 PRESERVED
    473					;	.DYBUF AND .DYBYT ALSO SET TO ADDRESS AND SIZE OF BUFFER
    474					;	IF FAIL TO ALLOCATE, THEN FATAL DYNAMIC MEMORY ERROR
    475					;-
    476	001350	016700 	000000G		.DYALC::MOV	.DYBUF,R0
    477	001354	020167 	000000G			CMP	R1,.DYBYT	;DESIRED SIZE BUFFER ALREADY ALLOCATED?
    478	001360	001417 				BEQ	40$		;BRANCH IF  YES
    479	001362					CALL	.DYREL		;NO, RELEASE ANYTHING CURRENTLY ALLOCATED
    480	001366	010246 				MOV	R2,-(SP)
    481	001370	010146 				MOV	R1,-(SP)
    482	001372	013700 	000000G			MOV	@#.FSRPT,R0
    483	001376					CALL	$RQCB		;ALLOCATE FOR FILE STORAGE REGION
    484	001402	012601 				MOV	(SP)+,R1
    485	001404	012602 				MOV	(SP)+,R2
    486	001406	103405 				BCS	60$		;BRANCH IF FAILED TO ALLOCATE
    487	001410	010067 	000000G			MOV	R0,.DYBUF	;SET UP ADDRESS
    488	001414	010167 	000000G			MOV	R1,.DYBYT	;AND SIZE OF THE BUFFER ALLOCATED
    489	001420				40$:	RETURN
    490	001422				60$:	ERROUX	DY01		;NOT ENOUGH DYNAMIC MEMORY
	001422	104403 				TRAP	X
	001424	000000G				.WORD	DY01SZ
	001426	000000G				.WORD	DY01MG
    491
    492					;+
    493					; RELEASE THE CURRENTLY ALLOCATED DYNAMIC MEMORY BUFFER TO THE FILE
    494					; STORAGE REGION
    495					; CALLING SEQUENCE:
    496					;	CALL	.DYREL
    497					; INPUTS:
    498					;	NONE
    499					; OUTPUTS:
    500					;	ALL REGISTER PRESERVED
    501					;	.DYBYT ZEROED TO REFLECT BUFFER RELEASED
    502					;-
    503	001430	005767 	000000G		.DYREL::TST	.DYBYT		;IF NOTHING TO RELEASE, QUICK NOP
    504	001434	001414 				BEQ	40$
    505	001436	004567 	000000G			JSR	R5,.SAVR1
    506	001442	013700 	000000G			MOV	@#.FSRPT,R0
    507	001446	016701 	000000G			MOV	.DYBYT,R1
    508	001452	016702 	000000G			MOV	.DYBUF,R2
    509	001456					CALL	$RLCB		;RELEASE THE BUFFER (ADR IN R2, SIZE IN R1)
    510	001462	005067 	000000G			CLR	.DYBYT		;RECORD THE FACT THAT IT'S RELEASED
    511	001466				40$:	RETURN
    512					;
    513					;
    514		000001 				.END
PIPSBR M0211, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:04  PAGE 14-1
SYMBOL TABLE

AGAIN = ****** GX	DE04SZ= ****** GX	IFNPT = ****** GX	OP04MG= ****** GX	S.FNBW= ****** GX
CLOSE   000000RG    002	DE08MG= ****** GX	INCSI = ****** GX	OP04SZ= ****** GX	S.FNTY= ****** GX
CLSIN   000076RG    002	DE08SZ= ****** GX	INIPRO  000150RG    002	OP05MG= ****** GX	USEFID  001062RG    002
CLSOUT  000004RG    002	DI05MG= ****** GX	INSPEC= ****** GX	OP05SZ= ****** GX	WLDVER  000360RG    002
CPYCTL= ****** GX	DI05SZ= ****** GX	IO.ATT= ****** GX	OP06MG= ****** GX	WORPRO= ****** GX
CR01MG= ****** GX	DY01MG= ****** GX	IO.DET= ****** GX	OP06SZ= ****** GX	X     = 000003
CR01SZ= ****** GX	DY01SZ= ****** GX	NAMBLK= ****** GX	OP07MG= ****** GX	$RLCB = ****** GX
CR02MG= ****** GX	FDBIN = ****** GX	NB.SDI= ****** GX	OP07SZ= ****** GX	$RQCB = ****** GX
CR02SZ= ****** GX	FDBOUT= ****** GX	NB.SFL= ****** GX	OUTCSI= ****** GX	$$    = 000067
CS.DIF= 000002   	FD.REC= ****** GX	NB.SFN= ****** GX	PARSE   000542RG    002	.CLOSE= ****** G
CS.DVF= 000004   	FINDFL  000646RG    002	NXINOU  000276RG    002	PAR$$$= 000000   	.DEFDV= ****** GX
CS.EQU= 000040   	FI01MG= ****** GX	NXTFIL  000670RG    002	PROWRD= ****** GX	.DEFUN= ****** GX
CS.INP= 000001   	FI01SZ= ****** GX	NXTIN   000254RG    002	PRSERR  001160RG    002	.DFLTN= ****** GX
CS.MOR= 000020   	FI02MG= ****** GX	NXTIN1  000270RG    002	PRSREG  001130RG    002	.DYALC  001350RG    002
CS.NMF= 000001   	FI02SZ= ****** GX	NXTOUT  000236RG    002	RECATT  000120RG    002	.DYBUF= ****** GX
CS.OUT= 000002   	FI03MG= ****** GX	N.DEVD= 000000   	RMVERR  001310RG    002	.DYBYT= ****** GX
CS.WLD= 000010   	FI03SZ= ****** GX	N.DID = ****** GX	RMVNXT  000726RG    002	.DYREL  001430RG    002
CWLDUI  000400RG    002	FNDERR  001230RG    002	N.DIRD= 000004   	RM01MG= ****** GX	.FIND = ****** GX
C.CMLD= 000002   	FNDNXT  000606RG    002	N.DVNM= ****** GX	RM01SZ= ****** GX	.FNDNX= ****** GX
C.DEVD= 000006   	FRSTIM= ****** GX	N.FID = ****** GX	RM02MG= ****** GX	.FSRPT= ****** GX
C.DIRD= 000012   	FSTOUT  000170RG    002	N.FLID= 000016   	RM02SZ= ****** GX	.LCLSW= ****** GX
C.DSDS= 000006   	F.BDB = ****** GX	N.FNAM= ****** GX	R$$DPB= 000001   	.NXDIR= ****** GX
C.FILD= 000016   	F.DFNB= ****** GX	N.FNMD= 000010   	R$$DYM= 000001   	.PARSE= ****** GX
C.MKW1= 000024   	F.DSPT= ****** GX	N.FVER= ****** GX	R$$EIS= 000000   	.PRSDV= ****** GX
C.MKW2= 000026   	F.ERR = ****** GX	N.NEXT= ****** GX	R$$11M= 000001   	.REMOV= ****** GX
C.SIZE= 000054   	F.FNB = ****** GX	N.SPEC= 000014   	STNBK1  000454RG    002	.SAVR1= ****** GX
C.STAT= 000001   	F.MBCT= ****** GX	N.STAT= ****** GX	STNMBK  000436RG    002	.WLDVC= ****** GX
C.SWAD= 000022   	F.RCTL= ****** GX	N.UNIT= ****** GX	S.APPD= 000010   	.WPARS= ****** GX
C.TYPR= 000000   	IE.NSF= ****** GX	OFNPT = ****** GX	S.FIDS= 000014   	.XQIO = ****** GX
DE04MG= ****** GX	IE.PRI= ****** GX

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

VIRTUAL MEMORY USED:  3839 WORDS  ( 15 PAGES)
DYNAMIC MEMORY:  4160 WORDS  ( 16 PAGES)
ELAPSED TIME:  00:00:41
[63,10]PIPSBR,[63,20]PIPSBR/-SP=[63,30]PIPMAC,PIPSBR
PIPSB1 M0210, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:05
TABLE OF CONTENTS

    7-   1	**** PIPSB1 VERSION M0210 ****
PIPSB1 M0210, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:05  PAGE 7


      1						.TITLE	PIPSB1 M0210, COMMAND SUBROUTINES-PIP
						.SBTTL	**** PIPSB1 VERSION M0210 ****
						.IDENT	/M0210/
      2					; ALTERED THURSDAY 9-JAN-75 9: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	9-JAN-75
     19
     20	000000					FLDSOF
     21						.MCALL	CALL,RETURN
     22
     23	000000					PURE.I
     24
     25					;
     26					; WRITE ATTRIBUTES
     27					; INPUTS:
     28					;	R0=FDB ADDRESS
     29					;	R1=ADDRESS OF ATTRIBUTE BLOCK
     30					; OUTPUTS:
     31					;	C=0 IF OK, C=1 IF ERROR
     32	000000	010146 			WRTATT::MOV	R1,-(SP)	;ADDRESS OF ATTRIBUTE BLOCK
     33	000002	010046 				MOV	R0,-(SP)
     34	000004	062716 	000000G			ADD	#F.FNB,@SP
     35					;
     36					; NOW CALL XQIO
     37	000010	010603 				MOV	SP,R3		;ADDRESS OF ADDITIONAL PARAMETERS
     38	000012	012702 	000002 			MOV	#2,R2		;SIZE OF EXTRA PARAM BLOCK
     39	000016	012701 	000000G			MOV	#IO.WAT,R1	;I/O FUNCTION CODE  - WRT ATTRIBUTES
     40	000022					CALL	.XQIO
     41	000026	012603 				MOV	(SP)+,R3	;CLEAN UP THE STACK
     42	000030	012603 				MOV	(SP)+,R3
     43	000032	103004 				BCC	10$		;BRANCH IF ERROR, MUST POP 5 WORDS
     44	000034					ERROUT	UN01,0,0
	000034	104426 				TRAP	X
	000036	000000G				.WORD	UN01SZ
	000040	000000G				.WORD	UN01MG
     45	000042	000261 				SEC
     46	000044				10$:	RETURN
     47					;
     48					; READ ATTRIBUTES - JUST THE FILE HEADER
     49					; INPUTS:
     50					;	R0=FDB
     51					;	R1=FNB ADDRESS
     52					; OUTPUTS:
PIPSB1 M0210, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:05  PAGE 7-1
**** PIPSB1 VERSION M0210 ****

     53					;	C=0 IF SUCCESSFUL, C=1 IF ERROR
     54					;	R0,R1,R4,R5 PRESERVED, R2,R3 ALTERED
     55					;
     56	000046				RDATT::
     57						.IF	EQ,R$$DPB	;IF OLD DPB FORMAT
     58						MOV	#HDBLK,-(SP)	;FILE HEADER ADDRESS
     59						.IFF			;IF NEW DPB FORMAT
     60	000046	012746 	000004G			MOV	#RATCTL+4,-(SP) ;ADDRESS OF ATTRIBUTE CONTROL BLOCK
     61						.ENDC
     62
     63	000052	010146 				MOV	R1,-(SP)	;ADDRESS OF FILE NAME BLOCK
     64	000054	010603 				MOV	SP,R3		;R3=ADDRESS OF EXTRA PARAMETERS
     65	000056	012702 	000002 			MOV	#2,R2		;R2=NO. OF EXTRA PARAMETERS
     66	000062	012701 	000000G			MOV	#IO.RAT,R1	;READ ATTRIBUTES I/O FUCNTION CODE
     67	000066					CALL	.XQIO		;ISSUE THE QI/O AND WAIT
     68	000072	012601 				MOV	(SP)+,R1	;CLEAN UP STACK, PRESERVIN C BIT
     69	000074	012602 				MOV	(SP)+,R2
     70	000076					RETURN
     71					;
     72					;+
     73					;
     74					; ** .GFOWN - SET UP FILE OWNER WORD IF /FO WAS SPECIFIED
     75					;
     76					; INPUTS:
     77					;
     78					;	R0=FDB
     79					;
     80					; OUTPUTS:
     81					;
     82					;	R0,R5 PRESERVED, OTHERS ALTERED
     83					;	.FOWNR=UIC OF DIRECTORY FOR THIS FDB IF /FO SWITCH WAS SPECIFIED
     84					;	.FOWNR=0 IF /FO NOT SPECIFIED OR IF FDB IS NOT FOR A DIRECTORY DEVICE
     85					;
     86					;-
     87	000100				.GFOWN::
     88	000100	012703 	000000G			MOV	#.FOWNR,R3
     89	000104	032767 	000000G	000000G		BIT	#FOWNBT,CPYCTL	;WAS /FO SPECIFIED?
     90	000112	001425 				BEQ	20$		;BRANCH IF NO, JUST RETURN 0
     91	000114	132760 	000000G	000000G		BITB	#FD.DIR,F.RCTL(R0) ;IS THIS A DIRECTORY DEVICE?
     92	000122	001421 				BEQ	20$		;BRANCH IF NO
     93	000124	016002 	000000G			MOV	F.DSPT(R0),R2	;R2=DESCRIPTOR POINTER
     94	000130	062702 	000004 			ADD	#N.DIRD,R2	;FORM ADDRESS OF DIRECTORY STRING DESCRIPTOR
     95	000134	011246 				MOV	(R2),-(SP)	;SAVE SIZE OF STRING
     96	000136	001007 				BNE	10$		;BRANCH IF NOT NULL
     97	000140	010204 				MOV	R2,R4		;SAVE ADDRESS
     98	000142					CALL	.RDFDR		;READ THE DEFAULT DIRECTORY STRING
     99	000146	010114 				MOV	R1,(R4)		;STORE IT'S SIZE
    100	000150	010264 	000002 			MOV	R2,2(R4)	;AND ADDRESS
    101	000154	010402 				MOV	R4,R2		;R2 = DIRECTORY STRING DESCRIPTOR
    102	000156				10$:	CALL	.ASCPP		;CONVERT TO PPN - STORE (R3)
    103	000162	012612 				MOV	(SP)+,(R2)	;RESTORE ORIGINAL SIZE OF STRING OR 0
    104	000164	103001 				BCC	30$		;BRANCH IF CONVERSION OK
    105	000166	005013 			20$:	CLR	(R3)		;SAY NO FILE OWNER SPECIFIED
    106	000170				30$:	RETURN
    107					;
    108					;
    109		000001 				.END
PIPSB1 M0210, COMMAND SUBROUTIN	MACRO M1108  06-DEC-77 00:05  PAGE 7-2
SYMBOL TABLE

CPYCTL= ****** GX	IO.WAT= ****** GX	RATCTL= ****** GX	S.APPD= 000010   	$$    = 000067
FD.DIR= ****** GX	N.DEVD= 000000   	RDATT   000046RG    002	S.FIDS= 000014   	.ASCPP= ****** GX
FOWNBT= ****** GX	N.DIRD= 000004   	R$$DPB= 000001   	UN01MG= ****** GX	.FOWNR= ****** GX
F.DSPT= ****** GX	N.FLID= 000016   	R$$DYM= 000001   	UN01SZ= ****** GX	.GFOWN  000100RG    002
F.FNB = ****** GX	N.FNMD= 000010   	R$$EIS= 000000   	WRTATT  000000RG    002	.RDFDR= ****** GX
F.RCTL= ****** GX	N.SPEC= 000014   	R$$11M= 000001   	X     = 000026   	.XQIO = ****** GX
IO.RAT= ****** GX

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

VIRTUAL MEMORY USED:  2576 WORDS  ( 11 PAGES)
DYNAMIC MEMORY:  3104 WORDS  ( 11 PAGES)
ELAPSED TIME:  00:00:14
[63,10]PIPSB1,[63,20]PIPSB1/-SP=[63,30]PIPMAC,PIPSB1
PIPMSG M0020, ERROR MESSAGES FO	MACRO M1108  06-DEC-77 00:05
TABLE OF CONTENTS

    7-   1	**** PIPMSG VERSION M0020 ****
PIPMSG M0020, ERROR MESSAGES FO	MACRO M1108  06-DEC-77 00:05  PAGE 7


      1						.TITLE	PIPMSG M0020, ERROR MESSAGES FOR PIP
						.SBTTL	**** PIPMSG VERSION M0020 ****
						.IDENT	/M0020/
      2					; ALTERED:
      3					; DEBORAH HOLTZ GILLESPIE 9 JAN 76 11:30 A. M.(***)
      4					; ANDREW C. GOLDSTEIN  19 FEB 76  14:17
      5					;
      6					; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      7					; COPYRIGHT 1973, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
      8
      9					; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
     10					; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
     11					; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
     12					; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
     13
     14					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
     15					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
     16					; EQUIPMENT CORPORATION.
     17
     18					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
     19					; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
     20					;
     21					; PETER H. LIPMAN 18-SEP-73
     22					;
     23						.IF	NDF,R$$MSG
     24						.IF	EQ,R$$11M
     25						R$$MSG=1		;SEPARATE MESSAGE FILE FOR RSX11D
     26						.IFF
     27						R$$MSG=0		;MESSAGES IN CORE IMAGE FOR RSX11M
     28						.ENDC
     29						.ENDC
     30		000014 				FF=14
     31		000001 				MSGBL.=1		;FORCE GLOBAL DEFINITIONS
     32		000000 				MSGCT.=0		;INITIALIZE MESSAGE COUNTER
     33					;
     34					; NOTE: THE MESSAGE NAMES ARE 4 CHARACTERS. APPEND "MG"
     35					; TO THE NAME TO GET THE SYMBOLLIC ADDRESS OF THE MESSAGE.
     36					; APPEND "SZ" TO THE NAME TO GET THE SYMBOLLIC SIZE
     37
     38
     39					; COMMAND RECEIVER AND DISPATCHER ERRORS
     40	000000					MSG	CR01,<COMMAND SYNTAX ERROR>
     41	000000					MSG	CR02,<ILLEGAL SWITCH>
     42	000000					MSG	CR03,<TOO MANY COMMAND SWITCHES - AMBIGUOUS>
     43
     44					; COPY FILE ERRORS
     45	000000					MSG	CP01,<ONLY [*,*] IS LEGAL AS DESTINATION UIC>
     46	000000					MSG	CP02,<ILLEGAL COMMAND>
     47	000000					MSG	CP03,<ILLEGAL "*" COPY TO SAME DEVICE AND DIRECTORY>
     48	000000					MSG	CP04,<BAD USE OF WILD CARDS IN DESTINATION FILE NAME>
     49	000000					MSG	CP05,<EXPLICIT OUTPUT FILE NAME REQUIRED>
     50	000000					MSG	CP10,<ALLOCATION FAILURE - NO CONTIGUOUS SPACE>
     51	000000					MSG	CP11,<ALLOCATION FAILURE - NO SPACE AVAILABLE>
     52	000000					MSG	CP12,<ALLOCATION FAILURE ON OUTPUT FILE>
     53	000000					MSG	CP13,<I/O ERROR ON INPUT FILE>
     54	000000					MSG	CP14,<I/O ERROR ON OUTPUT FILE>
     55	000000					MSG	CP15,<ILLEGAL USE OF WILD CARD VERSION OR LATEST VERSION>
PIPMSG M0020, ERROR MESSAGES FO	MACRO M1108  06-DEC-77 00:05  PAGE 7-1
**** PIPMSG VERSION M0020 ****

     56	000000					MSG	CP16,<FAILED TO CREATE OUTPUT UFD>
     57					;
     58					; OPEN OR CLOSE FILE ERROR MESSAGES
     59	000000					MSG	OP01,<OPEN FAILURE ON INPUT FILE>
     60	000000					MSG	OP02,<OPEN FAILURE ON OUTPUT FILE>
     61	000000					MSG	OP04,<CLOSE FAILURE ON INPUT FILE>
     62	000000					MSG	OP05,<CLOSE FAILURE ON OUTPUT FILE>
     63	000000					MSG	OP06,<FAILED TO DETACH OUTPUT DEVICE>
     64	000000					MSG	OP07,<DEVICE NOT MOUNTED>
     65	000000					MSG	OP08,<OUTPUT FILE ALREADY EXISTS - NOT SUPERSEDED>
     66					;
     67					; DELETE ERROR MESSAGES
     68	000000					MSG	DE01,<FAILED TO MARK FILE FOR DELETE>
     69	000000					MSG	DE02,<FILE IS LOST>
     70	000000					MSG	DE04,<VERSION MUST BE EXPLICIT OR "*">
     71	000000					MSG	DE08,<ERROR FROM PARSE>
     72	000000					MSG	DE09,<FAILED TO DELETE FILE>
     73					;
     74					; SET UIC ERROR MESSAGES
     75		000000'				UI01MG==CR01MG
     76		000024 				UI01SZ==CR01SZ
     77					;
     78					; SET DEFAULT DEVICE OR UIC ERROR MESSAGES
     79		000000'				DF01MG==CR01MG
     80		000024 				DF01SZ==CR01SZ
     81					;
     82					; DIRECTORY LISTING ERRORS
     83	000000					MSG	DI05,<CANNOT FIND DIRECTORY FILE>
     84	000000					MSG	DI06,<FAILED TO ATTACH OUTPUT DEVICE>
     85	000000					MSG	DI07,<FAILED TO GET TIME PARAMETERS>
     86	000000					MSG	DI08,<NOT A DIRECTORY DEVICE>
     87					;
     88					; UNLOCK ERROR MESSAGES
     89	000000					MSG	UN01,<FAILED TO WRITE ATTRIBUTES>
     90	000000					MSG	UN02,<FAILED TO READ ATTRIBUTES>
     91	000000					MSG	UN03,<FILE NOT LOCKED>
     92		000000'				UN04MG==CR01MG
     93		000024 				UN04SZ==CR01SZ
     94					;
     95					; RENAME ERROR MESSAGES
     96	000000					MSG	RE02,<FAILED TO ENTER NEW FILE NAME>
     97	000000					MSG	RE03,<FAILED TO RESTORE ORIGINAL DIRECTORY ENTRY - FILE IS LOST>
     98	000000					MSG	RE04,<CANNOT RENAME FROM ONE DEVICE TO ANOTHER>
     99					;
    100					; SPOOL ERROR MESSAGES
    101	000000					MSG	SP01,<FAILED TO SPOOL FILE FOR PRINTING>
    102	000000					MSG	SP02,<CANNOT SPOOL BY FILE ID>
    103					;
    104					; FREE BLOCKS ERROR MESSAGES
    105	000000					MSG	FR01,<FAILED TO OPEN STORAGE BITMAP FILE>
    106					;
    107					; FIND ERROR MESSAGES
    108	000000					MSG	FI01,<FAILED TO FIND FILE(S)>
    109	000000					MSG	FI02,<CANNOT FIND FILE(S)>
    110	000000					MSG	FI03,<NO SUCH FILE(S)>
    111					;
    112					; REMOVE ERROR MESSAGES
PIPMSG M0020, ERROR MESSAGES FO	MACRO M1108  06-DEC-77 00:05  PAGE 7-2
**** PIPMSG VERSION M0020 ****

    113	000000					MSG	RM01,<FAILED TO REMOVE DIRECTORY ENTRY>
    114	000000					MSG	RM02,<DIRECTORY WRITE PROTECTED>
    115					;
    116					; DYNAMIC MEMORY ERROR MESSAGES
    117					;
    118	000000					MSG	DY01,<NOT ENOUGH BUFFER SPACE AVAILABLE>
    119					;
    120					; TRUNCATE ERROR MESSAGES
    121					;
    122	000000					MSG	TR01,<FAILED TO TRUNCATE FILE>
    123					;
    124					;
    125		000001 				.END
PIPMSG M0020, ERROR MESSAGES FO	MACRO M1108  06-DEC-77 00:05  PAGE 7-3
SYMBOL TABLE

CP01MG= 000107RG    002	CP16MG= 000712RG    002	DI06MG= 001464RG    002	OP02SZ= 000033 G 	R$$DPB= 000001
CP01SZ= 000046 G 	CP16SZ= 000033 G 	DI06SZ= 000036 G 	OP04MG= 001032RG    002	R$$DYM= 000001
CP02MG= 000155RG    002	CR01MG= 000000RG    002	DI07MG= 001522RG    002	OP04SZ= 000033 G 	R$$EIS= 000000
CP02SZ= 000017 G 	CR01SZ= 000024 G 	DI07SZ= 000035 G 	OP05MG= 001065RG    002	R$$MSG= 000000
CP03MG= 000174RG    002	CR02MG= 000024RG    002	DI08MG= 001557RG    002	OP05SZ= 000034 G 	R$$11M= 000001
CP03SZ= 000055 G 	CR02SZ= 000016 G 	DI08SZ= 000026 G 	OP06MG= 001121RG    002	SP01MG= 002105RG    002
CP04MG= 000251RG    002	CR03MG= 000042RG    002	DY01MG= 002420RG    002	OP06SZ= 000036 G 	SP01SZ= 000041 G
CP04SZ= 000056 G 	CR03SZ= 000045 G 	DY01SZ= 000041 G 	OP07MG= 001157RG    002	SP02MG= 002146RG    002
CP05MG= 000327RG    002	DE01MG= 001254RG    002	FF    = 000014   	OP07SZ= 000022 G 	SP02SZ= 000027 G
CP05SZ= 000042 G 	DE01SZ= 000036 G 	FI01MG= 002237RG    002	OP08MG= 001201RG    002	TR01MG= 002461RG    002
CP10MG= 000371RG    002	DE02MG= 001312RG    002	FI01SZ= 000026 G 	OP08SZ= 000053 G 	TR01SZ= 000027 G
CP10SZ= 000050 G 	DE02SZ= 000014 G 	FI02MG= 002265RG    002	RE02MG= 001707RG    002	UI01MG= 000000RG    002
CP11MG= 000441RG    002	DE04MG= 001326RG    002	FI02SZ= 000023 G 	RE02SZ= 000035 G 	UI01SZ= 000024 G
CP11SZ= 000047 G 	DE04SZ= 000037 G 	FI03MG= 002310RG    002	RE03MG= 001744RG    002	UN01MG= 001605RG    002
CP12MG= 000510RG    002	DE08MG= 001365RG    002	FI03SZ= 000017 G 	RE03SZ= 000071 G 	UN01SZ= 000032 G
CP12SZ= 000041 G 	DE08SZ= 000020 G 	FR01MG= 002175RG    002	RE04MG= 002035RG    002	UN02MG= 001637RG    002
CP13MG= 000551RG    002	DE09MG= 001405RG    002	FR01SZ= 000042 G 	RE04SZ= 000050 G 	UN02SZ= 000031 G
CP13SZ= 000027 G 	DE09SZ= 000025 G 	MSGBL.= 000001   	RM01MG= 002327RG    002	UN03MG= 001670RG    002
CP14MG= 000600RG    002	DF01MG= 000000RG    002	MSGCT.= 000000   	RM01SZ= 000040 G 	UN03SZ= 000017 G
CP14SZ= 000030 G 	DF01SZ= 000024 G 	OP01MG= 000745RG    002	RM02MG= 002367RG    002	UN04MG= 000000RG    002
CP15MG= 000630RG    002	DI05MG= 001432RG    002	OP01SZ= 000032 G 	RM02SZ= 000031 G 	UN04SZ= 000024 G
CP15SZ= 000062 G 	DI05SZ= 000032 G 	OP02MG= 000777RG    002

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

VIRTUAL MEMORY USED:  3176 WORDS  ( 13 PAGES)
DYNAMIC MEMORY:  4160 WORDS  ( 16 PAGES)
ELAPSED TIME:  00:00:41
[63,10]PIPMSG,[63,20]PIPMSG/-SP=[63,30]PIPMAC,PIPMSG