User Tools

Site Tools


cdc:nos2.source:nam5871:csstcm

CSSTCM

Table Of Contents

  • [00008] PROC CSSTCM
  • [00009] CSSTCM - TERMINATE A COMMAND
  • [00014] TERMINATE A COMMAND.
  • [00043] PROC SSBCBW
  • [00044] PROC SSTAQE

Source Code

CSSTCM.txt
  1. *DECK CSSTCM
  2. USETEXT TEXTSS;
  3. USETEXT TEXTCS;
  4. USETEXT TXTSMCS;
  5. USETEXT TXCMDCS;
  6. USETEXT TXTAPSS;
  7. USETEXT TXTSUSS;
  8. PROC CSSTCM;
  9. # TITLE CSSTCM - TERMINATE A COMMAND #
  10.  
  11. BEGIN
  12.  
  13. #
  14. ** CSSTCM - TERMINATE A COMMAND.
  15. *
  16. * C. BRION 82/05/06.
  17. *
  18. * THIS PROCEDURE PROCESSES THE BREAK AS A COMMAND TO TERMINATE THE
  19. * CURRENT COMMAND.
  20. *
  21. * PROC CSSTCM
  22. *
  23. * ENTRY:
  24. *
  25. * HDRCMD = THE COMMAND HEADER WORD.
  26. * ABH = THE ROUTED COMMAND HEADER WORD THAT CONTAINS THE ORDINAL
  27. * OF THE OPERATOR THAT ENTERED THE BREAK.
  28. *
  29. * EXIT:
  30. *
  31. * THE OCB AND AFFECTED NPUCBS WILL BE CLEARED AND AN EVENT MAY BE
  32. * BE SENT TO THE EVENT QUEUE OR A NULL TERMINAL TEXT ENTRY MAY BE
  33. * SENT TO THE CONNECTION TRAFFIC QUEUE.
  34. *
  35. #
  36.  
  37. #
  38. **** PROC CSSTCM XREF LIST
  39. #
  40.  
  41. XREF
  42. BEGIN
  43. PROC SSBCBW; # SS-CLEAR BIT IN WORD #
  44. PROC SSTAQE; # SS-ACCEPT QUEUE ENTRY #
  45. END
  46.  
  47. #
  48. ****
  49. #
  50.  
  51. ITEM OORD U; # OCB ORDINAL VAR #
  52. ITEM I;
  53. ITEM DVAR;
  54.  
  55.  
  56. #
  57. * FLG$WORD - THIS BASED ARRAY IS USED TO POINT TO THE PENDING
  58. * COMMAND REQUEST WORDS IN THE NPUCB-S.
  59. #
  60. BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
  61. BEGIN
  62. ITEM FW$WORD I(00,00,60);
  63. END
  64.  
  65.  
  66.  
  67. WCB$WORD[1] = 0;
  68. ABHWORD[1] = 0;
  69. OORD = HDR$OPORD[0];
  70. ABHADR[1] = OORD; # SET OCB ORDINAL #
  71. WCB$WC[1] = 2;
  72. WCB$IAF[1] = TRUE;
  73.  
  74. #
  75. * IF THE CURRENT COMMAND IN PROGRESS IS A STATUS COMMAND, CLEAR
  76. * THE NPUCB(S) AFFECTED, CLEAR THE OCB AND SEND A STATUS DONE
  77. * EVENT TO THE EVENT QUEUE.
  78. * THE NPUCB IS SET SO THAT AFTER THE STATUS IS FINISHED, THE
  79. * PROC CSSCSR (COMPLETE STATUS REQUEST) WILL SEE A OCB OUT
  80. * OF RANGE AND THEN KNOW THAT THE OPERATOR TERMINATED THE COM-
  81. * MAND.
  82. #
  83.  
  84. IF OC$VERB[OORD] EQ "ST0"
  85. THEN
  86. BEGIN
  87. P<FLG$WORD> = LOC(NPU$STFLGS[0]);
  88.  
  89. FOR I=0 STEP 1 WHILE I LS CSNPCNT
  90. DO
  91. BEGIN
  92. SSBCBW(FLG$WORD[I],OORD);
  93. END
  94.  
  95. IF OC$CNPU[OORD] NQ 0
  96. THEN
  97. BEGIN
  98. NPU$OPST[OC$CNPU[OORD]] = MAXACN$ + 1;
  99. END
  100.  
  101. OC$NCNT[OORD] = 0; #CLEAR AFFECTED NPU COUNT #
  102. OC$UVERB[OORD] = 0;
  103. WCB$SMID[1] = SMID"STUFIN";
  104. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CSSM[1]);
  105. END
  106.  
  107. #
  108. * IF THE CURRENT COMMAND IS A SEND COMMAND, LOCATE ALL NPUCBS
  109. * THAT MAY BE INVOLVED AND MARK THE SEND OPERATOR ORDINAL OUT
  110. * OF RANGE SO AS TO CAUSE THE NPU RESPONSE TO BE DISCARDED BY
  111. * THE CSSCHB ROUTINE WHEN IT ARRIVES. ISSUE A NULL TERMINAL TEXT
  112. * IN ORDER TO CAUSE THE READY.. MESSAGE TO BE ISSUED. CLEAR THE
  113. * SEND NPU COUNT OF THE OCB.
  114. #
  115.  
  116. IF (OC$VERB[OORD] EQ "SE0" OR
  117. OC$VERB[OORD] EQ "SE1")
  118. THEN
  119. BEGIN
  120. P<FLG$WORD> = LOC(NPU$SDFLGS[0]);
  121. FOR I = 0 STEP 1 UNTIL (CSNPCNT - 1)
  122. DO
  123. BEGIN
  124. SSBCBW(FLG$WORD[I],OORD);
  125. IF NPU$OPSD[I] EQ OORD
  126. THEN
  127. BEGIN
  128. NPU$OPSD[I] = MAXACN$ + 1;
  129. END
  130. END
  131. OC$NCNT[OORD] = 0;
  132. OC$CNPU[OORD] = 0;
  133. OC$UVERB[OORD] = 0;
  134. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],CSSM[1]);
  135. END
  136.  
  137.  
  138. #
  139. * IF THE CURRENT CMD IS A TEST,REQUEST, THEN CLEAR THE NPUCB AND THE
  140. * OCB OF THE REQUEST IN A MANNER THAT WILL ACCOUNT FOR THE RESPONSE
  141. * BACK FROM THE NPU.
  142. #
  143.  
  144. IF OC$VERB[OORD] EQ "TS0"
  145. THEN
  146. BEGIN
  147. P<FLG$WORD> = LOC(NPU$OVFLGS[OC$CNPU[OORD]]);
  148. SSBCBW(FLG$WORD,OORD);
  149.  
  150. OC$CNPU[OORD] = 0;
  151. OC$UVERB[OORD] = 0;
  152. END
  153.  
  154.  
  155. DVAR = 1;
  156. END # CSSTCM #
  157. TERM
cdc/nos2.source/nam5871/csstcm.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator