User Tools

Site Tools


cdc:nos2.source:nam5871:blink

Table of Contents

Table Of Contents

  • [00009] PROC BLINK1)
  • [00059] PROC HUPDDAW
  • [00060] PROC HWRAVAL
  • [00061] PROC INSCDR
  • [00062] PROC KPUT
  • [00063] PROC XTRACE

Source Code

BLINK.txt
  1. *DECK BLINK
  2. USETEXT NIPDEF
  3. USETEXT DRHDR
  4. USETEXT AT
  5. USETEXT ACB
  6. USETEXT ACNB
  7. USETEXT KDIS
  8. USETEXT KHDRX
  9. PROC BLINK((BUFADDR),(CBADDR)); # LINK A DATA BLOCK TO DATA RING #
  10. STARTIMS;
  11. #
  12. *1DC BLINK
  13. *
  14. * 1. PROC NAME AUTHOR DATE
  15. * BLINK E. GEE 77/09/14
  16. *
  17. * 2. FUNCTIONAL DESCRIPTION.
  18. * LINK DATA BLOCK TO DATA RING
  19. *
  20. * 3. METHOD USED.
  21. * CHECK IF DATA RING ALREADY EXISTS
  22. * IF SO, ADD NEW ENTRY TO END OF RING
  23. * IF NOT, CREATE DATA RING WITH NEW ENTRY
  24. * UPDATE K-DISPLAY BUFFER IF NECESSARY.
  25. *
  26. * 4. ENTRY PARAMETERS.
  27. * BUFADDR ADDR OF DATA BLOCK TO ADD TO RING
  28. * ACNBADDR ADDR OF ACB/ACNB TO QUEUE DATA BLK DATA
  29. *
  30. * 5. EXIT PARAMETERS.
  31. * NONE
  32. *
  33. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  34. * ACB ACNB AT
  35. * DRHDR NIPDEF KDIS
  36. *
  37. * 7. ROUTINES AND OVERLAYS CALLED.
  38. * HUPDDAW UPDATE DATA AVAILABLE WORD
  39. * HWRAVAL WRITE DATA AVAILABLE WORD
  40. * KPUT UPDATE K-DISPLAY BUFFER
  41. * INSCDR INSERT ACNB IN CONNECTION DATA RING
  42. * XTRACE RECORD PROCEDURE CALLS
  43. *
  44. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
  45. * NONE
  46. *
  47.  #
  48. STOPIMS;
  49. #
  50.   INPUT PARAMETERS
  51. #
  52. ITEM BUFADDR; # FWA OF DATA BLOCK TO LINK #
  53. ITEM CBADDR; # FWA OF DATA STRUCTURE ACB/ACNB/NCNB #
  54. #
  55.   EXTERNAL VARIABLES
  56. #
  57. XREF
  58. BEGIN
  59. PROC HUPDDAW; # UPDATE DATA AVAILABLE WORD #
  60. PROC HWRAVAL; # UPDATE UCP-S DATA AVAIALABILITY WORD #
  61. PROC INSCDR; # INSERT ACNB IN CONNECTION DATA RING #
  62. PROC KPUT; # UPDATE STATUS DISPLAY CONTENT #
  63. PROC XTRACE; # TRACE PROCEDURE CALL #
  64. END
  65. #
  66.   LOCAL VARIABLES
  67. #
  68. ITEM TEMP1; # TEMPORARY VARIABLE #
  69. ITEM TEMP2; # TEMPORARY VARIABLE #
  70.  
  71. CONTROL EJECT;
  72.  
  73. BEGIN # BLINK #
  74.  
  75. CONTROL IFEQ DEBUG,1;
  76. XTRACE("BLINK"); # TRACE CALL #
  77. CONTROL FI;
  78.  
  79. P<ACNB> = CBADDR; # ACNB/NCNB/ACB FWA #
  80. P<DRHDRWD> = BUFADDR; # FWA OF DATA BLOCK TO ADD TO RING #
  81. DRID[0] = DRIDVALUE; # SET DATA RING ID #
  82. TEMP1 = LOC(ACNBDRFP[0]);
  83.  
  84. NEXTPTR[0] = TEMP1; # SET FORWARD PTR IN DATA BLOCK #
  85. IF ACNBDRFP[0] EQ 0
  86. THEN # DATA RING NOT YET EXISTS, CREATE ONE #
  87. BEGIN
  88. BACKPTR[0] = TEMP1;
  89. ACNBDRFP[0] = BUFADDR;
  90. END
  91. ELSE # ADD DATA BLOCK TO DATA RING #
  92. BEGIN
  93. BACKPTR[0] = ACNBDRBP[0];
  94. P<DRHDRWD> = ACNBDRBP[0];
  95. NEXTPTR[0] = BUFADDR;
  96. END
  97. ACNBDRBP[0] = BUFADDR;
  98.  
  99. IF ACNBID[0] NQ NCNBIDVALUE
  100. THEN # ITS AN ACB OR ACNB #
  101. BEGIN
  102. IF ACNBID[0] EQ ACNBIDVALUE
  103. THEN # IT IS AN ACNB #
  104. BEGIN # INCREMENT DATA BLOCKS QUEUED COUNT #
  105. P<ACB> = ATACBA[ACNBAN[0]]; # FWA OF ACB #
  106. HUPDDAW(P<ACB>,P<ACNB>,1,1); # UPDATE DATA AVAILABLE WORD #
  107. IF ACNBCDRFP[0] EQ 0
  108. THEN # ACNB IS NOT IN CON DATA RING #
  109. BEGIN
  110. INSCDR(P<ACNB>); # INSERT ACNB IN CONN DATA RING #
  111. END
  112. TEMP1 = KPAPNDM;
  113. TEMP2 = ACBBLKSQ[0];
  114. END
  115.  
  116. ELSE # IT IS AN ACB #
  117. BEGIN # INCREMENT SUPERVISORY MESSAGE QUEUED COUNT #
  118. P<ACB> = CBADDR;
  119. ACBSMQ[0] = ACBSMQ[0] + 1;
  120. TEMP1 = KPAPNSM;
  121. TEMP2 = ACBSMQ[0];
  122. IF TEMP2 EQ 1
  123. THEN # QUEUED 1ST SUP MSG FOR APP #
  124. BEGIN
  125. HWRAVAL(P<ACB>,TRUE); # UPDATE AIP-S DATA AVAIL WORD #
  126. END
  127. END
  128.  
  129.  
  130. IF KDIS$RT
  131. AND ACBKNDX[0] NQ 0
  132. AND ACBKNDX[0] GQ KDAPPST[0]
  133. AND ACBKNDX[0] LQ KDAPPND[0]
  134. THEN # UPDATE STATUS DISPLAY #
  135. KPUT(KHDRNP[0],ACBKNDX[0]-KDAPPST[0],TEMP1,TEMP2);
  136.  
  137. END
  138.  
  139. ELSE # IT IS A NCNB #
  140. ACNBBLKSQ[0] = ACNBBLKSQ[0] + 1; # INCREMENT BLKS QUEUED #
  141.  
  142. RETURN;
  143. END # BLINK #
  144. TERM
1)
BUFADDR),(CBADDR
cdc/nos2.source/nam5871/blink.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator