User Tools

Site Tools


cdc:nos2.source:nam5871:csschb

CSSCHB

Table Of Contents

  • [00007] PROC CSSCHB
  • [00008] CSSCHB - COMPLETE HOST BROADCAST
  • [00013] COMPLETE HOST BROADCAST.
  • [00040] PROC MOVEI
  • [00041] PROC SSBCBW
  • [00042] PROC SSBFPB
  • [00043] PROC SSTAQE

Source Code

CSSCHB.txt
  1. *DECK CSSCHB
  2. USETEXT TEXTCS;
  3. USETEXT TEXTSS;
  4. USETEXT TXTSMCS;
  5. USETEXT TXTAPSS;
  6. USETEXT TXTSUSS;
  7. PROC CSSCHB;
  8. # TITLE CSSCHB - COMPLETE HOST BROADCAST #
  9.  
  10. BEGIN #CSSCHB#
  11.  
  12. #
  13. ** CSSCHB - COMPLETE HOST BROADCAST.
  14. *
  15. * C. BRION 82/04/20.
  16. *
  17. * THIS PROCEDURE PROCESSES THE NORMAL AND ABNORMAL RESPONSES TO
  18. * THE HOST BROADCAST SET OF SMS.
  19. *
  20. * PROC CSSCHB
  21. *
  22. * ENTRY
  23. * 1. WCBWORD[0] = WORD COUNT BUFFER.
  24. * 2. ABHWORD[0] = APPLICATION BLOCK HEADER OF SM.
  25. * 3. MSGBUF[0] = BODY OF MSG SM RESPONSE.
  26. *
  27. * EXIT
  28. * 1. IF ABNORMAL RESPONSE -- SEND IT OFF TO THE EVENT QUEUE.
  29. * 2. IF NORMAL RESPONSE -- SEND TERMINAL TEXT TO THE CONNECTION
  30. * TRAFFIC QUEUE INDICATING MESSAGE WAS SENT.
  31. *
  32. #
  33.  
  34. #
  35. **** PROC CSSCHB XREF LIST
  36. #
  37.  
  38. XREF
  39. BEGIN
  40. PROC MOVEI; # MACREL-MOVE INDIRECT #
  41. PROC SSBCBW; # SS-CLEAR BIT IN WORD #
  42. PROC SSBFPB; # FIND PRIORITY BIT #
  43. PROC SSTAQE; # SS-ACCEPT QUEUE ENTRY #
  44. END
  45. #
  46. ****
  47. #
  48.  
  49.  
  50. ITEM FOUND B; # NPUCB FOUND INDICATOR #
  51. ITEM I U; # LOOP INDUCTION VAR #
  52. ITEM NORD U; # NPUCB ORDINAL #
  53. ITEM OORD U; # OCB ORDINAL #
  54.  
  55. #
  56. * FLG$WORD - BASED ARRAY THAT POINTS TO THE PENDING SEND REQUEST
  57. * BIT MAPS IN THE NPUCB-S.
  58. #
  59. BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
  60. BEGIN
  61. ITEM FW$WORD I(00,00,60);
  62. END
  63.  
  64. #
  65. * HBSENT - MESSAGE FOR MESSAGE SENT.
  66. #
  67.  
  68. ARRAY HBSENT [00:00] S(3);
  69. BEGIN
  70. ITEM HBS$TX0 C(00,00,05) =["NPU: "];
  71. ITEM HBS$NP C(00,30,07);
  72. ITEM HBS$TXT C(01,12,14) = [", MESSAGE SENT"];
  73. ITEM HBS$ZER U(02,36,24) =[0];
  74. END
  75.  
  76.  
  77.  
  78.  
  79. WCB$WORD[1] = WCB$WORD[0]; # CLEAR ENTRY WORDS #
  80. ABHWORD[1] = ABHWORD[0];
  81. FOUND = FALSE; # INIT NPUCB FOUND FLAG #
  82.  
  83. #
  84. * SEARCH THE NPUCB ARRAY FOR A NPUCB WITH MATCHING NODES TO THE
  85. * INCOMING RESPONSE SM.
  86. #
  87.  
  88. FOR I = 0 STEP 1 WHILE (NOT FOUND AND I LS CSNPCNT)
  89. DO
  90. BEGIN
  91. IF (ABHDN[0] EQ NPU$HID[I] AND ABHSN[0] EQ NPU$NID[I])
  92. THEN
  93. BEGIN
  94. FOUND = TRUE;
  95. NORD = I;
  96. END
  97. END
  98.  
  99.  
  100.  
  101. #
  102. * IF NPUCB FOUND, THEN CHECK TO SEE IF THE COMMAND IS STILL ACTIVE
  103. * BY CHECKING THE SEND OPERATOR OF THE NPUCB. IF OUT OF RANGE, THEN
  104. * THE COMMAND WAS PREMATURELY ENDED - JUST CLEAR OUT THE NPUCB.
  105. #
  106.  
  107. IF FOUND
  108. THEN
  109. BEGIN
  110. IF NPU$OPSD[NORD] GR MAXACN$
  111. THEN
  112. NPU$OPSD[NORD] = 0;
  113. ELSE
  114.  
  115. #
  116. * SEND COMMAND STILL ACTIVE FOR THIS NPU. CLEAR THE NPUCB
  117. * AND CHECK THE NUMBER OF NPUS OUTSTANDING FOR THE SEND
  118. * COMMAND. IF COMMAND MULTIPLE AND STILL HAS OUTSTANDING
  119. * NPUS TO RESPOND, THEN DO NOT CLEAR OCB BUT DECREMENT
  120. * NUMBER OF SEND NPUS IN THE OCB.
  121. #
  122. BEGIN
  123. OORD = NPU$OPSD[NORD];
  124. NPU$OPSD[NORD] = 0;
  125. OC$CNPU[OORD] = 0;
  126. OC$NCNT[OORD] = OC$NCNT[OORD] - 1;
  127. P<FLG$WORD> = LOC(NPU$SDFLGS[NORD]);
  128. SSBCBW(FLG$WORD,OORD);
  129.  
  130. #
  131. * IF ABNORMAL RESPONSE, SEND SUPERVISION EVENT.
  132. #
  133.  
  134. IF EB[0]
  135. THEN
  136. BEGIN
  137. IF SFC[0] EQ LI
  138. THEN
  139. WCB$SMID[1] = SMID"MSGLIA";
  140. ELSE IF SFC[0] EQ TE
  141. THEN
  142. WCB$SMID[1] = SMID"MSGTEA";
  143. ELSE
  144. WCB$SMID[1] = SMID"MSGLLA";
  145. ABHCN[1] = OORD;
  146. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CSSM[0]);
  147. END
  148. ELSE
  149.  
  150. #
  151. * SEND COMPLETED MESSAGE TO OPERATOR.
  152. #
  153. BEGIN
  154. HBS$NP[0] = NPU$NAME[NORD];
  155. WCB$WORD[1] = 0;
  156. ABHWORD[1] = 0;
  157. WCB$SMID[1] = SMID"TTEXT";
  158. WCB$IAF[1] = TRUE;
  159.  
  160. #
  161. * IF MORE SEND NPUS NEED TO RESPOND, SET INPUT ALLOWED FALSE.
  162. * OTHERWISE, CLEAR OCB AND SET IAF TRUE.
  163. #
  164.  
  165. IF OC$NCNT[OORD] NQ 0
  166. THEN
  167. WCB$IAF[1] = FALSE;
  168. ELSE
  169. OC$UVERB[OORD] = 0;
  170.  
  171. WCB$WC[1] = 5;
  172. ABHADR[1] = OORD;
  173. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],HBSENT[0]);
  174. END
  175.  
  176. END
  177.  
  178. #
  179. * IF THERE ARE MORE SENDS PENDING, GE AHEAD AND SEND IT OUT.
  180. #
  181. IF NPU$SDFLGS[NORD] NQ 0
  182. THEN
  183. BEGIN
  184. P<FLG$WORD> = LOC(NPU$SDFLGS[NORD]);
  185. SSBFPB(FLG$WORD,OORD);
  186. NPU$OPSD[NORD] = OORD;
  187.  
  188. WCB$WORD[1] = OC$WC[OORD] + 2;
  189. ABHWORD[1] = OC$TLC[OORD];
  190. ABHABT[1] = APPSUP;
  191. ABHBT[1] = APPSUP;
  192. ABHDN[1] = NPU$NID[NORD];
  193. ABHSN[1] = NPU$HID[NORD];
  194. ABHACT[1] = ACTCSNP$;
  195.  
  196. MOVEI(OC$WC[OORD],LOC(OC$SM[OORD]),LOC(CSSM[1]));
  197. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
  198. END
  199. END
  200.  
  201. END #CSSCHB#
  202.  
  203. TERM
cdc/nos2.source/nam5871/csschb.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator