User Tools

Site Tools


cdc:nos2.source:nam5871:hsfcbrk

HSFCBRK

Table Of Contents

  • [00013] PRGM HSFCBRK

Source Code

HSFCBRK.txt
  1. *DECK HSFCBRK
  2. USETEXT NIPDEF
  3. USETEXT PARAMS
  4. USETEXT PT
  5. USETEXT ACB
  6. USETEXT ACNT
  7. USETEXT AT
  8. USETEXT ACNB
  9. USETEXT AHEADER
  10. USETEXT DRHDR
  11. USETEXT KDIS
  12. USETEXT SUPMSG
  13. PRGM HSFCBRK ;
  14. STARTIMS ;
  15. #
  16. *1DC HSFCBRK
  17. *
  18. * 1. PROC NAME AUTHOR DATE
  19. * HSFCBRK L.T.NGUYEN 81/12/10
  20. *
  21. * 2. FUNCTION
  22. * FOFM FC/BRK OR FC/RST AND SEND TO APPLICATION
  23. * IF BREAK - ALSO DELETE MSG QUEUED ON ACNB
  24. *
  25. * 3. METHOD
  26. * ALLOCATE BUFFER FOR FC/BRK(RST)
  27. * LINK TO ACB
  28. *
  29. * 4. ENTRY PARAMETERS:
  30. * PARAMS1 - ACNB
  31. * PARAMS2 - IF BREAK = BUFFER ADDRESS
  32. * IF RST = 0
  33. *
  34. * 5. EXIT PARAMETERS
  35. * NONE
  36. *
  37. * 6. COMDECKS CALLED AND SYMPL TEXTS USED
  38. * NIPDEF PARAMS PT
  39. * ACB ACNT AT
  40. * ACNB AHEADER DRHDR
  41. * NCNB SUPMSG OSSIZE
  42. *
  43. * 7. ROUTINES CALLED
  44. * DELCDR DELINK ACNB FROM CONNECTION DATA RING
  45. * HUPDDAW UPDATE DATA AVAILABLE WORD
  46. * MGETS ALLOCATE A BUFFER
  47. * MRELS RELEASE BUFFER
  48. * BLINK LINK MESSAGE ON DATA RING
  49. * NXBLOCK SEND SPECIAL BLOCKS TO CCP
  50. * OSCHAPP SCHEDULE APPLICATION
  51. * XTRACE TRACE PROCEDURE CALL
  52. *
  53. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION
  54. * THIS IS A SECONDARY OVERLAY CALLED BY HBSTTP.
  55. * W A R N I N G - THIS PROGRAM CANNOT EXCEED THE SECONDARY
  56. *CALL OSSIZE
  57. *
  58. *
  59.  #
  60. STOPIMS;
  61.  
  62. XREF LABEL RJMAIN ;
  63. XREF PROC DELCDR;
  64. XREF PROC HUPDDAW; # UPDATE DATA AVAILABLE WORD #
  65. XREF PROC MGETS ;
  66. XREF PROC MRELS ;
  67. XREF PROC KPUT ;
  68. XREF PROC BLINK ;
  69. XREF PROC OSCHAPP ;
  70. XREF PROC XTRACE ;
  71. ITEM BUFFER ; # BUFFER TO HOLD FC/BRK #
  72. ITEM I ;
  73. ITEM NEXT ;
  74. ITEM TEMPBLKSQ ;
  75.  
  76. BASED ARRAY NHSECOND P(1) ;
  77. BEGIN
  78. ITEM NHBRKRC U (0,0,8) ;
  79. ITEM NHWORD2 U (0,0,WL) ;
  80. END
  81.  
  82. ITEM ACNTINDX U ;
  83. BEGIN # HSFCBRK #
  84. CONTROL IFEQ DEBUG,1 ;
  85. XTRACE("HSBRK") ;
  86. CONTROL FI;
  87. TEMPBLKSQ = 0 ;
  88. P<ACNB> = PARAMS1 ;
  89. P<NHSECOND> = PARAMS2 + BLKHSIZE + NBHSIZE ;
  90. IF ACNBDRFP[0] NQ 0
  91. THEN
  92. BEGIN # DISCARD DATA #
  93. NEXT = ACNBDRFP[0] ; # FIRST DATA BLOCK #
  94. P<DRHDRWD> = 0 ;
  95. P<AHEADER> = 0 ;
  96.  
  97. FOR I = I WHILE NEXT NQ LOC(ACNBDRFP[0])
  98. DO
  99. BEGIN # PROCESS THE WHOLE RING #
  100. BUFFER = NEXT ;
  101. NEXT = NEXTPTR[BUFFER] ; # NEXT OF BUFFER #
  102.  
  103. TEMPBLKSQ = TEMPBLKSQ + 1 ;
  104.  
  105. MRELS(BUFFER) ; # RELEASE THE BUFFER BLOCK #
  106.  
  107.  
  108. END # PROCESS THE WHOLE RING #
  109. ACNBDRFP[0] = 0 ; # THE WHOLE RING HAS BEEN #
  110. ACNBDRBP[0] = 0 ; # RELEASED #
  111. DELCDR(P<ACNB>); # DELINK ACNB FROM CON DATA RING#
  112. END
  113. P<ACB> = ATACBA[ACNBAN[0]] ;
  114. P<ACNT> = ACBACNT[0] ;
  115. HUPDDAW(P<ACB>,P<ACNB>,-TEMPBLKSQ,-TEMPBLKSQ);
  116. ACNTINDX = ACNBACN[0] - ACNTMINACN[0] + ACNTHSIZE ;
  117. ACNTABO[ACNTINDX] = 0 ;# RESET THE ABO COUNT #
  118.  
  119. MGETS(LFCBRK + BLKHSIZE + ABHSIZE,BUFFER,TRUE);
  120.  
  121. # SET UP APPLICATION BLOCK HEADER #
  122.  
  123. P<AHEADER> = BUFFER + BLKHSIZE ;
  124. ABHABT[0] = APPCMD ; # COMMAND BLOCK #
  125. ABHACT[0] = CT60TRANS ; # CHAR TYPE - TRANSPARENT #
  126. ABHTLC[0] = LFCBRK ;
  127.  
  128. # SET UP FC/BRK (RST) #
  129.  
  130. P<SUPMSG> = BUFFER + BLKHSIZE + ABHSIZE ;
  131. FCACN[0] = ACNBACN[0] ;
  132. IF PARAMS2 NQ 0 # (BREAK) #
  133. THEN
  134. BEGIN
  135. PFCSFC[0] = FCBRK ;
  136. FCRBR[0] = NHBRKRC[0] ;
  137. END
  138. ELSE
  139. PFCSFC[0] = FCRST ;
  140. BLINK(BUFFER,ATACBA[ACNBAN[0]]) ;
  141. OSCHAPP(ATACBA[ACNBAN[0]]) ;
  142.  
  143. GOTO RJMAIN ;
  144.  
  145. END # HSFCBRK #
  146. TERM
  147.  
cdc/nos2.source/nam5871/hsfcbrk.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator