User Tools

Site Tools


cdc:nos2.source:nam5871:csesom

CSESOM

Table Of Contents

  • [00006] PROC CSESOM
  • [00007] SEND OPERATOR MESSAGE.
  • [00010] SEND OPERATOR MESSAGE.
  • [00031] FUNC SSDCAD U
  • [00032] PROC SSTAQE

Source Code

CSESOM.txt
  1. *DECK CSESOM
  2. USETEXT TEXTSS
  3. USETEXT TEXTCS
  4. USETEXT TXTAPSS
  5. USETEXT TXTSMCS
  6. PROC CSESOM;
  7. # TITLE - SEND OPERATOR MESSAGE. #
  8. BEGIN
  9. #
  10. ** CSESOM - SEND OPERATOR MESSAGE.
  11. *
  12. * D.K. ENDO 82/03/29
  13. *
  14. * THIS PROCEDURE FORMATS MESSAGE TO THE OPERATORS AND SENDS IT TO
  15. * THEM VIA THE OPERATOR RESPONSE QUEUE.
  16. *
  17. * PROC CSESOM
  18. *
  19. * ENTRY 1. MSG/OP/U SM FROM THE EVENT QUEUE.
  20. *
  21. * EXIT 1. FORMATTED MESSAGE TO THE OPERATORS SENT TO THE
  22. * OPERATOR RESPONSE QUEUE WITH THE AUDIENCE GROUP
  23. * SET TO TWO.
  24. *
  25. #
  26. #
  27. **** PROC CSESOM - XREF LIST BEGINS.
  28. #
  29. XREF
  30. BEGIN
  31. FUNC SSDCAD U; # CONVERT ASCII TO DISPLAY CODE #
  32. PROC SSTAQE; # ADD QUEUE ENTRY #
  33. END
  34. #
  35. ****
  36. #
  37. DEF NONTXT$ # 15 #; # NUMBER OF CHARS NOT PART OF TEXT #
  38. DEF TNM$TXTL # 40 #; # CHAR COUNT OF TERMINAL NAME TEXT #
  39. ITEM A$CHAR = 0; # ASCII CHARACTER FROM MESSAGE TEXT #
  40. ITEM BPOS; # BIT POSITION OF CURRENT ASCII CHARACTER #
  41. ITEM CHARCNT; # CHARACTER COUNT OF MESSAGE #
  42. ITEM CHARPOS; # BIT POSITION OF CRNT DISPLAY CODE CHAR #
  43. ITEM I; # LOOP INDUCTION VARIABLE #
  44. ITEM MCC; # MESSAGE CHARACTER COUNT #
  45. ITEM MWC; # WORD COUNT INTO MESSAGE TEXT #
  46. ITEM WC; # WORD COUNT OF TEXT SENT #
  47. #
  48.   THIS ARRAY DEFINES THE MESSAGE TEXT FORMATTED AS SENT TO THE
  49.   OPERATORS.
  50. #
  51. DEF MX$MTO # 07 #;
  52. ARRAY MTO$TXT [01:MX$MTO] S(1);
  53. BEGIN
  54. ITEM MTO$TIM C(00,00,10) = [" "];
  55. ITEM MTO$WORD U(00,00,60);
  56. END
  57. #
  58. * THIS ARRAY DEFINES THE TERMINAL NAME TEXT SENT WITH THE MESSAGE
  59. #
  60. ARRAY TNM$TXT [00:00] S(4);
  61. BEGIN
  62. ITEM TNM$TIM C(00,00,10);
  63. ITEM TNM$TERM C(01,00,11) = ["FROM TERM--"];
  64. ITEM TNM$TNM U(02,06,42);
  65. ITEM TNM$C1 C(02,48,02) = [": "];
  66. ITEM TNM$ZBYT U(03,00,60) = [0];
  67. END
  68. CONTROL EJECT;
  69. # #
  70. # CSESOM CODE BEGINS HERE #
  71. # #
  72. #
  73. * APPEND THE CURRENT TIME TO THE TEXT. CONVERT THE TERMINAL NAME
  74. * AND APPEND IT TO THE TEXT. CONVERT THE MESSAGE AND CONVERT IT TO
  75. * TEXT. SEND THE TEXT OFF TO THE OPERATOR RESPONSE QUEUE WITH AN
  76. * AUDIENCE GROUP OF TWO.
  77. #
  78. TNM$TIM[0] = CTM$CLOCK[0];
  79. FOR I=0 STEP 1 UNTIL 6
  80. DO
  81. BEGIN
  82. B<I*6,6>TNM$TNM[0] = SSDCAD(B<I*8,8>MSGTN[0]);
  83. END
  84. WCB$WORD[1] = 0;
  85. WCB$WC[1] = 2 + (TNM$TXTL / 10);
  86. ABHWORD[1] = TNM$TXTL;
  87. ABHADR[1] = AUDGR4$;
  88. FOR I=0 STEP 1 WHILE NPU$NID[I] NQ ABHSN[0] AND
  89. I LS CSNPCNT
  90. DO
  91. BEGIN
  92. END
  93. ABHABN[1] = I;
  94. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],TNM$TXT);
  95. FOR I=2 STEP 1 UNTIL MX$MTO
  96. DO
  97. BEGIN
  98. MTO$WORD[I] = 0;
  99. END
  100. A$CHAR = 0;
  101. BPOS = 0;
  102. CHARCNT = 1;
  103. MWC = 2;
  104. MCC = ABHTLC[0] - NONTXT$;
  105.  
  106. FOR WC=2 STEP 1 WHILE CHARCNT LQ MCC AND
  107. WC LS MX$MTO
  108. DO
  109. BEGIN
  110. FOR CHARPOS=0 STEP 6 WHILE CHARCNT LQ MCC AND
  111. CHARPOS LS 60
  112. DO
  113. BEGIN
  114. IF BPOS LQ 52
  115. THEN
  116. BEGIN
  117. A$CHAR = B<BPOS,8>MSG$WORD[MWC];
  118. B<CHARPOS,6>MTO$WORD[WC] = SSDCAD(A$CHAR);
  119. BPOS = BPOS + 8;
  120. END
  121. ELSE IF BPOS EQ 56
  122. THEN
  123. BEGIN
  124. B<52,4>A$CHAR = B<BPOS,4>MSG$WORD[MWC];
  125. MWC = MWC + 1;
  126. B<56,4>A$CHAR = B<0,4>MSG$WORD[MWC];
  127. B<CHARPOS,6>MTO$WORD[WC] = SSDCAD(A$CHAR);
  128. BPOS = 4;
  129. END
  130. ELSE
  131. BEGIN
  132. MWC = MWC + 1;
  133. A$CHAR = B<0,8>MSG$WORD[MWC];
  134. B<CHARPOS,6>MTO$WORD[WC] = SSDCAD(A$CHAR);
  135. BPOS = 8;
  136. END
  137. CHARCNT = CHARCNT + 1;
  138. END
  139. END
  140. IF CHARPOS LQ 48
  141. THEN
  142. BEGIN
  143. WC = WC - 1;
  144. END
  145. WCB$WC[1] = 2 + WC;
  146. ABHTLC[1] = WC * 10;
  147. SSTAQE(P<ORQ>,WCBUF[1],ABH[1],MTO$TXT);
  148. RETURN; # **** RETURN **** #
  149. END # CSESOM #
  150. TERM
cdc/nos2.source/nam5871/csesom.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator