*DECK NPREGCN USETEXT NIPDEF USETEXT PARAMS USETEXT LLCB USETEXT NCNT USETEXT NCNB USETEXT DRHDR PRGM NPREGCN; STARTIMS; # *1DC NPREGCN * * 1. PROC NAME AUTHOR DATE * NPREGCN L.T.NGUYEN 81/10/01 * * 2. FUNCTIONAL DESCRIPTION * REGULATING THE CONNECTION * * 3. METHOD USED * NEW 1 2 3 * OLD * 1 XXX HPO AOR * * 2 HPI XXX AOR * * 3 ACI LPI XXX * * HOP = HIGH PRIORITY OUT OF REGULAION I.E. CLEAR NCNBNR * AOR = ALL CONNECTION OUT OF REGULATION * HPI = HIGH PRIORITY IN REGULATION * ACI = ALL CONNECTIONS IN REGULATION * LPI = LOW PRIORITY IN REGULATION * XXX = NOTHING TO DO * * DEPENDING ON THE CURRENT BUFFER LEVEL (OLD) AND THE * NEW BUFFER LEVEL IN REG/LL SUPERVISOR MESSAGE WE DO * ACCORDINGLY TO THE ABOVE MATRIX. * * 4. ENTRY PARAMETERS: * PARAMS1 = LLCB ADDRESS * PARAMS2 = NEW REGULATION BUFFER LEVEL * PARAMS3 = INDICATOR - 0 (LOWERING) NEW =< OLD * - 1 (RAISING) NEW >= OLD * * * 5. EXIT PARAMETER: * NONE. * * 6. COMDECKS CALLED: * NIPDEF * PARAMS * LLCB * NCNT * NCNB * DRHDR * OSSIZE * * 7. ROUTINES AND OVERLAY CALLED * NFOB * * 8. NOTE * CALLED BY NPREGLL. * THIS IS A SECONDARY OVERLAY * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY *CALL OSSIZE * * # STOPIMS; # # ITEM I ; ITEM TEMPPTR U ; # TEMPORARY POINTER # ITEM DRADDRESS U ; # DATA RING ADDRESS # ITEM NFOBCALL B ; ITEM LLCBIX U ; ITEM NCNTIX U ; XREF PROC NFOB ; XREF LABEL RJMAIN; BEGIN # NPREGCN # P = PARAMS1 ; FOR LLCBIX = LLCBHSIZE STEP 1 UNTIL LLCBSIZE - LLCBHSIZE - 1 DO BEGIN P = LLCBNCNT[LLCBIX] ; IF P NQ 0 THEN BEGIN FOR NCNTIX = NCNTHSIZE STEP 1 UNTIL NCNTSIZE-NCNTHSIZE DO BEGIN NFOBCALL = FALSE ; P = NCNTNCNB[NCNTIX] ; IF P NQ 0 THEN BEGIN IF PARAMS3 NQ 0 # LOWERING # THEN BEGIN IF PARAMS2 EQ BUFLSM # BUFFER LEVEL IS 1 # THEN NCNBNR = TRUE ; IF PARAMS2 EQ BUFLHDS # BUFFER LEVEL IS 2 # AND NCNBPRI EQ 2 # LOW PRIORITY # THEN NCNBNR = TRUE ; END ELSE # RAISING # BEGIN IF PARAMS2 EQ BUFLHDS # BUFFER$LEVEL IS 2 # AND NCNBPRI EQ 1 # HIGH PRIORITY # THEN BEGIN NCNBNR = FALSE ; NFOBCALL = TRUE ; END IF PARAMS2 EQ BUFLAM # BUFFER LEVEL IS 3 # THEN BEGIN NCNBNR = FALSE ; NFOBCALL = TRUE ; END IF (NFOBCALL) AND # OKAY TO SEND DOWNLINE DATA # (NCNBID[0] EQ NCNBIDVALUE) # THIS IS A NCNB # THEN BEGIN # CALL NFOB TO SEND DATA # FOR I = I WHILE (NCNBNBO[0] LS NCNBDBL[0]) AND NCNBDRFP[0] NQ 0 AND NOT NCNBHR[0] DO BEGIN # FOR LOOP # DRADDRESS = NCNBDRFP ; # ADDRESS FOR NFOB CALL # IF NCNBDRFP NQ NCNBDRBP THEN BEGIN # NOT THE LAST NCNB # P = NCNBDRFP ; NCNBDRFP = NEXTPTR ; TEMPPTR = BACKPTR ; P = NEXTPTR ; BACKPTR = TEMPPTR ; END # NOT THE LAST NCNB # ELSE BEGIN # THE LAST NCNB # NCNBDRFP = 0 ; NCNBDRBP = 0 ; END # THE LAST NCNB # NCNBBLKSQ[0] = NCNBBLKSQ[0] - 1; NFOB(DRADDRESS,P) ; END # FOR LOOP # END # CALL NFOB # END END END END END GOTO RJMAIN ; END TERM