cdc:nos2.source:nam5871:cscuhs
Table of Contents
CSCUHS
Table Of Contents
- [00005] PROC CSCUHS
- [00006] CSCUHS - UPDATE HOP STATUS.
- [00010] UPDATE HOP STATUS.
- [00052] PROC MOVE
- [00053] PROC SSSAWR
- [00054] PROC SSTAQE
- [00055] PROC SSTATS
- [00056] PROC SSTRTS
- [00309] PROC XMITHQ
- [00399] PROC PURGEHQ
Source Code
- CSCUHS.txt
- *DECK CSCUHS
- USETEXT TEXTCS
- USETEXT TEXTSS
- USETEXT TXTAPSS
- PROC CSCUHS;
- # TITLE CSCUHS - UPDATE HOP STATUS. #
- BEGIN # CSCUHS #
- #
- ** CSCUHS - UPDATE HOP STATUS.
- *
- * D. G. DEPEW. 82/03/04.
- *
- * THIS PROCEDURE PERFORMS ALL THE CONNECTION(C) LAYER PROCESSING
- * REQUIRED FOR THE INBOUND, SPECIAL HOP SUPERVISORY MESSAGES.
- *
- * PROC CSCUHS
- *
- * ENTRY WCBUF[0] = WORD COUNT WORD FROM ORIGINAL CONNECTION
- * TRAFFIC QUEUE (*CNQ*) ENTRY.
- * ABHBUF[0] = APPLICATION BLOCK HEADER FOR THE SM (BASED
- * ARRAY *ABH* IN *TXTAPSS* POINTS HERE).
- * MSGBUF[0] = BODY OF THE SM (BASED ARRAY *APSM* IN
- * *TXTAPSS* POINTS HERE). THE POSSIBLE PFC/SFC
- * VALUES ARE: HOP/START, HOP/CMD, HOP/BRK,
- * HOP/PAGE, HOP/END, HOP/IG.
- *
- * EXIT ANY OF THE FOLLOWING IN VARIOUS COMBINATIONS ACCORDING TO
- * THE SM RECEIVED AND THE STATE OF THE HOP PSEUDO ACN:
- * - THE HOP PSEUDO ACN STATE HAS BEEN UPDATED.
- * - AN ENTRY HAS BEEN PLACED IN THE PROTOCOL EVENT QUEUE
- * (*PEQ*).
- * - ONE OR MORE HOP ENTRIES IN THE WAITING BLOCK QUEUE
- * (*WBQ*) HAVE BEEN TRANSFERRED TO THE OUTGOING TRAFFIC
- * QUEUE (*OTQ*).
- * - ALL OUTPUT ENQUEUED FOR THE HOP (IN THE *WBQ*) HAS BEEN
- * DISCARDED.
- * - AN ENTRY HAS BEEN PLACED IN THE OPERATOR TYPEIN QUEUE
- * (*OPTQ*).
- * - HOP PAGING STATUS HAS BEEN UPDATED.
- * - HOP IGNORE STATUS HAS BEEN UPDATED.
- *
- * NOTE THE PROCESSING IS DEFINED BY THE CS/HOP C-LAYER STATE
- * DIAGRAM.
- #
- #
- **** PROC CSCUHS - XREF LIST.
- #
- XREF
- BEGIN
- PROC MOVE; # MOVE STORAGE DIRECT ADDRESSING (MACREL) #
- PROC SSSAWR; # ACCEPT WORKLIST REQUEST #
- PROC SSTAQE; # ACCEPT QUEUE ENTRY #
- PROC SSTATS; # ALLOCATE TABLE SPACE AT END OF TABLE #
- PROC SSTRTS; # REMOVE TABLE SPACE ANYWHERE IN TABLE #
- END
- #
- ****
- #
- ITEM STATE S:HCNST; # TEMP CELL FOR STATE OF HOP PSEUDO ACN #
- #
- * FOLLOWING ITEMS ARE USED ONLY BY EMBEDDED PROCS (SOME ARE
- * SHARED).
- #
- ITEM I; # LOOP INDUCTION VARIABLE #
- ITEM COUNT; # NUMBER OF HOP *WBQ* ENTRIES TO BE MOVED #
- ITEM LICNT; # COUNT OF DISPLAY LINES IN *WBQ* ENTRY #
- ITEM OORD; # OUTGOING TRAFFIC QUEUE ORDINAL #
- ITEM SIZ; # *OTQ* ENTRY SIZE #
- ITEM WBC; # *WBQ* ENTRY COUNT OR ENTRY SIZE #
- ITEM WORD; # WAITING BLOCK QUEUE ORDINAL #
- BASED ARRAY TEXTLOC [00:00] S(1); ;
- ARRAY OUTDISC [00:00] S(5);
- BEGIN
- ITEM OD$PSFC U(00,00,16) = [HOPDIS];
- ITEM OD$ZERO1 U(00,16,43) = [0];
- ITEM OD$IAF B(00,59,01) = [TRUE]; # INPUT OK #
- ITEM OD$TEXT1 C(01,00,16) = ["OUTPUT DISCARDED"];
- ITEM OD$ZERO2 U(02,36,24) = [0];
- ITEM OD$TEXT2 C(03,00,07) = ["READY.."];
- ITEM OD$ZERO3 U(03,42,18) = [0];
- ITEM OD$ZERO4 U(04,00,60) = [0];
- END
- ARRAY PAGEMSG [00:00] S(4);
- BEGIN
- ITEM PG$PSFC U(00,00,16) = [HOPDIS];
- ITEM PG$ZERO1 U(00,16,44) = [0]; # NO INPUT #
- ITEM PG$TEXT C(01,00,15) = ["PAGE ACCEPTED.."];
- ITEM PG$ZERO2 U(02,30,30) = [0];
- ITEM PG$ZERO3 U(03,00,60) = [0];
- END
- ARRAY RKPAGE [PAGE1:NPG] S(116); # HOP/DIS FOR HELP DISPLAY #
- BEGIN
- ITEM RK$PAGEPS U(000,00,16) = [NPG(X"D009")]; # PFC/SFC VALUE #
- ITEM RK$PAGEZ1 U(000,16,42) = [NPG(0)];
- ITEM RK$PAGERS B(000,58,01) = [NPG(TRUE)]; # RIGHT SCREEN #
- ITEM RK$PAGEIA B(000,59,01) = [NPG(FALSE)]; # INPUT ALLOWED #
- # HEADER DISPLAY #
- ITEM RK$PAGEL01 C(01,00,20) = [NPG(" *** ")] ;
- ITEM RK$PAGEM01 C(03,00,20) = [NPG("CS COMMAND LIST *** ")];
- ITEM RK$PAGEN01 C(05,00,18) = [NPG(" ")] ; # DIS HEADER LINE#
- ITEM RK$PAGEE01 U(06,48,12) = [NPG(0)]; # LINE TERMINATOR#
- ITEM RK$PAGEM02 C(07,00,40) = [NPG(" ")]; # BLANK LINE #
- ITEM RK$PAGEN02 C(11,00,18) = [NPG(" (PAGE OF 3) ")];
- ITEM RK$PAGEO02 C(11,48,01) = ["1","2","3"];
- ITEM RK$PAGEE02 U(12,48,12) = [NPG(0)]; # LINE TERMINATOR#
- ITEM RK$PAGEL03 C(13,00,30)= ["CO,NP=NPUNAME(,ON/OFF) ",
- # PAGE2 # "EN,TR/LL/LI/TE=NAME. ",
- # PAGE3 # "IN. "];
- ITEM RK$PAGEM03 C(16,00,28)= ["GAIN (ON) OR GIVE UP CONTROL",
- # PAGE2 # "ENABLE NAMED NETWORK ELEMENT",
- # PAGE3 # "DISPLAY CURRENT INFORMATION "];
- ITEM RK$PAGEE03 U(18,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL04 C(19,00,30)= [" ",
- # PAGE2 # "EN,LIS/TRS/LLS,NP=NPUNAME. ",
- # PAGE3 # " "];
- ITEM RK$PAGEM04 C(22,00,28)= [" OF NAMED NPU. ",
- # PAGE2 # "ENABLE ALL LINES/TERMINALS/ ",
- # PAGE3 # " ABOUT NOPS CONNECTED TO "];
- ITEM RK$PAGEE04 U(24,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL05 C(25,00,30)= ["CO,NPS(,ON/OFF) ",
- # PAGE2 # " ",
- # PAGE3 # " "];
- ITEM RK$PAGEM05 C(28,00,28)= ["GAIN OR GIVE UP CONTROL OF ",
- # PAGE2 # " OR LLINKS ON NAMED NPU. ",
- # PAGE3 # " AND NPUS SUPERVISED BY "];
- ITEM RK$PAGEE05 U(30,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL06 C(31,00,30)= [" ",
- # PAGE2 # "EN,LIS/TRS/LLS,NPS. ",
- # PAGE3 # " "];
- ITEM RK$PAGEM06 C(34,00,28)= [" ALL NPUS CURRENTLY SUPER- ",
- # PAGE2 # "ENABLE ALL LINES, TERMINALS ",
- # PAGE3 # " THIS CS. "];
- ITEM RK$PAGEE06 U(36,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL07 C(37,00,30)= [" ",
- # PAGE2 # " ",
- # PAGE3 # "LO,NP=NPUNAME(,DU/ND). "];
- ITEM RK$PAGEM07 C(40,00,28)= [" VISED BYE THIS CS. ",
- # PAGE2 # " OR LLINKS ON ALL NPUS YOU ",
- # PAGE3 # "STOP AND RELOAD NAMED NPU. "];
- ITEM RK$PAGEE07 U(42,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL08 C(43,00,30)= ["CO,AU(,ON) ",
- # PAGE2 # " ",
- # PAGE3 # " "];
- ITEM RK$PAGEM08 C(46,00,28)= ["AUTOMATICALLY GAIN CONTROL ",
- # PAGE2 # " CONTROL AS A NOP. ",
- # PAGE3 # " USE THE DUMP (DU) OR NO- "];
- ITEM RK$PAGEE08 U(48,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL09 C(49,00,30)= [" ",
- # PAGE2 # "EN,TES,(NPU=NNAME/LINE=LNAME. ",
- # PAGE3 # " "];
- ITEM RK$PAGEM09 C(52,00,28)= [" OF ANY NPU THAT COMES ",
- # PAGE2 # "ENABLE ALL TERMINALS ON ",
- # PAGE3 # " DUMP (ND) OPTION TO OVER- "];
- ITEM RK$PAGEE09 U(54,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL10 C(55,00,30)= [" ",
- # PAGE2 # " ",
- # PAGE3 # " "];
- ITEM RK$PAGEM10 C(58,00,28)= [" UNDER SUPERVISION OF THIS ",
- # PAGE2 # " NAMED NPU OR LINE. ",
- # PAGE3 # " WRITE THE LONGTERM DMP FLG"];
- ITEM RK$PAGEE10 U(60,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL11 C(61,00,30)= [" ",
- # PAGE2 # "EN,TES,NPS. ",
- # PAGE3 # "LO,NPS(,DU,ND). "];
- ITEM RK$PAGEM11 C(64,00,28)= [" CS OR IF ITS CONTROL IS ",
- # PAGE2 # "ENABLE ALL TERMINALS ON ALL ",
- # PAGE3 # "STOP AND RELOAD ALL NPUS "];
- ITEM RK$PAGEE11 U(66,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL12 C(67,00,30)= [" ",
- # PAGE2 # " ",
- # PAGE3 # " "];
- ITEM RK$PAGEM12 C(70,00,28)= [" GIVEN UP BY ANOTHER NOP. ",
- # PAGE2 # " NPUS YOU CONTROL AS A NOP.",
- # PAGE3 # " UNDER YOUR CONTROL. "];
- ITEM RK$PAGEE12 U(72,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL13 C(73,00,30)= ["CO,AU,OFF. ",
- # PAGE2 # "GO,NP=NPUNAME. ",
- # PAGE3 # "RE/REPORT,(NPU/NP=NNN/NPUS/ "];
- ITEM RK$PAGEM13 C(76,00,28)= ["CANCEL EFFECT OF CO,AU,ON. ",
- # PAGE2 # "START THE NAMED NPU. ",
- # PAGE3 # "REQUEST TO/TO NOT RECEIVE "];
- ITEM RK$PAGEE13 U(78,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL14 C(79,00,30)= ["DI,TR/LL/LI/TE=NAME. ",
- # PAGE2 # "GO,NPS. ",
- # PAGE3 # "NPS),ON/OFF. "];
- ITEM RK$PAGEM14 C(82,00,30)= ["DISABLE TRUNK, LLINK,LINE OR",
- # PAGE2 # "START ALL THE NPUS YOU ",
- # PAGE3 # " UNSOLICITED STATUS REPORT. "];
- ITEM RK$PAGEE14 U(84,48,12)= [NPG(0)] ;
- ITEM RK$PAGEL15 C(85,00,30)= [" ",
- # PAGE2 # " ",
- # PAGE3 # "ST/STATUS(,NPU/NP=/NPUS/NPS). "];
- ITEM RK$PAGEM15 C(88,00,28)= [" NAMED TERMINAL. ",
- # PAGE2 # " CONTROL AS A NOP. ",
- # PAGE3 # "STATUS OF NAMED NPU. "];
- ITEM RK$PAGEE15 U(90,48,12)= [NPG(0)];
- ITEM RK$PAGEL16 C(91,00,30)= ["DU,NP=NPUNAME(,ON/OFF) ",
- # PAGE2 # "HI. ",
- # PAGE3 # "TS(,NPU/NP=NNN)(,RE/MS=MESAGE "];
- ITEM RK$PAGEM16 C(94,00,28)= ["SET LONG TERM DUMP FLAG ON ",
- # PAGE2 # "DISPLAY LAST PAGE OF RECENT ",
- # PAGE3 # "DIAGNOSTIC TEST COMMAND. "];
- ITEM RK$PAGEE16 U(96,48,12)= [0] ;
- ITEM RK$PAGEL17 C(97,00,30)= [" ",
- # PAGE2 # " ",
- # PAGE3 # "/SEND/SE/DROP/DR). "];
- ITEM RK$PAGEM17 C(100,00,28)=[" OR OFF FOR NAMED NPU. ",
- # PAGE2 # " ACTIVITY HISTORY BUFFER. ",
- # PAGE3 # " "];
- ITEM RK$PAGEE17 U(102,48,12)=[0] ;
- ITEM RK$PAGEL18 C(103,00,30)=["DU,NPS(,ON/OFF) ",
- # PAGE2 # "HI,ALL. ",
- # PAGE3 # "SE(,TE/LI/LL/NP=ELEMENT,MSG/MS"];
- ITEM RK$PAGEM18 C(106,00,28)=["SET DUMP FLAG ON ALL NPUS ",
- # PAGE2 # "DISP ALL PAGES OF HISTORY. ",
- # PAGE3 # "SEND TO NAMED ELEMENT THE "];
- ITEM RK$PAGEE18 U(108,48,12)=[NPG(0)];
- ITEM RK$PAGEL19 C(109,00,20)=[" ",
- # PAGE2 # " ",
- # PAGE3 # "=MESSAGE STRING). "];
- ITEM RK$PAGEM19 C(111,00,20)=["TYPE ( TO FORWARD. ",
- # PAGE2 # "TYPE ( TO FORWARD. ",
- # PAGE3 # "MESSAGE. "];
- ITEM RK$PAGEN19 C(113,00,18)=["TYPE ) TO BACKWARD",
- # PAGE2 # "TYPE ) TO BACKWARD",
- # PAGE3 # "* FOR BACK TO NAM "];
- ITEM RK$PAGEE19 U(114,48,12)=[NPG(0)] ;
- ITEM RK$PAGEZW U(115,00,60)=[NPG(0)] ; # END BY ZEROED WORD #
- END # NINETEEN LINES PER PAGE FOR RIGHT K-DIS #
- DEF ODTLW$ #5#; # *OUTPUT DISCARDED* TEXT LENGTH IN WORDS #
- DEF ODQES$ #7#; # *OUTPUT DISCARDED* QUEUE ENTRY SIZE #
- DEF PGTLW$ #4#; # *PAGE ACCEPTED..* TEXT LENGTH IN WORDS #
- DEF PGQES$ #6#; # *PAGE ACCEPTED..* QUEUE ENTRY SIZE #
- CONTROL EJECT;
- PROC XMITHQ;
- BEGIN # XMITHQ #
- #
- * XMITHQ - TRANSMIT HOP QUEUE.
- *
- * THIS EMBEDDED PROC MOVES HOP ENTRIES IN THE WAITING BLOCK QUEUE
- * (*WBQ*) TO THE OUTGOING TRAFFIC QUEUE (*OTQ*). THE NUMBER OF
- * ENTRIES MOVED DEPENDS UPON PAGING STATUS AND WHETHER THERE
- * ACTUALLY IS DATA QUEUED (IN THE *WBQ*) FOR THE HOP.
- *
- * PROC XMITHQ
- *
- * ENTRY 1. THE *WBQ* CONTAINS ZERO OR MORE HOP ENTRIES.
- * 2. THE ACN LIST ENTRY FOR THE HOP CONTAINS ALL REQUIRED
- * INFORMATION - NAMELY, THE COUNT OF HOP ENTRIES IN THE
- * *WBQ* AND THE PAGING STATUS FLAG.
- *
- * EXIT 1. ZERO OR MORE HOP ENTRIES HAVE BEEN REMOVED FROM THE
- * *WBQ* AND PLACED IN THE *OTQ*.
- * 2. THE COUNT OF LINES CURRENTLY BEING DISPLAYED HAS BEEN
- * SET TO THE LINE COUNT OF THE LAST *WBQ* ENTRY MOVED
- * (ZERO IF NO ENTRIES MOVED).
- * 3. THE HOP WAITING BLOCK COUNT HAS BEEN UPDATED
- * APPROPRIATELY.
- *
- * NOTE HOP ENTRIES IN THE *WBQ* ARE ALREADY IN CORRECT HOP/DIS
- * FORMAT EXCEPT FOR THE EXTRA WORD AT THE END, WHICH IS
- * REQUIRED BY NIP AND MUST BE ADDED.
- #
- #
- * THE FIRST TASK IS TO DETERMINE HOW MANY BLOCKS (HOP *WBQ* ENTRIES)
- * TO MOVE. IF PAGING IS ON, MOVE ONE BLOCK (AT MOST A SCREENFULL).
- * IF PAGING IS OFF, MOVE ALL ENQUEUED BLOCKS. OF COURSE, IF THERE
- * ARE CURRENTLY NO HOP ENTRIES IN THE *WBQ*, NOTHING HAPPENS.
- #
- WBC = ACN$WBCNT[HOPORD$];
- IF ACN$PWAIT[HOPORD$]
- AND WBC NQ 0
- THEN
- COUNT = 1;
- ELSE
- COUNT = WBC; # CAN BE ZERO #
- ACN$WBCNT[HOPORD$] = WBC - COUNT; # UPDATED #
- #
- * NOW MOVE THE BLOCKS. SET THE COUNT OF TEXT LINES CURRENTLY BEING
- * DISPLAYED TO THE LINE COUNT OF THE LAST BLOCK MOVED (IF ONE).
- * PROVIDE FOR THE EXTRA WORD REQUIRED IN THE HOP/DIS SM. IN ORDER
- * TO MOVE A BLOCK, WE MUST FIRST FIND IT.
- #
- LICNT = 0; # INITIALIZE #
- WORD = 0;
- FOR I=1 STEP 1 UNTIL COUNT
- DO # MOVE *COUNT* BLOCKS, ZERO OK #
- BEGIN
- FOR WORD = WORD STEP WBQ$ESIZE[WORD]
- WHILE WBQ$ABHACN[WORD] NQ 0
- OR WBQ$SMACN[WORD] NQ 0
- DO # FIND HOP ENTRY (HOP/DIS SM) #
- BEGIN END
- OORD = OTQL; # WHERE *OTQ* ENTRY WILL BE #
- WBC = WBQ$ESIZE[WORD]; # SIZE OF ENTRY TO BE MOVED #
- SIZ = WBC + 1; # SIZE OF HOP/DIS NTRY IN *OTQ* #
- LICNT = WBQ$LICNT[WORD]; # TEXT LINES IN *WBQ* ENTRY #
- WBQ$ESIZE[WORD] = SIZ; # UPDATE PRIOR TO MOVE #
- WBQ$TLC[WORD] = WBQ$TLC[WORD] + 1;
- SSTATS (P<OTQ>, SIZ); # MAKE ROOM #
- MOVE (WBC, WBQ[WORD], OTQ[OORD]);
- SSTRTS (P<WBQ>, WORD, WBC); # DELETE WAITING BLOCK #
- OTQ$WORD[OTQL-1] = 0; # EXTRA WORD #
- IF OORD EQ 0
- THEN # FIRST ENTRY IN *OTQ* #
- SSSAWR (CSWDF"SACNI");
- END
- ACN$BLCNT[HOPORD$] = LICNT; # NUMBER LINES ON SCREEN #
- END # XMITHQ #
- PROC PURGEHQ;
- BEGIN # PURGEHQ #
- #
- * PURGEHQ - PURGE HOP QUEUE.
- *
- * THIS EMBEDDED PROC REMOVES ALL HOP ENTRIES FROM THE WAITING BLOCK
- * QUEUE (*WBQ*).
- *
- * PROC PURGEHQ
- *
- * ENTRY 1. THE *WBQ* CONTAINS ZERO OR MORE HOP ENTRIES.
- * 2. THE ACN LIST ENTRY FOR THE HOP CONTAINS ALL REQUIRED
- * INFORMATION - NAMELY, THE COUNT OF HOP *WBQ* ENTRIES.
- *
- * EXIT 1. ALL HOP ENTRIES IN THE *WBQ* HAVE BEEN DELETED.
- * 2. THE COUNTS OF *WBQ* ENTRIES AND LINES CURRENTLY BEING
- * DISPLAYED (BOTH IN THE ACN LIST ENTRY FOR THE HOP)
- * HAVE BEEN CLEARED.
- #
- #
- * INITIALIZE AND UPDATE THE ACN LIST ENTRY FOR THE HOP.
- #
- COUNT = ACN$WBCNT[HOPORD$]; # NUMBER OF BLOCKS TO DELETE #
- ACN$WBCNT[HOPORD$] = 0;
- ACN$BLCNT[HOPORD$] = 0; # START NEW PAGE #
- #
- * NOW DELETE THE ENTRIES. IN ORDER TO DELETE AN ENTRY, WE MUST
- * FIRST FIND IT.
- #
- WORD = 0;
- FOR I=1 STEP 1 UNTIL COUNT
- DO # DEL *COUNT* ENTRIES, ZERO OK #
- BEGIN
- FOR WORD = WORD STEP WBQ$ESIZE[WORD]
- WHILE WBQ$ABHACN[WORD] NQ 0
- OR WBQ$SMACN[WORD] NQ 0
- DO # FIND HOP ENTRY (HOP/DIS SM) #
- BEGIN END
- WBC = WBQ$ESIZE[WORD]; # SIZE OF ENTRY TO BE DELETED #
- SSTRTS (P<WBQ>, WORD, WBC); # DELETE WAITING BLOCK #
- END
- END # PURGEHQ #
- CONTROL EJECT;
- #
- * MAIN ROUTINE BEGINS HERE.
- *
- * WE EXECUTE WHAT AMOUNTS TO A CASE CONSTRUCT TO PROCESS THE SIX
- * TYPES OF INCOMING HOP SM-S.
- #
- IF WCB$SMID[0] EQ SMID"HOPSTRT"
- THEN # K-DISPLAY ASSIGNED TO CS #
- BEGIN
- #
- * INITIALIZE THE HOP ACN LIST ENTRY. SEND THE HOP/START TO THE
- * I-LAYER (AS PROTOCOL EVENT), IF APPROPRIATE. UPDATE THE STATE.
- #
- STATE = ACN$HOPST[HOPORD$];
- ACN$WORD0[HOPORD$] = 0;
- ACN$WORD1[HOPORD$] = 0;
- IF STATE EQ S"INACT"
- THEN # SEND HOP/START TO I-LAYER #
- BEGIN
- WCB$WC[0] = 2; # MIN QUEUE ENTRY LENGTH #
- ABHADR[0] = HOPORD$;
- ABHTLC[0] = 0;
- SSTAQE (P<PEQ>, WCBUF[0], ABH[0], APSM[0]); # TO I-LAYER #
- END
- IF STATE EQ S"ENDED"
- THEN
- ACN$HOPST[HOPORD$] = S"RESTART";
- ELSE
- BEGIN
- ACN$HOPST[HOPORD$] = S"CREATE";
- ACN$PL[HOPORD$] = HOPLPL[0] - 1;
- END
- END
- ELSE IF WCB$SMID[0] EQ SMID"HOPCMD"
- THEN # HOP ENTERED A COMMAND #
- BEGIN
- #
- * FORWARD THE COMMAND TO THE I-LAYER (AS OPERATOR TYPEIN) FOR
- * SYNTAX CRACKING AND COMMAND PROCESSING. ECHO THE COMMAND BACK
- * TO THE K-DISPLAY VIA HOP/DIS SM. UPDATE THE STATE AND SEND HIM
- * THE NEXT PAGE OF QUEUED OUTPUT (IF ANY). NOTE THAT *OPTQ*
- * ENTRIES DO NOT CONTAIN A PFC/SFC WORD (SAME FORMAT FOR HOP AS
- * FOR NOPS).
- #
- WCB$WORD[1] = WCB$WC[0] - 1; # DEDUCT FOR PFC/SFC WORD #
- ABHWORD[1] = 0;
- ABHADR[1] = HOPORD$;
- ABHTLC[1] = HOPDTL[0]; # ACTUAL CHAR COUNT #
- P<TEXTLOC> = LOC(SPMSG1[0]); # LOCATION OF COMMAND TEXT #
- SSTAQE (P<OPTQ>, WCBUF[1], ABH[1], TEXTLOC[0]); # TO I-LAYER #
- WCB$WORD[0] = WCB$WC[0] + 1; # EXTRA WORD FOR HOP/DIS SM #
- ABHTLC[0] = ABHTLC[0] + 1;
- SPMSG0[0] = 0; # NO INPUT ALLOWED #
- PFCSFC[0] = HOPDIS;
- SSTAQE (P<OTQ>, WCBUF[0], ABH[0], APSM[0]); # ECHO COMMAND #
- OTQ$WORD[OTQL-1] = 0; # EXTRA WORD #
- ACN$HOPST[HOPORD$] = S"COMMAND";
- XMITHQ; # XMIT QUEUED HOP DATA (IF ANY) #
- END
- ELSE IF WCB$SMID[0] EQ SMID"HOPBRK"
- THEN # HOP ENTERED A BREAK #
- BEGIN
- #
- * RELEASE ALL QUEUED (IN THE *WBQ*) OUTPUT. IF THE HOP PSEUDO
- * ACN IS IN THE *ACTIVE* STATE, SEND THE *OUTPUT DISCARDED*
- * MESSAGE FOLLOWED BY *READY..*. IF A COMMAND IS IN PROGRESS,
- * FORWARD THE BREAK TO THE I-LAYER AS AN OPERATOR TYPEIN (*OPTQ*).
- * UPDATE THE STATE.
- #
- PURGEHQ; # PURGE QUEUED HOP DATA(IF ANY) #
- IF ACN$HOPST[HOPORD$] EQ S"CREATE"
- THEN # BREAK HISTORY BUFFER OUTPUT #
- ACN$HOPST[HOPORD$] = S"STARTBRK";
- ELSE IF ACN$HOPST[HOPORD$] EQ S"ACTIVE"
- THEN # BREAK UNSOLICITED STATUS RPTS #
- BEGIN
- WCB$WORD[0] = ODQES$;
- ABHTLC[0] = ODTLW$;
- SSTAQE (P<OTQ>, WCBUF[0], ABH[0], OUTDISC);
- ACN$BLCNT[HOPORD$] = 2; # START NEW PAGE W/ 2 LINES #
- END
- ELSE IF ACN$HOPST[HOPORD$] EQ S"COMMAND"
- THEN # BREAK COMMAND IN PROGRESS #
- BEGIN
- WCB$WORD[1] = 2; # MIN QUEUE ENTRY LENGTH #
- ABHWORD[1] = 0; # TLC = 0 #
- ABHADR[1] = HOPORD$;
- ABHBRK[1] = 1;
- SSTAQE (P<OPTQ>, WCBUF[1], ABH[1], TEXTLOC[0]); #TO I-LAYER #
- ACN$HOPST[HOPORD$] = S"BREAK";
- END
- ELSE # MUST BE BRK HIST AFT RESTART #
- ACN$HOPST[HOPORD$] = S"RESBREAK";
- END
- ELSE IF WCB$SMID[0] EQ SMID"HOPIG"
- THEN # HOP WANTS TO IGNORE CS REPTS #
- #
- * ALL THAT IS REQUIRED IS TO SET THE APPROPRIATE FLAG IN THE HOP
- * ENTRY OF THE ACN LIST.
- #
- ACN$IGNOR[HOPORD$] = TRUE;
- ELSE IF WCB$SMID[0] EQ SMID"HOPENDD"
- THEN # K-DIS NO LONGER ASS'D TO CS #
- BEGIN
- #
- * RELEASE ALL QUEUED (IN THE *WBQ*) OUTPUT. IF THE HOP PSEUDO
- * ACN IS IN THE *ACTIVE* STATE, SEND A CON/CB PROTOCOL EVENT TO
- * THE I-LAYER. IF THERE IS A COMMAND IN PROGRESS, SEND A CON/CB-
- * WARNING PROTOCOL EVENT TO THE I-LAYER (CON/CB WILL BE SENT WHEN
- * COMMAND IS CLEANED UP). UPDATE THE HOP PSEUDO ACN STATE.
- #
- PURGEHQ; # PURGE QUEUED HOP DATA(IF ANY) #
- IF ACN$HOPST[HOPORD$] EQ S"ACTIVE"
- OR ACN$HOPST[HOPORD$] EQ S"COMMAND"
- THEN # MUST SEND P.E. TO I-LAYER #
- BEGIN
- WCB$WORD[0] = 2; # MIN QUEUE ENTRY SIZE #
- ABHADR[0] = HOPORD$;
- ABHTLC[0] = 0;
- IF ACN$HOPST[HOPORD$] EQ S"ACTIVE"
- THEN
- WCB$SMID[0] = SMID"CONCB";
- ELSE
- WCB$SMID[0] = SMID"CONCBW";
- SSTAQE(P<PEQ>, WCBUF[0], ABH[0], APSM[0]); # TO I-LAYER #
- END
- IF ACN$HOPST[HOPORD$] EQ S"CREATE"
- OR ACN$HOPST[HOPORD$] EQ S"STARTBRK"
- THEN
- ACN$HOPST[HOPORD$] = S"STARTEND";
- ELSE
- ACN$HOPST[HOPORD$] = S"ENDED";
- END
- ELSE # MUST BE A PAGING COMMAND SM #
- BEGIN
- #
- * IF THE COMMAND INDICATES A CHANGE IN PAGING STATUS IS DESIRED,
- * SEND THE *PAGE ACCEPTED..* MESSAGE AND REMEMBER THE NEW PAGING
- * STATUS. THEN SEND THE HOP AS MUCH QUEUED (IN THE *WBQ*) DATA
- * (IF ANY) AS IS CONSISTENT WITH THE UPDATED PAGING STATUS.
- #
- IF HOPPC[0] EQ "("
- THEN
- BEGIN # SEND NEXT PAGE FOR RIGHT DISPLAY#
- WCB$SMID[1] = SMID"HOPDIS" ;
- WCB$WC[1] = RKPAGESZ + 1;
- ABHWORD[1] = 0 ;
- ABHABT[1] = 3 ;
- ABHACT[1] = 1 ;
- ABHTLC[1] = RKPAGESZ ;
- IF OC$PAGEC[HOPORD$] EQ PAGE3
- THEN
- OC$PAGEC[HOPORD$] = PAGE1 ;
- ELSE
- OC$PAGEC[HOPORD$] = OC$PAGEC[HOPORD$] + 1 ;
- SSTAQE(P<OTQ>,WCBUF[1],ABH[1],RKPAGE[OC$PAGEC[HOPORD$]]);
- END
- ELSE
- BEGIN
- IF HOPPC[0] EQ ")"
- THEN
- BEGIN
- WCB$SMID[1] = SMID"HOPDIS" ;
- WCB$WC[1] = RKPAGESZ + 1 ;
- ABHWORD[1] = 0 ;
- ABHABT[1] = 3 ;
- ABHACT[1] = 1 ;
- ABHTLC[1] = RKPAGESZ ;
- IF OC$PAGEC[HOPORD$] EQ PAGE1
- THEN
- OC$PAGEC[HOPORD$] = PAGE3 ; # BACK TO PAGE 3 #
- ELSE
- OC$PAGEC[HOPORD$] = OC$PAGEC[HOPORD$] - 1 ;
- SSTAQE(P<OTQ>,WCBUF[1],ABH[1],RKPAGE[OC$PAGEC[HOPORD$]
- ]) ;
- END
- ELSE
- IF HOPPC[0] NQ ACN$PCHAR[HOPORD$]
- THEN # PAGING STATUS CHANGE #
- BEGIN
- WCB$WORD[0] = PGQES$;
- ABHTLC[0] = PGTLW$;
- SSTAQE (P<OTQ>, WCBUF[0], ABH[0], PAGEMSG);
- ACN$PCHAR[HOPORD$] = HOPPC[0];
- END
- END
- XMITHQ; # XMIT QUEUED HOP DATA (IF ANY) #
- END
- END # CSCUHS #
- TERM
cdc/nos2.source/nam5871/cscuhs.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator