User Tools

Site Tools


cdc:nos2.source:nam5871:ns_n04

NS$N04

Table Of Contents

  • [00011] PROC NS$N04(ERRCODE)
  • [00013] NS$N04 - PROCESS NPU/DT/N (DUMP NDCB).
  • [00017] PROCESS NPU/DT/N (DUMP NDCB).
  • [00065] PROC NS$DBG
  • [00071] PROC MOVE
  • [00072] PROC MOVEOK
  • [00073] PROC NS$GNW
  • [00074] PROC NS$IND
  • [00075] PROC NS$INL
  • [00076] PROC NS$MSG
  • [00077] PROC NS$XPD
  • [00078] PROC REQTSB
  • [00079] PROC TSBINFO
  • [00080] FUNC NS$CHD C(4)

Source Code

NS$N04.txt
  1. *DECK NS$N04
  2. USETEXT COM$NS
  3. USETEXT DEF$NS
  4. USETEXT NAT$NS
  5. USETEXT NDCB$NS
  6. USETEXT NPT$NS
  7. USETEXT NST$NS
  8. USETEXT SMB$NS
  9. USETEXT SMD$NS
  10.  
  11. PROC NS$N04(ERRCODE); # PROCESS NPU/DT/N (DUMP NDCB) #
  12.  
  13. # TITLE NS$N04 - PROCESS NPU/DT/N (DUMP NDCB). #
  14.  
  15. BEGIN # NS$N04 #
  16. #
  17. ** NS$N04 - PROCESS NPU/DT/N (DUMP NDCB).
  18. *
  19. * J.C. LEE 1981
  20. *
  21. * THIS ROUTINE PROCESSES NPU/DT/N (DUMP NDCB).
  22. *
  23. * PROC NS$N04(ERRCODE)
  24. *
  25. * ENTRY:
  26. * NONE.
  27. *
  28. * EXIT:
  29. * ERRCODE.
  30. *
  31. * METHOD:
  32. * RESET RETRY COUNT TO 0.
  33. * IF LONG-TERM-DUMP FLAG = "YY", SET FLAG IN NPT.
  34. * IF LONG-TERM-DUMP FLAG = "NN", CLEAR FLAG IN NPT.
  35. * ELSE, SET FLAG TO DEFAULT-DUMP FLAG.
  36. * CALCULATE TSB SIZE AND ALLOCATE TSB FOR NDCB.
  37. * MOVE NDCB DATA TO TSB.
  38. * FORMAT NETWORK LOG FILE MESSAGE TO INFORM THE NOP
  39. * THE HALT CODE AND P-REGISTER CONTENT.
  40. * DETERMINATE IF NPU IS DUMPED.
  41. * IF RELOAD DUMP FLAG IS GARBAGE:
  42. * IF NPU LOADED TOO OFTEN:
  43. * INHIBIT NPU DUMP.
  44. * IF NS NOT IN NORMAL MODE:
  45. * SET NS TO START UP MODE.
  46. * ELSE
  47. * IF LONG-TERM-DUMP FLAG IS GARBAGE:
  48. * SET DUMP-NPU TO "YY".
  49. * ELSE, SET DUMP-NPU TO LONG-TERM-DUMP FLAG.
  50. * ELSE:
  51. * SET DUMP-NPU TO RELOAD-DUMP FLAG.
  52. * IF IN DEBUG MODE, SET DUMP-NPU TO "YY".
  53. * IF DUMP-NPU EQ "YY", INITIATE NPU DUMP.
  54. * ELSE, INITIATE NPU LOAD.
  55. * IF NO ERROR FROM DUMP/LOAD, PROCESS NEXT
  56. * NEXT XPCB DIRECTIVE.
  57. *
  58. #
  59.  
  60. ITEM ERRCODE U; # ERROR CODE #
  61.  
  62. $BEGIN
  63. XREF
  64. BEGIN
  65. PROC NS$DBG; # TRACE PROCEDURE CALL #
  66. END
  67. $END
  68.  
  69. XREF
  70. BEGIN
  71. PROC MOVE; # MOVE DATA #
  72. PROC MOVEOK; # ALLOW TSB TO MOVE #
  73. PROC NS$GNW; # GET NPU WORD #
  74. PROC NS$IND; # INITIATE NPU DUMP PROCEDURE #
  75. PROC NS$INL; # INITIATE NPU LOAD PROCEDURE #
  76. PROC NS$MSG; # DISPATCH MESSAGE #
  77. PROC NS$XPD; # PROCESS NEXT XPCB DIRECTIVE #
  78. PROC REQTSB; # REQUEST TSB #
  79. PROC TSBINFO; # LOCATE TSB #
  80. FUNC NS$CHD C(4); # CONVERT HEX CHARACTER TO DISPLAY-CODED #
  81. END
  82.  
  83. ITEM DUMPNPU U; # DUMP NPU SETTING #
  84. ITEM FLAG B; # LONG TERM DUMP FLAG IN NPT #
  85. ITEM LTDF U; # LONG TERM DUMP FLAG IN NDCB #
  86. ITEM NHC U; # NPU HALT CODE #
  87. ITEM NPR U; # NPU P-REGISTER #
  88. ITEM RDF U; # RELOAD DUMP FLAG IN NDCB #
  89. ITEM TSBFWA U; # TSB FWA #
  90. ITEM TSBN U; # TSB NUMBER #
  91. ITEM TSBSIZE U; # TSB SIZE #
  92.  
  93. DEF L$M04 # 3 #;
  94. DEF DM$M04 # DM$LOCAL+DM$NAMLOG #; # ROUTING OPTION #
  95. ARRAY MSG$M04 [0:0] S(L$M04);
  96. BEGIN
  97. ITEM M04$TEXT C(0,0,27) = # MESSAGE TEXT #
  98. ["NPUNAME, HALT XXXX AT AAAA."];
  99. ITEM M04$NPNAM C(0,00,7); # NPU NAME #
  100. ITEM M04$NHC C(1,24,04); # NPU HALT CODE #
  101. ITEM M04$NPR C(2,12,04); # NPU P-REGISTER #
  102. ITEM M04$END U(2,42,18) = [0]; # END OF TEXT #
  103. END
  104.  
  105. CONTROL EJECT;
  106.  
  107. $BEGIN
  108. NS$DBG("N04"); # TRACE CALL #
  109. $END
  110.  
  111. ERRCODE = 0;
  112.  
  113. NAT$RETRYS[0] = 0;
  114. NS$GNW(SMB$BUFFER,LNPUDTDN,NDCBINDEX"NDCB$RDF",RDF);
  115. NS$GNW(SMB$BUFFER,LNPUDTDN,NDCBINDEX"NDCB$LTDF",LTDF);
  116.  
  117. IF LTDF EQ ASC$YY
  118. THEN # LONG TERM DUMP FLAG SET #
  119. FLAG = TRUE;
  120.  
  121. ELSE
  122. BEGIN
  123. IF LTDF EQ ASC$NN
  124. THEN # LONG TERM DUMP FLAG CLEARED #
  125. FLAG = FALSE;
  126.  
  127. ELSE
  128. FLAG = NPT$F$DFDM[NTORD]; # SET TO DEFAULT DUMP FLAG #
  129. END
  130. NPT$F$LTDF[NTORD] = FLAG; # UPDATE NPT LONG TERM LTDF FLAG#
  131.  
  132. TSBSIZE = (2*ABHTLC[0] + 14) / 15; # TSB SIZE FOR NDCB #
  133. REQTSB(TSBSIZE,TSBFWA,TSBN); # ALLOCATE TSB FOR NDCB #
  134. P<NDCB> = TSBFWA; # NDCB TSB FWA #
  135. MOVE(TSBSIZE,SMB$BUFFER,NDCB); # MOVE NDCB DATA TO TSB #
  136. NDCB$WORD[0] = 0; # CLEAR NDCB TSB HEADER WORD #
  137. NDCB$ID[0] = NDCB$IDENT; # NDCB IDENTIFIER #
  138. NDCB$BS[0] = TSBSIZE; # NDCB TSB SIZE #
  139. NAT$SMTSBN[0] = TSBN; # SAVE NDCB TSB NUMBER IN NAT #
  140. MOVEOK(TSBN); # ALLOW NDCB TSB TO MOVE #
  141. NS$GNW(SMB$BUFFER,LNPUDTDN,NDCBINDEX"NDCB$HALTC",NHC);
  142. NS$GNW(SMB$BUFFER,LNPUDTDN,NDCBINDEX"NDCB$PREG",NPR);
  143. #
  144.   FORMAT NETWORK LOG FILE MESSAGE TO INFORM THE NPU
  145.   HALT CODE AND P-REGISTER CONTENT
  146. #
  147. M04$NPNAM[0] = NPNAM; # SET NPU NAME #
  148. M04$NHC[0] = NS$CHD(NHC); # DISPLAY-CODED HEX HALT CODE #
  149. M04$NPR[0] = NS$CHD(NPR); # DISPLAY-CODED HEX P-REGISTER #
  150. NS$MSG(MSG$M04,L$M04,DM$M04); # DISPATCH MESSAGE #
  151. #
  152.   DETERMINE IF NPU IS TO BE DUMPED
  153. #
  154. TSBN = NPT$NSTTSB[NTORD]; # TSB NUMBER OF NST #
  155. TSBINFO(TSBSIZE,TSBFWA,TSBN); # LOCATE NST #
  156. P<NST> = TSBFWA; # FWA OF NST #
  157.  
  158. IF RDF NQ ASC$YY
  159. AND RDF NQ ASC$NN
  160. THEN # RELOAD DUMP FLAG IS GARBAGE #
  161. BEGIN
  162.  
  163. IF CURTIME LS NST$DTIMER[0]
  164. AND NST$LCOUNT[0] GQ MAX$LC
  165. THEN # NPU LOADED TOO OFTEN #
  166. DUMPNPU = ASC$NN; # INHIBIT NPU DUMP #
  167.  
  168. ELSE
  169. BEGIN
  170. IF NSM NQ M$NORMAL # NS STARTED UP FOR LESS THAN 10 MIN #
  171. AND NST$LC[0] EQ 0 # INITIAL LOAD REQUEST FOR THIS NPU #
  172. THEN # THE SPECIFIED FDP DICTATES WHETHER TO DUMP NPU #
  173. DUMPNPU = NSM; # SET TO NS START-UP MODE #
  174.  
  175. ELSE
  176. BEGIN
  177. IF LTDF NQ ASC$YY
  178. AND LTDF NQ ASC$NN
  179. THEN # LONG TERM DUMP FLAG IS GARBAGE#
  180. DUMPNPU = ASC$YY; # DUMP NPU #
  181.  
  182. ELSE
  183. DUMPNPU = LTDF; # SET TO LONG TERM DUMP SETTING #
  184. END
  185.  
  186. END
  187.  
  188. END
  189.  
  190. ELSE
  191. DUMPNPU = RDF; # SET TO RELOAD DUMP SETTING #
  192.  
  193. IF NST$SLFC[0] GR 1
  194. THEN # SUCCESSIVE LOAD FAILURE #
  195. DUMPNPU = ASC$NN; # INHIBIT NPU DUMP #
  196.  
  197. MOVEOK(TSBN); # ALLOW NST TO MOVE #
  198.  
  199. IF MODE$DEBUG
  200. THEN # DEBUG MODE ACTIVATED, DUMP NPU #
  201. DUMPNPU = ASC$YY;
  202.  
  203. IF DUMPNPU EQ ASC$YY
  204. THEN # TAKE NPU DUMP #
  205. NS$IND(ERRCODE); # INITIATE NPU DUMP PROCEDURE #
  206.  
  207. ELSE # INHIBIT NPU DUMP #
  208. NS$INL(ERRCODE); # INITIATE NPU LOAD PROCEDURE #
  209.  
  210. IF ERRCODE EQ 0
  211. THEN # PROCESS PROCEDURE DIRECTIVES #
  212. NS$XPD(ERRCODE);
  213.  
  214. RETURN;
  215. END # NS$N04 #
  216. TERM
cdc/nos2.source/nam5871/ns_n04.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator