Trailing-Edge
-
PDP-10 Archives
-
BB-H311B-RM
-
rsx20f-swskit/listings/pip.lis
There are no other files named pip.lis in the archive.
CDDMG M0003, CONVERT DBL PRECIS MACRO M1108 06-DEC-77 08:45
TABLE OF CONTENTS
7- 1 **** CDDMG VERSION M0003 ****
CDDMG M0003, CONVERT DBL PRECIS MACRO M1108 06-DEC-77 08:45 PAGE 7
1 .TITLE CDDMG M0003, CONVERT DBL PRECISION TO DECIMAL MAGNITIUDE
.SBTTL **** CDDMG VERSION M0003 ****
.IDENT /M0003/
2 ; ALTERED TUESDAY 16-APR-74 13:30
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 19-NOV-73
20 ;
21 .MCALL CALL,RETURN
22 ;+
23 ; CONVERT DOUBLE PRECISION BINARY NUMBER TO MAGNITUDE DECIMAL
24 ; CALLING SEQUENCE:
25 ; CALL $CDDMG
26 ; INPUTS:
27 ; R0=STRING ADDRESS
28 ; R1=ADDRESS OF DOUBLE PRECISION NUMBER
29 ; R2=0 IF SUPPRESSING LEAD ZERO'S, NON ZERO IF NOT
30 ; OUTPUTS:
31 ; R0=UPDATED STRING POINTER
32 ; R1,R2 ALTERED, R3-R5 PRESERVED
33 ;-
34 000000 004567 000000G $CDDMG::JSR R5,$SAVRG
35
36 .IF EQ,R$$EIS
37 000004 010246 MOV R2,-(SP)
38 000006 010046 MOV R0,-(SP)
39 000010 016102 000002 MOV 2(R1),R2 ;R2=LOW ORDER VALUE TO BE CONVERTED
40 000014 011101 MOV (R1),R1 ;R1=HIGH ORDER VALUE
41 000016 002432 BLT 40$ ;ONLY 31 BITS ALLOWED
42 000020 012700 023420 MOV #10000.,R0
43 000024 CALL $DDIV ;R1,R2 = QUOTIENT, R0=REMAINDER
44 000030 005701 TST R1 ;IF DBL PRECISION QUOTIENT, OVERFLOW
45 000032 001024 BNE 40$
46 000034 010005 MOV R0,R5 ;REMAINDER TO R5
47 000036 010204 MOV R2,R4 ;QUOTIENT TO R4
48 000040 012600 MOV (SP)+,R0 ;RESTORE SAVED REGISTERS
49 000042 012602 MOV (SP)+,R2
50
51 .IFF
52 MOV (R1)+,R4
53 BLT 40$ ;IF HIGH ORDER IS NEG, THEN OVERFLOW
54 MOV @R1,R5
55 DIV #10000.,R4
CDDMG M0003, CONVERT DBL PRECIS MACRO M1108 06-DEC-77 08:45 PAGE 7-1
**** CDDMG VERSION M0003 ****
56 BVS 40$ ;BRANCH IF OVERFLOW
57 .ENDC
58
59 000044 010401 MOV R4,R1 ;PRINT HIGH ORDER DECIMAL DIGITS
60 000046 001004 BNE 20$ ;BRANCH IF DOUBLE PRECISION
61 000050 010501 MOV R5,R1 ;FORMAT SINGLE PRECISION
62 000052 CALL $CBDMG ;CONVERT BINARY TO DECIMAL MAGNITUDE
63 000056 RETURN
64 000060 20$: CALL $CBDMG ;CONVERT THE HIGH ORDER PORTION
65 000064 114046 MOVB -(R0),-(SP) ;SAVE LAST BYTE, WILL BE OVER WRITTEN
66 000066 010004 MOV R0,R4 ;AND SAVE ADDRESS TO RESTORE IT
67 000070 010702 MOV PC,R2 ;NON ZERO TO ZERO FILL 2ND PART
68 000072 010501 MOV R5,R1
69 ; THE FOLLOWING PRODUCES 5 DIGITS AND I ONLY WANT 4
70 ; THAT IS WHY THE POINTER WAS BACKED UP ONE
71 000074 CALL $CBDMG ;CONVERT LOW ORDER DIGITS
72 000100 112614 MOVB (SP)+,@R4 ;RESTORE SAVED BYTE
73 000102 RETURN
74 ;
75 ; NUMBER IS TOO BIG TOO PRINT, OUTPUT 5 "*"
76 000104 40$:
77 .IF EQ,R$$EIS
78 000104 012600 MOV (SP)+,R0
79 000106 012602 MOV (SP)+,R2
80 .ENDC
81
82 000110 012705 000005 MOV #5,R5
83 000114 112720 000052 50$: MOVB #'*,(R0)+
84 000120 SOB R5,50$
85 000124 RETURN
86 ;
87 ;
88 ;
89 000001 .END
CDDMG M0003, CONVERT DBL PRECIS MACRO M1108 06-DEC-77 08:45 PAGE 7-2
SYMBOL TABLE
R$$DPB= 000001 R$$EIS= 000000 $CBDMG= ****** GX $DDIV = ****** GX $$ = 000067
R$$DYM= 000001 R$$11M= 000001 $CDDMG 000000RG $SAVRG= ****** GX
. ABS. 000000 000
000126 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 2520 WORDS ( 10 PAGES)
DYNAMIC MEMORY: 3104 WORDS ( 11 PAGES)
ELAPSED TIME: 00:00:12
[43,10]CDDMG,[43,20]CDDMG/-SP=[43,30]PIPMAC,CDDMG
DFLTNM M0101, PROPAGATE DEFAULT MACRO M1108 05-DEC-77 22:42
TABLE OF CONTENTS
7- 1 **** DFLTNM VERSION M0101 ****
DFLTNM M0101, PROPAGATE DEFAULT MACRO M1108 05-DEC-77 22:42 PAGE 7
1 .TITLE DFLTNM M0101, PROPAGATE DEFAULT NAME AND TYPE
.SBTTL **** DFLTNM VERSION M0101 ****
.IDENT /M0101/
2 ; ALTERED THURSDAY 21-JUNE-73 10:05
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 21-JUNE-73
20 ;
21 .MCALL FDOF$L,FCSBT$,RETURN
22 000000 FDOF$L ;DEFINE THE FDB OFFSETS LOCALLY
23 000000 FCSBT$ ;DEFINE THE FDB BITS AND VALUES LOCALLY
24 ;
25 000000 PURE.I
26 ;+
27 ; SET UP DEFAULT FILE NAME AND TYPE USING PREVIOUS FILE NAME AND TYPE
28 ; AS WELL AS THE STATUS BITS WHICH TELL WHAT WAS EXPLICIT
29 ; IN THE PREVIOUS FILE NAME AND TYPE
30 ; CALLING SEQUENCE:
31 ; CALL .DFLTN
32 ; INPUTS:
33 ; R0 = FDB ADDRESS
34 ; OUTPUTS:
35 ; ALL REGISTERS PRESERVED
36 ; OPERATION:
37 ; IN AN ANALOGOUS FASHION TO THE WAY CSI$2 CARRIES THE
38 ; CURRENT DEVICE AND DIRECTORY NAMES FORWARD TO SUCCEEDING SPECS
39 ; THIS ROUTINE IMPLEMENTS CARRING THE FILE NAME AND TYPE FORWARD.
40 ; IF THE NAME/TYPE WAS EXPLICIT AND NOT WILD IN THE PREVIOUS SPEC,
41 ; THEN IT IS CARRIED FORWARD. IF NO FILE NAME OR TYPE WAS SPECIFIED
42 ; THIS TIME, THEN THE DEFAULT IS LEFT AS IT WAS (CARRIED FORWARD).
43 ; FINALLY IF THE PREVIOUS SPEC WAS A WILD CARD, THEN
44 ; THE DEFAULT IS RESET TO NULL.
45 ;-
46 000000 004567 000000G .DFLTN::JSR R5,.SAVR1
47 000004 016002 000122 MOV F.FNB+N.STAT(R0),R2 ;R2=STATUS BITS
48 000010 032702 000004 BIT #NB.NAM,R2
49 000014 001421 BEQ 20$ ;BRANCH IF FILE NAME NOT EXPLICIT
50 000016 016001 000046 MOV F.DFNB(R0),R1
51 000022 062701 000006 ADD #N.FNAM,R1
52 000026 032702 000040 BIT #NB.SNM,R2
53 000032 001007 BNE 10$ ;BRANCH IF FILE NAME WAS "*"
54 000034 016021 000110 MOV F.FNAM(R0),(R1)+ ;USE THIS FILE NAME FOR NEXT DEFAULT
55 000040 016021 000112 MOV F.FNAM+2(R0),(R1)+
DFLTNM M0101, PROPAGATE DEFAULT MACRO M1108 05-DEC-77 22:42 PAGE 7-1
**** DFLTNM VERSION M0101 ****
56 000044 016021 000114 MOV F.FNAM+4(R0),(R1)+
57 000050 000403 BR 20$
58 ;
59 ; WILD CARD FILE NAME INDICATES NULL DEFAULT
60 000052 005021 10$: CLR (R1)+
61 000054 005021 CLR (R1)+
62 000056 005021 CLR (R1)+
63 000060 032702 000002 20$: BIT #NB.TYP,R2
64 000064 001412 BEQ 30$ ;BRANCH IF FILE TYPE NOT EXPLICIT
65 000066 016001 000046 MOV F.DFNB(R0),R1
66 000072 005061 000014 CLR N.FTYP(R1) ;ASSUME NULL DEFAULT FILE TYPE
67 000076 032702 000020 BIT #NB.STP,R2
68 000102 001003 BNE 30$ ;BRANCH IF FILE TYPE WAS "*"
69 000104 016061 000116 000014 MOV F.FTYP(R0),N.FTYP(R1) ;USE THIS FILE TYPE AS DEFAULT
70 000112 30$: RETURN
71 ;
72 ;
73 000001 .END
DFLTNM M0101, PROPAGATE DEFAULT MACRO M1108 05-DEC-77 22:42 PAGE 7-2
SYMBOL TABLE
FA.APD= 000100 FD.WBH= 000002 F.EOBB= 000032 F.STBK= 000036 N.NEXT= 000022
FA.CRE= 000010 FO.APD= 000106 F.ERR = 000052 F.UNIT= 000136 N.STAT= 000020
FA.EXT= 000004 FO.MFY= 000002 F.FACC= 000043 F.URBD= 000020 N.UNIT= 000034
FA.NSP= 000100 FO.RD = 000001 F.FFBY= 000014 F.VBN = 000064 R$$DPB= 000001
FA.RD = 000001 FO.UPD= 000006 F.FNAM= 000110 F.VBSZ= 000060 R$$DYM= 000001
FA.SHR= 000040 FO.WRT= 000016 F.FNB = 000102 NB.DEV= 000200 R$$EIS= 000000
FA.TMP= 000020 F.ALOC= 000040 F.FTYP= 000116 NB.DIR= 000100 R$$11M= 000001
FA.WRT= 000002 F.BBFS= 000062 F.FVER= 000120 NB.NAM= 000004 R.FIX = 000001
FD.BLK= 000010 F.BDB = 000070 F.HIBK= 000004 NB.SD1= 000400 R.VAR = 000002
FD.CCL= 000002 F.BGBC= 000057 F.LUN = 000042 NB.SD2= 001000 S.FATT= 000016
FD.CR = 000002 F.BKDN= 000026 F.MBCT= 000054 NB.SNM= 000040 S.FDB = 000140
FD.DIR= 000010 F.BKDS= 000020 F.MBC1= 000055 NB.STP= 000020 S.FNAM= 000006
FD.FTN= 000001 F.BKEF= 000050 F.MBFG= 000056 NB.SVR= 000010 S.FNB = 000036
FD.INS= 000010 F.BKP1= 000051 F.NRBD= 000024 NB.TYP= 000002 S.FNBW= 000017
FD.PLC= 000004 F.BKST= 000024 F.NREC= 000030 NB.VER= 000001 S.FNTY= 000004
FD.RAH= 000001 F.BKVB= 000064 F.OVBS= 000030 N.DID = 000024 S.FTYP= 000002
FD.RAN= 000002 F.CNTG= 000034 F.RACC= 000016 N.DVNM= 000032 S.NFEN= 000020
FD.REC= 000001 F.DFNB= 000046 F.RATT= 000001 N.FID = 000000 .DFLTN 000000RG 002
FD.RWM= 000001 F.DSPT= 000044 F.RCNM= 000034 N.FNAM= 000006 .SAVR1= ****** GX
FD.SDI= 000020 F.DVNM= 000134 F.RCTL= 000017 N.FTYP= 000014 ...GBL= 000000
FD.SQD= 000040 F.EFBK= 000010 F.RSIZ= 000002 N.FVER= 000016 ...TPC= 000140
FD.TTY= 000004 F.EFN = 000050 F.RTYP= 000000
. ABS. 000000 000
000000 001
PURE$I 000114 002
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 4187 WORDS ( 17 PAGES)
DYNAMIC MEMORY: 5216 WORDS ( 20 PAGES)
ELAPSED TIME: 00:00:19
[43,10]DFLTNM,[43,20]DFLTNM/-SP=[43,30]PIPMAC,DFLTNM
ERRPRG M0107, ERROR PRINT OUT ( MACRO M1108 05-DEC-77 22:43
TABLE OF CONTENTS
7- 1 **** ERRPRG VERSION M0107 ****
ERRPRG M0107, ERROR PRINT OUT ( MACRO M1108 05-DEC-77 22:43 PAGE 7
1 .TITLE ERRPRG M0107, ERROR PRINT OUT (GCML)
.SBTTL **** ERRPRG VERSION M0107 ****
.IDENT /M0107/
2 ; ALTERED FRIDAY 10-MAY-74 14:05
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 4-MAY-73
20 ;
21 .MCALL CALL,RETURN
22 ;
23 000000 PURE.I
24 ;+
25 ; ERROR PRINTOUT ROUTINE FOR PROGRAMS WITH GET COMMAND LINE
26 ; CHECKS FOR @ FILE AND PRINTS COMMAND LINE IF NOT TTY
27 ; THEN IT CALL ERRPRT.
28 ; CALLING SEQUENCE:
29 ; CALL ERRPRG
30 ; INPUTS:
31 ; R0=FDB ADDRESS FOR PRINTING FILE NAME
32 ; IF =0, DON'T PRINT FILE NAME
33 ; IF EVEN, PRINT FILE NAME FROM FILE NAME BLOCK
34 ; IF ODD, PRINT FILE NAME FROM F.DSPT
35 ; IF R2 .GE. 0 R2=SIZE OF ERROR STRING
36 ; TO PRINT AND R3=ADDRESS
37 ; IF R2 .LT. 0, R2=NEGATIVE RECORD NUMBER
38 ; OF ERROR MESSAGE, R3=FNB OF ERROR MESSAGE FILE
39 ; R4=ERROR CODE TO PRINT, IF =0 DON'T PRINT, OTHERWISE ASSUME
40 ; IT'S A QIOSYM ERROR CODE, AND PRINT IT
41 ; NOTE: IF R4 IS LOADED FROM THE BYTE F.ERR IN THE FDB
42 ; AND IFTHE BYTE F.ERR+1 IS NEGATIVE, SUBTRACT 128.
43 ; FROM R4 BEFORE CALLING ERRPRG.
44 ; OUTPUTS:
45 ; C=0 IF NO ERRORS
46 ; C=1 IF FAILED TO PRINT THE ERROR MESSAGE (MO ERROR)
47 ; R2,R3 PRESERVED
48 ; R0,R1,R4,R5 ALTERED
49 ;-
50 000000 ERRPRG::
51 000000 012701 000000G MOV #GCMLCB,R1 ;R1=GET COMMAND LINE CONTROL BLOCK
52 000004 CALL .ERPRT
53 000010 RETURN
54 ;
55 000001 .END
ERRPRG M0107, ERROR PRINT OUT ( MACRO M1108 05-DEC-77 22:43 PAGE 7-1
SYMBOL TABLE
ERRPRG 000000RG 002 R$$DPB= 000001 R$$EIS= 000000 $$ = 000067 .ERPRT= ****** GX
GCMLCB= ****** GX R$$DYM= 000001 R$$11M= 000001
. ABS. 000000 000
000000 001
PURE$I 000012 002
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 2506 WORDS ( 10 PAGES)
DYNAMIC MEMORY: 3104 WORDS ( 11 PAGES)
ELAPSED TIME: 00:00:11
[43,10]ERRPRG,[43,20]ERRPRG/-SP=[43,30]PIPMAC,ERRPRG
ERRPRT M0216, ERROR PRINT OUT R MACRO M1108 05-DEC-77 22:43
TABLE OF CONTENTS
7- 1 **** ERRPRT VERSION M0216 ****
ERRPRT M0216, ERROR PRINT OUT R MACRO M1108 05-DEC-77 22:43 PAGE 7
1 .TITLE ERRPRT M0216, ERROR PRINT OUT ROUTINE
.SBTTL **** ERRPRT VERSION M0216 ****
.IDENT /M0216/
2 ; ALTERED FRIDAY 4-OCT-74 12:50
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 4-MAY-73
20 ;
21
22 .MCALL FDOF$L,FCSBT$,FILIO$,GCMLD$,CSI$
23 000000 FDOF$L ;DEFINE THE FDB OFFSETS LOCALLY
24 000000 FCSBT$ ;DEFINE THE FCS BITS AND VALUES LOCALLY
25 000000 FILIO$ ;DEFINE THE I/O FUNCTION CODES LOCALLY
26 000000 GCMLD$ ;DEFINE THE GET COMMAND LINE OFFSETS
27 000000 CSI$ ;DEFINE THE CSI BLOCK OFFSETS LOCALLY
28 ;
29 .MCALL CALL,RETURN,QIO$S,WTSE$S
30
31 000000 IMPURE
32
33 000000 .MOPRM::.BLKW 19.
34 000046 .MOFMT::.BLKW 1
35 000050 MOSTR1: .BLKB 64.
36 000150 MOSTR2: .BLKB 68.
37
38 000000 .PSECT
39
40 000000 MSGZ NULL,<>
41 000000 MSG SYDV,<SY>
42 000000 MSG EP00,<%N%VA%VA>
43 000000 MSGZ EP01,<%N%VA%VA%N%VA>
44 000026 EP00SZ=EP00SZ+EP01SZ
45 000000 MSG EP02,<%N%VA%VA>
46 000000 MSGZ EP03,<%N%VA%VA%N%VA:%VA%VA%VA>
47 000040 EP02SZ=EP02SZ+EP03SZ
48 000000 MSG EP04,<%N%VA%VA>
49 000000 MSGZ EP05,<%N%VA%VA%N%2A%O:%VA%X%VA>
50 000041 EP04SZ=EP04SZ+EP05SZ
51
52
53 000000 PURE.D
54 000000 000013' 000003' MOTBL: .WORD EP01MG,EP00MG
55 000004 000041' 000031' .WORD EP03MG,EP02MG
ERRPRT M0216, ERROR PRINT OUT R MACRO M1108 05-DEC-77 22:43 PAGE 7-1
**** ERRPRT VERSION M0216 ****
56 000010 000101' 000071' .WORD EP05MG,EP04MG
57 000014 000002 .ERLUN::.WORD 2 ;LUN TO OUTPUT ERROR MESSAGE
58 000016 000040 .EREFN::.WORD 32. ;EFN TO USE FOR ERROR MESSAGE
59 ;
60 ;+
61 ; PRINT ERROR MESSAGE
62 ; CALLING SEQUENCE
63 ; CALL .ERPRT
64 ; INPUTS:
65 ; R0=FDB ADDRESS FOR PRINTING FILE NAME
66 ; IF =0, DON'T PRINT FILE NAME
67 ; IF EVEN, PRINT FILE NAME FROM FILE NAME BLOCK
68 ; IF ODD, PRINT FILE NAME FROM F.DSPT
69 ; R1=GET COMMAND LINE CONTROL BLOCK OR 0
70 ; IF NON ZERO, SEE IF COMMAND WAS FROM @FILE,
71 ; IF IT WAS, ECHO THE COMMAND LINE AS WELL
72 ; IF R2 .GE. 0, R2=SIZE OF ERROR STRING
73 ; TO PRINT AND R3=ADDRESS
74 ; IF R2 .LT. 0, R2=NEGATIVE RECORD NUMBER
75 ; OF ERROR MESSAGE, R3=FNB OF ERROR MESSAGE FILE
76 ; R4=ERROR CODE TO PRINT, IF =0 DON'T PRINT, OTHERWISE ASSUME
77 ; IT'S A QIOSYM ERROR CODE, AND PRINT IT
78 ; NOTE: IF R4 WAS LOADED FROM TE BYTE F.ERR
79 ; IN THE FDB AND F.ERR+1 IS NEGATIVE, THEN SUBTRACT
80 ; 128. FROM R4 BEFORE CALLING ERRPRT.
81 ; OUTPUTS:
82 ; C=0 IF NO ERRORS
83 ; C=1 IF FAILED TO PRINT THE ERROR MESSAGE (MO ERROR)
84 ; R2,R3 PRESERVED
85 ; R0,R1,R4,R5 ALTERED
86 ;-
87 000020 PURE.I
88 000000 005001 ERRPRT::CLR R1 ;NO GET COMMAND LINE CONTROL BLOCK
89 000002 .ERPRT::
90 000002 012705 000000' MOV #.MOPRM,R5 ;R5=PARAMETER CONTROL BLOCK FOR EDMSG
91 000006 005067 000046' CLR .MOFMT ;ASSUME NO COMMAND LINE ECHO
92 000012 005701 TST R1 ;IS THERE A COMMAND FILE
93 000014 001416 BEQ 5$ ;BRANCH IF NO
94 000016 132761 000004 000017 BITB #FD.TTY,F.RCTL(R1) ;ARE COMMANDS FROM TTY
95 000024 001012 BNE 5$ ;BRANCH IF YES
96 000026 005267 000046' INC .MOFMT ;USING LONG FORM FORMAT MESSAGE
97 000032 012725 000000G MOV #MOIDSZ,(R5)+ ;SET DESCRIPTOR FOR PROG ID
98 000036 012725 000000G MOV #MOIDMG,(R5)+
99 000042 016125 000146 MOV G.CMLD(R1),(R5)+ ;DESCRIPTOR FOR COMMAND LINE
100 000046 016125 000150 MOV G.CMLD+2(R1),(R5)+
101 000052 012725 000000G 5$: MOV #MOIDSZ,(R5)+ ;DESCRIPTOR FOR PROGRAM ID
102 000056 012725 000000G MOV #MOIDMG,(R5)+
103 000062 010246 MOV R2,-(SP) ;SAVE ERROR MESSAGE PARAMETERS
104 000064 010346 MOV R3,-(SP)
105 000066 010446 MOV R4,-(SP) ;SAVE FCS ERROR CODE
106 000070 010046 MOV R0,-(SP)
107 000072 005702 TST R2 ;
108 000074 002024 BGE 20$ ;BRANCH IF MESSAGE STRING SPECIFIED
109 000076 012700 000050' MOV #MOSTR1,R0 ;R0=STRING ADDRESS TO STORE MESSAGE
110 000102 005402 NEG R2 ;MAKE MESSAGE NUMBER POSITIVE
111 000104 010301 MOV R3,R1 ;R1=MESSAGE FILE FNB
112 000106 CALL .GERRM ;READ THE ERROR MESSAGE FROM THE FILE
ERRPRT M0216, ERROR PRINT OUT R MACRO M1108 05-DEC-77 22:43 PAGE 7-2
**** ERRPRT VERSION M0216 ****
113 000112 103012 BCC 10$ ;BRANCH IF SUCCESSFUL
114 ;
115 ; FAILED TO GET THE ERROR STRING, SAY "ERROR CODE N"
116 ;
117 000114 010246 MOV R2,-(SP) ;STORE ERROR CODE
118 000116 010602 MOV SP,R2 ;AND POINT R2 AT IT
119 000120 012701 000000G MOV #FC03MG,R1 ;"ERROR RODE %D."
120 000124 CALL $EDMSG ;FORM THIS STRING INSTEAD
121 000130 010001 MOV R0,R1 ;
122 000132 005726 TST (SP)+ ;POP THE ERROR CODE
123 000134 162701 000050' SUB #MOSTR1,R1 ;R1=SIZE OF STRING
124 000140 010102 10$: MOV R1,R2 ;R2=SIZE
125 000142 012703 000050' MOV #MOSTR1,R3 ;R3=ADDRESS OF STRING
126 000146 010225 20$: MOV R2,(R5)+ ;SIZE OF STRING
127 000150 001002 BNE 30$ ;
128 000152 012703 000000' MOV #NULLMG,R3 ;USE NULL STRING IF SIZE=0
129 000156 010325 30$: MOV R3,(R5)+ ;ADDRESS OF STRING
130 000160 012600 MOV (SP)+,R0 ;RESTORE FDB ADDRESS
131 000162 001467 BEQ ERRCOD ;BRANCH IF NO FILENAME OUTPUT
132 000164 062767 000002 000046' ADD #2,.MOFMT ;FORMAT NO. 2,3 IF USING F.DSPT
133 000172 032700 000001 BIT #1,R0 ;
134 000176 001433 BEQ 60$ ;BRANCH IF TAKING FILENAME FROM FNB
135 ;
136 ; OUTPUT FILENAME BLOCK FROM F.DSPT
137 ;
138 000200 042700 000001 BIC #1,R0 ;RESET THE LOW ORDER BIT
139 000204 016004 000044 MOV F.DSPT(R0),R4 ;GET THE STRING DESCRIPTOR
140 000210 001403 BEQ 35$ ;BRANCH IF IT'S NULL
141 000212 005714 TST (R4) ;NULL DEVICE STRING?
142 000214 001006 BNE 40$ ;BRANCH IF NO
143 000216 022424 CMP (R4)+,(R4)+
144 000220 012725 000002 35$: MOV #SYDVSZ,(R5)+ ;USE SYSTEM DEVICE
145 000224 012725 000001' MOV #SYDVMG,(R5)+
146 000230 000402 BR 50$
147 000232 012425 40$: MOV (R4)+,(R5)+ ;MOVE USER SPECIFIED SIZE
148 000234 012425 MOV (R4)+,(R5)+ ;AND ADDRESS OF DEVICE STRING
149 000236 50$: CALL GTDRNM ;NOW GET DIRECTORY STRING
150 000242 005704 TST R4 ;IS DESCRIPTOR POINTER NULL
151 000244 001404 BEQ 52$ ;BRANCH IF YES
152 000246 012425 MOV (R4)+,(R5)+ ;IS FILE NAME STRING NULL?
153 000250 001403 BEQ 55$ ;BRANCH IF YES
154 000252 011425 MOV (R4),(R5)+ ;NO, USE THE STRING ADDRESS
155 000254 000432 BR ERRCOD ;
156 000256 005025 52$: CLR (R5)+
157 000260 012725 000000' 55$: MOV #NULLMG,(R5)+ ;YES, POINT AT A NULL BYTE
158 000264 000426 BR ERRCOD ;
159 ;
160 ; PRINT FILE NAME FROM FNB
161 ;
162 000266 062767 000002 000046' 60$: ADD #2,.MOFMT ;FORMAT NO. 4,5 FOR FNB
163 000274 010015 MOV R0,(R5)
164 000276 062725 000134 ADD #F.DVNM,(R5)+ ;POINTER TO 2 CHAR DEVICE NAME
165 000302 016025 000136 MOV F.UNIT(R0),(R5)+ ;UNIT NUMBER
166 000306 016004 000044 MOV F.DSPT(R0),R4 ;
167 000312 001401 BEQ 65$ ;BRANCH IF DESCRIPTOR POINTER IS NULL
168 000314 022424 CMP (R4)+,(R4)+ ;R4=DIRECTORY STRING DESCRIPTOR
169 000316 65$: CALL GTDRNM ;GET DIRECTORY STRING
ERRPRT M0216, ERROR PRINT OUT R MACRO M1108 05-DEC-77 22:43 PAGE 7-3
**** ERRPRT VERSION M0216 ****
170 000322 010004 MOV R0,R4 ;
171 000324 062704 000110 ADD #F.FNB+N.FNAM,R4 ;R4=FNB ADDRESS
172 000330 012703 000005 MOV #S.FNTY+1,R3 ;NO. OF WORDS IN FILE NAME TYPE, VER
173 000334 012425 70$: MOV (R4)+,(R5)+ ;MOVE NAME, TYPE, VERSION
174 000336 SOB R3,70$
175 000342 ERRCOD:
176 000342 012601 MOV (SP)+,R1 ;R1=FCS ERROR CODE
177 000344 001416 BEQ 10$ ;BRANCH IF NOT PRINTING ERR CODE
178 000346 012700 000150' MOV #MOSTR2,R0
179 000352 012720 026440 MOV #" -,(R0)+ ;PUT "--" IN STRING
180 000356 012720 020055 MOV #"- ,(R0)+
181 000362 CALL .FCSER ;GET FCS ERROR MESSAGE
182 000366 162700 000150' SUB #MOSTR2,R0 ;R0=SIZE OF STRING
183 000372 010025 MOV R0,(R5)+ ;STORE SIZE
184 000374 012725 000150' MOV #MOSTR2,(R5)+ ;AND ADDRESS OF FCS ERR MSG
185 000400 000403 BR 20$ ;
186 000402 005025 10$: CLR (R5)+ ;NULL ERR MESSAGE
187 000404 012725 000000' MOV #NULLMG,(R5)+
188 ;
189 ; NOW FORM AND OUTPUT THE FULL MESSAGE
190 ;
191 000410 012700 000000G 20$: MOV #.ERRBF,R0 ;R0=BUFFER ADDRESS
192 000414 012702 000000' MOV #.MOPRM,R2 ;R2=PARAMETER BLOCK
193 000420 016701 000046' MOV .MOFMT,R1 ;R1=FORMAT STRING NUMBER
194 000424 006301 ASL R1 ;FORM INDEX INTO FORMAT TABLE
195 000426 016101 000000' MOV MOTBL(R1),R1 ;R1=FORMAT STRING
196 000432 CALL $EDMSG ;FORM THE MESSAGE STRING
197 000436 QIO$S #IO.WVB,.ERLUN,.EREFN,,,,<#.ERRBF,R1>
198 000474 103405 BCS 30$
199 000476 WTSE$S .EREFN
200 000510 012603 30$: MOV (SP)+,R3
201 000512 012602 MOV (SP)+,R2
202 000514 RETURN
ERRPRT M0216, ERROR PRINT OUT R MACRO M1108 05-DEC-77 22:43 PAGE 8
**** ERRPRT VERSION M0216 ****
204
205 ;+
206 ; GET DIRECTORY STRING
207 ;
208 ; CALLING SEQUENCE:
209 ;
210 ; CALL GTDRNM
211 ;
212 ; INPUTS:
213 ;
214 ; R4=STRING DESCRIPTOR OF USER SPECIFIED DIRECTORY STRING OR 0
215 ; R5=PARAMETER BLOCK ADDRESS
216 ;
217 ; OUTPUTS:
218 ;
219 ; R1,R2 ALTERED
220 ; IF INPUT R4 WAS NON ZERO, R4=INPUT R4+4, OTHERWISE R4=0
221 ; (R5)=SIZE OF DIRECTORY STRING
222 ; 2(R5)=ADDRESS OF DIRECTORY STRING
223 ; R5=INPUT R5+4
224 ;
225 ; OPERATION:
226 ;
227 ; IF THE STRING DESCRIPTOR ADDRESSED BY R4 IS NOT NULL THEN THIS STRING
228 ; IS USED.
229 ; IF IT IS NULL, THEN THE DEFAULT DIRECTORY STRING IS USED.
230 ;-
231 000516 .GDRNM::
232 000516 GTDRNM:
233 000516 005704 TST R4 ;IS DIRECTORY STRING DESCRIPTOR NULL?
234 000520 001406 BEQ 15$ ;BRANCH IF YES
235 000522 005714 TST (R4) ;IS DIRECTORY STRING DESCRIPTOR NULL?
236 000524 001403 BEQ 10$ ;BRANCH IF YES
237 000526 012425 MOV (R4)+,(R5)+ ;NO, USE IT
238 000530 012425 MOV (R4)+,(R5)+
239 000532 RETURN
240 000534 022424 10$: CMP (R4)+,(R4)+ ;RETURN R4 POINTING TO NEXT STRING
241 000536 15$: CALL .RDFDR ;GET DEFAULT DIRECTORY STRING
242 000542 010125 MOV R1,(R5)+ ;STORE SIZE
243 000544 001002 BNE 20$ ;BRANCH IF NOT NULL
244 000546 012702 000000' MOV #NULLMG,R2 ;POINT TO NULL MESSAGE
245 000552 010225 20$: MOV R2,(R5)+ ;STORE ADDRESS
246
247 000554 RETURN
248
249 000000 .PSECT
250 000000 MSGZ SYNT,<COMMAND SYNTAX ERROR%N%VA>
251
252 000000 PURE.I
253
254 ;+
255 ; PRINT OUT CSI$1 COMMAND SYNTAX ERROR
256 ;
257 ; CALLING SEQUENCE:
258 ;
259 ; CALL .SYNER
260 ;
ERRPRT M0216, ERROR PRINT OUT R MACRO M1108 05-DEC-77 22:43 PAGE 8-1
**** ERRPRT VERSION M0216 ****
261 ; INPUTS:
262 ;
263 ; R0=CSI CONTROL BLOCK ADDRESS
264 ;
265 ; OUTPUTS:
266 ;
267 ; THIS ROUTINE DOES NOT RETURN, IT EXITS VIA ERROUX
268 ;-
269 000556 .SYNER::
270 000556 012702 000000' MOV #.MOPRM,R2 ;R2=EDMSG PARAMETER CONTROL BLOCK
271 000562 016012 000016 MOV C.FILD(R0),(R2) ;DESCRIPTOR OF CSI ERROR STRING
272 000566 016062 000020 000002 MOV C.FILD+2(R0),2(R2)
273 000574 012700 000050' MOV #MOSTR1,R0
274 000600 012701 000132' MOV #SYNTMG,R1
275 000604 CALL $EDMSG ;FORM SYNTAX ERROR MESSAGE
276 000610 010102 MOV R1,R2 ;SIZE OF MESSAGE IN R2
277 000612 012703 000050' MOV #MOSTR1,R3 ;ADDRESS IN R3
278 000616 ERROUX ;PRINT ERROR AND EXIT
000616 104403 TRAP X
000620 000000 000000 .WORD 0,0
279
280 ;
281 ;
282 000001 .END
ERRPRT M0216, ERROR PRINT OUT R MACRO M1108 05-DEC-77 22:43 PAGE 8-2
SYMBOL TABLE
CS.DIF= 000002 FD.CCL= 000002 F.HIBK= 000004 IO.DAC= 010000 N.FTYP= 000014
CS.DVF= 000004 FD.CR = 000002 F.LUN = 000042 IO.DEL= 012400 N.FVER= 000016
CS.EQU= 000040 FD.DIR= 000010 F.MBCT= 000054 IO.DET= 002000 N.NEXT= 000022
CS.INP= 000001 FD.FTN= 000001 F.MBC1= 000055 IO.ENA= 006000 N.STAT= 000020
CS.MOR= 000020 FD.INS= 000010 F.MBFG= 000056 IO.EXT= 011400 N.UNIT= 000034
CS.NMF= 000001 FD.PLC= 000004 F.NRBD= 000024 IO.FNA= 004400 R$$DPB= 000001
CS.OUT= 000002 FD.RAH= 000001 F.NREC= 000030 IO.KIL= 000012 R$$DYM= 000001
CS.WLD= 000010 FD.RAN= 000002 F.OVBS= 000030 IO.LOV= 001010 R$$EIS= 000000
C.CMLD= 000002 FD.REC= 000001 F.RACC= 000016 IO.LTK= 000050 R$$MSG= 000000
C.DEVD= 000006 FD.RWM= 000001 F.RATT= 000001 IO.RAT= 013000 R$$11M= 000001
C.DIRD= 000012 FD.SDI= 000020 F.RCNM= 000034 IO.RDN= 000022 R.FIX = 000001
C.DSDS= 000006 FD.SQD= 000040 F.RCTL= 000017 IO.RLB= 001000 R.VAR = 000002
C.FILD= 000016 FD.TTY= 000004 F.RSIZ= 000002 IO.RNA= 005400 SYDVMG= 000001R 003
C.MKW1= 000024 FD.WBH= 000002 F.RTYP= 000000 IO.RTK= 000060 SYDVSZ= 000002
C.MKW2= 000026 FO.APD= 000106 F.STBK= 000036 IO.RVB= 010400 SYNTMG= 000132R 003
C.SIZE= 000054 FO.MFY= 000002 F.UNIT= 000136 IO.UNL= 000042 SYNTSZ= 000032
C.STAT= 000001 FO.RD = 000001 F.URBD= 000020 IO.WAT= 013400 S.FATT= 000016
C.SWAD= 000022 FO.UPD= 000006 F.VBN = 000064 IO.WLB= 000400 S.FDB = 000140
C.TYPR= 000000 FO.WRT= 000016 F.VBSZ= 000060 IO.WVB= 011000 S.FNAM= 000006
EP00MG= 000003R 003 F.ALOC= 000040 GE.BIF= 177775 IQ.Q = 000002 S.FNB = 000036
EP00SZ= 000026 F.BBFS= 000062 GE.CLO= 000004 IQ.X = 000001 S.FNBW= 000017
EP01MG= 000013R 003 F.BDB = 000070 GE.COM= 000001 MOIDMG= ****** GX S.FNTY= 000004
EP01SZ= 000016 F.BGBC= 000057 GE.EOF= 177766 MOIDSZ= ****** GX S.FTYP= 000002
EP02MG= 000031R 003 F.BKDN= 000026 GE.IND= 000002 MOSTR1 000050R 002 S.NFEN= 000020
EP02SZ= 000040 F.BKDS= 000020 GE.IOR= 177777 MOSTR2 000150R 002 X = 000003
EP03MG= 000041R 003 F.BKEF= 000050 GE.LC = 000010 MOTBL 000000R 004 $EDMSG= ****** GX
EP03SZ= 000030 F.BKP1= 000051 GE.MDE= 177774 NB.DEV= 000200 $$ = 000067
EP04MG= 000071R 003 F.BKST= 000024 GE.OPR= 177776 NB.DIR= 000100 $$$ARG= 000002
EP04SZ= 000041 F.BKVB= 000064 GTDRNM 000516R 005 NB.NAM= 000004 $$$T1 = 000010
EP05MG= 000101R 003 F.CNTG= 000034 G.CMLD= 000146 NB.SD1= 000400 .EREFN 000016RG 004
EP05SZ= 000031 F.DFNB= 000046 G.DPRM= 000160 NB.SD2= 001000 .ERLUN 000014RG 004
ERRCOD 000342R 005 F.DSPT= 000044 G.ERR = 000140 NB.SNM= 000040 .ERPRT 000002RG 005
ERRPRT 000000RG 005 F.DVNM= 000134 G.ISIZ= 000020 NB.STP= 000020 .ERRBF= ****** GX
FA.APD= 000100 F.EFBK= 000010 G.MODE= 000141 NB.SVR= 000010 .FCSER= ****** GX
FA.CRE= 000010 F.EFN = 000050 G.PSDS= 000142 NB.TYP= 000002 .GDRNM 000516RG 005
FA.EXT= 000004 F.EOBB= 000032 IO.ACE= 007400 NB.VER= 000001 .GERRM= ****** GX
FA.NSP= 000100 F.ERR = 000052 IO.ACR= 006400 NULLMG= 000000R 003 .MOFMT 000046RG 002
FA.RD = 000001 F.FACC= 000043 IO.ACW= 007000 NULLSZ= 000001 .MOPRM 000000RG 002
FA.SHR= 000040 F.FFBY= 000014 IO.APC= 014000 N.DID = 000024 .RDFDR= ****** GX
FA.TMP= 000020 F.FNAM= 000110 IO.APV= 014010 N.DVNM= 000032 .SYNER 000556RG 005
FA.WRT= 000002 F.FNB = 000102 IO.ATT= 001400 N.FID = 000000 ...GBL= 000000
FC03MG= ****** GX F.FTYP= 000116 IO.CLN= 003400 N.FNAM= 000006 ...TPC= 000140
FD.BLK= 000010 F.FVER= 000120 IO.CRE= 012000
. ABS. 000000 000
000000 001
IMPURE 000254 002
MSGSTR 000164 003
PURE$D 000020 004
PURE$I 000624 005
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 5717 WORDS ( 23 PAGES)
DYNAMIC MEMORY: 6272 WORDS ( 24 PAGES)
ELAPSED TIME: 00:00:45
[43,10]ERRPRT,[43,20]ERRPRT/-SP=[43,30]PIPMAC,ERRPRT
ERRTRP M0005, ERROR TRAP HANDLE MACRO M1108 05-DEC-77 22:44
TABLE OF CONTENTS
7- 1 **** ERRTRP VERSION M0005 ****
ERRTRP M0005, ERROR TRAP HANDLE MACRO M1108 05-DEC-77 22:44 PAGE 7
1 .TITLE ERRTRP M0005, ERROR TRAP HANDLER
.SBTTL **** ERRTRP VERSION M0005 ****
.IDENT /M0005/
2
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
22 .MCALL FDOF$L
23 000000 FDOF$L ;DEFINE THE FDB OFFSETS LOCALLY
24 ;
25 .MCALL CALL,RETURN
26
27 000000 PURE.I
28
29 ;+
30 ; THE FOLLOWING TRAP INSTRUCTION IS GENERATED BY THE ERROUT, ERROUX
31 ; ERRP, ERRPX MACROS AND INTERPRETED BY THE ROUTINE .ERTRP.
32 ;
33 ; TRAP X
34 ;
35 ; WHERE THE FOLLOWING LOW ORDER BITS ARE DEFINED
36 ;
37 ; BIT 0 - SET IF JMP @.ABORT WHEN ERROR PRINTED OUT
38 ; IS COMPLETE
39 ; - RESET IF RETURN TO INSTRUCTION FOLLOWING THE TRAP INSTRUCTION
40 ; BIT 1 - SET IF SIZE AND ADDRESS OF ERROR STRING FOLLOWS (2 WORDS)
41 ; - RESET IF ERROR NUMBER FOLLOWS (1 WORD)
42 ;
43 ; BITS 2=0. 3=0 - DO DOT PRINT FILE NAME
44 ; BITS 2=1, 3=0 - PRINT FILE NAME FROM FILE NAME BLOCK
45 ; BITS 2=0, 3=1 - PRINT FILE FROM FILE DESCRIPTOR POINTER
46 ; BITS 4=0, 5=0 - DON'T PRINT ERROR CODE
47 ; BITS 4=1, 5=0 - PRINT ERROR CODE FROM F.ERR(R0)
48 ; BITS 4=0, 5=1 - PRINT ERROR CODE IN R4
49 ;
50 ; IF THE SIZE AND ADDRESS OF AN ERROR STRING FOLLOWS THE TRAP
51 ; INSTRUCTION, AND THE ADDRESS IS ZERO, THEN R2 IS ASSUMED TO CONTAIN
52 ; THE SIZE AND R3 CONTAINS THE ADDRESS. LIKEWISE IF A POSITIVE ERROR
53 ; NUMBER FOLLOWS THE TRAP INSTRUCTION, 0 INDICATES THAT R2 ALREADY CONTAINS
54 ; THE ERROR NUMBER.
55 ;-
ERRTRP M0005, ERROR TRAP HANDLE MACRO M1108 05-DEC-77 22:44 PAGE 7-1
**** ERRTRP VERSION M0005 ****
56 000000 .ERTRP::
57 000000 006216 ASR (SP) ;SHIFT TRAP PARAMETER BACK
58 000002 032716 000040 BIT #40,(SP) ;R4 ALREADY LOADED?
59 000006 001013 BNE 10$ ;BRANCH IF YES
60 000010 005004 CLR R4 ;ASSUME NO ERROR CODE
61 000012 032716 000020 BIT #20,(SP) ;IS ERROR CODE DESIRED?
62 000016 001407 BEQ 10$ ;BRANCH IF NO
63 000020 116004 000052 MOVB F.ERR(R0),R4 ;YES USE F.ERR
64 000024 105760 000053 TSTB F.ERR+1(R0) ;IS IT A QI/O ERROR?
65 000030 100002 BPL 10$ ;BRANCH IF NOT
66 000032 162704 000200 SUB #128.,R4 ;QI/O ERRORS ALL SET 128.
67 000036 032716 000004 10$: BIT #4,(SP) ;OUTPUT FILENAME FROM FNB?
68 000042 001006 BNE 20$ ;BRANCH IF YES
69 000044 052700 000001 BIS #1,R0 ;ASSUME USING FDSPT
70 000050 032716 000010 BIT #10,(SP)
71 000054 001001 BNE 20$ ;BRANCH IF USING F.DSPT
72 000056 005000 CLR R0 ;NO FILE NAME OUTPUT
73 000060 016605 000002 20$: MOV 2(SP),R5 ;
74 000064 032716 000002 BIT #2,(SP)
75 000070 001414 BEQ 30$ ;BRANCH IF RECORD NUMBER
76 000072 005765 000002 TST 2(R5) ;ZERO ADDRESS
77 000076 001004 BNE 22$
78 000100 005715 TST (R5) ;AND ZERO SIZE
79 000102 001405 BEQ 25$ ;INDICATES THAT R2, R3 ALL SET UP
80 000104 012502 MOV (R5)+,R2 ;ZERO ADDRESS AND NON ZERO LENGTH
81 000106 000410 BR 35$ ;THEN LENGTH IS A RECORD NUMBER
82 000110 011502 22$: MOV (R5),R2 ;R2=SIZE OF STRING
83 000112 016503 000002 MOV 2(R5),R3 ;R3=ADDRESS OF STRING
84 000116 022525 25$: CMP (R5)+,(R5)+ ;POINT BEYOND PARAMETERS
85 000120 000407 BR 40$
86 000122 005715 30$: TST (R5) ;ZERO MESSAGE NO. MEANS R2 IS SET
87 000124 001401 BEQ 35$
88 000126 011502 MOV (R5),R2 ;R2=MESSAGE NUMBER
89 000130 005725 35$: TST (R5)+ ;POINT BEYOND PARAMETER
90 000132 005402 NEG R2 ;MAKE RECORN NUMBER NEGATIVE
91 000134 012703 000000G MOV #.MSGFN,R3 ;R3=FNB FOR MESSAGE FILE
92 000140 010566 000002 40$: MOV R5,2(SP) ;RESTORE PC BEYOND PARAMETERS
93 000144 012701 000000G MOV #GCMLCB,R1
94 000150 CALL .ERPRT
95 000154 032726 000001 BIT #1,(SP)+ ;EXIT OR RETURN?
96 000160 001001 BNE 50$ ;
97 000162 000002 RTI ;RETURN IN LINE
98 000164 000177 000000G 50$: JMP @.ABORT ;EXIT
99
100 ;
101 ;
102 000001 .END
ERRTRP M0005, ERROR TRAP HANDLE MACRO M1108 05-DEC-77 22:44 PAGE 7-2
SYMBOL TABLE
F.ALOC= 000040 F.EFN = 000050 F.NRBD= 000024 GCMLCB= ****** GX S.FATT= 000016
F.BBFS= 000062 F.EOBB= 000032 F.NREC= 000030 N.DID = 000024 S.FDB = 000140
F.BDB = 000070 F.ERR = 000052 F.OVBS= 000030 N.DVNM= 000032 S.FNAM= 000006
F.BGBC= 000057 F.FACC= 000043 F.RACC= 000016 N.FID = 000000 S.FNB = 000036
F.BKDN= 000026 F.FFBY= 000014 F.RATT= 000001 N.FNAM= 000006 S.FNBW= 000017
F.BKDS= 000020 F.FNAM= 000110 F.RCNM= 000034 N.FTYP= 000014 S.FNTY= 000004
F.BKEF= 000050 F.FNB = 000102 F.RCTL= 000017 N.FVER= 000016 S.FTYP= 000002
F.BKP1= 000051 F.FTYP= 000116 F.RSIZ= 000002 N.NEXT= 000022 S.NFEN= 000020
F.BKST= 000024 F.FVER= 000120 F.RTYP= 000000 N.STAT= 000020 $$ = 000067
F.BKVB= 000064 F.HIBK= 000004 F.STBK= 000036 N.UNIT= 000034 .ABORT= ****** GX
F.CNTG= 000034 F.LUN = 000042 F.UNIT= 000136 R$$DPB= 000001 .ERPRT= ****** GX
F.DFNB= 000046 F.MBCT= 000054 F.URBD= 000020 R$$DYM= 000001 .ERTRP 000000RG 002
F.DSPT= 000044 F.MBC1= 000055 F.VBN = 000064 R$$EIS= 000000 .MSGFN= ****** GX
F.DVNM= 000134 F.MBFG= 000056 F.VBSZ= 000060 R$$11M= 000001 ...TPC= 000140
F.EFBK= 000010
. ABS. 000000 000
000000 001
PURE$I 000170 002
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 3487 WORDS ( 14 PAGES)
DYNAMIC MEMORY: 4160 WORDS ( 16 PAGES)
ELAPSED TIME: 00:00:18
[43,10]ERRTRP,[43,20]ERRTRP/-SP=[43,30]PIPMAC,ERRTRP
FCSERR M0003, CONVERT FCS ERROR MACRO M1108 05-DEC-77 22:44
TABLE OF CONTENTS
7- 1 **** FCSERR VERSION M0003 ****
FCSERR M0003, CONVERT FCS ERROR MACRO M1108 05-DEC-77 22:44 PAGE 7
1 .TITLE FCSERR M0003, CONVERT FCS ERROR CODE TO STRING
.SBTTL **** FCSERR VERSION M0003 ****
.IDENT /M0003/
2
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
20 ;
21 .MCALL NMBLK$,CALL,RETURN
22
23 000000 .PSECT
24 000000 MSGZ FC01,<HANDLER ERROR CODE %D.>
25 000000 MSG FC02,<QI/O >
26 000000 MSGZ FC03,<ERROR CODE %D.>
27 000024 FC02SZ=FC02SZ+FC03SZ
28 .GLOBL FC03MG
29
30 .IF EQ,R$$11M
31 MSG FC04,<SY:[1,2]QIOSYM.MSG>
32
33 PURE.D
34 QIOMSG: .WORD FC04SZ,FC04MG
35
36 .IFF
37 000000 PURE.D
38 000000 QIOMSG: NMBLK$ QIOSYM,MSG,,SY,0
39 .ENDC
40 ;+
41 ;
42 ; CONVERT FCS ERROR CODE TO STRING
43 ;
44 ; CALLING SEQUENCE:
45 ;
46 ; CALL .FCSER
47 ;
48 ; INPUTS:
49 ;
50 ; R0=STRING ADDRESS TO STORE MESSAGE
51 ; R1=FCS ERROR CODE (NEGATIVE VALUE)
52 ; NOTE: NORMALLY R1 IS THE BYTE FROM F.ERR IN THE FDB, BUT IF
53 ; F.ERR+1 IS NEGATIVE, SUBTRACT 128. FROM R1 BEFORE CALING .FCSER.
54 ;
55 ; OUTPUTS:
FCSERR M0003, CONVERT FCS ERROR MACRO M1108 05-DEC-77 22:44 PAGE 7-1
**** FCSERR VERSION M0003 ****
56 ;
57 ; R0=UPDATED STRING POINTER
58 ; R1=SIZE OF STRING
59 ; R2-R5 PRESERVED
60 ;
61 ; OPERATION:
62 ;
63 ; THIS ROUTINE EXPECTS TO SEE THE MESSAGE FILE (64. BYTE FIXED LENGTH
64 ; RECORDS) QIOSYM.MSG UNDER [1,2] ON SY0:
65 ;-
66 000036 PURE.I
67 000000 .FCSER::
68 000000 FCSERR::
69 000000 010246 MOV R2,-(SP)
70 000002 010102 MOV R1,R2
71 000004 005402 NEG R2 ;MAKE ERROR CODE POSITIVE RECORD NUMBER
72 000006 012701 000000' MOV #QIOMSG,R1 ;R1=FNB FOR QIOSYM.MSG FILE
73 000012 CALL .GERRM ;GET THE RECORD FROM THE FILE
74 000016 103022 BCC 20$
75 ;
76 ; FAILED TO GET ERROR MESSAGE RECORD, PUT OUT ERROR CODE INSTEAD
77 ;
78 000020 010046 MOV R0,-(SP)
79 000022 012701 000000' MOV #FC01MG,R1 ;HANDLER ERROR CODE
80 000026 020227 000200 CMP R2,#128.
81 000032 003404 BLE 10$ ;BRANCH IF HANDLER ERROR CODE
82 000034 162702 000200 SUB #128.,R2 ;NORMALIZE THE QI/O ERROR CODE
83 000040 012701 000027' MOV #FC02MG,R1 ;QI/O ERROR CODE
84 000044 005402 10$: NEG R2 ;PRINT A NEGATIVE ERROR NUMBER
85 000046 010246 MOV R2,-(SP)
86 000050 010602 MOV SP,R2
87 000052 CALL $EDMSG ;FORM THE ERROR CODE STRING
88 000056 005726 TST (SP)+
89 000060 010001 MOV R0,R1
90 000062 162601 SUB (SP)+,R1 ;R1=SIZE OF STRING
91 000064 012602 20$: MOV (SP)+,R2
92 000066 RETURN
93
94 ;
95 ;
96 000001 .END
FCSERR M0003, CONVERT FCS ERROR MACRO M1108 05-DEC-77 22:44 PAGE 7-2
SYMBOL TABLE
FCSERR 000000RG 004 N.DVNM= 000032 N.UNIT= 000034 S.FNAM= 000006 $$ = 000067
FC01MG= 000000R 002 N.FID = 000000 QIOMSG 000000R 003 S.FNB = 000036 .FCSER 000000RG 004
FC01SZ= 000027 N.FNAM= 000006 R$$DPB= 000001 S.FNBW= 000017 .GERRM= ****** GX
FC02MG= 000027R 002 N.FTYP= 000014 R$$DYM= 000001 S.FNTY= 000004 ...PC1= 000000
FC02SZ= 000024 N.FVER= 000016 R$$EIS= 000000 S.FTYP= 000002 ...PC2= 000034R 003
FC03MG= 000034RG 002 N.NEXT= 000022 R$$MSG= 000000 S.NFEN= 000020 ...PC3= 000000
FC03SZ= 000017 N.STAT= 000020 R$$11M= 000001 $EDMSG= ****** GX ...TPC= 000036
N.DID = 000024
. ABS. 000000 000
000000 001
MSGSTR 000053 002
PURE$D 000036 003
PURE$I 000070 004
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 3338 WORDS ( 14 PAGES)
DYNAMIC MEMORY: 4160 WORDS ( 16 PAGES)
ELAPSED TIME: 00:00:18
[43,10]FCSERR,[43,20]FCSERR/-SP=[43,30]PIPMAC,FCSERR
GERRM M0007, GET ERROR MESSAGE MACRO M1108 05-DEC-77 22:44
TABLE OF CONTENTS
7- 1 **** GERRM VERSION M0007 ****
GERRM M0007, GET ERROR MESSAGE MACRO M1108 05-DEC-77 22:44 PAGE 7
1 .TITLE GERRM M0007, GET ERROR MESSAGE STRING
.SBTTL **** GERRM VERSION M0007 ****
.IDENT /M0007/
2
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 31-APR-74
20
21 .IF GT,R$$11M
22
23
24 .MCALL FILIO$
25 000000 FILIO$ ;DEFINE THE I/O FUNCTION CODES LOCALLY
26 ;
27 .MCALL NMBLK$,QIO$,WTSE$S,DIR$,CALL,RETURN
28
29 000000 PURE.D
30
31 000000 DIRNMB: NMBLK$ 001002,DIR,,SY,0
32
33 000024' .=DIRNMB+N.DID
34 000024 177777 177777 .WORD -1,-1
35 000036' .=DIRNMB+S.FNB
36
37 000036 IMPURE
38
39 000000 EOIOST: .BLKW 2
40 000004 QIODPB: QIO$ ,,32.,,EOIOST,,<,,,,,>
41
42 000010' .EOLUN==QIODPB+Q.IOLU
43 000012' .EOEFN==QIODPB+Q.IOEF
44
45 000034 .ERRBF::.BLKW 1000
46 ;+
47 ;
48 ; GET ERROR MESSAGE FROM FILE
49 ;
50 ; CALLING SEQUENCE:
51 ;
52 ; CALL .GERRM
53 ;
54 ; INPUTS:
55 ;
GERRM M0007, GET ERROR MESSAGE MACRO M1108 05-DEC-77 22:44 PAGE 7-1
**** GERRM VERSION M0007 ****
56 ; R0=STRING ADDRESS TO RETURN STRING
57 ; R1=MESSAGE FILE POINTER (FNB FOR 11M, STRING DESCRIPTOR FOR 11D)
58 ; R2=RECORD NUMBER (64. BYTE FIXED LENGTH RECORDS)
59 ;
60 ; OUTPUTS:
61 ;
62 ; C=0 IF SUCCESSFUL, C=1 IF FAILED
63 ; R0=UPDATED STRING ADDRESS
64 ; R1=NO. OF CHARACTER ADDED
65 ; R2-R5 PRESERVED
66 ;
67 ;-
68
69 002034 PURE.I
70 000000 004567 000000G .GERRM::JSR R5,$SAVRG
71 000004 005761 000024 TST N.DID(R1) ;IS DIRECTORY ID SET?
72 000010 001015 BNE 20$ ;BRANCH IF YES
73 000012 012704 000000' MOV #DIRNMB,R4
74 000016 005714 TST (R4)
75 000020 001003 BNE 10$
76 000022 CALL FIND ;FIND THE DIRECTORY ID
77 000026 103516 BCS 90$ ;BRANCH IF NO MESSAGE FILE
78 000030 012461 000024 10$: MOV (R4)+,N.DID(R1) ; SET DIECTORY ID
79 000034 012461 000026 MOV (R4)+,N.DID+2(R1) ;
80 000040 012461 000030 MOV (R4)+,N.DID+4(R1)
81 000044 005711 20$: TST (R1) ;IS FILE ID ALREADY PRESENT
82 000046 001004 BNE 30$ ;BRANCH IF YES
83 000050 010104 MOV R1,R4 ;
84 000052 CALL FIND ;FIND THE MESSAGE
85 000056 103502 BCS 90$ ;BRANCH IF NO MESSAGE FILE
86 000060 30$: ;
87 000060 012767 006400 000006' MOV #IO.ACR,QIODPB+Q.IOFN
88 000066 CALL CLRDPB ;SET R5 TO BE WORD PARAM BLOCK
89 000072 010115 MOV R1,(R5) ;FNB
90
91 .IF GT,R$$DPB
92
93 000074 012765 100000 000010 MOV #100000,8.(R5) ;ENABLE ACCESS BIT
94 .ENDC
95
96 000102 CALL QIOWAT ;ISSUE ACCESS I/O AND WAIT
97 000106 103466 BCS 90$ ;BRANCH IF FAILED TO ACCESS
98 000110 010204 MOV R2,R4
99 000112 005304 DEC R4
100 000114 000241 CLC ;SHIFT R4 3 BITS RIGHT
101 000116 006004 ROR R4
102 000120 006204 ASR R4
103 000122 006204 ASR R4
104 000124 005204 INC R4 ;SINCE VBN'S START AT 1
105 000126 012767 010400 000006' MOV #IO.RVB,QIODPB+Q.IOFN
106 000134 CALL CLRDPB
107 000140 012725 000034' MOV #.ERRBF,(R5)+ ;ADDRESS TO READ INTO
108 000144 012725 001000 MOV #512.,(R5)+ ;SIZE OF TRANSFER
109 000150 022525 CMP (R5)+,(R5)+
110 000152 010415 MOV R4,(R5) ;VBN TO READ
111 000154 CALL QIOWAT ;ISSUE READ QI/O AND WAIT
112 000160 006004 ROR R4 ;SAVE CARRY
GERRM M0007, GET ERROR MESSAGE MACRO M1108 05-DEC-77 22:44 PAGE 7-2
**** GERRM VERSION M0007 ****
113 000162 012767 010000 000006' MOV #IO.DAC,QIODPB+Q.IOFN
114 000170 CALL CLRDPB
115 000174 010115 MOV R1,(R5) ;FILE TO DEACCESS
116 000176 CALL QIOWAT ;ISSUE THE DEACCESS QI/O
117 000202 103430 BCS 90$
118 000204 006104 ROL R4 ;RESTORE C BIT FROM READ
119 000206 103426 BCS 90$ ;BRANCH IF READ FAILED
120 000210 010205 MOV R2,R5
121 000212 005305 DEC R5
122 000214 042705 177770 BIC #177770,R5 ;R5=RECORD NO. WITHIN BLOCK
123 000220 000305 SWAB R5 ;ASH #6,R5, SHIFT LEFT 6
124 000222 006205 ASR R5
125 000224 006205 ASR R5
126 000226 062705 000034' ADD #.ERRBF,R5 ;FORM R5=ADDRESS OF RECORD
127 000232 010003 MOV R0,R3
128 000234 012704 000100 MOV #64.,R4
129 000240 112520 50$: MOVB (R5)+,(R0)+ ;MOVE UP TO 64. BYTES ASCIZ
130 000242 001403 BEQ 55$
131 000244 SOB R4,50$
132 000250 000401 BR 60$
133 000252 005300 55$: DEC R0 ;DON'T COUNT THE NULL
134 000254 010001 60$: MOV R0,R1 ;
135 000256 160301 SUB R3,R1 ;FORM BYTE COUNT, C=0
136 000260 001402 BEQ 95$ ;IF NULL RECORD, RETURN ERR
137 000262 RETURN
138 000264 005001 90$: CLR R1
139 000266 000261 95$: SEC
140 000270 RETURN
141 ;+
142 ; ISSUE A FIND QI/O
143 ;
144 ; CALLING SEQUENCE:
145 ;
146 ; CALL FIND
147 ;
148 ; INPUTS:
149 ;
150 ; R4=FNB
151 ;
152 ; OUTPUTS:
153 ;
154 ; C=0 IF SUCCESSFUL, C=1 IF ERROR
155 ; R5 ALTERED, R0-R4 PRESERVED
156 ;
157 ;-
158 000272 FIND:
159 000272 012767 004400 000006' MOV #IO.FNA,QIODPB+Q.IOFN
160 000300 CALL CLRDPB
161 .IF GT,R$$DPB
162
163 000304 010465 000012 MOV R4,10.(R5) ;STORE FNB
164
165 .IFF
166
167 MOV R4,(R5)
168
169 .ENDC
GERRM M0007, GET ERROR MESSAGE MACRO M1108 05-DEC-77 22:44 PAGE 7-3
**** GERRM VERSION M0007 ****
170 000310 CALL QIOWAT ;ISSUE THE FIND QI/O AND WAIT
171 000314 RETURN
172 ;+
173 ; CLEAR THE 6 WORD PARAMETER AREA OF THE QIODPB
174 ;
175 ; CALLING SEQUENCE:
176 ;
177 ; CALL CLRDPB
178 ;
179 ; INPUTS:
180 ;
181 ; NONE
182 ;
183 ; OUTPUTS:
184 ;
185 ; R0-R4 PRESERVED
186 ; R5 POINTS 1ST WORD OF 6 WORD PARAMETER BLOCK
187 ;
188 ;-
189 000316 CLRDPB:
190 000316 012705 000034' MOV #QIODPB+24.,R5 ;POINT TO LAST +2 WORD
191 000322 012746 000006 MOV #6,-(SP) ;CLEAR 6 WORDS
192 000326 005045 10$: CLR -(R5) ;
193 000330 005316 DEC (SP)
194 000332 003375 BGT 10$
195 000334 005726 TST (SP)+
196 000336 RETURN
197 ;+
198 ;
199 ; ISSUE THE QIO AND WAIT - QIODPB ALL SET UP.
200 ;
201 ; CALLING SEQUENCE:
202 ;
203 ; CALL QIOWAT
204 ;
205 ; INPUTS:
206 ;
207 ; NONE
208 ;
209 ; OUTPUTS:
210 ;
211 ; C=0 IF SUCCESSFUL, C=1 IF ERROR
212 ;
213 ;-
214 000340 QIOWAT:
215 000340 DIR$ #QIODPB
216 000346 103411 BCS 10$
217 000350 WTSE$S .EOEFN
218 000362 105767 000000' TSTB EOIOST ;NEGATIVE STATUS IS AN ERROR
219 000366 003001 BGT 10$ ;BRANCH IF OK, C=0
220 000370 000261 SEC
221 000372 10$: RETURN
GERRM M0007, GET ERROR MESSAGE MACRO M1108 05-DEC-77 22:44 PAGE 8
**** GERRM VERSION M0007 ****
223 .IFF ;IF THIS IS FOR RSX11D
224
225 .MCALL RETURN,MOUT$S
226
227 IMPURE
228 .ERRBF::.BLKB 3*80. ;ENOUGH SPACE FOR 3 LINES
229 ERRBFS=.-.ERRBF
230 EOIOST: .BLKW 2 ;I/O STATUS BLOCK FOR MO CALL
231 .EOLUN::.BLKW 1 ;LUN FOR MO, PATCH AND PREASSIGN TO MO
232
233 PURE.I
234 .GERRM::CLR -(SP) ;SET UP A ZERO COUNT TO RETURN IF ERROR
235 MOUT$S R1,,R2,CONT,USBUF,#.ERRBF,#ERRBFS,#EOIOST,.EOLUN
236 BCS 20$
237 SEC
238 MOVB EOIOST,R1 ;COMPLETED SUCCESSFULLY?
239 BMI 20$ ;BRANCH IF NO
240 MOV .ERRBF+2,R1 ;LENGTH OF RECORD RETURNED
241 BEQ 20$ ;BRANCH IF EMPTY
242 MOV R1,(SP) ;PUT REAL COUNT ON STACK
243 MOV R1,-(SP) ;PUSH ANOTHER COPY FOR MOVE LOOP
244 MOV #.ERRBF+4,R1
245 10$: MOVB (R1)+,(R0)+ ;MOVE THE RECORD TO THE USER STRING
246 DEC (SP)
247 BGT 10$
248 TST (SP)+ ;POP THE EXPIRED COUNT AND CLEAR CARRY
249 20$: MOV (SP)+,R1 ;RECOVER THE SAVED COUNT OR 0 IF ERROR
250 RETURN
251
252 .ENDC
253 ;
254 ;
255 000001 .END
GERRM M0007, GET ERROR MESSAGE MACRO M1108 05-DEC-77 22:44 PAGE 8-1
SYMBOL TABLE
CLRDPB 000316R 004 IO.ENA= 006000 IO.WVB= 011000 Q.IOEF= 000006 S.NFEN= 000020
DIRNMB 000000R 002 IO.EXT= 011400 IQ.Q = 000002 Q.IOFN= 000002 $SAVRG= ****** GX
EOIOST 000000R 003 IO.FNA= 004400 IQ.X = 000001 Q.IOLU= 000004 $$ = 000067
FIND 000272R 004 IO.KIL= 000012 N.DID = 000024 Q.IOPL= 000014 $$$ARG= 000014
IO.ACE= 007400 IO.LOV= 001010 N.DVNM= 000032 Q.IOPR= 000007 $$$OST= 000014
IO.ACR= 006400 IO.LTK= 000050 N.FID = 000000 Q.IOSB= 000010 .EOEFN= 000012RG 003
IO.ACW= 007000 IO.RAT= 013000 N.FNAM= 000006 R$$DPB= 000001 .EOLUN= 000010RG 003
IO.APC= 014000 IO.RDN= 000022 N.FTYP= 000014 R$$DYM= 000001 .ERRBF 000034RG 003
IO.APV= 014010 IO.RLB= 001000 N.FVER= 000016 R$$EIS= 000000 .GERRM 000000RG 004
IO.ATT= 001400 IO.RNA= 005400 N.NEXT= 000022 R$$11M= 000001 ...GBL= 000000
IO.CLN= 003400 IO.RTK= 000060 N.STAT= 000020 S.FNAM= 000006 ...PC1= 000000
IO.CRE= 012000 IO.RVB= 010400 N.UNIT= 000034 S.FNB = 000036 ...PC2= 000034R 002
IO.DAC= 010000 IO.UNL= 000042 QIODPB 000004R 003 S.FNBW= 000017 ...PC3= 000000
IO.DEL= 012400 IO.WAT= 013400 QIOWAT 000340R 004 S.FNTY= 000004 ...TPC= 000036
IO.DET= 002000 IO.WLB= 000400 Q.IOAE= 000012 S.FTYP= 000002
. ABS. 000000 000
000000 001
PURE$D 000036 002
IMPURE 002034 003
PURE$I 000374 004
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 4152 WORDS ( 17 PAGES)
DYNAMIC MEMORY: 5216 WORDS ( 20 PAGES)
ELAPSED TIME: 00:00:29
[43,10]GERRM,[43,20]GERRM/-SP=[43,30]PIPMAC,GERRM
GETCML M0103, GET A COMMAND LIN MACRO M1108 05-DEC-77 22:45
TABLE OF CONTENTS
7- 1 **** GETCML VERSION M0103 ****
GETCML M0103, GET A COMMAND LIN MACRO M1108 05-DEC-77 22:45 PAGE 7
1 .TITLE GETCML M0103, GET A COMMAND LINE
.SBTTL **** GETCML VERSION M0103 ****
.IDENT /M0103/
2 ; ALTERED THURSDAY 21-NOV-74 9:35
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 7-MAY-73
20 ;
21 .MCALL GCMLD$,GCML$,RCML$,CALL,RETURN,CLOSE$
22 000000 GCMLD$
23 ;
24 000000 PURE.I
25 ;
26 ;+
27 ; GET A COMMAND LINE FROM GCMLCB (MUST BE GLOBALLY DEFINED)
28 ; CALLING SEQUENCE:
29 ; CALL GETCML
30 ; INPUTS:
31 ; NONE
32 ; OUTPUTS:
33 ; C=0 IF COMMAND WAS SUCCESSFULLY RECEIVED
34 ; C=1 IF EOF OR FATAL FAILURE - PROGRAM IS EXPECTED TO EXIT
35 ; THE GCML CONTROL BLOCK WILL BE RESET AND CLOSED
36 ; R0 ALTERED TO CONTAIN ADR OF GCMLCB
37 ; R1-R5 PRESERVED
38 ; OPERATION:
39 ; THIS ROUTINE HANDLES BLANK LINES AS NULL INPUT AND JUST GETS
40 ; ANOTHER LINE. LIKEWISE IT HANDLES ALL RECOVERABLE ERROR
41 ; MESSAGES, AND GIVES AN APPROPRIATE MESSAGE AND TRIES TO
42 ; GET ANOTHER LINE. THE ONLY TIME THE C BIT IS SET ON RETURN IS IF
43 ; THE EOF CONDITION WAS RETURNED BY GCML OR IF AN I/O ERROR STATUS CODE
44 ; WAS RETURNED.
45 ;-
46 000000 GETCML::GCML$ #GCMLCB
47 000014 103404 BCS 10$
48 000016 005760 000146 TST G.CMLD(R0)
49 000022 001766 BEQ GETCML ;GET ANOTHER LINE IF THIS ONE IS NULL
50 000024 RETURN
51 000026 10$: CALL GCMLER
52 000032 012700 000000G MOV #GCMLCB,R0
53 000036 103403 BCS 20$ ;BRANCH IF EOF OR FATAL ERROR
54 000040 RCML$ R0 ;RECOVER FROM ERROR
55 000044 000755 BR GETCML ;AND GET ANOTHER LINE
GETCML M0103, GET A COMMAND LIN MACRO M1108 05-DEC-77 22:45 PAGE 7-1
**** GETCML VERSION M0103 ****
56 ;
57 ; FATAL ERROR FROM GET COMMMAND LINE (OR EOF)
58 000046 20$: RCML$ R0 ;CLEAN UP GET COMMAND LINE
59 000052 CLOSE$ R0
60 000056 000261 SEC
61 000060 RETURN
62 ;
63 ;+
64 ; PROCESS ERROR FROM GET COMMAND LINE
65 ; CALLING SEQUENCE
66 ; CALL GCMLER
67 ; INPUTS:
68 ; R0=GET COMMAND LINE CONTROL BLOCK
69 ; OUTPUTS:
70 ; C=0 IF OK TO REINIT AND RESTART PROGRAM
71 ; C=1 IF PROGRAM SHOULD CLEAN UP AND EXIT
72 ; ALL REGISTERS ALTERED
73 ;-
74 000062 004567 000000G GCMLER::JSR R5,.SAVR1
75 000066 122760 177766 000140 CMPB #GE.EOF,G.ERR(R0)
76 000074 001417 BEQ 5$ ;BRANCH IF EOF
77 000076 122760 177774 000140 CMPB #GE.MDE,G.ERR(R0)
78 000104 001415 BEQ 10$ ;BRANCH IF TOO MANY INDIRECT FILES
79 000106 122760 177775 000140 CMPB #GE.BIF,G.ERR(R0)
80 000114 001415 BEQ 20$ ;BRANCH IF BAD @ FILE NAME
81 000116 122760 177776 000140 CMPB #GE.OPR,G.ERR(R0)
82 000124 001415 BEQ 30$ ;BRANCH IF FAILED TO OPEN @ FILE
83 000126 ERROUT GC01 ;I/O ERROR
000126 104402 TRAP X
000130 000034 .WORD GC01SZ
000132 000000' .WORD GC01MG
84 000134 000261 5$: SEC ;EXIT TYPE ERROR
85 000136 RETURN
86 000140 10$: ERROUT GC03 ;MAX @ FILE DEPTH EXCEEDED
000140 104402 TRAP X
000142 000054 .WORD GC03SZ
000144 000076' .WORD GC03MG
87 000146 000407 BR 40$
88 000150 20$: ERROUT GC02 ;BAD @ FILE NAME
000150 104402 TRAP X
000152 000042 .WORD GC02SZ
000154 000034' .WORD GC02MG
89 000156 000403 BR 40$
90 000160 30$: ERROUT GC04 ;FAILED TO OPEN @ FILE
000160 104402 TRAP X
000162 000050 .WORD GC04SZ
000164 000152' .WORD GC04MG
91 000166 000241 40$: CLC ;RECOVERABLE TYPE FAILURE
92 000170 RETURN
93 ;
94 000000 .CSECT
95 ;
96 ; MESSAGES FOR GET COMMAND LINE ERRORS
97 000000 MSG GC01,<GET COMMAND LINE - I/O ERROR>
98 000000 MSG GC02,<GET COMMAND LINE - BAD @ FILE NAME>
99 000000 MSG GC03,<GET COMMAND LINE - MAX @ FILE DEPTH EXCEEDED>
100 000000 MSG GC04,<GET COMMAND LINE - FAILED TO OPEN @ FILE>
GETCML M0103, GET A COMMAND LIN MACRO M1108 05-DEC-77 22:45 PAGE 7-2
**** GETCML VERSION M0103 ****
101 ;
102 ;
103 000001 .END
GETCML M0103, GET A COMMAND LIN MACRO M1108 05-DEC-77 22:45 PAGE 7-3
SYMBOL TABLE
GCMLCB= ****** GX GETCML 000000RG 002 GE.OPR= 177776 R$$DYM= 000001 S.FTYP= 000002
GCMLER 000062RG 002 GE.BIF= 177775 G.CMLD= 000146 R$$EIS= 000000 S.NFEN= 000020
GC01MG= 000000R 003 GE.CLO= 000004 G.DPRM= 000160 R$$MSG= 000000 X = 000002
GC01SZ= 000034 GE.COM= 000001 G.ERR = 000140 R$$11M= 000001 $$ = 000067
GC02MG= 000034R 003 GE.EOF= 177766 G.ISIZ= 000020 S.FDB = 000140 .CLOSE= ****** G
GC02SZ= 000042 GE.IND= 000002 G.MODE= 000141 S.FNAM= 000006 .GCML1= ****** G
GC03MG= 000076R 003 GE.IOR= 177777 G.PSDS= 000142 S.FNB = 000036 .GCML2= ****** G
GC03SZ= 000054 GE.LC = 000010 PAR$$$= 000000 S.FNBW= 000017 .SAVR1= ****** GX
GC04MG= 000152R 003 GE.MDE= 177774 R$$DPB= 000001 S.FNTY= 000004 ...TPC= 000140
GC04SZ= 000050
. ABS. 000000 000
000000 001
PURE$I 000172 002
MSGSTR 000222 003
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 4267 WORDS ( 17 PAGES)
DYNAMIC MEMORY: 5216 WORDS ( 20 PAGES)
ELAPSED TIME: 00:00:28
[43,10]GETCML,[43,20]GETCML/-SP=[43,30]PIPMAC,GETCML
HDRMG M0114, FILE HEADER TO ASC MACRO M1108 05-DEC-77 22:45
TABLE OF CONTENTS
7- 1 **** HDRMG VERSION M0114 ****
HDRMG M0114, FILE HEADER TO ASC MACRO M1108 05-DEC-77 22:45 PAGE 7
1 .TITLE HDRMG M0114, FILE HEADER TO ASCII
.SBTTL **** HDRMG VERSION M0114 ****
.IDENT /M0114/
2 ; ALTERED THURSDAY 21-NOV-74 9:45
3 ;
4 ; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
5 ; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
6
7 ; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
8 ; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
9 ; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
10 ; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
11
12 ; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
13 ; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
14 ; EQUIPMENT CORPORATION.
15
16 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
17 ; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
18 ;
19 ; PETER H. LIPMAN 5-JUNE-73
20 ;
21 .MCALL CALL,RETURN,FDOF$L
22 000000 FDOF$L
23 ;
24 000001 HDFNAM=1 ;IF SET IN R3, CONVERT THE FILE NAME
25 000002 HDLONG=2 ;IF SET IN R3, LONG FORM CONVERSION
26 ;
27 000000 PURE.D
28 ;
29 ; FIELD DEFINITION TABLES
30 000000 024 010 003 HDRTB1::.BYTE 20.,8.,3. ;SHORT FORM
31 000003 024 020 016 HDRTB2: .BYTE 20.,16.,14.,3.,16.,2,9.,22.,24. ;LONG FORM
000006 003 020 002
000011 011 026 030
32 .EVEN
HDRMG M0114, FILE HEADER TO ASC MACRO M1108 05-DEC-77 22:45 PAGE 8
**** HDRMG VERSION M0114 ****
34 ;
35 000014 PURE.I
36 ;+
37 ; CONVERT FILE HEADER TO STRING
38 ; CALLING SEQUENCE:
39 ; CALL HDRMG
40 ; INPUTS
41 ; R0=STRING ADDRESS TO PUT CHARACTERS IN
42 ; R1=HEADER ADDRESS
43 ; R2=STATISTICS BLOCK ADDRESS
44 ; R3=CONVERT CONTROL BITS (0-7)
45 ; BIT 0 = 0 SKIP THE FILE NAME, TYPE, AND VERSION
46 ; BIT 0 = 1 CONVERT THE FILE NAME, TYPE AND VERSION
47 ; BIT 1 = 0 SHORT FORM CONVERSION
48 ; BIT 1 = 1 LONG FORM CONVERSION
49 ; R3 BITS 8-15 - LISTING WIDTH OF LINE, (>=132. FOR LONG 1 LINER)
50 ; OUTPUTS:
51 ; R0=UPDATED STRING POINTER
52 ; R1=TOTAL NUMBER OF BYTES CONVERTED
53 ; R2-R5 PRESERVED
54 ;-
55 000000 004567 000000G HDRMG:: JSR R5,$SAVRG ;SAVE R3-R5
56 000004 010046 MOV R0,-(SP)
57 000006 010246 MOV R2,-(SP)
58 000010 010346 MOV R3,-(SP) ;TOP OF STACK=CONTROL BITS
59 000012 010103 MOV R1,R3 ;R3=ADDRESS OF HEADER
60 000014 005004 CLR R4
61 000016 156304 000000G BISB HH.IDO(R3),R4
62 000022 006304 ASL R4
63 000024 060304 ADD R3,R4 ;R4=BASE OF IDENT AREA IN HEADER
64 000026 012705 000000' MOV #HDRTB1,R5
65 000032 032716 000002 BIT #HDLONG,@SP
66 000036 001402 BEQ 10$
67 000040 012705 000003' MOV #HDRTB2,R5 ;R5=FIELD CONTROL TABLE
68 000044 032716 000001 10$: BIT #HDFNAM,@SP ;CONVERT FILE NAME, TYPE, AND VERSION?
69 000050 001412 BEQ 20$ ;BRANCH IF NO
70 ;
71 ; CONVERT THE FILE NAME, TYPE, AND VERSION
72 000052 012701 000000' MOV #HD01MG,R1
73 000056 010402 MOV R4,R2
74 000060 062702 000000G ADD #HI.NAM,R2 ;R2 POINTS AT RAD50 NAME, TYPE VER
75 000064 CALL $EDMSG
76 000070 CALL HDFILL ;FILL OUT THE FIELD WITH BLANK
77 000074 000401 BR 25$
78 000076 005205 20$: INC R5 ;SKIP THE FILENAME FIELD
79 000100 032716 000002 25$: BIT #HDLONG,@SP
80 000104 001425 BEQ 40$ ;BRANCH IF SHORT FORM
81 ;
82 ; CONVERT THE FILE ID
83 000106 010046 MOV R0,-(SP)
84 000110 112720 000050 MOVB #'(,(R0)+
85 000114 016301 000000G MOV HH.FNU(R3),R1
86 000120 005002 CLR R2 ;SUPPRESS LEADING ZEROS
87 000122 CALL $CBOMG ;CONVERT FILE NUMBER
88 000126 112720 000054 MOVB #',,(R0)+
89 000132 016301 000000G MOV HH.FSQ(R3),R1
90 000136 005002 CLR R2
HDRMG M0114, FILE HEADER TO ASC MACRO M1108 05-DEC-77 22:45 PAGE 8-1
**** HDRMG VERSION M0114 ****
91 000140 CALL $CBOMG ;CONVERT FILE SEQUENCE NUMBER
92 000144 112720 000051 MOVB #'),(R0)+
93 000150 010001 MOV R0,R1
94 000152 162601 SUB (SP)+,R1
95 000154 CALL HDFILL
96 ; CONVERT THE NO. OF BLOCKS USED.
97 000160 010301 40$: MOV R3,R1
98 000162 062701 000000G ADD #HH.UAT,R1
99 000166 016146 000010 MOV F.EFBK(R1),-(SP) ;SAVE EFBK
100 000172 016146 000012 MOV F.EFBK+2(R1),-(SP)
101 000176 011602 MOV @SP,R2
102 000200 056602 000002 BIS 2(SP),R2
103 000204 001011 BNE 43$
104 ;
105 ; EFBK = 0 INDICATING THAT NO FCS END OF FILE INFO IS PRESENT
106 ; SAY THAT FILE SIZE IS THE ALLOCATED SPACE
107 000206 016602 000006 MOV 6(SP),R2 ;R2=STAT BLOCK ADDRESS
108 000212 016261 000004 000010 MOV 4(R2),F.EFBK(R1) ;USE ALLOCATED SPACE FOR SIZE USED
109 000220 016261 000006 000012 MOV 6(R2),F.EFBK+2(R1)
110 000226 000410 BR 45$
111 000230 005761 000014 43$: TST F.FFBY(R1) ;IF FFBY=0
112 000234 001005 BNE 45$
113 000236 162761 000001 000012 SUB #1,F.EFBK+2(R1) ;THEN EFBK IS 1 TOO BIG
114 000244 005661 000010 SBC F.EFBK(R1)
115 000250 062701 000010 45$: ADD #F.EFBK,R1
116 000254 005002 CLR R2 ;ZERO SUPPRESS
117 000256 CALL CDDMG ;CONVERT DOUBLE PRECISION TO MAG DECIMAL
118 000262 012663 000012G MOV (SP)+,HH.UAT+F.EFBK+2(R3) ;RESTORE EFBK
119 000266 012663 000010G MOV (SP)+,HH.UAT+F.EFBK(R3)
120 000272 032716 000002 BIT #HDLONG,@SP
121 000276 001414 BEQ 60$ ;BRANCH IF SHORT MODE
122 ; CONVERT NO. OF BLOCKS ALLOCATED
123 000300 112720 000057 MOVB #'/,(R0)+ ;PUT IN "/"
124 000304 005201 INC R1 ;AND COUNT IT
125 000306 010146 MOV R1,-(SP) ;SAVE THE COUNT
126 000310 016601 000004 MOV 4(SP),R1 ;R1=STATISTICS BLOCK ADDRESS
127 000314 062701 000004 ADD #4,R1 ;R1=ADDRESS OF ALLOCATED SIZE
128 000320 005002 CLR R2
129 000322 CALL CDDMG ;CONVERT DBL PRECISION TO DECIMAL MAGNITUDE
130 000326 062601 ADD (SP)+,R1 ;FORM COUNT FOR NNN/MMM
131 000330 60$: CALL HDFILL ;BLANK FILL THE FIELD
132 ; PUT "C" FOR CONTIGUOUS AND "L" FOR LOCKED
133 000334 112720 000040 MOVB #' ,(R0)+
134 000340 132763 000000G 000000G BITB #HS.CON,HH.CHU(R3) ;IF CONTIGUOUS
135 000346 001403 BEQ 65$
136 000350 112760 000103 177777 MOVB #'C,-1(R0) ;PUT A "C" IN STRING
137 000356 112720 000040 65$: MOVB #' ,(R0)+
138 000362 132763 000000G 000000G BITB #HS.PHL,HH.CHU(R3) ;IF LOCKED
139 000370 001403 BEQ 70$
140 000372 112760 000114 177777 MOVB #'L,-1(R0) ;PUT A "C" IN STRING
141 000400 012701 000002 70$: MOV #2,R1 ;NO. OF CHARACTERS
142 000404 CALL HDFILL
143 ; PUT CREATION DATE AND TIME IN STRING
144 000410 010401 MOV R4,R1
145 000412 062701 000000G ADD #HI.CDT,R1
146 000416 CALL DATIM
147 000422 032716 000002 BIT #HDLONG,@SP
HDRMG M0114, FILE HEADER TO ASC MACRO M1108 05-DEC-77 22:45 PAGE 8-2
**** HDRMG VERSION M0114 ****
148 000426 001574 BEQ HDRMGX
149 000430 122766 000204 000001 HDRMG1: CMPB #132.,1(SP) ;DON'T PUT IN ANOTHER LINE IF LONG LINE
150 000436 101004 BHI 5$
151 000440 CALL HDFILL
152 000444 005205 INC R5 ;SKIP INDENT
153 000446 000410 BR 10$
154 000450 112720 000015 5$: MOVB #15,(R0)+ ;NEXT LINE
155 000454 112720 000012 MOVB #12,(R0)+
156 000460 005001 CLR R1
157 000462 005205 INC R5 ;SKIP FILL FIELD FOR CREATION DATE
158 000464 CALL HDFILL ;INDENT
159 ; STORE OWNER'S PROJECT PROGRAMMER NUMBER
160 000470 012701 000013' 10$: MOV #HD03MG,R1
161 000474 005046 CLR -(SP)
162 000476 116316 000000G MOVB HH.PC(R3),@SP
163 000502 005046 CLR -(SP)
164 000504 116316 000000G MOVB HH.GC(R3),@SP
165 000510 010602 MOV SP,R2
166 000512 CALL $EDMSG
167 000516 062706 000004 ADD #4,SP
168 000522 CALL HDFILL
169 ; PUT PROTECTION CODE IN STRING
170 000526 010046 MOV R0,-(SP) ;SAVE 50 CAN GET COUNT
171 000530 112720 000133 MOVB #'[,(R0)+
172 000534 012702 000004 MOV #4,R2
173 000540 016301 000000G MOV HH.FP(R3),R1
174 000544 032701 000000G 18$: BIT #HF.RDV,R1
175 000550 001002 BNE 20$
176 000552 112720 000122 MOVB #'R,(R0)+
177 000556 032701 000000G 20$: BIT #HF.WRV,R1
178 000562 001002 BNE 22$
179 000564 112720 000127 MOVB #'W,(R0)+
180 000570 032701 000000G 22$: BIT #HF.EXT,R1
181 000574 001002 BNE 24$
182 000576 112720 000105 MOVB #'E,(R0)+
183 000602 032701 000000G 24$: BIT #HF.DEL,R1
184 000606 001002 BNE 26$
185 000610 112720 000104 MOVB #'D,(R0)+
186 000614 112720 000054 26$: MOVB #',,(R0)+
187
188 .IF EQ,R$$EIS
189 000004 .REPT 4
190 ASR R1 ;SHIFT RIGHT 4 BITS
191 .ENDR
192
193 .IFF
194 ASH #-4,R1
195 .ENDC
196
197 000630 SOB R2,18$
198 000634 112760 000135 177777 MOVB #'],-1(R0) ;"]" INSTEAD OF TRAILING ","
199 000642 010001 MOV R0,R1
200 000644 162601 SUB (SP)+,R1 ;NEW POINTER -OLD=COUNT
201 000646 105764 000000G TSTB HI.EXP(R4) ;IF NO EXPIRATION DATE
202 000652 001004 BNE 30$
203 000654 022764 000001 000000G CMP #1,HI.REV(R4) ;AND NO REVISION DATE TO PRINT
204 000662 103056 BHIS HDRMGX ;SKIP TO THE END
HDRMG M0114, FILE HEADER TO ASC MACRO M1108 05-DEC-77 22:45 PAGE 8-3
**** HDRMG VERSION M0114 ****
205 000664 30$: CALL HDFILL
206 ; REVISION DATE
207 000670 005001 CLR R1
208 000672 022764 000001 000000G CMP #1,HI.REV(R4) ;IF REVISION NUMBER IS <=1
209 000700 103021 BHIS 40$ ;DON'T BOTHER PRINTING THE REVISION INFO
210 000702 010401 MOV R4,R1
211 000704 062701 000000G ADD #HI.RDT,R1
212 000710 CALL DATIM
213 000714 010146 MOV R1,-(SP)
214 ; REVISION NUMBER
215 000716 010402 MOV R4,R2
216 000720 062702 000000G ADD #HI.REV,R2
217 000724 012701 000023' MOV #HD04MG,R1
218 000730 CALL $EDMSG
219 000734 062601 ADD (SP)+,R1 ;ADD SAVED COUNT FROM REVISION DATE
220 000736 105764 000000G TSTB HI.EXP(R4) ;IF NULL EXPIRATION DATE
221 000742 001426 BEQ HDRMGX ;SKIP TO THE END
222 000744 122766 000204 000001 40$: CMPB #132.,1(SP) ;IF USING LONG LINE FORMAT
223 000752 101007 BHI 45$
224 000754 112720 000015 MOVB #15,(R0)+ ;MUST GO TO NEW LINE NOW
225 000760 112720 000012 MOVB #12,(R0)+
226 000764 112720 000011 MOVB #11,(R0)+
227 000770 000402 BR 50$
228 000772 45$: CALL HDFILL
229 ; EXPIRATION DATE
230 000776 010401 50$: MOV R4,R1
231 001000 062701 000000G ADD #HI.EXP,R1
232 001004 CALL DATIM
233 001010 005701 TST R1 ;ANY EXPIRATION DATE?
234 001012 001402 BEQ HDRMGX ;BRANCH IF NO
235 001014 162700 000006 SUB #6,R0 ;SUBTRACT OFF THE TIME CHARACTERS
236 001020 012603 HDRMGX: MOV (SP)+,R3
237 001022 012602 MOV (SP)+,R2
238 001024 010001 MOV R0,R1
239 001026 162601 SUB (SP)+,R1
240 001030 105010 CLRB @R0
241 001032 RETURN
HDRMG M0114, FILE HEADER TO ASC MACRO M1108 05-DEC-77 22:45 PAGE 9
**** HDRMG VERSION M0114 ****
243 ;+
244 ; FILL IN FIELD WITH BLANKS
245 ; CALLING SEQUENCE:
246 ; CALL HDFILL
247 ; INPUTS
248 ; R0=STRING ADDRESS
249 ; R1=BYTES USED IN THIS FIELD
250 ; R5=POINTS TO BYTE WHICH IS NO. OF SPACES TO USE IN THE FIELD
251 ; OUTPUTS:
252 ; R0=UPDATED STRING POINTER
253 ; R5=POINTS AT NEXT BYTE IN FIELD DEFINITION TABLE
254 ; R1 ALTERED
255 ; R2-R4 PRESERVED
256 ;-
257 001034 010146 HDFILL::MOV R1,-(SP)
258 001036 112501 MOVB (R5)+,R1
259 001040 162601 SUB (SP)+,R1
260 001042 003404 BLE 20$
261 001044 112720 000040 10$: MOVB #' ,(R0)+
262 001050 SOB R1,10$
263 001054 20$: RETURN
264 ;
265 ; CONVERT FILE-11 DATE AND TIME FORMAT TO STRING
266 ; INPUTS
267 ; R0=STRING ADDRES
268 ; R1=DATE STRING ADDRESS
269 ; OUTPUTS
270 ; R0 UPDATE
271 ; R1=NO. OF BYTES
272 001056 010046 DATIM: MOV R0,-(SP)
273 001060 105711 TSTB @R1
274 001062 001423 BEQ 20$
275 001064 112120 MOVB (R1)+,(R0)+ ;DATE DD
276 001066 112120 MOVB (R1)+,(R0)+
277 001070 112720 000055 MOVB #'-,(R0)+
278 001074 112120 MOVB (R1)+,(R0)+ ;MONTH MMM
279 001076 112120 MOVB (R1)+,(R0)+
280 001100 112120 MOVB (R1)+,(R0)+
281 001102 112720 000055 MOVB #'-,(R0)+
282 001106 112120 MOVB (R1)+,(R0)+ ;YEAR YY
283 001110 112120 MOVB (R1)+,(R0)+
284 001112 112720 000040 MOVB #' ,(R0)+
285 001116 112120 MOVB (R1)+,(R0)+ ;HOURS HH
286 001120 112120 MOVB (R1)+,(R0)+
287 001122 112720 000072 MOVB #':,(R0)+
288 001126 112120 MOVB (R1)+,(R0)+ ;MINUTES MM
289 001130 112120 MOVB (R1)+,(R0)+
290 001132 010001 20$: MOV R0,R1
291 001134 162601 SUB (SP)+,R1
292 001136 RETURN
293 ; CONVERT DOUBLE PRECISION BINARY TO MAGNITIDE DECIMAL
294 ; INPUTS
295 ; R0=STRING ADDRESS
296 ; R1=ADDRESS OF DOUBLE PRECISION NUMBER
297 ; R2=R2 PARAM TO CBDMG
298 ; OUTPUTS
299 ; R0=UPDATED STRING
HDRMG M0114, FILE HEADER TO ASC MACRO M1108 05-DEC-77 22:45 PAGE 9-1
**** HDRMG VERSION M0114 ****
300 ; R1=SIZE
301 ; R2 ALTERED, R3-R5 PRESERVED
302 001140 010046 CDDMG: MOV R0,-(SP)
303 001142 CALL $CDDMG
304 001146 112720 000056 MOVB #'.,(R0)+
305 001152 010001 MOV R0,R1
306 001154 162601 SUB (SP)+,R1
307 001156 RETURN
308 ;
309 000000 .CSECT
310 ;
311 ; HEADER CONVERSION STRINGS
312 000000 MSGZ HD01,<%X>
313 000000 MSGZ HD02,<(%P,%P)>
314 000000 MSGZ HD03,<[%O,%O]>
315 000000 MSGZ HD04,<(%D.)>
316 ;
317 ;
318 ;
319 000001 .END
HDRMG M0114, FILE HEADER TO ASC MACRO M1108 05-DEC-77 22:45 PAGE 9-2
SYMBOL TABLE
CDDMG 001140R 003 F.FNAM= 000110 F.VBSZ= 000060 HH.FNU= ****** GX N.STAT= 000020
DATIM 001056R 003 F.FNB = 000102 HDFILL 001034RG 003 HH.FP = ****** GX N.UNIT= 000034
F.ALOC= 000040 F.FTYP= 000116 HDFNAM= 000001 HH.FSQ= ****** GX R$$DPB= 000001
F.BBFS= 000062 F.FVER= 000120 HDLONG= 000002 HH.GC = ****** GX R$$DYM= 000001
F.BDB = 000070 F.HIBK= 000004 HDRMG 000000RG 003 HH.IDO= ****** GX R$$EIS= 000000
F.BGBC= 000057 F.LUN = 000042 HDRMGX 001020R 003 HH.PC = ****** GX R$$MSG= 000000
F.BKDN= 000026 F.MBCT= 000054 HDRMG1 000430R 003 HH.UAT= ****** GX R$$11M= 000001
F.BKDS= 000020 F.MBC1= 000055 HDRTB1 000000RG 002 HI.CDT= ****** GX S.FATT= 000016
F.BKEF= 000050 F.MBFG= 000056 HDRTB2 000003R 002 HI.EXP= ****** GX S.FDB = 000140
F.BKP1= 000051 F.NRBD= 000024 HD01MG= 000000R 004 HI.NAM= ****** GX S.FNAM= 000006
F.BKST= 000024 F.NREC= 000030 HD01SZ= 000003 HI.RDT= ****** GX S.FNB = 000036
F.BKVB= 000064 F.OVBS= 000030 HD02MG= 000003R 004 HI.REV= ****** GX S.FNBW= 000017
F.CNTG= 000034 F.RACC= 000016 HD02SZ= 000010 HS.CON= ****** GX S.FNTY= 000004
F.DFNB= 000046 F.RATT= 000001 HD03MG= 000013R 004 HS.PHL= ****** GX S.FTYP= 000002
F.DSPT= 000044 F.RCNM= 000034 HD03SZ= 000010 N.DID = 000024 S.NFEN= 000020
F.DVNM= 000134 F.RCTL= 000017 HD04MG= 000023R 004 N.DVNM= 000032 $CBOMG= ****** GX
F.EFBK= 000010 F.RSIZ= 000002 HD04SZ= 000006 N.FID = 000000 $CDDMG= ****** GX
F.EFN = 000050 F.RTYP= 000000 HF.DEL= ****** GX N.FNAM= 000006 $EDMSG= ****** GX
F.EOBB= 000032 F.STBK= 000036 HF.EXT= ****** GX N.FTYP= 000014 $SAVRG= ****** GX
F.ERR = 000052 F.UNIT= 000136 HF.RDV= ****** GX N.FVER= 000016 $$ = 000067
F.FACC= 000043 F.URBD= 000020 HF.WRV= ****** GX N.NEXT= 000022 ...TPC= 000140
F.FFBY= 000014 F.VBN = 000064 HH.CHU= ****** GX
. ABS. 000000 000
000000 001
PURE$D 000014 002
PURE$I 001160 003
MSGSTR 000031 004
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 3865 WORDS ( 16 PAGES)
DYNAMIC MEMORY: 5216 WORDS ( 20 PAGES)
ELAPSED TIME: 00:00:29
[43,10]HDRMG,[43,20]HDRMG/-SP=[43,30]PIPMAC,HDRMG
HDRSYM - FILES 11 HEADER SYMBOL MACRO M1108 05-DEC-77 22:46 PAGE 7
1 .TITLE HDRSYM - FILES 11 HEADER SYMBOLLIC OFFSETS
2 .IDENT /01/
3 ; ALTERED TUESDAY 18-SEP-73 12:55
4 ; LAST ALTERED BY P. H. LIPMAN FROM RSX V002A DEFINITION
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
22 ;HEADER AREA, OFFSETS TO THE START OF THE HEADER
23
24 000000 HH.IDO ==0 ;1B-IDENT AREA OFFSET, IN WORDS
25 000001 HH.MAP ==1 ;1B-BLOCK MAP AREA OFFSET, IN WORDS
26 000002 HH.FNU ==2 ;1W-FILE NUMBER OF THIS FILE
27 000004 HH.FSQ ==4 ;1W-FILE SEQUENCE NUMBER OF THIS FILE
28 000006 HH.LEV ==6 ;1W-STRUCTURE LEVEL AND SYSTEM NUMBER
29 000010 HH.UI ==10 ;1W-FILE OWNER'S "UIC"
30 000010 HH.PC ==HH.UI+0 ;1B-PROGRAMMER CODE
31 000011 HH.GC ==HH.UI+1 ;1B-GROUP CODE
32 000012 HH.FP ==12 ;1W-FILE PROTECTION CODE
33 000001 HF.RDV ==01 ;READ ACCESS ALLOWED
34 000002 HF.WRV ==02 ;WRITE ACCESS ALLOWED
35 000004 HF.EXT ==04 ;EXTEND ALLOWED
36 000010 HF.DEL ==10 ;DELETE ALLOWED
37 000001 HF.RAT ==01 ;READ ATTRIBUTES (SAME AS READ ACCESS)
38 000014 HH.CH ==14 ;1W-FILE CHARACTERISTICS CODE
39 000014 HH.CHU ==HH.CH+0 ;1B-USER CONTROLLED CHARACTERISTICS
40 000200 HS.CON ==200 ;FILE IS LOGICALLY CONTIGUOUS
41 000100 HS.PHL ==100 ;RECORD I/O ATTRIBUTES REQUIRED FOR CLOSE
42 000040 HS.TMP ==040 ;TEMPORARY UN-NAMED FILE
43 000015 HH.CHS ==HH.CH+1 ;1B-SYSTEM CONTROLLED CHARACTERISTICS
44 000200 HS.MDL ==200 ;FILE IS MARKED FOR DELETE
45 000100 HS.BAD ==100 ;BAD DATA BLOCK IN THE FILE
46 000016 HH.UAT ==16 ;20W-USER CONTROLLED ATTRIBUTE BLOCK, RECORD I/O
47 000040 HH.UAL ==40 ;COUNT OF BYTES IN ATTRIBUTE BLOCK
48
49 ;IDENTIFICATION AREA, OFFSETS TO START OF IDENT AREA
50
51 000000 HI.NAM ==0 ;3W-FILE NAME. NINE RADIX-50 CHARACTERS
52 000002 HI.NA2 ==2 ; LEFT JUSTIFIED AND
53 000004 HI.NA3 ==4 ; FILLED WITH BLANKS
54 000006 HI.TYP ==6 ;1W-FILE TYPE, THREE RADIX-50 CHARACTERS
55 000010 HI.VER ==10 ;1W-FILE VERSION NUMBER, BINARY
56 000012 HI.REV ==12 ;1W-FILE REVISION NUMBER, BINARY
57 000014 HI.RDT ==14 ;7B-REVISION DATE, ASCII "DDMMMYY"
HDRSYM - FILES 11 HEADER SYMBOL MACRO M1108 05-DEC-77 22:46 PAGE 7-1
58 000023 HI.RTM ==23 ;6B-REVISION 24HR TIME, ASCII "HHMMSS"
59 000031 HI.CDT ==31 ;7B-CREATION DATE
60 000040 HI.CTM ==40 ;6B-CREATION TIME
61 000046 HI.EXP ==46 ;7B-EXPIRATION DATE OF THE FILE
62 000007 HI.DAT ==7 ;DATES ARE SEVEN BYTES
63 000006 HI.TIM ==6 ;TIMES ARE SIX BYTES
64 ;
65 ;MAP AREA, OFFSETS TO START OF THE BLOCK MAP AREA
66
67 000000 HM.ESQ ==0 ;1B-FILE EXTENSION SEQUENCE NUMBER
68 000001 HM.RVN ==1 ;1B-RELATIVE VOLUME CONTAINING EXTENSION FILE
69 000002 HM.EFN ==2 ;1W-EXTENSION FILE NUMBER
70 000004 HM.ESN ==4 ;1W-EXTENSION FILE SEQUENCE NUMBER
71 000006 HM.CN ==6 ;1B-BLOCK COUNT FIELD SIZE FIELD
72 000007 HM.BN ==7 ;1B-BLOCK NUMBER FIELD SIZE FIELD
73 000010 HM.USE ==10 ;1B-WORDS IN USE IN THE MAP
74 000011 HM.MAX ==11 ;1B-TOTAL WORDS AVAILABLE FOR MAP
75 000012 HM.PNT ==12 ;FILE BLOCK POINTER REGION START
76
77 ;FORMATS FOR HM.CN,HM.BN:
78
79 ;C,N == 1,3 .BYTE HIGH ORDER 8 BITS OF BLOCK #
80 ; .BYTE COUNT
81 ; .WORD LOW ORDER 16 BITS OF BLOCK #
82
83 ;C,N == 2,2 .WORD COUNT
84 ; .WORD BLOCK #
85
86 ;C,N == 2,4 .WORD COUNT
87 ; .WORD HIGH ORDER PART OF BLOCK #
88 ; .WORD LOW ORDER PART OF BLOCK #
89
90 ;CHECKSUM AREA, OFFSET TO THE START OF THE HEADER
91
92 000776 HD.SUM ==776 ;1W-CHECKSUM SLOT
93 ;
94 ;
95 000001 .END
HDRSYM - FILES 11 HEADER SYMBOL MACRO M1108 05-DEC-77 22:46 PAGE 7-2
SYMBOL TABLE
HD.SUM= 000776 G HH.FSQ= 000004 G HI.CTM= 000040 G HI.TYP= 000006 G HM.USE= 000010 G
HF.DEL= 000010 G HH.GC = 000011 G HI.DAT= 000007 G HI.VER= 000010 G HS.BAD= 000100 G
HF.EXT= 000004 G HH.IDO= 000000 G HI.EXP= 000046 G HM.BN = 000007 G HS.CON= 000200 G
HF.RAT= 000001 G HH.LEV= 000006 G HI.NAM= 000000 G HM.CN = 000006 G HS.MDL= 000200 G
HF.RDV= 000001 G HH.MAP= 000001 G HI.NA2= 000002 G HM.EFN= 000002 G HS.PHL= 000100 G
HF.WRV= 000002 G HH.PC = 000010 G HI.NA3= 000004 G HM.ESN= 000004 G HS.TMP= 000040 G
HH.CH = 000014 G HH.UAL= 000040 G HI.RDT= 000014 G HM.ESQ= 000000 G R$$DPB= 000001
HH.CHS= 000015 G HH.UAT= 000016 G HI.REV= 000012 G HM.MAX= 000011 G R$$DYM= 000001
HH.CHU= 000014 G HH.UI = 000010 G HI.RTM= 000023 G HM.PNT= 000012 G R$$EIS= 000000
HH.FNU= 000002 G HI.CDT= 000031 G HI.TIM= 000006 G HM.RVN= 000001 G R$$11M= 000001
HH.FP = 000012 G
. ABS. 000000 000
000000 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 2632 WORDS ( 11 PAGES)
DYNAMIC MEMORY: 3104 WORDS ( 11 PAGES)
ELAPSED TIME: 00:00:11
[43,10]HDRSYM,[43,20]HDRSYM/-SP=[43,30]PIPMAC,HDRSYM
IOCSI M0201, INVOKE CSI$2 MACRO M1108 05-DEC-77 22:46
TABLE OF CONTENTS
7- 1 **** IOCSI VERSION M0201 ****
IOCSI M0201, INVOKE CSI$2 MACRO M1108 05-DEC-77 22:46 PAGE 7
1 .TITLE IOCSI M0201, INVOKE CSI$2
.SBTTL **** IOCSI VERSION M0201 ****
.IDENT /M0201/
2 ; ALTERED TUESDAY 19-JUNE-73 11:10
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 7-MAY-73
20 ;
21 .MCALL CALL,RETURN,CSI$,CSI$2
22 ;
23 000000 CSI$
24 000000 FLDSOF ;DEFINE THE CSI FILE DESCRIPTOR OFFSETS
25 ;
26 000040 CS.SWF==40 ;CSI STATUS FLAG, SWITCHES FOUND
27 ;
28 000000 IMPURE
29 000000 FILID:: .BLKW 3
30 ;
31 000006 PURE.I
32 ;+
33 ; GET THE NEXT INPUT OR OUTPUT SPECIFIER FROM THE COMMAND STRING
34 ; CALLING SEQUENCE:
35 ; JSR PC,OUTCSI ;GET NEXT OUTPUT SPEC
36 ; JSR PC,INCSI ;GET NEXT INPUT SPEC
37 ; INPUTS:
38 ; R1=ADDRESS OF 5 WORD BLOCK TO PUT FILE AND DEVICE
39 ; DESIGNATORS AND FLAGS WORD (WORD 5)
40 ; OUTPUTS:
41 ; C=0 FOR SUCCESS, C=1 FOR FAILURE OF CSI$2
42 ; ALL REGISTERS PRESERVED
43 ; OPERATION:
44 ; CALLS CSI$2 AND MOVES THE FILE AND DEVICE DESIGNATOR TO THE
45 ; BLOCK SPECIFIED IN R1 AND THEN MOVES THE FLAGS BYTE TO THE 5TH
46 ; WORD. AN ADDITIONAL FLAG IS DEFINED AND PUT IN THE FLAGS WORD.
47 ; IT IS THE SWITCH PRESENT FLAG (CS.SWF). A NULL SPECIFIER IS
48 ; ONE WHICH HAS NO FILE NAME, NO DEVICE NAME, AND NO SWITCHES
49 ;
50 ;-
51 000000 012746 000002 OUTCSI::MOV #CS.OUT,-(SP)
52 000004 000402 BR IOCSI
53 000006 012746 000001 INCSI:: MOV #CS.INP,-(SP)
54 000012 112667 000000G IOCSI: MOVB (SP)+,CSIBLK+C.TYPR
55 000016 010046 MOV R0,-(SP)
IOCSI M0201, INVOKE CSI$2 MACRO M1108 05-DEC-77 22:46 PAGE 7-1
**** IOCSI VERSION M0201 ****
56 000020 005067 000000' CLR FILID
57 000024 005067 000002' CLR FILID+2
58 000030 005067 000004' CLR FILID+4
59 000034 CSI$2 #CSIBLK,,#CSISWT
60 000052 103445 BCS 10$ ;ERROR IF BAD SWITCHES
61 000054 116061 000001 000014 MOVB C.STAT(R0),N.SPEC(R1)
62 000062 005760 000024 TST C.MKW1(R0) ;ANY SWITCHES?
63 000066 001403 BEQ 5$
64 000070 152761 000040 000014 BISB #CS.SWF,N.SPEC(R1) ;NOTE THAT SWITCHES WERE FOUND
65 000076 016061 000016 000010 5$: MOV C.FILD(R0),N.FNMD(R1)
66 000104 016061 000020 000012 MOV C.FILD+2(R0),N.FNMD+2(R1)
67 000112 016061 000012 000004 MOV C.DIRD(R0),N.DIRD(R1)
68 000120 016061 000014 000006 MOV C.DIRD+2(R0),N.DIRD+2(R1)
69 000126 016061 000006 000000 MOV C.DEVD(R0),N.DEVD(R1)
70 000134 016061 000010 000002 MOV C.DEVD+2(R0),N.DEVD+2(R1)
71 000142 016761 000000' 000016 MOV FILID,N.FLID(R1) ;MOVE FILE ID
72 000150 016761 000002' 000020 MOV FILID+2,N.FLID+2(R1)
73 000156 016761 000004' 000022 MOV FILID+4,N.FLID+4(R1)
74 000164 000241 CLC
75 000166 012600 10$: MOV (SP)+,R0
76 000170 RETURN
77 ;
78 ;
79 000001 .END
IOCSI M0201, INVOKE CSI$2 MACRO M1108 05-DEC-77 22:46 PAGE 7-2
SYMBOL TABLE
CSIBLK= ****** GX CS.OUT= 000002 C.MKW1= 000024 IOCSI 000012R 003 R$$DPB= 000001
CSISWT= ****** GX CS.SWF= 000040 G C.MKW2= 000026 N.DEVD= 000000 R$$DYM= 000001
CS.DIF= 000002 CS.WLD= 000010 C.SIZE= 000054 N.DIRD= 000004 R$$EIS= 000000
CS.DVF= 000004 C.CMLD= 000002 C.STAT= 000001 N.FLID= 000016 R$$11M= 000001
CS.EQU= 000040 C.DEVD= 000006 C.SWAD= 000022 N.FNMD= 000010 S.APPD= 000010
CS.INP= 000001 C.DIRD= 000012 C.TYPR= 000000 N.SPEC= 000014 S.FIDS= 000014
CS.MOR= 000020 C.DSDS= 000006 FILID 000000RG 002 OUTCSI 000000RG 003 .CSI2 = ****** G
CS.NMF= 000001 C.FILD= 000016 INCSI 000006RG 003 PAR$$$= 000027
. ABS. 000000 000
000000 001
IMPURE 000006 002
PURE$I 000172 003
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 3005 WORDS ( 12 PAGES)
DYNAMIC MEMORY: 4160 WORDS ( 16 PAGES)
ELAPSED TIME: 00:00:14
[43,10]IOCSI,[43,20]IOCSI/-SP=[43,30]PIPMAC,IOCSI
MVSTRG M0001, MOVE A STRING MACRO M1108 05-DEC-77 22:46
TABLE OF CONTENTS
7- 1 **** MVSTRG VERSION M0001 ****
MVSTRG M0001, MOVE A STRING MACRO M1108 05-DEC-77 22:46 PAGE 7
1 .TITLE MVSTRG M0001, MOVE A STRING
.SBTTL **** MVSTRG VERSION M0001 ****
.IDENT /M0001/
2 ;
3 ; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
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 10-MAY-74
19
20
21 .MCALL RETURN
22
23 ;+
24 ; MOVE STRING TO RECORD BUFFER
25 ; CALLING SEQUENCE:
26 ;
27 ; JSR PC,MVSTRG
28 ;
29 ; INPUTS:
30 ;
31 ; R1=ADDRESS TO MOVE STRING TO
32 ; R2=SIZE OF STRING TO MOVE
33 ; R3=ADDRESS OF SOURCE STRING
34 ;
35 ; OUTPUTS:
36 ;
37 ; R1 UPDATED
38 ; R2,R3 ALTERED
39 ; R0,R4,R5 PRESERVED
40 ;-
41 000000 005702 MVSTRG::TST R2
42 000002 001403 BEQ 20$ ;BRANCH IF NULL STRING
43 000004 112321 10$: MOVB (R3)+,(R1)+ ;
44 000006 SOB R2,10$
45 000012 20$: RETURN
46 ;
47 ;
48 000001 .END
MVSTRG M0001, MOVE A STRING MACRO M1108 05-DEC-77 22:46 PAGE 7-1
SYMBOL TABLE
MVSTRG 000000RG R$$DPB= 000001 R$$DYM= 000001 R$$EIS= 000000 R$$11M= 000001
. ABS. 000000 000
000014 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 2439 WORDS ( 10 PAGES)
DYNAMIC MEMORY: 3104 WORDS ( 11 PAGES)
ELAPSED TIME: 00:00:11
[43,10]MVSTRG,[43,20]MVSTRG/-SP=[43,30]PIPMAC,MVSTRG
PIP M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32
TABLE OF CONTENTS
7- 1 **** PIP VERSION M1321 ****
8- 45 ASSEMBLY PARAMETERS
9- 89 READ/WRITE DATA AND WORKING STORAGE
10- 185 READ ONLY TABLES
PIP M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32 PAGE 7
1 .TITLE PIP M1321, RSX FILE UTILITY
.SBTTL **** PIP VERSION M1321 ****
.IDENT /M1321/
2 ; ALTERED:
3 ; ANDREW C. GOLDSTEIN 17 JUL 75 16:35
4 ;
5 ; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
6 ; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
7
8 ; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
9 ; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
10 ; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
11 ; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
12
13 ; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
14 ; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
15 ; EQUIPMENT CORPORATION.
16
17 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
18 ; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
19 ;
20 ; PETER H. LIPMAN 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 M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32 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 000004 CNTGBT==4 ;SET TO FORCE CONTIGUOUS OUTPUT FILE
66 000010 MFDBIT==10 ;OPERATE ON THE MFD
67 ; ***** THE FOLLOWING FOUR VALUES MUST REMAIN IN THEIR CURRENT ORDER
68 000020 WOPROB==20 ;WORLD PROTECTION SPECIFIED
69 000040 GRPROB==40 ;GROUP PROTECTION SPECIFIED
70 000100 OWPROB==100 ;OWNER PROTECTION SPECIFED
71 000200 SYPROB==200 ;SYSTEM PROTECTION SPECIFIED
72 ; ***** THE PRECEEDING FOUR VALUES MUST REMAIN IN THEIR CURRENT ORDER
73 001000 FIDBIT==1000 ;FILE ID MANUALLY SPECIFIED
74 002000 BLKBIT==2000 ;SIZE OF OUTPUT FILE SPECIFIED TO COPY
75 004000 NTCNTG==4000 ;NOT CONTIGUOUS CONTROL BIT (COPY)
76 010000 NVERBT==10000 ;SET IF NOT PRESERVING VERSION ON COPY
77 020000 SPSDBT==20000 ;SET IF SUPERSEDE FILE ON COPY
78 040000 FOWNBT==40000 ;SET TO FORCE FILE OWNER TO OUTPUT UIC
79 100000 FRSTIM==100000 ;FIRST TIME THROUGH A GIVEN OPERATION
80 ;
81 ; DEFINITIONS OF OFFSETS USED IN FILE HEADER
82 001001 HA.UI==2*400+1 ;WRITE USER ATTRIBUTES
83 001002 HA.FP==2*400+2 ;SET FILE PROTECTION ATTRIBUTE CODE
84 000403 HA.CHU==1*400+3 ;SET FILE CHARACTERISTICS ATTRIBUTE CODE
85 ;FOR WRITING THE USER CHARACTERISTICS
86 000012 S.STBK==10. ;SIZE OF STATISTICS BLOCK IN BYTES
87 004000 ILCLSW==NTCNTG ;INIT LOCAL SWITCHES TO THIS
PIP M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32 PAGE 9
READ/WRITE DATA AND WORKING STORAGE
89 .SBTTL READ/WRITE DATA AND WORKING STORAGE
90 000000 .PSECT
91 000000 FSRSZ$ 0 ;FILE STORAGE REGION IS DYNAMICALLY SET UP
92 ;GET CMD LINE NOW CLOSES FILE EACH TIME
93 000000 IMPURE
94 ;
95 ;
96 000000 FDBOUT::FDBDF$ ;ALLOCATE SPACE FOR THE OUTPUT FDB
97 000140 FDOP$A OUTLUN,OFNPT ;LUN, FNPT
98
99 000140 FDBIN:: FDBDF$
100 000300 FDRC$A FD.PLC ;PARTIAL LOCATE MODE
101 000300 FDOP$A INLUN,IFNPT ;LUN, FNPT
102
103 000300 STBLK:: .BLKB S.STBK
104 000312 IOSTBK::.BLKW 2 ;I/O STATUS BLOCK FOR READ/WRITE MD COPY
105 000316 FNASTS::.BLKW 2 ;I/O STATUS BLOCK FOR FIND QI/O (/LI)
106 ;
107 ; ***** DO NOT SEPARATE THE FOLLOWING LINES
108 ;
109 000322 CODEV:: .BLKW 1 ;SAVED CMD OUTPUT DEVICE NAME
110 000324 COUNIT::.BLKW 1 ;CMD OUTPUT UNIT
111 000326 LINBUF::.BLKB 144. ;LINE BUFFER USED BY DIR LIST
112 ;UP TO 2 TTY LINES LONG
113 000220 LINBFS==.-LINBUF
114 ;
115 ; ***** DO NOT SEPARATE THE PRECEEDING LINES
116 ;
117
118 ; ***** DO NOT SEPARATE THE FOLLOWING LINES
119 000546 IFNPT:: .BLKB S.FIDS+S.APPD ;INPUT FILE AND DEVICE DESIGNATORS
120 000562' INSPEC==IFNPT+N.SPEC
121 000572 IWUIC:: .BLKB S.WUIC ;SCRATCH STORAGE FOR WILD UIC LOGIC
122 000646 OFNPT:: .BLKB S.FIDS+S.APPD ;OUTPUT FILE AND DEVICE DESIGNATORS
123 000662' OUSPEC==OFNPT+N.SPEC
124 000672 OWUIC:: .BLKB S.WUIC
125 ; ***** DO NOT SEPARATE THE PRECEEDING LINES
126
127 000746 SYDFLT::NMBLK$ ;DEFAULT DEVICE = SYSTEM DEVICE
128 001004 NAMBLK::NMBLK$ ;SCRATCH NAME BLOCK
129 001042 NMBLK1::NMBLK$
130 ;
131 001100 GCMLCB::GCMLB$ 4,PIP ;CONTROL BLOCK FOR GET COMMAND LINE
132 ;UP TO 4 LEVELS OF INDIRECTION
133 001566 CSIBLK::.BLKB C.SIZE ;CONTROL BLK FOR CMD STRING INTERPRETER
134 ;
135 ; OTHER SCRATCH LOCATIONS
136 001642 CMDWRD::.BLKW 2 ;COMMAND BITS ARE HERE
137 001646 CPYCTL::.BLKW 1 ;CONTROLLING BITS ARE HERE
138 001650 SAVSP:: .BLKW 1 ;SAVE THE STACK POINTER
139 001652 VERSAV::.BLKW 1 ;SAVE VERSION NUMBER FROM PARSE
140 001654 INRACC::.BLKW 1 ;F.RACC FOR THE INPUT FDB
141 001656 OURACC::.BLKW 1 ;F.RACC FOR THE OUTPUT FDB
142 001660 DEFDIR::.BLKB DFDRSZ ;DEFAULT DIRECTORY STRING STORED HERE
143 .EVEN
144 ;
145 ; ***** DO NOT SEPARATE OR REORDER THE FOLLOWING
PIP M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32 PAGE 9-1
READ/WRITE DATA AND WORKING STORAGE
146 001672 WORPRO::.BLKB 4
147 001676 GROPRO::.BLKB 4
148 001702 OWNPRO::.BLKB 4
149 001706 SYSPRO::.BLKB 4
150 001712 177777 PROWRD::.WORD -1
151 ; ***** DO NOT SEPARATE OR REORDER THE PRECEEDING LINES
152 ;
153 001714 000001 PURGCT::.WORD 1 ;NO. OF VERSIONS TO PRESERVE
154 001716 000120 LPTLEN::.WORD 80. ;DEFAULT DIRECTORY LISTING WIDTH
155 001720 BLKCNT::.BLKW 1 ;NO. OF BLOCKS TO ALLOCATE TO OUT FILE
156 001722 .LCLSW::.BLKW 1 ;INITIAL VALUE FOR LOCAL SWITCHES
157 001724 .OULCL::.BLKW 1 ;LOCAL SWITCHES ON 1ST OUTPUT SPEC
158 001726 054523 .DEFDV::.WORD SYDEV ;DEFAULT DEVICE
159 001730 000000 .DEFUN::.WORD SYUNIT ;DEFAULT UNIT
160 001732 .EXTSZ::.BLKW 1 ;SIZE OF INPUT FILE (+ CONTIG, - = NOT)
161 001734 .FOWNR::.BLKW 1 ;UIC FOR THE FILE OWNER IF /FO SWITCH
162 001736 000000 000000 .DYBLK::.LIMIT ;BLOCKS OF DYNAMIC MEMORY AVAILABLE
163 001740' .TOPAD==.DYBLK+2 ;ADDRESS OF DYNAMIC MEMORY BUFFER(S)
164 001742 .DYSIZ::.BLKW 1 ;SIZE IN BYTES OF DYNAMIC MEMORY REGION
165 001744 .DYBUF::.BLKW 1 ;ADDRESS OF DYNAMIC BUFFER IN USE
166 001746 .DYBYT::.BLKW 1 ;SIZE IN BYTES OF DYNAMIC BUFFER IN USE
167 ;
168 ; READ ATTRIBUTE CONTROL BLOCK
169 ;
170 .IF GT,R$$DPB ;IF NEW DPB FORMATS
171 001750 367 012 RATCTL::.BYTE -9.,S.STBK ;READ ATTRIBUTES - STATISTICS BLOCK
172 001752 000300' .WORD STBLK
173 001754 366 000 .BYTE -10.,0 ;FILE HEADER
174 001756 000000 .HDRAD::.WORD 0
175 001760 000000 .WORD 0 ;END OF ATTRIBUTE LIST
176 .ENDC
177
178 .IF EQ,R$$DYM ;IF NO DYNAMIC MEMORY FACILITY
179 .PSECT $$DYB1,D
180 DYB1::
181 .PSECT $$DYB2,D
182 DYB2::
183 .ENDC
PIP M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32 PAGE 10
READ ONLY TABLES
185 .SBTTL READ ONLY TABLES
186 001762 PURE.D
187 ;
188 ; READ ONLY TABLES AND CONTROL BLOCKS
189 ; COMMAND TABLE - FORMAT COMMAND,BIT
190 000001 BITVAL=1
191 000036 CMDTBL::
192 000036 CMDBIT DIRLST,LSTBIT ;ON IF LISTING DIRECTORY
193 000040 CMDBIT DIRLST,SHTLST ;ON IF LISTING DIRECTORY BRIEF MODE
194 000042 CMDBIT DIRLST,EVRYBT ;ON IF LISTING DIRECTORY FULL MODE
195 000044 CMDBIT DIRLST,TOTLBT ;ON IF LISTING DIRECTORY TOTAL BLOCKS ONLY
196 000046 CMDBIT DELETE,DELBIT ;ON IF DELETING THE OUTPUT FILE(S)
197 000050 CMDBIT DELETE,PURGBT ;ON IF PURGING FILES
198 000052 CMDBIT REMOVE,RMVBIT ;REMOVE A DIRECTORY ENTRY
199 000054 CMDBIT PIPID,IDBIT ;TYPE THE PIP IDENTIFIER
200 000056 CMDBIT .SETDF,DFLTBT ;CHANGE DEFAULT DEVICE OR UIC
201 000060 CMDBIT UNLOCK,UNLKBT ;UNLOCK A LOCKED FILE
202 000062 CMDBIT PROTCT,PROTBT ;SET FILE PROTECTION
203 ;
204 ; TABLE FOR COMMAND BITS IN SECOND WORD
205 ;
206 000001 BITVAL=1
207 000064 CMDTB2::
208 000064 CMDBIT SPOOL,SPLBIT ;SPOOL FOR PRINTING AND DELETE
209 000066 CMDBIT RENAME,RNMBIT ;RENAME INPUT FILE TO OUTPUT NAME
210 000070 CMDBIT ENTER,ENTRBT ;ENTER A DIRECTORY ENTRY
211 000072 CMDBIT COPY,MERGBT ;MERGE COMMAND
212 000074 CMDBIT COPY,APPDBT ;APPEND FILES
213 000076 CMDBIT COPY,UPDTBT ;UPDATE (REWRITE) FILE
214 000100 CMDBIT .FREE,FREEBT ;PRINT FREE SPACE ON VOLUME
215 ;
216 ; COMMAND STRING INTERPRETER SWITCH TABLE
217 000102 CSISWT::CSI$SW DI,LSTBIT,CMDWRD,SET,,0 ;DIRECTORY LISTING SWITCH
218 000112 CSI$SW LI,LSTBIT,CMDWRD,SET,,0 ;SYNONYM FOR DIR LISTING CMD
219 000122 CSI$SW BR,SHTLST,CMDWRD,SET,,0 ;SHORT FORM DIRECTORY LISTING
220 000132 CSI$SW FU,EVRYBT,CMDWRD,SET,,FULVAL ;FULL DIRECTORY LISTING
221 000142 CSI$SW TB,TOTLBT,CMDWRD,SET,,0 ;LIST DIRECTORY TOTALS ONLY
222 000152 CSI$SW DE,DELBIT,CMDWRD,SET,,0 ;DELETE SWITCH
223 000162 CSI$SW PU,PURGBT,CMDWRD,SET,,PURGVL ;PURGE ALL BUT NEWEST VERSION
224 000172 CSI$SW RM,RMVBIT,CMDWRD,SET,,0 ;REMOVE A DIRECTORY ENTRY
225 000202 CSI$SW ID,IDBIT,CMDWRD,SET,,0 ;ID SWITCH - TYPE PIP'S IDENT
226 000212 CSI$SW DF,DFLTBT,CMDWRD,SET,,0 ;SET DEFAULT DEVICE OR UIC
227 000222 CSI$SW UI,DFLTBT,CMDWRD,SET,,0 ;SET DEFAULT UIC
228 000232 CSI$SW UN,UNLKBT,CMDWRD,SET,,0 ;UNLOCK A LOCKED FILE
229 000242 CSI$SW PR,PROTBT,CMDWRD,SET,,PRVAL ;SET FILE PROTECTION
230 000252 CSI$SW SP,SPLBIT,CMDWRD+2,SET,,0 ;SPOOL THE FILES FOR PRINTING
231 000262 CSI$SW RE,RNMBIT,CMDWRD+2,SET,,0 ;RENAME SWITCH
232 000272 CSI$SW EN,ENTRBT,CMDWRD+2,SET,,0 ;ENTER A DIRECTORY ENTRY
233 000302 CSI$SW ME,MERGBT,CMDWRD+2,SET,,0 ;MERGE INPUT FILES
234 000312 CSI$SW AP,APPDBT,CMDWRD+2,SET,,0 ;APPEND COMMAND
235 000322 CSI$SW UP,UPDTBT,CMDWRD+2,SET,,0 ;UPDATE (REWRITE) CMD
236 000332 CSI$SW FR,FREEBT,CMDWRD+2,SET,,0 ;FREE SPACE ON VOLUME
237 ;
238 ; CPYCTL SWITCHES, MODIFY COMMANDS, LOCAL TO THE SPECIFIER
239 000342 CSI$SW CO,CNTGBT!NTCNTG,CPYCTL,SET,NEG,0 ;FORCE CONTIGUOUS COPY
240 000352 CSI$SW MF,MFDBIT,CPYCTL,SET,,0 ;LIST THE MFD FOR SPECIFIED DEVICE
241 000362 CSI$SW WO,WOPROB,CPYCTL,SET,,WOVAL ;WORLD PROTECTION
PIP M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32 PAGE 10-1
READ ONLY TABLES
242 000372 CSI$SW GR,GRPROB,CPYCTL,SET,,GRVAL ;GROUP PROTECTION
243 000402 CSI$SW OW,OWPROB,CPYCTL,SET,,OWVAL ;OWNER PROTECTION
244 000412 CSI$SW SY,SYPROB,CPYCTL,SET,,SYVAL ;SYSTEM PROTECTION
245 000422 CSI$SW FI,FIDBIT,CPYCTL,SET,,FIDVAL ;FILE ID SPECIFIED
246 000432 CSI$SW BL,BLKBIT,CPYCTL,SET,,BLKVAL ;NO OF BLOCKS TO ALLOCATE
247 000442 CSI$SW NV,NVERBT,CPYCTL,SET,,0 ;COPY TO NEW VERSION
248 000452 CSI$SW SU,SPSDBT,CPYCTL,SET,,0 ;SUPERSEDE EXISTING FILES ON COPY
249 000462 CSI$SW FO,FOWNBT,CPYCTL,SET,,0 ;FORCE FILE OWNER TO OUTPUT UIC
250 000472 CSI$ND ;END OF SWITCHES
251 ; VALUE TABLES FOR PROTECTION CODES
252 000474 WOVAL:: CSI$SV ASCII,WORPRO,4
253 000500 CSI$ND
254 000502 GRVAL:: CSI$SV ASCII,GROPRO,4
255 000506 CSI$ND
256 000510 OWVAL:: CSI$SV ASCII,OWNPRO,4
257 000514 CSI$ND
258 000516 SYVAL:: CSI$SV ASCII,SYSPRO,4
259 000522 CSI$ND
260 000524 PRVAL:: CSI$SV NUMERIC,PROWRD,2
261 000530 CSI$ND
262 ;
263 ; VALUE TABLE FOR PURGE SWITCH, NO OF VERSIONS TO PRESERVE
264 000532 PURGVL::CSI$SV NUMERIC,PURGCT,2
265 000536 CSI$ND
266 ;
267 ; VALUE TABLE FOR FILE ID SWITCH
268 000540 FIDVAL::CSI$SV NUMERIC,FILID,2
269 000544 CSI$SV NUMERIC,FILID+2,2
270 000550 CSI$SV NUMERIC,FILID+4,2
271 000554 CSI$ND
272 ;
273 ; VALUE TABLE FOR /FULL DIRECTORY LISTING SWITCH (OUTPUT WIDTH)
274 000556 FULVAL::CSI$SV NUMERIC,LPTLEN,2
275 000562 CSI$ND
276 ;
277 ; VALUE TABLE FOR /BLOCK SWITCH TO COPY (SPECIFY OUTPUT FILE SIZE)
278 000564 BLKVAL::CSI$SV NUMERIC,BLKCNT,2
279 000570 CSI$ND
280
281 000572 000000 SSTTAB::.WORD 0 ;ODD ADDRESS TRAP
282 000574 000000 .WORD 0 ;MEMORY PROTECTION VIOLATION
283 000576 000000 .WORD 0 ;T BIT OR BPT INSTRUCTION
284 000600 000000 .WORD 0 ;IOT INSTRUCTION
285 000602 000000 .WORD 0 ;RESERVED INSTRUCTION
286 000604 000000 .WORD 0 ;NON RSX EMT
287 000606 000000G .WORD .ERTRP ;TRAP INSTRUCTION
288
289 000007 SSTENT=<.-SSTTAB>/2 ;NO. OF SST ENTRIES IN TABLE
290
291 000610 000000G .ABORT::.WORD .RSTAR ;ERRPX AND ERROUX RETURN BY JMP @ .ABORT
292
293 000612 PURE.I
294 000000 000167 000000G START:: JMP .INIT
295 000004 CLOSX::
296 000004 000167 000000G AGAIN:: JMP .RSTAR
297 ;
298 ;
PIP M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32 PAGE 10-2
READ ONLY TABLES
299 000000' .END START
PIP M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32 PAGE 10-3
SYMBOL TABLE
AGAIN 000004RG 006 FD.CCL= 000002 F.NRBD= 000024 NB.DIR= 000100 R.FIX = 000001
APPDBT= 000020 G FD.CR = 000002 F.NREC= 000030 NB.NAM= 000004 R.VAR = 000002
BITVAL= 000200 FD.DIR= 000010 F.OVBS= 000030 NB.SDI= 001400 G SAVSP 001650RG 005
BLKBIT= 002000 G FD.FTN= 000001 F.RACC= 000016 NB.SD1= 000400 SHTLST= 000002 G
BLKCNT 001720RG 005 FD.INS= 000010 F.RATT= 000001 NB.SD2= 001000 SPLBIT= 000001 G
BLKVAL 000564RG 003 FD.PLC= 000004 F.RCNM= 000034 NB.SFL= 001470 G SPOOL = ****** GX
CLOSX 000004RG 006 FD.RAH= 000001 F.RCTL= 000017 NB.SFN= 000070 G SPSDBT= 020000 G
CMDTBL 000036RG 003 FD.RAN= 000002 F.RSIZ= 000002 NB.SNM= 000040 SSTENT= 000007
CMDTB2 000064RG 003 FD.REC= 000001 F.RTYP= 000000 NB.STP= 000020 SSTTAB 000572RG 003
CMDWRD 001642RG 005 FD.RWM= 000001 F.STBK= 000036 NB.SVR= 000010 START 000000RG 006
CMOLUN= 000002 G FD.SDI= 000020 F.UNIT= 000136 NB.TYP= 000002 STBLK 000300RG 005
CNTGBT= 000004 G FD.SQD= 000040 F.URBD= 000020 NB.VER= 000001 SYDEV = 054523 G
CODEV 000322RG 005 FD.TTY= 000004 F.VBN = 000064 NMBLK1 001042RG 005 SYDFLT 000746RG 005
COPY = ****** GX FD.WBH= 000002 F.VBSZ= 000060 NTCNTG= 004000 G SYPROB= 000200 G
COUNIT 000324RG 005 FIDBIT= 001000 G GCMLCB 001100RG 005 NVERBT= 010000 G SYSPRO 001706RG 005
CPYCTL 001646RG 005 FIDVAL 000540RG 003 GE.BIF= 177775 N.DEVD= 000000 SYUNIT= 000000 G
CSIBLK 001566RG 005 FILID = ****** GX GE.CLO= 000004 N.DID = 000024 SYVAL 000516RG 003
CSISWT 000102RG 003 FNAEFN= 000001 G GE.COM= 000001 N.DIRD= 000004 S.APPD= 000010
CS.DIF= 000002 FNASTS 000316RG 005 GE.EOF= 177766 N.DVNM= 000032 S.BFHD= 000020
CS.DVF= 000004 FOWNBT= 040000 G GE.IND= 000002 N.FID = 000000 S.FATT= 000016
CS.EQU= 000040 FO.APD= 000106 GE.IOR= 177777 N.FLID= 000016 S.FDB = 000140
CS.INP= 000001 FO.MFY= 000002 GE.LC = 000010 N.FNAM= 000006 S.FIDS= 000014
CS.MOR= 000020 FO.RD = 000001 GE.MDE= 177774 N.FNMD= 000010 S.FNAM= 000006
CS.NMF= 000001 FO.UPD= 000006 GE.OPR= 177776 N.FTYP= 000014 S.FNB = 000036
CS.OUT= 000002 FO.WRT= 000016 GROPRO 001676RG 005 N.FVER= 000016 S.FNBW= 000017
CS.WLD= 000010 FREEBT= 000100 G GRPROB= 000040 G N.NEXT= 000022 S.FNTY= 000004
C.CMLD= 000002 FRSTIM= 100000 G GRVAL 000502RG 003 N.SPEC= 000014 S.FTYP= 000002
C.DEVD= 000006 FULVAL 000556RG 003 G.CMLD= 000146 N.STAT= 000020 S.NFEN= 000020
C.DIRD= 000012 F.ALOC= 000040 G.DPRM= 000160 N.UNIT= 000034 S.STBK= 000012 G
C.DSDS= 000006 F.BBFS= 000062 G.ERR = 000140 OFNPT 000646RG 005 S.WUIC= 000054 G
C.FILD= 000016 F.BDB = 000070 G.ISIZ= 000020 OURACC 001656RG 005 TAB = 000011 G
C.MKW1= 000024 F.BGBC= 000057 G.LPDL= 000120 OUSPEC= 000662RG 005 TOTLBT= 000010 G
C.MKW2= 000026 F.BKDN= 000026 G.MODE= 000141 OUTLUN= 000004 G UNLKBT= 001000 G
C.SIZE= 000054 F.BKDS= 000020 G.PSDS= 000142 OWNPRO 001702RG 005 UNLOCK= ****** GX
C.STAT= 000001 F.BKEF= 000050 HA.CHU= 000403 G OWPROB= 000100 G UPDTBT= 000040 G
C.SWAD= 000022 F.BKP1= 000051 HA.FP = 001002 G OWUIC 000672RG 005 VERSAV 001652RG 005
C.TYPR= 000000 F.BKST= 000024 HA.UI = 001001 G OWVAL 000510RG 003 WOPROB= 000020 G
DEFDIR 001660RG 005 F.BKVB= 000064 IDBIT = 000200 G PIPID = ****** GX WORPRO 001672RG 005
DELBIT= 000020 G F.CNTG= 000034 IDNTMG= 000000RG 002 PROTBT= 002000 G WOVAL 000474RG 003
DELETE= ****** GX F.DFNB= 000046 IDNTSZ= 000021 G PROTCT= ****** GX $$ = 000000
DFDRSZ= 000011 G F.DSPT= 000044 IFNPT 000546RG 005 PROWRD 001712RG 005 $$$ = 001260R 005
DFLTBT= 000400 G F.DVNM= 000134 ILCLSW= 004000 G PRVAL 000524RG 003 .ABORT 000610RG 003
DIRLST= ****** GX F.EFBK= 000010 INLUN = 000003 G PURGBT= 000040 G .DEFDV 001726RG 005
ENTER = ****** GX F.EFN = 000050 INRACC 001654RG 005 PURGCT 001714RG 005 .DEFUN 001730RG 005
ENTRBT= 000004 G F.EOBB= 000032 INSPEC= 000562RG 005 PURGVL 000532RG 003 .DYBLK 001736RG 005
EVRYBT= 000004 G F.ERR = 000052 IOSTBK 000312RG 005 RATCTL 001750RG 005 .DYBUF 001744RG 005
FA.APD= 000100 F.FACC= 000043 IWUIC 000572RG 005 RATEFN= 000002 G .DYBYT 001746RG 005
FA.CRE= 000010 F.FFBY= 000014 LINBFS= 000220 G REMOVE= ****** GX .DYSIZ 001742RG 005
FA.EXT= 000004 F.FNAM= 000110 LINBUF 000326RG 005 RENAME= ****** GX .ERTRP= ****** GX
FA.NSP= 000100 F.FNB = 000102 LPTLEN 001716RG 005 RMVBIT= 000100 G .EXTSZ 001732RG 005
FA.RD = 000001 F.FTYP= 000116 LSTBIT= 000001 G RNMBIT= 000002 G .FOWNR 001734RG 005
FA.SHR= 000040 F.FVER= 000120 MERGBT= 000010 G RWEFN = 000003 G .FREE = ****** GX
FA.TMP= 000020 F.HIBK= 000004 MFDBIT= 000010 G R$$DPB= 000001 .FSRCB= ****** G
FA.WRT= 000002 F.LUN = 000042 MOIDMG= 000021RG 002 R$$DYM= 000001 .HDRAD 001756RG 005
FDBIN 000140RG 005 F.MBCT= 000054 MOIDSZ= 000007 G R$$EIS= 000000 .INIT = ****** GX
FDBOUT 000000RG 005 F.MBC1= 000055 NAMBLK 001004RG 005 R$$MSG= 000000 .LCLSW 001722RG 005
FD.BLK= 000010 F.MBFG= 000056 NB.DEV= 000200 R$$11M= 000001 .MSGFN 000000RG 003
PIP M1321, RSX FILE UTILITY MACRO M1108 05-DEC-77 22:32 PAGE 10-4
SYMBOL TABLE
.OULCL 001724RG 005 .SETDF= ****** GX ...GBL= 000000 ...PC2= 001302R 005 ...TPC= 000020
.RSTAR= ****** GX .TOPAD= 001740RG 005 ...PC1= 001100R 005 ...PC3= 001100R 005
. ABS. 000000 000
000000 001
MSGSTR 000030 002
PURE$D 000612 003
$$FSR1 000000 004
IMPURE 001762 005
PURE$I 000010 006
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 6098 WORDS ( 24 PAGES)
DYNAMIC MEMORY: 7328 WORDS ( 28 PAGES)
ELAPSED TIME: 00:01:10
[43,10]PIP,[43,20]PIP/-SP=[43,30]PIPMAC,PIP
PIPDSP M0216, PIP COMMAND RECEI MACRO M1108 05-DEC-77 22:34
TABLE OF CONTENTS
7- 1 **** PIPDSP VERSION M0216 ****
8- 34 COMMAND RECEIVER AND DISPATCHER
PIPDSP M0216, PIP COMMAND RECEI MACRO M1108 05-DEC-77 22:34 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 22:34 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 22:34 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 22:34 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 22:34 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 22:34 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:40
[43,10]PIPDSP,[43,20]PIPDSP/-SP=[43,30]PIPMAC,PIPDSP
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34
TABLE OF CONTENTS
7- 1 **** PIPCPY VERSION M0224 ****
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 7
1 .TITLE PIPCPY M0224, COPY COMMAND-PIP
.SBTTL **** PIPCPY VERSION M0224 ****
.IDENT /M0224/
2 ; ALTERED:
3 ; ANDREW C. GOLDSTEIN 3 MAR 75 17:01
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 ;
28 .MACRO GET$ A1,A2,A3,A4
29 .MCALL GET$S
30 GET$S A1,A2,A3,A4
31 .ENDM GET$
32 ;
33 .MACRO PUT$ A1,A2,A3,A4
34 .MCALL PUT$S
35 PUT$S A1,A2,A3,A4
36 .ENDM PUT$
37 ;
38 .ENDC
39
40 000000 FLDSOF
41 .MCALL CSI$,FDOF$L,FCSBT$,IOERR$
42 000000 CSI$
43 000000 FDOF$L ;DEFINE FDB OFFSETS LOCALLY
44 000000 FCSBT$ ;DEFINE FDB BITS AND VALUES LOCALLY
45 000000 IOERR$ ;DEFINE I/O ERROR CODES LOCALLY
46 .MCALL CALL,RETURN
47 .MCALL FDRC$R,FDAT$R,FDBF$R
48 .MCALL OPEN$R,OPEN$U,OPEN$A,OPEN$
49 .MCALL PUT$,GET$,QIO$,DIR$,WTSE$S,WSIG$S
50 ;
51 000000 MSG1 LPHD,<<14>> ;HEADER FOR COPY TO LP:
52
53 000000 IMPURE
54
55 000000 QIODPB: QIO$ ,,RWEFN,,IOSTBK,,<,,,,>
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 7-1
**** PIPCPY VERSION M0224 ****
56 000014 Q.XFAD=Q.IOPL ;TRANSFER ADDRESS OFFSET
57 000016 Q.XFSZ=Q.IOPL+2 ;TRANSFER SIZE OFFSET
58 000022 Q.XFVB=Q.IOPL+6 ;TRANSFER VBN OFFSET
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 8
**** PIPCPY VERSION M0224 ****
60 000026 PURE.I
61
62 ; COPY THE INPUT FILE TO THE OUTPUT FILE
63 000000 COPY::
64 000000 016767 000000G 000000G MOV .OULCL,.LCLSW ;LOCAL OUTPUT SWITCHES APPLY
65 ;TO ALL INPUT SPECIFIERS
66 000006 032767 000000C 000002G BIT #APPDBT!UPDTBT,CMDWRD+2
67 000014 001403 BEQ 10$
68 000016 052767 000000G 000002G BIS #MERGBT,CMDWRD+2 ;APPEND OR UPDATE IMPLY MERGE
69 000024 005767 000000G 10$: TST INSPEC ;ANY INPUT FILE SPEC AT ALL?
70 000030 001003 BNE 30$
71 000032 ERROUX CP02 ;NOTHING TO COPY!
000032 104403 TRAP X
000034 000000G .WORD CP02SZ
000036 000000G .WORD CP02MG
72 ; INITIALIZE THE DEFAULT NAME BLOCKS AND PUT ADDRESSES IN FDB'S
73 000040 012767 000000G 000046G 30$: MOV #NAMBLK,FDBOUT+F.DFNB
74 000046 005001 CLR R1
75 000050 005002 CLR R2
76 000052 CALL STNMBK ;INIT "NAMBLK"
77 000056 012700 000000G MOV #NMBLK1,R0
78 000062 010067 000046G MOV R0,FDBIN+F.DFNB
79 ; R1 AND R2 SHOULD STILL CONTAIN 0
80 000066 CALL STNBK1 ;INIT NAMBLK IN R0
81 000072 012767 000000G 000044G MOV #IFNPT,FDBIN+F.DSPT ;INIT DESCRIPTOR POINTERS
82 000100 012767 000000G 000044G MOV #OFNPT,FDBOUT+F.DSPT
83 000106 012700 000000G MOV #FDBOUT,R0
84 000112 112760 000016 000043 MOVB #FO.WRT,F.FACC(R0) ; SET INTENT TO CAUSE SPOOLING
85 000120 CALL PARSE ;PARSE THE OUTPUT FILE NAME
86 000124 103004 BCC 40$
87 000126 CALL PRSERR ;FAILED TO PARSE OUTPUT FILE NAME
88 000132 000167 000000G JMP CLOSX
89 000136 40$: CALL CWLDUI ;CHECK FOR LEGAL WILD UIC
90 000142 103003 BCC 42$ ;BRANCH IF OK
91 000144 ERROUX CP01 ;ONLY [*,*] IS LEGAL FOR OUTPUT
000144 104403 TRAP X
000146 000000G .WORD CP01SZ
000150 000000G .WORD CP01MG
92 000152 032761 000000G 000020 42$: BIT #NB.SFN,N.STAT(R1) ;NO WILD CARDS IN NAME?
93 000160 001431 BEQ 46$ ;BRANCH IF YES
94 000162 016102 000020 MOV N.STAT(R1),R2
95 000166 042702 000000C BIC #^C<NB.SFN>,R2
96 000172 022702 000000G CMP #NB.SFN,R2 ;*.*;* ?
97 000176 001412 BEQ 44$ ;BRANCH IF YES, OK
98 000200 022702 000060 CMP #NB.SNM!NB.STP,R2 ;*.* ?
99 000204 001004 BNE 43$ ;BRANCH IF NO, ILLEGAL USE OF *
100 000206 032761 000001 000020 BIT #NB.VER,N.STAT(R1) ;NOT EXPLICIT VERSION
101 000214 001403 BEQ 44$ ;BRANCH IF YES, OK
102 000216 43$: ERROUX CP04,1 ;ILLEGAL * IN OUTPUT NAME
000216 104413 TRAP X
000220 000000G .WORD CP04SZ
000222 000000G .WORD CP04MG
103 000224 042767 000001 000000G 44$: BIC #CS.NMF,OUSPEC ;NORMALIZE WILD CARD OUTPUT NAME
104 000232 005067 000010G CLR OFNPT+N.FNMD
105 000236 042761 000000G 000020 BIC #NB.SFN,N.STAT(R1)
106 000244 032767 000001 000000G 46$: BIT #CS.NMF,OUSPEC ;IF EXPLICIT OUTPUT FILE NAME
107 000252 001013 BNE 54$ ;BRANCH IF YES
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 8-1
**** PIPCPY VERSION M0224 ****
108 000254 032767 000000G 000002G BIT #MERGBT,CMDWRD+2 ;MERGE, APPEND, OR UPDATE REQUEST?
109 000262 001416 BEQ 60$ ;BRANCH IF NO
110 000264 132760 000010 000017 BITB #FD.DIR,F.RCTL(R0)
111 000272 001412 BEQ 60$ ;OK IF NON DIRECTORY DEVICE
112 000274 ERROUX CP05,1 ;MUST HAVE EXPLICIT OUTPUT FILE NAME
000274 104413 TRAP X
000276 000000G .WORD CP05SZ
000300 000000G .WORD CP05MG
113 000302 032767 000030 000000G 54$: BIT #CS.MOR!CS.WLD,INSPEC ;MULTIPLE INPUT FILES?
114 000310 001403 BEQ 60$
115 ;
116 ; EXPLICIT OUTPUT FILE NAME AND MULTIPLE INPUT FILES IMPLY A MERGE
117 000312 052767 000000G 000002G BIS #MERGBT,CMDWRD+2
118 000320 012700 000000G 60$: MOV #FDBIN,R0
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 9
**** PIPCPY VERSION M0224 ****
120
121 000324 COPY2: CALL PARSE ;PARSE THE FILE NAME
122 000330 103004 BCC 10$
123 000332 CALL PRSERR
124 000336 000167 002002 JMP CPYNXT
125 000342 016067 000120 000000G 10$: MOV F.FVER(R0),VERSAV
126 000350 052767 000000G 000000G BIS #FRSTIM,CPYCTL ;FIRST FIND OPERATION NOT DONE YET
127 000356 032767 000001 000000G BIT #CS.NMF,INSPEC ;ALLOW NULL INPUT FILE NAME TO = *.*;*
128 000364 001021 BNE CPYWLD
129 000366 005762 000016 TST N.FLID(R2) ;UNLESS FILE ID SPECIFIED
130 000372 001016 BNE CPYWLD
131 000374 132760 000010 000017 BITB #FD.DIR,F.RCTL(R0) ;OR UNLESS NON DIRECTORY DEVICE
132 000402 001412 BEQ CPYWLD
133 000404 052761 000000G 000020 BIS #NB.SFN,N.STAT(R1) ;SINCE WILD CARDS ON INPUT SIDE
134 000412 032767 000001 000000G BIT #CS.NMF,OUSPEC ;OUTPUT FILE NAME IMPLIES MERGE
135 000420 001403 BEQ CPYWLD
136 000422 052767 000000G 000002G BIS #MERGBT,CMDWRD+2
137 000430 016760 000000G 000120 CPYWLD: MOV VERSAV,F.FVER(R0)
138 000436 CALL FNDNXT
139 000442 103004 BCC COPY1 ;BRANCH IF SUCCESSFUL
140 ;
141 ; ERROR FROM LOOKUP
142 000444 CALL FNDERR
143 000450 000167 001670 JMP CPYNXT
144 000454 005067 000000G COPY1: CLR OURACC
145 000460 012767 000004 000000G MOV #FD.PLC,INRACC
146 000466 032767 000001 000000G BIT #CS.NMF,OUSPEC ;IS OUTPUT FILE NAME EXPLICIT
147 000474 001100 BNE 40$ ;BRANCH IF YES
148 000476 010002 MOV R0,R2
149 000500 062702 000110 ADD #F.FNAM,R2 ;R2=ADR OF FNAME IN NAME BLOCK
150 000504 005001 CLR R1 ;R1= DIRECTORY ID FIELD
151 000506 CALL STNMBK ;STORE INTO NAMBLK
152 ;
153 ; IF THE OUTPUT DIRECTORY IS WILD CARD, USE THE INPUT DIR ID
154 000512 032767 000000G 000020G BIT #NB.SDI,OWUIC+N.STAT
155 000520 001412 BEQ 10$
156 000522 016702 000044G MOV FDBOUT+F.DSPT,R2
157 000526 016703 000044G MOV FDBIN+F.DSPT,R3
158 000532 016362 000004 000004 MOV N.DIRD(R3),N.DIRD(R2)
159 000540 016362 000006 000006 MOV N.DIRD+2(R3),N.DIRD+2(R2)
160 ;
161 ; DEFAULT FILE VERSION TO THAT OF INPUT FILE UNLESS DEVICE AND
162 ; DIRECTORY ARE THE SAME.
163 000546 032767 000000G 000000G 10$: BIT #NVERBT,CPYCTL ;FORCING NEW OUTPUT FILE VERSION?
164 000554 001035 BNE 30$ ;BRANCH IF YES
165 000556 016767 000120G 000016G MOV FDBIN+F.FVER,NAMBLK+N.FVER
166 000564 026767 000134G 000134G CMP FDBIN+F.DVNM,FDBOUT+F.DVNM ;SAME DEVICES?
167 000572 001041 BNE 40$ ;BRANCH IF NO
168 000574 026767 000136G 000136G CMP FDBIN+F.UNIT,FDBOUT+F.UNIT
169 000602 001035 BNE 40$ ;BRANCH IF UNITS DIFFERENT
170 000604 012704 000003 MOV #3,R4 ;CHECK 3 DIRECTORY ID WORDS
171 000610 012702 000126G MOV #FDBIN+F.FNB+N.DID,R2
172 000614 012703 000126G MOV #FDBOUT+F.FNB+N.DID,R3
173 000620 022223 20$: CMP (R2)+,(R3)+
174 000622 001025 BNE 40$
175 000624 SOB R4,20$
176 000630 032767 000000G 000122G BIT #NB.SFL,FDBIN+F.FNB+N.STAT
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 9-1
**** PIPCPY VERSION M0224 ****
177 000636 001415 BEQ 35$
178 ; WILD CARD COPY TO SAME DEVICE, DIRECTORY IS ILLEGAL
179 000640 ERROUT CP03
000640 104402 TRAP X
000642 000000G .WORD CP03SZ
000644 000000G .WORD CP03MG
180 000646 000407 BR 32$
181 ;
182 ; PRODUCE NEW VERSION OF FILE, DON'T PRESERVE THE INPUT FILE'S VERSION NUMBER
183 ;
184 000650 032767 000010 000122G 30$: BIT #NB.SVR,FDBIN+F.FNB+N.STAT ;IF WILD VERSION SPECIFIED
185 000656 001405 BEQ 35$
186 000660 ERROUT CP15 ;THEN ILLEGAL
000660 104402 TRAP X
000662 000000G .WORD CP15SZ
000664 000000G .WORD CP15MG
187 000666 000167 001452 32$: JMP CPYNXT
188 000672 005067 000016G 35$: CLR NAMBLK+N.FVER ;FORCE DEFAULT (NEW) OUTPUT FILE VERSION
189 ;
190 ; NOW SEE IF CAN COPY IN BLOCK MODE INSTEAD OF RECORD MODE
191 000676 005767 000070G 40$: TST FDBOUT+F.BDB ;IF OUTPUT FILE IS ALREADY OPEN
192 000702 001061 BNE CPYOPN ;SET UP RECORD ORIENTED INPUT FILE
193 000704 032767 000000G 000002G BIT #MERGBT,CMDWRD+2 ;IF 1ST FILE OF MERGE
194 000712 001406 BEQ 50$ ;BRANCH IF NOT
195 000714 FDBF$R #FDBIN,,#512. ;FORCE STANDARD BUF SIZE, AVOID FRAGMENTING FSR1
196 000726 000447 BR CPYOPN ;AND USE RECORD ORIENTED COPY
197 000730 026767 000062G 000062G 50$: CMP FDBIN+F.BBFS,FDBOUT+F.BBFS ;BLOCK SIZES THE SAME?
198 000736 001043 BNE CPYOPN ;BRANCH IF NO, RECORD ORIENTED COPY
199 000740 026727 000062G 001000 CMP FDBIN+F.BBFS,#1000 ;MUST BE 1000 BYTE BLOCKS
200 000746 001037 BNE CPYOPN ;BRANCH IF NOT
201 ;
202 ; BOTH MUST BE BLOCK ORIENTED AND NON SEQUENTIAL
203 000750 132767 000041 000017G BITB #FD.REC!FD.SQD,FDBIN+F.RCTL
204 000756 001033 BNE CPYOPN
205 000760 132767 000041 000017G BITB #FD.REC!FD.SQD,FDBOUT+F.RCTL
206 000766 001027 BNE CPYOPN
207 ;
208 ; BOTH FILES ARE BLOCK ORIENTED AND THE SAME BLOCK SIZE, USE READ/WRITE
209 ;
210 000770 026767 000000G 000000G CMP .DYSIZ,.DYBYT ; SEE IF DYNAMIC BUFFER IS ALLOCATED
211 000776 001412 BEQ 60$ ; BRANCH IF YES
212 ;
213 ; FAKE AN ALLOCATION OF THE ENTIRE DYNAMIC BUFFER REGION. WE CANNOT
214 ; CALL $RQLCB SINCE THE DESIRED SIZE MAY BE OVER 16K AND CAUSE
215 ; SIGN PROBLEMS.
216 ;
217 001000 CALL .DYREL ; RELEASE ANYTHING THAT'S ALLOCATED
218 001004 016767 000000G 000000G MOV .DYSIZ,.DYBYT ; SET ALLOCATED SIZE
219 001012 013700 000000G MOV @#.FSRPT,R0 ; GET FSR2 ADDRESS
220 001016 011067 000000G MOV (R0),.DYBUF ; SET BUFFER ADDRESS
221 001022 005010 CLR (R0) ; MARK ENTIRE FSR ALLOCATED
222
223 001024 012700 000000G 60$: MOV #FDBIN,R0
224 001030 012767 000001 000000G MOV #FD.RWM,INRACC
225 001036 012767 000001 000000G MOV #FD.RWM,OURACC
226 001044 000400 BR CPYOPN
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 10
**** PIPCPY VERSION M0224 ****
228
229 001046 CPYOPN:
230 001046 012701 000000G MOV #STBLK,R1 ;R1=ADDRESS OF STATISTICS BLOCK
231 001052 132760 000040 000017 BITB #FD.SQD,F.RCTL(R0) ;IF SEQUENTIAL DEVICE
232 001060 001002 BNE 10$ ;DON'T READ THE STATISTICS BLOCK
233 001062 010160 000036 MOV R1,F.STBK(R0) ;OTHERWISE READ IT AT OPEN TIME
234 001066 005021 10$: CLR (R1)+ ;ZERO THE LBN IN THE STATISTICS BLOCK
235 001070 005021 CLR (R1)+
236 001072 005021 CLR (R1)+ ;AND ZERO THE SIZE FIELD
237 001074 005011 CLR (R1) ;LEAVING R1 POINTING AT LOW ORDER SIZE
238 001076 OPEN$R R0,,,INRACC ;OPEN THE INPUT FILE
239 001116 103002 BCC 20$ ;
240 001120 000167 001376 JMP CERR51 ;FAILED TO OPEN INPUT FILE
241
242 ;
243 ; FIX UP THE STATISTICS BLOCK IF THIS WAS A SEQUENTIAL DEVICE. HIBK+2 WILL
244 ; CONTAIN THE SIZE IF FLE WAS CONTIGUOUS.
245 ;
246 001124 132760 000040 000017 20$: BITB #FD.SQD,F.RCTL(R0) ;IF SEQUENTIAL DEVICE
247 001132 001405 BEQ 30$ ;
248 001134 016011 000006 MOV F.HIBK+2(R0),(R1) ;FIX UP FILE SIZE
249 001140 001402 BEQ 30$ ;BRANCH IF NOT CONTIGUOUS
250 001142 005261 177774 INC -4(R1) ;MAKE LBN IN STAT BLOCK NON-ZERO
251 ;
252 ; ESTABLISH SIZE AND CONTIGUOUS ATTRIBUTE FOR THE INPUT FILE
253 ;
254 001146 30$:
255 001146 005004 EXTSIZ: CLR R4 ;ASSUME NON CONTIGUOUS
256 001150 011105 MOV (R1),R5 ;R5=SIZE OF FILE SPACE ALLOCATED
257 001152 005741 TST -(R1)
258 001154 014146 MOV -(R1),-(SP) ;IF BOTH LBN WORDS ARE 0
259 001156 054126 BIS -(R1),(SP)+ ;THEN FILE IS NON CONTIGUOUS
260 001160 001404 BEQ 10$ ;BRANCH IF NOT CONTIGUOUS
261 001162 032767 000000G 000000G BIT #NTCNTG,CPYCTL ;/-CO SWITCH?
262 001170 001012 BNE 30$ ;BRANCH IF COPYING CONTIGUOUS
263 ;
264 ; USE FILE SIZE FROM RECORD ATTRIBUTE
265 ;
266 001172 016005 000012 10$: MOV F.EFBK+2(R0),R5 ;R5=VBN OF END OF FILE
267 001176 005760 000014 TST F.FFBY(R0) ;UNLESS FFBY=0
268 001202 001001 BNE 20$ ;
269 001204 005305 DEC R5 ;IN WHICH CASE IT IS ONE TOO BIG
270 001206 032767 000000G 000000G 20$: BIT #CNTGBT,CPYCTL ;FORCE CONTIGUOUS?
271 001214 001401 BEQ 40$ ;BRANCH IF NO
272 001216 005204 30$: INC R4 ;CONTIGUOUS ALLOCATION
273 ;
274 ; SEE IF USER WANTS TO OVERRIDE THE EXTEND SIZE. IF HE SAID /BL:N, THEN
275 ; USE THAN EXTEND SIZE.
276 ;
277 001220 032767 000000G 000000G 40$: BIT #BLKBIT,CPYCTL ;/BL SWITCH SPECIFIED?
278 001226 001402 BEQ 50$ ;BRANCH IF NO
279 001230 016705 000000G MOV BLKCNT,R5 ;USE SPECIFIED SIZE
280 001234 005704 50$: TST R4 ;IS EXTEND CONTIGUOUS?
281 001236 001001 BNE 60$ ;BRANCH IF YES
282 001240 005405 NEG R5 ;NEGATIVE FOR NON CONTIGUOUS
283 001242 010567 000000G 60$: MOV R5,.EXTSZ ;SAVE THE EXTEND INFO
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 11
**** PIPCPY VERSION M0224 ****
285
286 ;
287 ; NOW PREPARE TO OPEN THE OUTPUT FILE
288 ;
289 001246 OUTOPN:
290 001246 010001 MOV R0,R1 ;PRESERVE THE INPUT FDB IN R1
291 001250 012700 000000G MOV #FDBOUT,R0 ;OUTPUT FDB
292 001254 005760 000070 TST F.BDB(R0) ;
293 001260 001124 BNE ISOPEN ;BRANCH IF OUTPUT FILE IS ALEADY OPEN
294
295 001262 FDAT$R R0,F.RTYP(R1),F.RATT(R1),F.RSIZ(R1) ;SET REC ATTRIB.
296 001304 022760 050114 000134 CMP #"LP,F.DVNM(R0) ;IF OUTPUT TO LINE PRINTER
297 001312 001003 BNE 10$ ;
298 001314 FDBF$R R0,,#132. ;OVERRIDE BUFFER SIZE
299 001322 10$: FDRC$R R0,OURACC
300 001330 CALL PRSREG
301 001334 CALL .PARSE
302 001340 103004 BCC 15$
303 001342 CALL PRSERR
304 001346 000167 000000G JMP CLOSX
305 001352 15$: CALL .GFOWN ;SET UP FILE OWNER FOR /FO SWITCH
306 001356 032767 000000C 000002G BIT #APPDBT!UPDTBT,CMDWRD+2
307 001364 001020 BNE OPENAU ;BRANCH IF APPENDING OR UPDATING
308 ;
309 ; CREATING A NEW FILE
310 ;
311 .IF GT,R$$DPB ;IF NEW DPB FORMAT
312 001366 FDAT$R R0,,,,.EXTSZ ;SET INITIALIZE ALLOCATION
313
314
315 .IFF ;IF OLD DPB FORMAT
316 MOV .EXTSZ,R1 ;ONLY SET INITIAL SIZE IF CONTIGUOUS
317 BLT 20$ ;BRANCH IF NOT CONTIGUOUS
318 FDAT$R R0,,,,R1 ;
319 20$: ;
320 .ENDC
321
322 001374 012705 000116 MOV #FO.WRT!FA.NSP,R5 ;ASSUME NOT SUPERSEDING
323 001400 032767 000000G 000000G BIT #SPSDBT,CPYCTL ;IS SUPERSEDE DESIRED
324 001406 001402 BEQ 30$ ;BRANCH IF NO
325 001410 012705 000016 MOV #FO.WRT,R5 ;
326 001414 30$: OPEN$ R0,R5 ;OPEN A NEW FILE
327 001424 000437 BR OPNCHK
328
329 ;
330 ; OPEN FOR APPEND OR UPDATE
331 ;
332 001426 OPENAU:
333 001426 032767 000000G 000002G BIT #APPDBT,CMDWRD+2
334 001434 001026 BNE 20$ ;BRANCH IF OPEN FOR APPEND
335 001436 OPEN$U R0 ;OPEN FOR UPDATE (REWRITE THE FILE)
336 001450 103425 BCS OPNCHK
337 001452 016702 000002G MOV FDBIN+F.RSIZ,R2 ;USE INPUT RECORD SIZE
338 001456 122767 000001 000000G CMPB #R.FIX,FDBIN+F.RTYP
339 001464 001401 BEQ 10$ ;IF FIXED LENGTH RECORDS
340 001466 005002 CLR R2 ;OR ZERO IF NOT
341 001470 10$: FDAT$R R0,FDBIN+F.RTYP,FDBIN+F.RATT,R2
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 11-1
**** PIPCPY VERSION M0224 ****
342 001510 000560 BR COPYGO ;SKIP THE 1ST EXTEND
343 001512 20$: OPEN$A R0 ;OPEN FOR APPEND (ADD TO END OF FILE)
344 001524 103002 OPNCHK: BCC ISOPEN
345 001526 000167 000402 JMP CERR2
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 12
**** PIPCPY VERSION M0224 ****
347 ;
348 ; BOTH FILES ARE NOW OPEN. IF RECORD ORIENTED COPY, ALLOCATE REMAINING
349 ; BUFFER SPACE AS A RECORD BUFFER
350 ;
351 001532 032760 000001 000016 ISOPEN: BIT #FD.RWM,F.RACC(R0) ; SEE IF BLOCK COPY IN USE
352 001540 001040 BNE 4$ ; YES - NO RECORD BUFFER NEEDED
353 001542 FDRC$R R0,,#0,#0 ;NO USER RECORD BUFFER
354 001552 005001 CLR R1
355 001554 013702 000000G MOV @#.FSRPT,R2 ; GET BUFFER FREE LIST HEAD FROM FSR2
356 001560 011202 1$: MOV (R2),R2 ; CHAIN TO NEXT FREE AREA
357 001562 001406 BEQ 2$ ; BRANCH IF NO MORE
358 001564 026201 000002 CMP 2(R2),R1 ; SEE IF THIS SPACE IS LARGER THAN PREVIOUS
359 001570 101773 BLOS 1$ ; NO, KEEP LOOKING
360 001572 016201 000002 MOV 2(R2),R1 ; YES, CONSIDER THIS SPACE
361 001576 000770 BR 1$ ; BUT KEEP TRYING
362
363 001600 005701 2$: TST R1 ; SEE IF WE FOUND ANYTHING
364 001602 001005 BNE 3$
365 001604 012700 000000G MOV #FDBIN,R0
366 001610 ERROUX DY01,0 ;NOT ENOUGH BUFFER SPACE
001610 104407 TRAP X
001612 000000G .WORD DY01SZ
001614 000000G .WORD DY01MG
367 001616 3$: CALL .DYALC ;ALLOCATE THE EXTRA AS LARGEST POSSIBLE REC BUF
368 001622 FDRC$R #FDBIN,,.DYBUF,.DYBYT
369 ;
370 ; OUTPUT FILE IS OPEN - SEE IF EXTEND IS NECESSARY
371 ;
372 001642 012700 000000G 4$: MOV #FDBOUT,R0
373 001646 132760 000041 000017 BITB #FD.REC!FD.SQD,F.RCTL(R0) ;DON'T EXTEND REC OR SEQ DEV
374 001654 001040 BNE 30$
375 001656 016003 000006 MOV F.HIBK+2(R0),R3 ;LOW ORDER SIZE OF FILE IN BLOCKS
376 001662 016002 000004 MOV F.HIBK(R0),R2 ;HIGH ORDER SIZE OF FILE
377 001666 166003 000012 SUB F.EFBK+2(R0),R3 ;CALCULATE SPACE AVAILABLE
378 001672 005602 SBC R2
379 001674 166002 000010 SUB F.EFBK(R0),R2
380 001700 005760 000014 TST F.FFBY(R0) ;IF FFBY=0
381 001704 001003 BNE 10$ ;
382 001706 062703 000001 ADD #1,R3 ;SUBTRACTED ONE TOO MANY
383 001712 005502 ADC R2 ;
384 001714 005702 10$: TST R2 ;BRANCH IF HIGH ORDER NON-ZERO, (NO EXTEND)
385 001716 001055 BNE 40$
386 001720 016701 000000G MOV .EXTSZ,R1
387 001724 002001 BGE 20$
388 001726 005401 NEG R1 ;R1=SIZE OF INPUT FILE
389 001730 160301 20$: SUB R3,R1 ;R1=NO. OF ADDITIONAL BLOCKS NEEDED
390 001732 003447 BLE 40$ ;BRANCH IF EXTEND UNNECESSARY
391 001734 005002 CLR R2 ;NON CONTIGUOUS EXTEND
392 001736 CALL .EXTND
393 001742 103043 BCC 40$
394 ;
395 ; FAILED TO EXTEND-IGNORE FCP STACK OVERFLOW AND DO DEFAULT EXTEND AS
396 ; FILE IS WRITTEN.
397 ;
398 001744 122760 177706 000052 CMPB #IE.STK,F.ERR(R0) ;FCP STACK OVERFLOW?
399 001752 001131 BNE CERR52 ;BRANCH IF OTHER ERROR
400 001754 000436 BR 40$ ;
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 12-1
**** PIPCPY VERSION M0224 ****
401 001756 30$: CALL RECATT ;ATTACH A RECORD DEVICE
402 001762 103512 BCS CERR3
403 001764 022760 050114 000134 CMP #"LP,F.DVNM(R0) ;IF OUTPUT TO LP
404 001772 001027 BNE 40$
405 001774 FDAT$R R0,#R.VAR,#0
406 002006 PUT$ R0,#LPHDMG,#LPHDSZ ;START WITH A FORM FEED
407 002026 103532 BCS CERR1 ;BRANCH IF WRITE ERROR
408 002030 FDAT$R R0,FDBIN+F.RTYP,FDBIN+F.RATT,FDBIN+F.RSIZ
409
410 002052 40$:
411 002052 012701 000000G COPYGO: MOV #FDBIN,R1 ;SET R1, R2 TO FDB ADDRESSES
412 002056 012702 000000G MOV #FDBOUT,R2 ;TO GAIN SPEED IN COPY LOOP
413 002062 132761 000001 000016 BITB #FD.RWM,F.RACC(R1)
414 002070 001402 BEQ 40$
415 002072 000167 000452 JMP CPYBLK ;BRANCH IF COPYING IN BLOCK MODE
416 ;
417 ; COPY IN RECORD MODE
418 002076 40$: GET$ R1
419 002104 103507 BCS CPYEOF ;BRANCH IF ERROR IN READ, EOF?
420 002106 016767 000026G 000026G MOV FDBIN+F.NRBD+2,FDBOUT+F.NRBD+2 ; SET OUTPUT ADDRESS
421 002114 016767 000024G 000024G MOV FDBIN+F.NRBD,FDBOUT+F.NRBD ; AND SIZE
422 002122 PUT$ R2
423 002130 103362 BCC 40$ ;DO NEXT RECORD IF ALL IS WELL
424 002132 000470 BR CERR1 ;WRITE ERROR
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 13
**** PIPCPY VERSION M0224 ****
426 ;
427 ; FAILED TO OPEN OUTPUT FILE
428 002134 122760 177750 000052 CERR2: CMPB #IE.DFU,F.ERR(R0) ;ALLOCATION FAILURE?
429 002142 001426 BEQ CERR53 ;BRANCH IF YES
430 002144 122760 177707 000052 CMPB #IE.DUP,F.ERR(R0) ;FILE ALREADY EXISTS?
431 002152 001404 BEQ 10$ ;BRANCH IF YES
432 002154 ERROUT OP02,0,0 ;FAILED TO OPEN OUTPUT FILE
002154 104426 TRAP X
002156 000000G .WORD OP02SZ
002160 000000G .WORD OP02MG
433 002162 000410 BR 20$
434 002164 10$: ERROUT OP08,0 ;OUTPUT FILE ALREADY EXISTS
002164 104406 TRAP X
002166 000000G .WORD OP08SZ
002170 000000G .WORD OP08MG
435 002172 032767 000000G 000002G BIT #MERGBT,CMDWRD+2 ;IF MERGING
436 002200 001001 BNE 20$ ;THEN CAN'T CONTINUE WITH NEXT FILE
437 002202 000463 BR COPYX ;OTHERWISE GO DO NEXT FILE
438 002204 000167 000000G 20$: JMP CLOSX
439 ;
440 ; FAILE TO ATTACH THE TTY
441 002210 CERR3: ERROUT DI06,0,0
002210 104426 TRAP X
002212 000000G .WORD DI06SZ
002214 000000G .WORD DI06MG
442 002216 000455 BR COPYX
443 ;
444 ; EXTEND FAILURE AT OPEN TIME
445 ;
446 002220 012702 000001 CERR53: MOV #1,R2 ;ASSUME IT WAS CONTIGUOUS EXTEND
447 002224 016701 000000G MOV .EXTSZ,R1
448 002230 002002 BGE CERR52 ;BRANCH IF IT WAS CONTIGUOUS
449 002232 005002 CLR R2 ;NON-CONTIGUOUS
450 002234 005401 NEG R1
451 ;
452 ; FAILED TO EXTEND THE OUTPUT FILE
453 ; R1 = DESIRED SIZE OF EXTEND, R2=0 FOR NON-CONTIGUOUS EXTEND, 1 FOR
454 ; CONTIGUOUS REQUEST.
455 ;
456 002236 122760 177750 000052 CERR52: CMPB #IE.DFU,F.ERR(R0) ;DEVICE FULL?
457 002244 001016 BNE 30$ ;BRANCH IF SOME OTHER ERROR
458 002246 005702 TST R2 ;ASKING FOR CONTIGUOUS SPACE?
459 002250 001010 BNE 20$ ;BRANCH IF YES
460 002252 010146 MOV R1,-(SP) ;SAVE EXTEND SIZE
461 002254 ERROUT CP11,0 ;COULDN'T ALLOCATE ANY SPACE
002254 104406 TRAP X
002256 000000G .WORD CP11SZ
002260 000000G .WORD CP11MG
462 002262 022627 000024 CMP (SP)+,#20. ;IF RELATIVELY LARGE SPACE WAS NEEDED
463 002266 101031 BHI COPYX ;GO TRY NEXT FILE
464 002270 000407 BR 40$ ;OTHERWISE STOP THE COPY LOOP NOW
465 002272 20$: ERROUT CP10,0 ;FAILED TO FIND CONTIGUOUS SPACE
002272 104406 TRAP X
002274 000000G .WORD CP10SZ
002276 000000G .WORD CP10MG
466 002300 000424 BR COPYX ;GO TRY TO COPY NEXT FILE
467 002302 30$: ERROUT CP12,0,0 ;COULDN'T EXTEND - PRINT REASON
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 13-1
**** PIPCPY VERSION M0224 ****
002302 104426 TRAP X
002304 000000G .WORD CP12SZ
002306 000000G .WORD CP12MG
468 002310 000167 000000G 40$: JMP CLOSX ;EXIT FROM THE COPY LOOP
469 ;
470 ; WRITE ERROR
471 002314 CERR1: ERROUT CP14,0,0
002314 104426 TRAP X
002316 000000G .WORD CP14SZ
002320 000000G .WORD CP14MG
472 002322 000413 BR COPYX
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 14
**** PIPCPY VERSION M0224 ****
474 002324 122760 177766 000052 CPYEOF: CMPB #IE.EOF,F.ERR(R0)
475 002332 001407 BEQ COPYX
476 ;
477 ; READ ERROR
478 002334 CERR6: ERROUT CP13,0,0
002334 104426 TRAP X
002336 000000G .WORD CP13SZ
002340 000000G .WORD CP13MG
479 002342 000403 BR COPYX
480
481 002344 042767 000000G 000122G CPYNXT: BIC #NB.SFL,FDBIN+F.FNB+N.STAT
482 002352 COPYX: CALL CLSIN ;CLOSE INPUT FILE
483 002356 CALL .DYREL ; RELEASE THE RECORD BUFFER TO KEEP FSR CLEAN
484 002362 032767 000000G 000002G BIT #MERGBT,CMDWRD+2 ;AND THE OUTPUT FILE UNLESS MERGE MODE
485 002370 001033 BNE 10$
486 002372 005767 000070G TST FDBOUT+F.BDB ;NEED TO CLOSE OUTPUT FILE?
487 002376 001426 BEQ 5$ ;BRANCH IF ALREADY CLOSED
488 002400 016746 000102G MOV FDBOUT+F.FNB+N.FID,-(SP) ;SAVE OUTPUT FILE ID
489 002404 CALL CLSOUT ;CLOSE THE OUTPUT FILE
490 002410 012602 MOV (SP)+,R2 ;R2=SAVED FILE NUMBER
491 002412 016703 000000G MOV .FOWNR,R3 ;IF NO FILE OWNER SPECIFIED
492 002416 001416 BEQ 5$ ;DON'T WRITE ATTRIBUTES
493 002420 010260 000102 MOV R2,F.FNB+N.FID(R0) ;OTHERWISE RESTORE THE FILE ID
494 002424 005046 CLR -(SP) ;SET UP ATTRIBUTE LIST
495 002426 012746 000000G MOV #.FOWNR,-(SP) ;ADDRESS OF FILE OWNER
496 002432 012746 000000G MOV #HA.UI,-(SP) ;WRITE FILE OWNER ATTRIBUTE
497 002436 010601 MOV SP,R1 ;R1=ADDRESS OF ATTRIBUTE LIST
498 002440 CALL WRTATT ;ISSUE THE WRITE ATTRIBUTES QI/O AND WAIT
499 002444 062706 000006 ADD #6,SP ;POP THE ATTRIBUTE LIST
500 002450 005067 000102G CLR FDBOUT+F.FNB+N.FID ;ZERO THE FILE NUMBER AGAIN
501 002454 005067 000000G 5$: CLR BLKCNT ;RESET ONLY IF NOT A MERGE OPERATION
502 002460 012700 000000G 10$: MOV #FDBIN,R0 ;R0=INPUT FDB ADDRESS
503 002464 CALL NXTFIL ;IS THERE A WILD CARD FILE?
504 002470 103405 BCS CPYNX1 ;BRANCH IF NO
505 002472 042767 000000G 000000G BIC #FRSTIM,CPYCTL ;SAY "NOT THE FIRST TIME"
506 002500 000167 175724 JMP CPYWLD
507 002504 CPYNX1: CALL NXTIN ;GET THE NEXT INPUT SPECIFIER
508 002510 103402 BCS 10$ ;BRANCH IF NO MORE SPECS
509 002512 000167 175606 JMP COPY2
510 002516 000167 000000G 10$: JMP CLOSX
511
512 ; FAILED TO OPEN INPUT FILE
513 002522 122760 177746 000052 CERR51: CMPB #IE.NSF,F.ERR(R0) ;WAS FILE NOT FOUND?
514 002530 001003 BNE CERR13 ;BRANCH IF SOME OTHER ERROR
515 002532 CALL FNDERR
516 002536 000705 BR COPYX
517 002540 CERR13: ERROUT OP01,0,0
002540 104426 TRAP X
002542 000000G .WORD OP01SZ
002544 000000G .WORD OP01MG
518 002546 000701 BR COPYX
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 15
**** PIPCPY VERSION M0224 ****
520 ;
521 ; COPY IN BLOCK MODE
522 002550 016767 000000G 000014' CPYBLK: MOV .DYBUF,QIODPB+Q.XFAD ;PUT BUFFER ADDRESS IN DPB
523 002556 016704 000010G MOV FDBIN+F.EFBK,R4
524 002562 016705 000012G MOV FDBIN+F.EFBK+2,R5 ;R4,R5 = NO.OF BLOCK IN USE
525 002566 005767 000014G TST FDBIN+F.FFBY ;ONE TOO BIG IF FFBY=0
526 002572 001003 BNE 10$
527 002574 162705 000001 SUB #1,R5
528 002600 005604 SBC R4
529 002602 005067 000022' 10$: CLR QIODPB+Q.XFVB
530 002606 012767 000001 000024' MOV #1,QIODPB+Q.XFVB+2 ;START AT VBN 1
531 002614 016703 000000G 20$: MOV .DYBLK,R3 ;R3=NO. OF BLOCKS AVAILABLE IN BUFFER
532 002620 005704 TST R4 ;IF MORE THAN 65K BLOCKS LEFT
533 002622 001004 BNE 30$ ;TRANSFER MAX BUFFER SIZE
534 002624 020503 CMP R5,R3 ;OR IF MORE BLOCKS THAN BUFFER SPACE
535 002626 101002 BHI 30$ ;TRANSFER MAX BUFFER SIZE
536 002630 010503 MOV R5,R3 ;OTHERWISE USE WHAT'S LEFT
537 002632 001434 BEQ 40$ ;BRANCH IF NONE LEFT, ALL DONE
538 002634 010301 30$: MOV R3,R1
539 002636 000301 SWAB R1
540 002640 006301 ASL R1 ;CONVERT BLOCK COUNT TO BYTE COUNT
541 002642 010167 000016' MOV R1,QIODPB+Q.XFSZ ;AND STORE IT IN THE DPB
542 002646 012767 000000G 000002' MOV #IO.RVB,QIODPB+Q.IOFN ;I/O FUNCTION CODE FOR READ VIRTUAL
543 002654 012700 000000G MOV #FDBIN,R0
544 002660 CALL RWGO ;PERFORM THE READ
545 002664 103623 BCS CERR6 ;BRANCH IF ERROR
546 002666 012767 000000G 000002' MOV #IO.WVB,QIODPB+Q.IOFN ;I/O FUCNTION CODE FOR WRITE VIRTUAL
547 002674 012700 000000G MOV #FDBOUT,R0
548 002700 CALL RWGO ;WRITE THE BLOCK
549 002704 103603 BCS CERR1
550 002706 160305 SUB R3,R5
551 002710 005604 SBC R4 ;R4,R5 = NO. OF BLOCKS LEFT TO TRANSFER
552 002712 060367 000024' ADD R3,QIODPB+Q.XFVB+2
553 002716 005567 000022' ADC QIODPB+Q.XFVB ;UPDATE THE NEXT VBN
554 002722 000734 BR 20$ ;GO DO THE NEXT SET OF VBN'S
555 002724 016767 000010G 000010G 40$: MOV FDBIN+F.EFBK,FDBOUT+F.EFBK ;SET OUTPUT EOF
556 002732 016767 000012G 000012G MOV FDBIN+F.EFBK+2,FDBOUT+F.EFBK+2
557 002740 016767 000014G 000014G MOV FDBIN+F.FFBY,FDBOUT+F.FFBY
558 002746 000601 BR COPYX
559 ;+
560 ; START UP A READ OR WRITE VIRTUAL BLOCK FOR BLOCK MODE COPY
561 ;
562 ; INPUTS:
563 ;
564 ; R0=FDB ADDRESS
565 ;
566 ; OUTPUTS:
567 ;
568 ; C=0 IF SUCCESSFUL, C=1 IF ERROR
569 ; F.ERR(R0) SET TO ERROR CODE IF ERROR
570 ; ALL REGISTERS PRESERVED
571 ;
572 ;-
573 002750 116067 000042 000004' RWGO: MOVB F.LUN(R0),QIODPB+Q.IOLU
574 002756 005060 000052 10$: CLR F.ERR(R0)
575 002762 DIR$ #QIODPB ;ISSUE THE QI/O
576 002770 103416 BCS 20$
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 15-1
**** PIPCPY VERSION M0224 ****
577 002772 WTSE$S #RWEFN ;WAIT FOR COMPLETION
578 003004 116760 000000G 000052 MOVB IOSTBK,F.ERR(R0) ;SET ERROR IF ANY
579 003012 002415 BLT 30$ ;BRANCH IF ERROR
580 003014 026767 000002G 000016' CMP IOSTBK+2,QIODPB+Q.XFSZ ;ALL BYTES TRANSFERRED?
581 003022 001021 BNE 50$ ;BRANCH IF NO, ERROR
582 003024 RETURN
583 003026 013760 000000G 000052 20$: MOV @#$DSW,F.ERR(R0) ;PICK UP REASON FOR QI/O FAILURE
584 003034 022760 000000G 000052 CMP #IE.UPN,F.ERR(R0) ;OUT OF DYNAMIC MEMORY?
585 003042 001405 BEQ 40$ ;YES, WAIT AND TRY AGAIN
586 003044 000413 BR 60$
587 003046 122760 177751 000052 30$: CMPB #IE.NOD,F.ERR(R0) ;NO DYNAMIC MEMORY AVAILABLE?
588 003054 001007 BNE 60$
589 003056 40$: WSIG$S ;YES, WAIT AND TRY AGAIN
590 003064 000734 BR 10$
591 003066 112760 177761 000052 50$: MOVB #IE.ABO,F.ERR(R0) ;FAILED TO TRANSFER DESIRED COUNT, ABORT
592 003074 000261 60$: SEC
593 003076 RETURN
594
595 ;
596 ;
597 000001 .END
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 15-2
SYMBOL TABLE
APPDBT= ****** GX CS.WLD= 000010 F.BKEF= 000050 IE.DFU= 177750 ISOPEN 001532R 004
BLKBIT= ****** GX CWLDUI= ****** GX F.BKP1= 000051 IE.DNA= 177771 IS.BV = 000005
BLKCNT= ****** GX C.CMLD= 000002 F.BKST= 000024 IE.DNR= 177775 IS.CR = 006401
CERR1 002314R 004 C.DEVD= 000006 F.BKVB= 000064 IE.DUN= 177767 IS.ESC= 015401
CERR13 002540R 004 C.DIRD= 000012 F.CNTG= 000034 IE.DUP= 177707 IS.PND= 000000
CERR2 002134R 004 C.DSDS= 000006 F.DFNB= 000046 IE.EBX= 177776 IS.RDD= 000002
CERR3 002210R 004 C.FILD= 000016 F.DSPT= 000044 IE.EOF= 177766 IS.SUC= 000001
CERR51 002522R 004 C.MKW1= 000024 F.DVNM= 000134 IE.EOT= 177702 LPHDMG= 000000R 002
CERR52 002236R 004 C.MKW2= 000026 F.EFBK= 000010 IE.EOV= 177765 LPHDSZ= 000001
CERR53 002220R 004 C.SIZE= 000054 F.EFN = 000050 IE.EXP= 177676 MERGBT= ****** GX
CERR6 002334R 004 C.STAT= 000001 F.EOBB= 000032 IE.FEX= 177717 NAMBLK= ****** GX
CLOSX = ****** GX C.SWAD= 000022 F.ERR = 000052 IE.FHE= 177705 NB.DEV= 000200
CLSIN = ****** GX C.TYPR= 000000 F.FACC= 000043 IE.FOP= 177713 NB.DIR= 000100
CLSOUT= ****** GX DI06MG= ****** GX F.FFBY= 000014 IE.HFU= 177744 NB.NAM= 000004
CMDWRD= ****** GX DI06SZ= ****** GX F.FNAM= 000110 IE.IFC= 177776 NB.SDI= ****** GX
CNTGBT= ****** GX DY01MG= ****** GX F.FNB = 000102 IE.IFU= 177747 NB.SD1= 000400
COPY 000000RG 004 DY01SZ= ****** GX F.FTYP= 000116 IE.ILL= 177726 NB.SD2= 001000
COPYGO 002052R 004 EXTSIZ 001146R 004 F.FVER= 000120 IE.ISQ= 177703 NB.SFL= ****** GX
COPYX 002352R 004 FA.APD= 000100 F.HIBK= 000004 IE.LCK= 177745 NB.SFN= ****** GX
COPY1 000454R 004 FA.CRE= 000010 F.LUN = 000042 IE.MBK= 177721 NB.SNM= 000040
COPY2 000324R 004 FA.EXT= 000004 F.MBCT= 000054 IE.MOD= 177753 NB.STP= 000020
CPYBLK 002550R 004 FA.NSP= 000100 F.MBC1= 000055 IE.NBF= 177731 NB.SVR= 000010
CPYCTL= ****** GX FA.RD = 000001 F.MBFG= 000056 IE.NBK= 177727 NB.TYP= 000002
CPYEOF 002324R 004 FA.SHR= 000040 F.NRBD= 000024 IE.NFI= 177704 NB.VER= 000001
CPYNXT 002344R 004 FA.TMP= 000020 F.NREC= 000030 IE.NLN= 177733 NMBLK1= ****** GX
CPYNX1 002504R 004 FA.WRT= 000002 F.OVBS= 000030 IE.NNC= 177674 NTCNTG= ****** GX
CPYOPN 001046R 004 FDBIN = ****** GX F.RACC= 000016 IE.NOD= 177751 NVERBT= ****** GX
CPYWLD 000430R 004 FDBOUT= ****** GX F.RATT= 000001 IE.NSF= 177746 NXTFIL= ****** GX
CP01MG= ****** GX FD.BLK= 000010 F.RCNM= 000034 IE.OFL= 177677 NXTIN = ****** GX
CP01SZ= ****** GX FD.CCL= 000002 F.RCTL= 000017 IE.ONP= 177773 N.DEVD= 000000
CP02MG= ****** GX FD.CR = 000002 F.RSIZ= 000002 IE.OVR= 177756 N.DID = 000024
CP02SZ= ****** GX FD.DIR= 000010 F.RTYP= 000000 IE.PRI= 177760 N.DIRD= 000004
CP03MG= ****** GX FD.FTN= 000001 F.STBK= 000036 IE.RAC= 177724 N.DVNM= 000032
CP03SZ= ****** GX FD.INS= 000010 F.UNIT= 000136 IE.RAT= 177723 N.FID = 000000
CP04MG= ****** GX FD.PLC= 000004 F.URBD= 000020 IE.RBG= 177730 N.FLID= 000016
CP04SZ= ****** GX FD.RAH= 000001 F.VBN = 000064 IE.RCN= 177722 N.FNAM= 000006
CP05MG= ****** GX FD.RAN= 000002 F.VBSZ= 000060 IE.RER= 177740 N.FNMD= 000010
CP05SZ= ****** GX FD.REC= 000001 HA.UI = ****** GX IE.RNM= 177715 N.FTYP= 000014
CP10MG= ****** GX FD.RWM= 000001 IE.ABO= 177761 IE.RSU= 177757 N.FVER= 000016
CP10SZ= ****** GX FD.SDI= 000020 IE.ALN= 177736 IE.SNC= 177735 N.NEXT= 000022
CP11MG= ****** GX FD.SQD= 000040 IE.BAD= 177777 IE.SPC= 177772 N.SPEC= 000014
CP11SZ= ****** GX FD.TTY= 000004 IE.BBE= 177710 IE.SQC= 177734 N.STAT= 000020
CP12MG= ****** GX FD.WBH= 000002 IE.BDI= 177714 IE.SRE= 177762 N.UNIT= 000034
CP12SZ= ****** GX FNDERR= ****** GX IE.BDR= 177716 IE.STK= 177706 OFNPT = ****** GX
CP13MG= ****** GX FNDNXT= ****** GX IE.BDV= 177711 IE.UPN= ****** GX OPENAU 001426R 004
CP13SZ= ****** GX FO.APD= 000106 IE.BHD= 177700 IE.VER= 177774 OPNCHK 001524R 004
CP14MG= ****** GX FO.MFY= 000002 IE.BLK= 177754 IE.WAC= 177743 OP01MG= ****** GX
CP14SZ= ****** GX FO.RD = 000001 IE.BNM= 177712 IE.WAT= 177741 OP01SZ= ****** GX
CP15MG= ****** GX FO.UPD= 000006 IE.BTF= 177675 IE.WER= 177737 OP02MG= ****** GX
CP15SZ= ****** GX FO.WRT= 000016 IE.BTP= 177725 IE.WLK= 177764 OP02SZ= ****** GX
CS.DIF= 000002 FRSTIM= ****** GX IE.BVR= 177701 IE.2DV= 177720 OP08MG= ****** GX
CS.DVF= 000004 F.ALOC= 000040 IE.BYT= 177755 IFNPT = ****** GX OP08SZ= ****** GX
CS.EQU= 000040 F.BBFS= 000062 IE.CKS= 177742 INRACC= ****** GX OURACC= ****** GX
CS.INP= 000001 F.BDB = 000070 IE.CLO= 177732 INSPEC= ****** GX OUSPEC= ****** GX
CS.MOR= 000020 F.BGBC= 000057 IE.CON= 177752 IOSTBK= ****** GX OUTOPN 001246R 004
CS.NMF= 000001 F.BKDN= 000026 IE.DAA= 177770 IO.RVB= ****** GX OWUIC = ****** GX
CS.OUT= 000002 F.BKDS= 000020 IE.DAO= 177763 IO.WVB= ****** GX PARSE = ****** GX
PIPCPY M0224, COPY COMMAND-PIP MACRO M1108 05-DEC-77 22:34 PAGE 15-3
SYMBOL TABLE
PAR$$$= 000002 RECATT= ****** GX STNMBK= ****** GX WRTATT= ****** GX .EXTND= ****** GX
PRSERR= ****** GX RWEFN = ****** GX S.APPD= 000010 X = 000026 .EXTSZ= ****** GX
PRSREG= ****** GX RWGO 002750R 004 S.FATT= 000016 $DSW = ****** GX .FOWNR= ****** GX
QIODPB 000000R 003 R$$DPB= 000001 S.FDB = 000140 $$ = 000067 .FSRPT= ****** GX
Q.IOAE= 000012 R$$DYM= 000001 S.FIDS= 000014 $$MSG = 000000 .GETSQ= ****** G
Q.IOEF= 000006 R$$EIS= 000000 S.FNAM= 000006 $$$ARG= 000013 .GFOWN= ****** GX
Q.IOFN= 000002 R$$MSG= 000000 S.FNB = 000036 $$$OST= 000014 .LCLSW= ****** GX
Q.IOLU= 000004 R$$11M= 000001 S.FNBW= 000017 .DYALC= ****** GX .OPFNB= ****** G
Q.IOPL= 000014 R.FIX = 000001 S.FNTY= 000004 .DYBLK= ****** GX .OULCL= ****** GX
Q.IOPR= 000007 R.VAR = 000002 S.FTYP= 000002 .DYBUF= ****** GX .PARSE= ****** GX
Q.IOSB= 000010 SPSDBT= ****** GX S.NFEN= 000020 .DYBYT= ****** GX .PUTSQ= ****** G
Q.XFAD= 000014 STBLK = ****** GX UPDTBT= ****** GX .DYREL= ****** GX ...GBL= 000000
Q.XFSZ= 000016 STNBK1= ****** GX VERSAV= ****** GX .DYSIZ= ****** GX ...TPC= 000140
Q.XFVB= 000022
. ABS. 000000 000
000000 001
MSGSTR 000001 002
IMPURE 000026 003
PURE$I 003100 004
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 7794 WORDS ( 31 PAGES)
DYNAMIC MEMORY: 8384 WORDS ( 32 PAGES)
ELAPSED TIME: 00:01:45
[43,10]PIPCPY,[43,20]PIPCPY/-SP=[43,30]PIPMAC,PIPCPY
PIPDEF M0004, SET DEFAULT COMMA MACRO M1108 05-DEC-77 22:36
TABLE OF CONTENTS
7- 1 **** PIPDEF VERSION M0004 ****
PIPDEF M0004, SET DEFAULT COMMA MACRO M1108 05-DEC-77 22:36 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 22:36 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 22:36 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
[43,10]PIPDEF,[43,20]PIPDEF/-SP=[43,30]PIPMAC,PIPDEF
PIPDEL M0211, DELETE & REMOVE C MACRO M1108 05-DEC-77 22:36
TABLE OF CONTENTS
7- 1 **** PIPDEL VERSION M0211 ****
PIPDEL M0211, DELETE & REMOVE C MACRO M1108 05-DEC-77 22:36 PAGE 7
1 .TITLE PIPDEL M0211, DELETE & REMOVE COMMANDS-PIP
.SBTTL **** PIPDEL VERSION M0211 ****
.IDENT /M0211/
2 ; ALTERED:
3 ; ANDREW C. GOLDSTEIN 28 JAN 1975 14:00
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 001150 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 M0211, DELETE & REMOVE C MACRO M1108 05-DEC-77 22:36 PAGE 7-1
**** PIPDEL VERSION M0211 ****
53 000116 001127 BNE DELPUR ;BRANCH IF YES
54 000120 CALL WLDVER ;DISALLOW WILD CARDS WITH DEFAULT VER
55 000124 103512 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 000502 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 103423 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 000452 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 001443 BEQ DELNXT
81 ;
82 ; FILE PROCESSOR WRITE ERROR FROM REMOVE PROBABLY MEANS THAT
83 ; THE VOLUME IS WRITE LOCKED, STOP TRYING TO DELETE FILES.
84 ;
85 000244 122705 000000G CMPB #IE.WER,R5
86 000250 001403 BEQ 35$ ;BRANCH IF WRITE ERROR
87 000252 122705 000000G CMPB #IE.PRI,R5
88 000256 001357 BNE 25$ ;BRANCH IF CONTINUING WITH THIS SPEC
89 000260 000167 000000G 35$: JMP CLOSX ;TERMINATE THE DELETE OPERATION
90 ;
91 ; FAILED TO MARK FILE FOR DELETION
92 000264 40$: ERROUT DE01,0,0
000264 104426 TRAP X
000266 000000G .WORD DE01SZ
000270 000000G .WORD DE01MG
93 ;
94 ; NOW REENTER THE REMOVED DIRECTORY ENTRY TO FIX THINGS UP
95 000272 012700 000000G MOV #FDBOUT,R0
96 000276 016002 000000G MOV F.DSPT(R0),R2
97 000302 005762 000016 TST N.FLID(R2)
98 000306 001021 BNE DELNXT ;IF EXPLICIT FILE ID, SKIP THIS
99 000310 012701 000000C MOV #FDBOUT+F.FNB,R1
100 000314 016146 000000G MOV N.NEXT(R1),-(SP) ;SAVE FIND/REMOVE NEXT POINTER
101 000320 CALL .ENTER
102 000324 012661 000000G MOV (SP)+,N.NEXT(R1)
103 000330 103332 BCC 25$ ;BRANCH IF REENTER WORKED
PIPDEL M0211, DELETE & REMOVE C MACRO M1108 05-DEC-77 22:36 PAGE 7-2
**** PIPDEL VERSION M0211 ****
104 ;
105 ; NOW WE REALLY HAVE TROUBLE, COULDN'T PUT DIRECTORY ENTRY BACK
106 ; FILE IS LOST, SHOULD AT LEAST TYPE FILE ID - BUT NOT YET DOING SO
107 000332 ERROUT DE02,0,0
000332 104426 TRAP X
000334 000000G .WORD DE02SZ
000336 000000G .WORD DE02MG
108 ;
109 ; SET UP TO GO DO THE NEXT FILE
110 000340 012700 000000G MOV #FDBOUT,R0
111 000344 012701 000000C MOV #FDBOUT+F.FNB,R1
112 000350 000722 BR 25$
113 ; GO GET THE NEXT FILE SPECIFIER IF ANY MORE IN THE LIST
114 000352 012767 000001 000000G DELNXT: MOV #1,PURGCT
115 000360 CALL NXTOUT
116 000364 103402 BCS 10$
117 000366 000167 177412 JMP DELET1 ;GO DO THE NEXT FILE SPECIFIER
118 000372 000167 000000G 10$: JMP AGAIN ;NO MORE FILES IN LIST
119 ;
120 ; PURGE MODE FOR THIS FILE SPECIFIER (LOCAL SWITCH)
121 ; DELETE ALL BUT THE MOST RECENT VERSION OF THE SPECIFIED
122 ; FILE(S). IF THE OPTIONAL VALUE IS SPECIFIED, THEN IF N IS
123 ; THE MOST RECENT VERSION AND M IS THE VALUE, THEN VERSION N-M+1
124 ; THOUGH VERSION N WILL NOT BE DELETED. I.E THE MOST RECENT M
125 ; VERSIONS WILL NOT BE DELETED WHERE THE VERSIONS ARE ASSUMED
126 ; CONSECUTIVELY NUMBERED
127 000376 052761 000000G 000000G DELPUR: BIS #NB.SVR,N.STAT(R1) ;USER NEED NOT TYPE WILD VERSION
128 000404 10$: CALL FNDNXT ;FIND THE NEXT FILE IN THE CLASS
129 000410 103503 BCS 80$
130 000412 042767 000000G 000000G BIC #FRSTIM,CPYCTL
131 000420 016146 000000G MOV N.NEXT(R1),-(SP) ;SAVE FIND NEXT POINTER
132 000424 016146 000000G MOV N.STAT(R1),-(SP) ;AND STATUS BITS
133 000430 005061 000000G CLR N.NEXT(R1) ;START AT BEGINNING OF DIRECTORY
134 000434 005061 000000G CLR N.STAT(R1) ;NO WILD CARDS
135 000440 005061 000000G CLR N.FVER(R1) ;FIND THE MOST RECENT VERSION NO.
136 000444 CALL FINDFL
137 000450 103466 BCS 85$
138 000452 016105 000000G MOV N.FVER(R1),R5 ;SAVE THE NEWEST VERSION
139 000456 166705 000000G SUB PURGCT,R5 ;R5=HIGHEST DELETABLE VERSION
140 000462 003443 BLE 28$ ;BRANCH IF NONE TO DELETE IN THIS CLASS
141 000464 005061 000000G CLR N.NEXT(R1)
142 000470 052760 000000G 000000C 20$: BIS #NB.SVR,F.FNB+N.STAT(R0) ;FIND WILD CARD VERSION
143 000476 25$: CALL FINDFL
144 000502 103436 BCS 30$
145 000504 026105 000000G CMP N.FVER(R1),R5
146 000510 101372 BHI 25$ ;BRANCH IF TOO NEW TO DELETE
147 000512 016146 000000G MOV N.NEXT(R1),-(SP)
148 000516 005061 000000G CLR N.NEXT(R1)
149 000522 005061 000000G CLR N.STAT(R1)
150 000526 DELET$ R0 ;DELETE THIS ONE
151 000532 012661 000000G MOV (SP)+,N.NEXT(R1)
152 000536 103354 BCC 20$ ;GO FIND THE NEXT ONE
153 ;
154 ; ERROR FROM DELETE
155 000540 010046 MOV R0,-(SP)
156 000542 010546 MOV R5,-(SP)
157 000544 ERROUT DE09,0,0
PIPDEL M0211, DELETE & REMOVE C MACRO M1108 05-DEC-77 22:36 PAGE 7-3
**** PIPDEL VERSION M0211 ****
000544 104426 TRAP X
000546 000000G .WORD DE09SZ
000550 000000G .WORD DE09MG
158 000552 012605 MOV (SP)+,R5
159 000554 012600 MOV (SP)+,R0
160 ;
161 ; FILE PROCESSOR WRITE ERROR AT THIS POINT PROBABLY MEANS THAT THE
162 ; VOLUME IS WRITE LOCKED, STOP THE DELETE LOOP NOW.
163 ;
164 000556 122767 000000G 000000C CMPB #IE.WER,FDBOUT+F.ERR
165 000564 001341 BNE 20$
166 000566 000167 000000G JMP CLOSX
167 000572 112760 000000G 000000G 28$: MOVB #IE.NSF,F.ERR(R0)
168 ;
169 ; DONE PURGING THIS FILE NAME, GO GET ANOTHER
170 000600 012661 000000G 30$: MOV (SP)+,N.STAT(R1)
171 000604 012661 000000G MOV (SP)+,N.NEXT(R1)
172 000610 122760 000000G 000000G CMPB #IE.NSF,F.ERR(R0)
173 000616 001672 BEQ 10$
174 ;
175 ; FILE NOT FOUND, PROBABLY ALL DONE
176 000620 80$: CALL FNDERR
177 000624 000652 BR DELNXT
178 000626 062706 000004 85$: ADD #4,SP
179 000632 000772 BR 80$
180
181 ;
182 ;
183 000001 .END
PIPDEL M0211, DELETE & REMOVE C MACRO M1108 05-DEC-77 22:36 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 000352R 002 FINDFL= ****** GX NB.SVR= ****** GX PRSERR= ****** GX USEFID= ****** GX
DELPUR 000376R 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 000634 002
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 3108 WORDS ( 13 PAGES)
DYNAMIC MEMORY: 4160 WORDS ( 16 PAGES)
ELAPSED TIME: 00:00:21
[43,10]PIPDEL,[43,20]PIPDEL/-SP=[43,30]PIPMAC,PIPDEL
PIPDIR M0216, LIST DIRECTORY CO MACRO M1108 05-DEC-77 22:37
TABLE OF CONTENTS
7- 1 **** PIPDIR VERSION M0216 ****
PIPDIR M0216, LIST DIRECTORY CO MACRO M1108 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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 05-DEC-77 22:37 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
[43,10]PIPDIR,[43,20]PIPDIR/-SP=[43,30]PIPMAC,PIPDIR
PIPFRE M0105, PIP - PRINT FREE MACRO M1108 05-DEC-77 22:38
TABLE OF CONTENTS
7- 1 **** PIPFRE VERSION M0105 ****
8- 49 PRINT FREE SPACE ON VOLUME
10- 225 FORMAT STRINGS
PIPFRE M0105, PIP - PRINT FREE MACRO M1108 05-DEC-77 22:38 PAGE 7
1 .TITLE PIPFRE M0105, PIP - PRINT FREE SPACE ON VOLUME
.SBTTL **** PIPFRE VERSION M0105 ****
.IDENT /M0105/
2 ; ALTERED WEDNESDAY 8-JAN-75 12:30
3 ; ALTERED TUESDAY 19-NOV-74 16:40
4 ;
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 8-NOV-74
20 ;
21 000000 FLDSOF ;DEFINE DESCRIPTOR POINTER OFFSETS
22 .MCALL CSI$
23 000000 CSI$ ;DEFINE THE CSI CONTROL BLOCK OFFSETS
24
25 .IF GT,R$$11M
26 .MACRO OPEN$ FDB,FACC
27 .MCALL OFNB$
28 OFNB$ FDB,<FACC>
29 .ENDM OPEN$
30 .ENDC
31
32 .MCALL CALL,RETURN,FDOP$R,FDAT$R,FDRC$R,FDBK$R,NMBLK$
33 .MCALL OPEN$,QIO$S,WTSE$S,READ$,WAIT$
34
35 000000 IMPURE
36 000000 MAXLBN: .BLKW 2 ;MAXIMUM NO. OF BLOCKS ON VOLUME
37 000004 NBTBLK: .BLKW 1 ;NO. OF BIT MAP BLOCKS ON VOLUME
38 000006 MOPRM: .BLKW 2 ;PARAMETER STORAGE FOR CALL TO EDTMG
39
40
41 000012 PURE.D
42
43 000000 FRDFNB: NMBLK$ BITMAP,SYS,1,SY,0
44
45 000000 .PSECT
46
47 000000 MSG MFDN,<[0,0]>
PIPFRE M0105, PIP - PRINT FREE MACRO M1108 05-DEC-77 22:38 PAGE 8
PRINT FREE SPACE ON VOLUME
49 .SBTTL PRINT FREE SPACE ON VOLUME
50
51 000000 PURE.I
52
53 000000 .FREE::
54 000000 005767 000000G TST INSPEC ;NO INPUT SPECIFER ALLOWED
55 000004 001142 BNE 90$ ;BRANCH IF SYNTAX ERROR
56 000006 032767 000033 000000G BIT #CS.DIF!CS.NMF!CS.WLD!CS.MOR,OUSPEC
57 000014 001136 BNE 90$ ;BRANCH IF SYNTAX ERROR
58 000016 012701 001000 MOV #1000,R1
59 000022 CALL .DYALC ;ALLOCATE A BUFFER TO READ THE BITMAP
60 000026 FDRC$R #FDBIN,#FD.RWM
61 000040 FDBK$R R0,.DYBUF,#1000
62 000054 FDOP$R R0,,#OFNPT,#FRDFNB
63 000070 012760 000000G 000000G MOV #STBLK,F.STBK(R0) ;READ STATISTICS BLOCK ON OPEN
64 000076 012767 000005 000004G MOV #MFDNSZ,OFNPT+N.DIRD ;FORCE MFD DIRECTORY NAME
65 000104 012767 000000' 000006G MOV #MFDNMG,OFNPT+N.DIRD+2
66
67 .IF GT,R$$11M
68 000112 CALL PRSREG ;SET UP FOR CALL TO PARSE
69 000116 CALL .PARSE
70 000122 103004 BCC 20$ ;BRANCH IF SUCCESSFUL
71 000124 CALL PRSERR ;ISSUE THE ERROR MESSAGE
72 000130 000167 000000G JMP CLOSX
73 000134 20$:
74 .ENDC
75
76 000134 OPEN$ R0,#FO.RD!FA.SHR
77 000146 103003 BCC 60$
78 000150 50$: ERROUX FR01,1,0 ;FAILED TO OPEN BITMAP FILE
000150 104433 TRAP X
000152 000000G .WORD FR01SZ
000154 000000G .WORD FR01MG
79 000156 016705 000006G 60$: MOV STBLK+6,R5
80 000162 010560 000002G MOV R5,F.HIBK+2(R0) ;FIX UP FDB SO EOF IS RIGHT
81 000166 005205 INC R5
82 000170 010560 000002G MOV R5,F.EFBK+2(R0) ;EOF = 1ST BYTE OF NEXT BLOCK
83 000174 005060 000000G CLR F.FFBY(R0)
84 000200 READ$ R0 ;READ VBN 1
85 000204 103445 BCS RDERR
86 000206 WAIT$ R0
87 000212 103442 BCS RDERR ;BRANCH IF ERROR
88 000214 016701 000000G MOV .DYBUF,R1
89 000220 116103 000003 MOVB 3(R1),R3 ;NO. OF BIT MAP BLOCKS
90 000224 010367 000004' MOV R3,NBTBLK
91 000230 006303 ASL R3 ;CALCULATE ADDRESS OF MAXLBN
92 000232 006303 ASL R3
93 000234 060301 ADD R3,R1
94 000236 062701 000004 ADD #4,R1 ;4 PLUS 2 WORDS FOR EACH BIT MAP BLOCK
95 000242 012167 000000' MOV (R1)+,MAXLBN
96 000246 011167 000002' MOV @R1,MAXLBN+2
97 ;
98 ; R0=FDB ADDRESS OF BITMAP, FILE IS OPEN
99 000252 CALL MAPFRE ;GET COUNT OF FREE BLOCKS
100 000256 012703 000006' MOV #MOPRM,R3
101 000262 010304 MOV R3,R4
102 000264 010013 MOV R0,@R3
PIPFRE M0105, PIP - PRINT FREE MACRO M1108 05-DEC-77 22:38 PAGE 8-1
PRINT FREE SPACE ON VOLUME
103 000266 062723 000000G ADD #F.DVNM,(R3)+ ;ADDRESS OF DEVICE NAME
104 000272 016023 000000G MOV F.UNIT(R0),(R3)+ ;UNIT NUMBER
105 000276 012703 000053' MOV #LO45MG,R3
106 000302 CALL PRTFRE
107 000306 000167 000000G JMP CLOSX
108 000312 90$: ERROUX CR01 ;SYNTAX ERROR
000312 104403 TRAP X
000314 000000G .WORD CR01SZ
000316 000000G .WORD CR01MG
109 000320 RDERR: ERROUX CP13,0,0 ;READ ERROR
000320 104427 TRAP X
000322 000000G .WORD CP13SZ
000324 000000G .WORD CP13MG
PIPFRE M0105, PIP - PRINT FREE MACRO M1108 05-DEC-77 22:38 PAGE 9
PRINT FREE SPACE ON VOLUME
111 ;+
112 ; PRINT THE FREE BLOCK INFORMATION
113 ; CALLING SEQUENCE:
114 ; CALL PRTFRE
115 ; INPUTS:
116 ; R1,R2 = FREE BLOCK COUNT (R2 = LOW ORDER BITS)
117 ; R3=FORMAT STRING FOR INITIAL MESSAGE
118 ; R4=PARAMETER BLOCK ADDRESS FOR INITIAL MESSAGE
119 ; MAXLBN, MAXLBN+2 = TOTAL BLOCKS ON DEVICE
120 ; OUTPUTS:
121 ; ALL REGISTERS ALTERED
122 ; OPERATION:
123 ; CALL EDMSG WITH FIRST PART OF MESSAGE AS SPECIFIED IN
124 ; THE FORAMT STRING AND PARAMETER BLOCK ADDRESS
125 ; THEN IT FORMATS THE STRING:
126 ; NNN. BLOCKS FREE, NNN. BLOCKS USED OUT OF NNN.
127 ; WHERE THE NNN VALUES ARE ALL COVERTED FROM DOUBLE PRECISION BINARY
128 ;-
129 000326 010246 PRTFRE: MOV R2,-(SP)
130 000330 010146 MOV R1,-(SP) ;SP = ADR OF DBL PRECISION FREE COUNT
131 000332 010301 MOV R3,R1 ;SET UP TO CALL EDMSG
132 000334 010402 MOV R4,R2
133 000336 012700 000000G MOV #LINBUF,R0 ;CONVERTS STRING INTO OUTPUT BUFFER
134 000342 CALL $EDMSG
135 000346 010601 MOV SP,R1 ;R1=ADR OF 2 WORD FREE COUNT
136 000350 005002 CLR R2 ;ZERO SUPPRESS
137 000352 CALL $CDDMG ;CONVERT DBL PRECISION TO DECIMAL MAG
138 000356 012701 000005' MOV #LO40MG,R1
139 000362 005002 CLR R2
140 000364 CALL $EDMSG ;". BLOCKS FREE "
141 ;
142 ; CALCULATE HOW MANY BLOCKS ARE USED
143 000370 016701 000000' MOV MAXLBN,R1
144 000374 016702 000002' MOV MAXLBN+2,R2
145 000400 166602 000002 SUB 2(SP),R2
146 000404 005601 SBC R1
147 000406 162601 SUB (SP)+,R1
148 000410 010216 MOV R2,@SP
149 000412 010146 MOV R1,-(SP)
150 000414 010601 MOV SP,R1 ;R1=ADR OF 2 WORD USED COUNT
151 000416 005002 CLR R2 ;ZERO SUPPRESS
152 000420 CALL $CDDMG ;CONVERT TO MAGNITUDE DECIMAL
153 000424 022626 CMP (SP)+,(SP)+ ;CLEAR 2 WORDS FROM STACK
154 000426 012701 000025' MOV #LO41MG,R1
155 000432 005002 CLR R2
156 000434 CALL $EDMSG ;". BLOCKS USED OUT OF "
157 000440 012701 000000' MOV #MAXLBN,R1 ;R1=ADR OF 2 WORD TOTAL BLOCK COUNT
158 000444 005002 CLR R2
159 000446 CALL $CDDMG
160 000452 112720 000056 MOVB #'.,(R0)+
161 000456 112720 000015 MOVB #15,(R0)+ ;ADD CR
162 000462 112720 000012 MOVB #12,(R0)+ ;AND LF
163 000466 162700 000000G SUB #LINBUF,R0 ;R0=NO. OF BYTES TO WRITE
164 000472 QIO$S #IO.WVB,#CMOLUN,#FNAEFN,,,,<#LINBUF,R0,#0>
165 000532 103405 BCS 20$
166 000534 WTSE$S #FNAEFN
167 000546 20$: RETURN
PIPFRE M0105, PIP - PRINT FREE MACRO M1108 05-DEC-77 22:38 PAGE 10
PRINT FREE SPACE ON VOLUME
169 ;
170 ; COUNT THE FREE BLOCKS IN A BIT MAP
171 ; INPUTS:
172 ; R0=FDB OF DESIRED BIT MAP
173 ; FBTBLK = FIRST VBN OF BIT MAP BLOCKS
174 ; NBTBLK = NO. OF BIT MAP BLOCKS
175 ; OUTPUTS:
176 ; R1,R2=NO. OF FREE BLOCKS
177 ; R0 PRESERVED, R3-R5 ALTERED
178 000550 010046 MAPFRE: MOV R0,-(SP)
179 000552 016704 000000' MOV MAXLBN,R4
180 000556 016705 000002' MOV MAXLBN+2,R5 ;NUMBER OF BLOCKS TO CHECK
181 000562 016703 000004' MOV NBTBLK,R3 ;NUMBER OF BIT MAP BLOCKS
182 000566 005002 CLR R2
183 000570 005001 CLR R1
184 000572 011600 10$: MOV @SP,R0
185 000574 CALL BITCNT
186 000600 060002 ADD R0,R2
187 000602 005501 ADC R1
188 000604 162705 010000 SUB #10000,R5
189 000610 005604 SBC R4
190 000612 SOB R3,10$
191 000616 012600 MOV (SP)+,R0
192 000620 RETURN
193 ;
194 ; COUNT THE FREE BLOCKS IN THE BIT MAP BLOCK ABOUT TO BE READ
195 ; INPUTS:
196 ; R0=FDB OF BIT MAP FILE, RECORD NUMBER SET TO NEXT BLOCK TO READ
197 ; R4,R5=NO. OF LOGICAL BLOCKS LEFT TO CHECK IN BITMAP
198 ; OUTPUTS:
199 ; R0=COUNT OF FREE BLOCKS
200 ; R1-R5 PRESERVED
201 000622 BITCNT: READ$ R0
202 000626 103434 BCS 60$
203 000630 WAIT$ R0
204 000634 103431 BCS 60$
205 000636 004567 000000G JSR R5,.SAVR1 ;SAVE REGISTERS R1-R5
206 000642 005000 CLR R0 ;INIT FREE BLOCK COUNTER
207 000644 005704 TST R4 ;IF HIGH ORDER BITS OF LBN COUNT NOT 0
208 000646 001402 BEQ 10$
209 000650 012705 010000 MOV #10000,R5 ;GUARANTEE THAT WE CHECK ALL BITS
210 000654 012704 000400 10$: MOV #256.,R4 ;NO. OF WORDS
211 000660 016703 000000G MOV .DYBUF,R3 ;R3=ADDRESS OF BITMAP BLOCK
212 000664 012702 000020 20$: MOV #16.,R2 ;NO. OF BITS PER WORD
213 000670 012301 MOV (R3)+,R1 ;GET NEXT WORD TO R1
214 000672 000241 30$: CLC
215 000674 006001 ROR R1
216 000676 103001 BCC 40$
217 000700 005200 INC R0 ;COUNT BITS THAT ARE ON
218 000702 005305 40$: DEC R5
219 000704 001404 BEQ 50$ ;BRANCH IF RUN OUT OF BLOCKS TO CHECK
220 000706 SOB R2,30$
221 000712 SOB R4,20$
222 000716 50$: RETURN
223 000720 000167 177374 60$: JMP RDERR
224
225 .SBTTL FORMAT STRINGS
PIPFRE M0105, PIP - PRINT FREE MACRO M1108 05-DEC-77 22:38 PAGE 10-1
FORMAT STRINGS
226 000000 .PSECT
227
228 000000 MSGZ LO40,<. BLOCKS FREE, >
229 000000 MSGZ LO41,<. BLOCKS USED OUT OF >
230 000000 MSGZ LO45,<%N%N%2A%O: HAS >
231 .EVEN
232 ;
233 ;
234 000001 .END
PIPFRE M0105, PIP - PRINT FREE MACRO M1108 05-DEC-77 22:38 PAGE 10-2
SYMBOL TABLE
BITCNT 000622R 005 C.STAT= 000001 IO.WVB= ****** GX N.FVER= 000016 S.FNBW= 000017
CLOSX = ****** GX C.SWAD= 000022 LINBUF= ****** GX N.NEXT= 000022 S.FNTY= 000004
CMOLUN= ****** GX C.TYPR= 000000 LO40MG= 000005R 004 N.SPEC= 000014 S.FTYP= 000002
CP13MG= ****** GX FA.SHR= ****** GX LO40SZ= 000020 N.STAT= 000020 S.NFEN= 000020
CP13SZ= ****** GX FDBIN = ****** GX LO41MG= 000025R 004 N.UNIT= 000034 X = 000027
CR01MG= ****** GX FD.RWM= ****** GX LO41SZ= 000026 OFNPT = ****** GX $CDDMG= ****** GX
CR01SZ= ****** GX FNAEFN= ****** GX LO45MG= 000053R 004 OUSPEC= ****** GX $EDMSG= ****** GX
CS.DIF= 000002 FO.RD = ****** GX LO45SZ= 000020 PAR$$$= 000000 $$ = 000067
CS.DVF= 000004 FRDFNB 000000R 003 MAPFRE 000550R 005 PRSERR= ****** GX $$$ARG= 000003
CS.EQU= 000040 FR01MG= ****** GX MAXLBN 000000R 002 PRSREG= ****** GX $$$T1 = 000011
CS.INP= 000001 FR01SZ= ****** GX MFDNMG= 000000R 004 PRTFRE 000326R 005 .DYALC= ****** GX
CS.MOR= 000020 F.BKDS= ****** GX MFDNSZ= 000005 RDERR 000320R 005 .DYBUF= ****** GX
CS.NMF= 000001 F.DFNB= ****** GX MOPRM 000006R 002 R$$DPB= 000001 .FREE 000000RG 005
CS.OUT= 000002 F.DSPT= ****** GX NBTBLK 000004R 002 R$$DYM= 000001 .OPFNB= ****** G
CS.WLD= 000010 F.DVNM= ****** GX N.DEVD= 000000 R$$EIS= 000000 .PARSE= ****** GX
C.CMLD= 000002 F.EFBK= ****** GX N.DID = 000024 R$$MSG= 000000 .READ = ****** G
C.DEVD= 000006 F.FACC= ****** GX N.DIRD= 000004 R$$11M= 000001 .SAVR1= ****** GX
C.DIRD= 000012 F.FFBY= ****** GX N.DVNM= 000032 STBLK = ****** GX .WAIT = ****** G
C.DSDS= 000006 F.HIBK= ****** GX N.FID = 000000 S.APPD= 000010 ...PC1= 000000
C.FILD= 000016 F.RACC= ****** GX N.FLID= 000016 S.FIDS= 000014 ...PC2= 000034R 003
C.MKW1= 000024 F.STBK= ****** GX N.FNAM= 000006 S.FNAM= 000006 ...PC3= 000000
C.MKW2= 000026 F.UNIT= ****** GX N.FNMD= 000010 S.FNB = 000036 ...TPC= 000036
C.SIZE= 000054 INSPEC= ****** GX N.FTYP= 000014
. ABS. 000000 000
000000 001
IMPURE 000012 002
PURE$D 000036 003
MSGSTR 000073 004
PURE$I 000724 005
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 5384 WORDS ( 22 PAGES)
DYNAMIC MEMORY: 6272 WORDS ( 24 PAGES)
ELAPSED TIME: 00:00:44
[43,10]PIPFRE,[43,20]PIPFRE/-SP=[43,30]PIPMAC,PIPFRE
PIPPRO M0206, SET FILE PROTECTI MACRO M1108 05-DEC-77 22:39
TABLE OF CONTENTS
7- 1 **** PIPPRO VERSION M0206 ****
PIPPRO M0206, SET FILE PROTECTI MACRO M1108 05-DEC-77 22:39 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 05-DEC-77 22:39 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 05-DEC-77 22:39 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 05-DEC-77 22:39 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:22
[43,10]PIPPRO,[43,20]PIPPRO/-SP=[43,30]PIPMAC,PIPPRO
PIPREN M0206, RENAME AND ENTER MACRO M1108 05-DEC-77 22:39
TABLE OF CONTENTS
7- 1 **** PIPREN VERSION M0206 ****
PIPREN M0206, RENAME AND ENTER MACRO M1108 05-DEC-77 22:39 PAGE 7
1 .TITLE PIPREN M0206, RENAME AND ENTER COMMANDS-PIP
.SBTTL **** PIPREN VERSION M0206 ****
.IDENT /M0206/
2 ; ALTERED:
3 ; ANDREW C. GOLDSTEIN 17 JUL 75 16:36
4 ;
5 ; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
6 ; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
7
8 ; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
9 ; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
10 ; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
11 ; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
12
13 ; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
14 ; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
15 ; EQUIPMENT CORPORATION.
16
17 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
18 ; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
19 ;
20
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 M0206, RENAME AND ENTER MACRO M1108 05-DEC-77 22:39 PAGE 7-1
**** PIPREN VERSION M0206 ****
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 000546 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 000470 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 000446 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 M0206, RENAME AND ENTER MACRO M1108 05-DEC-77 22:39 PAGE 7-2
**** PIPREN VERSION M0206 ****
101 000432 103575 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 103571 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 010246 MOV R2,-(SP)
118 000476 040302 BIC R3,R2
119 000500 042603 BIC (SP)+,R3
120 000502 050302 BIS R3,R2
121 .ENDC
122
123 000504 032702 000044 BIT #NB.NAM!NB.SNM,R2 ;WILD CARD OR UNSPECIFIED NAME?
124 000510 001411 BEQ 20$ ;BRANCH IF NO
125 000512 016061 000110 000006 MOV F.FNAM(R0),N.FNAM(R1) ;USE DEFAULT NAME
126 000520 016061 000112 000010 MOV F.FNAM+2(R0),N.FNAM+2(R1)
127 000526 016061 000114 000012 MOV F.FNAM+4(R0),N.FNAM+4(R1)
128 000534 012703 000002 20$: MOV #NB.TYP,R3
129 .IF GT,R$$EIS
130 XOR R3,R2
131 .IFF
132 000540 010246 MOV R2,-(SP)
133 000542 040302 BIC R3,R2
134 000544 042603 BIC (SP)+,R3
135 000546 050302 BIS R3,R2
136 .ENDC
137
138 000550 032702 000022 BIT #NB.TYP!NB.STP,R2 ;WILD CARD OR UNSPECIFIED TYPE?
139 000554 001403 BEQ 30$ ;BRANCH IF NO
140 000556 016061 000116 000014 MOV F.FTYP(R0),N.FTYP(R1) ;USE DEFAULT TYPE
141 000564 012703 000001 30$: MOV #NB.VER,R3
142
143 .IF GT,R$$EIS
144 XOR R3,R2
145 .IFF
146 000570 010246 MOV R2,-(SP)
147 000572 040302 BIC R3,R2
148 000574 042603 BIC (SP)+,R3
149 000576 050302 BIS R3,R2
150 .ENDC
151
152 000600 032702 000011 BIT #NB.VER!NB.SVR,R2 ;WILD CARD OR UNSPECIFIED VERSION?
153 000604 001403 BEQ 40$ ;BRANCH IF NO
154 000606 016061 000120 000016 MOV F.FVER(R0),N.FVER(R1) ;USE DEFAULT VERSION
155 ;
156 ; IF OUTPUT DIRECTORY IS WILD CARD OR NULL, USE INPUT DIRECTORY
157 000614 012703 000100 40$: MOV #NB.DIR,R3
PIPREN M0206, RENAME AND ENTER MACRO M1108 05-DEC-77 22:39 PAGE 7-3
**** PIPREN VERSION M0206 ****
158 .IF GT,R$$EIS
159 XOR R3,R2
160 .IFF
161 000620 010246 MOV R2,-(SP)
162 000622 040302 BIC R3,R2
163 000624 042603 BIC (SP)+,R3
164 000626 050302 BIS R3,R2
165 .ENDC
166 000630 032702 000000C BIT #NB.DIR!NB.SDI,R2 ; CHECK FOR WILD OR DEFAULT UIC
167 000634 001411 BEQ 42$
168 000636 016061 000126 000024 MOV F.FNB+N.DID(R0),N.DID(R1)
169 000644 016061 000130 000026 MOV F.FNB+N.DID+2(R0),N.DID+2(R1)
170 000652 016061 000132 000030 MOV F.FNB+N.DID+4(R0),N.DID+4(R1)
171 000660 016061 000102 000000 42$: MOV F.FNB+N.FID(R0),N.FID(R1) ;SET FILE ID TO ENTER
172 000666 016061 000104 000002 MOV F.FNB+N.FID+2(R0),N.FID+2(R1)
173 000674 016061 000106 000004 MOV F.FNB+N.FID+4(R0),N.FID+4(R1)
174 000702 012700 000000G MOV #FDBOUT,R0
175 000706 032767 000000G 000000G BIT #NVERBT,CPYCTL ;IF NEW VERSION DESIRED
176 000714 001402 BEQ 44$
177 000716 005061 000016 CLR N.FVER(R1) ;ZERO THE VERSION TO BE ENTERED
178 000722 44$: CALL .ENTER
179 000726 103030 BCC 50$
180 ;
181 ; ERROR FROM ENTER, IF RENAMING, MUST REENTER THE ORIGINAL NAME
182 000730 116004 000052 MOVB F.ERR(R0),R4
183 000734 022704 177707 CMP #IE.DUP,R4 ;IF DUPLICATE ENTRY
184 000740 001002 BNE 45$
185 000742 012704 177717 MOV #IE.FEX,R4 ;USE FILE ALREADY EXITS ERROR
186 000746 45$: ERROUT RE02,0,R4
000746 104446 TRAP X
000750 000000G .WORD RE02SZ
000752 000000G .WORD RE02MG
187 000754 032767 000000G 000002G BIT #ENTRBT,CMDWRD+2
188 000762 001012 BNE 50$
189 000764 012700 000000G MOV #FDBIN,R0
190 000770 012701 000102G MOV #FDBIN+F.FNB,R1
191 000774 CALL .ENTER ;REENTER THE REMOVED ENTRY
192 001000 103003 BCC 50$
193 001002 ERROUT RE03,0,0 ;FILE IS LOST
001002 104426 TRAP X
001004 000000G .WORD RE03SZ
001006 000000G .WORD RE03MG
194 001010 012700 000000G 50$: MOV #FDBIN,R0
195 001014 CALL NXTFIL ;ANY MORE FILES IN THIS FILE SPECIFIER?
196 001020 103407 BCS RNMNXT ;BRANCH IF NO
197 001022 000167 177370 JMP 8$
198 ;
199 ; ERROR FROM REMOVE NEXT
200 001026 70$: CALL RMVERR
201 001032 000402 BR RNMNXT
202 ;
203 ; ERROR FROM FIND NEXT
204 001034 75$: CALL FNDERR ;OTHERWISE, NORMAL FIND ERROR
205 ;
206 ; GET NEXT INPUT FILE SPECIFIER TO RENAME
207 001040 RNMNXT: CALL NXTIN
208 001044 103002 BCC 10$
PIPREN M0206, RENAME AND ENTER MACRO M1108 05-DEC-77 22:39 PAGE 7-4
**** PIPREN VERSION M0206 ****
209 001046 000167 000000G JMP CLOSX
210 001052 000167 177170 10$: JMP RENAM1
211
212 ;
213 ;
214 000001 .END
PIPREN M0206, RENAME AND ENTER MACRO M1108 05-DEC-77 22:39 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 001040R 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 $$ = 000067
FD.FTN= 000001 F.RATT= 000001 IE.NFI= 177704 N.DID = 000024 $$MSG = 000000
FD.INS= 000010 F.RCNM= 000034 IE.NLN= 177733 N.DIRD= 000004 .ENTER= ****** GX
FD.PLC= 000004 F.RCTL= 000017 IE.NNC= 177674 N.DVNM= 000032 .LCLSW= ****** GX
FD.RAH= 000001 F.RSIZ= 000002 IE.NOD= 177751 N.FID = 000000 .OULCL= ****** GX
FD.RAN= 000002 F.RTYP= 000000 IE.NSF= 177746 N.FLID= 000016 ...GBL= 000000
FD.REC= 000001 F.STBK= 000036 IE.OFL= 177677 N.FNAM= 000006 ...TPC= 000140
FD.RWM= 000001 F.UNIT= 000136 IE.ONP= 177773 N.FNMD= 000010
. ABS. 000000 000
000000 001
PURE$I 001056 002
ERRORS DETECTED: 0
PIPREN M0206, RENAME AND ENTER MACRO M1108 05-DEC-77 22:39 PAGE 7-6
SYMBOL TABLE
VIRTUAL MEMORY USED: 6917 WORDS ( 28 PAGES)
DYNAMIC MEMORY: 8384 WORDS ( 32 PAGES)
ELAPSED TIME: 00:00:49
[43,10]PIPREN,[43,20]PIPREN/-SP=[43,30]PIPMAC,PIPREN
PIPSPL M0206, SPOOL COMMAND-PIP MACRO M1108 05-DEC-77 22:40
TABLE OF CONTENTS
7- 1 **** PIPSPL VERSION M0206 ****
PIPSPL M0206, SPOOL COMMAND-PIP MACRO M1108 05-DEC-77 22:40 PAGE 7
1 .TITLE PIPSPL M0206, SPOOL COMMAND-PIP
.SBTTL **** PIPSPL VERSION M0206 ****
.IDENT /M0206/
2 ; ALTERED:
3 ; ANDREW C. GOLDSTEIN 16 JUN 75 17: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 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 .IF LE,R$$11M
43 BIT #FIDBIT,CPYCTL ; CHECK FOR /FI SWITCH
44 BNE 80$ ; CAN'T DO IT - OUT
45 .ENDC
46 000024 CALL PARSE
47 000030 103431 BCS 60$
48 000032 016067 000120 000000G MOV F.FVER(R0),VERSAV
49 000040 016760 000000G 000120 10$: MOV VERSAV,F.FVER(R0)
50 000046 CALL FNDNXT
51 000052 103423 BCS 68$
52 000054 042767 000000G 000000G BIC #FRSTIM,CPYCTL
53 000062 OPEN$R R0 ;OPEN THE FILE
54 000074 103415 BCS 70$
55 ; SPOOL THE OPEN FILE FOR PRINTING, SPOOLER WILL CLOSE, PRINT AND
PIPSPL M0206, SPOOL COMMAND-PIP MACRO M1108 05-DEC-77 22:40 PAGE 7-1
**** PIPSPL VERSION M0206 ****
56 ; DELETE THE FILE
Q 57 000076 PRINT$ R0
58 000076 103422 BCS 75$
59 000100 20$: CLOSE$ R0 ;CERTAIN CONDITIONS WILL LEAVE IT OPEN
60 000104 CALL NXTFIL ;ANY MORE FILES IN THIS FILE SPEC?
61 000110 103420 BCS SPLNXT ;BRANCH IF NO
62 000112 000752 BR 10$ ;GO FIND THE NEXT FILE
63 ;
64 ; PARSE ERROR
65 000114 60$: CALL PRSERR
66 000120 000414 BR SPLNXT
67 ;
68 ; FAILED TO FIND FILE
69 000122 68$: CALL FNDERR
70 000126 000411 BR SPLNXT
71 ;
72 ; OPEN FAILURE
73 000130 70$: ERROUT OP01,0,0
000130 104426 TRAP X
000132 000000G .WORD OP01SZ
000134 000000G .WORD OP01MG
74 000136 012700 000000G MOV #FDBOUT,R0
75 000142 000756 BR 20$
76 ;
77 ; ERROR FROM PRINT$
78 000144 75$: ERROUT SP01,0
000144 104406 TRAP X
000146 000000G .WORD SP01SZ
000150 000000G .WORD SP01MG
79 .IF LE,R$$11M
80 BR SPLNXT
81 ;
82 ; ATTEMPT TO SPOOL FILE BY FILE ID - NOT SUPPORTED
83 80$: ERROUT SP02
84 .ENDC
85 ;
86 ; GO GET THE NEXT FILE IN THE LIST TO BE SPOOLED
87 000152 SPLNXT: CALL NXTOUT
88 000156 103402 BCS 10$
89 000160 000167 177632 JMP SPOOL1
90 000164 000167 000000G 10$: JMP CLOSX
91
92 ;
93 ;
94 000001 .END
PIPSPL M0206, SPOOL COMMAND-PIP MACRO M1108 05-DEC-77 22:40 PAGE 7-2
SYMBOL TABLE
CLOSX = ****** GX FNDERR= ****** GX F.ERR = 000052 NB.DEV= 000200 R$$DPB= 000001
CPYCTL= ****** GX FNDNXT= ****** GX F.FACC= 000043 NB.DIR= 000100 R$$DYM= 000001
FA.APD= 000100 FO.APD= 000106 F.FFBY= 000014 NB.NAM= 000004 R$$EIS= 000000
FA.CRE= 000010 FO.MFY= 000002 F.FNAM= 000110 NB.SD1= 000400 R$$11M= 000001
FA.EXT= 000004 FO.RD = 000001 F.FNB = 000102 NB.SD2= 001000 R.FIX = 000001
FA.NSP= 000100 FO.UPD= 000006 F.FTYP= 000116 NB.SNM= 000040 R.VAR = 000002
FA.RD = 000001 FO.WRT= 000016 F.FVER= 000120 NB.STP= 000020 SPLNXT 000152R 002
FA.SHR= 000040 FRSTIM= ****** GX F.HIBK= 000004 NB.SVR= 000010 SPOOL 000000RG 002
FA.TMP= 000020 FSTOUT= ****** GX F.LUN = 000042 NB.TYP= 000002 SPOOL1 000016R 002
FA.WRT= 000002 F.ALOC= 000040 F.MBCT= 000054 NB.VER= 000001 SP01MG= ****** GX
FDBOUT= ****** GX F.BBFS= 000062 F.MBC1= 000055 NXTFIL= ****** GX SP01SZ= ****** GX
FD.BLK= 000010 F.BDB = 000070 F.MBFG= 000056 NXTOUT= ****** GX S.FATT= 000016
FD.CCL= 000002 F.BGBC= 000057 F.NRBD= 000024 N.DID = 000024 S.FDB = 000140
FD.CR = 000002 F.BKDN= 000026 F.NREC= 000030 N.DVNM= 000032 S.FNAM= 000006
FD.DIR= 000010 F.BKDS= 000020 F.OVBS= 000030 N.FID = 000000 S.FNB = 000036
FD.FTN= 000001 F.BKEF= 000050 F.RACC= 000016 N.FNAM= 000006 S.FNBW= 000017
FD.INS= 000010 F.BKP1= 000051 F.RATT= 000001 N.FTYP= 000014 S.FNTY= 000004
FD.PLC= 000004 F.BKST= 000024 F.RCNM= 000034 N.FVER= 000016 S.FTYP= 000002
FD.RAH= 000001 F.BKVB= 000064 F.RCTL= 000017 N.NEXT= 000022 S.NFEN= 000020
FD.RAN= 000002 F.CNTG= 000034 F.RSIZ= 000002 N.STAT= 000020 VERSAV= ****** GX
FD.REC= 000001 F.DFNB= 000046 F.RTYP= 000000 N.UNIT= 000034 X = 000006
FD.RWM= 000001 F.DSPT= 000044 F.STBK= 000036 OP01MG= ****** GX $$ = 000067
FD.SDI= 000020 F.DVNM= 000134 F.UNIT= 000136 OP01SZ= ****** GX .CLOSE= ****** G
FD.SQD= 000040 F.EFBK= 000010 F.URBD= 000020 PARSE = ****** GX .OPFNB= ****** G
FD.TTY= 000004 F.EFN = 000050 F.VBN = 000064 PAR$$$= 000000 ...GBL= 000000
FD.WBH= 000002 F.EOBB= 000032 F.VBSZ= 000060 PRSERR= ****** GX ...TPC= 000140
. ABS. 000000 000
000000 001
PURE$I 000170 002
ERRORS DETECTED: 1
VIRTUAL MEMORY USED: 4407 WORDS ( 18 PAGES)
DYNAMIC MEMORY: 5216 WORDS ( 20 PAGES)
ELAPSED TIME: 00:00:28
[43,10]PIPSPL,[43,20]PIPSPL/-SP=[43,30]PIPMAC,PIPSPL
PIPUNL M0202, UNLOCK COMMAND-PI MACRO M1108 05-DEC-77 22:40
TABLE OF CONTENTS
7- 1 **** PIPUNL VERSION M0202 ****
PIPUNL M0202, UNLOCK COMMAND-PI MACRO M1108 05-DEC-77 22:40 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 05-DEC-77 22:40 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 05-DEC-77 22:40 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:20
[43,10]PIPUNL,[43,20]PIPUNL/-SP=[43,30]PIPMAC,PIPUNL
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41
TABLE OF CONTENTS
7- 1 **** PIPSBR VERSION M0211 ****
8- 79 FSTOUT, NXTOUT, NXTIN, WLDVER, CWLDUI
9- 170 STNMBK, STNBK1 - INITIALIZE NAME BLOCK ROUTINES
10- 219 PARSE, FNDNXT, FINDFL, RMVNXT
12- 370 USEFID, PRSREG
13- 411 COMMON ERROR ROUTINES
14- 456 DYNAMIC MEMORY ALLOCATION AND RELEASE ROUTINES
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 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 05-DEC-77 22:41 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 001406 BEQ 10$ ;BRANCH IF NOTHING TO DO
65 000130 012701 000000G MOV #IO.ATT,R1
66 000134 005002 CLR R2 ;NO, EXTRA PARAMS IN DPB
67 000136 CALL .XQIO
68 000142 RETURN ;NOTE THAT C BIT IS CORRECT
69 000144 000241 10$: CLC
70 000146 RETURN
71 ;
72 ; INIT THE PROTECTION VALUES TO ZERO
73 000150 012701 000000G INIPRO::MOV #WORPRO,R1
74 000154 012702 000000C MOV #<PROWRD-WORPRO>/2,R2
75 000160 005021 25$: CLR (R1)+
76 000162 SOB R2,25$
77 000166 RETURN
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 8
FSTOUT, NXTOUT, NXTIN, WLDVER, CWLDUI
79 .SBTTL FSTOUT, NXTOUT, NXTIN, WLDVER, CWLDUI
80 ;
81 ; SET UP FOR FIRST OUTPUT SPEC - USED BY COMMANDS WHICH HAVE A LIST
82 ; OF OUTPUT SPECS AND NO INPUT SPECS
83 000170 005767 000000G FSTOUT::TST INSPEC ;NO INPUT SPECIFIER ALLOWED
84 000174 001405 BEQ 10$
85 000176 ERROUT CR01 ;BAD SYNTAX
000176 104402 TRAP X
000200 000000G .WORD CR01SZ
000202 000000G .WORD CR01MG
86 000204 000167 000000G JMP AGAIN
87 000210 012767 000000G 000000C 10$: MOV #NAMBLK,FDBOUT+F.DFNB ;SET UP DEFAULT NAME BLOCK
88 000216 012767 000000G 000000C MOV #OFNPT,FDBOUT+F.DSPT ;AND DESCRIPTOR POINTER
89 ; INITIALIZE THE DEFAULT NAME BLOCK
90 000224 005002 CLR R2 ;NO FILE NAME AND TYPE
91 000226 005001 CLR R1 ;ZERO DIRECTORY ID
92 000230 CALL STNMBK ;USES DEFAULT SYS DEVICE
93 000234 RETURN
94 ; SET UP FOR NEXT OUTPUT IN LIST IF ANY, RETURN C=0 IF READY WITH
95 ; ANOTHER FILE, C=1 IF NO MORE IN LIST, OR IF ERROR
96 000236 012700 000000G NXTOUT::MOV #FDBOUT,R0
97 000242 012701 000000G MOV #OFNPT,R1
98 000246 012702 000000G MOV #OUTCSI,R2
99 000252 000406 BR NXTIN1
100 000254 012700 000000G NXTIN:: MOV #FDBIN,R0
101 000260 012701 000000G MOV #IFNPT,R1
102 000264 012702 000000G MOV #INCSI,R2
103 000270 NXTIN1::CALL NXINOU
104 000274 RETURN
105 ;
106 ; SET UP FOR NEXT INPUT OR OUTPUT SPEC
107 ; INPUTS:
108 ; R0=FDB
109 ; R1=ADDRESS OF CSI FILE NAME DESCRIPTOR
110 ; R2=ADDR OF INCSI OR OUTCSI AS APPROPRIATE
111 000276 NXINOU:: CLOSE$ R0
112 000302 103415 BCS 80$
113 000304 032761 000020 000014 BIT #CS.MOR,N.SPEC(R1)
114 000312 001420 BEQ 95$
115 000314 016767 000000G 000000G MOV .LCLSW,CPYCTL
116 000322 CALL @R2
117 000324 103410 BCS 85$ ;BRANCH IF BAD SWITCH OR VALUE
118 ;
119 ; IF PREVIOUS FILE NAME/TYPE WAS EXPLICIT, BUT NOT A WILD CARD
120 ; THEN USE THAT NAME/TYPE AS A DEFAULT FOR THE NEXT SPECIFIER
121 000326 CALL .DFLTN ;SET NEXT DEFAULT FILE NAME AND TYPE
122 000332 000241 CLC
123 000334 RETURN
124 ;
125 ; CLOSE FAILURE
126 000336 80$: ERROUT OP05,0,0
000336 104426 TRAP X
000340 000000G .WORD OP05SZ
000342 000000G .WORD OP05MG
127 000344 000403 BR 95$
128 ;
129 ; BAD SWITCH
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 8-1
FSTOUT, NXTOUT, NXTIN, WLDVER, CWLDUI
130 000346 85$: ERROUT CR02,1
000346 104412 TRAP X
000350 000000G .WORD CR02SZ
000352 000000G .WORD CR02MG
131 000354 000261 95$: SEC
132 000356 RETURN
133 ;
134 ; CHECK IF WILD CARDS ARE PRESENT IN NAME OR TYPE, THAT VERSION
135 ; IS EXPLICIT OR WILD CARD
136 ; INPUTS:
137 ; R0=FDB
138 ; R1=FILE NAME BLOCK
139 ; OUTPUTS:
140 ; C=0 IF OK, AND ALL REGISTERS PRESERVED
141 ; C=1 IF NOT OK, ALL REGISTERS ALTERED
142 000360 WLDVER::CALL .WLDVC
143 000364 103004 BCC 10$
144 000366 ERROUT DE04,1
000366 104412 TRAP X
000370 000000G .WORD DE04SZ
000372 000000G .WORD DE04MG
145 000374 000261 SEC
146 000376 10$: RETURN
147 ;
148 ;+
149 ; CHECK FOR LEGAL WILD CARD UIC, RESTRICT TO [*,*]
150 ; USED ONLY TO RESTRICT OUTPUT UIC'S
151 ; CALLING SEQUENCE:
152 ; CALL CWLDUI
153 ; INPUTS:
154 ; R0=FDB
155 ; OUTPUTS:
156 ; C=0 IFLEGAL, C=1 IF NOT
157 ; ALL REGISTERS PRESERVED
158 ;-
159 000400 032760 000000G 000000C CWLDUI::BIT #NB.SDI,F.FNB+N.STAT(R0) ;LEGAL IF NO WILD UIC'S
160 000406 001407 BEQ 20$
161 000410 016046 000000C MOV F.FNB+N.STAT(R0),-(SP)
162 000414 042716 000000C BIC #^C<NB.SDI>,@SP
163 000420 022726 000000G CMP #NB.SDI,(SP)+
164 000424 001002 BNE 30$
165 000426 000241 20$: CLC
166 000430 RETURN
167 000432 000261 30$: SEC
168 000434 RETURN
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 9
STNMBK, STNBK1 - INITIALIZE NAME BLOCK ROUTINES
170 .SBTTL STNMBK, STNBK1 - INITIALIZE NAME BLOCK ROUTINES
171 ;+
172 ; SET UP THE FILE NAME BLOCK, NAMBLK, WITH THE FILE NAME, AND TYPE
173 ; THE DIRECTORY ID, AND THE DEVICE AND UNIT
174 ; CALLING SEQUENCE:
175 ; JSR PC,STNMBK
176 ; INPUTS:
177 ; R1=VALUE TO BE STORED IN FIRST 2 LOC OF DIRECTORY ID
178 ; =0 FOR NORMAL CASE OF NO DEFAULT DIRECTORY ID
179 ; =-1 TO DEFAULT TO MFD
180 ; R2=POINTER TO NAME AND TYPE TO MOVE IN
181 ; OR = 0 IF DESIRE NULL DEFAULTS FOR FILE NAME AND TYPE
182 ; OUTPUTS:
183 ; R0,R1,R5 PRESERVED, R3,R4 ALTERED
184 ; R2 ALTERED IF IT POINTS AT A NAME TO MOVE, PRESERVED IF 0
185 ; OPERATION:
186 ; ZEROS THE SPECIFIED FILE NAME BLOCK AND SET UP THE SPECIFIED
187 ; DIRECTORY ID (VALUE FROM R1), THE SYSTEM
188 ; DEVICE AND UNIT, AND THE DEFAULT FILE NAME AND TYPE IF R2 NON ZERO.
189 ;
190 ; ALTERNATE ENTRY POINT:
191 ; JSR PC,STNBK1
192 ; INPUTS:
193 ; R0 = NAMBLK ADDRESS TO INITIALIZE
194 ; OTHERWISE, SAME AS ABOVE
195 ;-
196 000436 010046 STNMBK::MOV R0,-(SP)
197 000440 012700 000000G MOV #NAMBLK,R0
198 000444 CALL STNBK1
199 000450 012600 MOV (SP)+,R0
200 000452 RETURN
201 ;
202 000454 010003 STNBK1::MOV R0,R3 ;ZERO THE FILE NAME BLOCK
203 000456 012704 000000G MOV #S.FNBW,R4 ;NO. OF WORDS IN FNB
204 000462 005023 10$: CLR (R3)+
205 000464 SOB R4,10$
206 000470 010160 000000G MOV R1,N.DID(R0) ;STORE DEFAULT DIRECTORY ID
207 000474 010160 000002G MOV R1,N.DID+2(R0)
208 000500 016760 000000G 000000G MOV .DEFDV,N.DVNM(R0) ;SET DEFAULT DEVICE
209 000506 016760 000000G 000000G MOV .DEFUN,N.UNIT(R0) ;AND UNIT
210 000514 005702 TST R2 ;IF DEFAULT NAME AND TYPE SPECIFIED
211 000516 001410 BEQ 40$
212 000520 010003 MOV R0,R3 ;MOVE THEM IN
213 000522 062703 000000G ADD #N.FNAM,R3
214 000526 012704 000000G MOV #S.FNTY,R4 ;NUMBER OF WORDS TO MOVE
215 000532 012223 20$: MOV (R2)+,(R3)+ ;MOVE FILE NAME AND TYPE
216 000534 SOB R4,20$
217 000540 40$: RETURN
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 10
PARSE, FNDNXT, FINDFL, RMVNXT
219 .SBTTL PARSE, FNDNXT, FINDFL, RMVNXT
220 ;+
221 ; PARSE THE FILE NAME BLOCK
222 ; CALLING SEQUENCE:
223 ; CALL PARSE
224 ; INPUTS:
225 ; R0=FDB
226 ; OUTPUTS:
227 ; C=0 IF SUCCESSFUL, C=1 IF FAILURE
228 ; R1=FILE NAME BLOCK
229 ; R2=FILE DESCRIPTOR POINTER
230 ; R3=DEFAULT FILE NAME BLOCK
231 ; R0,R4,R5 PRESERVED
232 ; OPERATION:
233 ; HANDLES WILD CARD UIC PARSE
234 ;-
235 000542 010446 PARSE:: MOV R4,-(SP)
236 000544 CALL PRSREG
237 000550 005762 000016 TST N.FLID(R2) ;/FI SWITCH SPECIFIED?
238 000554 001403 BEQ 5$ ;BRANCH IF NOT
239 000556 CALL .PRSDV ;JUST PARSE THE DEVICE NAME
240 000562 000407 BR 20$
241 000564 005704 5$: TST R4
242 000566 001403 BEQ 10$ ;BRANCH IF CALLING .PARSE
243 000570 CALL .WPARS
244 000574 000402 BR 20$
245 000576 10$: CALL .PARSE
246 000602 012604 20$: MOV (SP)+,R4
247 000604 RETURN
248 ;
249 ;+
250 ; FIND THE NEXT FILE IN THIS (OR NEXT) DIRECTORY
251 ; CALLING SEQUENCE:
252 ; CALL FNDNXT
253 ; INPUTS:
254 ; R0=FDB ADDRESS
255 ; OUTPUTS:
256 ; C=0 IF SUCCESSFUL, C=1 IF FAILURE
257 ; R1=FILE NAME BLOCK
258 ; R0,R2-R5 PRESERVED
259 ; OPERATION:
260 ; FIND WILL USE EXPLICIT FILE ID IF SPECIFIED, AND WILL CROSS
261 ; DIRECTORIES IF WILD CARD UIC IS SPECIFIED
262 ;-
263 000606 010001 FNDNXT::MOV R0,R1
264 000610 062701 000000G ADD #F.FNB,R1
265 000614 CALL USEFID
266 000620 103011 BCC 20$
267 000622 010246 MOV R2,-(SP)
268 000624 016002 000000G MOV F.DSPT(R0),R2
269 000630 001402 BEQ 10$
270 000632 062702 000024 ADD #S.FIDS+S.APPD,R2
271 000636 10$: CALL .FNDNX
272 000642 012602 MOV (SP)+,R2
273 000644 20$: RETURN
274 ;
275 ;+
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 10-1
PARSE, FNDNXT, FINDFL, RMVNXT
276 ; FIND NEXT FILE, DO NOT ALLOW FILE ID OR CROSS DIRECTORY SEARCH
277 ; CALLING SEQUENCE:
278 ; CALL FINDFL
279 ; INPUTS:
280 ; R0=FDB ADDRESS
281 ; OUTPUTS:
282 ; C=0 IF SUCCESSFUL, C=1 IF ERROR
283 ; R1= FILE NAME BLOCK
284 ; R0,R2-R5 PRESERVED
285 ;-
286 000646 010001 FINDFL::MOV R0,R1
287 000650 062701 000000G ADD #F.FNB,R1
288 000654 010246 MOV R2,-(SP)
289 000656 005002 CLR R2
290 000660 CALL .FNDNX
291 000664 012602 MOV (SP)+,R2
292 000666 RETURN
293 ;
294 ;+
295 ; IS THERE ANOTHER FILE TO OPERATE ON IN THIS FILE SPECIFIER
296 ; CALLING SEQUENCE:
297 ; CALL NXTFIL
298 ; INPUTS:
299 ; R0=FDB
300 ; OUTPUTS:
301 ; C=0 IF THERE IS ANOTHER FILE, C=1 IF NOT
302 ; R0,R5 PRESERVED
303 ; R1 = FILE NAME BLOCK
304 ; R2,R3,R4 ALTERED
305 ; OPERATION:
306 ; SETS UP FOR THE NEXT FNDNXT, RMVNXT CALL BY CHECKING IF
307 ; A WILD CARD NAME OR DIRECTORY WAS SPECIFIED. THIS ROUTINE WILL
308 ; CROSS DIRECTORIES IF A WILD CARD UIC IS SPECIFIED WITH NO WILD
309 ; CARDS IN THE FILE NAME.
310 ;-
311 000670 000261 NXTFIL::SEC ;ASSUME NO WILD CARDS
312 000672 032760 000000G 000000C BIT #NB.SFL,F.FNB+N.STAT(R0) ;ANY WILD CARDS?
313 000700 001411 BEQ 20$ ;BRANCH IF NO
314 000702 000241 CLC ;NOW ASSUME SUCCESSFUL
315 000704 032760 000000G 000000C BIT #NB.SFN,F.FNB+N.STAT(R0) ;* IN NAME, TYPE, VERSION
316 000712 001004 BNE 20$ ;BRANCH IF YES
317 ;
318 ; NO WILD CARDS IN NAME, BUT WILD CARD UIC, CROSS DIRECTORIES NOW
319 ;
320 000714 CALL PRSREG ;SET UP REGISTERS
321 000720 CALL .NXDIR ;AND CHAIN TO NEXT DIRECTORY
322 000724 20$: RETURN
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 11
PARSE, FNDNXT, FINDFL, RMVNXT
324 ;+
325 ; REMOVE NEXT FILE, ALLOWS CROSS DIRECTORY OPERATION
326 ; INPUTS:
327 ; R0=FDB
328 ; OUTPUTS:
329 ; C=0 IF REMOVED, C=1 IF ERROR
330 ; R1=FILE NAME BLOCK ADDRESS
331 ; OTHER REGISTERS PRESERVED
332 ; OPERATION:
333 ; HANDLES THE SPECIAL CASE OF EXPLICIT FILE NAME AND TYPE AND
334 ; DEFAULT VERSION (0 OR -1) BY DOING A FIND AND THEN A REMOVE. ALL
335 ; OTHER CASES JUST DO THE REMOVE.
336 ; IF WILD CARD DIRECTORY WAS SPECIFIED, RMVNXT WILL
337 ; AUTOMATICALLY CROSS TO THE NEXT DIRECTORY.
338 ;-
339 000726 010001 RMVNXT::MOV R0,R1
340 000730 062701 000000G ADD #F.FNB,R1
341 000734 CALL USEFID
342 000740 103047 BCC 70$
343 000742 032761 000000G 000000G 5$: BIT #NB.SFN,N.STAT(R1) ;IF WILD CARDS
344 000750 001014 BNE 30$ ;JUST DO THE REMOVE
345 000752 005761 000000G TST N.FVER(R1) ;IF DEFAULT NEWEST VERSION
346 000756 001404 BEQ 10$ ;MUST DO FIND FIRST
347 000760 022761 177777 000000G CMP #-1,N.FVER(R1) ;IF DEFAULT OLDEST VERSION
348 000766 001005 BNE 30$
349 000770 10$: CALL .FIND ;MUST DO THE FIND FIRST
350 000774 103404 BCS 50$
351 000776 005061 000000G CLR N.NEXT(R1)
352 001002 30$: CALL .REMOV
353 001006 103024 50$: BCC 70$
354 001010 032761 000000G 000000G BIT #NB.SDI,N.STAT(R1) ;ANY WILD UIC'S
355 001016 001420 BEQ 70$ ;BRANCH IF NO
356 001020 122760 000000G 000000G CMPB #IE.NSF,F.ERR(R0) ;"NO SUCH FILE" ERROR
357 001026 001013 BNE 60$
358 001030 010246 MOV R2,-(SP)
359 001032 010346 MOV R3,-(SP)
360 001034 010446 MOV R4,-(SP)
361 001036 CALL PRSREG
362 001042 CALL .NXDIR ;GET NEXT WILD DIRECTORY IF ANY
363 001046 012604 MOV (SP)+,R4
364 001050 012603 MOV (SP)+,R3
365 001052 012602 MOV (SP)+,R2
366 001054 103332 BCC 5$
367 001056 000261 60$: SEC
368 001060 70$: RETURN
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 12
USEFID, PRSREG
370 .SBTTL USEFID, PRSREG
371 ;
372 ; CHECK IF FILE ID WAS MANUALLY SPECIFIED
373 ; IF IT WAS, MOVE IT TO THE FILE ID OF F.FNB, RETURN C=0
374 ; IF NOT, RETURN C=1
375 ; ALL REGISTER PRESERVED
376 001062 010246 USEFID::MOV R2,-(SP)
377 001064 016002 000000G MOV F.DSPT(R0),R2
378 001070 001414 BEQ 10$
379 001072 016261 000016 000000G MOV N.FLID(R2),N.FID(R1) ;WAS FILE ID MANUALLY SPECIFIED
380 001100 001410 BEQ 10$ ;BRANCH IF NO
381 001102 016261 000020 000002G MOV N.FLID+2(R2),N.FID+2(R1)
382 001110 016261 000022 000004G MOV N.FLID+4(R2),N.FID+4(R1)
383 001116 000241 CLC
384 001120 000401 BR 20$ ;NOTE CARRY BIT MUST BE CLEAR
385 001122 000261 10$: SEC
386 001124 012602 20$: MOV (SP)+,R2
387 001126 RETURN
388 ;
389 ;+
390 ; SET UP REGISTERS FOR CALL TO .WPARS, .NXDIR
391 ; CALLING SEQUENCE:
392 ; CALL PRSREG
393 ; INPUTS:
394 ; R0=FDB ADDRESS
395 ; OUTPUTS:
396 ; R0=FDB ADDRESS
397 ; R1=FILE NAME BLOCK
398 ; R2=FILE DESCRIPTOR POINTER
399 ; R3=DEFAULT FILE NAME BLOCK
400 ; R4=S.FIDS+S.APPD;(F.DSPT(R0))
401 ;-
402 001130 010001 PRSREG::MOV R0,R1
403 001132 062701 000000G ADD #F.FNB,R1
404 001136 016002 000000G MOV F.DSPT(R0),R2
405 001142 016003 000000G MOV F.DFNB(R0),R3
406 001146 010204 MOV R2,R4
407 001150 001402 BEQ 10$
408 001152 062704 000024 ADD #S.FIDS+S.APPD,R4
409 001156 10$: RETURN
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 13
COMMON ERROR ROUTINES
411 .SBTTL COMMON ERROR ROUTINES
412 ;
413 ; ERROR FROM PARSE
414 001160 122760 000000G 000000G PRSERR::CMPB #IE.NSF,F.ERR(R0) ;NO SUCH FILE?
415 001166 001004 BNE 20$
416 001170 ERROUT DI05,1 ;CAN'T FIND DIRECTORY FILE
001170 104412 TRAP X
001172 000000G .WORD DI05SZ
001174 000000G .WORD DI05MG
417 001176 RETURN
418 001200 122760 000000G 000000G 20$: CMPB #IE.PRI,F.ERR(R0) ;PROTECTION VIOLATION
419 001206 001404 BEQ 30$
420 001210 ERROUT DE08,1,0
001210 104432 TRAP X
001212 000000G .WORD DE08SZ
001214 000000G .WORD DE08MG
421 001216 RETURN
422 ; PROTECTION VIOLATION PROBABLY INDICATES
423 ; THAT THE DEVICE WAS NEVER MOUNTED
424 001220 30$: ERROUT OP07,1
001220 104412 TRAP X
001222 000000G .WORD OP07SZ
001224 000000G .WORD OP07MG
425 001226 RETURN
426 ;
427 ; FIND ERROR - IF NO SUCH FILE, NO ERROR MESSAGE
428 ; R0=FDB, R1=FNB, ALL REGISTERS ALTERED
429 001230 032767 000000G 000000G FNDERR::BIT #FRSTIM,CPYCTL ;IF NOT THE FIRST TIM
430 001236 001010 BNE 20$
431 001240 122760 000000G 000000G CMPB #IE.NSF,F.ERR(R0) ;AND IF "NO SUCH FILE"
432 001246 001403 BEQ 10$ ;NO ERROR MESSAGE
433 ;
434 ; OTHER ERROR THAN "NO SUCH FILE" - NOT THE FIRST FIND
435 001250 ERROUT FI01,1,0
001250 104432 TRAP X
001252 000000G .WORD FI01SZ
001254 000000G .WORD FI01MG
436 001256 10$: RETURN
437 ;
438 ; ERROR ON FIRST FIND
439 001260 122760 000000G 000000G 20$: CMPB #IE.NSF,F.ERR(R0)
440 001266 001004 BNE 30$
441 001270 ERROUT FI03,1 ;NO SUCH FILE
001270 104412 TRAP X
001272 000000G .WORD FI03SZ
001274 000000G .WORD FI03MG
442 001276 RETURN
443 001300 30$: ERROUT FI02,1,0 ;CANNOT FIND FILE
001300 104432 TRAP X
001302 000000G .WORD FI02SZ
001304 000000G .WORD FI02MG
444 001306 RETURN
445 ;
446 ; REMOVE ERROR - LIKE FNDERR ABOVE
447 001310 122760 000000G 000000G RMVERR::CMPB #IE.NSF,F.ERR(R0)
448 001316 001744 BEQ FNDERR ;IF NO SUCH FILE, THEN USE FNDERR
449 001320 122760 000000G 000000G CMPB #IE.PRI,F.ERR(R0) ;IF PROTECTION VIOLATION
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 13-1
COMMON ERROR ROUTINES
450 001326 001004 BNE 10$
451 001330 ERROUT RM02,1,0 ;PROBABLY INDICATES DISK WRITE PROTECTED
001330 104432 TRAP X
001332 000000G .WORD RM02SZ
001334 000000G .WORD RM02MG
452 001336 RETURN
453 001340 10$: ERROUT RM01,1,0
001340 104432 TRAP X
001342 000000G .WORD RM01SZ
001344 000000G .WORD RM01MG
454 001346 RETURN
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 PAGE 14
DYNAMIC MEMORY ALLOCATION AND RELEASE ROUTINES
456 .SBTTL DYNAMIC MEMORY ALLOCATION AND RELEASE ROUTINES
457 ;+
458 ; ALLOCATE BUFFER OF THE SPECIFIED SIZE (R1 BYTES) FROM THE FILE STORAGE REGION
459 ; CALLING SEQUENCE
460 ; CALL .DYALC
461 ; INPUTS:
462 ; R1=BYTE COUNT TO ALLOCATE
463 ; OUTPUTS:
464 ; R0=ADDRESS ALLOCATED
465 ; R1-R5 PRESERVED
466 ; .DYBUF AND .DYBYT ALSO SET TO ADDRESS AND SIZE OF BUFFER
467 ; IF FAIL TO ALLOCATE, THEN FATAL DYNAMIC MEMORY ERROR
468 ;-
469 001350 016700 000000G .DYALC::MOV .DYBUF,R0
470 001354 020167 000000G CMP R1,.DYBYT ;DESIRED SIZE BUFFER ALREADY ALLOCATED?
471 001360 001417 BEQ 40$ ;BRANCH IF YES
472 001362 CALL .DYREL ;NO, RELEASE ANYTHING CURRENTLY ALLOCATED
473 001366 010246 MOV R2,-(SP)
474 001370 010146 MOV R1,-(SP)
475 001372 013700 000000G MOV @#.FSRPT,R0
476 001376 CALL $RQCB ;ALLOCATE FOR FILE STORAGE REGION
477 001402 012601 MOV (SP)+,R1
478 001404 012602 MOV (SP)+,R2
479 001406 103405 BCS 60$ ;BRANCH IF FAILED TO ALLOCATE
480 001410 010067 000000G MOV R0,.DYBUF ;SET UP ADDRESS
481 001414 010167 000000G MOV R1,.DYBYT ;AND SIZE OF THE BUFFER ALLOCATED
482 001420 40$: RETURN
483 001422 60$: ERROUX DY01 ;NOT ENOUGH DYNAMIC MEMORY
001422 104403 TRAP X
001424 000000G .WORD DY01SZ
001426 000000G .WORD DY01MG
484
485 ;+
486 ; RELEASE THE CURRENTLY ALLOCATED DYNAMIC MEMORY BUFFER TO THE FILE
487 ; STORAGE REGION
488 ; CALLING SEQUENCE:
489 ; CALL .DYREL
490 ; INPUTS:
491 ; NONE
492 ; OUTPUTS:
493 ; ALL REGISTER PRESERVED
494 ; .DYBYT ZEROED TO REFLECT BUFFER RELEASED
495 ;-
496 001430 005767 000000G .DYREL::TST .DYBYT ;IF NOTHING TO RELEASE, QUICK NOP
497 001434 001414 BEQ 40$
498 001436 004567 000000G JSR R5,.SAVR1
499 001442 013700 000000G MOV @#.FSRPT,R0
500 001446 016701 000000G MOV .DYBYT,R1
501 001452 016702 000000G MOV .DYBUF,R2
502 001456 CALL $RLCB ;RELEASE THE BUFFER (ADR IN R2, SIZE IN R1)
503 001462 005067 000000G CLR .DYBYT ;RECORD THE FACT THAT IT'S RELEASED
504 001466 40$: RETURN
505 ;
506 ;
507 000001 .END
PIPSBR M0211, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 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
[43,10]PIPSBR,[43,20]PIPSBR/-SP=[43,30]PIPMAC,PIPSBR
PIPSB1 M0210, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41
TABLE OF CONTENTS
7- 1 **** PIPSB1 VERSION M0210 ****
PIPSB1 M0210, COMMAND SUBROUTIN MACRO M1108 05-DEC-77 22:41 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 05-DEC-77 22:41 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 05-DEC-77 22:41 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
[43,10]PIPSB1,[43,20]PIPSB1/-SP=[43,30]PIPMAC,PIPSB1
PIPMSG M0015, ERROR MESSAGES FO MACRO M1108 05-DEC-77 22:42
TABLE OF CONTENTS
7- 1 **** PIPMSG VERSION M0015 ****
PIPMSG M0015, ERROR MESSAGES FO MACRO M1108 05-DEC-77 22:42 PAGE 7
1 .TITLE PIPMSG M0015, ERROR MESSAGES FOR PIP
.SBTTL **** PIPMSG VERSION M0015 ****
.IDENT /M0015/
2 ; ALTERED:
3 ; ANDREW C. GOLDSTEIN 3 FEB 75 12:40
4 ;
5 ; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
6 ; COPYRIGHT 1973, 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 18-SEP-73
21 ;
22 .IF NDF,R$$MSG
23 .IF EQ,R$$11M
24 R$$MSG=1 ;SEPARATE MESSAGE FILE FOR RSX11D
25 .IFF
26 R$$MSG=0 ;MESSAGES IN CORE IMAGE FOR RSX11M
27 .ENDC
28 .ENDC
29 000014 FF=14
30 000001 MSGBL.=1 ;FORCE GLOBAL DEFINITIONS
31 000000 MSGCT.=0 ;INITIALIZE MESSAGE COUNTER
32 ;
33 ; NOTE: THE MESSAGE NAMES ARE 4 CHARACTERS. APPEND "MG"
34 ; TO THE NAME TO GET THE SYMBOLLIC ADDRESS OF THE MESSAGE.
35 ; APPEND "SZ" TO THE NAME TO GET THE SYMBOLLIC SIZE
36
37
38 ; COMMAND RECEIVER AND DISPATCHER ERRORS
39 000000 MSG CR01,<COMMAND SYNTAX ERROR>
40 000000 MSG CR02,<ILLEGAL SWITCH>
41 000000 MSG CR03,<TOO MANY COMMAND SWITCHES - AMBIGUOUS>
42
43 ; COPY FILE ERRORS
44 000000 MSG CP01,<ONLY [*,*] IS LEGAL AS DESTINATION UIC>
45 000000 MSG CP02,<ILLEGAL COMMAND>
46 000000 MSG CP03,<ILLEGAL "*" COPY TO SAME DEVICE AND DIRECTORY>
47 000000 MSG CP04,<BAD USE OF WILD CARDS IN DESTINATION FILE NAME>
48 000000 MSG CP05,<EXPLICIT OUTPUT FILE NAME REQUIRED>
49 000000 MSG CP10,<ALLOCATION FAILURE - NO CONTIGUOUS SPACE>
50 000000 MSG CP11,<ALLOCATION FAILURE - NO SPACE AVAILABLE>
51 000000 MSG CP12,<ALLOCATION FAILURE ON OUTPUT FILE>
52 000000 MSG CP13,<I/O ERROR ON INPUT FILE>
53 000000 MSG CP14,<I/O ERROR ON OUTPUT FILE>
54 000000 MSG CP15,<ILLEGAL USE OF WILD CARD VERSION>
55 ;
PIPMSG M0015, ERROR MESSAGES FO MACRO M1108 05-DEC-77 22:42 PAGE 7-1
**** PIPMSG VERSION M0015 ****
56 ; OPEN OR CLOSE FILE ERROR MESSAGES
57 000000 MSG OP01,<OPEN FAILURE ON INPUT FILE>
58 000000 MSG OP02,<OPEN FAILURE ON OUTPUT FILE>
59 000000 MSG OP04,<CLOSE FAILURE ON INPUT FILE>
60 000000 MSG OP05,<CLOSE FAILURE ON OUTPUT FILE>
61 000000 MSG OP06,<FAILED TO DETACH OUTPUT DEVICE>
62 000000 MSG OP07,<DEVICE NOT MOUNTED>
63 000000 MSG OP08,<OUTPUT FILE ALREADY EXISTS - NOT SUPERSEDED>
64 ;
65 ; DELETE ERROR MESSAGES
66 000000 MSG DE01,<FAILED TO MARK FILE FOR DELETE>
67 000000 MSG DE02,<FILE IS LOST>
68 000000 MSG DE04,<VERSION MUST BE EXPLICIT OR "*">
69 000000 MSG DE08,<ERROR FROM PARSE>
70 000000 MSG DE09,<FAILED TO DELETE FILE>
71 ;
72 ; SET UIC ERROR MESSAGES
73 000000' UI01MG==CR01MG
74 000024 UI01SZ==CR01SZ
75 ;
76 ; SET DEFAULT DEVICE OR UIC ERROR MESSAGES
77 000000' DF01MG==CR01MG
78 000024 DF01SZ==CR01SZ
79 ;
80 ; DIRECTORY LISTING ERRORS
81 000000 MSG DI05,<CANNOT FIND DIRECTORY FILE>
82 000000 MSG DI06,<FAILED TO ATTACH OUTPUT DEVICE>
83 000000 MSG DI07,<FAILED TO GET TIME PARAMETERS>
84 000000 MSG DI08,<NOT A DIRECTORY DEVICE>
85 ;
86 ; UNLOCK ERROR MESSAGES
87 000000 MSG UN01,<FAILED TO WRITE ATTRIBUTES>
88 000000 MSG UN02,<FAILED TO READ ATTRIBUTES>
89 000000 MSG UN03,<FILE NOT LOCKED>
90 000000' UN04MG==CR01MG
91 000024 UN04SZ==CR01SZ
92 ;
93 ; RENAME ERROR MESSAGES
94 000000 MSG RE02,<FAILED TO ENTER NEW FILE NAME>
95 000000 MSG RE03,<FAILED TO RESTORE ORIGINAL DIRECTORY ENTRY - FILE IS LOST>
96 000000 MSG RE04,<CANNOT RENAME FROM ONE DEVICE TO ANOTHER>
97 ;
98 ; SPOOL ERROR MESSAGES
99 000000 MSG SP01,<FAILED TO SPOOL FILE FOR PRINTING>
100 000000 MSG SP02,<CANNOT SPOOL BY FILE ID>
101 ;
102 ; FREE BLOCKS ERROR MESSAGES
103 000000 MSG FR01,<FAILED TO OPEN STORAGE BITMAP FILE>
104 ;
105 ; FIND ERROR MESSAGES
106 000000 MSG FI01,<FAILED TO FIND FILE(S)>
107 000000 MSG FI02,<CANNOT FIND FILE(S)>
108 000000 MSG FI03,<NO SUCH FILE(S)>
109 ;
110 ; REMOVE ERROR MESSAGES
111 000000 MSG RM01,<FAILED TO REMOVE DIRECTORY ENTRY>
112 000000 MSG RM02,<DIRECTORY WRITE PROTECTED>
PIPMSG M0015, ERROR MESSAGES FO MACRO M1108 05-DEC-77 22:42 PAGE 7-2
**** PIPMSG VERSION M0015 ****
113 ;
114 ; DYNAMIC MEMORY ERROR MESSAGES
115 ;
116 000000 MSG DY01,<NOT ENOUGH BUFFER SPACE AVAILABLE>
117 ;
118 ;
119 000001 .END
PIPMSG M0015, ERROR MESSAGES FO MACRO M1108 05-DEC-77 22:42 PAGE 7-3
SYMBOL TABLE
CP01MG= 000107RG 002 CP15SZ= 000040 G DI06MG= 001407RG 002 OP02MG= 000722RG 002 RM02SZ= 000031 G
CP01SZ= 000046 G CR01MG= 000000RG 002 DI06SZ= 000036 G OP02SZ= 000033 G R$$DPB= 000001
CP02MG= 000155RG 002 CR01SZ= 000024 G DI07MG= 001445RG 002 OP04MG= 000755RG 002 R$$DYM= 000001
CP02SZ= 000017 G CR02MG= 000024RG 002 DI07SZ= 000035 G OP04SZ= 000033 G R$$EIS= 000000
CP03MG= 000174RG 002 CR02SZ= 000016 G DI08MG= 001502RG 002 OP05MG= 001010RG 002 R$$MSG= 000000
CP03SZ= 000055 G CR03MG= 000042RG 002 DI08SZ= 000026 G OP05SZ= 000034 G R$$11M= 000001
CP04MG= 000251RG 002 CR03SZ= 000045 G DY01MG= 002343RG 002 OP06MG= 001044RG 002 SP01MG= 002030RG 002
CP04SZ= 000056 G DE01MG= 001177RG 002 DY01SZ= 000041 G OP06SZ= 000036 G SP01SZ= 000041 G
CP05MG= 000327RG 002 DE01SZ= 000036 G FF = 000014 OP07MG= 001102RG 002 SP02MG= 002071RG 002
CP05SZ= 000042 G DE02MG= 001235RG 002 FI01MG= 002162RG 002 OP07SZ= 000022 G SP02SZ= 000027 G
CP10MG= 000371RG 002 DE02SZ= 000014 G FI01SZ= 000026 G OP08MG= 001124RG 002 UI01MG= 000000RG 002
CP10SZ= 000050 G DE04MG= 001251RG 002 FI02MG= 002210RG 002 OP08SZ= 000053 G UI01SZ= 000024 G
CP11MG= 000441RG 002 DE04SZ= 000037 G FI02SZ= 000023 G RE02MG= 001632RG 002 UN01MG= 001530RG 002
CP11SZ= 000047 G DE08MG= 001310RG 002 FI03MG= 002233RG 002 RE02SZ= 000035 G UN01SZ= 000032 G
CP12MG= 000510RG 002 DE08SZ= 000020 G FI03SZ= 000017 G RE03MG= 001667RG 002 UN02MG= 001562RG 002
CP12SZ= 000041 G DE09MG= 001330RG 002 FR01MG= 002120RG 002 RE03SZ= 000071 G UN02SZ= 000031 G
CP13MG= 000551RG 002 DE09SZ= 000025 G FR01SZ= 000042 G RE04MG= 001760RG 002 UN03MG= 001613RG 002
CP13SZ= 000027 G DF01MG= 000000RG 002 MSGBL.= 000001 RE04SZ= 000050 G UN03SZ= 000017 G
CP14MG= 000600RG 002 DF01SZ= 000024 G MSGCT.= 000000 RM01MG= 002252RG 002 UN04MG= 000000RG 002
CP14SZ= 000030 G DI05MG= 001355RG 002 OP01MG= 000670RG 002 RM01SZ= 000040 G UN04SZ= 000024 G
CP15MG= 000630RG 002 DI05SZ= 000032 G OP01SZ= 000032 G RM02MG= 002312RG 002
. ABS. 000000 000
000000 001
MSGSTR 002404 002
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 3156 WORDS ( 13 PAGES)
DYNAMIC MEMORY: 4160 WORDS ( 16 PAGES)
ELAPSED TIME: 00:00:39
[43,10]PIPMSG,[43,20]PIPMSG/-SP=[43,30]PIPMAC,PIPMSG
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47
TABLE OF CONTENTS
7- 1 **** PRSFND VERSION M0114 ****
8- 46 .WPARS - WILD CARD UIC PARSE
10- 99 .FNDNX - FIND THE NEXT FILE
11- 182 .NXDIR - FIND NEXT WILD CARD DIRECTORY
12- 273 .WLDVC - CHECK FOR WILD CARDS WITH DEFAULT VERSION
13- 300 USEFUL SUBROUTINES
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 7
1 .TITLE PRSFND M0114, PARSE, FIND, ETC.
.SBTTL **** PRSFND VERSION M0114 ****
.IDENT /M0114/
2 ; ALTERED THURSDAY 22-AUG-74 12:10
3 ;
4 ; COPYRIGHT 1975, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
5 ; COPYRIGHT 1974, DIGITAL EQUIPMENT CORP., MAYNARD MASS.
6
7 ; THIS SOFTWARE IS FURNISHED TO PURCHASER UNDER A LICENSE FOR USE
8 ; ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED (WITH INCLUSION
9 ; OF DEC'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH SYSTEM, EXCEPT
10 ; AS MAY OTHERWISE BE PROVIDED IN WRITING BY DEC.
11
12 ; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
13 ; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
14 ; EQUIPMENT CORPORATION.
15
16 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
17 ; OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
18 ;
19 ; PETER H. LIPMAN 12-JUNE 73
20 ;
21 .MCALL NBOF$L,IOERR$,FILIO$
22 000000 NBOF$L ;DEFINE FNB OFFSETS LOCALLY
23 000000 IOERR$ ;DEFINE I/O ERROR CODES LOCALLY
24 000000 FILIO$ ;DEFINE THE I/O FUNCTION CODES LOCALLY
25 ;
26 .MCALL CALL,RETURN,FDBDF$,FDAT$A,FDOP$A,FCSBT$
27 ;
28 000000 FCSBT$ DEF$L
29 000000 FLDSOF ;DEFINE FILE DESCRIPTOR OFFSETS
30 ;
31 000400 NB.SD1=400 ;WILD CARD IN PROJECT #
32 001000 NB.SD2=1000 ;WILD CARD IN PROGRAMMER #
33 001400 NB.SDI=NB.SD1!NB.SD2 ;WILD CARD IN DIRECTORY
34 ;
35 ; SCRATCH STORAGE FOR WILD UIC LOGIC CONSISTS
36 ; OF A FILE NAME BLOCK FOLLOWED BY THE FOLLOWING EXTRA WORDS
37 000036 N.WNM1=S.FNB ;2 WORDS FOR RAD50 NON WILD CARD
38 ;PROJECT OR PROGRAMMER NAME
39 000042 N.WNM2=N.WNM1+4 ;5 WORDS OF STRING STORAGE FOR
40 ;ASCII FORM OF CURRENT DIRECTORY NAME
41 000054 S.WUIC=S.FNB+14. ;NO. OF BYTES IN SCRATCH AREA
42 ;
43 015172 DIRTYP=<'D-100>*50*50+<<'I-100>*50>+<'R-100> ;.RAD50 DIR
44 140116 MFDNAM=<'0-22>*50*50+<<'0-22>*50>+<'0-22> ;.RAD50 000
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 8
.WPARS - WILD CARD UIC PARSE
46 .SBTTL .WPARS - WILD CARD UIC PARSE
47 ;
48 000000 PURE.I
49 ;+
50 ; WILD CARD UIC PARSE
51 ; CALLING SEQUENCE:
52 ; CALL .WPARS
53 ; INPUTS:
54 ; R0=FDB
55 ; R1=FILE NAME BLOCK ADDRESS
56 ; R2=FILE DESCRIPTOR POINTER
57 ; R3=DEFAULT FILE NAME BLOCK
58 ; R4=ADDR OF SCRATCH AREA FOR WILD UIC LOGIC
59 ; OUTPUTS:
60 ; C=0 IF SUCCESSFUL, C=1 IF ERROR
61 ; ALL REGISTERS PRESERVED
62 ; OPERATION:
63 ; PERFORMS A NORMAL CALL TO .PARSE, AND IF A BAD DIRECTORY
64 ; INDICATION IS RETURNED, ATTEMPTS TO PARSE AND SET UP FOR WILD UIC'S
65 ; IF A SUCCESSFUL INDICATION IS RETURNED, THE DIRECTORY ID
66 ; IS SET UP POINTING AT THE FIRST DIRECTORY TO BE USED
67 ;-
68 000000 012764 000050 000020 .WPARS::MOV #NB.SNM!NB.SVR,N.STAT(R4)
69 000006 CALL .PARSE
70 000012 103056 BCC 60$ ;BRANCH IF PARSE SUCCESSFUL
71 000014 122760 177714 000000G CMPB #IE.BDI,F.ERR(R0) ;BAD DIRECTORY NAME?
72 000022 001051 BNE 58$ ;BRANCH IF NO, REPORT ERROR
73 ; SEE IF WILD CARD DIRECTORY NAME
74 000024 005762 000004 TST N.DIRD(R2) ;IF NULL DIRECTORY DESCRIPTOR
75 000030 001446 BEQ 58$ ;THEN REPORT ERROR
76 000032 CALL PRSDIR
77 000036 103444 BCS 60$ ;BRANCH IF BAD DIRECTORY SYNTAX
78 000040 032764 001400 000020 BIT #NB.SDI,N.STAT(R4)
79 000046 001437 BEQ 58$ ;BRANCH IF NO WILD UIC'S
80 ; IT'S A WILD CARD DIRECTORY NAME
81 000050 012764 015172 000014 MOV #DIRTYP,N.FTYP(R4) ;FILE TYPE "DIR"
82 000056 005064 000022 CLR N.NEXT(R4)
83 000062 012764 177777 000024 MOV #-1,N.DID(R4) ;DOING FIND'S IN MFD
84 000070 012764 177777 000026 MOV #-1,N.DID+2(R4)
85 000076 005064 000030 CLR N.DID+4(R4)
86 000102 016164 000032 000032 MOV N.DVNM(R1),N.DVNM(R4)
87 000110 016164 000034 000034 MOV N.UNIT(R1),N.UNIT(R4)
88 000116 CALL .NXDIR ;SET UP TO USE THE NEXT DIRECTORY
89 000122 103412 BCS 60$
90 000124 CALL .PARSE
91 000130 016446 000020 MOV N.STAT(R4),-(SP)
92 000134 042716 176377 BIC #^C<NB.SDI>,@SP
93 000140 052661 000020 BIS (SP)+,N.STAT(R1) ;SET WILD DIR BITS IN FNB STATUS
94 000144 RETURN
95 000146 000261 58$: SEC
96 000150 60$: RETURN
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 10
.FNDNX - FIND THE NEXT FILE
99 .SBTTL .FNDNX - FIND THE NEXT FILE
100 ;+
101 ; FIND THE NEXT FILE IN THIS (OR NEXT) DIRECTORY
102 ; CALLING SEQUENCE:
103 ; CALL .FNDNX
104 ; INPUTS:
105 ; R0=FDB ADDRESS
106 ; R1=FILE NAME BLOCK ADDRESS
107 ; R2=ADDRESS OF SCRATCH BLOCK FOR UIC WILD CARD LOGIC
108 ; OUPUTS:
109 ; C=0 IF SUCCESSFUL, C=1 IF FAILURE
110 ; ALL REGISTERS PRESERVED
111 ; OPERATION:
112 ; FINDS THE NEXT FILE IN THE CURRENT DIRECTORY (EVEN IF
113 ; WILD CARD NAME, TYPE AND DEFAULT VERSION). OPTIONALLY WILL
114 ; CROSS TO THE NEXT WILD CARD DIRECTORY IF R2 NON ZERO (AND
115 ; IF WILD CARD UIC'S ARE PRESENT).
116 ;-
117 000152 .FNDNX::CALL .WLDVC ;WILD CARDS WITH DEFAULT VERSION?
118 000156 103403 BCS FNDNX1 ;BRANCH IF YES
119 000160 CALL .FIND
120 000164 000470 BR FNDNX2
121 ;
122 ; HANDLE THE SPECIAL CASE OF WILD CARD FIND OF NEWEST OR OLDEST VERSION
123 000166 005761 000022 FNDNX1: TST N.NEXT(R1) ;FIRST FILE IN CLASS?
124 000172 001003 BNE 10$ ;BRANCH IF NOT
125 000174 CALL TDRINI ;YES, INIT TEMP DIRECTORY
126 000200 103444 BCS 40$ ;BRANCH IF FAILED
127 000202 016146 000016 10$: MOV N.FVER(R1),-(SP)
128 000206 016146 000020 20$: MOV N.STAT(R1),-(SP)
129 000212 052761 000010 000020 BIS #NB.SVR,N.STAT(R1) ;FIND ANY VERSION FIRST
130 000220 CALL .FIND
131 000224 103441 BCS 60$ ;BRANCH IF NO MORE FILES
132 000226 016146 000022 MOV N.NEXT(R1),-(SP)
133 000232 005061 000020 CLR N.STAT(R1)
134 000236 005061 000022 CLR N.NEXT(R1)
135 000242 016661 000004 000016 MOV 4(SP),N.FVER(R1) ;SAVED FILE VERSION (0 OR -1)
136 000250 CALL .FIND ;FIND NEWEST (OR OLDEST)
137 000254 103422 BCS 50$ ;BRANCH IF FAILED (SHOULDN'T HAPPEN)
138 000256 CALL TDRENT ;HAVE WE ALREADY FOUND THIS ONE
139 000262 012661 000022 MOV (SP)+,N.NEXT(R1)
140 000266 012661 000020 MOV (SP)+,N.STAT(R1)
141 000272 103402 BCS 30$
142 000274 005726 TST (SP)+ ;POP THE SAVED VERSION
143 000276 000454 BR FNDNX3
144 ; IF DUPLICATE ERROR, WE'VE SEEN THIS FILE BEFORE, DON'T "FIND" IT AGAIN
145 000300 122767 177707 000000C 30$: CMPB #IE.DUP,TDRFDB+F.ERR
146 000306 001737 BEQ 20$ ;GO FIND ANOTHER
147 000310 005726 TST (SP)+
148 ;
149 ; ERROR FROM INIT OR ENTER IN TMP DIRECTORY
150 000312 116760 000000C 000000G 40$: MOVB TDRFDB+F.ERR,F.ERR(R0)
151 000320 000411 BR 70$
152 ;
153 ; COULDN'T FIND NEWEST OR OLDEST VERSION - CAN'T THINK OF A REASON
154 000322 012661 000022 50$: MOV (SP)+,N.NEXT(R1)
155 000326 000402 BR 65$
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 10-1
.FNDNX - FIND THE NEXT FILE
156 ;
157 ; FAILED TO FIND NEXT FILE IN CLASS, ALL DONE
158 000330 60$: CALL TDRDEL ;DELETE THE TEMP DIRECTORY
159 000334 012661 000020 65$: MOV (SP)+,N.STAT(R1)
160 000340 012661 000016 MOV (SP)+,N.FVER(R1)
161 000344 000261 70$: SEC
162 000346 103030 FNDNX2: BCC FNDNX3
163 000350 005702 TST R2 ;ALLOWED TO CROSS DIRECTORIES\?
164 000352 001425 BEQ 20$ ;BRANCH IF NOT
165 000354 032761 001400 000020 BIT #NB.SDI,N.STAT(R1) ;ANY WILD UIC'S
166 000362 001421 BEQ 20$ ;BRANCH IF NOT
167 000364 122760 177746 000000G CMPB #IE.NSF,F.ERR(R0) ;IF "NO SUCH FILE"
168 000372 001015 BNE 20$ ;BRANCH IF NOT
169 000374 010346 MOV R3,-(SP)
170 000376 010446 MOV R4,-(SP)
171 000400 010204 MOV R2,R4
172 000402 016002 000000G MOV F.DSPT(R0),R2
173 000406 016003 000000G MOV F.DFNB(R0),R3
174 000412 CALL .NXDIR
175 000416 010402 MOV R4,R2
176 000420 012604 MOV (SP)+,R4
177 000422 012603 MOV (SP)+,R3
178 000424 103252 BCC .FNDNX ;IF FOUND NEW DIRECTORY, FIND NEXT FILE
179 000426 000261 20$: SEC
180 000430 FNDNX3: RETURN
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 11
.NXDIR - FIND NEXT WILD CARD DIRECTORY
182 .SBTTL .NXDIR - FIND NEXT WILD CARD DIRECTORY
183 ;+
184 ; SET UP FOR NEXT WILD CARD DIRECTORY
185 ; CALLING SEQUENCE:
186 ; CALL .NXDIR
187 ; INPUTS:
188 ; R0=FDB ADDRESS
189 ; R1=FILE NAME BLOCK ADDRESS
190 ; R2=FILE DESCRIPTOR POINTER
191 ; R3=DEFAULT FILE NAME BLOCK
192 ; R4=ADDR OF SCRATCH AREA FOR WILD UIC LOGIC
193 ; OUTPUTS:
194 ; C=0 IF SUCCESSFUL, C=1 IF FAILED
195 ; ALL REGISTERS PRESERVED
196 ; OPERATION:
197 ; FINDS THE NEXT DIRECTORY THAT MEETS THE WILD CARD CRITERIA
198 ; IF ONLY THE PROJECT # WAS WILD, THEN THE PROG NAMES MUST MATCH
199 ; AND VICE-VERSA. DIRECTORY NAMES OF MORE THAN 6 CHARS WILL NOT
200 ; SATISFY THE MATCH, AND LIKEWISE, ANY NAME BEGINNING WITH 000
201 ; (RAD50) WILL ALSO NOT MATCH. THIS MEANS THE MFD WILL
202 ; NOT BE FOUND.
203 ; WHEN A DIRECTORY IS FOUND, IT'S ID IS PLACED
204 ; IN THE DIRECTORY ID SLOT IN THE FILE NAME BLOCK.
205 ; ALSO THE DIRECTORY STRING IS GENERATED AND POINTED TO BY F.DSPT
206 ; IF PRESENT, OR THE DIRECTORY ID IS PUT INTO THE
207 ; DEFAULT NAME BLOCK IF IT IS PRESENT.
208 ;-
209 000432 032764 001400 000020 .NXDIR::BIT #NB.SDI,N.STAT(R4) ;WILD CARD UIC'S?
210 000440 001522 BEQ 50$ ;BRANCH IF NO
211 000442 CALL $SAVAL
212 000446 010146 10$: MOV R1,-(SP)
213 000450 010401 MOV R4,R1
214 000452 CALL .FIND ;FIND THE NEXT DIRECTORY
215 000456 012601 MOV (SP)+,R1
216 000460 103516 BCS 60$
217 ; FOUND ONE, SEE IF IT MATCHE OUR REQUIREMENTS
218 000462 022764 140116 000006 CMP #MFDNAM,N.FNAM(R4) ;DON'T ALLOW MFD
219 000470 001766 BEQ 10$
220 000472 005764 000012 TST N.FNAM+4(R4) ;NO 7-9 CHAR NAMES
221 000476 001363 BNE 10$
222 ; MATCH PROJ OR PROG NAME IF NECESSARY
223 000500 032764 000400 000020 BIT #NB.SD1,N.STAT(R4) ;WILD CARD PROJ #?
224 000506 001004 BNE 20$ ;BRANCH IF YES
225 000510 026464 000036 000006 CMP N.WNM1(R4),N.FNAM(R4)
226 000516 001353 BNE 10$ ;BRANCH IF PROJ NAMES DISAGREE
227 000520 032764 001000 000020 20$: BIT #NB.SD2,N.STAT(R4) ;WILD CARD PROGRAMMER #?
228 000526 001004 BNE 30$ ;BRANCH IF YES
229 000530 026464 000040 000010 CMP N.WNM1+2(R4),N.FNAM+2(R4)
230 000536 001343 BNE 10$ ;BRANCH IF PROG NAMES DISAGREE
231 ; THIS DIRECTORY IS JUST FINE, SET UP THE FILE NAME BLOCK DIRECTORY ID
232 ; AND ALSO SET THE DIR NAME POINTER IN F.DSPT IF PRESENT
233 ; OR THE DIRECTORY ID IN F.DFNB IF F.DSPT IS 0
234 000540 016461 000000 000024 30$: MOV N.FID(R4),N.DID(R1)
235 000546 016461 000002 000026 MOV N.FID+2(R4),N.DID+2(R1)
236 000554 016461 000004 000030 MOV N.FID+4(R4),N.DID+4(R1)
237 000562 005061 000022 CLR N.NEXT(R1) ;START AT BEGINNING OF DIRECTORY
238 ; SET UP STRING WITH DIRECTORY NAME, AND POINT TO IT FROM
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 11-1
.NXDIR - FIND NEXT WILD CARD DIRECTORY
239 ; THE FILE DESCRIPTOR POINTER
240 000566 010205 MOV R2,R5 ;SAVE THE FILE DECRIPTOR POINTER
241 000570 001432 BEQ 40$ ;SKIP THIS IF NULL POINTER
242 000572 010400 MOV R4,R0
243 000574 062700 000042 ADD #N.WNM2,R0 ;R0=ADDRESS OF STRING AREA
244 000600 016401 000006 MOV N.FNAM(R4),R1 ;R1=1ST RAD50 FILE NAME WORD
245 000604 CALL C5TB ;CONVERT RAD50 TO BINARY IN R1
246 000610 010146 MOV R1,-(SP) ;SAVE PROJECT #
247 000612 016401 000010 MOV N.FNAM+2(R4),R1
248 000616 CALL C5TB ;CONVERT 2ND RAD50 WORD
249 000622 005003 CLR R3
250 000624 152603 BISB (SP)+,R3 ;PROJECT #
251 000626 000303 SWAB R3
252 000630 150103 BISB R1,R3 ;R3 =.BYTE PROG#,PROJ#
253 000632 010002 MOV R0,R2 ;R2=SCRATCH AREA STRING ADR
254 000634 005004 CLR R4
255 000636 CALL .PPASC ;PPN TO ASCII STRING
256 000642 010065 000006 MOV R0,N.DIRD+2(R5) ;R5=F.DSPT, STORE STRING ADDRESS
257 000646 160002 SUB R0,R2 ;CALCULATE DIRECTORY STRING SIZE
258 000650 010265 000004 MOV R2,N.DIRD(R5) ;AND STORE IT IN F.DSPT
259 000654 000420 BR 60$
260 ;
261 ; SET DIRECTORY ID IN DEFAULT NAME BLOCK, SINCE THERE
262 ; WAS NO FILE DESCRIPTOR POINTER TO PUT A STRING IN
263 000656 005703 40$: TST R3 ;ANY DEFAULT FILE NAME BLOCK?
264 000660 001416 BEQ 60$ ;BRANCH IF NO
265 000662 016463 000000 000024 MOV N.FID(R4),N.DID(R3)
266 000670 016463 000002 000026 MOV N.FID+2(R4),N.DID+2(R3)
267 000676 016463 000004 000030 MOV N.FID+4(R4),N.DID+4(R3)
268 000704 RETURN
269 000706 112760 177746 000000G 50$: MOVB #IE.NSF,F.ERR(R0)
270 000714 000261 SEC
271 000716 60$: RETURN
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 12
.WLDVC - CHECK FOR WILD CARDS WITH DEFAULT VERSION
273 .SBTTL .WLDVC - CHECK FOR WILD CARDS WITH DEFAULT VERSION
274 ;
275 ;+
276 ; CHECK IF DEFAULT VERSION WITH WILD CARD NAME OR TYPE
277 ; CALLING SEQUENCE:
278 ; CALL .WLDVC
279 ; INPUTS:
280 ; R0=FDB ADDRESS
281 ; R1=FILE NAME BLOCK
282 ; OUTPUTS:
283 ; C=1 IF WILD NAME OR TYPE, AND DEFAULT VERSION
284 ; C=0 IF NOT
285 ; ALL REGISTERS PRESERVED
286 ;-
287 000720 032761 000060 000020 .WLDVC::BIT #NB.SNM!NB.STP,N.STAT(R1)
288 000726 001415 BEQ 10$
289 000730 032761 000010 000020 BIT #NB.SVR,N.STAT(R1) ;REQUIRE WILD VERSION
290 000736 001011 BNE 10$
291 000740 005761 000016 TST N.FVER(R1) ;OR EXPLICIT VERSION
292 000744 001404 BEQ 5$
293 000746 022761 177777 000016 CMP #-1,N.FVER(R1)
294 000754 001002 BNE 10$
295 000756 000261 5$: SEC
296 000760 RETURN
297 000762 000241 10$: CLC
298 000764 RETURN
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 13
USEFUL SUBROUTINES
300 .SBTTL USEFUL SUBROUTINES
301 ;
302 ;+
303 ; PARSE THE DIRECTORY STRING, ALLOWING WILD CARD UIC'S
304 ; CALLING SEQUENCE:
305 ; CALL PRSDIR
306 ; INPUTS:
307 ; R0=FDB
308 ; R1=FILE NAME BLOCK
309 ; R2=FILE DESCRIPTOR POINTER
310 ; R3=DEFAULT FILE NAME BLOCK
311 ; R4=SCRATCH AREA TO BE INITIALIZED WITH WILD CARD
312 ; UIC INFORMATION
313 ; OUTPUTS:
314 ; C=0 IF OK, C=1 IF BAD SYNTAX IN DIRECTORY STRING
315 ; ALL REGISTERS PRESERVED
316 ; OPERATION:
317 ; SETS UP THE STATUS WORD (N.STAT) IN THE FNB OF THE
318 ; SCRATCH AREA WITH THE APPROPRIATE WILD CARD UIC BITS, AND STORES
319 ; THE EXPLICIT PROJECT NAME (RAD50) AND PROGRAMER NAME
320 ; IN N.WNM1, N.WNM1+2 (R4).
321 ;-
322 000766 PRSDIR: CALL $SAVAL
323 000772 010446 MOV R4,-(SP)
324 000774 010401 MOV R4,R1
325 000776 062701 000036 ADD #N.WNM1,R1
326 001002 CALL PRSUI1
327 001006 012604 MOV (SP)+,R4
328 001010 103437 BCS 60$
329 001012 014301 MOV -(R3),R1 ;R1=PROJECT #
330 001014 010400 MOV R4,R0
331 001016 062700 000042 ADD #N.WNM2,R0 ;SCRATCH STRING ADDRESS
332 001022 CALL CDRNM ;CONVERT NUMBER TO RAD50 (1 WORD)
333 001026 010123 MOV R1,(R3)+ ;STORE RAD50 BACK IN N.WNM1(R4)
334 001030 103006 BCC 20$
335 ; NUMBER WAS TOO BIG, WAS IT -1, IF SO, SET WILD BIT
336 001032 022701 177777 CMP #-1,R1
337 001036 001024 BNE 60$ ;OTHERWISE SYNTAX ERROR
338 001040 052764 000400 000020 BIS #NB.SD1,N.STAT(R4) ;SET WILD PROJECT #
339 001046 011301 20$: MOV @R3,R1 ;R1=PROGRAMMER #
340 001050 010400 MOV R4,R0
341 001052 062700 000042 ADD #N.WNM2,R0
342 001056 CALL CDRNM
343 001062 010113 MOV R1,@R3 ;STORE RAD50
344 001064 103006 BCC 30$
345 001066 022701 177777 CMP #-1,R1
346 001072 001006 BNE 60$ ;BRANCH IF SYNTAX ERROR
347 001074 052764 001000 000020 BIS #NB.SD2,N.STAT(R4) ;SET WILD CARD PROGRAMMER #
348 001102 000241 30$: CLC
349 001104 RETURN
350 001106 005726 58$: TST (SP)+
351 001110 000261 60$: SEC
352 001112 RETURN
353 ;
354 ;+
355 ; PARSE UIC STRING INTO BINARY PROJ AND PROG NUMBERS (2 WORDS)
356 ; CALLING SEQUENCE:
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 13-1
USEFUL SUBROUTINES
357 ; CALL .PRSUI
358 ; INPUTS:
359 ; R1=ADDRESS OF 2 WORD BLOCK TO STORE PPN
360 ; R2=FILE DESCRIPTOR POINTER
361 ; OUTPUTS:
362 ; C=0 OK, C=1 IF SUNTAX ERROR
363 ; ALL REGISTERS PRESERVED
364 ; @R1 = PROJECT # OR -1 IF *
365 ; 2(R1) = PROGRAMMER # OR -1 IF *
366 ; ALTERNATE ENTRY:
367 ; CALL PRSUI1
368 ; INPUTS:
369 ; SAME
370 ; OUTPUTS:
371 ; SAME EXCEPT REGISTERS NOT PRESERVED
372 ; R3= ADDRESS OF PROGRAMMER # (2ND WORD)
373 ; R0 PRESERVED, R2,R4,R5 ALTERED
374 ;-
375 001114 .PRSUI::
376 001114 004567 000000G JSR R5,.SAVR1
377 001120 010103 PRSUI1: MOV R1,R3 ;R3=ADR TO RETURN PROJECT #
378 001122 016201 000004 MOV N.DIRD(R2),R1 ;R1=SIZE OF DIRECTORY STRING
379 001126 016202 000006 MOV N.DIRD+2(R2),R2 ;R2=ADDRESS OF DIRECOTRY STRING
380 001132 122722 000133 CMPB #'[,(R2)+ ;REQUIRE LEADING "["
381 001136 001014 BNE 40$
382 001140 005301 DEC R1 ;COUNT THE "["
383 001142 012704 000054 MOV #',,R4 ;R4=TERMINATOR CHARACTER
384 001146 CALL SCNCVT ;CONVERT PROJECT #
385 001152 103405 BCS 30$ ;BRANCH IF BAD SYNTAX
386 001154 005723 TST (R3)+ ;R3= ADDRESS TO STORE PROG #
387 001156 012704 000135 MOV #'],R4 ;R4=TERMINATING CHAR
388 001162 CALL SCNCVT ;CONVERT PROGRAMMER #
389 001166 30$: RETURN
390 ;
391 001170 000261 40$: SEC
392 001172 RETURN
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 14
USEFUL SUBROUTINES
394 ;+
395 ; SCAN ASCII STRING UNTIL FIND TERMINATING CHAR
396 ; CONVERT TO NUMBER OR -1 IF WILD CARD, RETURN @R3
397 ; CALLING SEQUENCE:
398 ; CALL SCNCVT
399 ; INPUTS:
400 ; R1 = STRING SIZE
401 ; R2 = STRING ADDRESS
402 ; R3 = ADDRESS TO RETURN VALUE
403 ; R4 = TERMINATING CHARACTER TO MATCH
404 ; OUTPUTS:
405 ; C=0 IF OK, C=1 IF SYNTAX ERROR
406 ; R1,R2 UPDATED TO REFLECT CHARACTERS SCANNED
407 ; R4,R5 ALTERED
408 ; R0,R3 PRESERVED
409 ;-
410 001174 010205 SCNCVT: MOV R2,R5 ;SAVE STARTING CHARACTER ADDRESS
411 001176 120422 10$: CMPB R4,(R2)+
412 001200 001404 BEQ 20$ ;BRANCH IF THIS IS THE TERMINATOR
413 001202 SOB R1,10$
414 001206 000261 SEC ;RAN OUT OF CHARACTER, BAD SYNTAX
415 001210 RETURN
416 001212 005301 20$: DEC R1 ;COUNT TERMINATOR
417 001214 122715 000052 CMPB #'*,@R5 ;WILD CARD?
418 001220 001004 BNE 30$ ;BRANCH IF NO
419 001222 012713 177777 MOV #-1,@R3
420 001226 000241 CLC
421 001230 RETURN
422 001232 010204 30$: MOV R2,R4
423 001234 160504 SUB R5,R4
424 001236 005304 DEC R4 ;R4 = SIZE OF NUMERIC STRING
425 001240 CALL .ODCVT
426 001244 RETURN
427 ;
428 ;+
429 ; CONVERT PROJECT OR PROGRAMMER NUMBER IN R1 TO 3 CHAR RAD50 NAME
430 ; RETURNED IN R1
431 ; CALLING SEQUENCE:
432 ; CALL CDRNM
433 ; INPUTS:
434 ; R0=STRING ADDRESS TO STORE CHARS IN (SCRATCH)
435 ; R1=NUMBER TO CONVERT
436 ; OUTPUTS:
437 ; C=0 IF CONVERTED, C=1 IF HIGH BYTE OF R1 NON ZERO
438 ; R1=RAD50 CONVERSION OF NUMBER
439 ; R0,R2 ALTERED
440 ; R3-R5 PRESERVED
441 ;-
442 001246 032701 177400 CDRNM: BIT #177400,R1
443 001252 001402 BEQ 20$ ;BRANCH IF NO HIGH ORDER BITS SET
444 001254 000261 SEC
445 001256 RETURN
446 001260 010702 20$: MOV PC,R2 ;R2 NON 0, DON'T SUPPRESS LEAD 0'S
447 001262 CALL $CBOMG ;CONVERT BINARY TO OCTAL MAGNITUDE
448 001266 162700 000003 SUB #3,R0 ;R0 POINTS AT LAST 3 CHARS
449 001272 CALL $CAT5 ;CONVERT ASCII TO RAD50
450 001276 000241 CLC
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 14-1
USEFUL SUBROUTINES
451 001300 RETURN
452 ;
453 ;+
454 ; CONVERT RAD50 NUMBER IN R1 TO BINARY VALUE IN R1
455 ; CALLING SEQUENCE:
456 ; CALL C5TB
457 ; INPUTS:
458 ; R0=STRING ADDRESS (SCRATCH)
459 ; R1=RAD50 VALUE TO CONVERT
460 ; OUTPUTS:
461 ; R1=BINARY VALUE
462 ; R0,R3-R5 PRESERVED
463 ; R2 ALTERED
464 ;-
465 001302 010046 C5TB: MOV R0,-(SP)
466 001304 CALL $C5TA ;CONVERT RAD50 TO ASCII
467 001310 105010 CLRB @R0
468 001312 162700 000003 SUB #3,R0
469 001316 CALL $COTB ;CONVERT OCTAL STRING TO BINARY
470 001322 012600 MOV (SP)+,R0
471 001324 RETURN
472 ;
473 ;
474 000001 .END
PRSFND M0114, PARSE, FIND, ETC. MACRO M1108 05-DEC-77 22:47 PAGE 14-2
SYMBOL TABLE
CDRNM 001246R 002 IE.BDR= 177716 IE.OFL= 177677 IO.RNA= 005400 N.WNM2= 000042
C5TB 001302R 002 IE.BDV= 177711 IE.ONP= 177773 IO.RTK= 000060 PRSDIR 000766R 002
DIRTYP= 015172 IE.BHD= 177700 IE.OVR= 177756 IO.RVB= 010400 PRSUI1 001120R 002
FA.APD= 000100 IE.BLK= 177754 IE.PRI= 177760 IO.UNL= 000042 R$$DPB= 000001
FA.CRE= 000010 IE.BNM= 177712 IE.RAC= 177724 IO.WAT= 013400 R$$DYM= 000001
FA.EXT= 000004 IE.BTF= 177675 IE.RAT= 177723 IO.WLB= 000400 R$$EIS= 000000
FA.NSP= 000100 IE.BTP= 177725 IE.RBG= 177730 IO.WVB= 011000 R$$11M= 000001
FA.RD = 000001 IE.BVR= 177701 IE.RCN= 177722 IQ.Q = 000002 R.FIX = 000001
FA.SHR= 000040 IE.BYT= 177755 IE.RER= 177740 IQ.X = 000001 R.VAR = 000002
FA.TMP= 000020 IE.CKS= 177742 IE.RNM= 177715 IS.BV = 000005 SCNCVT 001174R 002
FA.WRT= 000002 IE.CLO= 177732 IE.RSU= 177757 IS.CR = 006401 S.APPD= 000010
FD.BLK= 000010 IE.CON= 177752 IE.SNC= 177735 IS.ESC= 015401 S.FIDS= 000014
FD.CCL= 000002 IE.DAA= 177770 IE.SPC= 177772 IS.PND= 000000 S.FNAM= 000006
FD.CR = 000002 IE.DAO= 177763 IE.SQC= 177734 IS.RDD= 000002 S.FNB = 000036
FD.DIR= 000010 IE.DFU= 177750 IE.SRE= 177762 IS.SUC= 000001 S.FNBW= 000017
FD.FTN= 000001 IE.DNA= 177771 IE.STK= 177706 MFDNAM= 140116 S.FNTY= 000004
FD.INS= 000010 IE.DNR= 177775 IE.VER= 177774 NB.DEV= 000200 S.FTYP= 000002
FD.PLC= 000004 IE.DUN= 177767 IE.WAC= 177743 NB.DIR= 000100 S.NFEN= 000020
FD.RAH= 000001 IE.DUP= 177707 IE.WAT= 177741 NB.NAM= 000004 S.WUIC= 000054
FD.RAN= 000002 IE.EBX= 177776 IE.WER= 177737 NB.SDI= 001400 TDRDEL= ****** GX
FD.REC= 000001 IE.EOF= 177766 IE.WLK= 177764 NB.SD1= 000400 TDRENT= ****** GX
FD.RWM= 000001 IE.EOT= 177702 IE.2DV= 177720 NB.SD2= 001000 TDRFDB= ****** GX
FD.SDI= 000020 IE.EOV= 177765 IO.ACE= 007400 NB.SNM= 000040 TDRINI= ****** GX
FD.SQD= 000040 IE.EXP= 177676 IO.ACR= 006400 NB.STP= 000020 $CAT5 = ****** GX
FD.TTY= 000004 IE.FEX= 177717 IO.ACW= 007000 NB.SVR= 000010 $CBOMG= ****** GX
FD.WBH= 000002 IE.FHE= 177705 IO.APC= 014000 NB.TYP= 000002 $COTB = ****** GX
FNDNX1 000166R 002 IE.FOP= 177713 IO.APV= 014010 NB.VER= 000001 $C5TA = ****** GX
FNDNX2 000346R 002 IE.HFU= 177744 IO.ATT= 001400 N.DEVD= 000000 $SAVAL= ****** GX
FNDNX3 000430R 002 IE.IFC= 177776 IO.CLN= 003400 N.DID = 000024 $$ = 000067
FO.APD= 000106 IE.IFU= 177747 IO.CRE= 012000 N.DIRD= 000004 $$MSG = 000000
FO.MFY= 000002 IE.ILL= 177726 IO.DAC= 010000 N.DVNM= 000032 .FIND = ****** GX
FO.RD = 000001 IE.ISQ= 177703 IO.DEL= 012400 N.FID = 000000 .FNDNX 000152RG 002
FO.UPD= 000006 IE.LCK= 177745 IO.DET= 002000 N.FLID= 000016 .NXDIR 000432RG 002
FO.WRT= 000016 IE.MBK= 177721 IO.ENA= 006000 N.FNAM= 000006 .ODCVT= ****** GX
F.DFNB= ****** GX IE.MOD= 177753 IO.EXT= 011400 N.FNMD= 000010 .PARSE= ****** GX
F.DSPT= ****** GX IE.NBF= 177731 IO.FNA= 004400 N.FTYP= 000014 .PPASC= ****** GX
F.ERR = ****** GX IE.NBK= 177727 IO.KIL= 000012 N.FVER= 000016 .PRSUI 001114RG 002
IE.ABO= 177761 IE.NFI= 177704 IO.LOV= 001010 N.NEXT= 000022 .SAVR1= ****** GX
IE.ALN= 177736 IE.NLN= 177733 IO.LTK= 000050 N.SPEC= 000014 .WLDVC 000720RG 002
IE.BAD= 177777 IE.NNC= 177674 IO.RAT= 013000 N.STAT= 000020 .WPARS 000000RG 002
IE.BBE= 177710 IE.NOD= 177751 IO.RDN= 000022 N.UNIT= 000034 ...GBL= 000000
IE.BDI= 177714 IE.NSF= 177746 IO.RLB= 001000 N.WNM1= 000036 ...TPC= 000036
. ABS. 000000 000
000000 001
PURE$I 001326 002
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 6405 WORDS ( 26 PAGES)
DYNAMIC MEMORY: 7328 WORDS ( 28 PAGES)
ELAPSED TIME: 00:00:52
[43,10]PRSFND,[43,20]PRSFND/-SP=[43,30]PIPMAC,PRSFND
TMPDIR M0114, TEMPORARY DIRECTO MACRO M1108 05-DEC-77 22:48
TABLE OF CONTENTS
7- 1 **** TMPDIR VERSION M0114 ****
TMPDIR M0114, TEMPORARY DIRECTO MACRO M1108 05-DEC-77 22:48 PAGE 7
1 .TITLE TMPDIR M0114, TEMPORARY DIRECTORY LOGIC
.SBTTL **** TMPDIR VERSION M0114 ****
.IDENT /M0114/
2 ; ALTERED THURSDAY 22-AUG-74 14:05
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 19-AUG-74
20 ;
21 .MCALL FILIO$
22 000000 FILIO$ ;DEFINE THE I/O FUNCTION CODES LOCALLY
23 ;
24 .MCALL CALL,RETURN,FDBDF$,FDAT$A,FDOP$A,FCSBT$
25 ;
26 000000 FCSBT$ DEF$L
27 ;
28 000006 TDRLUN=6 ;LUN FOR TEMP DIRECTORY FILE
29 007004 HA.UAT=S.FATT*400+4 ;WRITE USER ATTRIBUTE CODE
30 ;
31 000000 IMPURE
32 ;
33 000000 TDRFDB::FDBDF$
34 000140 FDAT$A R.FIX,,S.NFEN
35 000140 FDOP$A TDRLUN,TDRNAM
36 ;
37 000140 PURE.D
38 ;
39 000000 007004 000000' 000000 ATTBLK: .WORD HA.UAT,TDRFDB,0
40 000006 000003 000022' 000000 TDRNAM: .WORD TDRDVS,TDRDVN,0,0,0,0
000014 000000 000000 000000
41 000022 123 131 060 TDRDVN: .ASCII /SY0/
42 000003 TDRDVS=.-TDRDVN
43 .EVEN
44 ;
45 000026 PURE.I
46 ;
47 ; INIT THE TEMP DIRECTORY, DELETE THE OLD ONE AND CREATE A NEW ONE
48 ; RETURN C=0 IF SUCCESSFUL, C=1 IF ERROR
49 000000 TDRINI::CALL TDRDEL
50 000004 103423 BCS 20$
51 000006 CALL $SAVAL
52
53 .IF EQ,R$$DPB
54 MOV #ATTBLK,-(SP) ;PUSH PARAMS TO CREATE QIO ONTO STACK
TMPDIR M0114, TEMPORARY DIRECTO MACRO M1108 05-DEC-77 22:48 PAGE 7-1
**** TMPDIR VERSION M0114 ****
55 CLR -(SP)
56 .IFF
57 000012 005046 CLR -(SP)
58 000014 012746 000000' MOV #ATTBLK,-(SP)
59 .ENDC
60
61 000020 012746 000126' MOV #TDRFDB+F.FNB+N.DID,-(SP)
62 000024 012700 000000' MOV #TDRFDB,R0
63 000030 012701 012000 MOV #IO.CRE,R1
64 000034 012702 000003 MOV #3,R2
65 000040 010603 MOV SP,R3
66 000042 CALL .XQIO ;CREATE THE FILE
67 000046 012601 MOV (SP)+,R1 ;CLEAN UP THE STACK, PRESERVING C BIT
68 000050 012601 MOV (SP)+,R1
69 000052 012601 MOV (SP)+,R1
70 000054 20$: RETURN
71 ;
72 ; DELETE THE TEMP DIRECTORY FILE IF IT EXISTS
73 ; AND INITIALIZE THE FDB IN PREPARATION FOR CREATING A NEW ONE
74 ; RETURNS C=0 IF SUCCESSFUL, C=1 IF FAILURE
75
76 000056 TDRDEL::
77 000056 CALL $SAVAL
78 000062 012700 000000' MOV #TDRFDB,R0
79 000066 005760 000126 TST F.FNB+N.DID(R0) ;IF DIRECTORY ID IS SET, DELETE THE FILE
80 000072 001412 BEQ 10$
81 ;
82 ; MARK THE FILE FOR DELETE
83 000074 012746 000126' MOV #TDRFDB+F.FNB+N.DID,-(SP)
84 000100 012701 012400 MOV #IO.DEL,R1
85 000104 012702 000001 MOV #1,R2
86 000110 010603 MOV SP,R3
87 000112 CALL .XQIO
88 000116 012601 MOV (SP)+,R1
89 000120 006102 10$: ROL R2 ;SAVE THE CARRY BIT
90 000122 005760 000134 TST F.DVNM(R0) ;IS THE FDB INITED
91 000126 001013 BNE 20$ ;IF DEVICE NAME IS SET, THEN YES
92 000130 012760 000001 000012 MOV #1,F.EFBK+2(R0)
93 000136 012701 000102' MOV #TDRFDB+F.FNB,R1
94 000142 012702 000006' MOV #TDRNAM,R2
95 000146 005003 CLR R3
96 000150 CALL .PRSDV
97 000154 103403 BCS 30$
98 000156 005060 000126 20$: CLR F.FNB+N.DID(R0)
99 000162 006002 ROR R2 ;RESTOR CARRY BIT
100 000164 30$: RETURN
101 ;
102 ; ENTER FILE IN TEMP DIRECTORY
103 ; INPUTS:
104 ; R1=FNB OF ENTRY TO MAKE
105 ; OUTPUTS:
106 ; C=0 IF ENTER WAS SUCCESSFUL
107 ; C=1 IF ERROR FROM ENTER
108 ; ALL REGISTERS PRESERVED
109 ;-
110 000166 TDRENT::CALL $SAVAL
111 000172 012702 000102' MOV #TDRFDB+F.FNB,R2
TMPDIR M0114, TEMPORARY DIRECTO MACRO M1108 05-DEC-77 22:48 PAGE 7-2
**** TMPDIR VERSION M0114 ****
112 000176 012703 000010 MOV #S.NFEN/2,R3
113 000202 012122 10$: MOV (R1)+,(R2)+
114 000204 SOB R3,10$
115 000210 012700 000000' MOV #TDRFDB,R0
116 000214 012701 000102' MOV #TDRFDB+F.FNB,R1
117 000220 CALL .ENTER
118 000224 RETURN
119 ;
120 ;
121 ;
122 000001 .END
TMPDIR M0114, TEMPORARY DIRECTO MACRO M1108 05-DEC-77 22:48 PAGE 7-3
SYMBOL TABLE
ATTBLK 000000R 003 F.BDB = 000070 F.RATT= 000001 IO.RLB= 001000 R$$DYM= 000001
FA.APD= 000100 F.BGBC= 000057 F.RCNM= 000034 IO.RNA= 005400 R$$EIS= 000000
FA.CRE= 000010 F.BKDN= 000026 F.RCTL= 000017 IO.RTK= 000060 R$$11M= 000001
FA.EXT= 000004 F.BKDS= 000020 F.RSIZ= 000002 IO.RVB= 010400 R.FIX = 000001
FA.NSP= 000100 F.BKEF= 000050 F.RTYP= 000000 IO.UNL= 000042 R.VAR = 000002
FA.RD = 000001 F.BKP1= 000051 F.STBK= 000036 IO.WAT= 013400 S.FATT= 000016
FA.SHR= 000040 F.BKST= 000024 F.UNIT= 000136 IO.WLB= 000400 S.FDB = 000140
FA.TMP= 000020 F.BKVB= 000064 F.URBD= 000020 IO.WVB= 011000 S.FNAM= 000006
FA.WRT= 000002 F.CNTG= 000034 F.VBN = 000064 IQ.Q = 000002 S.FNB = 000036
FD.BLK= 000010 F.DFNB= 000046 F.VBSZ= 000060 IQ.X = 000001 S.FNBW= 000017
FD.CCL= 000002 F.DSPT= 000044 HA.UAT= 007004 NB.DEV= 000200 S.FNTY= 000004
FD.CR = 000002 F.DVNM= 000134 IO.ACE= 007400 NB.DIR= 000100 S.FTYP= 000002
FD.DIR= 000010 F.EFBK= 000010 IO.ACR= 006400 NB.NAM= 000004 S.NFEN= 000020
FD.FTN= 000001 F.EFN = 000050 IO.ACW= 007000 NB.SD1= 000400 TDRDEL 000056RG 004
FD.INS= 000010 F.EOBB= 000032 IO.APC= 014000 NB.SD2= 001000 TDRDVN 000022R 003
FD.PLC= 000004 F.ERR = 000052 IO.APV= 014010 NB.SNM= 000040 TDRDVS= 000003
FD.RAH= 000001 F.FACC= 000043 IO.ATT= 001400 NB.STP= 000020 TDRENT 000166RG 004
FD.RAN= 000002 F.FFBY= 000014 IO.CLN= 003400 NB.SVR= 000010 TDRFDB 000000RG 002
FD.REC= 000001 F.FNAM= 000110 IO.CRE= 012000 NB.TYP= 000002 TDRINI 000000RG 004
FD.RWM= 000001 F.FNB = 000102 IO.DAC= 010000 NB.VER= 000001 TDRLUN= 000006
FD.SDI= 000020 F.FTYP= 000116 IO.DEL= 012400 N.DID = 000024 TDRNAM 000006R 003
FD.SQD= 000040 F.FVER= 000120 IO.DET= 002000 N.DVNM= 000032 $SAVAL= ****** GX
FD.TTY= 000004 F.HIBK= 000004 IO.ENA= 006000 N.FID = 000000 $$ = 000067
FD.WBH= 000002 F.LUN = 000042 IO.EXT= 011400 N.FNAM= 000006 .ENTER= ****** GX
FO.APD= 000106 F.MBCT= 000054 IO.FNA= 004400 N.FTYP= 000014 .PRSDV= ****** GX
FO.MFY= 000002 F.MBC1= 000055 IO.KIL= 000012 N.FVER= 000016 .XQIO = ****** GX
FO.RD = 000001 F.MBFG= 000056 IO.LOV= 001010 N.NEXT= 000022 ...GBL= 000000
FO.UPD= 000006 F.NRBD= 000024 IO.LTK= 000050 N.STAT= 000020 ...PC1= 000000R 002
FO.WRT= 000016 F.NREC= 000030 IO.RAT= 013000 N.UNIT= 000034 ...PC2= 000140R 002
F.ALOC= 000040 F.OVBS= 000030 IO.RDN= 000022 R$$DPB= 000001 ...TPC= 000140
F.BBFS= 000062 F.RACC= 000016
. ABS. 000000 000
000000 001
IMPURE 000140 002
PURE$D 000026 003
PURE$I 000226 004
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 4494 WORDS ( 18 PAGES)
DYNAMIC MEMORY: 5216 WORDS ( 20 PAGES)
ELAPSED TIME: 00:00:35
[43,10]TMPDIR,[43,20]TMPDIR/-SP=[43,30]PIPMAC,TMPDIR