User Tools

Site Tools


cdc:nos2.source:nam5871:bwlblk

BWLBLK

Table Of Contents

  • [00006] PROC BWLBLK(SOURCE,SINK,BLKSIZE)
  • [00067] PROC HWRTDA
  • [00068] PROC OTIME
  • [00069] PROC XTRACE

Source Code

BWLBLK.txt
  1. *DECK BWLBLK
  2. USETEXT NIPDEF
  3. USETEXT ACB
  4. USETEXT APPSTAT
  5. USETEXT STATTAB
  6. PROC BWLBLK(SOURCE,SINK,BLKSIZE);
  7.  
  8. STARTIMS;
  9. #
  10. *1DC BWLBLK
  11. *
  12. * 1. PROC NAME AUTHOR DATE
  13. * BWLBLK E. GEE 77/09/14
  14. *
  15. * 2. FUNCTIONAL DESCRIPTION.
  16. * WRITE TEXT FROM NIP-S FIELD LENGTH TO APP-S FIELD LENGTH
  17. *
  18. * 3. METHOD USED.
  19. * IF TEXT IS GREATER THAN 64 WORDS,
  20. * SET UP EXTENDED WRITE SCP FUNCTION REQUEST.
  21. * ELSE (NORMAL SCP WRITE FUNCTION IS SUFFICIENT),
  22. * SET UP WRITE SCP FUNCTION REQUEST.
  23. * CALL HWRTDA TO ISSUE SCP FUNCTION REQUEST AND PROCESS
  24. * RETURN CODE.
  25. *
  26. * 4. ENTRY PARAMETERS.
  27. * BLKSIZE SIZE OF BLK TO WRITE TO APP FL
  28. * NEXTWLA ADDR OF NEXT NETWORK WORKLIST ENTRY
  29. * ACBADDR ACB ADDRESS
  30. * SINK APP ADDRESS TO WRITE TEXT TO
  31. * SOURCE ADDR OF BLK TO WRITE TO APP FL
  32. *
  33. * 5. EXIT PARAMETERS.
  34. * ABTAPPF ABORT FLG SET IF NIP GOT SCP RC = RCUCPAOOR
  35. * DONE SET FALSE IF TEXT NOT WRITTEN TO APP FL
  36. * FAILADR FAIL FLG SET IF NOT GOT SCP RC = RCUCPGONE
  37. *
  38. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  39. * ACB APPSTAT
  40. * NIPDEF
  41. * STATTAB STATISTICS TABLE
  42. *
  43. * 7. ROUTINES AND OVERLAYS CALLED.
  44. * HWRTDA WRITE DATA TO APP FIELD LENGTH
  45. * OTIME GET SYSTEM TIME
  46. * XTRACE RECORD PROCEDURE CALLS
  47. *
  48. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
  49. * NONE
  50. *
  51.  #
  52. STOPIMS;
  53.  
  54. # INPUT PARAMETERS #
  55.  
  56. ITEM SOURCE; # FWA OF BUFFER IN NIP-FL #
  57. ITEM SINK; # UCP ADDRESS IN APP-FL #
  58. ITEM BLKSIZE; # BLOCK SIZE IN CM WORDS #
  59.  
  60. # OUTPUT PARAMETERS NONE #
  61.  
  62. #
  63.  EXTERNAL VARIABLES
  64. #
  65. XREF
  66. BEGIN
  67. PROC HWRTDA; # WRITE DATA TO APP FIELD LENGTH#
  68. PROC OTIME; # GET SYSTEM TIME #
  69. PROC XTRACE; # TRACE CALL #
  70. END
  71. #
  72.  LOCAL VARIABLES
  73. #
  74. ARRAY FLW P(3); # ARRAY FOR ISSUING SCP CALL #
  75. BEGIN
  76. ITEM FLWRC U(00,00,06); # RETURN CODE FROM SCP CALL #
  77. ITEM FLWFP U(00,06,12); # NUMBER OF WORDS TO WRITE #
  78. ITEM FLWUCPA U(00,18,18); # UCP ADR FOR SF.WRITE SCP FUNC #
  79. ITEM FLWSCPA U(00,36,18); # SCP ADR FOR SF.WRITE SCP FUNC #
  80. ITEM FLWFC U(00,54,06); # SCP FUNCTION CODE #
  81. ITEM FLWCB U(00,59,01); # SCP FUNCTION COMPLETION BIT #
  82. ITEM FLWWD0 U(00,00,60) = [0]; # WORD 0 OF SCP FUNCTION BUFFER #
  83. ITEM FLWJSNWD U(01,00,60); # UCP JSN / EJT ORDINAL WORD #
  84. ITEM FLWXUCPA U(02,12,24); # UCP ADR FOR SF.XWRITE SCP FUNC#
  85. ITEM FLWXSCPA U(02,36,24); # SCP ADR FOR SF.XWRITE SCP FUNC#
  86. ITEM FLWWD2 U(02,00,60) = [0]; # WORD 2 OF SCP FUNCTION BUFFER #
  87. END
  88.  
  89. ITEM BUFSIZ; # BUFFER SZE IN CM WORDS #
  90.  
  91. CONTROL IFEQ STAT,1;
  92. ARRAY STIME P(1); # RTIME BUFFER FOR STARTING TIME#
  93. BEGIN
  94. ITEM SMILS U(0,24,36); # STARTING TIME IN MILLESECONDS #
  95. END
  96. ARRAY ETIME P(1); # RTIME BUFFER FOR ENDING TIME #
  97. BEGIN
  98. ITEM EMILS U(0,24,36); # ENDING TIME IN MILLESECONDS #
  99. END
  100.  
  101. ITEM STTEMP; # TEMPORARY STATISTICS VARIABLE #
  102. CONTROL FI;
  103.  
  104.  
  105. #**********************************************************************#
  106.  
  107. BEGIN
  108.  
  109. CONTROL IFEQ DEBUG,1;
  110. XTRACE("BWLBL") ;
  111. CONTROL FI;
  112.  
  113. CONTROL IFEQ STAT,1;
  114. OTIME(STIME); # GET SYSTEM TIME AT BEGINNING #
  115. CONTROL FI;
  116.  
  117.  
  118. DONE = FALSE;
  119. P<ACB> = ACBADDR;
  120. FLWWD0[0] = 0; # INITIALIZE SCP FUNCTION WD #
  121. FLWFP[0] = BLKSIZE; # WORD COUNT TO BE TRANSFERRED #
  122. FLWJSNWD[0] = ACBJNWD[0];
  123. IF BLKSIZE GR 64
  124. THEN # EXTENDED WRITE SCP FUNC NEEDED#
  125. BEGIN
  126. FLWXUCPA[0] = SINK; # UCP ADDR TO WRITE TEXT TO #
  127. FLWXSCPA[0] = SOURCE + BLKHSIZE + ABHSIZE;
  128. FLWFC[0] = SFXWRT; # SF.XWRITE SCP FUNCTION CODE #
  129. BUFSIZ = FLXSIZE; # SIZE OF SCP FUNCTION BLOCK #
  130. END
  131. ELSE # NORMAL SCP WRITE FUNCTION USED#
  132. BEGIN
  133. FLWUCPA[0] = SINK; # UCP ADDR TO WRITE TEXT TO #
  134. FLWSCPA[0] = SOURCE + BLKHSIZE + ABHSIZE;
  135. FLWFC[0] = SFWRITE; # SF.WRITE SCP FUNCTION CODE #
  136. BUFSIZ = FLSIZE; # SIZE OF SCP FUNCTION BLOCK #
  137. END
  138.  
  139. HWRTDA(FLW,BUFSIZ,SOURCE);
  140.  
  141. CONTROL IFEQ STAT,1;
  142. OTIME(ETIME); # GET SYSTEM TIME AT END OF PROC#
  143. ST$NWR = ST$NWR + 1; # INCR NO OF TIMES BWLBLK CALLED#
  144. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN ROUTINE #
  145. ST$TWR = ST$TWR + STTEMP; # TOTAL TIME SPENT IN ROUTINE #
  146. IF ST$LWR LS STTEMP
  147. THEN # FOUND LARGER TIME INTERVAL #
  148. BEGIN
  149. ST$LWR = STTEMP; # NEW LARGEST TIME INTERVAL #
  150. END
  151. CONTROL FI;
  152.  
  153. RETURN;
  154. END
  155. TERM
cdc/nos2.source/nam5871/bwlblk.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator