Trailing-Edge
-
PDP-10 Archives
-
AP-4178E-RM
-
swskit-sources/klxfr.lis
There are no other files named klxfr.lis in the archive.
KLXFR -- TRANSFER KL ERROR FILE MACRO M1108 16-JAN-78 19:01
TABLE OF CONTENTS
1- 2 TITLE PAGE
2- 50 FIND, REMOVE, MARK-FOR-DELETE, READ AND XFR FILE
KLXFR -- TRANSFER KL ERROR FILE MACRO M1108 16-JAN-78 19:01 PAGE 1
1 .TITLE KLXFR -- TRANSFER KL ERROR FILE TO KL-10
2 .SBTTL TITLE PAGE
3 .IDENT "002030"
4 .LIST MEB
5 ;
6 ;
7 ;
8 ;
9 ; COPYRIGHT (C) 1975, 1978 BY
10 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD MASS.
11 ;
12 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
13 ; ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE INCLUSION
14 ; OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER COPIES THERE-
15 ; OF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.
16 ; NO TITLE TO OR OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
17 ;
18 ; THE INFORMATION CONTAINED IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT
19 ; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
20 ; CORPORATION.
21 ;
22 ; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS
23 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPILED BY DIGITAL.
24 ;
25 ;
26 ;
27 ;
28 ; MODULE: "KL ERROR TRANSFER"
29 ;
30 ; VERSION: V002030
31 ;
32 ; AUTHOR: R. MCLEAN
33 ;
34 ; DATE: 19 JUL 75
35 ;
36 ;
37 ; THIS MODULE CONTAINS:
38 ;
39 ; 1 -- CODE TO TRANSFER KLERR.SNP TO SYSERROR FILE IN 10
40 ;
41 ; MODIFIED BY A. PECKHAM 11-DEC-76 TO ABORT THE WAIT FOR THE ..STIN
42 ; FUNCTION WHEN PRIMARY PROTOCOL DROPS
43 ;
44 ; MODIFIED BY R. BELANGER 06-JUN-77 TO AVOID TRANSFERRING A NULL
45 ; FILE TO SYSERR.
46 ;
47 ; MODIFIED BY R. BELANGER 20-SEP-77 TO AVOID TRANSMITTINF EOF IF
48 ; INITIAL ERROR FILE MANIPULATION FAILS
KLXFR -- TRANSFER KL ERROR FILE MACRO M1108 16-JAN-78 19:01 PAGE 2
FIND, REMOVE, MARK-FOR-DELETE, READ AND XFR FILE
50 .SBTTL FIND, REMOVE, MARK-FOR-DELETE, READ AND XFR FILE
51 .MCALL EXIT$S,ALUN$S,CLEF$S,QIOW$,WSIG$S,WTSE$S,DIR$,QIOW$S
52 .MCALL CALL,RETURN,PUSH,POP
53 ;
54 ;
55 000001 E.FQIO= 1
56 000002 E.FDTE= 2
57 000004 SYLUN= 4
58 ;
59 000000 FILBLK:
60 000000 BUFADR:
61 .BLKW 2
62 000004 RECBUF:
63 .BLKW 256.
64 001004 QIOSTS:
65 001004 000000 000000 .WORD 0,0
66 ;
67 001010 ACL: ; ATTIBUTE CONTROL LIST
68 001010 367 010 .BYTE -11,10 ; READ STAT BLOCK
69 001012 001016' .WORD ATTBLK ; HERE
70 001014 000000 .WORD 0
71 ;
72 001016 ATTBLK:
73 .BLKB 10
74 ;
75 001026 KLXFR:
76 001026 ALUN$S #SYLUN,#"SY,#0
001026 005046 CLR -(SP)
001030 012746 054523 MOV #"SY,-(SP)
001034 012746 000004 MOV #SYLUN,-(SP)
001040 012746 MOV (PC)+,-(SP)
001042 007 004 .BYTE 7.,4
001044 104375 EMT 375
77 001046 103002 BCC FNDFIL ; +++003 WE GOT "SY:" OK...
78 001050 000167 000414 JMP EXIT ; +++003 QUIT IF WE CAN'T ASSIGN "SY:"
79 ;
80 ; SET UP FILENAME BLOCK TO LOOK FOR [5,5] DIRECTORY IN MFD
81 ;
82 001054 FNDFIL:
83 001054 012702 000000C MOV #FILBLK+N.FNAM,R2 ;POINT TO FILE-NAME BLOCK
84 001060 012712 MOV (PC)+,(R2) ;SET FILENAME TO
85 001062 140123 .RAD50 /005/ ; 005005
86 001064 012222 MOV (R2)+,(R2)+ ; BOTH HALVES
87 001066 005022 CLR (R2)+ ;ONLY SIX CHARS
88 001070 012722 MOV (PC)+,(R2)+ ;SET TYPE TO DIRECTORY
89 001072 015172 .RAD50 /DIR/ ; FILE
90 001074 005022 CLR (R2)+ ;VERSION, DON'T CARE
91 001076 005022 CLR (R2)+ ;NO FLAGS
92 001100 005022 CLR (R2)+ ;UNKOWN STUFF
93 001102 012712 177777 MOV #-1,(R2) ;DIRECTORY ID:
94 001106 012222 MOV (R2)+,(R2)+ ; (-1,-1) IS MFD
95 001110 012722 MOV (PC)+,(R2)+ ;ALSO SET OWNER TO US
96 001112 005 005 .BYTE 5,5 ;THE UIC
97 ;
98 001114 012700 000000G MOV #IO.FNA,R0 ;FIND NAME
99 001120 CALL FILFNR ;LOOK UP DIRECTORY FOR [5,5]
001120 004767 000406 JSR PC,FILFNR
KLXFR -- TRANSFER KL ERROR FILE MACRO M1108 16-JAN-78 19:01 PAGE 2-1
FIND, REMOVE, MARK-FOR-DELETE, READ AND XFR FILE
100 001124 103561 BCS EXIT ;GIVE UP NOW IF NO DIRECTORY FOR US
101 ;
102 ; SETUP FILE-NAME BLOCK TO KLERRO.SNP
103 ;
104 001126 012702 000000C MOV #FILBLK+N.FNAM,R2 ; AND FILE-NAME BLOCK FOR LOOKUP
105 001132 012722 MOV (PC)+,(R2)+ ;SET NAME TO 'KLE'
106 001134 043245 .RAD50 /KLE/
107 001136 012722 MOV (PC)+,(R2)+ ; 'RRO'
108 001140 071537 .RAD50 /RRO/
109 001142 005022 CLR (R2)+ ;ONLY SIX CHARACTERS
110 001144 012722 MOV (PC)+,(R2)+ ;SET FILE TYPE
111 001146 074400 .RAD50 /SNP/ ; TO A SOME NONSENE PROGRAM FILE
112 001150 005022 CLR (R2)+ ;NO VERSION CARE
113 001152 005022 CLR (R2)+ ;NO FLAGS
114 001154 005022 CLR (R2)+ ;NO NOTHING
115 001156 012701 000000C MOV #FILBLK+N.FID,R1 ;POINT TO FILE-ID OF DIRECTORY
116 001162 012122 MOV (R1)+,(R2)+ ;COPY FILE-ID
117 001164 012122 MOV (R1)+,(R2)+ ; SEQ #
118 001166 012122 MOV (R1)+,(R2)+ ; OWNER
119 ;
120 ; DO A REMOVE FILE IN DIRECTORY FUNCTION TO GET FILE ID
121 ;
122 001170 012700 000000G MOV #IO.RNA,R0 ;REMOVE NAME
123 001174 CALL FILFNR ;FIND THE FILE (IF IT'S THERE)
001174 004767 000332 JSR PC,FILFNR
124 001200 103533 BCS EXIT ; QUIT IF FILE IS NOT THERE
125 ;
126 ; ACCESS THE FILE FOR READ, MARK FOR DELETE
127 ;
128 001202 012700 000000G MOV #IO.ACR,R0 ;ACCESS FOR READ
129 001206 012701 000000C MOV #FILBLK+N.FID,R1 ;FID OF FILE
130 001212 012702 001010' MOV #ACL,R2 ; READ STAT BLOCK
131 001216 012703 100000 MOV #100000,R3 ;ENABLE ACCESS
132 001222 005004 CLR R4 ;NO EXTEND
133 001224 CALL FILQIO ;DO IT
001224 004767 000332 JSR PC,FILQIO
134 001230 103522 BCS CLSXIT ; +++003 OOPS
135 001232 012700 000000G MOV #IO.DEL,R0 ;MARK FOR DELETE
136 001236 CALL FILCL1 ;DO IT
001236 004767 000310 JSR PC,FILCL1
137 001242 103515 BCS CLSXIT ; +++003 OOPS!!!
138 001244 005767 177554 TST ATTBLK+6 ; +++002 DOES THE DATA EXIST??
139 001250 001003 BNE 5$ ; +++002 YES -- GO ON
140 001252 005767 177544 TST ATTBLK+4 ; +++002 MAYBE -- IS IT HUGE??
141 001256 001507 BEQ CLSXIT ; +++003 NO -- QUIT NOW
142 ;
143 ; FILE IS THERE, READ IT BACK TO THE -10
144 ;
145 001260 5$:
146 001260 012701 100000G MOV #100000+BC.HDS,R1 ;SET FUNCTION: HERE IS DEVICE STATUS
147 001264 012702 000002 MOV #E.FDTE,R2 ;SET EVENT FLAG FOR ..STIN
148 001270 012703 000000G MOV #D.CKLE,R3 ;SET DEVICE CODE: KL-10 ERROR PSEUDO-DEVICE
149 001274 CLEF$S R2 ;INITIALIZE FUNCTION EVENT FLAG
001274 010246 MOV R2,-(SP)
001276 012746 MOV (PC)+,-(SP)
001300 037 002 .BYTE 31.,2
001302 104375 EMT 375
KLXFR -- TRANSFER KL ERROR FILE MACRO M1108 16-JAN-78 19:01 PAGE 2-2
FIND, REMOVE, MARK-FOR-DELETE, READ AND XFR FILE
150 001304 005067 000220 CLR BLKNUM
151 001310 10$:
152 001310 005267 000214 INC BLKNUM
153 001314 DIR$ #QIOFL
001314 012746 001504' MOV #QIOFL,-(SP)
001320 104375 EMT 375
154 001322 103442 BCS CLSFIL
155 001324 105767 177454 TSTB QIOSTS
156 001330 002437 BLT CLSFIL
157 ;
158 001332 012700 000000' MOV #BUFADR,R0 ;POINT TO BUFFER (TWO WORDS BEFORE DATA)
159 001336 012704 000004 MOV #512./128.,R4 ;SET LOOP COUNT
160 001342 20$:
161 001342 012710 000202 MOV #128.+2.,(R0) ;SET BYTE COUNT OF TRANSFER
162 001346 012760 000000G 000002 MOV #DV.LOG,2(R0) ;ALSO INDICATE ERROR LOG REQUEST
163 001354 CALL ..STIN ;SEND TO -10 (REGISTERS R0, R1, R2, R3 SET UP ABOVE)
001354 004767 000000G JSR PC,..STIN
164 001360 103423 BCS CLSFIL
165 001362 30$:
166 001362 CLEF$S R2 ;TEST AND CLEAR FUNCTION EVENT FLAG
001362 010246 MOV R2,-(SP)
001364 012746 MOV (PC)+,-(SP)
001366 037 002 .BYTE 31.,2
001370 104375 EMT 375
167 001372 022767 000000G 000000G CMP #IS.SET,$DSW ;WAS IT SET ?
168 001400 001407 BEQ 40$ ;YES, GO ON TO NEXT.
169 001402 WSIG$S ;WAIT FOR THE BIG EVENT
001402 012746 MOV (PC)+,-(SP)
001404 061 001 .BYTE 49.,1
001406 104375 EMT 375
170 001410 032767 000000G 000002G BIT #EF.PR1,.COMEF+2 ; +++001 HAS PRIMARY PROTOCOL GONE AWAY ?
171 001416 001361 BNE 30$ ; +++001 NO, KEEP CHECKING
172 001420 40$:
173 001420 062700 000200 ADD #128.,R0 ;BUMP ADDRESS IN BLOCK
174 001424 077432 SOB R4,20$ ;LOOP FOR ALL SEGMENTS OF DATA IN BLOCK
175 001426 000730 BR 10$ ;LOOP FOR ALL BLOCKS IN FILE
176 ;
177 001430 CLSFIL:
178 001430 CALL FILCLS
001430 004767 000112 JSR PC,FILCLS
179 ;
180 001434 012701 100000G MOV #100000+BC.HDS,R1
181 001440 012700 000000' MOV #BUFADR,R0
182 001444 012710 000004 MOV #4,@R0
183 001450 012703 000000G MOV #D.CKLE,R3
184 001454 012760 000000C 000002 MOV #DV.LOG!DV.EOF,2(R0)
185 001462 005002 CLR R2 ;DON'T WAIT FOR COMPLETION.
186 001464 CALL ..STIN
001464 004767 000000G JSR PC,..STIN
187 001470 EXIT: ; +++003
188 001470 EXIT$S
001470 012746 MOV (PC)+,-(SP)
001472 063 001 .BYTE 51.,1
001474 104375 EMT 375
189 ;
190 001476 CLSXIT: ; +++003
191 001476 CALL FILCLS ; +++003 CLOSE THE FILE
KLXFR -- TRANSFER KL ERROR FILE MACRO M1108 16-JAN-78 19:01 PAGE 2-3
FIND, REMOVE, MARK-FOR-DELETE, READ AND XFR FILE
001476 004767 000044 JSR PC,FILCLS
192 001502 000772 BR EXIT ; +++003 AND EXIT
193 ;
194 001504 QIOFL:
195 001504 QIOW$ IO.RVB,SYLUN,E.FQIO,0,QIOSTS,0,<RECBUF,1000,0,0,1>
001504 003 013 .BYTE 3,$$$ARG
001506 000000G .WORD IO.RVB
001510 000004 .WORD SYLUN
001512 001 000 .BYTE E.FQIO,0
001514 001004' .WORD QIOSTS
001516 000000 .WORD 0
001520 000004' .WORD RECBUF
001522 001000 .WORD 1000
001524 000000 .WORD 0
001526 000000 .WORD 0
001530 000001 .WORD 1
196 001530' BLKNUM=.-2
197 ;
198 ; FILFNR -- DO A 'FIND NAME IN DIRECTORY' FUNCTION TO FIND A FILE
199 ; R0 -- IO.FNA OR IO.RNA
200 ; FILBLK -- FILE-NAME BLOCK SET UP FOR DESIRED FILE
201 ;
202 001532 FILFNR:
203 001532 005001 CLR R1 ;NO FILE-ID
204 001534 005002 CLR R2 ;NO ATTRIBUTES
205 001536 005003 CLR R3 ;NO ACCESS
206 001540 012704 000000' MOV #FILBLK,R4 ;SET TO DO IT TO THE RIGHT FILE
207 001544 000406 BR FILQIO ;GO DO IT AND RETURN
208 ;
209 ; FILCLS -- DE-ACCESS THE TASK FILE
210 ;
211 001546 FILCLS:
212 001546 012700 000000G MOV #IO.DAC,R0 ;DE-ACCESS FUNCTION
213 ;
214 001552 FILCL1:
215 001552 005001 CLR R1 ;NO FILE-ID BLOCK
216 001554 005002 CLR R2 ;NO ATTRIBUTES ALLOWED
217 001556 005003 CLR R3
218 001560 005004 CLR R4 ;NO FILE-NAME BLOCK EITHER
219 ; BR FILQIO ;DO IT TO TASK FILE
220 ;
221 ; FILQIO -- PERFORM QUEUE I/O FUNCTION ON THE TASK FILE
222 ; R0 -- FUNCTION CODE
223 ; R1 -- PARAMETER #1 (FILE-ID BLOCK OR BUFFER ADDRESS)
224 ; R2 -- PARAMETER #2 (ATTRIBUTE CONTROL BLOCK OR BUFFER LENGTH)
225 ; R3 -- PARAMETER #5 (ACCESS CONTROL OR VIRTUAL BLOCK NUMBER)
226 ; R4 -- PARAMETER #6 (FILENAME BLOCK)
227 ;
228 ; CC-C CLEAR IF SUCCESS, SET IF FAILURE.
229 ;
230 001562 FILQIO:
231 001562 QIOW$S R0,#SYLUN,#E.FQIO,,#QIOSTS,,<R1,R2,,,R3,R4>
001562 010446 MOV R4,-(SP)
001564 010346 MOV R3,-(SP)
001566 005046 CLR -(SP)
001570 005046 CLR -(SP)
001572 010246 MOV R2,-(SP)
KLXFR -- TRANSFER KL ERROR FILE MACRO M1108 16-JAN-78 19:01 PAGE 2-4
FIND, REMOVE, MARK-FOR-DELETE, READ AND XFR FILE
001574 010146 MOV R1,-(SP)
001576 005046 CLR -(SP)
001600 012746 001004' MOV #QIOSTS,-(SP)
001604 005046 CLR -(SP)
001606 112716 000001 MOVB #E.FQIO,(SP)
001612 012746 000004 MOV #SYLUN,-(SP)
001616 010046 MOV R0,-(SP)
001620 012746 MOV (PC)+,-(SP)
001622 003 014 .BYTE 3,$$$T1
001624 104375 EMT 375
232 001626 103404 BCS 90$ ;GIVE UP
233 ;
234 001630 30$:
235 001630 105767 177150 TSTB QIOSTS+0 ;I/O SUCCESSFUL?
236 001634 002001 BGE 90$ ;YES-- JUST RETURN WITH CC-C CLEAR
237 ;
238 001636 80$:
239 001636 000261 SEC ;NO-- RETURN ERROR
240 001640 90$:
241 001640 RETURN ;RETURN FROM FILQIO
001640 000207 RTS PC
242 001026' .END KLXFR
KLXFR -- TRANSFER KL ERROR FILE MACRO M1108 16-JAN-78 19:01 PAGE 2-5
SYMBOL TABLE
ACL 001010R EF.PR1= ****** GX IO.ACR= ****** GX QIOFL 001504R RECBUF 000004R
ATTBLK 001016R EXIT 001470R IO.DAC= ****** GX QIOSTS 001004R SYLUN = 000004
BC.HDS= ****** GX E.FDTE= 000002 IO.DEL= ****** GX Q.IOAE= 000012 $DSW = ****** GX
BLKNUM= 001530R E.FQIO= 000001 IO.FNA= ****** GX Q.IOEF= 000006 $$ = 000067
BUFADR 000000R FILBLK 000000R IO.RNA= ****** GX Q.IOFN= 000002 $$$ARG= 000006
CLSFIL 001430R FILCLS 001546R IO.RVB= ****** GX Q.IOLU= 000004 $$$OST= 000014
CLSXIT 001476R FILCL1 001552R IS.SET= ****** GX Q.IOPL= 000014 $$$T1 = 000014
DV.EOF= ****** GX FILFNR 001532R KLXFR 001026R Q.IOPR= 000007 .COMEF= ****** GX
DV.LOG= ****** GX FILQIO 001562R N.FID = ****** GX Q.IOSB= 000010 ..STIN= ****** GX
D.CKLE= ****** GX FNDFIL 001054R N.FNAM= ****** GX
. ABS. 000000 000
001642 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 2220 WORDS ( 9 PAGES)
DYNAMIC MEMORY: 3104 WORDS ( 11 PAGES)
ELAPSED TIME: 00:00:20
,[47,20]KLXFR.LIS/-SP/CRF=[47,30]KLXFR
KLXFR CREATED BY MACRO ON 16-JAN-78 AT 19:01 PAGE 1
SYMBOL CROSS REFERENCE CREF
SYMBOL VALUE REFERENCES
ACL 001010 R #2-67 2-130
ATTBLK 001016 R 2-69 #2-72 2-138 2-140
BC.HDS = ****** GX 2-146 2-180
BLKNUM = 001530 R *2-150 *2-152 #2-196
BUFADR 000000 R #2-60 2-158 2-181
CLSFIL 001430 R 2-154 2-156 2-164 #2-177
CLSXIT 001476 R 2-134 2-137 2-141 #2-190
DV.EOF = ****** GX 2-184
DV.LOG = ****** GX 2-162 2-184
D.CKLE = ****** GX 2-148 2-183
EF.PR1 = ****** GX 2-170
EXIT 001470 R 2-78 2-100 2-124 #2-187 2-192
E.FDTE = 000002 #2-56 2-147
E.FQIO = 000001 #2-55 2-195 2-231
FILBLK 000000 R #2-59 2-83 2-104 2-115 2-129 2-206
FILCLS 001546 R 2-178 2-178 2-191 2-191 #2-211
FILCL1 001552 R 2-136 2-136 #2-214
FILFNR 001532 R 2-99 2-99 2-123 2-123 #2-202
FILQIO 001562 R 2-133 2-133 2-207 #2-230
FNDFIL 001054 R 2-77 #2-82
IO.ACR = ****** GX 2-128
IO.DAC = ****** GX 2-212
IO.DEL = ****** GX 2-135
IO.FNA = ****** GX 2-98
IO.RNA = ****** GX 2-122
IO.RVB = ****** GX 2-195
IS.SET = ****** GX 2-167
KLXFR 001026 R #2-75 2-242
N.FID = ****** GX 2-115 2-129
N.FNAM = ****** GX 2-83 2-104
QIOFL 001504 R 2-153 #2-194
QIOSTS 001004 R #2-64 2-155 2-195 2-231 2-235
Q.IOAE = 000012 #2-195
Q.IOEF = 000006 #2-195
Q.IOFN = 000002 #2-195
Q.IOLU = 000004 #2-195
Q.IOPL = 000014 #2-195
Q.IOPR = 000007 #2-195
Q.IOSB = 000010 #2-195
RECBUF 000004 R #2-62 2-195
SYLUN = 000004 #2-57 2-76 2-195 2-231
$DSW = ****** GX 2-167
$$ = 000067 #2-99 2-99 #2-123 2-123 #2-133 2-133 #2-136 2-136 #2-163
2-163 #2-178 2-178 #2-186 2-186 #2-191 2-191
$$$ARG = 000006 #2-76 2-76 #2-76 2-76 #2-76 2-76 #2-76 2-76 2-76