User Tools

Site Tools


cdc:nos2.source:nam5871:bdelink

Table Of Contents

  • [00011] PROC BDELINK(ACNBADDR,BUFADDR,TLW)
  • [00090] PROC BCONV
  • [00091] PROC DELCDR
  • [00092] PROC HUPDDAW
  • [00093] PROC HWRAVAL
  • [00094] PROC KPUT
  • [00095] PROC MGETS
  • [00096] PROC MRELS
  • [00097] PROC XTRACE

Source Code

BDELINK.txt
  1. *DECK BDELINK
  2. USETEXT NIPDEF
  3. USETEXT AHEADER
  4. USETEXT DEQCOM
  5. USETEXT DRHDR
  6. USETEXT KDIS
  7. USETEXT KHDRX
  8. USETEXT AT
  9. USETEXT ACB
  10. USETEXT ACNB
  11. PROC BDELINK(ACNBADDR,BUFADDR,TLW);
  12. STARTIMS;
  13. #
  14.  * NETWORK PRODUCTS DOCUMENTATION PAGE
  15.  * NAM INTERNAL SPECIFICATION DATE.
  16.  * 5.0 NIP DETAILED DESCRIPTION
  17. *1DC BDELINK
  18. *
  19. * 1. PROC NAME AUTHOR DATE
  20. * BDELINK E. GEE 77/07/20
  21. *
  22. * 2. FUNCTIONAL DESCRIPTION.
  23. * DELINK DATA BLOCK FROM DATA RING.
  24. *
  25. * 3. METHOD USED.
  26. * CHECK ACNB DATA RING POINTER
  27. * DETERMINE THE CHARACTER TYPES: IF THE MESSAGE IS A DATA BLOCK
  28. * (QUEUED ON THE ACNB) OR A SUPERVISORY MESSAGE OF BLOCK TYPE
  29. * APPCMD, THEN THE MESSAGE IS TRANSPARENT.
  30. * CHECK THAT CHARACTER TYPE IS A VALID TYPE.
  31. * CONVERT CHARACTERS IF NECESSARY
  32. * DELINK BLK FROM DATA RING
  33. *
  34. * 4. ENTRY PARAMETERS
  35. * ACNBADDR ADDR OF ACNB/ACB TO DELINK DATA BLK FROM
  36. * ACNBDRFP ADDRESS OF THE DATA RING TO BE DELINKED
  37. * ACT INPUT CHAR TYPE FOR DATA BLOCK
  38. * NEXTPTR ADDRESS OF THE NEXTBLOCK IN THE DATA RING
  39. * ABHTLC TEXT LENGTH IN CHARACTERS
  40. * TLW SIZE OF DATA BLOCK IN NUMBER OF WORDS
  41. *
  42. * 5. EXIT PARAMETERS
  43. * BUFADDR ADDR OF DELINKED DATA BLOCK
  44. * ACNBDRBP DATA RING BACKWARD POINTER
  45. * ACNBBLKSQ COUNT OF BLOCKS QUEUED IN ACNB
  46. * ACNBDRFP DATA RING FORWARD POINTER
  47. *
  48. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  49. * AHEADER DEQCOM DRHDR DUMPFLG
  50. * AT FREETAB MSGIDX NIPDEF
  51. * OVERLAY PARAMS ACB ACNB
  52. * KDIS
  53. *
  54. * 7. ROUTINES CALLED.
  55. * BCONV CONVERT DATA FROM ONE CHAR TYPE TO ANOTHER
  56. * DELCDR DELINK ACNB FROM CONNECTION DATA RING
  57. * HUPDDAW UPDATE DATA AVAILABLE WORD
  58. * HWRAVAL WRITE DATA AVAILABLE WORD TO UCP
  59. * KPUT UPDATE K-DISPLAY STATUS BUFFER
  60. * MGETS ALLOCATE EMPTY BUFFER
  61. * MRELS RELEASE BUFFER SPACE
  62. * OVLCALL LOAD AND EXECUTE OVERLAYS
  63. * RDUMP DUMP NIP-S FIELD LENGTH
  64. * XERRMSG OVL ISSUE DAYFILE MESSAGE (AND ABORT)
  65. * XTRACE RECORD PROCEDURE CALLS
  66. *
  67. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
  68. * NIP FATAL ERROR PROC=BDEL. (DEBUG MODE MESSAGE INDICATES
  69. * EITHER A BAD DATA RING OR THE CHARACTER TYPES ARE ILLEGAL.)
  70. * SECURITY VIOLATION APP XXXX . (THE CHARACTER TYPE OF THE
  71. * DATA BLOCK IS BAD.)
  72. *
  73. *
  74.  #
  75. STOPIMS;
  76. #
  77.   INPUT PARAMETERS
  78. #
  79. ITEM ACNBADDR; # FWA OF ACB/ACNB TO DELINK DATA BLOCK #
  80. ITEM TLW; # SIZE OF DATA BLOCK IN NUMBER OF WORDS #
  81. #
  82.   OUTPUT PARAMETERS
  83. #
  84. ITEM BUFADDR; # FWA OF DELINKED DATA BLOCK #
  85. #
  86.   EXTERNAL VARIABLES
  87. #
  88. XREF
  89. BEGIN
  90. PROC BCONV; # PERFORM DATA CONVERSION #
  91. PROC DELCDR; # DELINK ACNB FROM CONNECTION DATA RING #
  92. PROC HUPDDAW; # UPDATE DATA AVAILABLE WORD #
  93. PROC HWRAVAL; # WRITE DATA AVAILABILITY WORD IN UCP #
  94. PROC KPUT; # UPDATE K DISPLAY DATA BUFFER #
  95. PROC MGETS; # GET BUFFER #
  96. PROC MRELS; # RELEASE BUFFER #
  97. PROC XTRACE; # TRACE SUBROUTINE CALLS #
  98. END
  99. #
  100.   LOCAL VARIABLES
  101. #
  102. ITEM NEXTBLK; # FWA OF NEXT DATA BLOCK IN DATA RING #
  103. ITEM TEMP1; # TEMPORARY VARIABLE #
  104. ITEM TEMP2; # TEMPORARY VARIABLE #
  105.  
  106. CONTROL EJECT;
  107.  
  108.  
  109. BEGIN # BDELINK #
  110.  
  111. CONTROL IFEQ DEBUG,1;
  112. XTRACE("BDELI"); # TRACE CALLS #
  113. CONTROL FI;
  114.  
  115. P<DRHDRWD> = 0;
  116. P<ACNB> = ACNBADDR;
  117. P<ACB> = ACNBADDR;
  118. TEMP1 = ACNBDRFP[0]; # FWA OF DATA BLOCK TO DELINK #
  119. P<AHEADER> = TEMP1 + BLKHSIZE;
  120. CHARCNT = ABHTLC[0]; # TEXT LENGTH IN CHARACTERS #
  121. BUFADDR = TEMP1;
  122.  
  123. IF TEMP1 EQ ACNBDRBP[0]
  124. THEN # ONLY DATA BLOCK IN RING #
  125. ACNBDRPTRS[0] = 0;
  126. ELSE
  127. BEGIN # MORE DATA QUEUED IN RING #
  128. NEXTBLK = NEXTPTR[TEMP1];
  129. ACNBDRFP[0] = NEXTBLK;
  130. BACKPTR[NEXTBLK] = LOC(ACNBDRFP[0]);
  131. END
  132.  
  133. IF ACNBID[0] EQ ACNBIDVALUE
  134. THEN # ITS AN ACNB #
  135. BEGIN
  136. P<ACB> = ATACBA[ACNBAN[0]]; # RESET ACB ADDRESS #
  137.  
  138. IF ACT NQ ABHACT[0]
  139. AND CHARCNT NQ 0 # NOT A NULL BLOCK #
  140. AND ABHABT[0] NQ APPNULL # BT NQ 0 #
  141. THEN # DATA NEED TO BE CONVERTED TO ICT FOR APP #
  142. BEGIN
  143. MGETS(TLW+BLKHSIZE+ABHSIZE,BUFADDR,FALSE); # GET NEW BUFFER #
  144. CMWORD[BUFADDR+BLKHSIZE] = CMWORD[P<AHEADER>];
  145. DRPTR = P<AHEADER> + ABHSIZE;
  146. BUFFIN = BUFADDR + BLKHSIZE + ABHSIZE;
  147. BCONV; # CONVERT DATA TO INPUT CHARACTER TYPE #
  148. MRELS(TEMP1); # RELEASE OLD BUFFER #
  149. END
  150.  
  151. HUPDDAW(P<ACB>,P<ACNB>,-1,-1); # UPDATE DATA AVAILABLE WORD #
  152. IF ACNBBLKSQ[0] EQ 0
  153. THEN # NO MORE DATA QUEUED ON CONNECTION #
  154. BEGIN
  155. DELCDR(P<ACNB>); # DELINK ACNB FROM CONN DATA RING #
  156. END
  157. ELSE # NEED TO UPDATE CDR PTR IN ACB #
  158. BEGIN
  159. ACBCDRP[0] = ACNBCDRFP[0]; # NEXT ACNB TO EXTRA DATA FROM #
  160. END
  161. TEMP1 = KPAPNDM;
  162. TEMP2 = ACBBLKSQ[0];
  163.  
  164. END
  165.  
  166. ELSE # ITS AN ACB #
  167. BEGIN
  168. ACBSMQ[0] = ACBSMQ[0] - 1; # DECREMENT SM QUEUED COUNT #
  169. TEMP1 = KPAPNSM;
  170. TEMP2 = ACBSMQ[0];
  171. IF TEMP2 EQ 0
  172. THEN # NO MORE SUP MSGS QUEUED FOR APP #
  173. BEGIN
  174. HWRAVAL(P<ACB>,TRUE); # UPDATE AIP-S DATA AVAILABLE WORD #
  175. END
  176. END
  177.  
  178. BLKID[BUFADDR] = MOUTIDVALUE; # RESET NON-MOVABLE ID #
  179.  
  180. IF KDIS$RT
  181. AND ACBKNDX[0] NQ 0
  182. AND ACBKNDX[0] GQ KDAPPST[0]
  183. AND ACBKNDX[0] LQ KDAPPND[0]
  184. THEN # REAL TIME UPDATE FOR STATUS DISPLAY #
  185.  
  186. KPUT(KHDRNP[0],ACBKNDX[0]-KDAPPST[0],TEMP1,TEMP2);
  187.  
  188.  
  189. RETURN;
  190. END # BDELINK #
  191. TERM
cdc/nos2.source/nam5871/bdelink.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator