Trailing-Edge
-
PDP-10 Archives
-
BB-H348C-RM_1982
-
swskit-v21/listings/rsx11s/sstsr.list
There are no other files named sstsr.list in the archive.
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3
1 .TITLE SSTSR
2 .IDENT /08/
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 08
12 ;
13 ; D. N. CUTLER 27-AUG-73
14 ;
15 ; PREVIOUSLY MODIFIED BY:
16 ;
17 ; D. N. CUTLER
18 ; T. J. MILLER
19 ;
20 ; MODIFIED BY:
21 ;
22 ; T. J. MILLER 15-SEP-77
23 ;
24 ; TM104 -- CHANGE FLOATING POINT PROCESSOR LOGIC FOR
25 ; TRANSPORTABILITY.
26 ;
27 ; SYNCHRONOUS SYSTEM TRAP (SST) SERVICE ROUTINES
28 ;
29 ; MACRO LIBRARY CALLS
30 ;
31
32 .MCALL ABODF$,HDRDF$,HWDDF$,PKTDF$
33 000000 ABODF$ ;DEFINE TASK ABORT CODES
34 000000 HDRDF$ ;DEFINE TASK HEADER OFFSETS
35 000000 HWDDF$ ;DEFINE HARDWARE REGISTERS
36 000000 PKTDF$ ;DEFINE I/O PACKET OFFSETS
37
38 ;
39 ; LOCAL DATA
40 ;
41 ; FLOATING POINT EXCEPTION VECTOR (FINAL SETUP OF THIS VECTOR AND, IF ; TM104
42 ; NECESSARY, THE PIRQ VECTOR IS PERFORMED IN INITL AND THE MCR SAVE ; TM104
43 ; COMMAND.) ; TM104
44 ; ;**-1
45
46
47 .IF DF F$$LPP!F$$LTP
48
49 .ASECT
50 .=244
51 .WORD $FLTRP ;
52 .WORD PR7 ;
53
54 .PSECT ;**-11
55
56 .ENDC
57
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-1
58
59 ;
60 ; FLOATING POINT STATUS AND FORK BLOCK
61 ;
62
63
64 .IF DF F$$LPP
65
66 FLSTS: .BLKW 2 ;FLOATING POINT STATUS
67 FLFRK: .BLKW 2 ;FLOATING POINT FORK BLOCK
68 FLTCB: .BLKW 1 ;ADDRESS OF TCB CAUSING EXCEPTION TRAP ; TM104
69
70 .ENDC
71
72
73 ;
74 ; SEGMENT FAULT VECTOR
75 ;
76
77
78 .IF DF M$$MGE
79
80 000000 .ASECT
81 000250 .=250
82 000250 000066' .WORD $SGFLT ;
83 000252 000340 .WORD PR7 ;
84 000000 .CSECT
85
86 .ENDC
87
88
89 ;+
90 ;
91 ; **-$EMSST-NON RSX EMT/TRAP INSTRUCTION
92 ;
93 ; THIS ROUTINE IS TRANSFERED TO BY THE DIRECTIVE DISPATCHER WHEN A NON RSX
94 ; EMT OR A TRAP INSTRUCTION IS EXECUTED. THE MACHINE STATE HAS ALREADY BEEN
95 ; SAVED. THE EMT/TRAP CODE (LOW BYTE OF INSTRUCTION) IS SETUP TO BE
96 ; PASSED TO THE USER AND CONTROL IS TRANSFERED TO THE SST EXIT ROUTINE.
97 ;
98 ; INPUTS:
99 ;
100 ; R5=ADDRESS OF THE EMT/TRAP INSTRUCTION.
101 ;
102 ; OUTPUTS:
103 ;
104 ; 04(SP)=EMT/TRAP CODE MULTIPLIED BY 2.
105 ; 02(SP)=SST CODE (SCEMT=EMT, SCTRP=TRAP).
106 ; 00(SP)=NUMBER OF BYTES TO BE TRANSFERED TO USER STACK (6).
107 ;-
108
109 .ENABL LSB
110 000000 $EMSST:: ;REF LABEL
111
112
113 .IF DF M$$MGE
114
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-2
115 000000 011605 MOV (SP),R5 ;GET EMT/TRAP INSTRUCTION
116 000002 042716 177400 BIC #177400,(SP) ;CLEAR INSTRUCTION CODE
117 000006 006316 ASL (SP) ;MULTIPLY CODE BY 2
118 000010 012746 000012 MOV #S.CEMT,-(SP) ;ASSUME NON-RSX EMT INSTRUCTION
119 000014 032705 000400 BIT #400,R5 ;EMT INSTRUCTION?
120
121 .IFF
122
123 CLR -(SP) ;PICKUP SST CODE
124 BISB (R5)+,(SP) ;
125 ASL (SP) ;MULTIPLY CODE BY 2
126 MOV #S.CEMT,-(SP) ;ASSUME NON-RSX EMT INSTRUCTION
127 BITB #1,(R5) ;EMT INSTRUCTION
128
129 .ENDC
130
131
132 000020 001402 BEQ 10$ ;IF EQ YES-SET NUMBER OF BYTES
133 000022 012716 000014 MOV #S.CTRP,(SP) ;SET FOR TRAP INSTRUCTION
134 000026 012746 000006 10$: MOV #3*2,-(SP) ;SET NUMBER OF BYTES
135 000032 000455 BR SSTXT ;TAKE COMMON SST EXIT ROUTINE
136
137 ;+
138 ; **-$FLTRP-FLOATING POINT EXCEPTION (11/40)
139 ;
140 ; THIS ROUTINE IS TRAPPED TO WHEN AN 11/40 FLOATING POINT EXCEPTION FAULT
141 ; OCCURS. THE CURRENT MACHINE STATE IS SAVED AND CONTROL IS TRANSFERED TO
142 ; THE SST EXIT ROUTINE.
143 ;
144 ; INPUTS:
145 ;
146 ; NONE.
147 ;
148 ; OUTPUTS:
149 ;
150 ; 02(SP)=SST CODE (SCFLT).
151 ; 00(SP)=NUMBER OF BYTES TO BE TRANSFERED TO USER STACK (4).
152 ;-
153 ; TM104
154 000034 $FLTRP:: ;DEFINE UNCONDITIONALLY FOR VECTOR SETUP; TM104
155
156
157 .IF DF F$$LTP
158
159 DIRSV$ ;;;SAVE REGISTERS AND CLEAR PRIORITY ; TM104
160 MOV #S.CFLT,-(SP) ;SET FOR FLOATING POINT EXCEPTION FAULT ;**-1
161 BR 20$ ;SET NUMBER OF BYTES
162
163 .ENDC
164
165
166 ;+
167 ; **-$FPPR7-$FPPR8-$FPPRQ-FLOATING POINT PROCESSOR EXCEPTION HANDLING ; TM104
168 ; ;**-1
169 ; THESE ROUTINES HANDLE EXCEPTION FAULTS FROM THE FLOATING POINT ; TM104
170 ; PROCESSOR. THE FLOATING POINT EXCEPTION AND ADDRESS REGISTERS AND ; TM104
171 ; THE CURRENT TASK TCB ARE SAVED AND THEN AN ATTEMPT IS MADE TO QUEUE AN; TM104
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-3
172 ; AST TO THE TASK AT FORK LEVEL. THESE ROUTINES SUPPORT TWO MODES OF ; TM104
173 ; OPERATION DEPENDING ON WHETHER THE FPP'S EXCEPTION FAULTS CAN OCCUR ; TM104
174 ; WHILE THE PROCESSOR IS AT PRIORITY 7 OR NOT. IF THE FPP'S EXCEPTION ; TM104
175 ; FAULT CAN OCCUR WHILE THE PROCESSOR IS AT PRIORITY 7, THEN THE ; TM104
176 ; PROCESSOR MUST HAVE A PIRQ REGISTER. INITL AND THE MCR SAVE ; TM104
177 ; COMMAND DETERMINE WHICH MODE OF OPERATION IS TO BE USED OR NOT ; TM104
178 ; DEPENDING ON WHETHER THE PROCESSOR HAS A PROGRAM INTERRUPT REQUEST ; TM104
179 ; REGISTER (PIRQ) OR NOT, AND SET UP THE FPP AND PIRQ VECTORS ; TM104
180 ; ACCORDINGLY. THE ROUTINES OPERATE AS FOLLOWS. ; TM104
181 ; ; TM104
182 ; 1. IF THE PROCESSOR DOES NOT HAVE A PIRQ REGISTER THEN THE FPP MUST; TM104
183 ; NEVER FAULT WHEN THE PROCESSOR IS AT PRIORITY 7 OR IT MUST BE ; TM104
184 ; SYNCHRONOUS. IN THIS CASE THE FLOATING POINT EXCEPTION VECTOR ; TM104
185 ; POINTS TO $FPPR7, AND THE PROCESSOR SIMPLY CALLS INTERRUPT SAVE ; TM104
186 ; AND FORK TO GET TO SYSTEM STATE. ; TM104
187 ; ; TM104
188 ; 2. IF THE PROCESSOR HAS A PIRQ REGISTER, THE FLOATING POINT EXCEP- ; TM104
189 ; TION TRAP VECTOR POINTS TO $FPPR8 AND THE PIRQ VECTOR POINTS TO ; TM104
190 ; $FPPRQ. FLOATING POINT TRAPS ARE CONVERTED TO PIRQ PRIORITY 1 ; TM104
191 ; INTERRUPTS AFTER SAVING THE FLOATING POINT STATUS. ON THE PIRQ ; TM104
192 ; TRAP AN INT SAVE AND FORK IS USED TO GET TO SYSTEM STATE. NOTE ; TM104
193 ; THAT THIS STRATEGY WOULD ALSO WORK FOR PROCESSORS DESCRIBED IN 1; TM104
194 ; ABOVE. ; TM104
195 ; ;**-3
196 ; INPUTS:
197 ;
198 ; THE FLOATING POINT EXCEPTION REGISTER CONTAINS THE REASON FOR THE
199 ; FAULT AND THE FLOATING POINT ADDRESS REGISTER CONTAINS THE ADDRESS
200 ; OF THE FAULTING INSTRUCTION.
201 ;
202 ; OUTPUTS:
203 ;
204 ; AN ATTEMPT IS MADE TO QUEUE AN AST TO THE TASK CAUSING THE FAULT; TM104
205 ; WITH THE CONTENTS OF THE FLOATING POINT EXCEPTION REGISTER AND ; TM104
206 ; AND ADDRESS REGISTER. ; TM104
207 ;- ;**-2
208
209
210 .IF DF F$$LPP
211
212 $FPPR7::STST FLSTS ;;;STORE FLOATING POINT EXCEP AND ADDR ; TM104
213 BR 14$ ;;; ; TM104
214 ; TM104
215 $FPPR8::STST FLSTS ;;;STORE FLOATING POINT EXCEP AND ADDR ; TM104
216 BIS #<2*256.>,PIRQ ;;;POST PROGRAMMED INTERRUPT REQUEST ; TM104
217 RTI ;;;WAIT FOR PIRQ INTERRUPT ; TM104
218 ; TM104
219 $FPPRQ::CLR PIRQ ;;;DISABLE PROGRAM INTERRUPT REQUEST ; TM104
220 14$: MOV $TKTCB,FLTCB ;;;MUST SAVE FAULTING TCB NOW ; TM104
221 CALL $INTSV,PR1 ;;;GO TO PRIORITY 1 ; TM104
222 MOV #FLFRK+4,R4 ;;;SET ADDRESS OF FORK BLOCK ;**-24
223 CALL $FORK0 ;;;CREATE A SYSTEM PROCESS
224 MOV #H.FPVA,R4 ;SET OFFSET TO AST CONTROL BLOCK IN HEADER
225 MOV FLTCB,R5 ;GET TCB ADDRESS OF FAULTING TASK ; TM104
226 CALL $DASTT ;DECLARE FLOATING POINT AST ;**-1
227 BCS 15$ ;IF CS NO AST DECLARED
228 MOV FLSTS,A.PRM+2(R1) ;INSERT AST PARAMETERS
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-4
229 MOV FLSTS+2,A.PRM(R1) ;
230 15$: RETURN ;
231
232 .IFF ; TM104
233 ; TM104
234 000034 $FPPR7:: ;DEFINE LABELS FOR SAVE ; TM104
235 000034 $FPPR8:: ; ; TM104
236 000034 $FPPRQ:: ; ; TM104
237 ; TM104
238 .ENDC
239
240
241 ;+
242 ; **-$ILINS-ILLEGAL OR RESERVED INSTRUCTION
243 ;
244 ; THIS ROUTINE IS TRAPPED TO WHEN AN ILLEGAL OR RESERVED INSTRUCTION
245 ; IS EXECUTED. THE CURRENT MACHINE STATE IS SAVED AND CONTROL IS TRANS-
246 ; FERRED TO THE SST EXIT ROUTINE.
247 ;
248 ; INPUTS:
249 ;
250 ; NONE.
251 ;
252 ; OUTPUTS:
253 ;
254 ; 02(SP)=SST CODE (SCILI).
255 ; 00(SP)=NUMBER OF BYTES TO BE TRANSFERED TO THE USER STACK (4).
256 ;-
257
258 000034 $ILINS::DIRSV$ ;;;SAVE REGISTERS AND SET PRIORITY
259 000040 012746 000010 MOV #S.CILI,-(SP) ;SET FOR ILLEGAL OR RESERVED INSTRUCTION
260 000044 000443 BR 20$ ;SET NUMBER OF BYTES
261
262 ;+
263 ; **-$IOTRP-IOT INSTRUCTION
264 ;
265 ; THIS ROUTINE IS TRAPPED TO WHEN AN IOT INSTRUCTION IS EXECUTED. IF THE
266 ; STACK DEPTH IS NOT +1, THEN THE SYSTEM IS CRASHED VIA A JUMP TO
267 ; $CRASH. ELSE THE CURRENT MACHINE STATE IS SAVED AND CONTROL IS TRANS-
268 ; FERED TO THE SST EXIT ROUTINE.
269 ;
270 ; INPUTS:
271 ;
272 ; NONE.
273 ;
274 ; OUTPUTS:
275 ;
276 ; IF THE CURRENT STACK DEPTH IS NOT +1, THEN THE SYSTEM IS CRASHED.
277 ; ELSE THE FOLLOWING ARGUMENTS ARE SETUP ON THE CURRENT STACK:
278 ;
279 ; 02(SP)=SST CODE (SCIOT).
280 ; 00(SP)=NUMBER OF BYTES TO BE TRANSFERRED TO THE USER STACK (4).
281 ;-
282
283 000046 005767 000000G $IOTRP::TST $STKDP ;;;RUNNING ON SYSTEM STACK?
284 000052 003443 BLE 30$ ;;;IF LE YES-FATAL SYSTEM ERROR
285 000054 DIRSV$ ;;;SAVE REGISTERS AND SET PRIORITY
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-5
286 000060 012746 000006 MOV #S.CIOT,-(SP) ;SET FOR IOT INSTRUCTION
287 000064 000433 BR 20$ ;SET NUMBER OF BYTES
288
289 ;+
290 ; **-$SGFLT-SEGMENT FAULT
291 ;
292 ; THIS ROUTINE IS TRAPPED TO WHEN A SEGMENT FAULT OCCURS. THE CURRENT
293 ; MACHINE STATE IS SAVED, SR0 THRU SR2 ARE SETUP TO BE PASSED TO THE USER,
294 ; AND CONTROL IS TRANSFERED TO THE SST EXIT ROUTINE.
295 ;
296 ; INPUTS:
297 ;
298 ; NONE.
299 ;
300 ; OUTPUTS:
301 ;
302 ; 10(SP)=CONTENTS OF SR0.
303 ; 06(SP)=CONTENTS OF SR2.
304 ; 04(SP)=CONTENTS OF SR1.
305 ; 02(SP)=SST CODE (SCSGF).
306 ; 00(SP)=NUMBER OF BYTES TO BE TRANSFERED TO THE USER STACK (10).
307 ;-
308
309
310 .IF DF M$$MGE
311
312 000066 $SGFLT::DIRSV$ ;;;SAVE REGISTERS AND SET PRIORITY
313 000072 012705 177576 MOV #SR0+4,R5 ;POINT SR2
314 000076 011546 MOV (R5),-(SP) ;SAVE SR2
315 000100 011646 MOV (SP),-(SP) ;COPY SAVED SR2
316 000102 014546 MOV -(R5),-(SP) ;SAVE SR1
317 000104 014566 000004 MOV -(R5),4(SP) ;SAVE SR0
318 000110 042715 160000 BIC #160000,(R5) ;UNFREEZE MEMORY MANAGEMENT UNIT
319 000114 012746 000002 MOV #S.CSGF,-(SP) ;SET FOR SEGMENT FAULT
320 000120 012746 000012 MOV #5*2,-(SP) ;SET NUMBER OF BYTES
321 000124 000420 BR SSTXT ;TAKE COMMON SST EXIT ROUTINE
322
323 .ENDC
324
325
326 ;+
327 ; **-$TRACE-TRACE (T-BIT) OR BREAK POINT INSTRUCTION (BPT) TRAP
328 ;
329 ; THIS ROUTINE IS TRAPPED TO WHEN A TRACE TRAP (T-BIT) OCCURS OR A BREAK-
330 ; POINT TRAP INSTRUCTION IS EXECUTED. THE CURRENT MACHINE STATE IS SAVED
331 ; AND CONTROL IS TRANSFERED TO THE SST EXIT ROUTINE.
332 ;
333 ; INPUTS:
334 ;
335 ; NONE.
336 ;
337 ; OUTPUTS:
338 ;
339 ; 02(SP)=SST CODE (SCBPT).
340 ; 00(SP)=NUMBER OF BYTES TO BE TRANSFERED TO THE USER STACK (4).
341 ;-
342
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-6
343 000126 $TRACE::DIRSV$ ;;;SAVE REGISTERS AND SET PRIORITY
344 000132 012746 000004 MOV #S.CBPT,-(SP) ;SET FOR TRACE OR BREAKPOINT TRAP
345 000136 000406 BR 20$ ;SET NUMBER OF BYTES
346
347 ;+
348 ; **-$TRP04-TRAPS AT 4 (ODD ADDRESS, NONEX MEM, ETC.)
349 ;
350 ; THIS ROUTINE IS TRAPPED TO WHEN A TRAP AT 4 OCCURS. IF A STACK VIOLATION
351 ; HAS CAUSED THE TRAP (I.E. A STACKPOINTER OF LESS THAN 400), THEN THE
352 ; THE SYSTEM IS CRASHED. ELSE THE CURRENT MACHINE STATE IS SAVED AND
353 ; CONTROL IS TRANSFERED TO THE SST EXIT ROUTINE.
354 ;
355 ; INPUTS:
356 ;
357 ; NONE.
358 ;
359 ; OUTPUTS:
360 ;
361 ; 02(SP)=SST CODE (SCOAD).
362 ; 00(SP)=NUMBER OF BYTES TO BE TRANSFERED TO THE USER STACK (4).
363 ;-
364
365 000140 020627 000400 $TRP04::CMP SP,#400 ;;;STACK VIOLATION?
366 000144 103406 BLO 30$ ;;;IF LO YES
367 000146 DIRSV$ ;;;SAVE REGISTERS AND SET PRIORITY
368 000152 005046 CLR -(SP) ;SET FOR ODD ADDRESS TRAP
369 000154 012746 000004 20$: MOV #2*2,-(SP) ;SET NUMBER OF BYTES
370 000160 000402 BR SSTXT ;TAKE COMMON SST EXIT ROUTINE
371 000162 000167 000000G 30$: JMP $CRASH ;;;CRASH THE SYSTEM
372 .DSABL LSB
373
374 ;+
375 ; **-SSTXT-COMMON SST EXIT ROUTINE
376 ;
377 ; CONTROL IS TRANSFERED TO THIS ROUTINE TO EFFECT AN SST. IF THE CURRENT
378 ; STACK DEPTH IS NOT ZERO, THEN THE SYSTEM IS CRASHED. ELSE AN ATTEMPT IS
379 ; MADE TO EFFECT AN SST FOR THE CURRENT TASK. IF THE TASK DOES NOT HAVE
380 ; AN APPROPRIATE SST VECTOR ENTRY OR A PUSH OF THE SST PARAMETERS ONTO THE
381 ; TASK STACK CANNOT BE EFFECTED, THEN THE TASK IS ABORTED. ELSE THE SST
382 ; IS SETUP AND A DIRECTIVE EXIT IS EXECUTED.
383 ;
384 ; INPUTS: (MAPPED SYSTEM)
385 ;
386 ; 24(SP)=PS WORD SAVED BY SST TRAP.
387 ; 22(SP)=PC WORD SAVED BY SST TRAP.
388 ; 20(SP)=SAVED R5.
389 ; 16(SP)=SAVED R4.
390 ; 14(SP)=SAVED R3.
391 ; 12(SP)=SAVED R2.
392 ; 10(SP)=SAVED R1.
393 ; 06(SP)=SAVED R0.
394 ; 04(SP)=SST PARAMETER (ZERO OR MORE PARAMETERS MAY BE SPECIFIED).
395 ; 02(SP)=SST CODE.
396 ; 00(SP)=NUMBER OF BYTES TO BE TRANSFERED TO USER STACK.
397 ;
398 ; INPUTS: (REAL MEMORY SYSTEM)
399 ;
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-7
400 ; 14(SP)=SAVED R3.
401 ; 12(SP)=SAVED R2.
402 ; 10(SP)=SAVED R1.
403 ; 06(SP)=SAVED R0.
404 ; 04(SP)=SST PARAMETER (ZERO OR MORE PARAMETERS MAY BE SPECIFIED).
405 ; 02(SP)=SST CODE.
406 ; 00(SP)=NUMBER OF BYTES TO BE TRANSFERED TO USER STACK.
407 ;
408 ; OUTPUTS:
409 ;
410 ; AN ATTEMPT IS MADE TO EFFECT THE SPECIFIED SST FOR THE CURRENT TASK.
411 ;-
412
413 000166 016705 000000G SSTXT: MOV $HEADR,R5 ;GET ADDRESS OF TASK HEADER
414
415
416 .IF DF M$$MGE
417
418 000172 022767 177777 000000G CMP #-1,$STKDP ;FAULT OCCUR AT STACK DEPTH ZERO?
419 000200 001020 BNE 7$ ;IF NE NO
420 000202 010600 MOV SP,R0 ;COPY CURRENT STACK POINTER
421 000204 061600 ADD (SP),R0 ;ADD NUMBER OF BYTES TO BE TRANSFERED
422 000206 016000 000016 MOV 16(R0),R0 ;GET FAULT PC ADDRESS
423 000212 020027 000000G CMP R0,#$DRLM1 ;FAULT OCCUR IN DIRECTIVE DISPATCHER?
424 000216 103403 BLO 3$ ;IF LO NO
425 000220 020027 000000G CMP R0,#$DRLM2 ;FAULT OCCUR IN DIRECTIVE DISPATCHER?
426 000224 101501 BLOS 90$ ;IF LOS YES
427 000226 020027 000000G 3$: CMP R0,#$DQLM1 ;FAULT OCCUR IN QIO DIRECTIVE?
428 000232 103403 BLO 4$ ;IF LO NO
429 000234 020027 000000G CMP R0,#$DQLM2 ;FAULT OCCUR IN QIO DIRECTIVE?
430 000240 101473 BLOS 90$ ;IF LOS YES
431 000242 4$: ;REFERENCE LABEL
432
433
434 .IF DF P$$LAS
435
436 CMP R0,#$DPLM1 ;FAULT OCCUR RETRIEVING DEF BLOCK ADDR?
437 BLO 7$ ;IF LO NO
438 CMP R0,#$DPLM2 ;FAULT OCCUR RETRIEVING DEF BLOCK ADDR?
439 BLOS 90$ ;IF LOS YES
440
441 .ENDC
442
443
444 .IFTF
445
446 000242 005767 000000G 7$: TST $STKDP ;STACK DEPTH ZERO?
447 000246 001056 BNE 60$ ;IF NE NO - FATAL SYSTEM ERROR
448 000250 010504 MOV R5,R4 ;COPY ADDRESS OF HEADER
449 000252 062704 000022 ADD #H.ODVA,R4 ;POINT TO ODT SST VECTOR DESCRIPTOR
450 000256 CALL 10$ ;SST ADDRESS IN ODT VECTOR?
451 000262 012746 000414' MOV #80$,-(SP) ;SST ADDRESS IN TASK VECTOR?
452 000266 012403 10$: MOV (R4)+,R3 ;GET ADDRESS OF SST VECTOR
453 000270 001410 BEQ 20$ ;IF EQ NO VECTOR THIS DESCRIPTOR
454 000272 026614 000004 CMP 4(SP),(R4) ;VECTOR LONG ENOUGH TO COVER SST?
455 000276 103005 BHIS 20$ ;IF HIS NO
456 000300 066603 000004 ADD 4(SP),R3 ;POINT TO APPROPRIATE VECTOR ENTRY
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-8
457
458 .IFT
459
460 000304 006513 MFPI (R3) ;GET ADDRESS OF SST ROUTINE
461 000306 012603 MOV (SP)+,R3 ;
462
463 .IFF
464
465 MOV (R3),R3 ;GET ADDRESS OF SST ROUTINE
466
467 .IFTF
468
469 000310 001002 BNE 30$ ;IF NE SST ROUTINE FOUND
470 000312 005724 20$: TST (R4)+ ;POINT TO NEXT VECTOR DESCRIPTOR
471 000314 RETURN ;
472 000316 005726 30$: TST (SP)+ ;REMOVE RETURN ADDRESS
473 000320 011601 MOV (SP),R1 ;GET NUMBER OF BYTES TO BE TRANSFERED
474
475 .IFT
476
477 000322 006506 MFPI SP ;GET CURRENT TASK STACK POINTER
478 000324 160116 SUB R1,(SP) ;CALCULATE NEW TOP OF STACK
479 000326 011600 MOV (SP),R0 ;COPY NEW TOP OF STACK ADDRESS
480 000330 006606 MTPI SP ;RESTORE NEW TASK STACK POINTER
481
482 .IFF
483
484 MOV (R5),R0 ;GET CURRENT TASK STACK POINTER
485 SUB R1,R0 ;CALCULATE NEW TOP OF STACK
486 MOV (R5),R4 ;SAVE CURRENT TASK STACK POINTER
487 MOV R0,(R5) ;RESTORE NEW TASK STACK POINTER
488
489 .IFTF
490
491
492 .IF DF A$$CHK!M$$MGE
493
494 000332 CALL $ACHCK ;ADDRESS CHECK PUSH ONTO TASK STACK
495 000336 103423 BCS 70$ ;IF CS ADDRESS CHECK FAILURE
496
497 .ENDC
498
499
500 .IFT
501
502 000340 CALL $RELOM ;RELOCATE AND MAP STACK ADDRESS
503
504 .IFF
505
506 MOV (R4)+,(R0)+ ;MOVE SAVED R4
507 MOV (R4),(R0)+ ;MOVE SAVED R5
508 MOV R3,(R0)+ ;SET SST PC WORD
509 CLR (R0)+ ;SET SST PS WORD
510
511 .IFTF
512
513 000344 012601 MOV (SP)+,R1 ;GET NUMBER OF BYTES TO TRANSFER
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-9
514 000346 024141 CMP -(R1),-(R1) ;ADJUST BY 4 BYTES (PS AND PC WORDS)
515 000350 006201 ASR R1 ;CONVERT TO WORD COUNT
516 000352 005726 TST (SP)+ ;REMOVE SST CODE FROM STACK
517 000354 005301 40$: DEC R1 ;ANY MORE PARAMETERS TO TRANSFER?
518 000356 002402 BLT 50$ ;IF LT NO
519 000360 012620 MOV (SP)+,(R0)+ ;TRANSFER PARAMETER TO TASK STACK
520 000362 000774 BR 40$ ;
521 000364 50$: ;REF LABEL
522
523 .IFT
524
525 000364 012704 177774G MOV #$STACK-4,R4 ;POINT TO SAVED PC WORD
526 000370 011420 MOV (R4),(R0)+ ;SAVE PC AT TRAP ON USER STACK
527 000372 010324 MOV R3,(R4)+ ;SET SST PC WORD
528 000374 011410 MOV (R4),(R0) ;SAVE PS AT TRAP ON USER STACK
529 000376 012714 170000 MOV #CMODE!PMODE,(R4) ;SET SST PS WORD
530
531 .IFTF
532
533 000402 RETURN ;EXIT FROM TRAP
534
535 ;
536 ; SST FAULT AT NON ZERO STACK DEPTH-FATAL SYSTEM ERROR
537 ;
538
539 000404 60$: CRASH ;CRASH SYSTEM
540
541 ;
542 ; SST CANNOT BE EFFECTED BECAUSE OF BAD TASK STACK
543 ;
544
545
546 .IF DF A$$CHK!M$$MGE
547
548 000406 012766 000020 000002 70$: MOV #S.CSST,2(SP) ;SET BAD STACK SST ABORT CODE
549
550 .ENDC
551
552
553 ;
554 ; SST CANNOT BE EFFECTED BECAUSE OF NO SST VECTOR ENTRY
555 ;
556
557 000414 016600 000002 80$: MOV 2(SP),R0 ;SET SST ABORT CODE
558
559 .IFT
560
561 000420 012706 177756G MOV #$STACK-22,SP ;RELOAD EXEC STACK POINTER
562
563 .IFF
564
565 MOV #$STACK-12,SP ;RELOAD EXEC STACK POINTER
566
567 .IFTF
568
569 000424 CALLR $ABCTK ;ABORT CURRENT TASK
570
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-10
571 ;
572 ; FAULT FROM PROTECTED LIMITS IN DRDSP OR DRQIO
573 ;
574
575 .IFT
576
577 000430 005267 000000G 90$: INC $STKDP ;CORRECT STACK DEPTH INDICATOR
578 000434 DRSTS D.RS98 ;SET DIRECTIVE STATUS
579
580 .ENDC
581
582
583 000001 .END
SSTSR MACRO M1110 22-AUG-79 07:11 PAGE 3-11
SYMBOL TABLE
A$$CHK= 000000 H.GARD 000072 KISAR7= 172356 SSTXT 000166R UISDR6= 177614
A$$CPS= 000000 H.HDLN 000002 KISDR0= 172300 SWR = 177570 UISDR7= 177616
A$$TRP= 000000 H.IPC 000016 KISDR6= 172314 S$$YSZ= 001740 V$$CTR= 001200
A.AST 000006 H.IPS 000014 KISDR7= 172316 S.CABO= 000024 V$$RSN= 000031
A.BYT 000004 H.ISP 000020 K$$CNT= 177546 S.CAST= 000022 W.BATT 000006
A.CBL 000002 H.LUN 000076 K$$CSR= 177546 S.CBPT= 000004 W.BFPD 000014
A.DQSR 177776 H.NLUN 000074 K$$IEN= 000115 S.CCRF= 000030 W.BHVR 000004
A.KSR5 177774 H.NML 000061 K$$LDC= 000001 S.CEMT= 000012 W.BLGH 000020
A.NPR 000010 H.ODVA 000022 K$$TPS= 000074 S.CFLT= 000016 W.BLPD 000016
A.PRM 000012 H.ODVL 000024 L$$ASG= 000000 S.CILI= 000010 W.BLVR 000002
CMODE = 140000 H.OVLY 000054 L$$DRV= 000000 S.CIOT= 000006 W.BNPD 000015
C$$ORE= 002000 H.PFVA 000032 MPAR = 172100 S.CLRF= 000026 W.BOFF 000012
D.RS98= ****** GX H.RCVA 000036 MPCSR = 177746 S.COAD= 000000 W.BPCB 000000
FE.CAL= 000040 H.RRVA 000062 M$$CRB= 000124 S.CSGF= 000002 W.BSIZ 000010
FE.CEX= 020000 H.SPRI 000060 M$$MGE= 000000 S.CSST= 000020 X$$DBT= 000000
FE.DRV= 000010 H.TKVA 000026 M$$NET= 000000 S.CTRP= 000014 $ABCTK= ****** GX
FE.EXP= 000200 H.TKVL 000030 M$$NT2= 000000 S.IOMG= 000032 $ACHCK= ****** GX
FE.EXT= 000001 H.VEXT 000056 N$$LDV= 000001 S.PRTY= 000034 $CRASH= ****** GX
FE.EXV= 000004 H.WND 000044 PIRQ = 177772 TPS = 177564 $DIRSV= ****** GX
FE.LSI= 000400 I$$RDN= 000000 PMODE = 030000 T.NCRE= 000006 $DQLM1= ****** GX
FE.MUP= 000002 I.AST 000022 PR0 = 000000 T.NCWF= 000004 $DQLM2= ****** GX
FE.MXT= 040000 I.ATTL= 000044 PR1 = 000040 T.NDMO= 000010 $DRLM1= ****** GX
FE.NLG= 100000 I.EFN 000003 PR4 = 000200 T.NDNR= 000000 $DRLM2= ****** GX
FE.PKT= 000100 I.FCN 000012 PR5 = 000240 T.NDSE= 000002 $EMSST 000000RG
FE.PLA= 000020 I.IOSB 000014 PR6 = 000300 T.NLDN= 000014 $FLTRP 000034RG
G$$TPP= 000000 I.LGTH= 000044 PR7 = 000340 T.NLUP= 000016 $FPPRQ 000034RG
G$$TTK= 000000 I.LNK 000000 PS = 177776 UBMPR = 170200 $FPPR7 000034RG
H$$RTZ= 000074 I.LN2 000006 P$$RTY= 000000 UDSAR0= 177660 $FPPR8 000034RG
H.CSP 000000 I.PRI 000002 P$$TPT= 000000 UDSDR0= 177620 $HEADR= ****** GX
H.CUIC 000010 I.PRM 000024 R$$DER= 000000 UISAR0= 177640 $ILINS 000034RG
H.DSW 000046 I.TCB 000004 R$$EXV= 000000 UISAR4= 177650 $IOTRP 000046RG
H.DUIC 000012 I.UCB 000010 R$$SND= 000000 UISAR5= 177652 $RELOM= ****** GX
H.EFLM 000004 KDSAR0= 172360 R$$11M= 000000 UISAR6= 177654 $SGFLT 000066RG
H.EFSV 000040 KDSDR0= 172320 R$$11S= 000000 UISAR7= 177656 $STACK= ****** GX
H.FCS 000050 KISAR0= 172340 SISDR0= 172200 UISDR0= 177600 $STKDP= ****** GX
H.FORT 000052 KISAR5= 172352 SR0 = 177572 UISDR4= 177610 $TRACE 000126RG
H.FPSA 000042 KISAR6= 172354 SR3 = 172516 UISDR5= 177612 $TRP04 000140RG
H.FPVA 000034
. ABS. 177776 000
000436 001
ERRORS DETECTED: 0
VIRTUAL MEMORY USED: 3307 WORDS ( 13 PAGES)
DYNAMIC MEMORY: 4036 WORDS ( 15 PAGES)
ELAPSED TIME: 00:00:26
[11,24]SSTSR,SY0:[11,34]SSTSR/-SP=[1,1]EXEMC/ML,[11,10]RSXMC/PA:1,SSTSR