User Tools

Site Tools


cdc:nos2.source:nam5871:cssams

CSSAMS

Table Of Contents

  • [00008] PROC CSSAMS
  • [00009] CSSAMS - ACTION MULTIPLE SEND COMMAND.
  • [00013] ACTION MULTIPLE SEND COMMAND.
  • [00035] PROC MOVE
  • [00036] PROC MOVEI
  • [00037] PROC SSTAQE
  • [00038] PROC SSBEBF
  • [00039] PROC SSBSBF
  • [00040] PROC SSBSBW
  • [00041] FUNC SSDCDA

Source Code

CSSAMS.txt
  1. *DECK CSSAMS
  2. USETEXT TEXTSS;
  3. USETEXT TEXTCS;
  4. USETEXT TXCMDCS;
  5. USETEXT TXTAPSS;
  6. USETEXT TXTSUSS;
  7. USETEXT TXTSMCS;
  8. PROC CSSAMS;
  9. # TITLE CSSAMS - ACTION MULTIPLE SEND COMMAND. #
  10. BEGIN # CSSAMS #
  11.  
  12. #
  13. ** CSSAMS - ACTION MULTIPLE SEND COMMAND.
  14. *
  15. * C. BRION 82/09/16.
  16. *
  17. * THIS PROCEDURE PROCESSES THE SEND,NPS COMMAND.
  18. *
  19. * PROC CSSAMS
  20. *
  21. * ENTRY HDRCMD - COMMAND HEADER WORD.
  22. *
  23. * EXIT NPUCB - MAY BE UPDATED FOR EACH SUPERVISED NPU.
  24. * OCB - THE OCB FOR THE COMMAND OPERATOR MAY BE UPDATED.
  25. * A TEXT MESSAGE MAY BE SENT TO THE OPERATOR.
  26. * ONE OR MORE MSG/NP SUPERVISORY MESSAGES MAY BE SENT.
  27. *
  28. #
  29.  
  30. #
  31. **** PROC CSSAMS XREF LIST
  32. #
  33. XREF
  34. BEGIN
  35. PROC MOVE; # MACREL MOVE ROUTINE #
  36. PROC MOVEI; # MACREL MOVE INDIRECT #
  37. PROC SSTAQE; # SS ACCEPT QUEUE ENTRY #
  38. PROC SSBEBF; # SS EXTRACT BIT FIELD #
  39. PROC SSBSBF; # SS STORE BIT FIELD #
  40. PROC SSBSBW; # SS SET BIT IN WORD #
  41. FUNC SSDCDA; # SS CONVERT DIS TO ASCII #
  42. END
  43.  
  44. #
  45. ****
  46. #
  47.  
  48. DEF N1SENDL$ # 4 #;
  49. DEF N2SENDL$ # 5 #;
  50. DEF US$ # X"1F" #;
  51.  
  52. #
  53. * ITEM LIST
  54. #
  55.  
  56. ITEM ORD I; # OCB ORDINAL #
  57. ITEM NORD I; # NPU ORDINAL #
  58. ITEM AORD I; # CHAR CONV VAR #
  59. ITEM ABIT I;
  60. ITEM DBIT I;
  61. ITEM DORD I;
  62. ITEM I I; # LOOP VAR #
  63. ITEM SCHAR U; # CHARACTER TEMP CELL #
  64. ITEM BSYIX I; # BEGINNING SYN INDEX VAR #
  65. ITEM Y I; # LOCAL WORKING VAR #
  66.  
  67.  
  68. #
  69. * FLG$WORD - A BASED ARRAY THAT POINTS TO THE PENDING SEND BIT
  70. * MAPS IN THE NPUCB-S.
  71. #
  72. BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
  73. BEGIN
  74. ITEM FW$WORD I(00,00,60);
  75. END
  76.  
  77.  
  78. #
  79. * FROMNOP - HEADER TEXT PREFIX FOR HOST BROADCAST MSG.
  80. #
  81.  
  82. ARRAY FROMNOP [00:00] S(1);
  83. BEGIN
  84. ITEM FRO$TXT C(00,00,10) = ["FROM NOP.."];
  85. END
  86.  
  87. #
  88. * THIS MESSAGE IS SENT WHEN NO SEND WAS ACTIONED BECAUSE THERE
  89. * ARE NO NPUS CURRENTLY BEING SUPERVISED.
  90. #
  91.  
  92. DEF LNONPUS # 04 #; # NUMBER OF WORD IN MESSAGE #
  93. ARRAY NONPUS [00:00] S(LNONPUS);
  94. BEGIN
  95. ITEM NNP$MSG1 C(00,00,20) = ["NO NPUS ARE BEING SU"];
  96. ITEM NNP$MSG2 C(02,00,10) = ["PERVISED"];
  97. ITEM NNP$ZFIL I(03,00,60) = [0];
  98. END
  99.  
  100.  
  101.  
  102. #
  103. * MAIN PROCEDURE STARTS HERE.
  104. #
  105.  
  106. ORD = HDR$OPORD[0]; # SET OCB ORDINAL #
  107.  
  108. ABHWORD[1] = 0; # CLEAR ABH AND WC WORDS #
  109. WCB$WORD[1] = 0;
  110. PFCSFC[1] = MSGNP; # SET UP OUTGOING SM AREA #
  111. ABHABT[1] = APPSUP;
  112. ABHBT[1] = APPSUP;
  113. #
  114. * SET UP THE ABH WORD FOR OUTGOING SM (MSG/NP).
  115. #
  116.  
  117. PFCSFC[1] = MSGNP;
  118. ABHABT[1] = APPSUP;
  119. ABHBT[1] = APPSUP;
  120. ABHACT[1] = ACTCSNP$;
  121. ABHTLC[1] = 2;
  122.  
  123. #
  124. * SET THE OUTGOING SM IDENTIFIER.
  125. #
  126.  
  127. WCB$SMID[1] = SMID"MSGNP";
  128.  
  129. #
  130. * SET UP THE ASCII PORTION OF THE OUTGOING SM BY CONVERTING
  131. * THE HEADER TEXT AND MESSAGE TEXT TO ASCII INTO THE SM.
  132. #
  133.  
  134. AORD = 0;
  135. ABIT = 16;
  136. DORD = 0;
  137. DBIT = 0;
  138.  
  139. FOR I = 1 STEP 1 UNTIL 10
  140. DO
  141. BEGIN
  142. SSBEBF(FRO$TXT[0],DORD,DBIT,6,SCHAR);
  143. SCHAR = SSDCDA(SCHAR);
  144. SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
  145. END
  146.  
  147. #
  148. * DETERMINE POSITION OF MSG TEXT IN COMMAND BLOCK.
  149. #
  150.  
  151. BSYIX = HDR$TXWCNT[0] + 1;
  152. FOR I = BSYIX STEP 1 WHILE PAR$PCODE[I] NQ "MS0"
  153. DO
  154. BEGIN
  155. END
  156.  
  157. DORD = I + 1;
  158.  
  159. #
  160. * MOVE MSG TEXT INTO SM BODY AFTER ASCII CONVERSION.
  161. #
  162.  
  163. FOR Y = 1 STEP 1 UNTIL PAR$MSGCL[I]
  164. DO
  165. BEGIN
  166. SSBEBF(PARMS[0],DORD,DBIT,6,SCHAR);
  167. SCHAR = SSDCDA(SCHAR);
  168. SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
  169. END
  170.  
  171. SCHAR = US$;
  172. SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
  173.  
  174. #
  175. * SET THE TEXT LENGTH OF SM IN CHARACTERS.
  176. #
  177.  
  178. ABHTLC[1] = ABHTLC[1] + PAR$MSGCL[I] + 11;
  179. WCB$WC[1] = ((ABHTLC[1] * 8)/60) + 3;
  180.  
  181. #
  182. * SAVE THE SM IN THE OPERATOR CONTROL BLOCK.
  183. #
  184. OC$WC[ORD] = WCB$WC[1] - 2;
  185. OC$TLC[ORD] = ABHTLC[1];
  186.  
  187. MOVEI(OC$WC[ORD],LOC(CSSM[1]),LOC(OC$SM[ORD]));
  188.  
  189. #
  190. * SEARCH THE NPUCB ARRAY FOR EACH NPUCB THAT IS SUPERVISED AND
  191. * NOT BUSY WITH ANOTHER BROADCAST COMMAND.
  192. #
  193.  
  194. FOR NORD = 0 STEP 1 UNTIL CSNPCNT - 1
  195. DO
  196. BEGIN
  197. IF NPU$STAT[NORD] EQ SUPSTAT"SUP" AND
  198. (ORD EQ HOPORD$ OR ORD EQ NPU$CNOP[NORD])
  199. THEN
  200. BEGIN
  201. P<FLG$WORD> = LOC(NPU$SDFLGS[NORD]);
  202. SSBSBW(FLG$WORD,ORD);
  203.  
  204. #
  205. * INCREMENT THE NUMBER OF SEND NPUS AFFECTED BY THIS COMMAND.
  206. #
  207.  
  208. OC$NCNT[ORD] = OC$NCNT[ORD] + 1;
  209.  
  210.  
  211. #
  212. * IF THE NPU IS NOT BUSY WITH ANOTHER SEND COMMAND, THEN SEND
  213. * THEN MESSAGE.
  214. #
  215.  
  216. IF NPU$OPSD[NORD] EQ 0
  217. THEN
  218. BEGIN
  219.  
  220.  
  221. #
  222. * SET THE SEND OPERATOR IN THE NPUCB.
  223. #
  224.  
  225. NPU$OPSD[NORD] = ORD;
  226.  
  227.  
  228. #
  229. * SEND THE MSG/NP SM
  230. #
  231.  
  232. ABHDN[1] = NPU$NID[NORD];
  233. ABHSN[1] = NPU$HID[NORD];
  234. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
  235. END
  236. END
  237.  
  238. END
  239.  
  240. #
  241. * IF THE AFFECTED NPU COUNT IS ZERO THEN THERE ARE NO NPUS BEING
  242. * SUPERVISED. SEND A MESSAGE INDICATING SO AND CAUSE A *READY*
  243. * TO GO TO OPERATOR. #
  244. #
  245.  
  246.   IF OC$NCNT[ORD] EQ 0
  247.   THEN
  248.   BEGIN
  249.   WCB$WORD[1] = LNONPUS + 2;
  250.   WCB$SMID[1] = SMID"TTEXT";
  251.   WCB$IAF[1] = TRUE;
  252.   ABHWORD[1] = 0;
  253.   ABHADR[1] = HOPORD$;
  254.  
  255.   SSTAQE(P<CNQ>,WCBUF[1],ABH[1],NONPUS);
  256.   END
  257.  
  258.  
  259.   WCB$WORD[1] = 0;
  260.   ABHWORD[1] = 0;
  261.  
  262. #
  263. * SEND THE COMMAND TEXT TO THE NETWORK LOG FILE VIA AN EVENT.
  264. #
  265.  
  266.   P<MSCMD> = LOC(CMD$TEXT[0]);
  267.   CMD$TNAM[0] = OC$TNAM[ORD];
  268.   MOVE(HDR$TXWCNT[0],PARMS[0],MSCMD[0]);
  269.   WCB$SMID[1] = SMID"CMDTXT";
  270.   WCB$WC[1] = HDR$TXWCNT[0] + 4;
  271.   SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CMDLINE[0]);
  272.  
  273.   END #CSSAMS#
  274.  TERM
cdc/nos2.source/nam5871/cssams.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator