Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/listings/rsx11s/bfctl.list
There are no other files named bfctl.list in the archive.
BFCTL MACRO M1110 22-AUG-79 07:04 PAGE 3
1 .TITLE BFCTL
2 .IDENT /06/
3
4 ;
5 ; COPYRIGHT (C) 1974, 1978
6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
7 ;
8 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
9 ; OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
10 ;
11 ; VERSION 06
12 ;
13 ; D. N. CUTLER 26-DEC-73
14 ;
15 ; PREVIOUSLY MODIFIED BY:
16 ;
17 ; D. N. CUTLER
18 ; T. J. MILLER
19 ;
20 ; MODIFIED BY:
21 ;
22 ; T. J. MILLER 2-NOV-77
23 ;
24 ; TM116 -- SAVE AND RESTORE MAPPING REGISTERS IN $BLXIO.
25 ;
26 ; BUFFER CONTROL ROUTINES
27 ;
28 ; MACRO LIBRARY CALLS
29 ;
30
31 .MCALL HWDDF$
32 000000 HWDDF$ ;DEFINE HARDWARE REGISTERS
33
34 ;+
35 ; **-$GTBYT-GET NEXT BYTE FROM USER BUFFER
36 ;
37 ; THIS ROUTINE IS CALLED TO GET THE NEXT BYTE FROM THE USER BUFFER
38 ; AND RETURN IT TO THE CALLER ON THE STACK. AFTER THE BYTE HAS BEEN
39 ; FETCHED, THE NEXT BYTE ADDRESS IS INCREMENTED.
40 ;
41 ; INPUTS:
42 ;
43 ; R5=ADDRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS.
44 ;
45 ; OUTPUTS:
46 ;
47 ; THE NEXT BYTE IS FETCHED FROM THE USER BUFFER AND RETURNED
48 ; TO THE CALLER ON THE STACK. THE NEXT BYTE ADDRESS IS INCREMENTED.
49 ;
50 ; ALL REGISTERS ARE PRESERVED ACROSS CALL.
51 ;-
52
53 .ENABL LSB
54 000000 011646 $GTBYT::MOV (SP),-(SP) ;DUPLICATE RETURN ADDRESS
55
56
57 .IF DF M$$MGE
BFCTL MACRO M1110 22-AUG-79 07:04 PAGE 3-1
58
59 000002 016746 172354 MOV KISAR6,-(SP) ;SAVE CURRENT MAPPING
60 000006 016567 000000G 172354 MOV U.BUF(R5),KISAR6 ;MAP TO USER BUFFER
61 000014 117566 000002G 000004 MOVB @U.BUF+2(R5),4(SP) ;GET NEXT BYTE FROM USER BUFFER
62 000022 012667 172354 MOV (SP)+,KISAR6 ;RESTORE CURRENT MAPPING
63
64 .IFF
65
66 MOVB @U.BUF+2(R5),2(SP) ;GET NEXT BYTE FROM USER BUFFER
67
68 .ENDC
69
70
71 000026 000413 BR 20$ ;TAKE COMMON EXIT FOR ADDRESS UPDATE
72
73 ;+
74 ; **-$PTBYT-PUT NEXT BYTE IN USER BUFFER
75 ;
76 ; THIS ROUTINE IS CALLED TO PUT A BYTE IN THE NEXT LOCATION IN
77 ; USER BUFFER. AFTER THE BYTE HAS BEEN STORED, THE NEXT BYTE ADDRESS
78 ; IS INCREMENTED.
79 ;
80 ; INPUTS:
81 ;
82 ; R5=ADDRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS.
83 ; 2(SP)=BYTE TO BE STORED IN THE NEXT LOCATION OF THE USER BUFFER.
84 ;
85 ; OUTPUTS:
86 ;
87 ; THE BYTE IS STORED IN THE USER BUFFER AND REMOVED FROM
88 ; THE STACK. THE NEXT BYTE ADDRESS IS INCREMENTED.
89 ;
90 ; ALL REGISTERS ARE PRESERVED ACROSS CALL.
91 ;-
92
93 000030 $PTBYT:: ;REF LABEL
94
95
96 .IF DF M$$MGE
97
98 000030 016746 172354 MOV KISAR6,-(SP) ;SAVE CURRENT MAPPING
99 000034 016567 000000G 172354 MOV U.BUF(R5),KISAR6 ;MAP TO USER BUFFER
100 000042 116675 000004 000002G MOVB 4(SP),@U.BUF+2(R5) ;STORE BYTE IN USER BUFFER
101 000050 012667 172354 MOV (SP)+,KISAR6 ;RESTORE CURRENT MAPPING
102
103 .IFF
104
105 MOVB 2(SP),@U.BUF+2(R5) ;STORE BYTE IN USER BUFFER
106
107 .ENDC
108
109
110 000054 012616 MOV (SP)+,(SP) ;COLLAPSE STACK REMOVING BYTE
111
112
113 .IF DF G$$WRD!P$$WRD
114
BFCTL MACRO M1110 22-AUG-79 07:04 PAGE 3-2
115 BR 20$ ;TAKE COMMON EXIT FOR ADDRESS UPDATE
116
117 ;+
118 ; **-$GTWRD-GET NEXT WORD FROM USER BUFFER
119 ;
120 ; THIS ROUTINE IS CALLED TO GET THE NEXT WORD FROM THE USER BUFFER
121 ; AND RETURN IT TO THE CALLER ON THE STACK. AFTER THE WORD HAS BEEN
122 ; FETCHED, THE NEXT WORD ADDRESS IS CALCULATED.
123 ;
124 ; INPUTS:
125 ;
126 ; R5=ADDRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS.
127 ;
128 ; OUTPUTS:
129 ;
130 ; THE NEXT WORD IS FETCHED FROM THE USER BUFFER AND RETURNED
131 ; TO THE CALLER ON THE STACK. THE NEXT WORD ADDRESS IS CALCULATED.
132 ;
133 ; ALL REGISTERS ARE PRESERVED ACROSS CALL.
134 ;-
135
136 .IFTF
137
138 000056 $GTWRD:: ;REF LABEL
139
140
141 .IF DF G$$WRD
142
143 MOV (SP),-(SP) ;DUPLICATE RETURN ADDRESS
144
145
146 .IF DF M$$MGE
147
148 MOV KISAR6,-(SP) ;SAVE CURRENT MAPPING
149 MOV U.BUF(R5),KISAR6 ;MAP TO USER BUFFER
150 MOV @U.BUF+2(R5),4(SP) ;GET NEXT WORD FROM USER BUFFER
151 MOV (SP)+,KISAR6 ;RESTORE CURRENT MAPPING
152
153 .IFF
154
155 MOV @U.BUF+2(R5),2(SP) ;GET NEXT WORD FROM USER BUFFER
156
157 .ENDC
158
159
160 BR 10$ ;TAKE COMMON EXIT FOR ADDRESS UPDATE
161
162 .ENDC
163
164
165 ;+
166 ; **-$PTWRD-PUT NEXT WORD IN USER BUFFER
167 ;
168 ; THIS ROUTINE IS CALED TO PUT A WORD IN THE NEXT LOCATION IN
169 ; USER BUFFER. AFTER THE WORD HAS BEEN STORED, THE NEXT WORD ADDRESS
170 ; IS CALCULATED.
171 ;
BFCTL MACRO M1110 22-AUG-79 07:04 PAGE 3-3
172 ; INPUTS:
173 ;
174 ; R5=ADDRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS.
175 ; 2(SP)=WORD TO BE STORED IN THE NEXT LOCATION OF THE BUFFER.
176 ;
177 ; OUTPUTS:
178 ;
179 ; THE WORD IS STORED IN THE USER BUFFER AND REMOVED FROM
180 ; THE STACK. THE NEXT WORD ADDRESS IS CALCULATED.
181 ;
182 ; ALL REGISTERS ARE PRESERVED ACROSS CALL.
183 ;-
184
185 000056 $PTWRD:: ;REF LABEL
186
187
188 .IF DF P$$WRD
189
190
191 .IF DF M$$MGE
192
193 MOV KISAR6,-(SP) ;SAVE CURRENT MAPPING
194 MOV U.BUF(R5),KISAR6 ;MAP TO USER BUFFER
195 MOV 4(SP),@U.BUF+2(R5);STORE WORD IN USER BUFFER
196 MOV (SP)+,KISAR6 ;RESTORE CURRENT MAPPING
197
198 .IFF
199
200 MOV 2(SP),@U.BUF+2(R5) ;STORE WORD IN USER BUFFER
201
202 .ENDC
203
204
205 MOV (SP)+,(SP) ;COLLAPSE STACK REMOVING WORD
206
207 .ENDC
208
209
210 .IFT
211
212 10$: INC U.BUF+2(R5) ;CALCULATE ADDRESS OF NEXT WORD
213
214 .ENDC
215
216
217 000056 005265 000002G 20$: INC U.BUF+2(R5) ;INCREMENT NEXT BYTE ADDRESS
218
219
220 .IF DF M$$MGE
221
222 000062 026527 000002G 160000 CMP U.BUF+2(R5),#160000 ;OVERFLOW 28K BOUNDARY?
223 000070 103406 BLO 30$ ;IF LO NO
224 000072 162765 020000 000002G SUB #20000,U.BUF+2(R5) ;REDUCE BY 4K
225 000100 062765 000200 000000G ADD #200,U.BUF(R5) ;ADJUST RELOCATION BIAS
226
227 .ENDC
228
BFCTL MACRO M1110 22-AUG-79 07:04 PAGE 3-4
229
230 000106 30$: RETURN
231 .DSABL LSB
232
233 ;+
234 ; **-$GTCWD-GET NEXT WORD FROM USER CONTROL BUFFER
235 ;
236 ; THIS ROUTINE IS CALLED TO GET THE NEXT WORD FROM THE USER CONTROL
237 ; BUFFER AND RETURN IT TO THE CALLER ON THE STACK. AFTER THE WORD HAS
238 ; BEEN FETCHED, THE NEXT WORD ADDRESS IS CALCULATED.
239 ;
240 ; INPUTS:
241 ;
242 ; R5=ADDRESS OF THE UCB THAT CONTAINS THE BUFFER POINTERS.
243 ;
244 ; OUTPUTS:
245 ;
246 ; THE NEXT WORD IS FETCHED FROM THE USER CONTROL BUFFER AND RETURNED
247 ; TO THE CALLER ON THE STACK. THE NEXT WORD ADDRESS IS CALCULATED.
248 ;
249 ; ALL REGISTERS ARE PRESERVED ACROSS CALL.
250 ;-
251
252
253 .IF DF A$$D01!A$$F11!I$$CAD!U$$ADM
254
255 $GTCWD::MOV (SP),-(SP) ;DUPLICATE RETURN ADDRESS
256
257
258 .IF DF M$$MGE
259
260 MOV KISAR6,-(SP) ;SAVE CURRENT MAPPING
261 MOV U.CBF(R5),KISAR6 ;MAP TO USER CONTROL BUFFER
262 MOV @U.CBF+2(R5),4(SP) ;GET NEXT WORD FROM USER BUFFER
263 MOV (SP)+,KISAR6 ;RESTORE CURRENT MAPPING
264
265 .IFF
266
267 MOV @U.CBF+2(R5),2(SP) ;GET NEXT WORD FROM USER BUFFER
268
269 .IFTF
270
271 ADD #2,U.CBF+2(R5) ;CALCULATE ADDRESS OF NEXT WORD
272
273 .IFT
274
275 BIT #20000,U.CBF+2(R5) ;OVERFLOW 4K BOUNDRY?
276 BEQ 10$ ;IF EQ NO
277 BIC #20000,U.CBF+2(R5) ;CLEAR OVERFLOW BIT
278 ADD #200,U.CBF(R5) ;ADJUST RELOCATION BIAS
279
280 .ENDC
281
282
283 10$: RETURN ;
284
285 .ENDC
BFCTL MACRO M1110 22-AUG-79 07:04 PAGE 3-5
286
287
288 ;+
289 ; **-$BLXIO-MOVE BLOCK OF DATA.
290 ;
291 ; THIS ROUTINE IS CALLED TO MOVE DATA IN MEMORY IN A MAPPED SYSTEM.
292 ;
293 ; INPUTS:
294 ;
295 ; R0=NUMBER OF BYTES TO MOVE.
296 ; R1=SOURCE APR5 BIAS.
297 ; R2=SOURCE DISPLACEMENT.
298 ; R3=DESTINATION APR6 BIAS.
299 ; R4=DESTINATION DISPLACEMENT.
300 ;
301 ; OUTPUTS:
302 ;
303 ; DESCRIBED MOVE IS ACCOMPLISHED.
304 ; R0 ALTERED. ; TM116
305 ; R1,R3 PRESERVED ;**-1
306 ; R2,R4 POINT TO LAST BYTE OF SOURCE AND DESTINATION + 1
307 ; ; TM116
308 ; NOTE: THE COUNT INPUT IN R0 MUST NOT BE ZERO AND IT MUST NOT ; TM116
309 ; BE LARGE ENOUGH TO CROSS APR BOUNDARIES (THIS TYPICALLY ; TM116
310 ; MEANS A MAXIMUM OF 4K-63). ; TM116
311 ;-
312
313
314 .IF DF M$$MGE
315
316 000110 010546 $BLXIO::MOV R5,-(SP) ;SAVE R5 ; TM116
317 000112 012705 172354 MOV #KISAR6,R5 ;POINT TO KERNEL APR6 ; TM116
318 000116 011546 MOV (R5),-(SP) ;SAVE KERNEL APR6 ; TM116
319 000120 010315 MOV R3,(R5) ;SET UP KERNEL APR6 FOR TRANSFER ; TM116
320 000122 014546 MOV -(R5),-(SP) ;SAVE KERNEL APR5 ; TM116
321 000124 010115 MOV R1,(R5) ;SET UP KERNEL APR5 FOR TRANSFER ; TM116
322 ;**-3
323
324 .IF NDF N$$MOV
325
326 000126 112224 10$: MOVB (R2)+,(R4)+ ;MOVE NEXT BYTE
327 000130 005300 DEC R0 ;MORE TO MOVE?
328 000132 001375 BNE 10$ ;IF NE YES
329
330 .IFF
331
332 MOV #1,-(SP) ;PUSH LOW BIT MASK
333 BIT (SP),R2 ;SOURCE ADDRESS ODD?
334 BEQ 10$ ;IF EQ NO
335 MOVB (R2)+,(R4)+ ;MOVE FIRST BYTE
336 DEC R0 ;REDUCE COUNT
337 10$: BIT (SP),R4 ;DESTINATION ADDRESS ODD?
338 BNE 50$ ;IF NE YES, PERFORM BYTE MOVES
339 20$: SUB #N$$MOV*2,R0 ;MOVE ENTIRE BLOCK?
340 BCC 40$ ;IF CC YES
341 BIC R0,(SP) ;REMAINING COUNT ODD?
342 BNE 30$ ;IF NE NO
BFCTL MACRO M1110 22-AUG-79 07:04 PAGE 3-6
343 DEC R0 ;ADJUST NEGATIVE COUNT
344 30$: SUB R0,PC ;INDEX INTO MOVE INSTRUCTIONS
345 40$: ;REF LABEL
346
347
348 .REPT N$$MOV
349
350 MOV (R2)+,(R4)+ ;MOVE A WORD
351
352 .ENDR
353
354
355 BCC 20$ ;IF CC MORE TO GO
356 BR 80$ ;EXIT THROUGH COMMON CODE
357 50$: ASL R0 ;DOUBLE COUNT
358 60$: SUB #N$$MOV*2,R0 ;MOVE ENTIRE BLOCK?
359 BCC 70$ ;IF CC YES
360 SUB R0,PC ;ELSE INDEX INTO MOVE INSTRUCTIONS
361 70$: ;REF LABEL
362
363
364 .REPT N$$MOV
365
366 MOVB (R2)+,(R4)+ ;MOVE A BYTE
367
368 .ENDR
369
370
371 BCC 60$ ;IF CC MORE TO GO
372 80$: TST (SP)+ ;POP CONSTANT
373 BNE 90$ ;IF NE NO MORE TO MOVE
374 MOVB (R2)+,(R4)+ ;MOVE LAST BYTE
375 90$: ;REF LABEL
376
377 .ENDC
378
379
380 000134 012625 MOV (SP)+,(R5)+ ;RESTORE KERNEL APR5 ; TM116
381 000136 012615 MOV (SP)+,(R5) ;RESTORE KENREN APR6 ; TM116
382 000140 012605 MOV (SP)+,R5 ;RESTORE R5 ; TM116
383 000142 RETURN ; ;**-2
384
385 .ENDC
386
387
388 000001 .END
BFCTL MACRO M1110 22-AUG-79 07:04 PAGE 3-7
SYMBOL TABLE
A$$CHK= 000000 G$$TTK= 000000 L$$DRV= 000000 P$$TPT= 000000 UISAR5= 177652
A$$CPS= 000000 H$$RTZ= 000074 MPAR = 172100 R$$DER= 000000 UISAR6= 177654
A$$TRP= 000000 I$$RDN= 000000 MPCSR = 177746 R$$EXV= 000000 UISAR7= 177656
CMODE = 140000 KDSAR0= 172360 M$$CRB= 000124 R$$SND= 000000 UISDR0= 177600
C$$ORE= 002000 KDSDR0= 172320 M$$MGE= 000000 R$$11M= 000000 UISDR4= 177610
FE.CAL= 000040 KISAR0= 172340 M$$NET= 000000 R$$11S= 000000 UISDR5= 177612
FE.CEX= 020000 KISAR5= 172352 M$$NT2= 000000 SISDR0= 172200 UISDR6= 177614
FE.DRV= 000010 KISAR6= 172354 N$$LDV= 000001 SR0 = 177572 UISDR7= 177616
FE.EXP= 000200 KISAR7= 172356 PIRQ = 177772 SR3 = 172516 U.BUF = ****** GX
FE.EXT= 000001 KISDR0= 172300 PMODE = 030000 SWR = 177570 V$$CTR= 001200
FE.EXV= 000004 KISDR6= 172314 PR0 = 000000 S$$YSZ= 001740 V$$RSN= 000031
FE.LSI= 000400 KISDR7= 172316 PR1 = 000040 TPS = 177564 X$$DBT= 000000
FE.MUP= 000002 K$$CNT= 177546 PR4 = 000200 UBMPR = 170200 $BLXIO 000110RG
FE.MXT= 040000 K$$CSR= 177546 PR5 = 000240 UDSAR0= 177660 $GTBYT 000000RG
FE.NLG= 100000 K$$IEN= 000115 PR6 = 000300 UDSDR0= 177620 $GTWRD 000056RG
FE.PKT= 000100 K$$LDC= 000001 PR7 = 000340 UISAR0= 177640 $PTBYT 000030RG
FE.PLA= 000020 K$$TPS= 000074 PS = 177776 UISAR4= 177650 $PTWRD 000056RG
G$$TPP= 000000 L$$ASG= 000000 P$$RTY= 000000
. ABS. 000000 000
000144 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 1933 WORDS ( 8 PAGES)
DYNAMIC MEMORY: 2980 WORDS ( 11 PAGES)
ELAPSED TIME: 00:00:16
[11,24]BFCTL,SY0:[11,34]BFCTL/-SP=[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,BFCTL