*DECK,NP$STPR *IF,DEF,XFR USETEXT NX$ACBF USETEXT AIPDEF USETEXT HEADER USETEXT NP$STAT USETEXT NP$DB USETEXT NP$NWL USETEXT NP$MODE USETEXT NP$GETS USETEXT NX$ACBX USETEXT NX$MSG PROC NP$STPR(NETCON,NTRIGGER,NBACKTRIG); BEGIN # ** *1DC NP$STPR * * 1. PROC NAME AUTHOR DATE * NP$STPR Y. C. YIP 02/19/1985 * * 2. FUNCTIONAL DESCRIPTION * THIS ROUTINE ACTS AS A CENTRAL PROCESSOR FOR THE RESPONSE * RETURNED BY CALLING NP$STTP, THE STATE TABLE DRIVER FOR * ACTIONS TAKEN DURING A FILE TRANSFER STATE. THE ACTIONS, * STATE TRANSITION, AND THE REASON ARE THEN EXECUTED * BY DOING A TABLE JUMP DEPENDING ON THE ACTION NUMBER AND * AND THE TABLE NUMBER WHETHER IT IS A PRU( SEND, RECEIVE) OR * CHARACTER (SEND , RECEIVE). * * 3. METHOD USED * THE PROCESSOR HAS TWO BANKS OF ACTIONS, ONE FOR PRU * SENDER AND RECEIVER AND THE OTHER FOR CHARACTER SENDER * AND RECEIVER. THE JUMPS TO THESE BANKS ARE FIRST TRIGGERED * BY TABLE ORDINAL SWITCHES AND THEN BY ACTION STATUS * SWITCHES. THERE ARE FOUR TABLES ORDINALS: 0 AND 1 FOR * PRU SENDER AND RECEIVER AND 2 AND 3 FOR CHARACTER SENDER * AND RECEIVER. IT OBTAINS THE ORDINALS AND CURRENT STATE * BY A TABLE LOOK OF THE FILE TRANSFER TABLE AND THE KEY IS * THE CONNECTION INDEX. THEN IT CALLS NP$STTP AND PERFORMS * ACTION1 AND ACTION2, UPDATING REASON CODE, NEWSTATE AND * PREVIOUS STATE OF THE FILE TRANSFER TABLE. * NP$STPR SETS NTRIGGER TO A NULL TRIGGER VALUE , 0, AT * ENTRY OF THE ROUTINE. * NORMALLY NBACKTRIG IS SET TO NULL, 0, AFTER A REGULAR * CALL TO NP$STTP. IN CASE, ANOTHER CALL TO NP$STPR * IS NEEDED, NBACKTRIG IS SET TO A NON-NULL VALUE. * EXAMPLES ARE ACTION "CLOSE". * * 4. ENTRY CONDITIONS * NETCON - CONNECTION INDEX IN THE FTT. * NTRIGGER - VALUE OF THE TRIGGER FOR THE STATE TABLE. * NBACKTRIG - RETURN TRIGGER. * * 5. EXIT CONDITONS * NETCON - UNCHANGED. * NTRIGGER - UNCHANGED. * NBACKTRIG - NULL IF NO RETURN ELSE VALUE OF * THE RETURN TRIGGER. * FTTSTATE, FTTSTRC ARE UPDATED TO THE CURRENT * FILE TRANSFER STATE AND REASON. * * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * NX$ACBX, NP$NWL. * * 7. ROUTINES CALLED * NP$MSG - DAYFILE PROCESSOR. * NP$STTP - COMPASS ROUTINE FOR STATE TABLE LOOKUP. * * 8. DAYFILE MESSAGES * - ERROR IN INTERFACING WITH NAM. * # CONTROL EJECT; # **** PROC NP$STPR - XREF LIST. # XREF BEGIN PROC NP$STTP; # NP$STTP PROCESSOR # PROC NETPUT; # NETPUT # PROC NP$PUT; # NP$PUT # PROC NP$BTO8; # CONVERTS BINARY TO ASCII # PROC NP$8TIN; # CONVERTS ASCII TO BINARY # PROC NP$SHRK; # SHRINK CHECKMARK TABLE # PROC NP$XCMP; # COMPLETE NET TRNASFER # PROC NP$MSG; # DAYFILE MESSAGE # FUNC NP$CDD C(10); # CONVERT INTEGER TO DISPLAY CODE # PROC NP$CIO; # PERFORMS CIO FUNCTIONS # PROC NP$SENF; # CHARCTER SENDER # PROC NP$RECV; # CHARACTER RECEIVER # PROC NP$RTIM; # PROC FOR UPDATING TIMER INFO # PROC NP$RLOC; # PROC FOR REALLOCATION BUFFERS # PROC NP$XLCH; # LOCATE CHECK MARK NUMBER # PROC NP$UPRU; # UPDATE PRU NUMBER IN FTT # PROC NETWAIT; # PROCEDURE TO DO NETWAIT # END # **** # ITEM NETCON; # CONNECTION INDEX # ITEM NTRIGGER; # TRIGGER # ITEM NBACKTRIG; # RETURN TRIGGER # ITEM ITEMP; # INTEGER TEMPORARY # ITEM ITEMP2; # INTEGER TEMPORARY # ITEM ORUDIFF; # DIFFERENCE IN PRU # SWITCH ORDLST ORD0, # SWITCH ITEM FOR TABLE ORDINAL # # 0 FOR PRU SENDER # ORD1, # 1 FOR PRU RECEIVER # ORD2, # 2 FOR CHARACTER SENDER # ORD3, # 3 FOR CHARACTER RECEIVER # EXITT; # DUMMY LABEL FOR ERROR EXIT # SWITCH PJUMP PLACT0, # ACTION0 : STATUS = -1 # PLACT1, # ACITON1 : SS(CKPT) SENT # PLACT2, # ACTION2 : RETURN # PLACT3, # ACTION3 : PRU/ON # PLACT4, # ACTION4 : STATUS = 0 # PLACT5, # ACTION5 : OFT/START SENT # PLACT6, # ACTION6 : OFT/OFF/R # PLACT7, # ACTION7 : STATUS = -2 # PLACT8, # ACTION8 : ES(OK) SENT # PLACT9, # ACTION9 : FC/RST SENT # PLACT10, # ACTION10: ES(E) SENT # PLACT11, # ACTION11: IFT/START SENT # PLACT12, # ACTION12: IFT/OFF/R # PLACT13, # ACTION13: ER(OK) SENT # PLACT14, # ACTION14: FC/BRK SENT # PLACT15, # ACTION15: RR(CKPT) SENT # PLACT16, # ACTION16: ER(E) SENT # PLACT17, # ACTION17: QR(E) SENT # PLACT18, # ACTION19: INTRRSP # PLACT19, # ACTION19: SET IDLEDOWN # PLACT20, # ACTION20: SPECIAL RETURN ACTION # # FOR PRUONA # PLACT21, # ACTION21: SPECIAL RECEIVER'S # # ACTION FOR REALLOCATION OF BUFFERS# # AFTER RECEIVING PRUONA WITH RC= 4 # PLACT22, # ACTION22: LSTOFF # PLACT23; # ACTION23: LSTON # SWITCH CJUMP CLACT0, # ACTION 0: STATUS = -1 # CLACT1, # ACTION 1: SS(0) SENT # CLACT2, # ACTION 2: STATUS = 0 # CLACT3, # ACTION 3: ES(E) SENT # CLACT4, # ACTION 4: ADVANCE ABL WINDOW # CLACT5, # ACTION 5: RETURN # CLACT6, # ACTION 6: RESET ABL WINDOW + FCRST# CLACT7, # ACTION 7: INTRRSP SENT # CLACT8, # ACTION 8: IDLEDOWN = TRUE # CLACT9, # ACTION 9 : STATUS = -1 AND RESET # CLACT10, # ACTION 10: ES(OK) SENT # CLACT11, # ACTION 11: ADV CHECKMARK WINDOW # CLACT12, # ACTION 12: SEND DATA # CLACT13, # ACTION 13: SEND SR # CLACT14, # ACTION 14: ER(E) SENT # CLACT15, # ACTION 15: STATUS = -1 AND RWL # CLACT16, # ACTION 16: SS(CHECKMARK) # CLACT17, # ACTION 17: STATUS = -2 # CLACT18, # ACTION 18: QR(E) SENT # CLACT19, # ACTION 19: CLOSE # CLACT20, # ACTION 20: SAVE CHECKMARK # CLACT21, # ACTION 21: STORE DATA # CLACT22, # ACTION 22: FCBRK SENT # CLACT23, # ACTION 23: MR SENT # CLACT24, # ACTION 24: RR(CHECKMARK) # CLACT25, # ACTION 25: ER(OK) # CLACT26, # ACTION 26: LSTOFF # CLACT27, # ACTION 27: LSTON # CLACT28; # ACTION 28: SPECIAL ADVANCE WINDOW # BASED ARRAY TABRESP[0:0] S(1); # TEMPLATE FOR RESPONSE WORD # BEGIN ITEM LEGB U(00,00,01); # LEGAL BIT # ITEM NEWSTATE U(00,30,06); # NEWSTATE # ITEM ACTION1 U(00,36,06); # ACTION 1 # ITEM ACTION2 U(00,42,06); # ACTION 2 # ITEM REASON U(00,48,06); # REASON CODE # END BASED ARRAY COPYAREA[0:0] S(1); BEGIN ITEM WORD U(00,00,60); END ITEM RESP; # RESPONSE WORD # ITEM ACTIONC; # ACTION COUNT # ITEM CRNT$ACTION; # CURRENT ACTION # ITEM I; # LOOP INDEX # ITEM NINDX; # LOOP INDEX # ITEM CRNT$ORD; # CURRENT TABLE ORDINAL # ITEM CRNT$STATE; # CURRENT STATE # ITEM PRUDIFF; # DIFFERENCE IN PRU NUMBER # ITEM CTEMP C(10); # CHARACTER TEMPORARY # ITEM SAVE$WORD; # COPY OF DATAWORD 1 # CONTROL EJECT; PROC NET$SENDL7(NETLV7PFC,NETL7DD); BEGIN # ** * 1. FUNCTIONAL DESCRIPTION. * NET$SENDL7 TRANSMITS A LEVEL 7 MESSAGE TO A CERTAIN * CONNECTION NUMBER. * * 2. METHOD USED. * NET$SENDL7 BLOCKS THE APPLICATION BLOCK HEADER WITH * THE CONNECTION NUMBER FROM FTT TABLE. IT THEN BUFFERS * THE PFC FIELD OF THE LEVEVL 7 TEXT AREA WITH THE * NETLV7PFC WHICH IS PASSED AS A PARAMETER AND THE DD * (CHECK MARK OR ERROR CODE ) FIELD OF THE LEVEL 7 TEXT * WITH NETL7DD PASSED AS A PARAMETER. * * 3. ENTRY CONDITIONS - * NETLV7PFC - LEVEL 7 PFC. * NETL7DD - LEVEL 7 D1-D4. * * 4. EXIT CONDITIONS. * * NETLV7PFC - UNCHANGED. * NETL7DD - UNCHANGED. * NP$PUT CALLED TO SEND LEVEL 7 MESSAGE. * # ITEM NETLV7PFC; # LEVEL 7 PFC # ITEM NETL7DD; # LEVEL 7 D1-D4 # CONTROL EJECT; # # # PROC NET$SENDL7 CODE BEGINS HERE # # # ABH$L7ADR = FTTACN[FTTINDEX]; # SET CONNECTION NUMBER IN # # APPLICATIONS BLOCK HEADER # L7$PFC = NETLV7PFC; # UPDATE PFC IN TEXT AREA # L7$DD = BNETL7DD; # UPDATE ERROR CODE OR # # CHECK MARK # OPCODE = OP$PUT; # UPDATE OPCODE # LOC$HA = LOC(ABH$LEV7); # UPDATE HEADER ADDRESS # LOC$TA = LOC(LV7$MSG); # UPDATE TEXT AREA ADDRESS # *IF DEF,STAT,1 IAM = TYPE"PUT"; # UPDATE EXECUTING ROUTING # # TYPE # *IF DEF,DEBUG,1 DB$CALL = LOC(NETPUT); NP$PUT; # SEND LEVEL 7 MESSAGE # RETURN; # RETURN TO CALLER # END # END OF PROC NET$SENDL7 # CONTROL EJECT; #**********************************************************************# # # # NP$STPR CODE BEGINS HERE # # # #**********************************************************************# NBACKTRIG = NIL; # SET BACKTRIG TO NULL # P = LOC(RESP); # PULL TEMPLATE OVER RESPONSE WORD # P = FTTSTATUS[FTTINDEX]; # GET ADDRESS OF STATUS # P = FTTCKTBL[FTTINDEX]; # PULL CHECKMARK TEMPLATE TO THE # # THE ADDRESS STORED IN FTT # P = LOC(DATA$BUF); # PULL SUPERVISORY MSG TEMPLATE # # OVER TO DATA$BUF # P = FTTFETADR[FTTINDEX]; # SET DISK FET ADDRESS # P = FTTCMV$BLK[FTTINDEX]; SAVE$WORD = DATA$WORD[1]; # SAVE DATAWORD IN CASE OF TBN CHECK# DATA$WORD[0] = 0; # CLEAR DATA$WORD AT OFFSET 0 # DATA$WORD[1] = 0; # CLEAR DATA$WORD AT OFFSET 1 # CRNT$ORD = FTTSTORD[FTTINDEX]; # UPDATE CURRENT TABLE ORDINAL # CRNT$STATE = FTTSTATE[FTTINDEX]; # UPDATE CURRENT STATE OF FTT # FTTPRETRIG[FTTINDEX] = NTRIGGER; # SAVE CURRENT TRIGGER # NP$RTIM(TIME$WORD); # GENERATE TIMESTAMP # FTTTIME[FTTINDEX] = TIME$SEC[0]; # UPDATE FTTTIME # NP$STTP(CRNT$ORD,CRNT$STATE,NTRIGGER,RESP); # CALL STATE TABLE # IF LEGB NQ ONE # IF ILLEGAL ENTRY # THEN BEGIN FTTSTRC[FTTINDEX] = NAM$ERR; # UPDATE REASON CODE # NP$XCMP; # COMPLETE FILE TRANSFER # END ELSE BEGIN IF REASON NQ NOCHG # IF REASON NOT EQUAL TO NO CHANGE # THEN BEGIN FTTSTRC[FTTINDEX] = REASON; # UPDATE FTT REASON CODE # END CRNT$ACTION = ACTION1; # UPDATE CURRENT ACTION # ACTIONC = ONE; # INITIALIZE ACTION COUNT TO 1 # FOR I = 0 WHILE (CRNT$ACTION NQ NOCHG AND ACTIONC LQ TWO) DO BEGIN ACTIONC = ACTIONC + 1; # INCREMENT ACTION COUNT # GOTO ORDLST[CRNT$ORD]; # GOTO ORDINAL LABEL # ORD0: GOTO PJUMP[CRNT$ACTION]; # JUMP TO PRU ACTION TABLE # ORD1: GOTO PJUMP[CRNT$ACTION]; # JUMP TO PRU ACTION TABLE # ORD2: GOTO CJUMP[CRNT$ACTION]; # JUMP TO CHARACTER ACTION TABLE # ORD3: GOTO CJUMP[CRNT$ACTION]; # JUMP TO CHARACTER ACTION TABLE # PLACT0: # **** STATUS = -1 **** # STATUSWD = -1; # STATUS = -1 # GOTO NEXTAT; PLACT1: # **** SS(CKPT) **** # NP$BTO8(FTTICKVAL[FTTINDEX],ITEMP); # GET ASCII VALUE OF # # CHECK MARK VALUE # NET$SENDL7(LEV7$SS,ITEMP); # SEND SS(CHECKMARK) # GOTO NEXTAT; PLACT2: # **** RETURN **** # IF IDLEDOWN # IF IDLEDOWN FLAG SET # THEN BEGIN IF REASON EQ RC1 # IF COMPLETE WITHOUT ERROR # THEN BEGIN REASON = RC12; # SET REASON CODE TO 12 # FTTSTRC[FTTINDEX] = RC12; # ALSO SET THE REASON CODE IN # END ELSE BEGIN REASON = RC13; # ELSE SET TO RC13 IF COMPLETE# # WITH ERROR # FTTSTRC[FTTINDEX] = RC13; # ALSO UPDATE THE REASON CODE # # IN THE FTT TABLE # END END NP$XCMP; # COMPLETE FILE TRANSFER # GOTO NEXTAT; PLACT3: # **** PRU ON **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY2; # TLC = 2 # PFCSFC[0] = PRUON; # PFCSFC = PRUON # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT # IF FTTOPCODE[FTTINDEX] EQ 0 # IF RECEIVING SIDE # THEN BEGIN SPMUBZ[0]= FTTBSIZE[FTTINDEX]/ONE$PRU; # UBZ FOR RECVER# SPMDBZ[0] = 0; # ZERO OUT DBZ # END ELSE BEGIN # ELSE IF SENDER SIDE # SPMUBZ[0] = 0; # ZERO OUT UBZ FOR SENDER # SPMDBZ[0]= FTTBSIZE[FTTINDEX]/ONE$PRU; # DBZ FOR SENDER# END IF FTTMFACIL[FTTINDEX] # M-FACIL SPECIFIED # THEN BEGIN SPMCWS[0] = FTTCWS[FTTINDEX]; # SET WINDOW SIZE # END ELSE BEGIN SPMCWS[0] = 0; # NO CHECKMARKS SENT BY PIP # END SPMICK[0] = FTTICKVAL[FTTINDEX]; # SET CHECK MARK VALUE # SPMDD[0] = FTTUDD[FTTINDEX]; # SET DATA DECLARATION FLAG # SPMFL1[0] = TRUE; # IN DATA TRANSFER MODE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET EXECUTING ROUTINE TYPE # NP$PUT; # NETPUT PRUON # GOTO NEXTAT; PLACT4: # **** STATUS = 0 **** # STATUSWD = 0; # STATUS = 0 # GOTO NEXTAT; PLACT5: # **** OFT/START **** # LOC$HA = LOC(OUT$ABH); # UPDAT HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY2; # TWO WORD MSG # PFCSFC[0] = OFTSTRT; # COMMAND IS OFT/START # SPACN[0] = FTTACN[FTTINDEX]; # GET ACN FROM FTT TABLE # P = FTTFETADR[FTTINDEX]; # PULL FET CIO TEMPLATE TO # # FET ADDRESS FROM THE FTT # # TABLE # SPCURPR[0] = FTTCURPRU[FTTINDEX]; # GET START ADDRESS OF PRU# SPLFN[0] = FETLFN[0]; # GET FILE NAME FROM FET # SPFNT[0] = FETFNT[0]; # GET FNT POINTER FROM FET # OPCODE = OP$PUT; # SET OPCODE FOR NETPUTTING # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET EXECUTING ROUTINE # NP$PUT; # NETPUT COMMAND # GOTO NEXTAT; PLACT6: # **** OFT/OFF **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # ONE WORD MSG # SPACN[0] = FTTACN[FTTINDEX]; # GET ACN FROM FTT TABLE # PFCSFC[0] = OFTOFF; # SUPERVISORY MSF IS OFT/OFF # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # NETPUT MESSAGE # GOTO NEXTAT; PLACT7: # **** STATUS = -2 **** # STATUSWD = MINUS2; # SET STATUS = -2 # GOTO NEXTAT; PLACT8: # **** ES(OK) **** # NET$SENDL7(LEV7$ES,PRDER1); # SEND ES(OK) # GOTO NEXTAT; PLACT9: # **** FCRST **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # ENTRY SIZE OF MESSAGE # PFCSFC[0] = FCRST; # MESSAGE IS FCRST # SPACN[0] = FTTACN[FTTINDEX]; # GET ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # NETPUT NMESSAGE # GOTO NEXTAT; PLACT10: # **** ES(E) **** # IF FTTOPCODE[FTTINDEX] EQ 0 # IF RECEIVER # THEN BEGIN NET$SENDL7(LEV7$ES,PRDER3); # NON-RETRYABLE RECEIVE ERROR # END ELSE BEGIN NET$SENDL7(LEV7$ES,PRDER7); # NON-RETRYABLE SEND ERROR # END GOTO NEXTAT; PLACT11: # **** IFTSTART **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY2; # WORD SIZE OF MESSAGE # PFCSFC[0] = IFTSTRT; # MESSAGE IS IFT/START # SPACN[0] = FTTACN[FTTINDEX]; # GET ACN FROM FTT TABLE # P = FTTFETADR[FTTINDEX]; # PULL CIO TEMPLATE OVER # # FET ADDRESS # SPCURPR[0] = FTTCURPRU[FTTINDEX]; # GET CURRENT PRU # # POSITION WITHIN THE FILE # SPLFN[0] = FETLFN[0]; # GET FILE NAME FROM FET # SPFNT[0] = FETFNT[0]; # FET FNT POINTER FROM FET # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; PLACT12: # **** IFT/OFF **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = IFTOFF; # MESSAGE IS OFT/OFF # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # NETPUT MESSAGE # GOTO NEXTAT; PLACT13: # **** ER(OK) **** # NET$SENDL7(LEV7$ER,PRDER1); # ER(OK) SENT # GOTO NEXTAT; PLACT14: # **** FCBRK **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = FCBRK; # SEND FCBRK # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; PLACT15: # **** RR(CKPT) **** # IF FTTRFACIL[FTTINDEX] # IF RFACIL SPECIFIED # THEN BEGIN IF FTTNRETRY[FTTINDEX ] NQ 0 # IF RETRY COUNT NOT 0 # THEN BEGIN FTTNRETRY[FTTINDEX] = FTTNRETRY[FTTINDEX] - 1; NP$BTO8(FTTICKVAL[FTTINDEX],ITEMP); # CONVERT TO ASCII # NET$SENDL7(LEV7$RR,ITEMP); # SEND RR # END ELSE BEGIN FTTSTRC[FTTINDEX] = MAX$RTY; # MAXIMUM RETRY REACHED # NP$XCMP; # END FILE TRANSFER # END END ELSE BEGIN NP$XCMP; # END FILE TRANSFER IF R NOT # END # SEPECIFIED # GOTO NEXTAT; PLACT16: # **** ER(E) **** # IF FTTOPCODE[FTTINDEX] EQ 0 # IF RECEIVER # THEN BEGIN NET$SENDL7(LEV7$ER,PRDER4); # NON-RETRYABLE RECEIVE ERROR # END ELSE BEGIN NET$SENDL7(LEV7$ER,PRDER7); # NON-RETRYABLE SEND ERROR # END GOTO NEXTAT; PLACT17: # **** QR(E) **** # NET$SENDL7(LEV7$QR,PRDER4); # NON-RETRYABLE RECEIVE ERROR # GOTO NEXTAT; PLACT18: # **** INTRRSP **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = INTRRSP; # SEND INTRRSP # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; PLACT19: # **** IDLE = TRUE **** # IDLEDOWN = TRUE; # SET IDLEDOWN TO TRUE # GOTO NEXTAT; PLACT20: # *** PRUONA RECEIVED *** # IF PRERC EQ RETRY$PRA # IF REASON CODE FROM PRUONA # THEN # IS 5 # BEGIN # CHANGE STATE TO STATE 15 # NEWSTATE = NSPWACK; # SO THAT IT CAN RETRY PRUON # # WHEN IT RECEIVES A FCACK # END ELSE BEGIN IF PRERC EQ INTRA$PRA # REASON CODE 4 # THEN # SWITCH TO INTRAHOST BINARY # BEGIN # FILE XFR # NP$RLOC; # CALL BUFFER REALLOCATION # # PROCEDURE # FTTSTORD[FTTINDEX] = NETSCOD; # SET TABLE ORDINAL # # TO CHARACTER MODE SENDER # FTTSTATE[FTTINDEX] = NSCDATA; # STATE IS DATA PHASE # END ELSE BEGIN IF IDLEDOWN # IF IDLEDOWN FLAG SET # THEN BEGIN IF REASON EQ RC1 # IF COMPLETE WITHOUT ERROR # THEN BEGIN REASON = RC12; # SET REASON CODE TO 12 # FTTSTRC[FTTINDEX] = RC12;# SET REASON CODE TO 12 # END ELSE BEGIN REASON = RC13; # ELSE SET TO RC13 IF COMPLETE# # WITH ERROR # FTTSTRC[FTTINDEX] = RC13;# UPDATE THE REASON CODE # # IN THE FTT TABLE # END END NP$XCMP; # EXIT FILE TRANSFER # END END GOTO NEXTAT; PLACT21: # *** PRUONA RECEIVED *** # # *** FOR RECEIVER *** # IF PRERC EQ INTRA$PRA # REASON CODE 4 FROM PRUONA # THEN # SWITCH TO INTRAHOST BINARY # BEGIN # FILE XFR # NP$RLOC; # CALL BUFFER REALLOCATION # # PROCEDURE # FTTSTORD[FTTINDEX] = NETRCOD; # SET TABLE ORDINAL # # TO CHARACTER MODE SENDER # FTTSTATE[FTTINDEX] = NRCDATA; # STATE IS DATA PHASE # NP$BTO8(FTTICKVAL[FTTINDEX],ITEMP); # FAKE SR # NET$SENDL7(LEV7$SR,ITEMP); FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; END ELSE BEGIN IF IDLEDOWN # IF IDLEDOWN FLAG SET # THEN BEGIN IF REASON EQ RC1 # IF COMPLETE WITHOUT ERROR # THEN BEGIN REASON = RC12; FTTSTRC[FTTINDEX] = RC12;# SET REASON CODE TO 12 # END ELSE BEGIN REASON = RC13; # ELSE SET TO RC13 IF COMPLETE# # WITH ERROR # FTTSTRC[FTTINDEX] = RC13;# UPDATE THE REASON CODE # # IN THE FTT TABLE # END END NP$XCMP; # EXIT FILE TRANSFER # END GOTO NEXTAT; PLACT22: # **** LSTOFF **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = LSTOFF; # SEND LSTOFF # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; PLACT23: # **** LSTON **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = LSTON; # SEND LSTON # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; CLACT0: # **** STATUS = -1 **** # STATUSWD = -1; GOTO NEXTAT; CLACT1: # **** SS(CHECKMARK) **** # NP$BTO8(FTTICKVAL[FTTINDEX],ITEMP); # CONVERT TO ASCII # NET$SENDL7(LEV7$SS,ITEMP); # SEND SS # FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; # DECREASE # # WINDOW SIZE # GOTO NEXTAT; CLACT2: # **** STATUS = 0 **** # STATUSWD = 0; # SET STATUS TO 0 # GOTO NEXTAT; CLACT3: # **** ES(E) **** # IF FTTOPCODE[FTTINDEX] EQ 0 # NON-RETRYABLE RECEIVE ERROR # THEN BEGIN NET$SENDL7(LEV7$ES,PRDER3); # SEND ES(E) # END ELSE BEGIN NET$SENDL7(LEV7$ES,PRDER7); # SEND ES(E) # END FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; # DECREASE # # WINDOW SIZE # GOTO NEXTAT; CLACT4: # **** ADVANCE ABL WINDOW *** # FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] + 1; GOTO NEXTAT; CLACT5: # **** RETURN **** # IF IDLEDOWN # IF IDLEDOWN FLAG SET # THEN BEGIN IF REASON EQ RC1 # IF COMPLETE WITHOUT ERROR # THEN BEGIN REASON = RC12; # SET REASON CODE TO 12 # FTTSTRC[FTTINDEX] = RC12; # ALSO SET THE REASON CODE IN # END ELSE BEGIN REASON = RC13; # ELSE SET TO RC13 IF COMPLETE# # WITH ERROR # FTTSTRC[FTTINDEX] = RC13; # ALSO UPDATE THE REASON CODE # # IN THE FTT TABLE # END END IF FTTOPCODE[FTTINDEX] EQ 0 OR # RECEIVER OR ABL WINDOW # FTTABL[FTTINDEX] EQ FTTCURBLK[FTTINDEX] OR# FULLY OPEN # REASON EQ RC2 OR REASON EQ RC3 OR # OR REAOSN CODE = 2,3,5# REASON EQ RC5 THEN BEGIN NP$XCMP; # COMPLETE FILE TRANSFER # END ELSE BEGIN FTTSTATE[FTTINDEX] = NSCWACK;# INTERNALLY CHANGE STATE TO # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = LSTOFF; # SEND LSTOFF # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; END # WAIT FOR ALL FCACKS PENDING # GOTO NEXTAT; CLACT6: # **** RESET ABL WINDOW **** # # **** SEND FCRST **** # # **** FCBRK IS RECEIVED **** # FTTOUTCWS[FTTINDEX] = 0; # RESET OUTSTANDING CHECKMARK # FTTBLK$MS[FTTINDEX] = MSWINDOWSZ; # RESET CHECKMARK WINDOW # FTTCURBLK[FTTINDEX] = FTTABL[FTTINDEX]; LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = FCRST; # SEND FCRST # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; CLACT7: # **** INTRRSP **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = INTRRSP; # SEND INTRRSP # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; CLACT8: # **** IDLEDOWN = TRUE **** # IDLEDOWN = TRUE; GOTO NEXTAT; CLACT9: # ** STATUS = -1 AND RESET ** # STATUSWD = -1; # STATUS = -1 # FTTOUTCWS[FTTINDEX] = 0; # RESET OUTSTANDING CHECKMARK # FTTBLK$MS[FTTINDEX] = MSWINDOWSZ; # RESET CHECKMARK WINDOW # NP$8TIN(DATA$WORD[2],ITEMP); # GET CHECKMARK NUMBER # IF ITEMP LS FTTLCKACK[FTTINDEX] OR ITEMP GR FTTLCKSNT[FTTINDEX] # IF CHECKMARK OUT OF # THEN # RANGE # BEGIN FTTSTRC[FTTINDEX] = BAD$CHK; # SET REASON CODE TO 22 # NP$XCMP; # EXIT WITH REASON CODE # END ELSE BEGIN # OTHERWISE READY TO RESTART # IF FTTRFACIL[FTTINDEX] # IF RESTART ALLOWED # THEN BEGIN IF FTTNRETRY[FTTINDEX] NQ 0 # MAXRETRY NOT REACHED # THEN BEGIN FTTNRETRY[FTTINDEX] = FTTNRETRY[FTTINDEX] - 1; FTTRPND[FTTINDEX] = TRUE; # SET RESTART PENDING FLAG # IF ITEMP NQ 0 # IF NON-ZERO CHECKMARK # THEN BEGIN NP$XLCH(ITEMP,ITEMP2); # LOCATE CHECK MARK ENTRY # IF ITEMP2 GR CHK$START # IF ENTRY IS OTHER THAN # THEN BEGIN # THE DEFAULT ENTRY # CHK$IDX[0] = CHK$START; # RESET CHK$IDX # CHK$WRD1[CHK$START] = CHK$WRD1[ITEMP2]; CHK$WRD2[CHK$START] = CHK$WRD2[ITEMP2]; END # COLLAPSE TABLE TO DEFAULT # # ENTRY + THE ENTRY OF RR # ITEMP2 = FETIN[0] - FETOUT[0]; # COMPUTE PRU # IF ITEMP2 LS 0 # GET DIFFERENCE IN WORD NUMBER # THEN BEGIN ITEMP2 = ITEMP2 + FETLIM[0] - FETFIR[0]; END ITEMP2 = ITEMP2 + FTTWORD[FTTINDEX]; FTTCURPRU[FTTINDEX] = FTTCURPRU[FTTINDEX] + ITEMP2/64; IF FTTEOR[FTTINDEX] # IF EOR # THEN BEGIN IF FTTEOI[FTTINDEX] # IF EOI # THEN BEGIN IF ( FETIN[0] NQ FETOUT[0]) OR (CMB$DBIT[0] NQ CMB$STEP[0]) THEN BEGIN FTTCURPRU[FTTINDEX] = FTTCURPRU[FTTINDEX] + 1; END END # END OF EOI # ELSE # NOT EOI BUT EOR/EOF # BEGIN FTTCURPRU[FTTINDEX] = FTTCURPRU[FTTINDEX] + 1; END FTTTBC[FTTINDEX] = 0;# CLEAR LEVEL NO + EORI FLAGS # END # END OF EOR # PRUDIFF = FTTCURPRU[FTTINDEX]- CHK$PRUNO[CHK$START]; CIOSKIP[0] = PRUDIFF; # SET NUMBER OF PRU BACKSPACED# # BACKSPACED # NP$CIO(CIO$BKSPRU); # BACKSPACE PRU # CIOSKIP[0] = 0; # CLEAR SKIP COUNT # FETIN[0] = FETFIR[0]; # RESET DISK IN POINTER # FETOUT[0] = FETFIR[0] ; CMB$STATE[0] = CHK$STATE[CHK$START]; CMB$DBIT[0] = CHK$DBIT[CHK$START]; FTTWORD[FTTINDEX] = CHK$WORD[CHK$START]; FTTCURPRU[FTTINDEX] = CHK$PRUNO[CHK$START]; FTTDBIT[FTTINDEX] = CHK$DBIT[CHK$START]; FTTMSTATE[FTTINDEX] = CHK$STATE[CHK$START]; FTTTBN[FTTINDEX] = 0; # CRUDGE FOR RVL # END # COPY CHECKMARK INFO TO FTT # ELSE BEGIN NP$CIO(CIO$REWIND); # REWIND DISK FILE # CMB$STATE[0] = CHK$STATE[1]; CMB$DBIT[0] = CHK$DBIT[1]; CHK$IDX[0] = 1; # COLLAPSE TABLE TO DEFAULT # FTTWORD[FTTINDEX] = CHK$WORD[1]; # ENTRY # FTTCURPRU[FTTINDEX] = CHK$PRUNO[1]; FTTDBIT[FTTINDEX] = CHK$DBIT[1]; FTTMSTATE[FTTINDEX] = CHK$STATE[1]; FTTTBN[FTTINDEX] = 0; END FTTLCKACK[FTTINDEX] = ITEMP; # SET LAST CHEKMARK ACKED# FTTLCKSNT[FTTINDEX] = ITEMP; # TO CHECKMARK OF RR # FTTICKVAL[FTTINDEX] = ITEMP; # UPDATE INITIAL CHECK # END # MARK NUMBER # ELSE BEGIN FTTSTRC[FTTINDEX] = MAX$RTY; # SET REASON CODE TO # # MAXRETRY COUNT REACHED # NP$XCMP; # QUIT NETXFR # END END ELSE BEGIN FTTSTRC[FTTINDEX] = BSN$ERR; # ERROR EXIT NO RESTART # NP$XCMP; END END GOTO NEXTAT; CLACT10: # **** ES(OK) **** # NET$SENDL7(LEV7$ES,PRDER1); # SEND ES(OK) # FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; # DECREASE ABL WINDOW VALUE # IF FTTCURBLK[FTTINDEX] EQ 0 # IF ABL WINDOW CLOSED # THEN BEGIN NBACKTRIG = NSCTABE; # ABL CLOSED AFTER ES(OK) SENT# END GOTO NEXTAT; CLACT11: # ** ADVANCE CHECHMARK WINDOW # NP$8TIN(DATA$WORD[2],ITEMP); # EXTRACT CHECKMARK NUMBER # IF ITEMP LS FTTLCKACK[FTTINDEX] OR ITEMP GR FTTLCKSNT[FTTINDEX] # CHECKMARK OUT OF RANGE # THEN BEGIN FTTSTRC[FTTINDEX] = BAD$CHK;# SET REASON CODE TO 22 # NP$XCMP; # QUIT NETXFR # END ELSE BEGIN FTTOUTCWS[FTTINDEX] = FTTOUTCWS[FTTINDEX] - 1; FTTLCKACK[FTTINDEX] = ITEMP;# UPDATE LAST CHECKMARK ACKED # NP$XLCH(ITEMP,ITEMP2); # LOCATE CHECK MARK ENTRY # IF ITEMP2 GR CHK$START # IF ENTRY IS NOT THE DEFAULT # THEN BEGIN # ENTRY # NP$SHRK(ITEMP2); # SHRINK CHECKMARK TABLE UP TO# END # THIS ENTRY # END GOTO NEXTAT; CLACT12: # **** SEND DATA **** # NP$SENF(NBACKTRIG); # CALL SEND DATA # GOTO NEXTAT; CLACT13: # **** SR **** # P = LOC(DATA$WORD[1]);# SET LEVEL 7 BASE TO DATAWOR# ITEMP = LV7$ERROR[0]; # EXTRACT CHECKMARK NUMBER # NET$SENDL7(LEV7$SR,ITEMP); FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; # DECREASE ABL WINDOW BY 1 # GOTO NEXTAT; CLACT14: # **** ER(E) **** # IF FTTOPCODE[FTTINDEX] EQ 0 # IF RECEIVER # THEN BEGIN NET$SENDL7(LEV7$ER,PRDER4); # NON-RETRYABLE RECEIVE ERROR # END ELSE BEGIN NET$SENDL7(LEV7$ER,PRDER7); # NON-RETRYABLE SEND ERROR # END FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; # DECREASE ABL WINDOW BY 1 # GOTO NEXTAT; CLACT15: # ** STATUS = -1 AND RWL ** # STATUSWD = -1; # STATUS = -1 # FTTCURBLK[FTTINDEX] = FTTABL[FTTINDEX]; GOTO NEXTAT; CLACT16: # **** SS(CHECKMARK)**** # P = LOC(DATA$WORD[1]);# SET LEVEL 7 BASE TO DATAWOR# ITEMP = LV7$ERROR[0]; # EXTRACT CHECKMARK NUMBER # NET$SENDL7(LEV7$SS,ITEMP); # SEND SS THE CHECKMAR USED # # IS THE SAME AS RR AS A # # CONFIRMATION # FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; # DECREASE ABL WINDOW # GOTO NEXTAT; CLACT17: # **** STATUS = -2 **** # STATUSWD = MINUS2; # SET STATUS = -2 # GOTO NEXTAT; CLACT18: # **** QR(E) **** # NET$SENDL7(LEV7$QR,PRDER3); # NON-RETRYABLE RECEIVE ERROR # FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; # DECREASE ABL WINDOW BY 1 # GOTO NEXTAT; CLACT19: # **** CLOSE **** # NP$CIO(CIO$CLOSE); # CLOSE FILE # IF FETEC[0] NQ 0 # IF ERROR EXISTS IN CLOSE # THEN BEGIN NBACKTRIG = NRCTITR; # SET BACK TRIGGER TO INTERNAL# END # ERROR # ELSE BEGIN NBACKTRIG = NRCTEOK; # SET BACK TRIGGER TO ENDOK # END GOTO NEXTAT; CLACT20: # **** SAVE CHECKMARK **** # NP$8TIN(DATA$WORD[2],ITEMP); # GET CHECKMARK VALUE # CHK$IDX[0] = CHK$START; # SET ENTRY POINTER TO SECOND # # ENTRY # CHK$MARK[CHK$START] = ITEMP; # COPY CHECKMARK NUMBER # CHK$PRUNO[CHK$START] = FTTCURPRU[FTTINDEX];# UPDATE CHECKMARK# CHK$WORD[CHK$START] = FTTWORD[FTTINDEX]; # TABLE # CHK$DBIT[CHK$START] = FTTDBIT[FTTINDEX]; CHK$STATE[CHK$START] = FTTMSTATE[FTTINDEX]; CHK$TBN[CHK$START] = FTTTBN[FTTINDEX]; FTTLCKACK[FTTINDEX] = ITEMP; # SAVE LAST MS RECEIVED # NBACKTRIG = NRCTCHM; # SET BACKTRIG TO SEND MR # GOTO NEXTAT; CLACT21: DATA$WORD[1] = SAVE$WORD; # RESTORE DATA$WORD 1 # NP$RECV(NBACKTRIG); # RECEIVER # DATA$WORD[1] = 0; # CLEAR DATA$WORD 1 # GOTO NEXTAT; CLACT22: # **** FCBRK **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = FCBRK; # SEND FCBRK # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; CLACT23: # **** MR **** # NP$BTO8(FTTLCKACK[FTTINDEX],ITEMP); # CONVERTS TO ASCII # NET$SENDL7(LEV7$MR,ITEMP); # SEND MR # FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; # DECREASE ABL WINDOW BY 1 # GOTO NEXTAT; CLACT24: # **** RR(CHECKMARK) **** # IF FTTRFACIL[FTTINDEX] # IF RFACIL SPECIFIED # THEN BEGIN IF FTTNRETRY[FTTINDEX] GR 0# IF MAXRETRY COUNT NOT EXCEED# THEN BEGIN FTTNRETRY[FTTINDEX] = FTTNRETRY[FTTINDEX] - 1; IF CHK$IDX GQ CHK$START # NON-ZERO CHECKMARK # THEN BEGIN NP$BTO8(CHK$MARK[CHK$START],ITEMP);# GET ASCII VALUE # PRUDIFF = FTTCURPRU[FTTINDEX] - CHK$PRUNO[CHK$START]; # COMPUTE PRU DIFFERENCE # IF PRUDIFF GR 0 # HAVE TO BACKSPACE AND READ # THEN BEGIN CIOSKIP[0] = PRUDIFF; # SET PRU TO BE BACKSPACED # NP$CIO(CIO$BKSPRU); # BACKSPACE PRU'S # CIOSKIP[0] = 0; # CLEAR SKIP COUNT # FETOUT[0] = FETFIR[0]; FETIN[0] = FETFIR[0]; NP$CIO(CIO$RPHR); # READ IN THAT PRU # CIOSKIP[0] = 1; NP$CIO(CIO$BKSPRU); CIOSKIP[0] = 0; FETIN[0] = CHK$WORD[CHK$START] + FETFIR[0]; END ELSE BEGIN # NO NEED TO BACKSPACE # FETIN[0] = FETOUT[0] + CHK$WORD[CHK$START]; IF FETIN[0] GQ FETLIM[0]#WRAP AROUND HAS OCCURRED # THEN BEGIN FETIN[0] = FETFIR[0] + (FETIN[0] - FETLIM[0]); END END CMB$DBIT[0] = CHK$DBIT[CHK$START]; # SET DBIT # CMB$STATE[0] = CHK$STATE[CHK$START]; FTTMSTATE[FTTINDEX] = CHK$STATE[CHK$START]; FTTCURPRU[FTTINDEX] = CHK$PRUNO[CHK$START]; FTTWORD[FTTINDEX] = CHK$WORD[CHK$START]; FTTDBIT[FTTINDEX] = CHK$DBIT[CHK$START]; FTTTBN[FTTINDEX] = 0; # CRUDGE FOR RVL # P = FETIN[0]; ITEMP2 = WORDLENGTH - CMB$DBIT[0]; BWORD[0] = 0; # CLEAR WORD # END ELSE BEGIN NP$CIO(CIO$REWIND); # REWIND FILE # P = 0; WORD[FETIN[0]] = 0; # CLEAR FIRST WORD OF DBUF # CMB$DBIT[0] = CHK$DBIT[1]; # SET DBIT # CMB$STATE[0] = 0; FTTMSTATE[FTTINDEX] = 0; FTTCURPRU[FTTINDEX] = 0; # START FROM PRU 0 # FTTWORD[FTTINDEX] = 0; FTTTBN[FTTINDEX] = 0; FTTDBIT[FTTINDEX] = CMB$DBIT[0]; ITEMP = PRDER1; # SET ASCII 0 CHECKMARK # END NET$SENDL7(LEV7$RR,ITEMP); # SEND RR AS LEVEL 7 MESSAGE# FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; END ELSE BEGIN FTTSTRC[FTTINDEX] = MAX$RTY; # SET REASON CODE # NP$XCMP; # QUIT NETXFR # END END ELSE BEGIN NP$XCMP; END GOTO NEXTAT; CLACT25: # **** ER(OK) **** # NET$SENDL7(LEV7$ER,PRDER1); # SEND ER(OK) # FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] - 1; # DECREASE ABL WINDOW BY 1 # GOTO NEXTAT; CLACT26: # **** LSTOFF **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = LSTOFF; # SEND LSTOFF # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; CLACT27: # **** LSTON **** # LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = LSTON; # SEND LSTON # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; CLACT28: # *** ADV WINDOW + LSTON # FTTCURBLK[FTTINDEX] = FTTCURBLK[FTTINDEX] + 1; LOC$HA = LOC(OUT$ABH); # UPDATE HEADER ADDRESS # LOC$TA = LOC(DATA$BUF); # UPDATE TEXT AREA ADDRESS # OUT$ABHTLC[0] = ENTY1; # WORD COUNT OF MESSAGE # PFCSFC[0] = LSTON; # SEND LSTON # SPACN[0] = FTTACN[FTTINDEX]; # PICK UP ACN FROM FTT TABLE # OPCODE = OP$PUT; # SET OPCODE # *IF DEF,STAT,1 IAM = TYPE"PUT"; # SET TYPE OF ROUTINE # NP$PUT; # SEND MESSAGE # GOTO NEXTAT; NEXTAT: CRNT$ACTION = ACTION2; # GET ACTION2 # END # END WHILE # IF NEWSTATE NQ NOCHG # IF NOT SAME STATE # THEN BEGIN *IF DEF,DEBUG,1 FTTPREST[NETCON]= FTTSTATE[NETCON]; # UPDATE FILE TABLE# *IF DEF,DEBUG,1 FTTPREST[NETCON ] = FTTSTATE[NETCON ]; # UPDATE FILE TABLE# FTTSTATE[NETCON] = NEWSTATE; END END # END IF # EXITT: RETURN; # RETURN TO CALLER # END # END OF NP$STPR # TERM *ENDIF