*DECK NS$SDB
USETEXT DTSB$NS
USETEXT NAT$NS
USETEXT NDF$NS
USETEXT PFC$NS
USETEXT SMB$NS
USETEXT SMD$NS
PROC NS$SDB; # SEND DUMP BATCH #
# TITLE NS$SDB - SEND DUMP BATCH. #
BEGIN # NS$SDB #
#
** NS$SBD - SEND DUMP BATCH.
*
* J.C. LEE 1981
*
* THIS ROUTINE SEND A DUMP BATCH.
*
* PROC NS$SDB
*
* ENTRY:
* NONE.
*
* EXIT:
* NONE.
*
* METHOD:
* ACCESS NAT.
* EXTRACT DUMP-EA AND DUMP-BA FROM NAT.
* FOR FOREVER WHILE DUMP-BA LQ DUMP-EA
* AND DUMP-BATCH-COUNT HASNOT REACHED LIMIT:
* COMPUTE DUMP-EA.
* FORMAT NPU/DT/R (DUMP)
* FORMAT ABH.
* NETPU NPU/DT/R
* INCREMENT DUMP-BATCH-COUNT.
* SET DUMP-BA TO DUMP-EA PLUS ONE.
* UPDATE DUMP-BA IN NAT.
* STORE DUMP-BATCH-COUNT IN NAT.
* SET DUMP-BLOCK-BATCH-COUNT.
* SET DUMP-BLOCK-EA.
* TRANSFER DUMP-BLOCK-HEADER TO NPU-DUMP BUFFER.
*
#
$BEGIN
XREF
BEGIN
PROC NS$DBG; # TRACE PROCEDURE CALL #
END
$END
XREF
BEGIN
PROC MOVEOK; # ALLOW TSB TO MOVE #
PROC NETPUT; # NETPUT #
PROC NS$FBH; # FORMAT ABH #
PROC RECALL; # RECALL #
PROC TSBINFO; # LOCATE TSB #
PROC WRITEW; # CALL WRITEW MACRO #
END
ITEM DBA U; # DUMP BEGINNING ADDRESS #
ITEM DEA U; # DUMP ENDING ADDRESS #
ITEM DTSBN U; # DUMP TSB NUMBER #
ITEM I I; # DUMP BATCH COUNT #
ITEM TEMPEA U; # TEMPORARY VARIABLE #
ITEM TSBFWA U; # TSB FWA #
ITEM TSBSIZE U; # TSB SIZE #
ARRAY DBHDR [0:0] S(L$DBHDR);
BEGIN # DUMP BLOCK HEADER WORD #
ITEM DBHDRWORD U(00,00,60);
END
CONTROL EJECT;
$BEGIN
NS$DBG("SDB"); # TRACE CALL #
$END
DBA = NAT$DBA[0]; # DUMP BEGINNING ADDRESS #
DEA = NAT$DEA[0]; # DUMP ENDING ADDRESS #
NS$FBH(LNPUDTDR,TRUE); # FORMAT ABH FOR NETWORK SM #
PFCSFC[0] = NPUDT; # PFC/SFC #
NPUPO[0] = NAT$PN[0]; # PORT NUMBER #
NPUSP[0] = NAT$SPN[0]; # SUBPORT NUMBER #
NPUCC[0] = CMDCODE"CC$DUMP"; # COMMAND CODE #
NPULS[0] = NAT$LSN[0]; # LOAD SEQUENCE NUMBER #
#
FORMAT DUMP BLOCK HEADER
#
P<NDF$DBHDR> = LOC(DBHDR);
DBH$WORD[0] = 0;
DBH$BT[0] = NAT$DBT[0]; # DUMP BLOCK TYPE #
DBH$BA[0] = DBA; # DUMP BLOCK BEGINNING ADDRESS #
#
FORMAT NPU/DT/R (DUMP)
#
FOR I = 0 STEP 1 WHILE DBA LQ DEA # MORE MEMORY TO BE DUMPED #
AND I LS MAX$DBC # NOT EXCEEDING MAX BATCH CNT#
DO # SEND A BATCH OF DUMP REQUESTS #
BEGIN # SEND A NPU/DT/R (DUMP) #
NPUBA1[0] = B<36,4>DBA; # DUMP PACKET BEGINNING ADDR #
NPUBA2[0] = B<40,20>DBA;
TEMPEA = DBA + MAX$DPHWDS - 1;
IF TEMPEA GQ DEA
THEN # REACH END OF DUMP RANGE #
BEGIN
NPUEA[0] = DEA; # DUMP PACKET ENDING ADDRESS #
NAT$F$DP[0] = TRUE; # SET DIRECTIVE PROCESSED FLAG#
END
ELSE
NPUEA[0] = TEMPEA;
DBA = NPUEA[0] + 1; # UPDATE DBA #
NETPUT(ABH$WORD,SMB$BUFFER); # SEND DUMP REQUEST #
END
NAT$DBA[0] = DBA; # UPDATE DUMP BA IN NAT #
NAT$BC[0] = I; # STORE DUMP BATCH COUNT #
DBH$BC[0] = I; # SET DUMP BLOCK BATCH COUNT #
DBH$EA[0] = DBA - 1; # SET DUMP BLOCK ENDING ADDRESS #
DTSBN = NAT$NDTSBN[0];
TSBINFO(TSBSIZE,TSBFWA,DTSBN); # LOCATE DUMP TSB #
P<DTSB$FET> = TSBFWA + L$DTSBHDR; # FWA OF NDF FET #
WRITEW(DTSB$FET,NDF$DBHDR,L$DBHDR); # TRANSFER DBH TO DUMP TSB #
RETURN;
END # NS$SDB #
TERM