User Tools

Site Tools


cdc:nos2.source:nam5871:hrdput

HRDPUT

Table Of Contents

  • [00011] PROC HRDPUT(TXTLN)
  • [00065] PROC BRLBLK
  • [00066] PROC HRELWWL
  • [00067] PROC MGETS
  • [00068] PROC MRELS
  • [00069] PROC OMOVE
  • [00070] PROC XTRACE
  • [00071] PROC OTIME

Source Code

HRDPUT.txt
  1. *DECK HRDPUT
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT APPSTAT
  5. USETEXT DRHDR
  6. USETEXT FREETAB
  7. USETEXT MEM
  8. USETEXT NWLHEAD
  9. USETEXT NWLNTRY
  10. USETEXT STATTAB
  11. PROC HRDPUT(TXTLN);
  12.  
  13. STARTIMS;
  14. #
  15. *1DC HRDPUT
  16. *
  17. * 1. PROC NAME AUTHOR DATE
  18. * HRDPUT E. GEE 78/02/15
  19. *
  20. * 2. FUNCTIONAL DESCRIPTION.
  21. * THIS ROUTINE IS RESPONSIBLE FOR TRANSFERING THE *NET PUT* MSG
  22. * THAT WOULDN-T FIT IN THE NWL.
  23. *
  24. * 3. METHOD USED.
  25. * SET UP FOR READ
  26. * READ BLOCK
  27. * PUT OTHER ENTRIES INTO THE NEW LARGER WORKLIST INCLUDING THE
  28. * NETPUT TEXT
  29. *
  30. * 4. ENTRY PARAMETERS.
  31. * ACBADDR APPLICATION"S ACB
  32. * TXTLN LENGTH OF THE NETPUT TEXT
  33. * WLADDR WORKLIST ENTRY
  34. *
  35. * 5. EXIT PARAMETERS.
  36. * DONE FALSE IF SCP READ FUNCTION NOT COMPLETE
  37. * TRUE IF NWL INCLUDES NETPUT / NETGETF TEXT
  38. * ACBWLFWA FWA OF NEW NWL
  39. * ACBWLLWA LWA OF NEW NWL
  40. * WLADDR ADDRESS OF CURRENT WORKLIST ENTRY
  41. *
  42. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  43. * APPSTAT ACB DRHDR FREETAB
  44. * NIPDEF NWLHEAD NWLNTRY
  45. * STATTAB
  46. *
  47. * 7. ROUTINES CALLED.
  48. * BRLBLK XFER BLOCK FROM APP FL TO NIP FL
  49. * HRELWWL RELEASE WHOLE NWL
  50. * MGETS ALLOCATE EMPTY BUFFER
  51. * MRELS RELEASE BUFFER SPACE
  52. * OMOVE COPY INFORMATION
  53. * OTIME GET SYSTEM RTIME
  54. * XTRACE TRACES CALLS
  55. *
  56. * 8. DAYFILE MESSAGES. NONE
  57. * THIS PROCEDURE IS CALLED BY HPGET AND HPPUT.
  58. *
  59.  #
  60. STOPIMS;
  61. #
  62.   EXTERNAL VARIABLES
  63. #
  64. XREF BEGIN
  65. PROC BRLBLK; # READ BLOCK INTO NIP-S FL #
  66. PROC HRELWWL; # RELEASE WHOLE NWL #
  67. PROC MGETS; # ALLOCATE EMPTY BUFFER #
  68. PROC MRELS; # RELEASE UNUSED BUFFER SPACE #
  69. PROC OMOVE; # COPY INFORMATION #
  70. PROC XTRACE; # TRACE CALLS #
  71. PROC OTIME; # GET SYSTEM RTIME #
  72. END
  73. #
  74.   FORMAL PARAMETERS
  75. #
  76. ITEM TXTLN U; # LENGTH OF NETPUT TEXT IN CM WORDS #
  77. #
  78.   LOCAL VARIABLES
  79. #
  80. ITEM BUFADDR U; # FWA OF NEW NWL BUFFER #
  81. ITEM BUFSIZE U; # SIZE OF NEW NWL BUFFER #
  82. ITEM WLSIZE U; # WORKLIST SIZE #
  83. ITEM EXTRAWORD U; # SET TO ONE IF FRAGMENTED GET/PUT #
  84.  
  85. CONTROL IFEQ STAT,1;
  86. ARRAY STIME P(1); # RTIME BUFFER FOR STARTING TIME #
  87. BEGIN
  88. ITEM SMILS U(0,24,36); # STARTING TIME IN MILLESECONDS #
  89. END
  90. ARRAY ETIME P(1); # RTIME BUFFER FOR ENDING TIME #
  91. BEGIN
  92. ITEM EMILS U(0,24,36); # ENDING TIME IN MILLESECONDS #
  93. END
  94.  
  95. ITEM STTEMP; # TEMPORARY STATISTICS VARIABLE #
  96. CONTROL FI;
  97.  
  98.  
  99. #**********************************************************************#
  100.  
  101. BEGIN
  102. CONTROL IFEQ DEBUG,1;
  103. XTRACE("HRDPU") ;
  104. CONTROL FI;
  105.  
  106.  
  107. CONTROL IFEQ STAT,1;
  108. OTIME(STIME); # GET SYSTEM TIME AT BEGINNING OF PROC #
  109. CONTROL FI;
  110.  
  111. P<NWLENTRY> = WLADDR; # FWA OF WORKLIST ENTRY #
  112. P<ACB> = ACBADDR; # FWA OF ACB #
  113.  
  114. IF NWLOP[0] EQ WLOPPUTF
  115. OR NWLOP[0] EQ WLOPGETF
  116. OR NWLOP[0] EQ WLOPGTFL
  117. THEN # READ TEXT ARRAY FOR FRAGMENTED GETS/PUTS #
  118. EXTRAWORD = 1;
  119. ELSE # ITS A NETPUT WORKLIST ENTRY #
  120. EXTRAWORD = 0;
  121.  
  122. BUFSIZE = ACBWLLWA[0] - WLADDR + 1 + TXTLN + EXTRAWORD;
  123. MGETS(BUFSIZE,BUFADDR,FALSE); # GET BUFFER FOR NEW NWL #
  124. P<DRHDRWD> = BUFADDR; # FWA OF NEW NWL BUFFER #
  125. CMWORD[0] = NWLEAIPH[0]; # RESTORE AIP OPCODE WORD #
  126. CMWORD[1] = NWLEABH[0]; # RESTORE APP BLOCK HEADER WORD #
  127.  
  128. BRLBLK(BUFADDR+AIPHSIZE+EXTRAWORD,TXTLN); # READ TEXT INTO NWL #
  129.  
  130. IF DONE
  131. THEN # READ UCP FUNCTION COMPLETED #
  132. BEGIN
  133. P<NWLENTRY> = BUFADDR; # FWA OF NWL ENTRY #
  134. NWLEID[0] = NWLEIDVALUE; # RESET NWL ENTRY ID #
  135. WLSIZE = AIPHSIZE+ABHSIZE+TXTLN+EXTRAWORD; # SET NWL SIZE #
  136. NWLEBS[0] = WLSIZE; # RESET NWL ENTRY SIZE #
  137. NWLTA[0] = 0; # CLEAR TEXT ADDRESS #
  138. MNEW = BUFADDR+WLSIZE; # FWA OF REMAINING NWL BUFFER #
  139. MOLD = WLADDR+AIPHSIZE+ABHSIZE; # FWA OF GSM ENTRY #
  140. MSIZE = GSMSIZE + GMMSIZE; #SIZE OF REMAINING ENTRIES IN NWL #
  141. OMOVE; # COPY GSM WORKLIST (ONLY ONE POSSIBLE) TO NEW NWL #
  142.  
  143. HRELWWL; # RELEASE WHOLE NWL #
  144.  
  145. ACBWLFWA[0] = BUFADDR;
  146. ACBWLLWA[0] = BUFADDR+BUFSIZE-1;
  147. ACBWLADR[0] = BUFADDR; # CURRENT WORKLIST ADDRESS #
  148. NEXTWLA = BUFADDR+WLSIZE; # ADDRESS OF NEXT WORKLIST #
  149. WLADDR = BUFADDR; # CURRENT WORKLIST ADDRESS #
  150. END
  151.  
  152. ELSE # UCP SWAPPED OUT, READ FUNCTION UNABLE TO COMPLETE #
  153. BEGIN
  154. BLKBS[0] = BUFSIZE; # RESTORE BUFFER SIZE #
  155. MRELS(BUFADDR); # RELEASE NEW NWL BUFFER #
  156. END
  157.  
  158.  
  159. CONTROL IFEQ STAT,1;
  160. OTIME(ETIME); # GET SYSTEM TIME AT END OF PROCEDURE #
  161. ST$NHR = ST$NHR + 1; # INCRMNT NUMBER OF TIMES HRDPUT CALLD #
  162. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN THIS ROUTINE #
  163. ST$THR = ST$THR + STTEMP; # TOTAL TIME SPENT IN THIS ROUTINE #
  164. IF ST$LHR LS STTEMP
  165. THEN # FOUND LARGER TIME INTERVAL IN ROUTINE #
  166. BEGIN
  167. ST$LHR = STTEMP; # NEW LARGEST TIME INTERVAL #
  168. END
  169. CONTROL FI;
  170.  
  171. RETURN;
  172. END
  173. TERM
cdc/nos2.source/nam5871/hrdput.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator