*DECK NS$N04 USETEXT COM$NS USETEXT DEF$NS USETEXT NAT$NS USETEXT NDCB$NS USETEXT NPT$NS USETEXT NST$NS USETEXT SMB$NS USETEXT SMD$NS PROC NS$N04(ERRCODE); # PROCESS NPU/DT/N (DUMP NDCB) # # TITLE NS$N04 - PROCESS NPU/DT/N (DUMP NDCB). # BEGIN # NS$N04 # # ** NS$N04 - PROCESS NPU/DT/N (DUMP NDCB). * * J.C. LEE 1981 * * THIS ROUTINE PROCESSES NPU/DT/N (DUMP NDCB). * * PROC NS$N04(ERRCODE) * * ENTRY: * NONE. * * EXIT: * ERRCODE. * * METHOD: * RESET RETRY COUNT TO 0. * IF LONG-TERM-DUMP FLAG = "YY", SET FLAG IN NPT. * IF LONG-TERM-DUMP FLAG = "NN", CLEAR FLAG IN NPT. * ELSE, SET FLAG TO DEFAULT-DUMP FLAG. * CALCULATE TSB SIZE AND ALLOCATE TSB FOR NDCB. * MOVE NDCB DATA TO TSB. * FORMAT NETWORK LOG FILE MESSAGE TO INFORM THE NOP * THE HALT CODE AND P-REGISTER CONTENT. * DETERMINATE IF NPU IS DUMPED. * IF RELOAD DUMP FLAG IS GARBAGE: * IF NPU LOADED TOO OFTEN: * INHIBIT NPU DUMP. * IF NS NOT IN NORMAL MODE: * SET NS TO START UP MODE. * ELSE * IF LONG-TERM-DUMP FLAG IS GARBAGE: * SET DUMP-NPU TO "YY". * ELSE, SET DUMP-NPU TO LONG-TERM-DUMP FLAG. * ELSE: * SET DUMP-NPU TO RELOAD-DUMP FLAG. * IF IN DEBUG MODE, SET DUMP-NPU TO "YY". * IF DUMP-NPU EQ "YY", INITIATE NPU DUMP. * ELSE, INITIATE NPU LOAD. * IF NO ERROR FROM DUMP/LOAD, PROCESS NEXT * NEXT XPCB DIRECTIVE. * # ITEM ERRCODE U; # ERROR CODE # $BEGIN XREF BEGIN PROC NS$DBG; # TRACE PROCEDURE CALL # END $END XREF BEGIN PROC MOVE; # MOVE DATA # PROC MOVEOK; # ALLOW TSB TO MOVE # PROC NS$GNW; # GET NPU WORD # PROC NS$IND; # INITIATE NPU DUMP PROCEDURE # PROC NS$INL; # INITIATE NPU LOAD PROCEDURE # PROC NS$MSG; # DISPATCH MESSAGE # PROC NS$XPD; # PROCESS NEXT XPCB DIRECTIVE # PROC REQTSB; # REQUEST TSB # PROC TSBINFO; # LOCATE TSB # FUNC NS$CHD C(4); # CONVERT HEX CHARACTER TO DISPLAY-CODED # END ITEM DUMPNPU U; # DUMP NPU SETTING # ITEM FLAG B; # LONG TERM DUMP FLAG IN NPT # ITEM LTDF U; # LONG TERM DUMP FLAG IN NDCB # ITEM NHC U; # NPU HALT CODE # ITEM NPR U; # NPU P-REGISTER # ITEM RDF U; # RELOAD DUMP FLAG IN NDCB # ITEM TSBFWA U; # TSB FWA # ITEM TSBN U; # TSB NUMBER # ITEM TSBSIZE U; # TSB SIZE # DEF L$M04 # 3 #; DEF DM$M04 # DM$LOCAL+DM$NAMLOG #; # ROUTING OPTION # ARRAY MSG$M04 [0:0] S(L$M04); BEGIN ITEM M04$TEXT C(0,0,27) = # MESSAGE TEXT # ["NPUNAME, HALT XXXX AT AAAA."]; ITEM M04$NPNAM C(0,00,7); # NPU NAME # ITEM M04$NHC C(1,24,04); # NPU HALT CODE # ITEM M04$NPR C(2,12,04); # NPU P-REGISTER # ITEM M04$END U(2,42,18) = [0]; # END OF TEXT # END CONTROL EJECT; $BEGIN NS$DBG("N04"); # TRACE CALL # $END ERRCODE = 0; NAT$RETRYS[0] = 0; NS$GNW(SMB$BUFFER,LNPUDTDN,NDCBINDEX"NDCB$RDF",RDF); NS$GNW(SMB$BUFFER,LNPUDTDN,NDCBINDEX"NDCB$LTDF",LTDF); IF LTDF EQ ASC$YY THEN # LONG TERM DUMP FLAG SET # FLAG = TRUE; ELSE BEGIN IF LTDF EQ ASC$NN THEN # LONG TERM DUMP FLAG CLEARED # FLAG = FALSE; ELSE FLAG = NPT$F$DFDM[NTORD]; # SET TO DEFAULT DUMP FLAG # END NPT$F$LTDF[NTORD] = FLAG; # UPDATE NPT LONG TERM LTDF FLAG# TSBSIZE = (2*ABHTLC[0] + 14) / 15; # TSB SIZE FOR NDCB # REQTSB(TSBSIZE,TSBFWA,TSBN); # ALLOCATE TSB FOR NDCB # P = TSBFWA; # NDCB TSB FWA # MOVE(TSBSIZE,SMB$BUFFER,NDCB); # MOVE NDCB DATA TO TSB # NDCB$WORD[0] = 0; # CLEAR NDCB TSB HEADER WORD # NDCB$ID[0] = NDCB$IDENT; # NDCB IDENTIFIER # NDCB$BS[0] = TSBSIZE; # NDCB TSB SIZE # NAT$SMTSBN[0] = TSBN; # SAVE NDCB TSB NUMBER IN NAT # MOVEOK(TSBN); # ALLOW NDCB TSB TO MOVE # NS$GNW(SMB$BUFFER,LNPUDTDN,NDCBINDEX"NDCB$HALTC",NHC); NS$GNW(SMB$BUFFER,LNPUDTDN,NDCBINDEX"NDCB$PREG",NPR); # FORMAT NETWORK LOG FILE MESSAGE TO INFORM THE NPU HALT CODE AND P-REGISTER CONTENT # M04$NPNAM[0] = NPNAM; # SET NPU NAME # M04$NHC[0] = NS$CHD(NHC); # DISPLAY-CODED HEX HALT CODE # M04$NPR[0] = NS$CHD(NPR); # DISPLAY-CODED HEX P-REGISTER # NS$MSG(MSG$M04,L$M04,DM$M04); # DISPATCH MESSAGE # # DETERMINE IF NPU IS TO BE DUMPED # TSBN = NPT$NSTTSB[NTORD]; # TSB NUMBER OF NST # TSBINFO(TSBSIZE,TSBFWA,TSBN); # LOCATE NST # P = TSBFWA; # FWA OF NST # IF RDF NQ ASC$YY AND RDF NQ ASC$NN THEN # RELOAD DUMP FLAG IS GARBAGE # BEGIN IF CURTIME LS NST$DTIMER[0] AND NST$LCOUNT[0] GQ MAX$LC THEN # NPU LOADED TOO OFTEN # DUMPNPU = ASC$NN; # INHIBIT NPU DUMP # ELSE BEGIN IF NSM NQ M$NORMAL # NS STARTED UP FOR LESS THAN 10 MIN # AND NST$LC[0] EQ 0 # INITIAL LOAD REQUEST FOR THIS NPU # THEN # THE SPECIFIED FDP DICTATES WHETHER TO DUMP NPU # DUMPNPU = NSM; # SET TO NS START-UP MODE # ELSE BEGIN IF LTDF NQ ASC$YY AND LTDF NQ ASC$NN THEN # LONG TERM DUMP FLAG IS GARBAGE# DUMPNPU = ASC$YY; # DUMP NPU # ELSE DUMPNPU = LTDF; # SET TO LONG TERM DUMP SETTING # END END END ELSE DUMPNPU = RDF; # SET TO RELOAD DUMP SETTING # IF NST$SLFC[0] GR 1 THEN # SUCCESSIVE LOAD FAILURE # DUMPNPU = ASC$NN; # INHIBIT NPU DUMP # MOVEOK(TSBN); # ALLOW NST TO MOVE # IF MODE$DEBUG THEN # DEBUG MODE ACTIVATED, DUMP NPU # DUMPNPU = ASC$YY; IF DUMPNPU EQ ASC$YY THEN # TAKE NPU DUMP # NS$IND(ERRCODE); # INITIATE NPU DUMP PROCEDURE # ELSE # INHIBIT NPU DUMP # NS$INL(ERRCODE); # INITIATE NPU LOAD PROCEDURE # IF ERRCODE EQ 0 THEN # PROCESS PROCEDURE DIRECTIVES # NS$XPD(ERRCODE); RETURN; END # NS$N04 # TERM