User Tools

Site Tools


cdc:nos2.source:nam5871:cssasd

CSSASD

Table Of Contents

  • [00008] PROC CSSASD
  • [00009] CSSASD - ACTION SEND COMMAND
  • [00014] ACTION SEND COMMAND.
  • [00043] PROC CSSAMS
  • [00044] PROC MOVE
  • [00045] PROC MOVEI
  • [00046] PROC SSTAQE
  • [00047] PROC SSBEBF
  • [00048] PROC SSBSBF
  • [00049] PROC SSBSBW
  • [00050] FUNC SSDCDA

Source Code

CSSASD.txt
  1. *DECK CSSASD
  2. USETEXT TEXTCS;
  3. USETEXT TEXTSS;
  4. USETEXT TXCMDCS;
  5. USETEXT TXTAPSS;
  6. USETEXT TXTSUSS;
  7. USETEXT TXTSMCS;
  8. PROC CSSASD;
  9. # TITLE CSSASD - ACTION SEND COMMAND #
  10.  
  11. BEGIN
  12.  
  13. #
  14. ** CSSASD - ACTION SEND COMMAND.
  15. *
  16. * C. BRION 82/05/24.
  17. *
  18. * THIS PROCEDURE PROCESSES THE SEND COMMAND.
  19. *
  20. * PROC CSSASD
  21. *
  22. * ENTRY
  23. * 1. HDRCMD[0] = COMMAND HEADER WORD.
  24. * 2. PARMS[0] = COMMAND BLOCK CONTAINING THE ORIGINAL TYPEIN,
  25. * SYNTAX PARMETER LIST, AND ADDRESS LIST.
  26. *
  27. * EXIT
  28. * 1. IF BROADCAST ALREADY IN PROGRESS -- SEND TERMINAL TEXT TO
  29. * THE CONNECTION TRAFFIC QUEUE INDICATING SO.
  30. * 2. IF UNABLE TO SEND TO DESTINATION -- SEND TERMINAL TEXT TO
  31. * CONNECTION TRAFFIC QUEUE INDICATING SO.
  32. * 3. IF O.K. --
  33. * A. COMMAND TEXT SENT TO EVENT QUEUE.
  34. * B. MSG SENT TO OUTGOING TRAFFIC QUEUE.
  35. #
  36.  
  37. #
  38. **** PROC CSSASD XREF LIST.
  39. #
  40.  
  41. XREF
  42. BEGIN
  43. PROC CSSAMS; # ACTION MULTIPLE SEND COMMAND#
  44. PROC MOVE; # MACREL-MOVE MEMORY #
  45. PROC MOVEI; # MACREL-MOVE INDIRECT #
  46. PROC SSTAQE; # SS-ACCEPT QUEUE ENTRY #
  47. PROC SSBEBF; # SS-EXTRACT BIT FIELD #
  48. PROC SSBSBF; # SS-STORE BIT FIELD #
  49. PROC SSBSBW; # SS-SET BIT IN WORD #
  50. FUNC SSDCDA; # SS-DISPLAY TO ASCII #
  51. END
  52. #
  53. ****
  54. #
  55.  
  56. DEF BADNOR$ #99#; # INVALID NPU ORDINAL INDEX#
  57. DEF US$ #X"1F"#; # HEX NUM FOR -US- CHAR #
  58. ITEM ELMINDX U; # ELEMENT INDEX INTO PARMS #
  59. ITEM LLAINDX U; # LLINK ADDRESS PARMS INDEX#
  60. ITEM BEGAPIX U; # START ADDR LIST INDEX #
  61. ITEM BEGSYIX U; # START SYNTAX LIST INDEX #
  62. ITEM FINAPIX U; # LAST ADDR LIST INDEX #
  63. ITEM DONE B; # FINISH INDICATOR #
  64. ITEM NORNUM U; # NUMBER NPU ORDINALS #
  65. ITEM NOR1INDX U; # NOR 1 INDEX LOCAL VAR #
  66. ITEM NOR2INDX U; # NOR 2 INDEX LOCAL VAR #
  67. ITEM NORD1 U; # NOR 1 LOCAL VAR #
  68. ITEM NORD2 U; # NOR 2 LOCAL VAR #
  69. ITEM NPUORD U; # NPU ORDINAL #
  70. ITEM NORINDX U; # ACTIVE NOR INDEX #
  71. ITEM DORD U; # MOVE VARIABLES #
  72. ITEM DBIT U;
  73. ITEM AORD U;
  74. ITEM ABIT U;
  75. ITEM SCHAR U;
  76. ITEM I,Y U; # LOOP VARS #
  77. ITEM DVAR U;
  78.  
  79.  
  80. #
  81. * FLG$WORD - BASED ARRAY THAT POINTS TO THE SEND PENDING BIT
  82. * MAP IN THE NPUCB-S.
  83. #
  84. BASED ARRAY FLG$WORD [00:00] S(NPCBSZ$);
  85. BEGIN
  86. ITEM FW$WORD I(00,00,60);
  87. END
  88.  
  89.  
  90. #
  91. * NOBRCAST - MESSAGE FOR INVALID LLINK ELEMENT BROADCAST.
  92. #
  93.  
  94. ARRAY NOBRCAST [00:00] S(5);
  95. BEGIN
  96. ITEM NOB$TXT1 C(00,00,20) = ["CANNOT BROADCAST TO "];
  97. ITEM NOB$TXT2 C(02,00,22) = ["HOST-HOST LOGICAL LINK"];
  98. ITEM NOB$ZERO U(04,12,48) = [0];
  99. END
  100.  
  101. #
  102. * NODENOSUP - MESSAGE FOR UNSUPERVISED TERMINAL NODE.
  103. #
  104.  
  105. ARRAY NODENOSUP [00:00] S(5);
  106. BEGIN
  107. ITEM NOD$TXT1 C(00,00,23) =["TERMINAL NODE OF LLINK "];
  108. ITEM NOD$LLNAM C(02,18,07); #LLINK NAME#
  109. ITEM NOD$TXT2 C(03,00,15) = [" NOT SUPERVISED"];
  110. ITEM NOD$ZERO U(04,30,30) = [0];
  111. END
  112.  
  113.  
  114. #
  115. * FROMNOP - MESSAGE ARRAY FOR FROM NOP.. PREFIX .
  116. #
  117.  
  118. ARRAY FROMNOP [00:00] S(1);
  119. BEGIN
  120. ITEM FRO$TXT C(00,00,10) = ["FROM NOP.."];
  121. END
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. #
  130. * INITIALIZE INDICES, ENTRY WORDS.
  131. #
  132.  
  133. WCB$WORD[1] = 0;
  134. ABHWORD[1] = 0;
  135. ELMINDX = HDR$TXWCNT[0] + 2;
  136. BEGAPIX = HDR$TXWCNT[0] + HDR$SPCNT[0];
  137. #
  138. * DETERMINE IF MULTIPLE SEND COMMAND. IF SO CALL PROC *CSSAMS*.
  139. #
  140.  
  141. IF PAR$PCODE[ELMINDX] EQ "NPS"
  142. THEN
  143. BEGIN
  144. CSSAMS;
  145. GOTO ENDEXIT;
  146. END
  147.  
  148.  
  149. #
  150. * DETERMINE THE NPU ORDINAL FOR THE DESTINATION TO SEND THIS
  151. * MESSAGE.
  152. #
  153.  
  154. FOR I = BEGAPIX STEP 1 WHILE PAR$PCODE[I] NQ "NOR"
  155. DO
  156. BEGIN
  157. END
  158.  
  159. NORINDX = I;
  160. NPUORD = PAR$ORD[NORINDX];
  161.  
  162.  
  163. #
  164. * CHECK IF SEND ON LLINK. IF SO, CHECK IF ATTEMPT ON HOST TO HOST
  165. * LLINK. IF SO, NOT ALLOWED. SEND ERROR MESSAGE TO OPERATOR.
  166. #
  167.  
  168. IF PAR$PCODE[ELMINDX] EQ "LL0"
  169. THEN
  170. BEGIN
  171. LLAINDX = HDR$TXWCNT[0] + HDR$SPCNT[0]+ 1;
  172. IF PAR$LLTYPE[LLAINDX]
  173. THEN
  174. BEGIN
  175. WCB$SMID[1] = SMID"TTEXT";
  176. WCB$IAF[1] =TRUE;
  177. ABHADR[1] = HDR$OPORD[0];
  178. WCB$WC[1] = 7;
  179. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],NOBRCAST[0]);
  180. GOTO ENDEXIT;
  181. END
  182.  
  183. #
  184. * NOT A HOST TO HOST LLINK, CONTINUE BY REFINING WHICH NPU ORDINAL
  185. * TO USE TO SEND THE BRAODCAST TO.
  186. #
  187. FINAPIX = BEGAPIX + HDR$APCNT[0] - 1;
  188. DONE = FALSE;
  189. NORNUM = 0;
  190. NOR1INDX = 0;
  191. NOR2INDX = 0;
  192.  
  193. #
  194. * SEARCH THE ADDRESS PARAMETER LIST OF PARMS FOR THE NPU ORDINALS
  195. * (NOR). MAXIMUM NORS IS TWO.
  196. #
  197.  
  198. FOR I = BEGAPIX STEP 1 WHILE NOT DONE
  199. AND I LQ FINAPIX
  200. DO
  201. BEGIN
  202. IF PAR$PCODE[I] EQ "NOR"
  203. THEN
  204. BEGIN
  205. IF NORNUM EQ 0
  206. THEN
  207. BEGIN
  208. NORNUM = 1;
  209. NOR1INDX = I;
  210. NORD1 = PAR$ORD[I];
  211. END
  212. ELSE
  213. BEGIN
  214. DONE = TRUE;
  215. NORNUM = 2;
  216. NOR2INDX = I;
  217. NORD2 = PAR$ORD[I];
  218. END
  219. END
  220. END
  221.  
  222. #
  223. * THE NPU ORDINALS FOR THE COMMAND HAVE BEEN FOUND.
  224. * DETERMINE WHICH IS TO BE USED. THE NPU ORDINAL OF THE NPU WITH
  225. * THE SAME NODE ID AS THE TERMINAL NODE ID OF THE LLINK ADDRESS
  226. * PARAMETER OF THE COMMAND SHOULD BE USED.
  227. #
  228.  
  229. NPUORD = BADNOR$;
  230. IF NPU$NID[NORD1] NQ PAR$LLNID2[NOR1INDX + 1]
  231. THEN
  232. BEGIN
  233. PAR$PCODE[NOR1INDX] = " "; # REMOVE NOR #
  234. PAR$PCODE[NOR1INDX + 1] = " "; # REMOVE LLA #
  235.  
  236. #
  237. * FIRST NPU ORDINAL NOT THE ONE. CHECK FOR SECOND.
  238. #
  239.  
  240. IF NORNUM EQ 2
  241. THEN
  242. BEGIN
  243. IF NPU$NID[NORD2] EQ PAR$LLNID2[NOR2INDX + 1]
  244. THEN
  245. NPUORD= NORD2;
  246. END
  247. END
  248. ELSE
  249. NPUORD = NORD1; # FIRST NPU ORDINAL OK #
  250.  
  251. #
  252. * IF GOOD NPU NOT FOUND, SEND NO SUPERVISED TERMINAL NODE
  253. * MESSAGE TO OPERATOR.
  254. #
  255.  
  256. IF NPUORD EQ BADNOR$
  257. THEN
  258. BEGIN
  259. WCB$IAF[1] = TRUE;
  260. WCB$SMID[1] = SMID"TTEXT";
  261. WCB$WC[1] = 7;
  262. ABHADR[1] = HDR$OPORD[0];
  263. SSTAQE(P<CNQ>,WCBUF[1],ABH[1],NODENOSUP[0]);
  264. GOTO ENDEXIT;
  265. END
  266.  
  267. END
  268.  
  269. #
  270. * SET UP BROADCAST SM ENTRY AND SM BODY.
  271. #
  272.  
  273. PFCSFC[1] = 0;
  274. PFC[1] = MSG;
  275.  
  276. #
  277. * DETERMINE WHICH SM (SFC) BY EXAMINATION OF WHICH ELEMENT WAS
  278. * SPECIFIED IN THE COMMAND. EACH ELEMENT TYPE WARRANTS DIFFERENT
  279. * SM SETUP AND CHARACTER TRANSLATION/MOVE ORDINALS TO MOVE THE
  280. * BROADCAST TEXT INTO THE SM.
  281. #
  282.  
  283. IF PAR$PCODE[ELMINDX] EQ "LI0" # SEND,LI= #
  284. THEN
  285. BEGIN
  286. SFC[1] = LI;
  287. MSGP[1] = PAR$ELADDR[NORINDX + 1]; # SET PORT NUMBER #
  288. ABHTLC[1] = 4;
  289. AORD = 0;
  290. ABIT = 32;
  291. WCB$SMID[1] = SMID"MSGLI";
  292. END
  293.  
  294. ELSE IF PAR$PCODE[ELMINDX] EQ "LL0" # SEND,LL= #
  295. THEN
  296. BEGIN
  297. SFC[1] = LL;
  298. MSGN1[1] = PAR$LLNID1[NORINDX + 1];
  299. MSGN2[1] = PAR$LLNID2[NORINDX + 1]; # LLINK NODE NUMBERS #
  300. ABHTLC[1] = 4;
  301. AORD = 0;
  302. ABIT = 32;
  303. WCB$SMID[1] = SMID"MSGLL";
  304. END
  305.  
  306. ELSE IF PAR$PCODE[ELMINDX] EQ "NP0" #SEND,NP= #
  307. THEN
  308. BEGIN
  309. SFC[1] = NP;
  310. ABHTLC[1] = 2;
  311. AORD = 0;
  312. ABIT = 16;
  313. WCB$SMID[1] = SMID"MSGNP";
  314. END
  315.  
  316. ELSE # SEND, TE= #
  317. BEGIN
  318. SFC[1] = TE;
  319. #
  320. * CONVERT TERMINAL NAME AND MOVE INTO MSG/TE SM .
  321. #
  322.  
  323. DORD = ELMINDX;
  324. DBIT = 0;
  325. AORD = 1;
  326. ABIT = 4;
  327.  
  328. FOR Y = 1 STEP 1 UNTIL 7
  329. DO
  330. BEGIN
  331. SSBEBF(PARMS[0],DORD,DBIT,6,SCHAR);
  332. SCHAR = SSDCDA(SCHAR);
  333. SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
  334. END
  335.  
  336. MSGP[1] = PAR$ELADDR[NORINDX + 1];
  337. ABHTLC[1] = 15;
  338. AORD = 2;
  339. ABIT = 0;
  340. WCB$SMID[1] = SMID"MSGTE";
  341. END
  342.  
  343.  
  344. #
  345. * MOVE THE FROM NOP.. PREFIX INTO SM AREA.
  346. #
  347.  
  348. DORD = 0;
  349. DBIT = 0;
  350.  
  351. FOR I = 1 STEP 1 UNTIL 10
  352. DO
  353. BEGIN
  354. SSBEBF(FROMNOP[0],DORD,DBIT,6,SCHAR);
  355. SCHAR = SSDCDA(SCHAR);
  356. SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
  357. END
  358.  
  359. #
  360. * MOVE MESSAGE TEXT FROM COMMAND PARMS AREA TO SM BODY AFTER
  361. * DISPLAY CODE TO ASCII CONVERSION.
  362. #
  363.  
  364. #
  365. * DETERMINE BEGINNING INDEX FOR MSG TEXT IN COMMAND PARMS ARRAY.
  366. #
  367.  
  368. BEGSYIX = HDR$TXWCNT[0] + 1;
  369. FOR I = BEGSYIX STEP 1 WHILE PAR$PCODE[I] NQ "MS0"
  370. DO
  371. BEGIN
  372. END
  373.  
  374. DORD = I+1;
  375. DBIT = 0;
  376.  
  377. FOR Y = 1 STEP 1 UNTIL PAR$MSGCL[I]
  378. DO
  379. BEGIN
  380. SSBEBF(PARMS[0],DORD,DBIT,6,SCHAR);
  381. SCHAR = SSDCDA(SCHAR);
  382. SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
  383. END
  384.  
  385. #
  386. * FINISH OUTGOING SM SETUP.
  387. #
  388.  
  389.  
  390. SCHAR = US$;
  391. SSBSBF(CSSM[1],AORD,ABIT,8,SCHAR);
  392.  
  393. ABHTLC[1] = ABHTLC[1] + PAR$MSGCL[I] + 11;
  394. WCB$WC[1] =((ABHTLC[1] * 8)/60) + 3;
  395.  
  396. #
  397. * SAVE THE SM IN THE OPERATOR CONTROL BLOCK.
  398. #
  399.  
  400. OC$WC[HDR$OPORD[0]] = WCB$WC[1] - 2;
  401. OC$TLC[HDR$OPORD[0]] = ABHTLC[1];
  402.  
  403. MOVEI(OC$WC[HDR$OPORD[0]],LOC(CSSM[1]),LOC(OC$SM[HDR$OPORD[0]]));
  404.  
  405. #
  406. * SET UP THE REST OF THE ABH WORD AND ENTRIES IN THE NPUCB AND
  407. * OCB.
  408. #
  409.  
  410. ABHABT[1] = APPSUP;
  411. ABHBT[1] = APPSUP;
  412. ABHDN[1] = NPU$NID[NPUORD];
  413. ABHSN[1] = NPU$HID[NPUORD];
  414. ABHACT[1] = ACTCSNP$;
  415. P<FLG$WORD> = LOC(NPU$SDFLGS[NPUORD]);
  416. SSBSBW(FLG$WORD,HDR$OPORD[0]);
  417. OC$NCNT[HDR$OPORD[0]] = 1;
  418. OC$VERB[HDR$OPORD[0]] = HDR$VERB[0];
  419.  
  420. #
  421. * CHECK IF THERE IS A CURRENT SEND IN PROGRESS.
  422. * IF NOT, SET THE NPUCB AND OCB TO REFLECT SEND ACTIVE.
  423. * INCREMENT THE NUMBER OF SEND NPUS EQUAL TO ONE.
  424. #
  425.  
  426. IF NPU$OPSD[NPUORD] EQ 0
  427. THEN
  428. BEGIN
  429. OC$CNPU[HDR$OPORD[0]] = NPUORD;
  430. NPU$OPSD[NPUORD] = HDR$OPORD[0];
  431.  
  432.  
  433. #
  434. * SEND SM.
  435. #
  436.  
  437. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],CSSM[1]);
  438.  
  439.  
  440.  
  441. END # IF OPSD EQ 0 #
  442.  
  443.  
  444. #
  445. * MUST ENTER COMMAND TEXT INTO NETWORK LOG FILE VIA A CMDTXT SUPER-
  446. * VISION EVENT TO THE EVENT PROCESSOR.
  447. #
  448.  
  449. WCB$WORD[1] = 0;
  450. ABHWORD[1] = 0;
  451. P<MSCMD> = LOC(CMD$TEXT[0]); # POINT ARRAY FOR MOVE #
  452. CMD$TNAM[0] = OC$TNAM[HDR$OPORD[0]]; # OP TERM NAME #
  453. MOVE(HDR$TXWCNT[0],PARMS[0],MSCMD[0]);
  454. WCB$SMID[1] = SMID"CMDTXT";
  455. WCB$WC[1] = HDR$TXWCNT[0] + 4;
  456. SSTAQE(P<EVQ>,WCBUF[1],ABH[1],CMDLINE[0]);
  457.  
  458.  
  459. ENDEXIT:
  460. DVAR = 1;
  461.  
  462. END # CSSASD #
  463. TERM
cdc/nos2.source/nam5871/cssasd.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator