User Tools

Site Tools


cdc:nos2.source:nam5871:nphecp

NPHECP

Table Of Contents

  • [00012] PRGM NPHECP
  • [00069] PROC XTRACE
  • [00070] PROC OMSG
  • [00071] PROC MSETIL
  • [00072] PROC MCLRIL
  • [00073] PROC MRELS
  • [00074] FUNC XCDD C(10)

Source Code

NPHECP.txt
  1. *DECK NPHECP
  2. USETEXT NIPDEF
  3. USETEXT BACKBUF
  4. USETEXT NBT
  5. USETEXT PT
  6. USETEXT PARAMP
  7. USETEXT NHEADER
  8. USETEXT NCNT
  9. USETEXT PCNB
  10. USETEXT DRHDR
  11. USETEXT SUPMSG
  12. PRGM NPHECP;
  13. STARTIMS;
  14. #
  15. *1DC NPHECP
  16. *
  17. *
  18. * 1. PROC NAME AUTHOR DATE
  19. * NPHECP A. BEN-ARTZI 82/09/14
  20. *
  21. * 2. FUNCTIONAL DESCRIPTION
  22. * PROCESS HE/CP FROM PIP
  23. *
  24. * 3. METHOD USED
  25. * CLEAR NBT DOWN LINE BLOCKS QUEUED
  26. *
  27. * 4. ENTRY PARAMETERS
  28. * PARAMP1 - SM BUFFER (HE/CP)
  29. *
  30. * 5. EXIT PARAMETERS
  31. * PARAMP2 - IF NON-ZERO THEN BAD BLOCK
  32. *
  33. * 6. SYMPL TEXTS USED
  34. * NIPDEF
  35. * BACKBUF SPECIAL BUFFER FOR DOWNLINE BACKS
  36. * NBT
  37. * SUPMSG PARAMP OPSIZE
  38. * NHEADER DRHDR
  39. *
  40. * 7. ROUTINES CALLED
  41. * XTRACE - TRACE PROCEDURE CALL
  42. * OMSG - SEND MESSAGE TO DAYFILE
  43. * MSETIL - SET INTERLOCK TO PIP
  44. * MCLRIL - CLEAR PIP INTERLOCK
  45. * OCTCON - CONVERT TO OCTAL DISPLAY CODE
  46. * XCDD - CONVERT TO DECIMAL DISPLAY CODE
  47. * MRELS - RELEASE BUFFER
  48. *
  49. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  50. * THIS PRIMARY OVERLAY IS CALLED BY NPNIPSM.
  51. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY
  52. *CALL OPSIZE
  53. *
  54.  #
  55. STOPIMS;
  56.  
  57. #
  58.  PARAMP1 - SM BUFFER (HE/CP)
  59.  
  60. EXIT PARAMETER
  61.  PARAMP2 - IF NON-ZERO THEN BAD BLK
  62. #
  63.  
  64. #
  65.   EXTERNAL VARIABLES
  66. #
  67. XREF
  68. BEGIN
  69. PROC XTRACE; # TRACE PROCEDURE CALL #
  70. PROC OMSG ;
  71. PROC MSETIL ;
  72. PROC MCLRIL ;
  73. PROC MRELS ;
  74. FUNC XCDD C(10) ;
  75. LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL #
  76. END
  77.  
  78. #
  79.   INTERNAL VARIABLES
  80. #
  81.  
  82. ITEM NBTIND; # CURRENT INDEX INTO NBT INPUT FET #
  83. ITEM FOUND B; # CET ENTRY FOUND FLAG #
  84. ITEM TEMP ; # LOOP VARIABLE #
  85. ITEM I; # LOOP VARIABLE #
  86. ITEM CNXX; # TEMPORARY VARIABLE FOR CONNECTION NUMBER#
  87. ARRAY TWORD S(2) ;
  88. BEGIN
  89. ITEM TWORD1 U(0,0,60) ;
  90. ITEM TWORD2 U(1,0,60) ;
  91. END
  92. ARRAY HECPMS S(4) ;
  93. BEGIN
  94. ITEM HECPM0 C(0,0,30) = ["EST XXX - FRONT END INTERFACE "];
  95. ITEM HECPM2 C(2,0,10) = ["ERROR EE. "];
  96. ITEM HECPM3 U(3,0,60) = [0]; # END OF MESSAGE #
  97. ITEM HE$XXX1 C(0,24,1); # 1ST DIGIT OF THE FRONT END EST #
  98. ITEM HE$XXX2 C(0,30,1); # 2ND DIGIT OF THE FRONT END EST #
  99. ITEM HE$XXX3 C(0,36,1); # 3RD DIGIT OF THE FRONT END EST #
  100. ITEM HE$EE C(2,36,2) = [0]; # ERROR CODE #
  101. END
  102. ARRAY EHECPMS S(3) ;
  103. BEGIN
  104. ITEM EHECPM0 C(0,0,25)=["NW01, NNN,FFEE, CCC ."];
  105. ITEM EHECPM2 U(2,6,54)=[0]; # END OF MESSAGE #
  106. ITEM EHE$NNN C(0,36,3); # COUPLER NODE NUMBER #
  107. ITEM EHE$EE1 C(1,12,1); #FIRST DIGIT OF COUPLER STATUS WORD #
  108. ITEM EHE$EE2 C(1,18,1); #SECOND DIGIT OF COUPLER STATUS WORD#
  109. ITEM EHE$CCC1 C(1,36,1);
  110. ITEM EHE$CCC2 C(1,42,1);
  111. ITEM EHE$CCC3 C(1,48,1);
  112. END
  113. ARRAY HEXCONP [0:15] P(1) ;
  114. BEGIN
  115. ITEM V C(0,0,1) = ["0","1","2","3","4","5","6","7",
  116. "8","9","A","B","C","D","E","F"];
  117. END
  118.  
  119. #**********************************************************************#
  120.  
  121.  
  122. BEGIN
  123.  
  124. CONTROL IFEQ DEBUG,1;
  125. XTRACE("NHECP");
  126. CONTROL FI;
  127.  
  128. P<NHEADER> = PARAMP1 + BLKHSIZE;
  129.  
  130. FOUND = FALSE;
  131. FOR I = 0 STEP NBTFETNO WHILE NOT FOUND AND I LQ NBTMAXID
  132. DO # SEARCH NBT FOR MATCHING COUPLER NODE #
  133. BEGIN
  134. IF NBTIUF[I] AND NBTHN[I] EQ DN[0]
  135. THEN
  136. BEGIN # FOUND NBT ENTRY #
  137. FOUND = TRUE;
  138. NBTIND = I; # SAVE NBT INDEX #
  139. END
  140. END
  141. IF FOUND
  142. THEN
  143. BEGIN # NBT FOUND #
  144. HE$XXX1[0] = V [ NBTEST1[NBTIND] ]; #1ST DIGIT OF FRONT END EST#
  145. HE$XXX2[0] = V [ NBTEST2[NBTIND] ]; #2ND DIGIT OF FRONT END EST#
  146. HE$XXX3[0] = V [ NBTEST3[NBTIND] ]; #3RD DIGIT OF FRONT END EST#
  147. P<SMNIP> = P<NHEADER> + NBHSIZE;
  148. I = HEEC[0]; #COUPLER ERROR CODE FROM PIP#
  149. TEMP = XCDD(I); #CONVERT ERROR CODE TO DECIMAL DISPLAY CODE#
  150. HE$EE[0] = C<8,2>TEMP;
  151. OMSG(HECPMS,0); #DAYFILE COUPLER ERROR MESSAGE#
  152.  
  153. I = DN[0]; #HOST NODE NUMBER OF COUPLER#
  154. TEMP = XCDD(I); #CONVERT ERROR CODE TO DECIMAL DISPLAY CODE#
  155. EHE$NNN[0] = C<7,3>TEMP;
  156. EHE$EE1[0] = V [ HEEC1[0] ]; #FORMAT HEXADECIMAL ERROR CODE#
  157. EHE$EE2[0] = V [ HEEC2[0] ];
  158. EHE$CCC1[0] = V [ HECSR1[0] ]; #COUPLER STATUS WORD, DIGIT 1#
  159. EHE$CCC2[0] = V [ HECSR2[0] ]; #COUPLER STATUS WORD, DIGIT 2#
  160. EHE$CCC3[0] = V [ HECSR3[0] ]; #COUPLER STATUS WORD, DIGIT 3#
  161. OMSG(EHECPMS,4) ; # SEND MESSAGE TO ERROR LOG FILE #
  162.  
  163. # UPDATE NBT #
  164. #
  165.   RELEASE ALL DOWN LINE MESSAGES (ALWAYS AT LEAST ONE)
  166. #
  167. IF NOT HEMDI[0] # IF SOFT ERROR FLAG NOT SET #
  168. THEN
  169. BEGIN
  170. MSETIL(0) ;
  171. FOR I = NBTIND+2 STEP 1 UNTIL NBTIND+4 DO
  172. BEGIN
  173. P<DRHDRWD> = NBTFIRST[I];
  174. FOR TEMP = TEMP WHILE P<DRHDRWD> NQ 0 # WE DID NOT PASS #
  175. DO
  176. BEGIN
  177. IF BLKID[0] EQ PRUSPECID
  178. THEN
  179. BEGIN # SPECIAL OUTBOUND BLK FOR PCNB #
  180. P<NHEADER> = P<DRHDRWD> + BLKHSIZE ;
  181. P<PCNB> = NHWORD[0] ; #CAN NOW CONVERT NCNB TO PCNB#
  182. CNXX = PCNBCN[0] ; # SAVE CONNECTION NUMBER #
  183. # SET BATCH STREAM STATE AND BLOCK HANDLER STATE #
  184. P<NCNT> = PCNBCTAD[0] ;
  185. NCNTBSS[CNXX + NCNTHSIZE] = BSSI ;
  186. IF PCNBDT[0] EQ DT$CR
  187. OR ( PCNBXFR[0] # FILE TRANSFER CONN #
  188. AND PCNBREC[0] ) # RECEIVING #
  189. THEN
  190. BEGIN
  191. NCNTBHS[CNXX + NCNTHSIZE] = BHSPRUI ; # INPUT PRU #
  192. END
  193. ELSE
  194. BEGIN
  195. NCNTBHS[CNXX + NCNTHSIZE] = BHSPRUO ; # PRU OUTPUT #
  196. END
  197. PCNBID[0] = PCNBIDVALUE ; # ID NOW IS PCNB #
  198. BLKID[0] = POBIDVALUE; # CONVERT TO REGULAR ID #
  199. END
  200. TEMP = NEXTPTR[0] ; # NEXT DOWN-LINE MESSAGE #
  201. IF (P<DRHDRWD> LS BACKBLWA) AND
  202. (P<DRHDRWD> GQ BACKBFWA)
  203. THEN # THIS IS BACK ENTRY IN BACK BUFFER #
  204. BEGIN
  205. P<DRHDRWD> = P<DRHDRWD> - 1; # 1ST WD OF BCK BUF ENTRY#
  206. CMWORD[0] = BACKFFREE; # PTR TO NEXT FREE ENTRY #
  207. BACKFFREE = P<DRHDRWD>; # NEW FIRST FREE ENTRY #
  208. END
  209. ELSE # THIS IS REGULAR DYNAMIC BUFFER #
  210. BEGIN
  211. MRELS(P<DRHDRWD>); # RELEASE BUFFER #
  212. END
  213. P<DRHDRWD> = TEMP ;
  214. END
  215. NBTOUT[I] = 0 ;
  216. NBTIN [I] = 0 ;
  217. NBTFIRST[I] = 0 ;
  218. END
  219.  
  220. MCLRIL ;
  221. END # END OF SOFT ERROR FLAG #
  222. END # END OF FOUND #
  223. GOTO RJMAIN ;
  224. END
  225. TERM
cdc/nos2.source/nam5871/nphecp.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator