*DECK ITABS
USETEXT NIPDEF;
USETEXT AT;
USETEXT BACKBUF
USETEXT CET
USETEXT DRHDR
USETEXT FREETAB;
USETEXT INPARUT
USETEXT MEM;
USETEXT NBT;
USETEXT PT;
USETEXT PIT
USETEXT PRUBUFF;
USETEXT SYSTIME;
USETEXT TNT;
PROC ITABS; # INITIALIZE NIP TABLES #
STARTIMS;
#
*1DC ITABS
* 1. PROC NAME AUTHOR DATE
* ITABS S. WATANABE 80/03/13
*
* 2. FUNCTIONAL DESCRIPTION.
* INITIALIZE NBT, POA, CET, AT, TNT AND FREETAB.
* ALSO INITIALIZE THE DOWNLINE BACK BUFFER TABLE.
*
* 3. METHOD USED.
* INCREASE NIP-S FIELD LENGTH BY 6000B WORDS.
* CALL PIP TYPE 1 TO GET NBT, PIT AND CET SET UP
* AND PIP OVERLAYS LOADED.
* SET UP FREEBUF AND INITIALIZE AT AND TNT.
*
* 4. ENTRY PARAMETERS. NONE.
*
* 5. EXIT PARAMETERS. NONE.
*
* 6. COMDECKS CALLED AND SYMPL TEXT USED.
* NIPDEF AT MEM NBT PT
* PRUBUFF SYSTIME TNT DRHDR
* BACKBUF DOWNLINE BACK BUFFER TABLE
* CET COUPLER EQUIPMENT TABLE
* FREETAB FREE BUFFER TABLE
*
* 7. ROUTINES AND OVERLAYS CALLED.
* MGETS ALLOCATE EMPTY BUFFER
* OCFL CHANGE FIELD LENGTH
* OSREQ MAKE AN RA+1 CALL
* XTRACE TRACE CALLS
* HGETNWL GET NWL BUFFER/UPDATE RA.SSC
*
* 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATIONS.
*
* W A R N I N G - THIS ROUTINE IS LOADED WITH INIP.
*
#
STOPIMS;
#
EXTERNAL VARIABLES
#
XREF
BEGIN
PROC HGETNWL; # GET NWL BUFFER/UPDATE RA.SSC #
PROC MGETS; # ALLOCATE EMPTY BUFFER #
PROC OCFL; # CHANGE FIELD LENGTH #
PROC OSREQ; # MAKE AN RA+1 CALL #
PROC XTRACE; # TRACE CALLS #
END
#
INTERNAL VARIABLES
#
ARRAY ITPIP S(1); # PIP CALL WORD #
BEGIN
ITEM ITNAME C(0,0,3) = ["PIP"]; # PIP NAME #
ITEM ITFILL1 U(0,18,1) = [0];
ITEM ITRCALL B(0,19,1) = [TRUE]; # RECALL #
ITEM ITFILL2 U(0,20,4) = [0];
ITEM ITFUNC U(0,24,12); # PIP FUNCTION CODE #
*IF,-DEF,MSS
ITEM ITFILL3 U(0,36,6) = [0];
*ENDIF
*IF,DEF,MSS FOR CDC INTERNAL USE ONLY
ITEM NPNQ U(0,36,6) = [1]; # NQ ENTRY #
*ENDIF FOR CDC INTERNAL USE ONLY
ITEM ITADDR U(0,42,AL); # PARAMETER WORD ADDRESS #
END
ITEM TEMP1 U;
ITEM TEMP U;
ITEM PTR U;
#**********************************************************************#
BEGIN
CONTROL IFEQ DEBUG,1;
XTRACE("ITABS") ;
CONTROL FI;
# PLACE NBT ADDRESS IN PT #
TEMP1 = LOC(NBTID[0]);
PTNBT[0] = TEMP1;
# INCREASE NIP-S FIELD LENGTH BY 11000B WORDS #
CTLSLWA = (TEMP1 + O"11000" ) / 64 * 64 ;
OCFL(CTLSLWA);
# CLEAR INITIALIZATION AREA #
FOR TEMP = TEMP1 STEP 1 UNTIL CTLSLWA - 1 DO
MEMORY[TEMP] = 0;
#
SET UP PARAMETERS FOR INITIALIZATION BY PIP
#
MEMORY[PTPTR] = LOC(PT0); # PLACE PT ADDRESS IN PTR WRD FOR PIP #
# INITIALIZE NBT HEADER #
NBTID[0] = NBTIDVALUE;
NBTBS[0] = CTLSLWA - TEMP1;
# SET UP PRU-BUFFER CHAIN PARAMETERS FOR PIP #
MEMORY[PITPTR] = LOC(PITHWORD[0]); # PLACE PIT HDR WD ADR IN PTR#
# PLACE NBT HEADER ADDRESS FOR PIP CALL #
ITADDR[0] = TEMP1;
#
CALL PIP FOR INITIALIZATION
#
ITFUNC[0] = FCITAB; # PLACE PIP FUNCTION CODE #
OSREQ(ITPIP); # RA+1 PIP CALL WITH AUTO RECALL #
# PIP RETURNS END-OF-OVL IN PTAT[0] #
CTLSFWA = FWAMEM[0]; # FWA OF DYNAMIC MEMORY #
FLGBGCLT[0] = FALSE; # INITIALIZE GARBAGE COLLECT FLG#
NBTMAXID = (NBTNAE[0] + NBTNFE[0] - 1) * NBTFETNO;
#
SET UP FREETAB
#
HRL = HRLV3; # INITIALIZE TO NO REGULATION #
LASTHRL = HRL; # INITIALIZE TO NO REGULATION #
REDUCEFL = 0;
FRENOFB = 1;
FREFBBP = CTLSFWA;
FREFBFP = CTLSFWA;
FRESFB = CTLSLWA - CTLSFWA;
P<FREEBUF> = CTLSFWA;
FRBBS[0] = FRESFB;
FRBFBBP[0] = LOC(FREFBBP[0]);
FRBFBFP[0] = LOC(FREFBFP[0]);
#
SET MAXIMUM NUMBER OF PRU BUF PER EACH TYPE OF PRU
#
FOR TEMP = 1 STEP 1 UNTIL MAXPIP
DO # LOOP FOR EACH PIT ENTRY #
BEGIN
PITMAB1[TEMP] = INPPRU[1]; # MAX NO OF 1 PRU BUFFERS TO ASSIGN#
PITMAB2[TEMP] = INPPRU[2]; # MAX NO OF 2 PRU BUFFERS TO ASSIGN#
PITMAB3[TEMP] = INPPRU[3]; # MAX NO OF 3 PRU BUFFERS TO ASSIGN#
PITINIT[TEMP] = INPSTP[1]; # SET HALT-NPU-AT-INIT FLAG #
PITRPRV[TEMP] = INPSTP[2]; # SET HALT-NPU-AT-RPRV FLAG #
END # NIP CONTROL CARD #
#
SET UP AT
#
MGETS(ATSIZE,P<AT>,TRUE);
PTAT[0] = P<AT>;
ATID[0] = ATIDVALUE;
ATNFE[0] = ATSIZE - ATHSIZE; # INITIALIZE NO. OF FREE ENTRIES #
ATHAN[0] = 0;
#
SET UP TNT
#
MGETS(TNTSIZE,P<TNT>,TRUE);
PTTNT[0] = P<TNT>;
TNTID[0] = TNTIDVALUE;
#
ALLOCATE TWO NWL BUFFERS TO ALLOW DOUBLE BUFFERING OF
INCOMING WORKLISTS
#
MGETS(NWLSIZE,PTR,FALSE);
P<DRHDRWD> = PTR; # FWA OF NEW NWL BUFFER #
DRID[0] = NWLIDVALUE; # SET NWL IDENTIFIER #
HGETNWL(PTR); # GET NWL BUFFER/UPDATE RA.SSC #
#
INITIALIZE DOWNLINE BACK BUFFER TABLE
#
BACKFFREE = LOC(BACKHWORD[0]); # FIRST WORD OF BACK BUFFER #
BACKBFWA = BACKFFREE; # FWA OF DOWNLINE BACK BUFFER #
BACKBLWA = BACKFFREE + (MAXBBUFSIZE+1)*3; # LWA+1 OF BACK BUF #
FOR TEMP = 0 STEP 1 UNTIL MAXBBUFSIZE-1
DO # SET BBACK BUFFER ENTRY POINTERS #
BEGIN
BACKHWORD[TEMP] = LOC(BACKHWORD[TEMP+1]);
END
BACKHWORD[MAXBBUFSIZE] = 0; # LAST BUFFER HAS ZERO FORWARD PTR #
P<CET> = PTCET[0]; # SET BASED ARRAY PTR IN COMMON BLOCK #
#
END OF ITABS
#
RETURN;
END
TERM