User Tools

Site Tools


cdc:nos2.source:nam5871:itabs

Table of Contents

ITABS

Table Of Contents

  • [00016] PROC ITABS
  • [00063] PROC HGETNWL
  • [00064] PROC MGETS
  • [00065] PROC OCFL
  • [00066] PROC OSREQ
  • [00067] PROC XTRACE

Source Code

ITABS.txt
  1. *DECK ITABS
  2. USETEXT NIPDEF;
  3. USETEXT AT;
  4. USETEXT BACKBUF
  5. USETEXT CET
  6. USETEXT DRHDR
  7. USETEXT FREETAB;
  8. USETEXT INPARUT
  9. USETEXT MEM;
  10. USETEXT NBT;
  11. USETEXT PT;
  12. USETEXT PIT
  13. USETEXT PRUBUFF;
  14. USETEXT SYSTIME;
  15. USETEXT TNT;
  16. PROC ITABS; # INITIALIZE NIP TABLES #
  17.  
  18. STARTIMS;
  19. #
  20. *1DC ITABS
  21. * 1. PROC NAME AUTHOR DATE
  22. * ITABS S. WATANABE 80/03/13
  23. *
  24. * 2. FUNCTIONAL DESCRIPTION.
  25. * INITIALIZE NBT, POA, CET, AT, TNT AND FREETAB.
  26. * ALSO INITIALIZE THE DOWNLINE BACK BUFFER TABLE.
  27. *
  28. * 3. METHOD USED.
  29. * INCREASE NIP-S FIELD LENGTH BY 6000B WORDS.
  30. * CALL PIP TYPE 1 TO GET NBT, PIT AND CET SET UP
  31. * AND PIP OVERLAYS LOADED.
  32. * SET UP FREEBUF AND INITIALIZE AT AND TNT.
  33. *
  34. * 4. ENTRY PARAMETERS. NONE.
  35. *
  36. * 5. EXIT PARAMETERS. NONE.
  37. *
  38. * 6. COMDECKS CALLED AND SYMPL TEXT USED.
  39. * NIPDEF AT MEM NBT PT
  40. * PRUBUFF SYSTIME TNT DRHDR
  41. * BACKBUF DOWNLINE BACK BUFFER TABLE
  42. * CET COUPLER EQUIPMENT TABLE
  43. * FREETAB FREE BUFFER TABLE
  44. *
  45. * 7. ROUTINES AND OVERLAYS CALLED.
  46. * MGETS ALLOCATE EMPTY BUFFER
  47. * OCFL CHANGE FIELD LENGTH
  48. * OSREQ MAKE AN RA+1 CALL
  49. * XTRACE TRACE CALLS
  50. * HGETNWL GET NWL BUFFER/UPDATE RA.SSC
  51. *
  52. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATIONS.
  53. *
  54. * W A R N I N G - THIS ROUTINE IS LOADED WITH INIP.
  55. *
  56.  #
  57. STOPIMS;
  58. #
  59.   EXTERNAL VARIABLES
  60. #
  61. XREF
  62. BEGIN
  63. PROC HGETNWL; # GET NWL BUFFER/UPDATE RA.SSC #
  64. PROC MGETS; # ALLOCATE EMPTY BUFFER #
  65. PROC OCFL; # CHANGE FIELD LENGTH #
  66. PROC OSREQ; # MAKE AN RA+1 CALL #
  67. PROC XTRACE; # TRACE CALLS #
  68. END
  69.  
  70. #
  71.   INTERNAL VARIABLES
  72. #
  73. ARRAY ITPIP S(1); # PIP CALL WORD #
  74. BEGIN
  75. ITEM ITNAME C(0,0,3) = ["PIP"]; # PIP NAME #
  76. ITEM ITFILL1 U(0,18,1) = [0];
  77. ITEM ITRCALL B(0,19,1) = [TRUE]; # RECALL #
  78. ITEM ITFILL2 U(0,20,4) = [0];
  79. ITEM ITFUNC U(0,24,12); # PIP FUNCTION CODE #
  80. *IF,-DEF,MSS
  81. ITEM ITFILL3 U(0,36,6) = [0];
  82. *ENDIF
  83. *IF,DEF,MSS FOR CDC INTERNAL USE ONLY
  84. ITEM NPNQ U(0,36,6) = [1]; # NQ ENTRY #
  85. *ENDIF FOR CDC INTERNAL USE ONLY
  86. ITEM ITADDR U(0,42,AL); # PARAMETER WORD ADDRESS #
  87. END
  88.  
  89. ITEM TEMP1 U;
  90. ITEM TEMP U;
  91. ITEM PTR U;
  92.  
  93. #**********************************************************************#
  94. BEGIN
  95. CONTROL IFEQ DEBUG,1;
  96. XTRACE("ITABS") ;
  97. CONTROL FI;
  98.  
  99. # PLACE NBT ADDRESS IN PT #
  100.  
  101. TEMP1 = LOC(NBTID[0]);
  102. PTNBT[0] = TEMP1;
  103.  
  104. # INCREASE NIP-S FIELD LENGTH BY 11000B WORDS #
  105. CTLSLWA = (TEMP1 + O"11000" ) / 64 * 64 ;
  106. OCFL(CTLSLWA);
  107.  
  108. # CLEAR INITIALIZATION AREA #
  109.  
  110. FOR TEMP = TEMP1 STEP 1 UNTIL CTLSLWA - 1 DO
  111. MEMORY[TEMP] = 0;
  112. #
  113.   SET UP PARAMETERS FOR INITIALIZATION BY PIP
  114. #
  115. MEMORY[PTPTR] = LOC(PT0); # PLACE PT ADDRESS IN PTR WRD FOR PIP #
  116.  
  117. # INITIALIZE NBT HEADER #
  118.  
  119. NBTID[0] = NBTIDVALUE;
  120. NBTBS[0] = CTLSLWA - TEMP1;
  121.  
  122. # SET UP PRU-BUFFER CHAIN PARAMETERS FOR PIP #
  123.  
  124. MEMORY[PITPTR] = LOC(PITHWORD[0]); # PLACE PIT HDR WD ADR IN PTR#
  125.  
  126. # PLACE NBT HEADER ADDRESS FOR PIP CALL #
  127.  
  128. ITADDR[0] = TEMP1;
  129. #
  130.   CALL PIP FOR INITIALIZATION
  131. #
  132. ITFUNC[0] = FCITAB; # PLACE PIP FUNCTION CODE #
  133. OSREQ(ITPIP); # RA+1 PIP CALL WITH AUTO RECALL #
  134. # PIP RETURNS END-OF-OVL IN PTAT[0] #
  135. CTLSFWA = FWAMEM[0]; # FWA OF DYNAMIC MEMORY #
  136. FLGBGCLT[0] = FALSE; # INITIALIZE GARBAGE COLLECT FLG#
  137. NBTMAXID = (NBTNAE[0] + NBTNFE[0] - 1) * NBTFETNO;
  138. #
  139.   SET UP FREETAB
  140. #
  141. HRL = HRLV3; # INITIALIZE TO NO REGULATION #
  142. LASTHRL = HRL; # INITIALIZE TO NO REGULATION #
  143. REDUCEFL = 0;
  144. FRENOFB = 1;
  145. FREFBBP = CTLSFWA;
  146. FREFBFP = CTLSFWA;
  147. FRESFB = CTLSLWA - CTLSFWA;
  148. P<FREEBUF> = CTLSFWA;
  149. FRBBS[0] = FRESFB;
  150. FRBFBBP[0] = LOC(FREFBBP[0]);
  151. FRBFBFP[0] = LOC(FREFBFP[0]);
  152. #
  153.   SET MAXIMUM NUMBER OF PRU BUF PER EACH TYPE OF PRU
  154. #
  155. FOR TEMP = 1 STEP 1 UNTIL MAXPIP
  156. DO # LOOP FOR EACH PIT ENTRY #
  157. BEGIN
  158. PITMAB1[TEMP] = INPPRU[1]; # MAX NO OF 1 PRU BUFFERS TO ASSIGN#
  159. PITMAB2[TEMP] = INPPRU[2]; # MAX NO OF 2 PRU BUFFERS TO ASSIGN#
  160. PITMAB3[TEMP] = INPPRU[3]; # MAX NO OF 3 PRU BUFFERS TO ASSIGN#
  161. PITINIT[TEMP] = INPSTP[1]; # SET HALT-NPU-AT-INIT FLAG #
  162. PITRPRV[TEMP] = INPSTP[2]; # SET HALT-NPU-AT-RPRV FLAG #
  163. END # NIP CONTROL CARD #
  164. #
  165.   SET UP AT
  166. #
  167. MGETS(ATSIZE,P<AT>,TRUE);
  168. PTAT[0] = P<AT>;
  169. ATID[0] = ATIDVALUE;
  170. ATNFE[0] = ATSIZE - ATHSIZE; # INITIALIZE NO. OF FREE ENTRIES #
  171. ATHAN[0] = 0;
  172. #
  173.   SET UP TNT
  174. #
  175. MGETS(TNTSIZE,P<TNT>,TRUE);
  176. PTTNT[0] = P<TNT>;
  177. TNTID[0] = TNTIDVALUE;
  178. #
  179.   ALLOCATE TWO NWL BUFFERS TO ALLOW DOUBLE BUFFERING OF
  180.   INCOMING WORKLISTS
  181. #
  182. MGETS(NWLSIZE,PTR,FALSE);
  183. P<DRHDRWD> = PTR; # FWA OF NEW NWL BUFFER #
  184. DRID[0] = NWLIDVALUE; # SET NWL IDENTIFIER #
  185. HGETNWL(PTR); # GET NWL BUFFER/UPDATE RA.SSC #
  186. #
  187.   INITIALIZE DOWNLINE BACK BUFFER TABLE
  188. #
  189. BACKFFREE = LOC(BACKHWORD[0]); # FIRST WORD OF BACK BUFFER #
  190. BACKBFWA = BACKFFREE; # FWA OF DOWNLINE BACK BUFFER #
  191. BACKBLWA = BACKFFREE + (MAXBBUFSIZE+1)*3; # LWA+1 OF BACK BUF #
  192. FOR TEMP = 0 STEP 1 UNTIL MAXBBUFSIZE-1
  193. DO # SET BBACK BUFFER ENTRY POINTERS #
  194. BEGIN
  195. BACKHWORD[TEMP] = LOC(BACKHWORD[TEMP+1]);
  196. END
  197. BACKHWORD[MAXBBUFSIZE] = 0; # LAST BUFFER HAS ZERO FORWARD PTR #
  198.  
  199. P<CET> = PTCET[0]; # SET BASED ARRAY PTR IN COMMON BLOCK #
  200. #
  201.   END OF ITABS
  202. #
  203. RETURN;
  204. END
  205. TERM
cdc/nos2.source/nam5871/itabs.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator