*DECK NS$FLN USETEXT CYB$NS USETEXT DEF$NS USETEXT NAT$NS USETEXT NDCB$NS USETEXT NPT$NS USETEXT NST$NS USETEXT PFC$NS USETEXT SMB$NS USETEXT SMD$NS PROC NS$FLN(F$RELOAD); # SEND NPU/DT/R (LOAD NDCB) # # TITLE NS$FLN - SEND NPU/DT/R (LOAD NDCB). # BEGIN # NS$FLN # # ** NS$FLN - SEND NPU/DT/R (LOAD NDCB). * * J.C. LEE 1981 * * THIS ROUTINE SENDS AN NPU/DT/R (LOAD NDCB). * * PROC NS$FLN(F$RELOAD) * * ENTRY: * F$RELOAD - NDCB RELOAD INDICATOR. * * EXIT: * NONE. * * METHOD: * FORMAT ABH. * FORMAT NDCB IN NPU/DT/R (LOAD NDCB). * IF F$RELOAD NOT SET, SWITCH TO FORMAT NDCB CASES. * ELSE, LOCATE NDCB FIRST AND GOTO PACKSM. * PACKSM: PACKS NPU WORD INTO SM BUFFER. * COMPUTE CHECKSUM OF NDCB DATA. * FORMAT NPU/DT/R AND NETPUT IT. * # ITEM F$RELOAD B; # RELOAD NDCB INDICATOR # $BEGIN XREF BEGIN PROC NS$DBG; # TRACE PROCEDURE CALLS # END $END XREF BEGIN FUNC EDATE; # CONVERT PACKED DATE TO DISPLAY CODE # FUNC ETIME; # CONVERT PACKED TIME TO DISPLAY CODE # PROC LFGCKSM; # COMPUTE CHECKSUM OF NPU DATA # PROC MOVEOK; # ALLOW TSB TO MOVE # PROC NETPUT; # NETPUT # FUNC NS$CDA U; # DISPLAY-CODE TO ASCII CONVERSION # PROC NS$FBH; # FORMAT ABH FOR NETWORK SM # PROC NS$GNW; # GET NPU WORDS # PROC PDATE; # GET DATE/TIME IN PACKED BINARY FORMAT # PROC TSBINFO; # LOCATE TSB # END ITEM ASCCHAR U; # ASCII CHARACTER # ITEM BITCOUNT I; # BIT COUNT # ITEM DISCHAR U; # DISPLAY CODE CHARACTER # ITEM I I; # LOOP VARIABLE # ITEM J I; # TEMPORARY # ITEM K I; # TEMPORARY # ITEM L I; # TEMPORARY # ITEM NDCBFWA U; # NDCB FWA # ITEM NPUWORD U; # NPU WORD WITH 16-BIT DATA # ITEM TEMP U; # TEMPORARY # ITEM TSBFWA U; # TSB FWA # ITEM TSBN U; # TSB NUMBER # ITEM TSBSIZE U; # TSB SIZE # SWITCH NDCBCASE:NDCBINDEX # STATUS SWITCH FOR FORMATTING NDCB # RDF:NDCB$RDF, # RELOAD DUMP FLAG # LTDF:NDCB$LTDF, # LONG TERM DUMP FLAG # LPATH:NDCB$LPATH, # MOST RECENT LOAD PATH # LDATE1:NDCB$DATE1, # MOST RECENT LOAD DATE # LDATE2:NDCB$DATE2, LDATE3:NDCB$DATE3, LTIME1:NDCB$TIME1, # MOST RECENT LOAD TIME # LTIME2:NDCB$TIME2, LTIME3:NDCB$TIME3, NHC:NDCB$HALTC, # NPU HALT CODE # NPR:NDCB$PREG; # NPU P-REGISTER DATA # CONTROL EJECT; $BEGIN NS$DBG("FLN"); $END NS$FBH(LNPUDTLR+NDCB$SIZE*2,TRUE); # FORMAT ABH # P = LOC(SMB$BUFFER); # FWA OF SM BUFFER # FOR I = NDCBINDEX"NDCB$RDF" STEP 1 UNTIL NDCBINDEX"NDCB$PREG" DO # FORMAT NDCB IN NPU/DT/R (LOAD NDCB) # BEGIN NPUWORD = 0; IF NOT F$RELOAD THEN # FORMAT AND LOAD NDCB # GOTO NDCBCASE[I]; # SWITCH TO FORMAT NDCB CASES # ELSE # RELOAD NDCB RECEIVED FROM NPU # BEGIN IF I EQ NDCBINDEX"NDCB$RDF" THEN # LOCATE NDCB FIRST # BEGIN TSBN = NAT$SMTSBN[0]; # NDCB DUMP RESPONSE TSB # TSBINFO(TSBSIZE,TSBFWA,TSBN); P = TSBFWA; # FWA OF NDCB DUMP RESPONSE # END NS$GNW(NDCB,LNPUDTDN,I,NPUWORD); GOTO PACKSM; END RDF: # CLEAR RELOAD DUMP FLAG # NHC: # CLEAR NPU HALT CODE # NPR: # CLEAR NPU P-REGISTER # TEST I; LTDF: # SET LONG TERM DUMP FLAG # IF NPT$F$LTDF[NTORD] THEN # LONG TERM DUMP FLAG = DUMP # NPUWORD = ASC$YY; # SET TO ASCII YY # ELSE # LONG TERM DUMP FLAG = NO DUMP # NPUWORD = ASC$NN; # SET TO ASCII NN # GOTO PACKSM; LPATH: # SET LOAD PATH # NPUWORD = NAT$LPATH[0]; GOTO PACKSM; LDATE1: # SET LOAD DATE YY # PDATE(TEMP); # GET PACKED BINARY DATE/TIME # NAT$LPDATE[0] = TEMP; # SAVE IN NAT # TEMP = EDATE(NAT$LDATE[0]); # DISPLAY-CODED DATE YY/MM/DD # GOTO DATETIME; LTIME1: # SET LOAD TIME HH # TEMP = ETIME(NAT$LTIME[0]); # DISPLAY-CODED TIME HH.MM.SS # DATETIME: LDATE2: # SET LOAD DATE MM # LDATE3: # SET LOAD DATE DD # LTIME2: # SET LOAD TIME MM # LTIME3: # SET LOAD TIME SS # TEMP = TEMP * LSHIFT6; # LEFT-SHIFT 6 SPACES # FOR J = 0 STEP 1 UNTIL 1 DO # CONVERT NEXT TWO DISPLAY-CODED CHARACTERS TO ASCII # BEGIN DISCHAR = BTEMP; # DISPLAY-CODED CHARACTER # ASCCHAR = NS$CDA(DISCHAR); # CONVERT TO ASCII # BNPUWORD = ASCCHAR; END TEMP = TEMP * LSHIFT12; # LEFT-SHIFT 12 SPACES # PACKSM: # PACK NPU WORD INTO SM BUFFER # BITCOUNT = LNPUDTLR*ASCSIZE + I*NPWSIZE; # BIT COUNT # K = BITCOUNT / WL; # WORD INDEX # L = BITCOUNT - K*WL; # BIT INDEX # J = L + NPWSIZE - WL; # BITS IN NEXT CM WORD # IF J GR 0 THEN # NPU WORD CROSSES CM WORD # BEGIN BSMBWORD[K] = BNPUWORD; B<0,J>SMBWORD[K+1] = BNPUWORD; END ELSE # NPU WORD FITS IN CM WORD # BSMBWORD[K] = NPUWORD; END # END FOR LOOP # # COMPUTE CHECKSUM OF NDCB DATA # BITCOUNT = LNPUDTLR * ASCSIZE; # BIT COUNT TO NDCB DATA # K = BITCOUNT / WL; # WORD INDEX # NDCBFWA = P + K; # FWA OF NDCB DATA # L = BITCOUNT - K*WL; # SYMPL FIRST BIT POSITION # J = WL - 1 - L; # COMPASS FIRST BIT POSITION # LFGCKSM(NDCBFWA,J,NDCB$SIZE,TEMP); # GET CKECKSUM OF NDCB DATA # # FORMAT NPU/DT/R (LOAD NDCB) # TSBN = NPT$NSTTSB[NTORD]; # NST TSB NUMBER # TSBINFO(TSBSIZE,TSBFWA,TSBN); # LOCATE NST # P = TSBFWA; # FWA OF NST # PFCSFC[0] = NPUDT; # PFC/SFC CODE # NPUPO[0] = NAT$PN[0]; # PORT NUMBER # NPUSP[0] = NAT$SPN[0]; # SUBPORT NUMBER # NPUCC[0] = CMDCODE"CC$LOAD"; # COMMAND CODE # NPULS[0] = NAT$LSN[0]; # LOAD SEQUENCE NUMBER # NPUBA1[0] = NAT$NDCBA1[0]; # SET NDCB FWA # NPUBA2[0] = NAT$NDCBA2[0]; NPUBC[0] = 1; # SET BATCH COUNT # NPUCK[0] = TEMP; # SET LOAD DATA CHECKSUM # MOVEOK(TSBN); # ALLOW NST TO MOVE # NETPUT(ABH$WORD,SMB$BUFFER); # SEND NPU/DT/R (LOAD NDCB) # RETURN; END # NS$FLN # TERM