User Tools

Site Tools


cdc:nos2.source:nam5871:cscuhs

CSCUHS

Table Of Contents

  • [00005] PROC CSCUHS
  • [00006] CSCUHS - UPDATE HOP STATUS.
  • [00010] UPDATE HOP STATUS.
  • [00052] PROC MOVE
  • [00053] PROC SSSAWR
  • [00054] PROC SSTAQE
  • [00055] PROC SSTATS
  • [00056] PROC SSTRTS
  • [00309] PROC XMITHQ
  • [00399] PROC PURGEHQ

Source Code

CSCUHS.txt
  1. *DECK CSCUHS
  2. USETEXT TEXTCS
  3. USETEXT TEXTSS
  4. USETEXT TXTAPSS
  5. PROC CSCUHS;
  6. # TITLE CSCUHS - UPDATE HOP STATUS. #
  7.  
  8. BEGIN # CSCUHS #
  9. #
  10. ** CSCUHS - UPDATE HOP STATUS.
  11. *
  12. * D. G. DEPEW. 82/03/04.
  13. *
  14. * THIS PROCEDURE PERFORMS ALL THE CONNECTION(C) LAYER PROCESSING
  15. * REQUIRED FOR THE INBOUND, SPECIAL HOP SUPERVISORY MESSAGES.
  16. *
  17. * PROC CSCUHS
  18. *
  19. * ENTRY WCBUF[0] = WORD COUNT WORD FROM ORIGINAL CONNECTION
  20. * TRAFFIC QUEUE (*CNQ*) ENTRY.
  21. * ABHBUF[0] = APPLICATION BLOCK HEADER FOR THE SM (BASED
  22. * ARRAY *ABH* IN *TXTAPSS* POINTS HERE).
  23. * MSGBUF[0] = BODY OF THE SM (BASED ARRAY *APSM* IN
  24. * *TXTAPSS* POINTS HERE). THE POSSIBLE PFC/SFC
  25. * VALUES ARE: HOP/START, HOP/CMD, HOP/BRK,
  26. * HOP/PAGE, HOP/END, HOP/IG.
  27. *
  28. * EXIT ANY OF THE FOLLOWING IN VARIOUS COMBINATIONS ACCORDING TO
  29. * THE SM RECEIVED AND THE STATE OF THE HOP PSEUDO ACN:
  30. * - THE HOP PSEUDO ACN STATE HAS BEEN UPDATED.
  31. * - AN ENTRY HAS BEEN PLACED IN THE PROTOCOL EVENT QUEUE
  32. * (*PEQ*).
  33. * - ONE OR MORE HOP ENTRIES IN THE WAITING BLOCK QUEUE
  34. * (*WBQ*) HAVE BEEN TRANSFERRED TO THE OUTGOING TRAFFIC
  35. * QUEUE (*OTQ*).
  36. * - ALL OUTPUT ENQUEUED FOR THE HOP (IN THE *WBQ*) HAS BEEN
  37. * DISCARDED.
  38. * - AN ENTRY HAS BEEN PLACED IN THE OPERATOR TYPEIN QUEUE
  39. * (*OPTQ*).
  40. * - HOP PAGING STATUS HAS BEEN UPDATED.
  41. * - HOP IGNORE STATUS HAS BEEN UPDATED.
  42. *
  43. * NOTE THE PROCESSING IS DEFINED BY THE CS/HOP C-LAYER STATE
  44. * DIAGRAM.
  45. #
  46.  
  47. #
  48. **** PROC CSCUHS - XREF LIST.
  49. #
  50. XREF
  51. BEGIN
  52. PROC MOVE; # MOVE STORAGE DIRECT ADDRESSING (MACREL) #
  53. PROC SSSAWR; # ACCEPT WORKLIST REQUEST #
  54. PROC SSTAQE; # ACCEPT QUEUE ENTRY #
  55. PROC SSTATS; # ALLOCATE TABLE SPACE AT END OF TABLE #
  56. PROC SSTRTS; # REMOVE TABLE SPACE ANYWHERE IN TABLE #
  57. END
  58. #
  59. ****
  60. #
  61.  
  62.  
  63. ITEM STATE S:HCNST; # TEMP CELL FOR STATE OF HOP PSEUDO ACN #
  64.  
  65. #
  66. * FOLLOWING ITEMS ARE USED ONLY BY EMBEDDED PROCS (SOME ARE
  67. * SHARED).
  68. #
  69.  
  70. ITEM I; # LOOP INDUCTION VARIABLE #
  71. ITEM COUNT; # NUMBER OF HOP *WBQ* ENTRIES TO BE MOVED #
  72. ITEM LICNT; # COUNT OF DISPLAY LINES IN *WBQ* ENTRY #
  73. ITEM OORD; # OUTGOING TRAFFIC QUEUE ORDINAL #
  74. ITEM SIZ; # *OTQ* ENTRY SIZE #
  75. ITEM WBC; # *WBQ* ENTRY COUNT OR ENTRY SIZE #
  76. ITEM WORD; # WAITING BLOCK QUEUE ORDINAL #
  77.  
  78.  
  79. BASED ARRAY TEXTLOC [00:00] S(1); ;
  80.  
  81.  
  82. ARRAY OUTDISC [00:00] S(5);
  83. BEGIN
  84. ITEM OD$PSFC U(00,00,16) = [HOPDIS];
  85. ITEM OD$ZERO1 U(00,16,43) = [0];
  86. ITEM OD$IAF B(00,59,01) = [TRUE]; # INPUT OK #
  87. ITEM OD$TEXT1 C(01,00,16) = ["OUTPUT DISCARDED"];
  88. ITEM OD$ZERO2 U(02,36,24) = [0];
  89. ITEM OD$TEXT2 C(03,00,07) = ["READY.."];
  90. ITEM OD$ZERO3 U(03,42,18) = [0];
  91. ITEM OD$ZERO4 U(04,00,60) = [0];
  92. END
  93.  
  94. ARRAY PAGEMSG [00:00] S(4);
  95. BEGIN
  96. ITEM PG$PSFC U(00,00,16) = [HOPDIS];
  97. ITEM PG$ZERO1 U(00,16,44) = [0]; # NO INPUT #
  98. ITEM PG$TEXT C(01,00,15) = ["PAGE ACCEPTED.."];
  99. ITEM PG$ZERO2 U(02,30,30) = [0];
  100. ITEM PG$ZERO3 U(03,00,60) = [0];
  101. END
  102. ARRAY RKPAGE [PAGE1:NPG] S(116); # HOP/DIS FOR HELP DISPLAY #
  103.  
  104. BEGIN
  105. ITEM RK$PAGEPS U(000,00,16) = [NPG(X"D009")]; # PFC/SFC VALUE #
  106. ITEM RK$PAGEZ1 U(000,16,42) = [NPG(0)];
  107. ITEM RK$PAGERS B(000,58,01) = [NPG(TRUE)]; # RIGHT SCREEN #
  108. ITEM RK$PAGEIA B(000,59,01) = [NPG(FALSE)]; # INPUT ALLOWED #
  109.  
  110. # HEADER DISPLAY #
  111. ITEM RK$PAGEL01 C(01,00,20) = [NPG(" *** ")] ;
  112. ITEM RK$PAGEM01 C(03,00,20) = [NPG("CS COMMAND LIST *** ")];
  113. ITEM RK$PAGEN01 C(05,00,18) = [NPG(" ")] ; # DIS HEADER LINE#
  114. ITEM RK$PAGEE01 U(06,48,12) = [NPG(0)]; # LINE TERMINATOR#
  115.  
  116. ITEM RK$PAGEM02 C(07,00,40) = [NPG(" ")]; # BLANK LINE #
  117. ITEM RK$PAGEN02 C(11,00,18) = [NPG(" (PAGE OF 3) ")];
  118. ITEM RK$PAGEO02 C(11,48,01) = ["1","2","3"];
  119. ITEM RK$PAGEE02 U(12,48,12) = [NPG(0)]; # LINE TERMINATOR#
  120.  
  121. ITEM RK$PAGEL03 C(13,00,30)= ["CO,NP=NPUNAME(,ON/OFF) ",
  122. # PAGE2 # "EN,TR/LL/LI/TE=NAME. ",
  123. # PAGE3 # "IN. "];
  124.  
  125. ITEM RK$PAGEM03 C(16,00,28)= ["GAIN (ON) OR GIVE UP CONTROL",
  126. # PAGE2 # "ENABLE NAMED NETWORK ELEMENT",
  127. # PAGE3 # "DISPLAY CURRENT INFORMATION "];
  128.  
  129. ITEM RK$PAGEE03 U(18,48,12)= [NPG(0)] ;
  130.  
  131. ITEM RK$PAGEL04 C(19,00,30)= [" ",
  132. # PAGE2 # "EN,LIS/TRS/LLS,NP=NPUNAME. ",
  133. # PAGE3 # " "];
  134.  
  135. ITEM RK$PAGEM04 C(22,00,28)= [" OF NAMED NPU. ",
  136. # PAGE2 # "ENABLE ALL LINES/TERMINALS/ ",
  137. # PAGE3 # " ABOUT NOPS CONNECTED TO "];
  138.  
  139. ITEM RK$PAGEE04 U(24,48,12)= [NPG(0)] ;
  140.  
  141. ITEM RK$PAGEL05 C(25,00,30)= ["CO,NPS(,ON/OFF) ",
  142. # PAGE2 # " ",
  143. # PAGE3 # " "];
  144.  
  145. ITEM RK$PAGEM05 C(28,00,28)= ["GAIN OR GIVE UP CONTROL OF ",
  146. # PAGE2 # " OR LLINKS ON NAMED NPU. ",
  147. # PAGE3 # " AND NPUS SUPERVISED BY "];
  148.  
  149. ITEM RK$PAGEE05 U(30,48,12)= [NPG(0)] ;
  150.  
  151. ITEM RK$PAGEL06 C(31,00,30)= [" ",
  152. # PAGE2 # "EN,LIS/TRS/LLS,NPS. ",
  153. # PAGE3 # " "];
  154.  
  155. ITEM RK$PAGEM06 C(34,00,28)= [" ALL NPUS CURRENTLY SUPER- ",
  156. # PAGE2 # "ENABLE ALL LINES, TERMINALS ",
  157. # PAGE3 # " THIS CS. "];
  158.  
  159. ITEM RK$PAGEE06 U(36,48,12)= [NPG(0)] ;
  160.  
  161. ITEM RK$PAGEL07 C(37,00,30)= [" ",
  162. # PAGE2 # " ",
  163. # PAGE3 # "LO,NP=NPUNAME(,DU/ND). "];
  164.  
  165. ITEM RK$PAGEM07 C(40,00,28)= [" VISED BYE THIS CS. ",
  166. # PAGE2 # " OR LLINKS ON ALL NPUS YOU ",
  167. # PAGE3 # "STOP AND RELOAD NAMED NPU. "];
  168.  
  169. ITEM RK$PAGEE07 U(42,48,12)= [NPG(0)] ;
  170.  
  171. ITEM RK$PAGEL08 C(43,00,30)= ["CO,AU(,ON) ",
  172. # PAGE2 # " ",
  173. # PAGE3 # " "];
  174.  
  175. ITEM RK$PAGEM08 C(46,00,28)= ["AUTOMATICALLY GAIN CONTROL ",
  176. # PAGE2 # " CONTROL AS A NOP. ",
  177. # PAGE3 # " USE THE DUMP (DU) OR NO- "];
  178.  
  179. ITEM RK$PAGEE08 U(48,48,12)= [NPG(0)] ;
  180.  
  181. ITEM RK$PAGEL09 C(49,00,30)= [" ",
  182. # PAGE2 # "EN,TES,(NPU=NNAME/LINE=LNAME. ",
  183. # PAGE3 # " "];
  184.  
  185. ITEM RK$PAGEM09 C(52,00,28)= [" OF ANY NPU THAT COMES ",
  186. # PAGE2 # "ENABLE ALL TERMINALS ON ",
  187. # PAGE3 # " DUMP (ND) OPTION TO OVER- "];
  188.  
  189. ITEM RK$PAGEE09 U(54,48,12)= [NPG(0)] ;
  190.  
  191. ITEM RK$PAGEL10 C(55,00,30)= [" ",
  192. # PAGE2 # " ",
  193. # PAGE3 # " "];
  194.  
  195. ITEM RK$PAGEM10 C(58,00,28)= [" UNDER SUPERVISION OF THIS ",
  196. # PAGE2 # " NAMED NPU OR LINE. ",
  197. # PAGE3 # " WRITE THE LONGTERM DMP FLG"];
  198.  
  199. ITEM RK$PAGEE10 U(60,48,12)= [NPG(0)] ;
  200.  
  201. ITEM RK$PAGEL11 C(61,00,30)= [" ",
  202. # PAGE2 # "EN,TES,NPS. ",
  203. # PAGE3 # "LO,NPS(,DU,ND). "];
  204.  
  205. ITEM RK$PAGEM11 C(64,00,28)= [" CS OR IF ITS CONTROL IS ",
  206. # PAGE2 # "ENABLE ALL TERMINALS ON ALL ",
  207. # PAGE3 # "STOP AND RELOAD ALL NPUS "];
  208.  
  209. ITEM RK$PAGEE11 U(66,48,12)= [NPG(0)] ;
  210.  
  211. ITEM RK$PAGEL12 C(67,00,30)= [" ",
  212. # PAGE2 # " ",
  213. # PAGE3 # " "];
  214.  
  215. ITEM RK$PAGEM12 C(70,00,28)= [" GIVEN UP BY ANOTHER NOP. ",
  216. # PAGE2 # " NPUS YOU CONTROL AS A NOP.",
  217. # PAGE3 # " UNDER YOUR CONTROL. "];
  218.  
  219. ITEM RK$PAGEE12 U(72,48,12)= [NPG(0)] ;
  220.  
  221. ITEM RK$PAGEL13 C(73,00,30)= ["CO,AU,OFF. ",
  222. # PAGE2 # "GO,NP=NPUNAME. ",
  223. # PAGE3 # "RE/REPORT,(NPU/NP=NNN/NPUS/ "];
  224.  
  225. ITEM RK$PAGEM13 C(76,00,28)= ["CANCEL EFFECT OF CO,AU,ON. ",
  226. # PAGE2 # "START THE NAMED NPU. ",
  227. # PAGE3 # "REQUEST TO/TO NOT RECEIVE "];
  228.  
  229. ITEM RK$PAGEE13 U(78,48,12)= [NPG(0)] ;
  230.  
  231. ITEM RK$PAGEL14 C(79,00,30)= ["DI,TR/LL/LI/TE=NAME. ",
  232. # PAGE2 # "GO,NPS. ",
  233. # PAGE3 # "NPS),ON/OFF. "];
  234.  
  235. ITEM RK$PAGEM14 C(82,00,30)= ["DISABLE TRUNK, LLINK,LINE OR",
  236. # PAGE2 # "START ALL THE NPUS YOU ",
  237. # PAGE3 # " UNSOLICITED STATUS REPORT. "];
  238.  
  239. ITEM RK$PAGEE14 U(84,48,12)= [NPG(0)] ;
  240.  
  241. ITEM RK$PAGEL15 C(85,00,30)= [" ",
  242. # PAGE2 # " ",
  243. # PAGE3 # "ST/STATUS(,NPU/NP=/NPUS/NPS). "];
  244.  
  245. ITEM RK$PAGEM15 C(88,00,28)= [" NAMED TERMINAL. ",
  246. # PAGE2 # " CONTROL AS A NOP. ",
  247. # PAGE3 # "STATUS OF NAMED NPU. "];
  248.  
  249. ITEM RK$PAGEE15 U(90,48,12)= [NPG(0)];
  250.  
  251. ITEM RK$PAGEL16 C(91,00,30)= ["DU,NP=NPUNAME(,ON/OFF) ",
  252. # PAGE2 # "HI. ",
  253. # PAGE3 # "TS(,NPU/NP=NNN)(,RE/MS=MESAGE "];
  254. ITEM RK$PAGEM16 C(94,00,28)= ["SET LONG TERM DUMP FLAG ON ",
  255. # PAGE2 # "DISPLAY LAST PAGE OF RECENT ",
  256. # PAGE3 # "DIAGNOSTIC TEST COMMAND. "];
  257. ITEM RK$PAGEE16 U(96,48,12)= [0] ;
  258.  
  259. ITEM RK$PAGEL17 C(97,00,30)= [" ",
  260. # PAGE2 # " ",
  261. # PAGE3 # "/SEND/SE/DROP/DR). "];
  262.  
  263. ITEM RK$PAGEM17 C(100,00,28)=[" OR OFF FOR NAMED NPU. ",
  264. # PAGE2 # " ACTIVITY HISTORY BUFFER. ",
  265. # PAGE3 # " "];
  266.  
  267. ITEM RK$PAGEE17 U(102,48,12)=[0] ;
  268.  
  269. ITEM RK$PAGEL18 C(103,00,30)=["DU,NPS(,ON/OFF) ",
  270. # PAGE2 # "HI,ALL. ",
  271. # PAGE3 # "SE(,TE/LI/LL/NP=ELEMENT,MSG/MS"];
  272.  
  273. ITEM RK$PAGEM18 C(106,00,28)=["SET DUMP FLAG ON ALL NPUS ",
  274. # PAGE2 # "DISP ALL PAGES OF HISTORY. ",
  275. # PAGE3 # "SEND TO NAMED ELEMENT THE "];
  276.  
  277. ITEM RK$PAGEE18 U(108,48,12)=[NPG(0)];
  278.  
  279. ITEM RK$PAGEL19 C(109,00,20)=[" ",
  280. # PAGE2 # " ",
  281. # PAGE3 # "=MESSAGE STRING). "];
  282.  
  283. ITEM RK$PAGEM19 C(111,00,20)=["TYPE ( TO FORWARD. ",
  284. # PAGE2 # "TYPE ( TO FORWARD. ",
  285. # PAGE3 # "MESSAGE. "];
  286.  
  287. ITEM RK$PAGEN19 C(113,00,18)=["TYPE ) TO BACKWARD",
  288. # PAGE2 # "TYPE ) TO BACKWARD",
  289. # PAGE3 # "* FOR BACK TO NAM "];
  290.  
  291. ITEM RK$PAGEE19 U(114,48,12)=[NPG(0)] ;
  292.  
  293. ITEM RK$PAGEZW U(115,00,60)=[NPG(0)] ; # END BY ZEROED WORD #
  294.  
  295. END # NINETEEN LINES PER PAGE FOR RIGHT K-DIS #
  296.  
  297.  
  298.  
  299. DEF ODTLW$ #5#; # *OUTPUT DISCARDED* TEXT LENGTH IN WORDS #
  300. DEF ODQES$ #7#; # *OUTPUT DISCARDED* QUEUE ENTRY SIZE #
  301. DEF PGTLW$ #4#; # *PAGE ACCEPTED..* TEXT LENGTH IN WORDS #
  302. DEF PGQES$ #6#; # *PAGE ACCEPTED..* QUEUE ENTRY SIZE #
  303.  
  304.  
  305.  
  306.  
  307. CONTROL EJECT;
  308.  
  309. PROC XMITHQ;
  310.  
  311. BEGIN # XMITHQ #
  312. #
  313. * XMITHQ - TRANSMIT HOP QUEUE.
  314. *
  315. * THIS EMBEDDED PROC MOVES HOP ENTRIES IN THE WAITING BLOCK QUEUE
  316. * (*WBQ*) TO THE OUTGOING TRAFFIC QUEUE (*OTQ*). THE NUMBER OF
  317. * ENTRIES MOVED DEPENDS UPON PAGING STATUS AND WHETHER THERE
  318. * ACTUALLY IS DATA QUEUED (IN THE *WBQ*) FOR THE HOP.
  319. *
  320. * PROC XMITHQ
  321. *
  322. * ENTRY 1. THE *WBQ* CONTAINS ZERO OR MORE HOP ENTRIES.
  323. * 2. THE ACN LIST ENTRY FOR THE HOP CONTAINS ALL REQUIRED
  324. * INFORMATION - NAMELY, THE COUNT OF HOP ENTRIES IN THE
  325. * *WBQ* AND THE PAGING STATUS FLAG.
  326. *
  327. * EXIT 1. ZERO OR MORE HOP ENTRIES HAVE BEEN REMOVED FROM THE
  328. * *WBQ* AND PLACED IN THE *OTQ*.
  329. * 2. THE COUNT OF LINES CURRENTLY BEING DISPLAYED HAS BEEN
  330. * SET TO THE LINE COUNT OF THE LAST *WBQ* ENTRY MOVED
  331. * (ZERO IF NO ENTRIES MOVED).
  332. * 3. THE HOP WAITING BLOCK COUNT HAS BEEN UPDATED
  333. * APPROPRIATELY.
  334. *
  335. * NOTE HOP ENTRIES IN THE *WBQ* ARE ALREADY IN CORRECT HOP/DIS
  336. * FORMAT EXCEPT FOR THE EXTRA WORD AT THE END, WHICH IS
  337. * REQUIRED BY NIP AND MUST BE ADDED.
  338. #
  339.  
  340.  
  341.  
  342. #
  343. * THE FIRST TASK IS TO DETERMINE HOW MANY BLOCKS (HOP *WBQ* ENTRIES)
  344. * TO MOVE. IF PAGING IS ON, MOVE ONE BLOCK (AT MOST A SCREENFULL).
  345. * IF PAGING IS OFF, MOVE ALL ENQUEUED BLOCKS. OF COURSE, IF THERE
  346. * ARE CURRENTLY NO HOP ENTRIES IN THE *WBQ*, NOTHING HAPPENS.
  347. #
  348. WBC = ACN$WBCNT[HOPORD$];
  349. IF ACN$PWAIT[HOPORD$]
  350. AND WBC NQ 0
  351. THEN
  352. COUNT = 1;
  353. ELSE
  354. COUNT = WBC; # CAN BE ZERO #
  355. ACN$WBCNT[HOPORD$] = WBC - COUNT; # UPDATED #
  356.  
  357.  
  358. #
  359. * NOW MOVE THE BLOCKS. SET THE COUNT OF TEXT LINES CURRENTLY BEING
  360. * DISPLAYED TO THE LINE COUNT OF THE LAST BLOCK MOVED (IF ONE).
  361. * PROVIDE FOR THE EXTRA WORD REQUIRED IN THE HOP/DIS SM. IN ORDER
  362. * TO MOVE A BLOCK, WE MUST FIRST FIND IT.
  363. #
  364. LICNT = 0; # INITIALIZE #
  365. WORD = 0;
  366.  
  367. FOR I=1 STEP 1 UNTIL COUNT
  368. DO # MOVE *COUNT* BLOCKS, ZERO OK #
  369. BEGIN
  370. FOR WORD = WORD STEP WBQ$ESIZE[WORD]
  371. WHILE WBQ$ABHACN[WORD] NQ 0
  372. OR WBQ$SMACN[WORD] NQ 0
  373. DO # FIND HOP ENTRY (HOP/DIS SM) #
  374. BEGIN END
  375.  
  376. OORD = OTQL; # WHERE *OTQ* ENTRY WILL BE #
  377. WBC = WBQ$ESIZE[WORD]; # SIZE OF ENTRY TO BE MOVED #
  378. SIZ = WBC + 1; # SIZE OF HOP/DIS NTRY IN *OTQ* #
  379. LICNT = WBQ$LICNT[WORD]; # TEXT LINES IN *WBQ* ENTRY #
  380. WBQ$ESIZE[WORD] = SIZ; # UPDATE PRIOR TO MOVE #
  381. WBQ$TLC[WORD] = WBQ$TLC[WORD] + 1;
  382. SSTATS (P<OTQ>, SIZ); # MAKE ROOM #
  383. MOVE (WBC, WBQ[WORD], OTQ[OORD]);
  384. SSTRTS (P<WBQ>, WORD, WBC); # DELETE WAITING BLOCK #
  385. OTQ$WORD[OTQL-1] = 0; # EXTRA WORD #
  386.  
  387. IF OORD EQ 0
  388. THEN # FIRST ENTRY IN *OTQ* #
  389. SSSAWR (CSWDF"SACNI");
  390. END
  391.  
  392. ACN$BLCNT[HOPORD$] = LICNT; # NUMBER LINES ON SCREEN #
  393.  
  394. END # XMITHQ #
  395.  
  396.  
  397.  
  398.  
  399. PROC PURGEHQ;
  400.  
  401. BEGIN # PURGEHQ #
  402. #
  403. * PURGEHQ - PURGE HOP QUEUE.
  404. *
  405. * THIS EMBEDDED PROC REMOVES ALL HOP ENTRIES FROM THE WAITING BLOCK
  406. * QUEUE (*WBQ*).
  407. *
  408. * PROC PURGEHQ
  409. *
  410. * ENTRY 1. THE *WBQ* CONTAINS ZERO OR MORE HOP ENTRIES.
  411. * 2. THE ACN LIST ENTRY FOR THE HOP CONTAINS ALL REQUIRED
  412. * INFORMATION - NAMELY, THE COUNT OF HOP *WBQ* ENTRIES.
  413. *
  414. * EXIT 1. ALL HOP ENTRIES IN THE *WBQ* HAVE BEEN DELETED.
  415. * 2. THE COUNTS OF *WBQ* ENTRIES AND LINES CURRENTLY BEING
  416. * DISPLAYED (BOTH IN THE ACN LIST ENTRY FOR THE HOP)
  417. * HAVE BEEN CLEARED.
  418. #
  419.  
  420.  
  421.  
  422. #
  423. * INITIALIZE AND UPDATE THE ACN LIST ENTRY FOR THE HOP.
  424. #
  425. COUNT = ACN$WBCNT[HOPORD$]; # NUMBER OF BLOCKS TO DELETE #
  426. ACN$WBCNT[HOPORD$] = 0;
  427. ACN$BLCNT[HOPORD$] = 0; # START NEW PAGE #
  428.  
  429.  
  430. #
  431. * NOW DELETE THE ENTRIES. IN ORDER TO DELETE AN ENTRY, WE MUST
  432. * FIRST FIND IT.
  433. #
  434. WORD = 0;
  435. FOR I=1 STEP 1 UNTIL COUNT
  436. DO # DEL *COUNT* ENTRIES, ZERO OK #
  437. BEGIN
  438. FOR WORD = WORD STEP WBQ$ESIZE[WORD]
  439. WHILE WBQ$ABHACN[WORD] NQ 0
  440. OR WBQ$SMACN[WORD] NQ 0
  441. DO # FIND HOP ENTRY (HOP/DIS SM) #
  442. BEGIN END
  443.  
  444. WBC = WBQ$ESIZE[WORD]; # SIZE OF ENTRY TO BE DELETED #
  445. SSTRTS (P<WBQ>, WORD, WBC); # DELETE WAITING BLOCK #
  446. END
  447.  
  448. END # PURGEHQ #
  449.  
  450.  
  451.  
  452.  
  453.  
  454. CONTROL EJECT;
  455. #
  456. * MAIN ROUTINE BEGINS HERE.
  457. *
  458. * WE EXECUTE WHAT AMOUNTS TO A CASE CONSTRUCT TO PROCESS THE SIX
  459. * TYPES OF INCOMING HOP SM-S.
  460. #
  461.  
  462.  
  463.  
  464. IF WCB$SMID[0] EQ SMID"HOPSTRT"
  465. THEN # K-DISPLAY ASSIGNED TO CS #
  466. BEGIN
  467.  
  468.  
  469. #
  470. * INITIALIZE THE HOP ACN LIST ENTRY. SEND THE HOP/START TO THE
  471. * I-LAYER (AS PROTOCOL EVENT), IF APPROPRIATE. UPDATE THE STATE.
  472. #
  473. STATE = ACN$HOPST[HOPORD$];
  474. ACN$WORD0[HOPORD$] = 0;
  475. ACN$WORD1[HOPORD$] = 0;
  476. IF STATE EQ S"INACT"
  477. THEN # SEND HOP/START TO I-LAYER #
  478. BEGIN
  479. WCB$WC[0] = 2; # MIN QUEUE ENTRY LENGTH #
  480. ABHADR[0] = HOPORD$;
  481. ABHTLC[0] = 0;
  482. SSTAQE (P<PEQ>, WCBUF[0], ABH[0], APSM[0]); # TO I-LAYER #
  483. END
  484.  
  485. IF STATE EQ S"ENDED"
  486. THEN
  487. ACN$HOPST[HOPORD$] = S"RESTART";
  488. ELSE
  489. BEGIN
  490. ACN$HOPST[HOPORD$] = S"CREATE";
  491. ACN$PL[HOPORD$] = HOPLPL[0] - 1;
  492. END
  493. END
  494.  
  495.  
  496.  
  497. ELSE IF WCB$SMID[0] EQ SMID"HOPCMD"
  498. THEN # HOP ENTERED A COMMAND #
  499. BEGIN
  500.  
  501.  
  502. #
  503. * FORWARD THE COMMAND TO THE I-LAYER (AS OPERATOR TYPEIN) FOR
  504. * SYNTAX CRACKING AND COMMAND PROCESSING. ECHO THE COMMAND BACK
  505. * TO THE K-DISPLAY VIA HOP/DIS SM. UPDATE THE STATE AND SEND HIM
  506. * THE NEXT PAGE OF QUEUED OUTPUT (IF ANY). NOTE THAT *OPTQ*
  507. * ENTRIES DO NOT CONTAIN A PFC/SFC WORD (SAME FORMAT FOR HOP AS
  508. * FOR NOPS).
  509. #
  510. WCB$WORD[1] = WCB$WC[0] - 1; # DEDUCT FOR PFC/SFC WORD #
  511. ABHWORD[1] = 0;
  512. ABHADR[1] = HOPORD$;
  513. ABHTLC[1] = HOPDTL[0]; # ACTUAL CHAR COUNT #
  514. P<TEXTLOC> = LOC(SPMSG1[0]); # LOCATION OF COMMAND TEXT #
  515. SSTAQE (P<OPTQ>, WCBUF[1], ABH[1], TEXTLOC[0]); # TO I-LAYER #
  516.  
  517. WCB$WORD[0] = WCB$WC[0] + 1; # EXTRA WORD FOR HOP/DIS SM #
  518. ABHTLC[0] = ABHTLC[0] + 1;
  519. SPMSG0[0] = 0; # NO INPUT ALLOWED #
  520. PFCSFC[0] = HOPDIS;
  521. SSTAQE (P<OTQ>, WCBUF[0], ABH[0], APSM[0]); # ECHO COMMAND #
  522. OTQ$WORD[OTQL-1] = 0; # EXTRA WORD #
  523.  
  524. ACN$HOPST[HOPORD$] = S"COMMAND";
  525. XMITHQ; # XMIT QUEUED HOP DATA (IF ANY) #
  526.  
  527. END
  528.  
  529.  
  530.  
  531. ELSE IF WCB$SMID[0] EQ SMID"HOPBRK"
  532. THEN # HOP ENTERED A BREAK #
  533. BEGIN
  534.  
  535.  
  536. #
  537. * RELEASE ALL QUEUED (IN THE *WBQ*) OUTPUT. IF THE HOP PSEUDO
  538. * ACN IS IN THE *ACTIVE* STATE, SEND THE *OUTPUT DISCARDED*
  539. * MESSAGE FOLLOWED BY *READY..*. IF A COMMAND IS IN PROGRESS,
  540. * FORWARD THE BREAK TO THE I-LAYER AS AN OPERATOR TYPEIN (*OPTQ*).
  541. * UPDATE THE STATE.
  542. #
  543. PURGEHQ; # PURGE QUEUED HOP DATA(IF ANY) #
  544.  
  545. IF ACN$HOPST[HOPORD$] EQ S"CREATE"
  546. THEN # BREAK HISTORY BUFFER OUTPUT #
  547. ACN$HOPST[HOPORD$] = S"STARTBRK";
  548.  
  549. ELSE IF ACN$HOPST[HOPORD$] EQ S"ACTIVE"
  550. THEN # BREAK UNSOLICITED STATUS RPTS #
  551. BEGIN
  552. WCB$WORD[0] = ODQES$;
  553. ABHTLC[0] = ODTLW$;
  554. SSTAQE (P<OTQ>, WCBUF[0], ABH[0], OUTDISC);
  555. ACN$BLCNT[HOPORD$] = 2; # START NEW PAGE W/ 2 LINES #
  556. END
  557.  
  558. ELSE IF ACN$HOPST[HOPORD$] EQ S"COMMAND"
  559. THEN # BREAK COMMAND IN PROGRESS #
  560. BEGIN
  561. WCB$WORD[1] = 2; # MIN QUEUE ENTRY LENGTH #
  562. ABHWORD[1] = 0; # TLC = 0 #
  563. ABHADR[1] = HOPORD$;
  564. ABHBRK[1] = 1;
  565. SSTAQE (P<OPTQ>, WCBUF[1], ABH[1], TEXTLOC[0]); #TO I-LAYER #
  566. ACN$HOPST[HOPORD$] = S"BREAK";
  567. END
  568.  
  569. ELSE # MUST BE BRK HIST AFT RESTART #
  570. ACN$HOPST[HOPORD$] = S"RESBREAK";
  571.  
  572. END
  573.  
  574.  
  575.  
  576. ELSE IF WCB$SMID[0] EQ SMID"HOPIG"
  577. THEN # HOP WANTS TO IGNORE CS REPTS #
  578.  
  579.  
  580. #
  581. * ALL THAT IS REQUIRED IS TO SET THE APPROPRIATE FLAG IN THE HOP
  582. * ENTRY OF THE ACN LIST.
  583. #
  584. ACN$IGNOR[HOPORD$] = TRUE;
  585.  
  586.  
  587.  
  588. ELSE IF WCB$SMID[0] EQ SMID"HOPENDD"
  589. THEN # K-DIS NO LONGER ASS'D TO CS #
  590. BEGIN
  591.  
  592.  
  593. #
  594. * RELEASE ALL QUEUED (IN THE *WBQ*) OUTPUT. IF THE HOP PSEUDO
  595. * ACN IS IN THE *ACTIVE* STATE, SEND A CON/CB PROTOCOL EVENT TO
  596. * THE I-LAYER. IF THERE IS A COMMAND IN PROGRESS, SEND A CON/CB-
  597. * WARNING PROTOCOL EVENT TO THE I-LAYER (CON/CB WILL BE SENT WHEN
  598. * COMMAND IS CLEANED UP). UPDATE THE HOP PSEUDO ACN STATE.
  599. #
  600. PURGEHQ; # PURGE QUEUED HOP DATA(IF ANY) #
  601.  
  602. IF ACN$HOPST[HOPORD$] EQ S"ACTIVE"
  603. OR ACN$HOPST[HOPORD$] EQ S"COMMAND"
  604. THEN # MUST SEND P.E. TO I-LAYER #
  605. BEGIN
  606. WCB$WORD[0] = 2; # MIN QUEUE ENTRY SIZE #
  607. ABHADR[0] = HOPORD$;
  608. ABHTLC[0] = 0;
  609. IF ACN$HOPST[HOPORD$] EQ S"ACTIVE"
  610. THEN
  611. WCB$SMID[0] = SMID"CONCB";
  612. ELSE
  613. WCB$SMID[0] = SMID"CONCBW";
  614. SSTAQE(P<PEQ>, WCBUF[0], ABH[0], APSM[0]); # TO I-LAYER #
  615. END
  616.  
  617. IF ACN$HOPST[HOPORD$] EQ S"CREATE"
  618. OR ACN$HOPST[HOPORD$] EQ S"STARTBRK"
  619. THEN
  620. ACN$HOPST[HOPORD$] = S"STARTEND";
  621. ELSE
  622. ACN$HOPST[HOPORD$] = S"ENDED";
  623.  
  624. END
  625.  
  626.  
  627.  
  628. ELSE # MUST BE A PAGING COMMAND SM #
  629. BEGIN
  630.  
  631.  
  632. #
  633. * IF THE COMMAND INDICATES A CHANGE IN PAGING STATUS IS DESIRED,
  634. * SEND THE *PAGE ACCEPTED..* MESSAGE AND REMEMBER THE NEW PAGING
  635. * STATUS. THEN SEND THE HOP AS MUCH QUEUED (IN THE *WBQ*) DATA
  636. * (IF ANY) AS IS CONSISTENT WITH THE UPDATED PAGING STATUS.
  637. #
  638. IF HOPPC[0] EQ "("
  639. THEN
  640. BEGIN # SEND NEXT PAGE FOR RIGHT DISPLAY#
  641. WCB$SMID[1] = SMID"HOPDIS" ;
  642. WCB$WC[1] = RKPAGESZ + 1;
  643. ABHWORD[1] = 0 ;
  644. ABHABT[1] = 3 ;
  645. ABHACT[1] = 1 ;
  646. ABHTLC[1] = RKPAGESZ ;
  647. IF OC$PAGEC[HOPORD$] EQ PAGE3
  648. THEN
  649. OC$PAGEC[HOPORD$] = PAGE1 ;
  650. ELSE
  651. OC$PAGEC[HOPORD$] = OC$PAGEC[HOPORD$] + 1 ;
  652. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],RKPAGE[OC$PAGEC[HOPORD$]]);
  653. END
  654. ELSE
  655. BEGIN
  656. IF HOPPC[0] EQ ")"
  657. THEN
  658. BEGIN
  659. WCB$SMID[1] = SMID"HOPDIS" ;
  660. WCB$WC[1] = RKPAGESZ + 1 ;
  661. ABHWORD[1] = 0 ;
  662. ABHABT[1] = 3 ;
  663. ABHACT[1] = 1 ;
  664. ABHTLC[1] = RKPAGESZ ;
  665. IF OC$PAGEC[HOPORD$] EQ PAGE1
  666. THEN
  667. OC$PAGEC[HOPORD$] = PAGE3 ; # BACK TO PAGE 3 #
  668. ELSE
  669. OC$PAGEC[HOPORD$] = OC$PAGEC[HOPORD$] - 1 ;
  670.  
  671. SSTAQE(P<OTQ>,WCBUF[1],ABH[1],RKPAGE[OC$PAGEC[HOPORD$]
  672. ]) ;
  673. END
  674. ELSE
  675. IF HOPPC[0] NQ ACN$PCHAR[HOPORD$]
  676. THEN # PAGING STATUS CHANGE #
  677. BEGIN
  678. WCB$WORD[0] = PGQES$;
  679. ABHTLC[0] = PGTLW$;
  680. SSTAQE (P<OTQ>, WCBUF[0], ABH[0], PAGEMSG);
  681. ACN$PCHAR[HOPORD$] = HOPPC[0];
  682. END
  683. END
  684.  
  685. XMITHQ; # XMIT QUEUED HOP DATA (IF ANY) #
  686.  
  687. END
  688.  
  689.  
  690. END # CSCUHS #
  691.  
  692. TERM
cdc/nos2.source/nam5871/cscuhs.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator