User Tools

Site Tools


cdc:nos2.source:nam5871:nxblock

NXBLOCK

Table Of Contents

  • [00009] PROC NXBLOCK1)
  • [00065] PROC MGETS
  • [00066] PROC NFOB
  • [00067] PROC XTRACE

Source Code

NXBLOCK.txt
  1. *DECK NXBLOCK
  2. USETEXT NIPDEF
  3. USETEXT AHEADER
  4. USETEXT BACKBUF
  5. USETEXT DRHDR
  6. USETEXT NCNB
  7. USETEXT NHEADER
  8. USETEXT PT
  9. PROC NXBLOCK((NCNBFWA),(BLOCKTYPE)); # SEND BLOCK PROTOCOL ELEMENT #
  10. STARTIMS;
  11. #
  12. *1DC NXBLOCK
  13. *
  14. * 1. PROC NAME AUTHOR DATE
  15. * NXBLOCK J.C. LEE 82/06/08
  16. *
  17. * 2. FUNCTIONAL DESCRIPTION
  18. * SEND NETWORK BLOCK PROTOCOL ELEMENTS
  19. * BACK/BRK/RST/INITN/INITR/TERM/ICMD/ICMDR TO NPU.
  20. *
  21. * 3. METHOD USED
  22. * IF BLOCKTYPE IS BACK
  23. * AND THERE IS A FREE ENTRY IN THE BACK BUFFER,
  24. * USE BACK BUFFER ENTRY FOR DOWNLINE BACK.
  25. * ELSE (BACK BUFFER CANNOT BE USED),
  26. * ALLOCATE BUFFER FOR THE DOWNLINE BLOCK
  27. * SET NETWORK BLOCK TYPE
  28. * CALL NFOB TO LINK BUFFER TO PIP OUTBOUND CHAIN
  29. *
  30. * 4. ENTRY PARAMETERS
  31. * NCNBFWA - FWA OF NCNB
  32. * BLOCKTYPE - NETWORK BLOCK TYPE
  33. *
  34. * 5. EXIT PARAMETERS
  35. * NONE
  36. *
  37. * 6. SYMPL TEXTS USED
  38. * AHEADER APPLICATION BLOCK HEADER WORD TEMPLATE
  39. * BACKBUF DOWNLINE BACK BUFFER
  40. * DRHDR BUFFER HEADER WORD TEMPLATE
  41. * NCNB NETWORK CONNECTION BLOCK TEMPLATE
  42. * NHEADER NETWORK BLOCK HEADER WORD TEMPLATE
  43. * NIPDEF CONSTANT DEFINITIONS
  44. *
  45. * 7. ROUTINES CALLED
  46. * MGETS - ALLOCATE BUFFER
  47. * NFOB - LINK BUFFER TO PIP OUTBOUND CHAIN
  48. * XTRACE - TRACE PROCEDURE CALL
  49. *
  50. * THIS PROCEDURE IS CALLED BY NFOB, NLOBCH,
  51. * HSFCBRK, AND NBSTTP.
  52. *
  53.  #
  54. STOPIMS;
  55. #
  56.   FORMAL PARAMETERS
  57. #
  58. ITEM NCNBFWA U; # FWA OF NCNB #
  59. ITEM BLOCKTYPE U; # NETWORK BLOCK TYPE #
  60. #
  61.   EXTERNAL VARIABLES
  62. #
  63. XREF
  64. BEGIN
  65. PROC MGETS; # ALLOCATE BUFFER #
  66. PROC NFOB; # LINK BUFFER TO PIP OUTBOUND CHAIN #
  67. PROC XTRACE; # TRACE PROC CALL #
  68. END
  69. #
  70.   LOCAL VARIABLES
  71. #
  72. DEF NETSIZE # 2 #; # BUFFER SIZE OF NETW DOWNLINE BLK #
  73. ITEM BUFFWA U; # BUFFER FOR NETWORK BLOCK #
  74. ITEM NXBSIZE; # BUFFER SIZE #
  75.  
  76. CONTROL IFEQ DEBUG,1;
  77. ARRAY TRACE$NBLK [1:NETICMDR] S(1);
  78. BEGIN # TRACE NETWORK BLOCK CALL #
  79. ITEM NBLK$NAME C(00,00,05) = [
  80. "ERROR",
  81. "ERROR",
  82. "NXBCK",
  83. "ERROR",
  84. "NXBRK",
  85. "ERROR",
  86. "ERROR",
  87. "NXRST",
  88. "NXINR",
  89. "NXINN",
  90. "NXTRM",
  91. "NXICM",
  92. "NXICR",
  93. ];
  94. END
  95. CONTROL FI;
  96. #**********************************************************************#
  97.  
  98. BEGIN
  99.  
  100. CONTROL IFEQ DEBUG,1;
  101. XTRACE(NBLK$NAME[BLOCKTYPE]);
  102. CONTROL FI;
  103.  
  104. P<NCNB> = NCNBFWA; # NCNB ADDRESS #
  105. IF (BLOCKTYPE EQ NETBACK) AND # DOWNLINE BACK FOR NPU #
  106. (BACKFFREE NQ 0) AND # FREE ENTRY IN BACK BUFFER #
  107. (NCNBTN[0] NQ 0) AND # CHECK FOR NOT INTRAHOST A-A CN#
  108. (NCNBHN[0] NQ 0)
  109. THEN # USE BACK BUFFER FOR BACK #
  110. BEGIN
  111. BUFFWA = BACKFFREE + 1; # ADDRESS OF FREE ENTRY IN BUF #
  112. P<DRHDRWD> = BACKFFREE;
  113. BACKFFREE = CMWORD[0]; # ADDRESS OF NEXT FREE ENTRY #
  114. END
  115. ELSE # GET BUFFER FOR DOWNLINE BLOCK #
  116. BEGIN
  117. IF (BLOCKTYPE NQ NETICMD) AND (BLOCKTYPE NQ NETBRK)
  118. THEN
  119. BEGIN
  120. NXBSIZE = NETSIZE;
  121. END
  122. ELSE
  123. BEGIN
  124. NXBSIZE = ICMDSIZE;
  125. END
  126. MGETS(NXBSIZE,BUFFWA,TRUE);
  127. END
  128.  
  129. P<NHEADER> = BUFFWA + BLKHSIZE;
  130. NHWORD[0] = 0; # CLEAR NETWORK HEADER WORD #
  131. P<AHEADER> = P<NHEADER>;
  132. BT[0] = BLOCKTYPE; # NETWORK BLOCK TYPE #
  133. IF BLOCKTYPE EQ NETBACK
  134. THEN # SET BSN FOR DOWNLINE BLOCK #
  135. NHBSN[0] = TEMPBSN;
  136. ELSE IF (BLOCKTYPE EQ NETICMD) OR (BLOCKTYPE EQ NETBRK)
  137. THEN
  138. BEGIN
  139. ABHACT[0] = CT8ASCII; # SET CHARACTER TYPE #
  140. ABHTLC[0] = 1; # CHAR COUNT FOR INTERRUPT CHAR/BREAK RC #
  141. NHICMDA[1] = TEMPBSN; # SET INTERRUPT CHAR/BREAK REASON CODE #
  142. END
  143.  
  144. NFOB(BUFFWA,NCNBFWA);
  145.  
  146. RETURN;
  147. END
  148. TERM
1)
NCNBFWA),(BLOCKTYPE
cdc/nos2.source/nam5871/nxblock.txt ยท Last modified: 2023/08/05 17:23 by Site Administrator