*DECK NPHECP USETEXT NIPDEF USETEXT BACKBUF USETEXT NBT USETEXT PT USETEXT PARAMP USETEXT NHEADER USETEXT NCNT USETEXT PCNB USETEXT DRHDR USETEXT SUPMSG PRGM NPHECP; STARTIMS; # *1DC NPHECP * * * 1. PROC NAME AUTHOR DATE * NPHECP A. BEN-ARTZI 82/09/14 * * 2. FUNCTIONAL DESCRIPTION * PROCESS HE/CP FROM PIP * * 3. METHOD USED * CLEAR NBT DOWN LINE BLOCKS QUEUED * * 4. ENTRY PARAMETERS * PARAMP1 - SM BUFFER (HE/CP) * * 5. EXIT PARAMETERS * PARAMP2 - IF NON-ZERO THEN BAD BLOCK * * 6. SYMPL TEXTS USED * NIPDEF * BACKBUF SPECIAL BUFFER FOR DOWNLINE BACKS * NBT * SUPMSG PARAMP OPSIZE * NHEADER DRHDR * * 7. ROUTINES CALLED * XTRACE - TRACE PROCEDURE CALL * OMSG - SEND MESSAGE TO DAYFILE * MSETIL - SET INTERLOCK TO PIP * MCLRIL - CLEAR PIP INTERLOCK * OCTCON - CONVERT TO OCTAL DISPLAY CODE * XCDD - CONVERT TO DECIMAL DISPLAY CODE * MRELS - RELEASE BUFFER * * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION * THIS PRIMARY OVERLAY IS CALLED BY NPNIPSM. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE PRIMARY *CALL OPSIZE * # STOPIMS; # PARAMP1 - SM BUFFER (HE/CP) EXIT PARAMETER PARAMP2 - IF NON-ZERO THEN BAD BLK # # EXTERNAL VARIABLES # XREF BEGIN PROC XTRACE; # TRACE PROCEDURE CALL # PROC OMSG ; PROC MSETIL ; PROC MCLRIL ; PROC MRELS ; FUNC XCDD C(10) ; LABEL RJMAIN; # RETURN ADDRESS IN OVLCALL # END # INTERNAL VARIABLES # ITEM NBTIND; # CURRENT INDEX INTO NBT INPUT FET # ITEM FOUND B; # CET ENTRY FOUND FLAG # ITEM TEMP ; # LOOP VARIABLE # ITEM I; # LOOP VARIABLE # ITEM CNXX; # TEMPORARY VARIABLE FOR CONNECTION NUMBER# ARRAY TWORD S(2) ; BEGIN ITEM TWORD1 U(0,0,60) ; ITEM TWORD2 U(1,0,60) ; END ARRAY HECPMS S(4) ; BEGIN ITEM HECPM0 C(0,0,30) = ["EST XXX - FRONT END INTERFACE "]; ITEM HECPM2 C(2,0,10) = ["ERROR EE. "]; ITEM HECPM3 U(3,0,60) = [0]; # END OF MESSAGE # ITEM HE$XXX1 C(0,24,1); # 1ST DIGIT OF THE FRONT END EST # ITEM HE$XXX2 C(0,30,1); # 2ND DIGIT OF THE FRONT END EST # ITEM HE$XXX3 C(0,36,1); # 3RD DIGIT OF THE FRONT END EST # ITEM HE$EE C(2,36,2) = [0]; # ERROR CODE # END ARRAY EHECPMS S(3) ; BEGIN ITEM EHECPM0 C(0,0,25)=["NW01, NNN,FFEE, CCC ."]; ITEM EHECPM2 U(2,6,54)=[0]; # END OF MESSAGE # ITEM EHE$NNN C(0,36,3); # COUPLER NODE NUMBER # ITEM EHE$EE1 C(1,12,1); #FIRST DIGIT OF COUPLER STATUS WORD # ITEM EHE$EE2 C(1,18,1); #SECOND DIGIT OF COUPLER STATUS WORD# ITEM EHE$CCC1 C(1,36,1); ITEM EHE$CCC2 C(1,42,1); ITEM EHE$CCC3 C(1,48,1); END ARRAY HEXCONP [0:15] P(1) ; BEGIN ITEM V C(0,0,1) = ["0","1","2","3","4","5","6","7", "8","9","A","B","C","D","E","F"]; END #**********************************************************************# BEGIN CONTROL IFEQ DEBUG,1; XTRACE("NHECP"); CONTROL FI; P = PARAMP1 + BLKHSIZE; FOUND = FALSE; FOR I = 0 STEP NBTFETNO WHILE NOT FOUND AND I LQ NBTMAXID DO # SEARCH NBT FOR MATCHING COUPLER NODE # BEGIN IF NBTIUF[I] AND NBTHN[I] EQ DN[0] THEN BEGIN # FOUND NBT ENTRY # FOUND = TRUE; NBTIND = I; # SAVE NBT INDEX # END END IF FOUND THEN BEGIN # NBT FOUND # HE$XXX1[0] = V [ NBTEST1[NBTIND] ]; #1ST DIGIT OF FRONT END EST# HE$XXX2[0] = V [ NBTEST2[NBTIND] ]; #2ND DIGIT OF FRONT END EST# HE$XXX3[0] = V [ NBTEST3[NBTIND] ]; #3RD DIGIT OF FRONT END EST# P = P + NBHSIZE; I = HEEC[0]; #COUPLER ERROR CODE FROM PIP# TEMP = XCDD(I); #CONVERT ERROR CODE TO DECIMAL DISPLAY CODE# HE$EE[0] = C<8,2>TEMP; OMSG(HECPMS,0); #DAYFILE COUPLER ERROR MESSAGE# I = DN[0]; #HOST NODE NUMBER OF COUPLER# TEMP = XCDD(I); #CONVERT ERROR CODE TO DECIMAL DISPLAY CODE# EHE$NNN[0] = C<7,3>TEMP; EHE$EE1[0] = V [ HEEC1[0] ]; #FORMAT HEXADECIMAL ERROR CODE# EHE$EE2[0] = V [ HEEC2[0] ]; EHE$CCC1[0] = V [ HECSR1[0] ]; #COUPLER STATUS WORD, DIGIT 1# EHE$CCC2[0] = V [ HECSR2[0] ]; #COUPLER STATUS WORD, DIGIT 2# EHE$CCC3[0] = V [ HECSR3[0] ]; #COUPLER STATUS WORD, DIGIT 3# OMSG(EHECPMS,4) ; # SEND MESSAGE TO ERROR LOG FILE # # UPDATE NBT # # RELEASE ALL DOWN LINE MESSAGES (ALWAYS AT LEAST ONE) # IF NOT HEMDI[0] # IF SOFT ERROR FLAG NOT SET # THEN BEGIN MSETIL(0) ; FOR I = NBTIND+2 STEP 1 UNTIL NBTIND+4 DO BEGIN P = NBTFIRST[I]; FOR TEMP = TEMP WHILE P NQ 0 # WE DID NOT PASS # DO BEGIN IF BLKID[0] EQ PRUSPECID THEN BEGIN # SPECIAL OUTBOUND BLK FOR PCNB # P = P + BLKHSIZE ; P = NHWORD[0] ; #CAN NOW CONVERT NCNB TO PCNB# CNXX = PCNBCN[0] ; # SAVE CONNECTION NUMBER # # SET BATCH STREAM STATE AND BLOCK HANDLER STATE # P = PCNBCTAD[0] ; NCNTBSS[CNXX + NCNTHSIZE] = BSSI ; IF PCNBDT[0] EQ DT$CR OR ( PCNBXFR[0] # FILE TRANSFER CONN # AND PCNBREC[0] ) # RECEIVING # THEN BEGIN NCNTBHS[CNXX + NCNTHSIZE] = BHSPRUI ; # INPUT PRU # END ELSE BEGIN NCNTBHS[CNXX + NCNTHSIZE] = BHSPRUO ; # PRU OUTPUT # END PCNBID[0] = PCNBIDVALUE ; # ID NOW IS PCNB # BLKID[0] = POBIDVALUE; # CONVERT TO REGULAR ID # END TEMP = NEXTPTR[0] ; # NEXT DOWN-LINE MESSAGE # IF (P LS BACKBLWA) AND (P GQ BACKBFWA) THEN # THIS IS BACK ENTRY IN BACK BUFFER # BEGIN P = P - 1; # 1ST WD OF BCK BUF ENTRY# CMWORD[0] = BACKFFREE; # PTR TO NEXT FREE ENTRY # BACKFFREE = P; # NEW FIRST FREE ENTRY # END ELSE # THIS IS REGULAR DYNAMIC BUFFER # BEGIN MRELS(P); # RELEASE BUFFER # END P = TEMP ; END NBTOUT[I] = 0 ; NBTIN [I] = 0 ; NBTFIRST[I] = 0 ; END MCLRIL ; END # END OF SOFT ERROR FLAG # END # END OF FOUND # GOTO RJMAIN ; END TERM