User Tools

Site Tools


cdc:nos2.source:nam5871:brlblk

BRLBLK

Table Of Contents

  • [00008] PROC BRLBLK((BUFADR1),TXTLN)
  • [00076] PROC OSCCALL
  • [00077] PROC OSCHAPP
  • [00078] PROC OTIME
  • [00079] PROC XTRACE

Source Code

BRLBLK.txt
  1. *DECK BRLBLK
  2. USETEXT NIPDEF
  3. USETEXT APPSTAT
  4. USETEXT NWLNTRY
  5. USETEXT AT
  6. USETEXT ACB
  7. USETEXT STATTAB
  8. PROC BRLBLK((BUFADR1),TXTLN);
  9.  
  10. STARTIMS;
  11. #
  12. *1DC BRLBLK
  13. *
  14. * 1. PROC NAME AUTHOR DATE
  15. * BRLBLK E. GEE 77/09/14
  16. *
  17. * 2. FUNCTIONAL DESCRIPTION.
  18. * READ TEXT FROM APP FL TO NIP FL
  19. *
  20. * 3. METHOD USED.
  21. * IF TEXT IS GREATER THAN 64 WORDS LONG,
  22. * SET UP EXTENDED READ FUNCTION TO READ TEXT INTO NIP FL.
  23. * ELSE (TEXT IS LESS THAN OR EQUAL TO 64 WORDS LONG),
  24. * SET UP NORMAL SYSTEM CONTROL POINT READ FUNCTION.
  25. * ISSUE SCP CALL.
  26. * IF SYSTEM CONTROL POINT CALL RETURN CODE IS NONZERO,
  27. * IF RETURN CODE IS UCP IS SWAPPED OUT,
  28. * ISSUE SCP SWAPIN OF APPLICATION.
  29. * ELSE (RETURN CODE OTHER THAN SCP SWAPPED OUT),
  30. * SET ABORT APPLICATION OR APPLICATION FAILED FLAGS.
  31. * ELSE (NO ERROR RETURN CODE FROM OPERATING SYSTEM),
  32. * IF NOT ALL OF THE DATA HAS BEEN READ INTO NIP FL,
  33. * CLEAR COMPLETION BIT AND GO BACK AND REISSUE SCP CALL.
  34. *
  35. * 4. ENTRY PARAMETERS.
  36. * BUFADR1 ADDR OF BUF TO HOLD TEXT
  37. * ACBADDR ACB ADDRESS
  38. * TXTLN LENGTH OF TEXT TO READ
  39. * WLADDR NETWORK WORKLIST ENTRY ADDRESS
  40. *
  41. * 5. EXIT PARAMETERS.
  42. * ABTAPPF ABORT FLG SET IF NIP GOT SCP RC = RCUCPAOOR
  43. * DONE SET FALSE IF TEXT NOT READ IN
  44. * FAILADR FAIL FLG SET IF NIP GOT SCP RC = RCUCPGONE
  45. *
  46. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  47. * ACB AT APPSTAT
  48. * NIPDEF NWLNTRY
  49. * STATTAB STATISTICS TABLE
  50. *
  51. * 7. ROUTINES AND OVERLAYS CALLED.
  52. * OSCCALL ISSUE SCP CALL
  53. * OSCHAPP SCHEDULE APPLICATION
  54. * OTIME GET SYSTEM TIME
  55. * XTRACE RECORD PROCEDURE CALLS
  56. *
  57. * 8. DAYFILE MESSAGES AND OTHER IMPORTANT INFORMATION.
  58. * NONE
  59. *
  60.  #
  61. STOPIMS;
  62. #
  63.   INPUT PARAMETERS
  64. #
  65. ITEM BUFADR1; # FWA TO STORE ABH AND TEXT #
  66. ITEM TXTLN I; # NO OF WORDS TO READ FROM UCP #
  67. #
  68.   OUTPUT PARAMETERS
  69.   NONE
  70. #
  71. #
  72.  EXTERNAL VARIABLES
  73. #
  74. XREF
  75. BEGIN
  76. PROC OSCCALL; # SYSTEM CONTROL POINT CALL #
  77. PROC OSCHAPP; # SCHEDULE AN APPLICATION #
  78. PROC OTIME; # GET SYSTEM TIME #
  79. PROC XTRACE; # TRACE CALL #
  80. END
  81. #
  82.  LOCAL VARIABLES
  83. #
  84. ARRAY FLR P(3); # ARRAY FOR ISSUING SCP CALL #
  85. BEGIN
  86. ITEM FLRRC U(00,00,06); # RETURN CODE FROM SCP CALL #
  87. ITEM FLRFP U(00,06,12); # NUMBER OF WORDS TO READ #
  88. ITEM FLRUCPA U(00,18,18); # UCP ADR FOR SF.READ SCP FUNC #
  89. ITEM FLRSCPA U(00,36,18); # SCP ADR FOR SF.READ SCP FUNC #
  90. ITEM FLRFC U(00,54,06); # SCP FUNCTION CODE #
  91. ITEM FLRCB U(00,59,01); # SCP FUNCTION COMPLETION BIT #
  92. ITEM FLRWD0 U(00,00,60) = [0]; # WORD 0 OF SCP FUNCTION BUFFER #
  93. ITEM FLRJSNWD U(01,00,60); # UCP JSN / EJT ORDINAL WORD #
  94. ITEM FLRXUCPA U(02,12,24); # UCP ADR FOR SF.XREAD SCP FUNC #
  95. ITEM FLRXSCPA U(02,36,24); # SCP ADR FOR SF.XREAD SCP FUNC #
  96. ITEM FLRWD2 U(02,00,60) = [0]; # WORD 2 OF SCP FUNCTION BUFFER #
  97. END
  98.  
  99. CONTROL IFEQ STAT,1;
  100. ARRAY STIME P(1); # RTIME BUFFER FOR STARTING TIME#
  101. BEGIN
  102. ITEM SMILS U(0,24,36); # STARTING TIME IN MILLESECONDS #
  103. END
  104. ARRAY ETIME P(1); # RTIME BUFFER FOR ENDING TIME #
  105. BEGIN
  106. ITEM EMILS U(0,24,36); # ENDING TIME IN MILLESECONDS #
  107. END
  108.  
  109. ITEM STTEMP; # TEMPORARY STATISTICS VARIABLE #
  110. CONTROL FI;
  111.  
  112.  
  113. #**********************************************************************#
  114.  
  115. BEGIN
  116.  
  117. CONTROL IFEQ DEBUG,1;
  118. XTRACE("BRLBL") ;
  119. CONTROL FI;
  120.  
  121. CONTROL IFEQ STAT,1;
  122. OTIME(STIME); # GET SYSTEM TIME AT BEGINNING #
  123. CONTROL FI;
  124.  
  125.  
  126. DONE = FALSE; # SET FUNCTION INCOMPLETE #
  127. P<ACB> = ACBADDR;
  128. P<NWLENTRY> = WLADDR;
  129. FLRWD0[0] = 0; # INITIALIZE RETURN CODE FIELD #
  130. FLRFP[0] = TXTLN; # WORD COUNT TO BE TRANSFERRED #
  131. FLRJSNWD[0] = ACBJNWD[0];
  132. IF TXTLN GR 64
  133. THEN # EXTENDED READ SCP FUNC NEEDED #
  134. BEGIN
  135. FLRFC[0] = SFXRED; # SF.XREAD FUNCTION CODE #
  136. FLRXUCPA[0] = NWLTA[0]; # UCP ADDR TO READ FROM #
  137. FLRXSCPA[0] = BUFADR1 + ABHSIZE; # SCP ADDR TO READ TO #
  138. END
  139. ELSE # READ SCP FUNCTION SUFFICIENT #
  140. BEGIN
  141. FLRFC[0] = SFREAD; # SF.READ FUNCTION CODE #
  142. FLRUCPA[0] = NWLTA[0]; # UCP ADDR TO READ FROM #
  143. FLRSCPA[0] = BUFADR1 + ABHSIZE; # SCP ADDR TO READ TO #
  144. END
  145.  
  146. RDBLK:
  147. OSCCALL(FLR); # ISSUE SCP REQUEST #
  148.  
  149. IF FLRRC[0] NQ 0
  150. THEN
  151.  
  152. BEGIN
  153. IF FLRRC[0] EQ RCSWAPPEDOUT
  154. THEN
  155. BEGIN # USER JOB SWAPPED OUT #
  156. ATASBS[ACBAN[0]] = TRUE; # SET APP SWAPPED OUT BIT IN AT #
  157. OSCHAPP(ACBADDR); # SCHEDULE APPLICATION #
  158. END
  159. ELSE
  160. BEGIN
  161. IF FLRRC[0] EQ RCUCPAOOR
  162. THEN
  163. ABTAPPF = XFLERR; # UCPA IS OUT OF RANGE #
  164. ELSE
  165. FAILADR = ACBADDR; # OTHER SCP ERROR RETURN CODE #
  166. END
  167. END
  168. ELSE
  169. BEGIN # SCP REQUEST HAS COMPLETED #
  170. IF FLRFP[0] NQ 0 AND # IF DATA TRANSFER NOT COMPLETE #
  171. TXTLN GR 64 # EXTENDED READ FUNCTION ISSUED #
  172. THEN
  173. BEGIN
  174. FLRCB[0] = 0; # CLEAR COMPLETE BIT #
  175. GOTO RDBLK; # REISSUE SF.READ REQUEST #
  176. END
  177. DONE = TRUE; # SET FUNCTION COMPLETE FLAG #
  178. END
  179.  
  180.  
  181. CONTROL IFEQ STAT,1;
  182. OTIME(ETIME); # GET SYSTEM TIME AT END OF PROC#
  183. ST$NBR = ST$NBR + 1; # INCR NO OF TIMES PROC CALLED #
  184. STTEMP = EMILS[0] - SMILS[0]; # TIME SPENT IN THIS ROUTINE #
  185. ST$TBR = ST$TBR + STTEMP; # TOTAL TIME SPENT IN ROUTINE #
  186. IF ST$LBR LS STTEMP
  187. THEN # FOUND LARGER TIME INTERVAL #
  188. BEGIN
  189. ST$LBR = STTEMP; # NEW LARGEST TIME INTERVAL #
  190. END
  191. CONTROL FI;
  192.  
  193. RETURN;
  194. END
  195. TERM
cdc/nos2.source/nam5871/brlblk.txt ยท Last modified: 2023/08/05 17:21 by Site Administrator