User Tools

Site Tools


cdc:nos2.source:nam5871:ns_ind

NS$IND

Table Of Contents

  • [00016] PROC NS$IND(ERRCODE)
  • [00018] NS$IND - INITTIATE NPU DUMP.
  • [00022] INITIATE NPU DUMP.
  • [00065] PROC NS$DBG
  • [00071] FUNC EDATE
  • [00072] FUNC ETIME
  • [00073] PROC MOVEOK
  • [00074] PROC NS$ABH
  • [00075] FUNC NS$CHD C(4)
  • [00076] FUNC NS$FEC U
  • [00077] PROC NS$GNW
  • [00078] PROC NS$LSN
  • [00079] PROC NS$MSG
  • [00080] PROC NS$NDF
  • [00081] PROC NS$SGT
  • [00082] PROC NETPUT
  • [00083] PROC PDATE
  • [00084] PROC REQTSB
  • [00085] PROC TSBINFO
  • [00086] PROC VERSION

Source Code

NS$IND.txt
  1. *DECK NS$IND
  2. USETEXT COM$NS
  3. USETEXT DEF$NS
  4. USETEXT DTSB$NS
  5. USETEXT ERR$NS
  6. USETEXT NAT$NS
  7. USETEXT NPT$NS
  8. USETEXT NDCB$NS
  9. USETEXT NDF$NS
  10. USETEXT PIC$NS
  11. USETEXT PFC$NS
  12. USETEXT PRF$NS
  13. USETEXT SMB$NS
  14. USETEXT SMD$NS
  15.  
  16. PROC NS$IND(ERRCODE); # INITIATE NPU DUMP #
  17.  
  18. # TITLE NS$IND - INITTIATE NPU DUMP. #
  19.  
  20. BEGIN # NS$IND #
  21. #
  22. ** NS$IND - INITIATE NPU DUMP.
  23. *
  24. * J.C. LEE 1981
  25. *
  26. * THIS ROUTINE INITIATES NPU DUMP.
  27. *
  28. * PROC NS$IND(ERRCODE)
  29. *
  30. * ENTRY:
  31. * NONE.
  32. *
  33. * EXIT:
  34. * ERRCODE - IF A BAD DPCB FOUND IN NLF.
  35. *
  36. * METHOD:
  37. * CLEAR NPU-STATE.
  38. * SET NPU-PRIMARY-STATE TO "DUMPING NPU".
  39. * LOCATE PICB-TSB.
  40. * IF DPCB EXISTS:
  41. * SET XPCB-DIRECTIVE INDEX TO PICB INDEX OF
  42. * DPCB HEADER.
  43. * SET XPCB-END-DIRECTIVE INDEX TO PICB-INDEX
  44. * OF DPCB END DIRECTIVE.
  45. * FORMAT EVENT MESSAGE AND DISPATCH IT.
  46. * DEFINE NDF TO DEFINE A NPU DUMPFILE NPXXXYY.
  47. * IF NO ERROR:
  48. * IF "RT" IS SPECIFIED IN NS CONTROL CARD:
  49. * FORMAT AND NETPUT NPU/REL/R.
  50. * REQUEST TSB FOR NPU DUMP TSB.
  51. * STORE TSBN IN DUMP-TSBN.
  52. * INITIALIZE NDF PREFIX TABLE IN SM BUFFER.
  53. * TRANSFER NDF PREFIX TABLE TO NPU DUMP BUFFER.
  54. * START GLOBAL TIMER.
  55. * ELSE:
  56. * SET ERROR CODE AND EXIT.
  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. FUNC EDATE; # CONVERT PACKED DATE TO DISPLAY CODE #
  72. FUNC ETIME; # CONVERT PACKED TIME TO DISPLAY CODE #
  73. PROC MOVEOK; # ALLOW TSB TO MOVE #
  74. PROC NS$ABH; # FORMAT ABH #
  75. FUNC NS$CHD C(4); # CONVERT TO DISPLAY -CODED HEX #
  76. FUNC NS$FEC U; # FORMAT ERROR CODE #
  77. PROC NS$GNW; # GET NPU WORD #
  78. PROC NS$LSN; # INCREMENT LOAD SEQUENCE NUMBER #
  79. PROC NS$MSG; # DISPATCH MESSAGE #
  80. PROC NS$NDF; # DEFINE NDF #
  81. PROC NS$SGT; # START ACTIVITY TIMER #
  82. PROC NETPUT; # NETPUT #
  83. PROC PDATE; # GET PACKED BINARY DATE/TIME #
  84. PROC REQTSB; # REQUEST TSB #
  85. PROC TSBINFO; # LOCATE TSB #
  86. PROC VERSION; # GET OPERATING SYSTEM VERSION #
  87. END
  88.  
  89. ITEM I I; # INDEX TO DPCB HEADER #
  90. ITEM K I; # INDEX TO LAST DPCB DIRECTIVE #
  91. ITEM NDFPFN C(7); # PFN OF NPU DUMP FILE #
  92. ITEM OPSVERSION C(10); # OPERATING SYSTEM VERSION #
  93. ITEM PICBTSBN U; # TSB NUMBER OF PICB #
  94. ITEM TEMP U; # TEMPORARY VARIABLE #
  95. ITEM TSBN U; # TSB NUMBER #
  96. ITEM TSBFWA U; # TSB FWA #
  97. ITEM TSBSIZE U; # TSB SIZE #
  98.  
  99. ARRAY COMMENT [0:0] S(7);
  100. BEGIN # PREFIX TABLE COMMENT LISTABLE BY CATALOG/ITEMIZE #
  101. ITEM NDFCOMMENT C(0,0,70) = # COMMENT TEXT #
  102. [" NPUNAME/VARNPU MEMORY DUMP FOR HALT XXXX AT AAAA."];
  103. ITEM CMTNPUNAME C(0,12,7); # NPU NAME #
  104. ITEM CMTNPUVAR C(1,0,6); # NPU VARIANT NAME #
  105. ITEM CMTHALT C(3,48,4); # NPU HALT CODE #
  106. ITEM CMTPREG C(4,36,4); # NPU P-REGISTER CONTENT #
  107. END
  108.  
  109. ARRAY STAT [0:0] S(1);
  110. BEGIN
  111. ITEM STATWORD U(00,00,60); # PARAMETER FOR VERSION CALL #
  112. ITEM BC U(00,00,12); # NO OF 12-BIT BYTES TO RETURN #
  113. ITEM SB U(00,12,12); # STARTING BYTE IN SOURCE FIELD #
  114. ITEM BP U(00,24,12); # STARTING BYTE IN RECEIVING FIL#
  115. ITEM WADDR I(00,42,18); # ADDRESS TO RECEIVE VERSION NO #
  116. END
  117.  
  118. DEF L$EM21 # 3 #; # LENGTH IN CM WORDS #
  119. DEF DM$EM21 # DM$LOCAL+DM$EVENT+DM$NAMLOG #; # ROUTE OPTION #
  120. ARRAY MSG$EM21 [0:0] S(L$EM21);
  121. BEGIN
  122. ITEM EM21$TEXT C(0,0,22) = # EVENT MESSAGE TEXT #
  123. ["NPUNAME, DUMP STARTED."];
  124. ITEM EM21$NPNAM C(0,00,7); # NPU NAME #
  125. ITEM EM21$END U(2,12,48) = [0]; # END OF TEXT #
  126. END
  127.  
  128. ARRAY ABH [0:0] S(1);
  129. BEGIN # APPLICATION BLOCK HEADER WORD FOR NPD/REL/SM #
  130. ITEM ABH$ABT U(00,00,06) = [APPCMD];
  131. ITEM ABH$ADR U(00,06,12) = [0];
  132. ITEM ABH$ABN U(00,18,18) = [0];
  133. ITEM ABH$ACT U(00,36,04) = [CT60TRANS];
  134. ITEM ABH$DBC U(00,40,08) = [0];
  135. ITEM ABH$TLC U(00,48,12) = [LNPD];
  136. END
  137.  
  138. ARRAY SM$NPDREL [0:0] S(LNPD);
  139. BEGIN # NPD/REL/SM #
  140. ITEM SM$PFCSFC U(00,00,16) = [NPDREL]; # PFC/SFC CODE #
  141. ITEM SM$F1 U(00,16,44) = [0];
  142. END
  143.  
  144. CONTROL EJECT;
  145.  
  146. $BEGIN
  147. NS$DBG("IND"); # TRACE CALL #
  148. $END
  149.  
  150. ERRCODE = 0;
  151. NAT$STATE[0] = 0; # CLEAR NPU STATE #
  152. NAT$PSTATE[0] = S"NPS$DNPU"; # PRIMARY STATE = DUMPING NPU #
  153. #
  154.   LOCATE PICB
  155. #
  156. PICBTSBN = NAT$PITSBN[0]; # TSB NUMBER OF PICB #
  157. TSBINFO(TSBSIZE,TSBFWA,PICBTSBN); # LOCATE PICB #
  158. P<PICB> = TSBFWA; # FWA OF PICB #
  159. I = PICB$HDRL + PICB$PARWL; # INDEX TO DPCB HEADER #
  160. K = I + PICB$LDPCB[PICB$HDRL] - 1; # INDEX TO LAST DPCB DIRECTIVE#
  161.  
  162. IF PICB$PCBID[I] EQ ID$DPCB # VALID IDENTIFIER #
  163. AND K LQ PICB$BS[0] # DPCB SIZE WITHIN LIMIT #
  164. AND PICB$CODE[K] EQ DIRCODE"ENDPCB" # END DIRECTIVE EXISTS #
  165. THEN # VALID DPCB #
  166. BEGIN # INITIATE NPU DUMP PROCEDURE #
  167. NAT$PDIRI[0] = I; # CURRENT DPCB DIRECTIVE INDEX#
  168. NAT$PENDI[0] = K; # LAST DPCB DIRECTIVE INDEX #
  169. EM21$NPNAM[0] = NPNAM; # SET NPU NAME #
  170. NS$MSG(MSG$EM21,L$EM21,DM$EM21); # SEND EVENT MESSAGE #
  171.  
  172. NS$NDF(NDFPFN,ERRCODE); # DEFINE NDF #
  173.  
  174. IF ERRCODE EQ 0
  175. THEN # NDF DEFINED #
  176. BEGIN
  177. REQTSB(L$DTSB,TSBFWA,TSBN); # REQUEST TSB FOR DUMP TSB #
  178.  
  179. NAT$NDTSBN[0] = TSBN; # SAVE DUMP TSB NUMBER IN NAT #
  180. P<DTSB$HDR> = TSBFWA; # FWA OF DTSB #
  181. PDATE(DTSB$HDR); # SET PACKED BINARY DATE/TIME #
  182. DTSB$ID[0] = DTSB$IDENT; # SET TSB IDENTIFIER #
  183. DTSB$BS[0] = L$DTSB; # SET TSB SIZE #
  184.  
  185. $BEGIN
  186. IF RT EQ ASC$YY
  187. THEN # RELEASE TRACE FILE #
  188. NETPUT(ABH,SM$NPDREL); # SEND NPD/REL/SM TO NIP #
  189. $END
  190. #
  191.   INITIALIZE FET FOR SEQUENTIAL WRITE OF NDF
  192. #
  193. P<DTSB$FET> = P<DTSB$HDR> + L$DTSBHDR; # FWA OF FET #
  194. DFET$LFN[0] = NDFPFN; # SET LFN #
  195. DFET$FM[0] = TRUE; # SET BINARY FILE MODE#
  196. DFET$COMP[0] = TRUE; # SET COMPLETE BIT #
  197. P<DTSB$BUF> = P<DTSB$FET> + L$DFET; # FWA OF CIO BUFFER #
  198. DFET$LEN[0] = L$DFET - 5; # FET LENGTH #
  199. DFET$FIRST[0] = P<DTSB$BUF>; # FIRST PTR #
  200. DFET$IN[0] = P<DTSB$BUF> + L$PRFNDF; # IN PTR #
  201. DFET$OUT[0] = P<DTSB$BUF>; # OUT PTR #
  202. DFET$LIMIT[0] = P<DTSB$BUF> + L$DBUF; # LIMIT PTR #
  203. #
  204.   FORMAT PREFIX TABLE FOR NDF
  205. #
  206. P<PRF$TABLE> = P<DTSB$BUF>;
  207. PRF$ID[0] = PRF$IDENT; # PREFIX TABLE IDENTIFIER #
  208. PRF$WC[0] = L$PRFNDF; # SET NDF PREFIX TABLE SIZE #
  209. PRF$LFN[0] = NDFPFN; # SET DUMP FILE LFN #
  210. TEMP = EDATE(DTSB$DDATE[0]); # GET DISPLAY-CODED DUMP DATE #
  211. PRF$DATE[0] = C<1,8>TEMP; # SET DUMP DATE #
  212. TEMP = ETIME(DTSB$DTIME[0]); # GET DISPLAY-CODED DUMP TIME #
  213. PRF$TIME[0] = C<1,8>TEMP; # SET DUMP TIME #
  214. STATWORD[0] = 0; # SET UP PARAMETERS FOR VERSION #
  215. BC[0] = 5;
  216. WADDR[0] = LOC(OPSVERSION);
  217. VERSION(STAT); # GET VERSION OF OPERATING SYS #
  218. PRF$OPS[0] = OPSVERSION; # SET OPS VERSION #
  219. PRF$NSVER[0] = NSVER[0]; # SET NS VERSION #
  220. CMTNPUNAME[0] = NPNAM; # SET NPU NAME IN COMMENT #
  221. PRF$NPNAME[0] = NPNAM; # SET NPU NAME #
  222.  
  223. TSBN = NAT$SMTSBN[0]; # TSB NO OF DUMP NDCB RESPONSE #
  224. TSBINFO(TSBSIZE,TSBFWA,TSBN); # LOCATE NDCB TSB #
  225. P<NDCB> = TSBFWA; # FWA OF DUMP NDCB RESPONSE #
  226. NS$GNW(NDCB,LNPUDTDN,NDCBINDEX"NDCB$PREG",TEMP);
  227. PRF$NPPREG[0] = TEMP; # SET P-REGISTER HEX VALUE #
  228. CMTPREG[0] = NS$CHD(TEMP); # DISPLAY-CODED HEX P-REG #
  229. PRF$NPUVAR[0] = NPT$NPUVAR[NTORD]; # SET NPU VARIANT #
  230. CMTNPUVAR[0] = NPT$NPUVAR[NTORD]; # SET NPU VARIANT NAME #
  231. PRF$NPUID[0] = NPT$NN[NTORD]; # SET NPU NODE NO #
  232. NS$GNW(NDCB,LNPUDTDN,NDCBINDEX"NDCB$HALTC",TEMP);
  233. PRF$NPHALT[0] = TEMP; # SET HEX HALT CODE #
  234. CMTHALT[0] = NS$CHD(TEMP); # DISPLAY-CODED HEX HALT CODE #
  235. PRF$COMMNT[0] = NDFCOMMENT[0];
  236. MOVEOK(TSBN); # ALLOW NDCB TSB TO MOVE #
  237. NS$LSN; # ASSIGN LSN FOR DUMP SEQUENCE #
  238.  
  239.  
  240. NS$SGT; # START ACTIVITY TIMER #
  241.  
  242. END
  243. END
  244.  
  245. ELSE # NLF ERROR-BAD DPCB #
  246. BEGIN
  247. ERRCODE = NS$FEC(EC"ERR$FILE",FEC"ERR$DPCB");
  248. END
  249.  
  250. MOVEOK(PICBTSBN); # ALLOW PICB TSB TO MOVE #
  251.  
  252. RETURN;
  253. END # NS$IND #
  254. TERM
cdc/nos2.source/nam5871/ns_ind.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator