Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/listings/rsx11s/drdsp.list
There are no other files named drdsp.list in the archive.
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3
1 .TITLE DRDSP
2 .IDENT /10/
3
4 ;
5 ; COPYRIGHT (C) 1974, 1978
6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
7 ;
8 ; THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A
9 ; SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH THE
10 ; INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE, OR
11 ; ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED OR OTHERWISE
12 ; MADE AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH
13 ; SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE TERMS. TITLE
14 ; TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN
15 ; IN DEC.
16 ;
17 ; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT
18 ; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL
19 ; EQUIPMENT CORPORATION.
20 ;
21 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF
22 ; ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
23 ;
24 ; VERSION 10
25 ;
26 ; D. N. CUTLER 12-AUG-73
27 ;
28 ; PREVIOUSLY MODIFIED BY:
29 ;
30 ; D. N. CUTLER
31 ; T. J. MILLER
32 ;
33 ; MODIFIED BY:
34 ;
35 ; T. J. MILLER 20-JUL-77
36 ;
37 ; TM088 -- ADD CONNECT TO INTERRUPT TO DIRECTIVE DISPATCH
38 ; TABLE.
39 ;
40 ; DIRECTIVE DISPATCHER
41 ;
42 ; MACRO LIBRARY CALLS
43 ;
44
45 .MCALL HDRDF$,HWDDF$,TCBDF$,WDBDF$
46 000000 HDRDF$ ;DEFINE TASK HEADER OFFSETS
47 000000 HWDDF$ ;DEFINE HARDWARE REGISTERS
48 000000 TCBDF$ ;DEFINE TASK CONTROL BLOCK OFFSETS
49 000000 WDBDF$ ;DEFINE USER WINDOW DEF BLOCK OFFSETS
50
51 ;
52 ; MACRO TO DEFINE SUCCESSIVE DIRECTIVE MASK BITS
53 ;
54
55 .MACRO DEFINE SYM
56 SYM=N
57 N=N/2
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-1
58 .ENDM
59
60 ;
61 ; EQUATED SYMBOLS
62 ;
63
64 000002 DSPNX=2 ;INITIAL DIRECTIVE MAPPING TABLE INDEX
65 000200 N=200 ;INITIAL MASK VALUE
66 000000 DEFINE ACHKDB ;ADDRESS CHECK PLAS DEFINITION BLOCK
67 000000 DEFINE CEFNCL ;CALL $CEFN (1=YES)
68 000000 DEFINE CEFNMT ;EFN MUST BE SPECIFIED (1=YES)
69 000000 DEFINE DFCTSK ;TASK NAME DEFAULTS TO CURRENT TASK
70 000000 DEFINE MUPCHK ;PERFORM MULTI-USER PROTECTION CHECK
71 000000 DEFINE SRSTCL ;CALL $SRSTD (1=YES)
72
73 ;
74 ; LOCAL MACROS
75 ;
76 ; DEFINE DIRECTIVE DISPATCH TABLE ENTRY
77 ;
78 ; DIR ADDR,SIZE,MASK
79 ;
80 ; WHERE:
81 ;
82 ; ADDR=ADDRESS OF THE DIRECTIVE EXECUTION ROUTINE OR '.FALSE.'.
83 ; SIZE=SIZE OF THE DPB REQUIRED BY THE DIRECTIVE ROUTINE.
84 ; MASK=CONTROL BITS TO BE USED BY THE DIRECTIVE DISPATCHER.
85 ;
86
87 .MACRO DIR ADDR,SIZE,MASK
88 $$$=.
89 .=DSPMP+OFFST
90 OFFST=OFFST+1
91 .IF IDN <ADDR>,<.FALSE.>
92 .BYTE 0
93 .=$$$
94 .IFF
95 .BYTE DSPNX
96 DSPMK=0
97 .IF NB <MASK>
98 .IRP X,<MASK>
99 DSPMK=DSPMK!X
100 .ENDM
101 .ENDC
102 DSPSZ=0
103 .IF NB SIZE
104 DSPSZ=SIZE*2
105 .ENDC
106 .=$$$
107 .WORD ADDR
108 .BYTE DSPSZ,DSPMK
109 DSPNX=DSPNX+4
110 .ENDC
111 .ENDM
112
113 ;
114 ; LOCAL DATA-ADJACENCY ASSUMED
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-2
115 ;
116
117 000000 USRPS: .BLKW 1 ;POINTER TO USER PS WORD
118 000002 BTRMV: .BLKW 1 ;BYTES TO REMOVE ON EXIT
119
120 ;
121 ; DISPATCH MAPPING TABLE
122 ;
123
124 000004 DSPMP: .BLKB 64. ;
125
126 ; TM088
127 .IF DF C$$INT ; TM088
128 ; TM088
129 .BLKB 2 ;ALLOCATE SPACE FOR CONNECT TO INTERRUPT; TM088
130 ; TM088
131 .ENDC ; TM088
132 ; TM088
133 ; TM088
134 ;
135 ; DIRECTIVE DISPATCH TABLE
136 ;
137
138 000104 DSPTBL: ;REF LABEL
139
140 000000 OFFST=0
141
142 000104 DIR $DRQIO,12. ;001.-QUEUE I/O
143 000110 DIR $DRQIO,12. ;003.-QUEUE I/O AND WAIT
144 000114 DIR $DRGLI,3. ;005.-GET LUN INFORMATION
145 000120 DIR $DRASG,4. ;007.-ASSIGN LUN
146
147
148 .IF DF A$$PRI
149
150 DIR $DRATP,4.,<DFCTSK,SRSTCL> ;009.-ALTER TASK PRIORITY
151
152 .IFF
153
154 000124 DIR .FALSE. ;009.-ALTER TASK PRIORITY
155
156 .ENDC
157
158
159 000124 DIR $DRREQ,7.,SRSTCL ;011.-REQUEST TASK
160 000130 DIR .FALSE. ;013.-INVALID DIC
161 000130 DIR .FALSE. ;015.-INVALID DIC
162 000130 DIR $DRRUN,11.,SRSTCL ;017.-RUN TASK
163 000134 DIR .FALSE. ;019.-INVALID DIC
164
165
166 .IF DF A$$TRP&P$$LAS&P$$SRF
167
168 DIR $DRRRA,2. ;21.-SETUP FOR RECEIVE BY REFERENCE AST
169
170 .IFF
171
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-3
172 000134 DIR .FALSE. ;021.-INVALID DIC
173
174 .ENDC
175
176
177 000134 DIR $DRMKT,5.,CEFNCL ;023.-MARK TIME
178 000140 DIR $DRCSR,3.,<SRSTCL,MUPCHK> ;025.-CANCEL SCHEDULE REQUESTS
179 000144 DIR $DRCMT,1. ;027.-CANCEL MARK TIME REQUESTS
180 000150 DIR .FALSE. ;029.-INVALID DIC
181 000150 DIR $DRCEF,2.,<CEFNCL,CEFNMT> ;031.-CLEAR EVENT FLAG
182 000154 DIR $DRSEF,2.,<CEFNCL,CEFNMT> ;033.-SET EVENT FLAG
183 000160 DIR $DRDSE,1. ;035.-DECLARE SIGNIFICANT EVENT
184 000164 DIR .FALSE. ;037.-INVALID DIC
185 000164 DIR $DRRAF,2. ;039.-READ ALL EVENT FLAGS
186 000170 DIR $DRWFS,2.,<CEFNCL,CEFNMT> ;041.-WAITFOR SINGLE EVENT FLAG
187 000174 DIR $DRWFL,3. ;043.-WAITFOR LOGICAL 'OR' OF EVENT FLAGS
188 000200 DIR $DRSPN,1. ;045.-SUSPEND EXECUTION
189 000204 DIR $DRRES,3.,SRSTCL ;047.-RESUME TASK EXECUTION ; TM088
190 000210 DIR $DRWSE,1. ;049.-WAITFOR SIGNIFICANT EVENT ;**-1
191 000214 DIR $DREXT,1. ;051.-TASK EXIT
192 000220 DIR $DREIF,2.,<CEFNCL,CEFNMT> ;053.-EXIT IF
193
194
195 .IF DF P$$LAS
196
197 DIR $DRCRR,2.,ACHKDB ;055.-CREATE REGION
198 DIR $DRATR,2.,ACHKDB ;057.-ATTACH REGION
199 DIR $DRDTR,2.,ACHKDB ;059.-DETACH REGION
200
201 .IFF
202
203 000224 DIR .FALSE. ;055.-INVALID DIC
204 000224 DIR .FALSE. ;057.-INVALID DIC
205 000224 DIR .FALSE. ;059.-INVALID DIC
206
207 .ENDC
208
209
210 000224 DIR $DRGTP,2. ;061.-GET TIME PARAMETERS
211
212
213 .IF DF G$$TTK
214
215 000230 DIR $DRGTK,2. ;063.-GET TASK PARAMETERS
216
217 .IFF
218
219 DIR .FALSE. ;063.-GET TASK PARAMETERS
220
221 .ENDC
222
223
224 .IF DF G$$TPP
225
226 000234 DIR $DRGPP,4. ;065.-GET PARTITION PARAMETERS
227
228 .IFF
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-4
229
230 DIR .FALSE. ;065.-GET PARTITION PARAMETERS
231
232 .ENDC
233
234
235 000240 DIR .FALSE. ;067.-INVALID DIC
236
237
238 .IF DF P$$LAS&P$$SRF
239
240 DIR $DRSRF,5.,SRSTCL ;069.-SEND BY REFERENCE
241
242 .IFF
243
244 000240 DIR .FALSE. ;069.-INVALID DIC
245
246 .ENDC
247
248
249 .IF DF R$$SND
250
251 000240 DIR $DRSND,5.,SRSTCL ;071.-SEND DATA TO TASK
252
253 .IFF
254
255 DIR .FALSE. ;071.-SEND DATA TO TASK
256
257 .IFTF
258
259 000244 DIR .FALSE. ;073.-INVALID DIC
260
261 .IFT
262
263 000244 DIR $DRREC,4. ;075.-RECEIVE DATA FROM TASK
264
265 .IFF
266
267 DIR .FALSE. ;075.-RECEIVE DATA FROM TASK
268
269 .IFT
270
271 000250 DIR $DRREC,4. ;077.-RECEIVE DATA FROM TASK OR EXIT
272
273 .IFF
274
275 DIR .FALSE. ;077.-RECEIVE DATA FROM TASK OR EXIT
276
277 .ENDC
278
279
280 000254 DIR .FALSE. ;079.-INVALID DIC
281
282
283 .IF DF P$$LAS&P$$SRF
284
285 DIR $DRRRF,2.,ACHKDB ;081.-RECEIVE BY REFERENCE
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-5
286
287 .IFF
288
289 000254 DIR .FALSE. ;081.-INVALID DIC
290
291 .ENDC
292
293
294 000254 DIR $DRABO,3.,<SRSTCL,MUPCHK> ;083.-ABORT TASK
295 000260 DIR .FALSE. ;085.-INVALID DIC
296 000260 DIR .FALSE. ;087.-INVALID DIC
297
298
299 .IF DF D$$YNM&E$$XPR&M$$MGE
300
301 DIR $DREXP,3. ;089.-EXTEND PARTITION
302
303 .IFF
304
305 000260 DIR .FALSE. ;089.-INVALID DIC
306
307 .ENDC
308
309
310 000260 DIR .FALSE. ;091.-INVALID DIC
311 000260 DIR .FALSE. ;093.-INVALID DIC
312
313
314 .IF DF C$$CKP&D$$ISK
315
316 DIR $DRDCP,1. ;095.-DISABLE CHECKPOINTING
317 DIR $DRECP,1. ;097.-ENABLE CHECKPOINTING
318
319 .IFF
320
321 000260 DIR .FALSE. ;095.-DISABLE CHECKPOINTING
322 000260 DIR .FALSE. ;097.-ENABLE CHECKPOINTING
323
324 .ENDC
325
326
327 .IF DF A$$TRP
328
329 000260 DIR $DRDAR,1. ;099.-DISABLE AST RECOGNITION
330 000264 DIR $DREAR,1. ;101.-ENABLE AST RECOGNITION
331
332 .IFF
333
334 DIR .FALSE. ;099.-DISABLE AST RECOGNITION
335 DIR .FALSE. ;101.-ENABLE AST RECOGNITION
336
337 .ENDC
338
339
340 000270 DIR $DRSDV,3. ;103.-SPECIFY ODT SST VECTOR
341 000274 DIR $DRSTV,3. ;105.-SPECIFY TASK SST VECTOR
342
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-6
343
344 .IF DF A$$TRP&R$$SND
345
346 000300 DIR $DRRCV,2. ;107.-SETUP FOR RECEIVE AST
347
348 .IFF
349
350 DIR .FALSE. ;107.-SETUP FOR RECEIVE AST
351
352 .ENDC
353
354
355 .IF DF A$$TRP&P$$RFL
356
357 DIR $DRPUT,2. ;109.-SETUP FOR POWER UP AST
358
359 .IFF
360
361 000304 DIR .FALSE. ;109.-SETUP FOR POWER UP AST
362
363 .ENDC
364
365
366 .IF DF A$$TRP&F$$LPP
367
368 DIR $DRFEX,2. ;111.-SETUP FOR FLOATING POINT AST
369
370 .IFF
371
372 000304 DIR .FALSE. ;111.-SETUP FOR FLOATING POINT AST
373
374 .ENDC
375
376
377 .IF DF P$$LAS&P$$GMX
378
379 DIR $DRGMX,2. ;113.-GET MAPPING CONTEXT
380
381 .IFF
382
383 000304 DIR .FALSE. ;113.-INVALID DIC
384
385 .ENDC
386
387
388 .IF DF A$$TRP
389
390 000304 DIR $DRATX,1. ;115.-AST TRAP EXIT
391
392 .IFF
393
394 DIR .FALSE. ;115.-AST TRAP EXIT
395
396 .ENDC
397
398
399 .IF DF P$$LAS
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-7
400
401 DIR $DRCRW,2.,ACHKDB ;117.-CREATE ADDRESS WINDOW
402 DIR $DRELW,2.,ACHKDB ;119.-ELIMINATE ADDRESS WINDOW
403 DIR $DRMAP,2.,ACHKDB ;121.-MAP ADDRESS WINDOW
404 DIR $DRUNM,2.,ACHKDB ;123.-UNMAP ADDRESS WINDOW
405
406 .IFF
407
408 000310 DIR .FALSE. ;117.-INVALID DIC
409 000310 DIR .FALSE. ;119.-INVALID DIC
410 000310 DIR .FALSE. ;121.-INVALID DIC
411 000310 DIR .FALSE. ;123.-INVALID DIC
412
413 .ENDC
414
415
416 .IF DF G$$TSS
417
418 DIR $DRGSS,1. ;125.-GET SENSE SWITCHES
419
420 .IFF
421
422 000310 DIR .FALSE. ;125.-GET SENSE SWITCHES
423
424 .ENDC
425
426
427 .IF DF M$$CRX
428
429 DIR $DRGCL,41. ;127.-GET MCR COMMAND LINE
430
431 .IFF
432
433 000310 DIR .FALSE. ;127.-GET MCR COMMAND LINE
434
435 .ENDC
436
437
438 .IF DF C$$INT ; TM088
439 ; TM088
440 DIR $DRCIN,7. ;129.-CONNECT TO INTERRUPT ; TM088
441 ; TM088
442 .ENDC ; TM088
443 ; TM088
444 ; TM088
445 ;+
446 ; **-$TRTRP-TRAP TRAP
447 ;
448 ; THIS ROUTINE IS TRAPPED TO WHEN A TRAP INSTRUCTION IS EXECUTED. IF THE
449 ; STACK DEPTH IS ZERO, THEN A DIRECTIVE STATUS IS TO BE RETURNED. ELSE
450 ; CONTROL IS TRANSFERED TO THE EMT/TRAP SST HANDLING ROUTINE.
451 ;
452 ; INPUTS:
453 ;
454 ; 2(SP)=PS WORD PUSHED BY TRAP INSTRUCTION.
455 ; 0(SP)=PC WORD PUSHED BY TRAP INSTRUCTION.
456 ;
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-8
457 ; OUTPUTS:
458 ;
459 ; IF THE STACK DEPTH IS ZERO, THEN A DIRECTIVE STATUS IS RETURNED.
460 ; ELSE CONTROL IS TRANSFERED TO THE EMT/TRAP SST HANDLING ROUTINE.
461 ;-
462
463 .ENABL LSB
464 000310 005767 000000G $TRTRP::TST $STKDP ;;;STACK DEPTH ZERO?
465 000314 001017 BNE $EMTRP ;;;IF NE NO
466 000316 MTPS #0 ;;;ALLOW INTERRUPTS
467 000322 011600 MOV (SP),R0 ;GET ADDRESS PLUS 2 OF TRAP INSTRUCTION
468
469
470 .IF DF M$$MGE
471
472 000324 052767 030000 177776 BIS #PMODE,PS ;SET PREVIOUS MODE TO USER
473 000332 012706 177756G MOV #$STACK-22,SP ;RELOAD EXEC STACK POINTER
474
475 .IFF
476
477 MOV #$STACK-12,SP ;RELOAD EXEC STACK POINTER
478
479 .ENDC
480
481
482 000336 116000 177776 MOVB -2(R0),R0 ;PICKUP DIRECTIVE STATUS
483 000342 010046 MOV R0,-(SP) ;SAVE DIRECTIVE STATUS
484 000344 100126 BPL 60$ ;IF PL OKAY AS IS
485 000346 005277 177426 INC @USRPS ;SET CARRY IN USER PS WORD
486 000352 000523 BR 60$ ;
487
488 ;+
489 ; **-$EMTRP-EMT TRAP
490 ;
491 ; THIS ROUTINE IS TRAPPED TO WHEN AN EMT INSTRUCTION IS EXECUTED. IF THE
492 ; STACK DEPTH IS NOT +1, THEN THE SYSTEM IS CRASHED. ELSE A TEST IS
493 ; MADE TO SEE IF THE EMT INSTRUCTION HAD A CODE OF 377. IF NOT, THEN
494 ; CONTROL IS TRANSFERED TO THE EMT/TRAP SST HANDLING ROUTINE. ELSE THE
495 ; APPROPRIATE DIRECTIVE IS EXECUTED.
496 ;
497 ; INPUTS:
498 ;
499 ; 2(SP)=PS WORD PUSHED BY EMT INSTRUCTION.
500 ; 0(SP)=PC WORD PUSHED BY EMT INSTRUCTION.
501 ;
502 ; OUTPUTS:
503 ;
504 ; IF THE STACK DEPTH IS NOT +1, THEN THE SYSTEM IS CRASHED. ELSE
505 ; CONTROL IS GIVEN TO THE EMT/TRAP SST ROUTINE OR A DIRECTIVE ROUTINE
506 ; DEPENDENT ON WHETHER THE EMT HAD A CODE OF 377.
507 ;-
508
509 000354 $EMTRP::DIRSV$ ;;;SAVE REGISTERS AND SET PRIORITY
510 000360 005767 000000G TST $STKDP ;WERE WE AT STACK DEPTH +1?
511 000364 001125 BNE 70$ ;IF NE NO-CRASH SYSTEM
512 000366 017703 000000G MOV @$HEADR,R3 ;GET SAVED STACK POINTER
513 000372 022323 CMP (R3)+,(R3)+ ;POINT TO USER PC WORD
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-9
514 000374 012305 MOV (R3)+,R5 ;GET ADDRESS OF EMT PLUS 2
515
516
517 .IF DF M$$MGE
518
519 000376 006545 MFPI -(R5) ;GET DIRECTIVE WORD
520 000400 022716 104377 CMP #104377,(SP) ;DIRECTIVE EMT?
521 000404 001116 BNE 80$ ;IF NE NO
522 000406 012716 000001 MOV #1,(SP) ;SET SUCCESSFUL DIRECTIVE STATUS
523
524 .IFF
525
526 CMP #104377,-(R5) ;DIRECTIVE EMT?
527 BNE 80$ ;IF NE NO
528 MOV #1,-(SP) ;SET SUCCESSFUL DIRECTIVE STATUS
529
530 .IFTF
531
532 000412 012705 000000' MOV #USRPS,R5 ;POINT TO LOCAL DATA
533 000416 010325 MOV R3,(R5)+ ;SAVE ADDRESS OF USER PS
534 000420 041623 BIC (SP),(R3)+ ;CLEAR CARRY IN USER PS WORD
535 000422 005015 CLR (R5) ;INDICATE NO BYTES
536
537 .IFT
538
539 000424 006506 MFPI SP ;GET USER STACK POINTER
540 000426 012603 MOV (SP)+,R3 ;
541 000430 006513 $DRLM1::MFPI (R3) ;GET FIRST WORD ON USER STACK
542 000432 032716 000001 BIT #1,(SP) ;DPB ON STACK?
543 000436 001004 BNE $DRLM2 ;IF NE YES
544 000440 012715 000002 MOV #2,(R5) ;INDICATE DPB POINTED TO BY STACK
545 000444 011603 MOV (SP),R3 ;SET ADDRESS OF DPB
546 000446 006536 MFPI @(SP)+ ;GET FIRST WORD OF DPB
547 000450 012601 $DRLM2::MOV (SP)+,R1 ;PICK UP FIRST DPB WORD
548 ; TM088
549 ; TM088
550 .IF DF C$$INT ; TM088
551 ; TM088
552 CLR R0 ;EXTRACT DIC CODE ; TM088
553 BISB R1,R0 ; ; TM088
554 ; TM088
555 .IFF ; TM088
556 ; TM088
557 000452 110100 MOVB R1,R0 ;COPY DIC CODE
558 ; TM088
559 .ENDC ; TM088
560 ; TM088
561 ; TM088
562 000454 105001 CLRB R1 ;CLEAR DIC BYTE
563 000456 000301 SWAB R1 ;SWAP DPB SIZE TO LOW BYTE
564
565 .IFF
566
567 BIT (SP),(R3) ;DPB ON STACK?
568 BNE 10$ ;IF NE YES
569 MOV (R3),R3 ;GET ADDRESS OF DPB
570 MOV #2,(R5) ;INDICATE DPB POINTED TO BY STACK
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-10
571
572
573 .IF DF A$$CHK
574
575 CALL $ACHK2 ;ADDRESS CHECK FIRST DPB WORD
576
577 .ENDC
578
579
580 .IF DF C$$INT ; TM088
581 ; TM088
582 10$: CLR R0 ;EXTRACT DIC CODE ; TM088
583 BISB (R3),R0 ; ; TM088
584 ; TM088
585 .IFF ; TM088
586 ; TM088
587 10$: MOVB (R3),R0 ;PICK UP DIC CODE
588 ; TM088
589 .ENDC ; TM088
590 ; TM088
591 ; TM088
592 CLR R1 ;PICK UP DPB SIZE
593 BISB 1(R3),R1 ;
594
595 .ENDC
596
597
598 000460 006301 ASL R1 ;CONVERT TO BYTES TO REMOVE AT EXIT
599 000462 010104 MOV R1,R4 ;COPY SIZE
600 000464 005046 CLR -(SP) ;ASSUME ILLEGAL DIC OR DPB SIZE
601 000466 006200 ASR R0 ;DIVIDE CODE BY 2
602 000470 103014 BCC 35$ ;IF CC ILLEGAL DIC CODE
603 ; TM088
604 ; TM088
605 .IF DF C$$INT ; TM088
606 ; TM088
607 CMP R0,#129./2 ;LEGAL DIC CODE? ; TM088
608 BHI 35$ ;IF HI NO ; TM088
609 ; TM088
610 .IFF ; TM088
611 ; TM088
612 000472 100413 BMI 35$ ;IF MI CODE > 63.
613 ; TM088
614 .ENDC ; TM088
615 ; TM088
616 ; TM088
617 000474 005002 CLR R2 ;MAP TO DIRECTIVE DISPATCH TABLE
618 000476 156002 000004' BISB DSPMP(R0),R2 ;
619 000502 001407 BEQ 35$ ;IF EQ ILLEGAL DIRECTIVE
620 000504 062702 000102' ADD #DSPTBL-2,R2 ;POINT TO PROPER TABLE ENTRY
621 000510 120162 000002 CMPB R1,2(R2) ;DPB SIZE MATCH?
622 000514 001002 BNE 35$ ;IF NE NO
623 000516 012216 MOV (R2)+,(SP) ;GET ADDRESS OF DIRECTIVE ROUTINE
624 000520 011204 MOV (R2),R4 ;PICK UP DIRECTIVE SIZE AND MASK BYTE
625
626
627 .IF DF P$$LAS&M$$MGE
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-11
628
629 BPL 35$ ;IF PL NOT A PLAS DIRECTIVE
630 $DPLM1::MFPI 2(R3) ;PICK UP POINTER TO DEFINITION BLOCK
631 $DPLM2::MOV (SP)+,R3 ;
632 MOV #8.*2,R1 ;PICK UP SIZE OF DEFINITION BLOCK
633
634 .ENDC
635
636
637 000522 35$: ;REFERENCE LABEL
638
639
640 .IF DF A$$CHK!M$$MGE
641
642 000522 CALL $ACHKP ;ADDRESS CHECK AND MAP DEFINITION BLOCK
643
644 .ENDC
645
646
647 000526 005723 TST (R3)+ ;SKIP OVER FIRST DPB WORD
648 000530 005715 TST (R5) ;DPB ON STACK?
649 000532 001001 BNE 36$ ;IF NE NO
650 000534 110415 MOVB R4,(R5) ;SET NUMBER OF BYTES TO REMOVE AT EXIT
651 000536 105004 36$: CLRB R4 ;CLEAR OUT SIZE BYTE
652 000540 005716 TST (SP) ;LEGAL DIC AND DPB SIZE?
653 000542 001455 BEQ 90$ ;IF EQ NO
654 000544 016705 000000G MOV $TKTCB,R5 ;PICK UP CURRENT TASK TCB
655 000550 006304 ASL R4 ;CALL $CEFN OR PLAS DIRECTIVE?
656
657
658 .IF DF P$$LAS
659
660 BCC 37$ ;IF CC NOT A PLAS DIRECTIVE
661 TST -(R3) ;POINT BACK TO FIRST WORD OF BLOCK
662 BIC #WS.CRW!WS.UNM!WS.ELW!WS.RRF,W.NSTS(R3) ;INIT OUTPUTS
663 37$: ;REFERENCE LABEL
664
665 .ENDC
666
667
668 000552 100003 BPL 40$ ;IF PL NO
669 000554 CALL $CEFN ;CONVERT EVENT FLAG NUMBER
670 000560 103012 BCC 50$ ;IF CC EVENT FLAG SPECIFIED
671 000562 006304 40$: ASL R4 ;EVENT FLAG REQUIRED?
672 000564 001410 BEQ 50$ ;IF EQ NO
673 000566 100444 BMI 100$ ;IF MI EVENT FLAG WAS REQUIRED
674
675
676 .IF DF A$$PRI!M$$MUP
677
678 ASL R4 ;TASK NAME DEFAULT TO CURRENT TASK?
679 BPL 45$ ;IF PL NO
680 MOV R5,R0 ;PICK UP CURRENT TASK TCB
681 TST (R3) ;TASK NAME SPECIFIED?
682 BEQ 46$ ;IF EQ NO
683
684 .ENDC
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-12
685
686
687 000570 45$: CALL $SRSTD ;SEARCH STD FOR TASK NAME
688 000574 103442 BCS 110$ ;IF CS NAME NOT FOUND
689 000576 022323 46$: CMP (R3)+,(R3)+ ;ADVANCE PAST TASK NAME
690
691
692 .IF DF M$$MUP
693
694 ASL R4 ;PERFORM MULTI-USER PROTECTION CHECK?
695 BPL 47$ ;IF PL NO
696 BIT #T3.PRV,T.ST3(R5) ;ISSUING TASK PRIVILEGED?
697 BNE 47$ ;IF NE YES
698 BIT #T3.SLV,T.ST3(R0) ;TARGET TASK A SLAVE TASK?
699 BNE 120$ ;IF NE YES, DON'T ALLOW
700 CMP T.UCB(R5),T.UCB(R0) ;CURRENT AND TARGET TASK UCBS MATCH?
701 BNE 120$ ;IF NE NO
702
703 .ENDC
704
705
706 000600 010001 47$: MOV R0,R1 ;COPY TCB ADDRESS
707 000602 062701 000032 ADD #T.STAT,R1 ;POINT TO TASK STATUS WORD
708 000606 010502 50$: MOV R5,R2 ;SET POINTER TO SECOND TASK STATUS WORD
709 000610 062702 000034 ADD #T.ST2,R2 ;
710 000614 016704 000000G MOV $HEADR,R4 ;POINT TO CURRENT TASK HEADER
711
712 ;
713 ; CALL DIRECTIVE ROUTINE WITH THE FOLLOWING ARGUMENTS:
714 ;
715 ; R5=ADDRESS OF THE TCB OF THE CURRENT TASK.
716 ; R4=ADDRESS OF THE HEADER OF THE CURRENT TASK.
717 ; R3=ADDRESS OF THE NEXT WORD IN THE DIRECTIVE DPB.
718 ; R2=ADDRESS OF THE SECOND TASK STATUS WORD OF THE CURRENT TASK.
719 ; R1=DEPENDENT ON DIRECTIVE.
720 ; R0=DEPENDENT ON DIRECTIVE.
721 ;
722
723 000620 CALL @(SP)+ ;CALL DIRECTIVE ROUTINE
724 000622 60$: ;REF LABEL
725
726
727 .IF DF M$$MGE
728
729 000622 006637 000046 MTPI @#H.DSW ;SET DIRECTIVE STATUS WORD
730 000626 006506 MFPI SP ;GET USER STACK POINTER
731 000630 066716 177146 ADD BTRMV,(SP) ;REMOVE BYTES FROM USER STACK
732 000634 006606 MTPI SP ;RESTORE USER STACK POINTER
733
734 .IFF
735
736 MOV (SP)+,@.DSW ;SET DIRECTIVE STATUS WORD
737 MOV $HEADR,R0 ;GET ADDRESS OF TASK HEADER
738 BEQ 65$ ;IF EQ TASK TERMINATED
739 MOV (R0),R0 ;GET TASK STACK POINTER
740 ADD #8.,R0 ;POINT TO FIRST STACK WORD
741 MOV R0,R1 ;COPY ADDRESS
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-13
742 ADD BTRMV,R1 ;POINT TO NEW TOP OF USER STACK
743 MOV -(R0),-(R1) ;MOVE RETURN PS WORD
744 MOV -(R0),-(R1) ;MOVE RETURN PC WORD
745 MOV -(R0),-(R1) ;MOVE SAVED R5
746 MOV -(R0),-(R1) ;MOVE SAVED R4
747 MOV R1,@$HEADR ;SET NEW STACK POINTER
748
749 .ENDC
750
751
752 .IF NDF A$$PRI
753
754 000636 $DRATP:: ;NOP ALTER PRIORITY
755
756 .ENDC
757
758
759 000636 65$: RETURN ;EXIT FROM TRAP
760
761 ;
762 ; SYSTEM CRASH - EMT/TRAP EXECUTED AT STACK DEPTH OTHER THAN +1
763 ;
764
765 000640 70$: CRASH
766
767 ;
768 ; EMT/TRAP SST ROUTINE TRANSFER
769 ;
770
771 000642 80$: ;REF LABEL
772
773
774 .IF DF M$$MGE
775
776 000642 016705 000000G MOV $HEADR,R5 ;POINT TO CURRENT TASK HEADER
777 000646 016505 000044 MOV H.WND(R5),R5 ;POINT TO NUMBER OF WINDOW BLOCKS
778 000652 005765 000004 TST W.BLVR+2(R5) ;CURRENT TASK MAPPED TO EXEC?
779 000656 001405 BEQ 85$ ;IF EQ NO
780 000660 021627 104376 CMP (SP),#104376 ;IS THIS A CALL TO $SWSTK?
781
782 .IFF
783
784 CMP (R5),#104376 ;IS THIS A CALL TO $SWSTK?
785
786 .ENDC
787
788
789 000664 001002 BNE 85$ ;IF NE NO
790 000666 000167 000000G JMP $SWSTK ;PROCESS CALL TO $SWSTK
791 000672 000167 000000G 85$: JMP $EMSST ;PROCESS SST FAULT
792
793 ;
794 ; ILLEGAL DIRECTIVE
795 ;
796
797 000676 90$: DRSTS D.RS99 ;SET DIRECTIVE STATUS
798
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-14
799 ;
800 ; REQUIRED EVENT FLAG NUMBER NOT SPECIFIED
801 ;
802
803 000700 100$: DRSTS D.RS97 ;SET DIRECTIVE STATUS
804
805 ;
806 ; SPECIFIED TASK NAME NOT FOUND IN TASK DIRECTORY
807 ;
808
809 000702 110$: DRSTS D.RS2 ;SET DIRECTIVE STATUS
810
811 ;
812 ; PRIVILEGE VIOLATION
813 ;
814
815
816 .IF DF M$$MUP
817
818 120$: DRSTS D.RS16 ;SET DIRECTIVE STATUS
819
820 .ENDC
821
822
823 .DSABL LSB
824
825 000001 .END
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-15
SYMBOL TABLE
ACHKDB= 000200 H.OVLY 000054 SRSTCL= 000004 T3.CLI= 001000 W.NRID= 000006
A$$CHK= 000000 H.PFVA 000032 SR0 = 177572 T3.MCR= 004000 W.NSIZ= 000004
A$$CPS= 000000 H.RCVA 000036 SR3 = 172516 T3.NET= 000020 W.NSRB= 000016
A$$TRP= 000000 H.RRVA 000062 SWR = 177570 T3.NSD= 000200 W.NSTS= 000014
BTRMV 000002R H.SPRI 000060 S$$YSZ= 001740 T3.PMD= 040000 X$$DBT= 000000
CEFNCL= 000100 H.TKVA 000026 TPS = 177564 T3.PRV= 010000 $ACHKP= ****** GX
CEFNMT= 000040 H.TKVL 000030 TS.BLK= 170700 T3.REM= 020000 $CEFN = ****** GX
CMODE = 140000 H.VEXT 000056 TS.CKP= 000200 T3.ROV= 000040 $DIRSV= ****** GX
C$$ORE= 002000 H.WND 000044 TS.CKR= 000100 T3.RST= 000400 $DRABO= ****** GX
DFCTSK= 000020 I$$RDN= 000000 TS.EXE= 100000 T3.SLV= 002000 $DRASG= ****** GX
DSPMK = 000000 KDSAR0= 172360 TS.MSG= 020000 UBMPR = 170200 $DRATP 000636RG
DSPMP 000004R KDSDR0= 172320 TS.NRP= 010000 UDSAR0= 177660 $DRATX= ****** GX
DSPNX = 000206 KISAR0= 172340 TS.OUT= 000400 UDSDR0= 177620 $DRCEF= ****** GX
DSPSZ = 000002 KISAR5= 172352 TS.RDN= 040000 UISAR0= 177640 $DRCMT= ****** GX
DSPTBL 000104R KISAR6= 172354 TS.RUN= 004000 UISAR4= 177650 $DRCSR= ****** GX
D.RS2 = ****** GX KISAR7= 172356 T.ACTL 000052 UISAR5= 177652 $DRDAR= ****** GX
D.RS97= ****** GX KISDR0= 172300 T.ASTL 000016 UISAR6= 177654 $DRDSE= ****** GX
D.RS99= ****** GX KISDR6= 172314 T.ATT 000054 UISAR7= 177656 $DREAR= ****** GX
FE.CAL= 000040 KISDR7= 172316 T.CPCB 000004 UISDR0= 177600 $DREIF= ****** GX
FE.CEX= 020000 K$$CNT= 177546 T.DPRI 000040 UISDR4= 177610 $DREXT= ****** GX
FE.DRV= 000010 K$$CSR= 177546 T.EFLG 000022 UISDR5= 177612 $DRGLI= ****** GX
FE.EXP= 000200 K$$IEN= 000115 T.IOC 000003 UISDR6= 177614 $DRGPP= ****** GX
FE.EXT= 000001 K$$LDC= 000001 T.LBN 000041 UISDR7= 177616 $DRGTK= ****** GX
FE.EXV= 000004 K$$TPS= 000074 T.LDV 000044 USRPS 000000R $DRGTP= ****** GX
FE.LSI= 000400 L$$ASG= 000000 T.LNK 000000 V$$CTR= 001200 $DRLM1 000430RG
FE.MUP= 000002 L$$DRV= 000000 T.MXSZ 000050 V$$RSN= 000031 $DRLM2 000450RG
FE.MXT= 040000 MPAR = 172100 T.NAM 000006 WS.CRW= 100000 $DRMKT= ****** GX
FE.NLG= 100000 MPCSR = 177746 T.OFF 000060 WS.DEL= 000010 $DRQIO= ****** GX
FE.PKT= 000100 MUPCHK= 000010 T.PCB 000046 WS.ELW= 020000 $DRRAF= ****** GX
FE.PLA= 000020 M$$CRB= 000124 T.PRI 000002 WS.EXT= 000004 $DRRCV= ****** GX
G$$TPP= 000000 M$$MGE= 000000 T.RCVL 000012 WS.MAP= 000200 $DRREC= ****** GX
G$$TTK= 000000 M$$NET= 000000 T.RRFL 000064 WS.RCX= 000100 $DRREQ= ****** GX
H$$RTZ= 000074 M$$NT2= 000000 T.SRCT 000063 WS.RED= 000001 $DRRES= ****** GX
H.CSP 000000 N = 000002 T.STAT 000032 WS.RRF= 010000 $DRRUN= ****** GX
H.CUIC 000010 N$$LDV= 000001 T.ST2 000034 WS.UNM= 040000 $DRSDV= ****** GX
H.DSW 000046 OFFST = 000100 T.ST3 000036 WS.WRT= 000002 $DRSEF= ****** GX
H.DUIC 000012 PIRQ = 177772 T.TCBL 000030 WS.64B= 000400 $DRSND= ****** GX
H.EFLM 000004 PMODE = 030000 T.UCB 000026 W.BATT 000006 $DRSPN= ****** GX
H.EFSV 000040 PR0 = 000000 T2.ABO= 000100 W.BFPD 000014 $DRSTV= ****** GX
H.FCS 000050 PR1 = 000040 T2.AST= 100000 W.BHVR 000004 $DRWFL= ****** GX
H.FORT 000052 PR4 = 000200 T2.BFX= 004000 W.BLGH 000020 $DRWFS= ****** GX
H.FPSA 000042 PR5 = 000240 T2.CAF= 000400 W.BLPD 000016 $DRWSE= ****** GX
H.FPVA 000034 PR6 = 000300 T2.CHK= 020000 W.BLVR 000002 $EMSST= ****** GX
H.GARD 000072 PR7 = 000340 T2.CKD= 010000 W.BNPD 000015 $EMTRP 000354RG
H.HDLN 000002 PS = 177776 T2.DST= 040000 W.BOFF 000012 $HEADR= ****** GX
H.IPC 000016 P$$RTY= 000000 T2.FXD= 002000 W.BPCB 000000 $SRSTD= ****** GX
H.IPS 000014 P$$TPT= 000000 T2.HLT= 000200 W.BSIZ 000010 $STACK= ****** GX
H.ISP 000020 R$$DER= 000000 T2.SPN= 000004 W.NAPR= 000001 $STKDP= ****** GX
H.LUN 000076 R$$EXV= 000000 T2.STP= 000020 W.NBAS= 000002 $SWSTK= ****** GX
H.NLUN 000074 R$$SND= 000000 T2.TIO= 001000 W.NID = 000000 $TKTCB= ****** GX
H.NML 000061 R$$11M= 000000 T2.WFR= 000001 W.NLEN= 000012 $TRTRP 000310RG
H.ODVA 000022 R$$11S= 000000 T3.ACP= 100000 W.NLGH= 000020 $$$ = 000310R
H.ODVL 000024 SISDR0= 172200 T3.CAL= 000100 W.NOFF= 000010
. ABS. 000102 000
000704 001
ERRORS DETECTED: 0
DRDSP MACRO M1110 22-AUG-79 06:56 PAGE 3-16
SYMBOL TABLE
VIRTUAL MEMORY USED: 4276 WORDS ( 17 PAGES)
DYNAMIC MEMORY: 5092 WORDS ( 19 PAGES)
ELAPSED TIME: 00:00:44
[11,24]DRDSP,SY0:[11,34]DRDSP/-SP=[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,DRDSP