User Tools

Site Tools


cdc:nos2.source:nam5871:ns_xpd

NS$XPD

Table Of Contents

  • [00016] PROC NS$XPD(ERRCODE)
  • [00018] NS$XPD - PROCESS DUMP/LOAD PROCEDURE DIRECTIVES.
  • [00022] PROCESS DUMP/LOAD PROCEDURE DIRECTIVES.
  • [00075] PROC NS$DBG
  • [00081] PROC MOVEOK
  • [00082] PROC NETPUT
  • [00083] PROC NS$FBH
  • [00084] FUNC NS$FEC U
  • [00085] PROC NS$FLN
  • [00086] PROC NS$FLR
  • [00087] PROC NS$GNW
  • [00088] PROC NS$INL
  • [00089] PROC NS$MSG
  • [00090] PROC NS$SDB
  • [00091] PROC NS$SLB
  • [00092] PROC NS$SLT
  • [00093] PROC NS$TNA
  • [00094] PROC RECALL
  • [00095] PROC RETERN
  • [00096] PROC RETTSB
  • [00097] PROC TSBINFO
  • [00098] PROC WRITEF

Source Code

NS$XPD.txt
  1. *DECK NS$XPD
  2. USETEXT COM$NS
  3. USETEXT DEF$NS
  4. USETEXT DTSB$NS
  5. USETEXT ERR$NS
  6. USETEXT NAT$NS
  7. USETEXT NDCB$NS
  8. USETEXT NPT$NS
  9. USETEXT NST$NS
  10. USETEXT PFC$NS
  11. USETEXT PIC$NS
  12. USETEXT SMB$NS
  13. USETEXT SMD$NS
  14. USETEXT STC$NS
  15.  
  16. PROC NS$XPD(ERRCODE); # PROCESS DUMP/LOAD PROCEDURE DIRECTIVES #
  17.  
  18. # TITLE NS$XPD - PROCESS DUMP/LOAD PROCEDURE DIRECTIVES. #
  19.  
  20. BEGIN # NS$XPD #
  21. #
  22. ** NS$XPD - PROCESS DUMP/LOAD PROCEDURE DIRECTIVES.
  23. *
  24. * J.C. LEE 1981
  25. *
  26. * THIS ROUTINE PROCESSES DUMP/LOAD PROCEDURE DIRECTIVES.
  27. *
  28. * PROC NS$XPD(ERRCODE)
  29. *
  30. * ENTRY:
  31. * NONE.
  32. *
  33. * EXIT:
  34. * ERRCODE.
  35. *
  36. * METHOD:
  37. * CLEAR ERRCODE.
  38. * LOCATE PICB.
  39. * SET DONE TO FALSE.
  40. * SET I TO 0.
  41. * WHILE NOT DONE
  42. * AND ERRCODE EQ 0
  43. * AND LQ NAT$PENDI:
  44. * DO
  45. * INCREMENT INDEX TO NEXT DIRECTIVE.
  46. * UPDATE PICB DIRECTIVE INDEX.
  47. * CLEAR SECONDARY STATE.
  48. * STORE DIRECTIVE IN NAT.
  49. * CASE ON PRIMARY STATE TO DETERMINE IF DIRECTIVE IS
  50. * VALID FOR THE PROCEDURE CONTROL BLOCK IN PROCESS:
  51. * 1) ILLEGAL STATE:
  52. * DAYFILE MESSAGE AND ABORT.
  53. * 2) SAM-LOAD:
  54. * CASE ON XPCB DIRECTIVE CODE.
  55. * (ILLEGAL, LOAD, START, ILLEGAL, ILLEGAL,
  56. * ILLEGAL, ILLEGAL)
  57. * 3) NPU-DUMP:
  58. * CASE ON XPCB DIRECTIVE CODE.
  59. * (DUMP, LOAD, START, ILLEGAL, ILLEGAL,
  60. * ILLEGAL, SAVE-DUMP, ILLEGAL)
  61. * 4) NPU-LOAD:
  62. * CASE ON XPCB DIRECTIVE.
  63. * (DUMP, LOAD, START, ILLEGAL, START-C,
  64. * LOAD-NCB, ILLEGAL, ILLEGAL)
  65. * EXECUTE XPCB DIRECTIVE.
  66. * ENDWHILE
  67. *
  68. #
  69.  
  70. ITEM ERRCODE U; # ERROR CODE #
  71.  
  72. $BEGIN
  73. XREF
  74. BEGIN
  75. PROC NS$DBG; # TRACE PROCEDURE CALLS #
  76. END
  77. $END
  78.  
  79. XREF
  80. BEGIN
  81. PROC MOVEOK; # ALLOW TSB TO MOVE #
  82. PROC NETPUT; # NETPUT #
  83. PROC NS$FBH; # FORMAT ABH FOR NETWORK SM #
  84. FUNC NS$FEC U; # FORMAT ERROR CODE #
  85. PROC NS$FLN; # SEND NPU/DT/R(LOAD NDCB) #
  86. PROC NS$FLR; # FIND LOAD MODULE RECORD #
  87. PROC NS$GNW; # GET NPU WORD #
  88. PROC NS$INL; # INITIATE NPU LOAD #
  89. PROC NS$MSG; # DISPATCH MESSAGE #
  90. PROC NS$SDB; # SEND DUMP BATCH #
  91. PROC NS$SLB; # SEND LOAD BATCH #
  92. PROC NS$SLT; # START RESPONSE TIMER #
  93. PROC NS$TNA; # TERMINATE NPU ACTIVITY #
  94. PROC RECALL; # MACREL RECALL #
  95. PROC RETERN; # MACREL RETURN #
  96. PROC RETTSB; # RELEASE TSB #
  97. PROC TSBINFO; # LOCATE TSB #
  98. PROC WRITEF; # MACREL WRITEF #
  99. END
  100.  
  101. STATUS XPCBCODE # CASES FOR XPCB DIRECTIVE PROCESSING #
  102. DUMP, # DUMP SPECIFIED AREA #
  103. LOAD, # LOAD SPECIFIED MODULE #
  104. START, # START NPU, WAIT FOR RESPONSE #
  105. STARTC, # RESTORE NDCB, START NPU #
  106. LOADNCB, # LOAD NDCB #
  107. SAVENDF, # SAVE NPU DUMP FILE #
  108. ENDSPCB, # END OF SPCB #
  109. ENDDPCB, # END OF DPCB #
  110. ENDLPCB, # END OF LPCB #
  111. ILLEGAL, # ILLEGAL XPCB DIRECTIVE #
  112. ;
  113.  
  114. ITEM CODE U; # DIRECTIVE CODE #
  115. ITEM DONE B; # CURRENT DIRECTIVE PROCESSED #
  116. ITEM K I; # TEMPORARY, PICB INDEX #
  117. ITEM I I; # INDUCTION VARIABLE #
  118. ITEM LMNAME C(6); # LOAD MODULE NAME #
  119. ITEM PICBTSBN U; # TSB NO OF PICB TSB #
  120. ITEM RI U; # RANDOM INDEX OF FIRST MODULE RECORD #
  121. ITEM SS U; # TEMPORARY VARIABLE #
  122. ITEM TSBFWA U; # TSB FWA #
  123. ITEM TSBSIZE U; # TSB SIZE #
  124.  
  125. ARRAY VDIRTAB [0:DIRCODE"ENDPCB"] S(1);
  126. BEGIN # VALID DIRECTIVE TABLE FOR XPCB #
  127. ITEM LSAMCODE S:XPCBCODE(00,06,18) = [ # VALID SPCB DIRECTIVE #
  128. S"ILLEGAL",
  129. S"LOAD",
  130. S"ILLEGAL",
  131. S"ILLEGAL",
  132. S"STARTC",
  133. S"ILLEGAL",
  134. S"ILLEGAL",
  135. S"ILLEGAL",
  136. S"ILLEGAL",
  137. S"ILLEGAL",
  138. S"ILLEGAL",
  139. S"ILLEGAL",
  140. S"ILLEGAL",
  141. S"ILLEGAL",
  142. S"ILLEGAL",
  143. S"ENDSPCB",
  144. ];
  145. ITEM DNPUCODE S:XPCBCODE(00,24,18) = [ # VALID DPCB DIRECTIVE #
  146. S"DUMP",
  147. S"LOAD",
  148. S"START",
  149. S"ILLEGAL",
  150. S"ILLEGAL",
  151. S"ILLEGAL",
  152. S"SAVENDF",
  153. S"ILLEGAL",
  154. S"ILLEGAL",
  155. S"ILLEGAL",
  156. S"ILLEGAL",
  157. S"ILLEGAL",
  158. S"ILLEGAL",
  159. S"ILLEGAL",
  160. S"ILLEGAL",
  161. S"ENDDPCB",
  162. ];
  163. ITEM LNPUCODE S:XPCBCODE(00,42,18) = [ # VALID LPCB DIRECTIVE #
  164. S"DUMP",
  165. S"LOAD",
  166. S"START",
  167. S"ILLEGAL",
  168. S"STARTC",
  169. S"LOADNCB",
  170. S"ILLEGAL",
  171. S"ILLEGAL",
  172. S"ILLEGAL",
  173. S"ILLEGAL",
  174. S"ILLEGAL",
  175. S"ILLEGAL",
  176. S"ILLEGAL",
  177. S"ILLEGAL",
  178. S"ILLEGAL",
  179. S"ENDLPCB",
  180. ];
  181. END
  182.  
  183. DEF L$EM30 # 3 #;
  184. DEF DM$EM30 # DM$LOCAL+DM$EVENT+DM$NAMLOG #; # ROUTING OPT #
  185. ARRAY MSG$EM30 [0:0] S(L$EM30);
  186. BEGIN
  187. ITEM EM27$TEXT C(0,0,27) = # EVENT MESSAGE TEXT #
  188. ["NPUNAME, LOADING (XXXXXX). "];
  189. ITEM EM30$NPNAM C(0,00,7); # NPU NAME #
  190. ITEM EM30$LMNAM C(01,48,06); # LOAD MODULE NAME #
  191. ITEM EM30$END U(02,42,18) = [0]; # END OF TEXT #
  192. END
  193.  
  194. $BEGIN
  195. DEF L$EM60 # 4 #;
  196. DEF DM$EM60 # DM$LOCAL+DM$NAMLOG #; # ROUTING OPT #
  197. ARRAY MSG$EM60 [0:0] S(L$EM60);
  198. BEGIN
  199. ITEM EM60$TEXT C(0,0,32) = # MESSAGE TEXT #
  200. ["NPUNAME, ILLEGAL PICB DIRECTIVE."];
  201. ITEM EM60$NPNAM C(0,00,7); # NPU NAME #
  202. ITEM EM60$END U(3,12,48) = [0]; # END OF TEXT #
  203. END
  204. $END
  205.  
  206. DEF L$EM11 # 3 #;
  207. DEF DM$EM11 # DM$LOCAL+DM$EVENT+DM$NAMLOG #; # ROUTING OPT #
  208. ARRAY MSG$EM11 [0:0] S(L$EM11);
  209. BEGIN
  210. ITEM EM11$TEXT C(0,0,28) = # EVENT MESSAGE TEXT #
  211. ["NPUNAME, SAM LOAD COMPLETED."];
  212. ITEM EM11$NPNAM C(0,00,7); # NPU NAME #
  213. ITEM EM11$END U(02,48,12) = [0]; # END OF TEXT #
  214. END
  215.  
  216. DEF L$EM22 # 4 #;
  217. DEF DM$EM22 # DM$LOCAL+DM$EVENT+DM$NAMLOG #; # ROUTING OPT #
  218. ARRAY MSG$EM22 [0:0] S(L$EM22);
  219. BEGIN
  220. ITEM EM22$TEXT C(0,0,32) = # EVENT MESSAGE TEXT #
  221. ["NPUNAME, DUMP XXXXXXX COMPLETED."];
  222. ITEM EM22$NPNAM C(0,00,7); # NPU NAME #
  223. ITEM EM22$NDPFN C(1,24,7); # NPU DUMP FILE PFN #
  224. ITEM EM22$END U(3,12,48) = [0]; # END OF TEXT #
  225. END
  226.  
  227. DEF L$EM31 # 3 #;
  228. DEF DM$EM31 # DM$LOCAL+DM$EVENT+DM$NAMLOG #; # ROUTING OPT #
  229. ARRAY MSG$EM31 [0:0] S(L$EM31);
  230. BEGIN
  231. ITEM EM31$TEXT C(0,0,24) = # EVENT MESSAGE TEXT #
  232. ["NPUNAME, LOAD COMPLETED."];
  233. ITEM EM31$NPNAM C(0,00,7); # NPU NAME #
  234. ITEM EM31$END U(2,24,36) = [0]; # END OF TEXT #
  235. END
  236.  
  237. DEF L$XPDABT # 2 #;
  238. DEF DM$XPDABT # DM$LOCAL+DM$ABORT #; # ROUTING OPTIONS #
  239. ARRAY MSG$XPDABT [0:0] S(L$XPDABT);
  240. BEGIN
  241. ITEM XPDA$TEXT C(0,0,18) = # MESSAGE TEXT #
  242. ["INVALID NPU STATE."];
  243. ITEM XPDA$END U(01,48,12) = [0]; # END OF TEXT #
  244. END
  245.  
  246. SWITCH XPCBCASE:XPCBCODE # STATUS SWITCH FOR DIRECTIVE PROCESSING#
  247. C$DUMP:DUMP, # DUMP DIRECTIVE #
  248. C$LOAD:LOAD, # LOAD DIRECTIVE #
  249. C$START:START, # START DIRECTIVE #
  250. C$STARTC:STARTC, # STARTC DIRECTIVE #
  251. C$LOADNCB:LOADNCB, # LOAD NCB DIRECTIVE #
  252. C$SAVENDF:SAVENDF, # SAVE NDF DIRECTIVE #
  253. C$ENDSPCB:ENDSPCB, # END DIRECTIVE IN SPCB #
  254. C$ENDDPCB:ENDDPCB, # END DIRECTIVE IN DPCB #
  255. C$ENDLPCB:ENDLPCB, # END DIRECTIVE IN LPCB #
  256. C$ILLEGAL:ILLEGAL; # ILLEGAL DIRECTIVE #
  257.  
  258. SWITCH NPSCASE:PRISTATE # STATUS SWITCH FOR NPU PRIMARY STATE #
  259. NPS0:NPS$NONO, # IDLE STATE #
  260. NPS1:NPS$LSAM, # LOADING SAM #
  261. NPS2:NPS$DNPU, # DUMPING NPU #
  262. NPS3:NPS$LNPU, # LOADING NPU #
  263. NPS0:NPS$DNDCB; # DUMPING NDCB #
  264.  
  265. CONTROL EJECT;
  266.  
  267. $BEGIN
  268. NS$DBG("XPD");
  269. $END
  270.  
  271. ERRCODE = 0;
  272. DONE = FALSE;
  273. I = 0;
  274. PICBTSBN = NAT$PITSBN[0]; # TSB NUMBER OF PICB TSB #
  275. TSBINFO(TSBSIZE,TSBFWA,PICBTSBN); # LOCATE PICB #
  276. P<PICB> = TSBFWA; # FWA OF PICB #
  277.  
  278. FOR K = 0 WHILE NOT DONE
  279. AND ERRCODE EQ 0
  280. AND I LQ NAT$PENDI[0]
  281. DO # PROCESS NEXT XPCB DIRECTIVE #
  282. BEGIN
  283. I = NAT$PDIRI[0] + 1; # INCREMENT INDEX TO NEXT DIRECTIVE #
  284. NAT$PDIRI[0] = I; # UPDATE PICB DIRECTIVE INDEX #
  285. NAT$SSTATE[0] = 0; # CLEAR SECONDARY STATE #
  286. NAT$PCBDIR[0] = PICB$ENTRY[I]; # STORE DIRECTIVE IN NAT #
  287. CODE = NAT$CODE[0]; # DIRECTIVE CODE #
  288. #
  289.   CASE ON PRIMARY STATE TO DETERMINE IF DIRECTIVE IS VALID
  290.   FOR THE PROCEDURE CONTROL BLOCK CURRENTLY BEING PROCESSED
  291. #
  292. SS = NAT$PSTATE[0]; # PRIMARY STATE #
  293. GOTO NPSCASE[SS];
  294.  
  295. NPS0: # ILLEGAL STATE, ABORT NS #
  296. BEGIN
  297. NS$MSG(MSG$XPDABT,L$XPDABT,DM$XPDABT);
  298. END
  299.  
  300. NPS1: # LOADING SAM #
  301. CODE = LSAMCODE[CODE];
  302. GOTO NPSXPCB;
  303.  
  304. NPS2: # DUMPING NPU #
  305. CODE = DNPUCODE[CODE];
  306. GOTO NPSXPCB;
  307.  
  308. NPS3: # LOADING NPU #
  309. CODE = LNPUCODE[CODE];
  310. GOTO NPSXPCB;
  311.  
  312. NPSXPCB: # SWITCH ON XPCB DIRECTIVE CODE #
  313. GOTO XPCBCASE[CODE];
  314.  
  315. C$DUMP: # PROCESS DUMP DIRECTIVE #
  316. NS$SDB; # SEND DUMP BATCH #
  317. NAT$SSTATE[0] = S"NSS$WDUMP"; # WAITING FOR DUMP RESPONSE #
  318. NS$SLT; # START RESPONSE TIMER #
  319. GOTO EXITXPCB; # EXIT DIRECTIVE PROCESSING #
  320.  
  321. C$LOAD: # PROCESS LOAD DIRECTIVE #
  322. LMNAME = NAT$LMNAME[0]; # NAME OF LOAD MODULE #
  323. NS$FLR(LMNAME,RI,SS,ERRCODE); # FIND LOAD MODULE ON NLF #
  324. SENDLB:
  325. IF ERRCODE EQ 0
  326. THEN # LOAD MODULE FOUND #
  327. BEGIN
  328. NS$SLB(LMNAME,RI,ERRCODE); # SEND LOAD BATCH #
  329.  
  330. IF ERRCODE EQ 0
  331. THEN # LOAD BATCH SENT #
  332. BEGIN
  333. NS$SLT; # START RESPONSE TIMER #
  334. NAT$SSTATE[0] = S"NSS$WLOAD"; # WAITING FOR LOAD RESPONSE #
  335. EM30$NPNAM[0] = NPNAM; # NPU NAME #
  336. EM30$LMNAM[0] = LMNAME; # LOAD MODULE NAME #
  337. NS$MSG(MSG$EM30,L$EM30,DM$EM30); # DISPATCH EVENT MSG #
  338. END
  339. END
  340.  
  341. GOTO EXITXPCB; # EXIT DIRECTIVE PROCESSING #
  342.  
  343. C$START: # PROCESS START DIRECTIVE #
  344. NS$FBH(LNPUDTSR,TRUE); # FORMAT ABH FOR NETWORK SM #
  345. PFCSFC[0] = NPUDT; # FORMAT NPU/DT/R(START) #
  346. NPUPO[0] = NAT$PN[0]; # SET PORT NUMBER #
  347. NPUSP[0] = NAT$SPN[0]; # SET SUBPORT NUMBER #
  348. NPULS[0] = NAT$LSN[0]; # SET LOAD SEQUENCE NO #
  349. NPUCC[0] = CMDCODE"CC$STRTR"; # SET COMMAND CODE #
  350. NETPUT(ABH$WORD,SMB$BUFFER); # SEND NPU/DT/R(START) #
  351. NAT$SSTATE[0] = S"NSS$WSTART"; # WAITING FOR START RESPONSE #
  352. NS$SLT; # START RESPONSE TIMER #
  353. GOTO EXITXPCB; # EXIT DIRECTIVE PROCESSING #
  354.  
  355. C$STARTC: # PROCESS STARTC DIRECTIVE #
  356. IF NAT$PSTATE[0] EQ S"NPS$LSAM"
  357. THEN # LOADING SAM #
  358. BEGIN # SEND NPU/DT/R(STARTC) #
  359. NS$FBH(LNPUDTSC,TRUE); # FORMAT ABH FOR NETWORK SM #
  360. PFCSFC[0] = NPUDT;
  361. NPUPO[0] = NAT$PN[0]; # SET PORT NUMBER #
  362. NPUSP[0] = NAT$SPN[0]; # SET SUBPORT NUMBER #
  363. NPULS[0] = NAT$LSN[0]; # SET LOAD SEQUENCE NUMBER #
  364. NPUCC[0] = CMDCODE"CC$STRTC";# SET COMMAND CODE #
  365. NETPUT(ABH$WORD,SMB$BUFFER); # SEND STARTC REQUEST #
  366. GOTO NEXTDIR; # PROCESS NEXT SPCB DIRECTIVE #
  367. END
  368.  
  369. NS$FLN(FALSE); # SEND NPU/DT/R (LOAD NDCB) #
  370. NAT$SSTATE[0] = S"NSS$WNDCB"; # WAITING FOR LOAD NDCB RESPONSE#
  371. NS$SLT; # START RESPONSE TIMER #
  372. GOTO EXITXPCB; # EXIT DIRECTIVE PROCESSING #
  373.  
  374. C$LOADNCB: # PROCESS LOAD NCB DIRECTIVE #
  375. IF NPT$NCBSZ[NTORD] LQ NAT$NCBSZ[0]
  376. THEN # NCB SIZE WITHIN ALLOWED LIMIT #
  377. BEGIN # LOAD NCB INTO NPU #
  378. LMNAME = "NCB"; # LOAD MODULE IS NCB #
  379. RI = NPT$NCBRI[NTORD]; # RANDOM INDEX OF NCB ON NCF #
  380. NAT$NCBFWA[0] = NAT$DIRP2[0]; # NCB FWA #
  381. NAT$LMNAME[0] = LMNAME; # SAVE LOAD MODULE NAME #
  382. END
  383.  
  384. ELSE # NCB SIZE EXCEEDS ALLOWED LIMIT#
  385. BEGIN
  386. ERRCODE = NS$FEC(EC"ERR$FILE",FEC"ERR$NCBSIZ");
  387. END
  388.  
  389. GOTO SENDLB; # SEND LOAD BATCH #
  390.  
  391. C$SAVENDF:
  392. NAT$F$SNDF[0] = TRUE; # SET SAVE NPU DUMP FLAG #
  393. GOTO NEXTDIR; # CONTINUE WITH NEXT DIRECTIVE #
  394.  
  395. C$ILLEGAL: # PROCESS ILLEGAL XPCB DIRECTIVE #
  396. $BEGIN
  397. EM60$NPNAM[0] = NPNAM; # NPU NAME #
  398. NS$MSG(MSG$EM60,L$EM60,DM$EM60); # DISPATCH MESSAGE #
  399. $END
  400.  
  401. NAT$DEC[0] = NAT$DEC[0] + 1; # INCREMENT DIRECTIVE ERROR CNT #
  402. IF NAT$DEC[0] GR MAX$DEC
  403. THEN # ILLEGAL DIRECTIVE IN PICB #
  404. BEGIN
  405. ERRCODE = NS$FEC(EC"ERR$FILE",FEC"ERR$PICBD");
  406. END
  407.  
  408. GOTO NEXTDIR; # CONTINUE WITH NEXT DIRECTIVE #
  409.  
  410. C$ENDSPCB: # PROCESS END OF SAM LOAD PROCEDURE #
  411. STC$SAML = STC$SAML + 1; # INCREMENT NO OF SAM LOADS #
  412. EM11$NPNAM[0] = NPNAM; # NPU NAME #
  413. NS$MSG(MSG$EM11,L$EM11,DM$EM11); # DISPATCH MESSAGE #
  414. TSBINFO(TSBSIZE,TSBFWA,NPT$NSTTSB[NTORD]); # LOCATE NST #
  415. P<NST> = TSBFWA;
  416. NST$SAMSPC[0] = 0; # CLEAR CONSECUTIVE SAM PREEMPT COUNT #
  417. MOVEOK(NPT$NSTTSB[NTORD]); # ALLOW NST TO MOVE #
  418. NS$TNA; # TERMINATE NPU ACTIVITY #
  419. GOTO EXITXPCB; # EXIT DIRECTIVE PROCESSING #
  420.  
  421. C$ENDDPCB: # PROCESS END OF NPU DUMP PROCEDURE #
  422. TSBINFO(TSBSIZE,TSBFWA,NAT$NDTSBN[0]); # LOCATE DUMP TSB #
  423. P<DTSB$HDR> = TSBFWA;
  424. P<DTSB$FET> = TSBFWA + L$DTSBHDR; # FWA OF DUMP FET #
  425. WRITEF(DTSB$FET); # WRITE END OF FILE TO NPXXXYY #
  426.  
  427. EM22$NPNAM[0] = NPNAM; # SET NPU NAME #
  428. EM22$NDPFN[0] = DFET$LFN[0]; # SET PFN OF NPU DUMP FILE #
  429. NS$MSG(MSG$EM22,L$EM22,DM$EM22); # DISPATCH MESSAGE #
  430.  
  431. STC$DUMPS = STC$DUMPS + 1; # INCREMENTS DUMPS GENERATED #
  432. TSBINFO(TSBSIZE,TSBFWA,NPT$NSTTSB[NTORD]); # LOCATE NST TSB #
  433. P<NST> = TSBFWA; # FWA OF NST #
  434. TSBINFO(TSBSIZE,TSBFWA,NAT$SMTSBN[0]); # LOCATE DUMP NDCB RESP #
  435. P<NDCB> = TSBFWA; # FWA OF DUMP NDCB RESPONSE #
  436. NST$DPDATE[0] = DTSB$PDATE[0]; # MOST RECENT DUMP DATE/TIME #
  437. NST$NDFPFN[0] = DFET$LFN[0]; # MOST RECENT DUMP FILE PFN #
  438. NS$GNW(NDCB,LNPUDTDN,NDCBINDEX"NDCB$HALTC",SS);
  439. NST$NHC[0] = SS; # SET NPU HALT CODE #
  440. NS$GNW(NDCB,LNPUDTDN,NDCBINDEX"NDCB$PREG",SS);
  441. NST$NPR[0] = SS; # RESET NPU P-REGISTER CONTENT #
  442. MOVEOK(NPT$NSTTSB[NTORD]); # ALLOW NST TO MOVE #
  443. MOVEOK(NAT$SMTSBN[0]); # ALLOW NDCB DUMP RESP TO MOVE #
  444. RECALL(DTSB$FET); # WAIT UNTIL WRITEF COMPLETES #
  445. RETERN(DTSB$FET); # RETURN NPU DUMP FILE #
  446. RECALL(DTSB$FET); # WAIT UNTIL RECALL COMPLETES #
  447. RETTSB(NAT$NDTSBN[0]); # RELEASE DUMP TSB #
  448. NAT$NDTSBN[0] = 0; # CLEAR DUMP TSB NUMBER #
  449. NAT$F$SNDF[0] = FALSE; # CLEAR SAVE NDF FLAG #
  450. NS$INL(ERRCODE); # INITIATE NPU LOAD #
  451. GOTO NEXTDIR; # CONTINUE WITH NEXT DIRECTIVE #
  452.  
  453. C$ENDLPCB: # PROCESS END OF NPU LOAD PROCEDURE #
  454. EM31$NPNAM[0] = NPNAM; # SET NPU NAME #
  455. NS$MSG(MSG$EM31,L$EM31,DM$EM31); # DISPATCH EVENT MESSAGE #
  456.  
  457. TSBINFO(TSBSIZE,TSBFWA,NPT$NSTTSB[NTORD]); # LOCATE NST #
  458. P<NST> = TSBFWA; # UPDATE NST #
  459. NST$LPDATE[0] = NAT$LPDATE[0]; # SET MOST RECENT LOAD DATE/TIME#
  460. NST$LC[0] = NST$LC[0] + 1; # INCREMENT LOAD COUNT #
  461. NST$SLFC[0] = 0; # CLEAR SUCCESSIVE LOAD FAILURE COUNT #
  462.  
  463. IF CURTIME LS NST$DTIMER[0]
  464. THEN # ANOTHER LOAD BEFORE DTIMER EXPIRES #
  465. BEGIN # INCREMENT LOAD COUNT WITHIN DTIMER #
  466. NST$LCOUNT[0] = NST$LCOUNT[0] + 1;
  467. END
  468.  
  469. ELSE # DTIMER ALREADY TIMES OUT #
  470. BEGIN
  471. NST$DTIMER[0] = CURTIME + DTIMER; # RESTART DTIMER #
  472. NST$LCOUNT[0] = 1; # RESET LOAD COUNT WITHIN DTIMER TO 1 #
  473. END
  474.  
  475. MOVEOK(NPT$NSTTSB[NTORD]); # ALLOW NST TO MOVE #
  476.  
  477. IF NAT$F$RMTL[0]
  478. THEN # LOADING REMOTE NPU #
  479. BEGIN
  480. STC$REML = STC$REML + 1; # INCREMENT REMOTE LOAD COUNT #
  481. NS$FBH(LNPUIN,TRUE); # FORMAT ABH FOR NPU/IN/N #
  482. PFCSFC[0] = NPUINN;
  483. NPUPO[0] = NAT$PN[0]; # SET PORT NUMBER #
  484. NPUSP[0] = NAT$SPN[0]; # SET SUBPORT NUMBER #
  485. NPULT[0] = LOADTYPE"LT$REMOT"; # SET REMOTE LOAD TYPE #
  486.  
  487. NETPUT(ABH$WORD,SMB$BUFFER); # SEND NPU/IN/N #
  488. END
  489.  
  490. ELSE # LOADING LOCAL NPU #
  491.  
  492. STC$LOCL = STC$LOCL + 1; # INCREMENT NO OF LOCAL LOADS #
  493.  
  494. NS$TNA; # TERMINATE NPU ACTIVITY #
  495.  
  496. GOTO EXITXPCB; # EXIT DIRECTIVE PROCESSING #
  497.  
  498. EXITXPCB: # DIRECTIVE DONE, EXIT XPCB PROCESSING #
  499. DONE = TRUE;
  500.  
  501. NEXTDIR:
  502. END
  503.  
  504.  
  505. MOVEOK(PICBTSBN); # ALLOW PICB TO MOVE #
  506.  
  507. RETURN;
  508. END # NS$XPD #
  509. TERM
cdc/nos2.source/nam5871/ns_xpd.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator