User Tools

Site Tools


ibm:vm370-lib:cp:dmkmon.assemble_src

DMKMON Source

References

Source Listing

DMKMON.ASSEMBLE.txt
  1. MON TITLE 'DMKMON (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT @V2B2638 00002000
  3. COPY OPTIONS @V2B2638 00003000
  4. COPY LOCAL @V2B2638 00004000
  5. SPACE 4 00005000
  6. DMKMON CSECT @V2B2638 00006000
  7. MODID DC CL8'DMKMON' IDENTIFICATION FOR DUMPS @V2B2638 00007000
  8. USING SAVEAREA,R13 @V2B2638 00008000
  9. USING PSA,R0 @V2B2638 00009000
  10. EJECT 00010000
  11. *. 00011000
  12. * 00012000
  13. * MODULE NAME - 00013000
  14. * 00014000
  15. * DMKMON 00015000
  16. * 00016000
  17. * FUNCTION - 00017000
  18. * 00018000
  19. * TO PROCESS COMMANDS AND REQUESTS ASSOCIATED WITH THE 00019000
  20. * MONITOR, INCLUDING MONITOR CALL INTERRUPTS WITHIN THE 00020000
  21. * CONTROL PROGRAM. 00021000
  22. * 00022000
  23. * ATTRIBUTES - 00023000
  24. * 00024000
  25. * REENTRANT, PAGABLE, 00025000
  26. * 00026000
  27. * CALLED VIA: 00027000
  28. * BRANCH FROM DMKPRG 00028000
  29. * 00029000
  30. * RE-ENTERED VIA: 00030000
  31. * IOBLOK IRA AFTER MONITOR TAPE I/O INTERRUPT. 00031000
  32. * TRQBLOK IRA AFTER TIME LAPSE EXPIRATION. 00032000
  33. * 00033000
  34. * ENTRY POINTS - 00034000
  35. * 00035000
  36. * DMKMONMI - TO PROCESS A MONITOR CALL PROGRAM INTERRUPT 00036000
  37. * DMKMON00 - TO WRITE CLASS 0 RECORDS WHEN MON IS STARTED 00037000
  38. * DMKMON40 - TO WRITE CLASS 4 RECORDS WHEN MON IS STARTED 00038000
  39. * DMKMONPR - TO ALLOCATE A MONITOR RECORD 00039000
  40. * DMKMONIO - TO PROCESS TAPE INTERRUPTS RETURNED BY DMKIOS 00040000
  41. * DNKMONTI - TO HANDLE TIMER REQUEST INTERRUPTS 00041000
  42. * 00042000
  43. * ENTRY CONDITIONS - 00043000
  44. * 00044000
  45. * REFER TO THE PROLOG ASSOCIATED WITH EACH ENTRY POINT 00045000
  46. * 00046000
  47. * EXIT CONDITIONS - 00047000
  48. * 00048000
  49. * REFER TO THE PROLOG ASSOCIATED WITH EACH ENTRY POINT 00049000
  50. * 00050000
  51. * EXTERNAL REFERENCES / CALLS TO OTHER ROUTINES - 00051000
  52. * 00052000
  53. * THE FOLLOWING ARE FUNCTIONAL EXTERNAL REFERENCES 00053000
  54. * OR ROUTINES WHICH ARE CALLED BY THE MONITOR. 00054000
  55. * REFER TO THE DATA COLLECTION TABLE FOR ALL DATA 00055000
  56. * EXTERNAL REFERENCES PERTAINING TO COUNTERS, ETC. 00056000
  57. * 00057000
  58. EXTRN DMKQCNWT WRITE A LINE TO THE CONSOLE @V2B2638 00058000
  59. EXTRN DMKIOSQR REQUEST CP I/O TO A DEVICE @V2B2638 00059000
  60. EXTRN DMKDSPCH FIND SOME OTHER WORK TO BE DONE @V2B2638 00060000
  61. EXTRN DMKFREE OBTAIN A BLOCK OF FREE STORAGE @V2B2638 00061000
  62. EXTRN DMKFRET RETURN A BLOCK OF FREE STORAGE @V2B2638 00062000
  63. EXTRN DMKSTKCP STACK A CPEXBLOK @V2B2638 00063000
  64. EXTRN DMKPRGC8 ENABLED CLASSES OF MONITOR EVENTS@V2B2638 00064000
  65. EXTRN DMKPRGMI ADDRESS OF MONITOR INT HANDLER @V2B2638 00065000
  66. EXTRN DMKPRGMC ADDRESS OF COMMUNICATIONS AREA @V2B2638 00066000
  67. EXTRN DMKPRGTI INT BETWEEN TIMER COLLECTIONS @V2B2638 00067000
  68. EXTRN DMKERMSG SEND AN ERROR MESSAGE @V2B2638 00068000
  69. EXTRN DMKPTRUL UNLOCK A PAGE @V2B2638 00069000
  70. EXTRN DMKPTRFT OBTAIN A PAGE OF FREE STORAGE @V2B2638 00070000
  71. EXTRN DMKSCHST STACK A TIMER REQUEST BLOCK @V2B2638 00071000
  72. EXTRN DMKSCHRT REMOVE A STACKED TIMER REQ BLOCK @V2B2638 00072000
  73. EXTRN DMKMIAWO,DMKSYSMX @V50A2B5 00073000
  74. EXTRN DMKPGTVR @V50A2B5 00074000
  75. EXTRN DMKMIAX1,DMKMIAX2,DMKMIAY1,DMKMIAY2,DMKMIA @V50A2B5 00075000
  76. EXTRN DMKCVTDT OBTAIN DATE AND TIME IN EBCDIC @V2B2638 00076000
  77. EXTRN DMKCVTAB ABEND CVT001 IF CLOCK DAMAGED @VA04301 00077000
  78. EXTRN DMKMNITR ROUTINE TO WRITE TRAILER RECORD @V4075A4 00078000
  79. EXTRN DMKMNIFI ROUTINE TO CLOSE DOWN MONITOR @V4075A4 00079000
  80. AIF (NOT &AP).LOKCT4 00079500
  81. EXTRN DMKLOKCT LOCK COUNTERS @V4075A4 00080000
  82. EXTRN DMKLOKSY SYSTEM LOCK COUNTERS @V4M0153 00081000
  83. EXTRN DMKLOKFR DMKFRE LOCK COUNTERS @V4M0153 00082000
  84. .LOKCT4 ANOP 00082500
  85. EXTRN DMKFRENP ADDTIONAL DMKFRE LOCK COUNTERS @V4M0153 00083000
  86. AIF (NOT &AP).LOKRL4 00083500
  87. EXTRN DMKLOKRL RUNLIST LOCK COUNTERS @V4M0153 00084000
  88. EXTRN DMKLOKTR TIMER REQUEST QUEUE COUNTERS @V4M0153 00085000
  89. EXTRN DMKLOKDS DISPATCHER QUEUES COUNTERS @V4M0153 00086000
  90. .LOKRL4 ANOP 00086100
  91. EXTRN DMKIOSNM ALTERNATE PATH COUNTERS @V60BEBC 00086200
  92. EXTRN DMKENTUT I/O UTILIZATION INTERVAL @V60BEBC 00086300
  93. EXTRN DMKFREST ANCHOR FOR SUBPOOL SPLITS @V60BEBC 00086400
  94. EXTRN DMKSYSAT MONITOR LIMIT FLAG @V60BEBC 00086500
  95. EXTRN DMKENT62 ROUTINE TO GATHER I/O UTILIZATION@V60BEBC 00086600
  96. EXTRN DMKMIACC MONITOR CLOSE SPOOL FILE RTN @V60BEBC 00086700
  97. * 00087000
  98. * REGISTER USAGE IN THIS MODULE - 00088000
  99. * 00089000
  100. * R0 - WORK REG 00090000
  101. * R1 - WORK REG 00091000
  102. * R2 - WORK REG 00092000
  103. * R3 - WORK REG 00093000
  104. * R4 - WORK REG 00094000
  105. * R5 - BAL REG FOR PREPREC (AND FROM THERE TO SIO) ROUTINE 00095000
  106. * R6 - RCHBLOK / RETURN ADDRESS FOR TIMER COLLECTION ROUTINES 00096000
  107. * R7 - RCUBLOK / WORKREG 00097000
  108. * R8 - RDEVBLOK / WORKREG 00098000
  109. * R9 - MONCOM ADDRESS 00099000
  110. * R10 - IOB ADDRESS WITHIN I/O ROUTINES AND I/O DATA COLLECTION 00100000
  111. * R11 - VMBLOK ADDRESS 00101000
  112. * R12 - BASE ADDRESS 00102000
  113. * R13 - FOR MI ENTRY, R13 OF ISSUER 00103000
  114. * R14 - BALR LINKAGE 00104000
  115. * R15 - BALR LINKAGE 00105000
  116. * 00106000
  117. *. 00107000
  118. EJECT 00108000
  119. *. 00109000
  120. * 00110000
  121. * ENTRY POINT - 00111000
  122. * 00112000
  123. * DMKMONMI - MONITOR CALL PROGRAM INTERRUPT HANDLER 00113000
  124. * 00114000
  125. * ENTRY CONDITIONS - 00115000
  126. * 00116000
  127. * GPR12 - ENTRY POINT ADDRESS 00117000
  128. * MONITOR CALL PROGRAM OLD PSW IN LOCATION X'28' 00118000
  129. * MONITOR CALL CLASS HALFWORD IN MONCLASS X'94' 00119000
  130. * MONITOR CALL CODE FULLWORD IN MONCODE X'9C' 00120000
  131. * 00121000
  132. * EXIT CONDITIONS 00122000
  133. * 00123000
  134. * NONE 00124000
  135. * 00125000
  136. * CALLS TO OTHER ROUTINES 00126000
  137. * 00127000
  138. * DMKIOSQR - TO INITIATE I/O FOR JUST FILLED DATA PAGE 00128000
  139. * 00129000
  140. * EXTERNAL REFERENCES 00130000
  141. * 00131000
  142. * REFER TO THE DATA COLLECTION TABLE FOR ALL EXTERNAL 00132000
  143. * REFERENCES PERTAINING TO DATA COUNTERS, ETC. 00133000
  144. * 00134000
  145. * REGISTER USAGE - 00135000
  146. * 00136000
  147. * GPR0 - WORK REG. 00137000
  148. * GPR1 - ADDRESS OF CURRENT BUFFER DATA ENTRY 00138000
  149. * GPR2-4 WORK REGISTERS 00139000
  150. * GPR5 - LINK TO THE BUFFER MANAGEMENT ROUTINE (PREPREC) 00140000
  151. * GPR6 - RETURN REG FOR TIMER DATA COLLECTION ROUTINE 00141000
  152. * GPR7 - WORK REG. 00142000
  153. * GPR8 - ADDRESS OF RDEVBLOK (WHERE APPLICABLE) 00143000
  154. * GPR9 - ADDRESS OF MONCOM 00144000
  155. * GPR10 - ADDRESS OF IOBLOK (WHERE APPLICABLE) 00145000
  156. * GPR11 - ADDRESS OF VMBLOK 00146000
  157. * GPR12 - BASE REG. 00147000
  158. * GPR13 - NOT USED 00148000
  159. * GPR14 - WORK REG. 00149000
  160. * GPR15 - WORK REG. 00150000
  161. * 00151000
  162. * OPERATION - 00152000
  163. *  00153000
  164. * MONITOR CALL INTERRUPT PROCESSING 00154000
  165. * 00155000
  166. * DMKMONMI: 00156000
  167. * 00157000
  168. * THE MONITOR CALL CLASS AND CODE ARE RETREIVED FROM 00158000
  169. * PSA AND A BRANCH IS MADE TO THE APPROPRIATE MONITOR 00159000
  170. * CLASS ROUTINE. 00160000
  171. * 00161000
  172. * FROM THE APPROPRIATE MONITOR CLASS ROUTINE A BRANCH 00162000
  173. * IS MADE TO THE APPROPRIATE MONITOR CODE ROUTINE 00163000
  174. * (THE DATA COLLECTION ROUTINE). 00164000
  175. * 00165000
  176. * EACH ROUTINE COLLECTING DATA CALLS THE BUFFER 00166000
  177. * MANAGEMENT ROUTINE FOR THE AMOUNT OF SPACE NEEDED 00167000
  178. * TO CONTAIN THE SPECIFIC RECORD. 00168000
  179. * 00169000
  180. * THE FOLLOWING IS A SUMMARY OF WHAT DATA EACH OF THE 00170000
  181. * VARIOUS ROUTINES COLLECTS, AND THE COLLECTION 00171000
  182. * VEHICLE. 00172000
  183. * 00173000
  184. * CLASS 0 - PERFORM (TIMER DRIVEN) 00174000
  185. * CODE 0 - COLLECT SYSTEM CLOCKS AND 00175000
  186. * COUNTERS. 00176000
  187. * CODE 1 - COLLECT APU CLOCKS AND COUNTERS. 00177000
  188. * CODE 97 - MONITOR TAPE HEADER RECORD, 00178000
  189. * CREATED BY DMKMONTH. 00179000
  190. * CODE 98 - MONITOR TAPE TRAILER RECORD, 00180000
  191. * CREATED BY DMKMONIO. 00181000
  192. * CODE 99 - MONITOR SUSPENSION DUE TO TAPE 00182000
  193. * BUSY, CREATED BY DMKMONIO. 00183000
  194. * 00184000
  195. * CLASS 1 - RESPONSE (MONITOR CALL) 00185000
  196. * CODE 0 - BEGIN A CONSOLE READ. 00186000
  197. * CODE 1 - CONSOLE OUTPUT. 00187000
  198. * CODE 2 - END A CONSOLE READ. 00188000
  199. * CODE 3 - BEGIN SLEEP WITH TIME OUT. 00189000
  200. * CODE 4 - USER LOGON 00190000
  201. * CODE 5 - USER LOGOFF 00191000
  202. * 00192000
  203. * CLASS 2 - SCHEDULER (MONITOR CALL) 00193000
  204. * CODE 2 - DROP USER FROM Q. 00194000
  205. * CODE 3 - ADD USER TO Q. 00195000
  206. * CODE 4 - ADD USER TO ELIGABLE LIST. 00196000
  207. * 00197000
  208. * CLASS 3 - RESERVED (MONITOR CALL) 00198000
  209. * 00199000
  210. * CLASS 4 - USER (TIMER DRIVEN) 00200000
  211. * CODE 0 - COLLECT VIRT. MACH STATISTICS. 00201000
  212. * 00202000
  213. * CLASS 5 - INSTRUCTION SIMULATION (MONITOR CALL) 00203000
  214. * CODE 0 - BEGIN INSTRUCTION. 00204000
  215. * 00205000
  216. * CLASS 6 - DASTAP (TIMER DRIVEN) 00206000
  217. * CODE 0 - INITIALIZE AND CREATE DASTAP 00207000
  218. * HEADER, CALLED FROM DMKMONTH. 00208000
  219. * CODE 1 - COLLECT DEVICE INFORMATION. 00209000
  220. * 00210000
  221. * CLASS 7 - SEEKS (MONITOR CALL) 00211000
  222. * CODE 0 - DASD SEEK CHANNEL PROGRAM ISSUED. 00212000
  223. * 00213000
  224. * CLASS 8 - SYSPROF (MONITOR CALL - VIA CLASS 2) 00214000
  225. * CODE 2 - COLLECT DEVICE I/O COUNTS AND 00215000
  226. * SYSTEM CLOCKS. 00216000
  227. * 00217000
  228. * AFTER THE APPROPRIATE MONITOR DATA IS COLLECTED THE 00218000
  229. * GENERAL REGISTERS ARE RESTORED FROM DMKPRG AND 00219000
  230. * SYSTEM PROCESSING RESUMES FROM THE PROGRAM OLD 00220000
  231. * PSW. 00221000
  232. * 00222000
  233. * BUFFER MANAGEMENT: 00223000
  234. * THE BUFFER MANAGEMENT ROUTINE MAINTAINS A POINTER 00224000
  235. * TO THE BUFFER CURRENTLY COLLECTING DATA. IF A RECORD 00225000
  236. * IS REQUESTED WHICH OVERFLOWS THE BUFFER, OR IF ONLY ONE 00226000
  237. * BUFFER IS BEING USED AND THE NEXT RECORD WOULD OVERFLOW 00227000
  238. * THE BUFFER, THEN A POINTER TO THE NEXT AVAILABLE BUFFER 00228000
  239. * IS GOTTEN, AND CONTROL IS PASSED TO THE TAPE MANAGEMENT 00229000
  240. * ROUTINE TO WRITE OUT THE BUFFER. 00230000
  241. * 00231000
  242. * TAPE I/O MANAGEMENT: 00232000
  243. * THE TAPE MANAGEMENT ROUTINE KEEPS TRACK OF THE 00233000
  244. * CURRENT STATUS OF THE TAPE. IF THE TAPE IS NOT 00234000
  245. * BUSY THEN A CPEXBLOK IS STACKED WHICH WILL CALL 00235000
  246. * DMKIOSQR TO WRITE THE BUFFER TO TAPE. AFTER THE 00236000
  247. * CPEXBLOK IS STACKED, RETURN IS MADE FROM WHENCE WE 00237000
  248. * CAME. 00238000
  249. * IF THE TAPE IS BUSY, INDICATION IS MADE THAT I/O IS 00239000
  250. * PENDING, SO THAT THE I/O INTERRUPT HANDLER WILL RE-START 00240000
  251. * THE TAPE WHEN THE CURRENT I/O FINISHES. 00241000
  252. * 00242000
  253. * NOTE: WHEN THE CPEXBLOK IS UNSTACKED BY THE 00243000
  254. * DISPATCHER A CALL IS MADE TO DMKFREE TO REPLACE THE 00244000
  255. * BACK POCKET CPEXBLOK. THIS WILL NOT CAUSE AN 00245000
  256. * EXTEND SINCE THE DISPATCHER JUST UNSTACKED AND 00246000
  257. * FRETED THE CPEXBLOK. ALTHOUGH THE DISPATCHER FRET 00247000
  258. * MAY HAVE CAUSED A DIS-EXTEND, RESULTING IN AN 00248000
  259. * EXTEND ON THIS CALL; THIS EXTEND WOULD NOT INVOLVE 00249000
  260. * I/O. 00250000
  261. * 00251000
  262. * SUSPENSION: 00252000
  263. * IF NO BUFFERS ARE AVAILABLE THEN MONITORING IS SUSPENDED. 00253000
  264. * IN THIS CASE, EACH BUFFER IS EITHER BEING WRITTEN TO 00254000
  265. * TAPE, OR WAITING TO BE WRITTEN. A COUNT IS MAINTAINED 00255000
  266. * IN THIS CASE, THERE ARE 2 FULL BUFFERS OF DATA. 00256000
  267. * ONE HAS BEEN SCHEDULED TO GO TO TAPE BUT THE TAPE 00257000
  268. * I/O HAS NOT COMPLETED AND THE OTHER BUFFER IS FULL 00258000
  269. * AND WAITING TO GO TO TAPE. A COUNT IS MAINTAINED 00259000
  270. * OF THE NUMBER OF TIMES THAT THIS CONDITION 00260000
  271. * OCCURRS. A NOTE IS MADE THAT THE MONITOR IS 00261000
  272. * SUSPENDED, ALONG WITH THE CURRENT TOD CLOCK VALUE. 00262000
  273. * 00263000
  274. * AT THIS POINT THE REASON FOR ENTRY INTO DMKMON IS 00264000
  275. * IGNORED AND EXIT IS MADE BACK TO DMKPRG IF ENTRY 00265000
  276. * WAS VIA AN MC INSTRUCTION OR TO THE DISPATCHER IF 00266000
  277. * ENTRY WAS MADE VIA A TIMER INTERRUPT. THE MONITOR 00267000
  278. * IS LEFT DISABLED FOR MC INTERRUPTS. IF A MONITOR 00268000
  279. * TIMER INTERRUPT SHOULD OCCUR, THEN THE TIMER 00269000
  280. * ROUTINE WILL BE DECEIVED INTO THINKING THAT THERE 00270000
  281. * ARE NO EVENTS TO MONITOR. HOWEVER, THE NEXT TIMER 00271000
  282. * INTERRUPT IS SET UP BEFORE HE EXITS TO THE 00272000
  283. * DISPATCHER, SO THE TIMER INTERRUPT PROCESS IS NOT 00273000
  284. * FORGOTTEN. 00274000
  285. * 00275000
  286. * THE MONITOR I/O INTERRUPT HANDLER WILL DETECT THE 00276000
  287. * SUSPEND CONDITION AND DO WHAT IS NECESSARY TO 00277000
  288. * RESUME MONITORING. SEE THE I/O INTERRUPT HANDLER 00278000
  289. * FOR DETAILS OF THAT FUNCTION. 00279000
  290. * 00280000
  291. *. 00281000
  292. EJECT 00282000
  293. ENTRY DMKMONMI @V2B2638 00283000
  294. DMKMONMI DS 0H @V2B2638 00284000
  295. USING *,R12 @V2B2638 00285000
  296. SL R12,=A(DMKMONMI-DMKMON) COMMON BASE ADDRESS @V2B2638 00286000
  297. USING DMKMON,R12 @V2B2638 00287000
  298. USING SAVEAREA,R13 @V2B2638 00288000
  299. USING VMBLOK,R11 @V4075A4 00289000
  300. USING MONCOM,R9 COMMUNICATIONS AREA DSECT @V2B2638 00290000
  301. L R9,=A(DMKPRGMC) GET ADDR OF MONCOM @V2B2638 00291000
  302. L R9,0(R9) ... @V2B2638 00292000
  303. LTR R9,R9 HAS MONITOR BEEN SHUT DOWN? @V4075A4 00293000
  304. BZ EXIT2 YES, MONCOM GONE, EXIT @V4075A4 00294000
  305. TM MONFLAG1,CFSTOP TRYING TO SHUTDOWN MONITOR? @V4075A4 00295000
  306. BNZ EXIT2 YES, EXIT @V4075A4 00296000
  307. L R3,MONCODE MC INTERRUPT CODE FROM PSA @V2B2638 00297000
  308. SLL R3,2 TIMES 4 FOR CODE BRANCH TABLE @V2B2638 00298000
  309. LH R5,MONCLASS MC INTERRUPT CLASS FROM PSA @V2B2638 00299000
  310. SLL R5,2 TIMES 4 FOR CLASS BRANCH TABLE @V2B2638 00300000
  311. B MONBRTBL(R5) OFF TO CORRESPONDING BRANCH INST @V2B2638 00301000
  312. SPACE 1 00302000
  313. MONBRTBL B EXIT2 CLASS 0, TIMER, PERFORM @V2B2638 00303000
  314. B MONCL1 CLASS 1, EVENT, RESPONSE @V2B2638 00304000
  315. B MONCL2 CLASS 2, EVENT, SCHEDULER @V2B2638 00305000
  316. B MONCL3 CLASS 3, EVENT, TIMING @V2B2638 00306000
  317. B EXIT2 CLASS 4, TIMER, USER @V2B2638 00307000
  318. B MONCL5 CLASS 5, EVENT, INSTSIM @V2B2638 00308000
  319. B EXIT2 CLASS 6, TIMER, DASTAP @V2B2638 00309000
  320. B MONCL7 CLASS 7, EVENT, SEEKS @V2B2638 00310000
  321. B EXIT2 CLASS 8, EVENT, SYSTEM PROFILE @V2B2638 00311000
  322. B EXIT2 RESERVED @V2B2638 00312000
  323. B EXIT2 RESERVED @V2B2638 00313000
  324. B EXIT2 RESERVED @V2B2638 00314000
  325. B EXIT2 RESERVED @V2B2638 00315000
  326. B EXIT2 RESERVED @V2B2638 00316000
  327. B EXIT2 RESERVED @V2B2638 00317000
  328. B EXIT2 RESERVED @V2B2638 00318000
  329. EJECT 00319000
  330. MONCL1 LA R1,ENDCL1-MONCODS1 GET LENGTH OF CL 1 BR TABLE @V2B2638 00320000
  331. CR R3,R1 WILL BRANCH FALL WITHIN IT @V2B2638 00321000
  332. BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00322000
  333. B MONCODS1(R3) GO TO APPROPRIATE CLASS 1 RTN. @V2B2638 00323000
  334. SPACE 1 00324000
  335. MONCODS1 B MONCOD10 BEGIN CONSOLE READ OPERATION @V2B2638 00325000
  336. B MONCOD11 CONSOLE OUTPUT LINE @V2B2638 00326000
  337. B MONCOD12 END OF CONSOLE READ OPERATION @V2B2638 00327000
  338. B MONCOD13 BEGIN SLEEP WITH TIMEOUT @V2B2638 00328000
  339. B MONCOD14 USER LOGON 00329000
  340. B MONCOD15 USER LOGOFF 00330000
  341. ENDCL1 EQU * @V2B2638 00331000
  342. SPACE 5 00332000
  343. MONCL2 LA R1,ENDCL2-MONCODS2 GET LENGTH OF CL 2 BR TABLE @V2B2638 00333000
  344. CR R3,R1 WILL BRANCH FALL WITHIN IT @V2B2638 00334000
  345. BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00335000
  346. B MONCODS2(R3) GO TO APPROPRIATE ROUTINE @V2B2638 00336000
  347. SPACE 1 00337000
  348. MONCODS2 B EXIT2 RESERVED @V2B2638 00338000
  349. B EXIT2 RESERVED @V2B2638 00339000
  350. B MONCOD22 DROP USER FROM Q @V2B2638 00340000
  351. B MONCOD23 ADD USER TO Q @V2B2638 00341000
  352. B MONCOD24 ADD USER TO ELIGABLE LIST @V2B2638 00342000
  353. ENDCL2 EQU * @V2B2638 00343000
  354. SPACE 5 00344000
  355. MONCL3 LA R1,ENDCL3-MONCODS3 GET LENGTH OF CL 3 BR TABLE @V2B2638 00345000
  356. CR R3,R1 WILL BRANCH FALL WITHIN IT @V2B2638 00346000
  357. BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00347000
  358. B MONCODS3(R3) BRANCH FOR CLASS 3 (TIMING) @V2B2638 00348000
  359. SPACE 1 00349000
  360. MONCODS3 B MONCOD30 BEGIN TIMING @V2B2638 00350000
  361. B MONCOD31 END TIMING @V2B2638 00351000
  362. ENDCL3 EQU * @V2B2638 00352000
  363. SPACE 5 00353000
  364. MONCL5 LA R1,ENDCL5-MONCODS5 GET LENGTH OF CL 5 BR TABLE @V2B2638 00354000
  365. CR R3,R1 WILL BRANCH FALL WITHIN TABLE @V2B2638 00355000
  366. BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00356000
  367. B MONCODS5(R3) GO TO APPROPRIATE ROUTINE @V2B2638 00357000
  368. SPACE 1 00358000
  369. MONCODS5 B MONCOD50 BEGIN INSTRUCTION SIMULATION @V2B2638 00359000
  370. ENDCL5 EQU * @V2B2638 00360000
  371. SPACE 5 00361000
  372. MONCL7 LA R1,ENDCL7-MONCODS7 GET LENGTH OF CL 7 BR TABLE @V2B2638 00362000
  373. CR R3,R1 WILL BRANCH FALL WITHIN TABLE @V2B2638 00363000
  374. BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00364000
  375. B MONCODS7(R3) GO TO APPROPRIATE ROUTINE @V2B2638 00365000
  376. SPACE 1 00366000
  377. MONCODS7 B MONCOD70 COLLECT DATA ON DASD SEEKS @V2B2638 00367000
  378. ENDCL7 EQU * @V2B2638 00368000
  379. SPACE 5 00369000
  380. EXIT2 LM R0,R15,MONREGS REST REGS AT MC TIME @V4M0117 00370000
  381. LPSW PROPSW RETURN FROM WHENCE WE CAME..... @V2B2638 00371000
  382. EJECT 00372000
  383. *. 00373000
  384. * 00374000
  385. * ENTRY POINT - 00375000
  386. * DMKMON00 - COLLECT CLASS 0, CODE 0 & 1 PERFORM DATA 00376000
  387. * 00377000
  388. * ENTRY CONDITIONS - 00378000
  389. * 00379000
  390. * R12 - ENTRY POINT ADDRESS 00380000
  391. * R13 - SAVE AREA ADDRESS 00381000
  392. * 00382000
  393. * EXIT CONDITIONS - 00383000
  394. * 00384000
  395. * R0 - ADDRESS OF DMKMONIO 00385000
  396. * 00386000
  397. * CALLS TO OTHER ROUTINES - 00387000
  398. * 00388000
  399. * NONE 00389000
  400. * 00390000
  401. * EXTERNAL REFERENCES 00391000
  402. * 00392000
  403. * REFER TO THE DATA COLLECTION TABLE FOR ALL EXTERNAL 00393000
  404. * REFERENCES PERTAINING TO DATA COUNTERS, ETC. 00394000
  405. * 00395000
  406. * REGISTER USAGE - 00396000
  407. * 00397000
  408. * GPR0 - WORK REG 00398000
  409. * GPR1 - ADDRESS OF CURRENT BUFFER DATA ENTRY 00399000
  410. * GPR2-4 - WORK REGS 00400000
  411. * GPR5 - LINK TO THE BUFFER MANAGEMENT ROUTINE (PREPREC) 00401000
  412. * GPR6 - ADDRESS OF RETURN POINT 00402000
  413. * GPR7 - WORK REG 00403000
  414. * GPR8 - ADDRESS OF RDEVBLOK 00404000
  415. * GPR9 - ADDRESS OF MONCOM 00405000
  416. * GPR10-11 - WORK REGS 00406000
  417. * GPR12 - BASE REG 00407000
  418. * GPR13 - SAVE AREA 00408000
  419. * GPR14-15 - WORK REGS 00409000
  420. * 00410000
  421. * OPERATION - 00411000
  422. * 00412000
  423. * THIS ROUTINE IS NORMALLY CALLED INTERNALLY, VIA BAL 00413000
  424. * TO MONCOD00. THE EXTERNAL ENTRY POINT IS PROVIDED 00414000
  425. * SO THAT DMKMNITH (TAPE HEADER ROUTINE) CAN WRITE THE 00415000
  426. * INITIAL PERFORM RECORDS, IF NECESSARY. PERFORMANCE 00416000
  427. * RELATED COUNTERS IN VARIOUS SYSTEM MODULES ARE COLLECTED 00417000
  428. * AND WRITTEN IN A CLASS 0 CODE 0 RECORD. IF THE ATTACHED 00418000
  429. * PROCESSOR IS ACTIVE, CARE MUST BE TAKEN TO FETCH THOSE 00419000
  430. * COUNTERS CONTAINED IN THE PSA FROM THE CPU'S PSA, AND, 00420000
  431. * IT IS NECESSARY TO WRITE A CLASS 0 CODE 1 RECORD FOR 00421000
  432. * COUNTERS CONTAINED IN THE ATTACHED PROCESSOR'S PSA, AND 00422000
  433. * SPECIAL COUNTERS OF INTEREST IN THE AP ENVIRONMENT. 00423000
  434. * 00424000
  435. *. 00425000
  436. ******* 00426000
  437. * 00427000
  438. * CLASS 0 CODE 0, PERFORM, TIMER DRIVEN COUNTER DATA COLLECTION 00428000
  439. * 00429000
  440. ******* 00430000
  441. SPACE 00431000
  442. DMKMON00 RELOC ENTRY FOR DMKMNITH @V4075A4 00432000
  443. LA R6,EXITP SET R6 WITH RET ADDR FOR COMPAT @V4075A4 00433000
  444. MONCOD00 EQU * @V50A2B5 00434000
  445. L R1,=A(DMKMIA) ADDRESS OF DMKMIA @V50A2B5 00435000
  446. TRANS 2,1,OPT=(SYSTEM,BRING,DEFER,LOCK) BRING IN @V50A2B5 00436000
  447. LA R0,MNCLPERF SIMULATE EFFECTS @VMD0140 00437000
  448. STH R0,MONCLASS OF A MONITOR @VMD0140 00438000
  449. LA R0,MNCOSYS CALL CLASS ZERO, @VMD0140 00439000
  450. ST R0,MONCODE CODE ZERO @VMD0140 00440000
  451. LA R0,MN000LEN GET LENGTH OF THE RECORD @V50A2B5 00441000
  452. BAL R5,PREPREC OBTAIN THE NECESSARY SPACE @V2B2638 00442000
  453. BAL R5,TSTSUSP1 @VA10215 00442500
  454. USING MN000,R1 ADDRESS THE RECORD @V2B2638 00443000
  455. TM APSTAT1,APUOPER AM I RUNNING IN AP MODE? @V4075A4 00444000
  456. BNO CPUDATA NO, NO NEED FOR SPECIAL PREFIX @V4075A4 00445000
  457. TM APSTAT1,PROCIO AM I THE APU? @V4075A4 00446000
  458. BO CPUDATA NO, NO NEED FOR SPECIAL PREFIX @V4075A4 00447000
  459. L R2,PREFIXB APU MUST ADDRESS CPU'S PREFIX @V4075A4 00448000
  460. * TO GATHER CPU PERFORM DATA 00449000
  461. B PREFXOK1 GO GET THE DATA @V4075A4 00450000
  462. CPUDATA SR R2,R2 ZERO PREFIX POINTER @V4075A4 00451000
  463. PREFXOK1 LM R3,R4,IDLEWAIT-IPLPSW(R2) IDLE WAIT TIME @V4075A4 00452000
  464. STM R3,R4,MN000WID SAVE VALUE IN RECORD @V4075A4 00453000
  465. LM R3,R4,PAGEWAIT-IPLPSW(R2) PAGE WAIT TIME @V4075A4 00454000
  466. STM R3,R4,MN000WPG SAVE VALUE IN RECORD @V4075A4 00455000
  467. LM R3,R4,IONTWAIT-IPLPSW(R2) IONT WAIT TIME @V4075A4 00456000
  468. STM R3,R4,MN000WIO SAVE VALUE IN RECORD @V4075A4 00457000
  469. LM R3,R4,PROBTIME-IPLPSW(R2) PROBLEM TIME @V4075A4 00458000
  470. STM R3,R4,MN000PRB SAVE VALUE IN RECORD @V4075A4 00459000
  471. LR R7,R2 SAVE PSA POINTER @V4075A4 00460000
  472. SPACE 00461000
  473. LA R1,MN000PSI-MN000(R1) READJUST BUFFER POINTER @V2B2638 00462000
  474. L R15,ASYSVM GET CORRECT SEG PAGES @V50A2B5 00463000
  475. LCTL C1,C1,VMSEG-VMBLOK(R15) @V50A2B5 00464000
  476. L R3,=A(DMKMIAX1) GET BEGINNING OF TABLE @V50A2B5 00465000
  477. LRA R3,0(0,R3) TRANSLATE ADDRESS @V50A2B5 00466000
  478. LA R4,4 INCREMENT VALUE @V2B2638 00467000
  479. L R5,=A(DMKMIAX2) GET THE END OF THE TABLE @V50A2B5 00468000
  480. LRA R5,0(0,R5) TRANSLATE ADDRESS @V50A2B5 00469000
  481. COLLECTA L R2,0(R3) GET DATA ADDRESS @V2B2638 00470000
  482. C R2,F4096 IS THIS A PSA FIELD? @V4075A4 00471000
  483. BNL ADDOK NO, NO NEED FOR PREFIXING @V4075A4 00472000
  484. AR R2,R7 YES, POINT TO APPROPRIATE PSA @V4075A4 00473000
  485. ADDOK EQU * @V4075A4 00474000
  486. MVC 0(4,R1),0(R2) MOVE DATA TO BUFFER @V2B2638 00475000
  487. LA R1,4(R1) INCREMENT THE DATA FIELD PTR @V2B2638 00476000
  488. BXLE R3,R4,COLLECTA AGAIN UNTIL DONE @V2B2638 00477000
  489. SPACE 00478000
  490. LM R3,R5,=A(DMKSCHW1,DMKSCHW2,DMKPRGTI) @V2B2638 00479000
  491. DROP R1 @V2B2638 00480000
  492. USING MN000Q1E,R1 RE-ESTABLISH THE BASE @V2B2638 00481000
  493. MVC MN000Q1E,0(R3) NO. OF USERS WAITING TO ENTER Q1 @V2B2638 00482000
  494. MVC MN000Q2E,0(R4) NO. OF USERS WAITING TO ENTER Q2 @V2B2638 00483000
  495. MVC MN000INT,0(R5) INTVAL BETWEEN DATA COLLECTIONS @V2B2638 00484000
  496. L R7,ARIODV GET START OF REAL DEVICES @V2B2638 00485000
  497. L R2,=A(DMKSYSOC) GET COUNT OF SYSTEM ... @V2B2638 00486000
  498. L R2,0(R2) ... OWNED VOLUMES @V2B2638 00487000
  499. L R3,=A(DMKSYSOW) START OF SYS OWNED LIST @V2B2638 00488000
  500. SLR R0,R0 CLEAR FOR FOLLOWING CALCULATIONS @VA03723 00489000
  501. LR R4,R0 ... @VA03723 00490000
  502. LR R14,R0 ... @VA03723 00491000
  503. LR R15,R0 ... @VA03723 00492000
  504. B NEXTENT NOW GO CHECK OUT FIRST ENTRY @V2B2638 00493000
  505. SPACE 00494000
  506. INDEX LA R3,8(R3) BUMP TO NEXT SYSTEM OWNED ENTRY @V2B2638 00495000
  507. NEXTENT LH R8,6(R3) PICK UP INDEX @V2B2638 00496000
  508. LTR R8,R8 IS THERE ONE? @V2B2638 00497000
  509. BM NXTSYS NOPE, NO DEVICE HERE @V2B2638 00498000
  510. SLL R8,3 CONVERT TO BYTE DISPLACEMENT @V2B2638 00499000
  511. AR R8,R7 CREATE RDEVBLOK ADDRESS @V2B2638 00500000
  512. USING RDEVBLOK,R8 ADDRESS IT... @V2B2638 00501000
  513. IC R4,RDEVTYPE GET THE DEVICE TYPE CODE @VA03723 00502000
  514. L R8,RDEVALLN GET PRIMARY ALLOCATION BLOCK @VA03723 00503000
  515. DROP R8 NO MORE RDEVBLOK @VA03723 00504000
  516. USING ALOCBLOK,R8 ADDRESS ALOCBLOK @VA03723 00505000
  517. LTR R8,R8 IS THERE AN ALOCBLOK? @VA03723 00506000
  518. BZ NXTSYS NOPE, THEN SKIP THIS DEVICE @VA03723 00507000
  519. SRL R4,1 SHIFT DOWN BY ONE, SMALLER INDEX @VA03723 00508000
  520. CLM R4,B'0001',F8+3 BIT IN THE HIGHER HALF ? @VA03723 00509000
  521. BL LOWBITS NOPE, LOWER HALF, BR. @VA03723 00510000
  522. SRL R4,4 SHIFT BIT IN UPPER HALF TO LOWER @VA03723 00511000
  523. IC R0,TBLHIGH(R4) PICK UP MULTIPLIER (PAGES/CYL) @VA03723 00512000
  524. B *+8 AND CONTINUE @VA03723 00513000
  525. LOWBITS IC R0,TBLLOW(R4) PICK UP MULTIPLIER (PAGES/CYL) @VA03723 00514000
  526. LH R5,ALOCMAX GET DEVICE CYL COUNT @VA03723 00515000
  527. SH R5,ALOCNTMP REMOVE NON-TEMP CYLINDERS @VA03723 00516000
  528. MR R4,R0 CYL * (PAGES/CYL) = PAGES @VA03723 00517000
  529. AR R14,R5 ADD PAGES THIS DEVICE TO TOTAL @VA03723 00518000
  530. LH R5,ALOCUSED GET NO CYLS CURRENTLY USED @VA03723 00519000
  531. SH R5,ALOCNTMP REMOVE NON-TEMP CYLINDERS @VA03723 00520000
  532. MR R4,R0 CYL * (PAGES/CYL) = PAGES @VA03723 00521000
  533. AR R15,R5 ADD PAGES USED THIS DEV TO TOTAL @VA03723 00522000
  534. DROP R8 NO MORE ALOCBLOK @VA03723 00523000
  535. NXTSYS BCT R2,INDEX LOOK AT ALL OWNED DEVICES @VA03723 00524000
  536. LTR R3,R14 GET TOTAL PAGES AVAILABLE @VA03723 00525000
  537. BZ AVAIL0 NONE AVAILABLE (!?), BR @VA03723 00526000
  538. LA R0,100 NO. OF PAGES PER PSEUDO CYLINDER @VA03723 00527000
  539. DR R2,R0 CALC NO OF PSEUDO CYLINDERS AVAIL@VA03723 00528000
  540. AVAIL0 STH R3,MN000PPC SAVE PSEUDO CYL. CAPACITY @VA03723 00529000
  541. LTR R3,R15 GET TOTAL PAGES USED @VA03723 00530000
  542. BZ ALOC0 NONE ALLOCATED (!?), BR. @VA03723 00531000
  543. SLR R2,R2 CLEAR FOR DIVIDE @VA03723 00532000
  544. DR R2,R0 CALC NO OF PSEUDO CYLINDERS USED @VA03723 00533000
  545. ALOC0 STH R3,MN000PPA SAVE PSEUDO CYL USED COUNT @VA03723 00534000
  546. ALTPCTRS L R2,=A(DMKIOSNM) GET ADDR ALT PATH COUNTERS @V60BEBC 00534100
  547. MVC MN000ISD(16),0(R2) MOVE ALT PATH COUNTERS @V60BEBC 00534200
  548. STUTCTRS L R2,=A(DMKFRENP) GET ADDR OF STORAGE COUNTERS @V60BEBC 00534300
  549. MVC MN000EXT(8),0(R2) GET EXTEND,UNEXTEND COUNT @V60BEBC 00534400
  550. L R2,=A(DMKFREST) GET ADDR OF SPLIT COUNTERS @V60BEBC 00534500
  551. MVC MN000ATT(8),40(R2) GET ATTEMPTED + ACTUAL SPLITS@V60BEBC 00534600
  552. TM APSTAT1,APUOPER ARE WE RUNNING AP? @V4075A4 00535000
  553. BNO UNLOCK @VA08204 00536000
  554. EJECT 00537000
  555. ******* 00538000
  556. * 00539000
  557. * CLASS 0 CODE 1 PERFORM APU DATA 00540000
  558. * 00541000
  559. ******* 00542000
  560. SPACE 2 00543000
  561. MONCOD01 L R0,F1 SET UP TO CHANGE CODE @V4075A4 00544000
  562. ST R0,MONCODE SAVE IT @V4075A4 00545000
  563. LA R0,MN001LEN GET LENGTH OF RECORD @V4075A4 00546000
  564. BAL R5,PREPREC GO GET A BUFFER @V4075A4 00547000
  565. BAL R5,TSTSUSP1 @VA10215 00547500
  566. TM APSTAT1,PROCIO AM I THE APU? @V4075A4 00548000
  567. BZ APUDATA YES, NO NEED FOR SPECIAL PREFIX @V4075A4 00549000
  568. L R2,PREFIXB NO, ADDRESS THE APU'S PSA @V4075A4 00550000
  569. B PREFXOK2 GO GET THE DATA @V4075A4 00551000
  570. APUDATA LA R2,0 CLEAR OUT R2 FOR APU CASE @V4075A4 00552000
  571. USING MN001,R1 @V4075A4 00553000
  572. PREFXOK2 LM R3,R4,IDLEWAIT-IPLPSW(R2) SYSTEM IDLE TIME @V4075A4 00554000
  573. STM R3,R4,MN001WID @V4075A4 00555000
  574. LM R3,R4,PAGEWAIT-IPLPSW(R2) SYSTEM PAGE WAIT @V4075A4 00556000
  575. STM R3,R4,MN001WPG SAVE IT IN RECORD @V4075A4 00557000
  576. LM R3,R4,IONTWAIT-IPLPSW(R2) SYSTEM I/O WAIT @V4075A4 00558000
  577. STM R3,R4,MN001WIO SAVE IT IN RECORD @V4075A4 00559000
  578. LM R3,R4,PROBTIME-IPLPSW(R2) SYSTEM PROBLEM TIME @V4075A4 00560000
  579. STM R3,R4,MN001PRB SAVE IT IN RECORD @V4075A4 00561000
  580. LA R1,MN001NXR-MN001(R1) POINT PAST TOD VALUES @V4075A4 00562000
  581. L R15,ASYSVM GET CORRECT SEG TABLE @V50A2B5 00563000
  582. LCTL C1,C1,VMSEG-VMBLOK(R15) @V50A2B5 00564000
  583. L R3,=A(DMKMIAY1) GET BEGINNING OF THE TABLE @V50A2B5 00565000
  584. LRA R3,0(0,R3) @V50A2B5 00566000
  585. LA R4,4 LOAD INDEX INCREMENT @V4075A4 00567000
  586. L R5,=A(DMKMIAY2) GET THE END OF THE TABLE @V50A2B5 00568000
  587. LRA R5,0(0,R5) TRANSLATE IT @V50A2B5 00569000
  588. COLLECTB L R7,0(R3) GET ADDRESS OF A COUNTER @V4075A4 00570000
  589. C R7,F4096 IS IT IN THE PSA? @V4075A4 00571000
  590. BNL ADDOK2 NO, NO PREFIX NEEDED @V4075A4 00572000
  591. AR R7,R2 IN PSA, ADD IN PREFIX VALUE @V4075A4 00573000
  592. ADDOK2 MVC 0(4,R1),0(R7) MOVE COUNTER VALUE INTO RECORD @V4075A4 00574000
  593. LA R1,4(R1) POINT TO NEXT LOCATION IN RECORD @V4075A4 00575000
  594. BXLE R3,R4,COLLECTB CHECK FOR END OF TABLE AND LOOP @V50A2B5 00576000
  595. UNLOCK DS 0H @VA08204 00576500
  596. L R2,=A(DMKMIA) GET ADDRESS OF PAGE TO UNLOCK @VA09228 00577000
  597. LRA R2,0(0,R2) @VA08204 00577500
  598. CALL DMKPTRUL @V50A2B5 00578000
  599. BR R6 END OF APU COUNTER TABLE @V50A2B5 00579000
  600. SPACE 5 00580000
  601. * 10 20 40 XX 80 RDEVTYPE BIT POSITION 00581000
  602. TBLHIGH DC AL1(057,150,032,000,000) 3330,3380,2314,X,0 HRC106DK 00582100
  603. SPACE 00583000
  604. * 01 02 04 XX 08 RDEVTYPE BIT POSITION 00584000
  605. TBLLOW DC AL1(024,024,096,000,120) 3340,2305,3375,X,3350 HRC106DK 00585100
  606. EJECT 00586000
  607. ******* 00587000
  608. * 00588000
  609. * CLASS 1 CODE 0, RESPONSE, BEGIN CONSOLE READ 00589000
  610. * 00590000
  611. * CLASS 1 CODE 3, RESPONSE, BEGIN SLEEP WITH TIME OUT 00591000
  612. * 00592000
  613. * CLASS 1 CODE 4, RESPONSE, USER LOGON 00593000
  614. * 00594000
  615. * CLASS 1 CODE 5, RESPONSE, USER LOGOFF 00595000
  616. * 00596000
  617. ******* 00597000
  618. SPACE 00598000
  619. MONCOD10 EQU * @V2B2638 00599000
  620. MONCOD14 EQU * 00600000
  621. MONCOD15 EQU * 00601000
  622. MONCOD13 LA R0,MN10XLEN RECORD LENGTH @V2B2638 00602000
  623. BAL R5,PREPREC GET SPACE AND CREATE HEADER @V2B2638 00603000
  624. BAL R5,TSTSUSP @VA10215 00603500
  625. USING MN10X,R1 ADDRESS THE RECORD @V2B2638 00604000
  626. BAL R5,USADD GET USER ID AND DEVICE ADDR @V2B2638 00605000
  627. B EXIT2 DONE. @V2B2638 00606000
  628. SPACE 5 00607000
  629. ******* 00608000
  630. * 00609000
  631. * CLASS 1 CODE 1, RESPONSE, WRITE A LINE TO THE CONSOLE 00610000
  632. * 00611000
  633. * CLASS 1 CODE 2, RESPONSE, CONSOLE READ COMPLETE 00612000
  634. * 00613000
  635. ******* 00614000
  636. SPACE 00615000
  637. MONCOD11 EQU * @V2B2638 00616000
  638. MONCOD12 L R6,MONREGS+R6*4 GET R6 AT MC TIME (CONTASK) @V4M0117 00617000
  639. USING CONTASK,R6 00618000
  640. LH R1,CONCNT GET BYTE COUNT FOR I/O LINE 00619000
  641. C R1,=F'128' MAX OF 128 CHAR (3277 MAY BE MORE@V2B2638 00620000
  642. BNH ADD11 NOT EXCEEDING MAX, OK AS IS @V2B2638 00621000
  643. LA R1,128 TOO BIG , SET DEFAULT @V2B2638 00622000
  644. ADD11 LA R0,MN10YLEN(,R1) ADJ FOR USERID, ADDR, CNT @V2B2638 00623000
  645. BAL R5,PREPREC GET SPACE AND CREATE HEADER @V2B2638 00624000
  646. BAL R5,TSTSUSP @VA10215 00624500
  647. BAL R5,USADD GET USERID AND DEVICE ADDR @V2B2638 00625000
  648. LH R2,CONCNT READ/WRITE COUNT 00626000
  649. L R3,CONADDR DATA ADDRESS 00627000
  650. DROP R6 00628000
  651. C R2,=F'128' RESTRICT MAX LINE RECORDED TO 128@V2B2638 00629000
  652. BNH STCOUNT WITHIN BOUNDS, COUNT OK AS IS @V2B2638 00630000
  653. LA R2,128 TOO BIG SET MAX. @V2B2638 00631000
  654. STCOUNT STC R2,MN10YCNT STORE IN MONITOR RECORD @V2B2638 00632000
  655. LTR R2,R2 IS THERE ANY DATA? @V2B2638 00633000
  656. BZ EXIT2 NOPE, DROP OUT IF NULL LINE @V2B2638 00634000
  657. BCTR R2,0 LESS 1 FOR EXECUTE @V2B2638 00635000
  658. EX R2,MOVEDATA COLLECT THE DATA @V2B2638 00636000
  659. B EXIT2 DONE. @V2B2638 00637000
  660. SPACE 5 00638000
  661. MOVEDATA MVC MN10YIO(0),0(R3) CONSOLE INPUT/OUTPUT DATA @V2B2638 00639000
  662. EJECT 00640000
  663. USADD MVC MN10XUID,VMUSER MOVE USERID TO MONITOR BUFFER @V2B2638 00641000
  664. L R8,VMTERM GET RDEVICE ADDR FOR THE TERMINAL@V2B2638 00642000
  665. LTR R8,R8 IS THERE ONE? (DISCONNECTED?) @V2B2638 00643000
  666. BZ DISCONN YES, DISCONNECTED, USE DUMMY @V2B2638 00644000
  667. LR R4,R6 SAVE POSSIBLE CONTASK ADDR @VA03543 00645000
  668. BAL R14,RDHEX GET THE DEVICE ADDR IN HEX @VA03543 00646000
  669. STH R2,MN10XADD PUT DEV ADDR IN MONITOR RECORD @VA03543 00647000
  670. LR R6,R4 RESTORE POSSIBLE CONTASK ADDR @VA03543 00648000
  671. BR R5 RETURN TO CALLER @VA03543 00649000
  672. SPACE 3 00650000
  673. DISCONN MVC MN10XADD,F0 MAKE LINE ADDR 0 FOR DISC USER @V2B2638 00651000
  674. BR R5 AND NOW RETURN @V2B2638 00652000
  675. DROP R1 00653000
  676. EJECT 00654000
  677. ******* 00655000
  678. * 00656000
  679. * CLASS 2, CODE 2, SCHEDULE, DROP USER FROM QUEUE 00657000
  680. * 00658000
  681. ******* 00659000
  682. SPACE 00660000
  683. MONCOD22 LA R0,MN202LEN LENGTH OF THE RECORD @V2B2638 00661000
  684. BAL22 BAL R5,PREPREC GET SPACE AND CREATE HEADER @V2B2638 00662000
  685. BAL R5,TSTSUSP @VA10215 00662500
  686. USING MN20X,R1 ADDRESS THE DSECT @V2B2638 00663000
  687. LM R2,R7,=A(DMKDSPNP,DMKSCHPU,DMKSCHW1,DMKSCHW2,DMKSCHN1,DMX00664000
  688. KSCHN2) 00665000
  689. MVC MN20XUID,VMUSER USERID BEING ADDED/DROPPED @V2B2638 00666000
  690. MVC MN20XNPP,0(R2) NO. OF PAGABLE PAGES @V2B2638 00667000
  691. MVC MN20XSWS,0(R3) SUM OF WORKING SETS OF IN Q USERS@V2B2638 00668000
  692. MVC MN20XQ1N,0(R6) NO. OF USERS IN Q1 @V2B2638 00669000
  693. MVC MN20XQ2N,0(R7) NO. OF USERS IN Q2 @V2B2638 00670000
  694. MVC MN20XQ1E,0(R4) NO. OF USERS WAITING TO ENTER Q1 @V2B2638 00671000
  695. MVC MN20XQ2E,0(R5) NO. OF USERS WAITING TO ENTER Q2 @V2B2638 00672000
  696. MVC MN20XWSS,VMWSPROJ PROJECTED WSS FOR THIS USER @V2B2638 00673000
  697. IC R2,TRACPROC GET CP TRACE PROCESSOR ID @V4075A4 00674000
  698. STC R2,MN20XPRC SAVE IT IN RECORD @V4075A4 00675000
  699. CLC MONCODE(4),F3 WAS IT CODE 2,3, OR 4 @V2B2638 00676000
  700. BE COD23 ITS MC CODE 3 FOR ADD Q @V2B2638 00677000
  701. SPACE 00678000
  702. MVC MN20YTTI,VMTTIME GET SUPERVISORY TIME @V2B2638 00679000
  703. MVC MN20YVTI,VMVTIME GET VIRT MACHINE TIME @V2B2638 00680000
  704. CLC MONCODE,F4 CODE 4? @V2B2638 00681000
  705. BE COD24 YUP, BR @V2B2638 00682000
  706. SPACE 00683000
  707. MVC MN202PRI,VMQPRIOR PRIORITY TO RE-ENTER Q @V2B2638 00684000
  708. L R2,=A(DMKSCHAL) CODE 2 DROP Q, NOW WHICH ONE @V2B2638 00685000
  709. TM 0(R2),Q1DROP WAS HE DROPPED FROM Q1 ? @V2B2638 00686000
  710. MVI MN20XQNM,X'01' SET INDICATOR IN RECORD @V2B2638 00687000
  711. BO *+8 YES, NO CHANGES @V2B2638 00688000
  712. MVI MN20XQNM,X'02' NO, SHOW DROP FROM Q2 @V2B2638 00689000
  713. TM 0(R2),X'20' WAS USER TIME SLICE ENDED? @V2B2638 00690000
  714. BZ *+8 NO, SKIP FLAG SETTING @V2B2638 00691000
  715. OI MN20XQNM,X'64' ADD 100 TO 'QUEUE' VARIABLE @V2B2638 00692000
  716. L R2,VMPGREAD TOTAL PAGE READS @V2B2638 00693000
  717. S R2,VMRDINQ LESS NUMBER STORED AT ENTRY @V2B2638 00694000
  718. STH R2,MN202PGR IS PAGE READS WHILE IN Q. @V2B2638 00695000
  719. MVC MN202APR,VMPGRINQ+2 SUM OF PAGES RES @ PAGE READ@VA03126 00696000
  720. XC MN202REF,MN202REF FIELD RESERVED FOR IBM USE @VA09337 00697700
  721. MVC MN202RES,VMPAGES PAGES RESIDENT @V2B2638 00699000
  722. MVC MN202PST,VMSTEALS NO. OF WAITS FOR STOLEN PGS @V2B2638 00700000
  723. MVC MN202IOC,VMIOCNT USER NON-SPOOLED IO CNT @V2B2638 00701000
  724. MVC MN202PNC,VMPNCH USER CARDS PUNCHED @V2B2638 00702000
  725. MVC MN202LIN,VMLINS USER LINES PRINTED @V2B2638 00703000
  726. MVC MN202CRD,VMCRDS USER CARDS READ @V2B2638 00704000
  727. MVC MN202LPR,VMLSTPRC LAST PROBLEM STATE PU @V60BEBC 00704500
  728. TM CPCREG8+3,SPROFCL SYSTEM PROFILE CLASS ACTIVE? @V2B2638 00705000
  729. BO MONCOD82 YES, MORE DATA TO COLLECT @V2B2638 00706000
  730. B EXIT2 FINISHED WITH IT FOR THIS LAP @V2B2638 00707000
  731. EJECT 00708000
  732. ******* 00709000
  733. * 00710000
  734. * CLASS 2 CODE 3, SCHEDULE, ADD USER TO QUEUE 00711000
  735. * 00712000
  736. ******* 00713000
  737. SPACE 00714000
  738. MONCOD23 LA R0,MN203LEN LENGTH OF THIS RECORD @V2B2638 00715000
  739. B BAL22 JOIN DROP QUEUE DATA COLLECTION @V2B2638 00716000
  740. SPACE 3 00717000
  741. COD23 L R2,MONREGS+R15*4 R15 AT MC TIME = A(QUEUE) @V4M0117 00718000
  742. L R3,=A(DMKSCHQ1) ADDRESS OF Q1 @V2B2638 00719000
  743. CR R2,R3 WAS USER ADDED TO Q1? @V2B2638 00720000
  744. MVI MN20XQNM,X'01' ASSUME SO @V2B2638 00721000
  745. BE NOTQ2AD ASSUMPTION CORRECT. @V2B2638 00722000
  746. MVI MN20XQNM,X'02' INDICATE ADD TO Q2 @V2B2638 00723000
  747. NOTQ2AD EQU * @V4075A4 00724000
  748. TM CPCREG8+3,SPROFCL SYSTEM PROFILE CLASS ACTIVE? @V2B2638 00725000
  749. BO MONCOD82 YES, MORE DATA TO COLLECT @V2B2638 00726000
  750. B EXIT2 NO, DONE WITH THIS LAP @V2B2638 00727000
  751. SPACE 5 00728000
  752. ******* 00729000
  753. * 00730000
  754. * CLASS 2 CODE 4, SCHEDULE, ADD USER TO ELIGABLE LIST 00731000
  755. * 00732000
  756. ******* 00733000
  757. SPACE 00734000
  758. MONCOD24 LA R0,MN204LEN LENGTH OF THIS RECORD @V2B2638 00735000
  759. B BAL22 JOIN COMMON CODE @V2B2638 00736000
  760. SPACE 1 00737000
  761. COD24 MVC MN204PRI,VMEPRIOR ELIGABLE LIST PRIORITY @V2B2638 00738000
  762. TM VMQLEVEL,VMQ1 TO BE ADDED TO Q1 ELIG. LIST? @V2B2638 00739000
  763. MVI MN20XQNM,X'01' ASSUME YES. @V2B2638 00740000
  764. BO EXIT2 ASSUMPTION CORRECT, DONE. @V2B2638 00741000
  765. MVI MN20XQNM,X'02' NO, Q2 ELIG. LIST @V2B2638 00742000
  766. TM VMQLEVEL,VMAEX HIGH PRIOR. Q2? @V2B2638 00743000
  767. BZ EXIT2 NO, DONE @V2B2638 00744000
  768. OI MN20XQNM,X'64' YES, 'OR' DEC 100 @V2B2638 00745000
  769. B EXIT2 DONE. @V2B2638 00746000
  770. EJECT 00747000
  771. ******* 00748000
  772. * 00749000
  773. * CLASS 3 CODE 0-1, TIMING, RECORD TIMING EVENTS 00750000
  774. * 00751000
  775. ******* 00752000
  776. SPACE 00753000
  777. MONCOD30 EQU * BEGIN AND END OF TIMING ARE SAME @V2B2638 00754000
  778. MONCOD31 LA R0,4 BASE REG DATA ONLY HERE. @V2B2638 00755000
  779. BAL R5,PREPREC GET SPACE & CREATE HEADER @V2B2638 00756000
  780. BAL R5,TSTSUSP @VA10215 00756500
  781. MVC 0(4,R1),MONREGS+R12*4 GET BASE REG AT MC TIME @V4M0117 00757000
  782. B EXIT2 DONE @V2B2638 00758000
  783. EJECT 00759000
  784. *. 00760000
  785. * 00761000
  786. * ENTRY POINT - 00762000
  787. * 00763000
  788. * DMKMON40 - COLLECT USER STATISTICS 00764000
  789. * 00765000
  790. * ENTRY CONDITIONS - 00766000
  791. * 00767000
  792. * GPR12 - ENTRY POINT 00768000
  793. * GPR13 - SAVE AREA 00769000
  794. * 00770000
  795. * EXIT CONDITIONS - 00771000
  796. * 00772000
  797. * NONE 00773000
  798. * 00774000
  799. * CALLS TO OTHER ROUTINES - 00775000
  800. * 00776000
  801. * NONE 00777000
  802. * 00778000
  803. * REGISTER USAGE - 00779000
  804. * 00780000
  805. * R0 - WORK REG 00781000
  806. * R1 - ADDRESS OF CURRENT BUFFER DATA ENTRY 00782000
  807. * R2-R4 - WORK REGS 00783000
  808. * R5 - LINK TO PREPREC 00784000
  809. * R6 - RETURN ADDRESS 00785000
  810. * R7 - WORK REG 00786000
  811. * R8 - VMBLOK 00787000
  812. * R9 - MONCOM 00788000
  813. * R10 - VMBLOK 00789000
  814. * R11 - NOT USED 00790000
  815. * R12 - ADDRESS OF DMKMON 00791000
  816. * R13 - SAVE AREA 00792000
  817. * R14-R15 - WORK REGS 00793000
  818. * 00794000
  819. * OPERATION - 00795000
  820. * 00796000
  821. * LIKE DMKMON00, THIS ENTRY POINT IS PROVIDED SO THAT 00797000
  822. * DMKMNITH CAN INVOKE THE USER DATA COLLECTION ROUTINE 00798000
  823. * WHEN THE MONITOR IS STARTED. BEGINNING WITH THE SYSTEM 00799000
  824. * VMBLOK, A RECORD IS WRITTEN FOR THE STATISTICS IN EACH 00800000
  825. * VMBLOK IN THE SYSTEM. 00801000
  826. * 00802000
  827. *. 00803000
  828. ******* 00804000
  829. * 00805000
  830. * CLASS 4 CODE 0, USER, COLLECT USER STATISTICS 00806000
  831. * 00807000
  832. ******* 00808000
  833. SPACE 00809000
  834. DMKMON40 RELOC EXTERNAL ENTRY FOR DMKMNITH @V4075A4 00810000
  835. LA R6,EXITP SET R6 WITH RET ADDR FOR COMPAT @V4075A4 00811000
  836. MONCOD40 OI MONFLAG1,MONSYSVM IND WORKING WITH SYS VMBLOK @V4075A4 00812000
  837. L R8,ASYSVM START WITH THE SYSTEM VMBLOK @V2B2638 00813000
  838. LR R0,R11 SAVE R11 VALUE @V4M0203 00814000
  839. LR R11,R8 SET UP R11 TEMPORARILY @V4M0203 00815000
  840. CHARGE SYNC SYNCHRONIZE TIMER @V4M0203 00816000
  841. LR R11,R0 RESTORE R11 @V4M0203 00817000
  842. B DOSYS COLLECT SYSTEM WITHOUT CHECK @V2B2638 00818000
  843. DROP R11 @V2B2638 00819000
  844. USING VMBLOK,R8 @V2B2638 00820000
  845. MOVUDATA DS 0H @V2B2638 00821000
  846. TM VMRSTAT,VMLOGON IS USER REALLY ON? @V2B2638 00822000
  847. BO SKIPUSER ONLY HALF THERE, SKIP HIM. @V2B2638 00823000
  848. DOSYS LA R0,MN400LEN LENGTH OF RECORD TO BE COLLECTED @V2B2638 00824000
  849. BAL R5,PREPREC GET SPACE & CREATE HEADER @V2B2638 00825000
  850. BAL R5,TSTSUSP1 @VA10215 00825500
  851. USING MN400,R1 ADDRESS THE BLOCK @V2B2638 00826000
  852. MVC MN400UID,VMUSER OBVIOUSLY WE NEED HIS ID @V2B2638 00827000
  853. MVC MN400TTI,VMTTIME SUPERVISOR TIME @V2B2638 00828000
  854. MVC MN400VTI,VMVTIME PROBLEM TIME @V2B2638 00829000
  855. MVC MN400PGR,VMPGREAD NO. OF PAGE READS @V2B2638 00830000
  856. MVC MN400PGW,VMPGWRIT NO. OF PAGE WRITES @V2B2638 00831000
  857. MVC MN400IOC,VMIOCNT VIRTUAL NON SPOOLED SIO CNT @V2B2638 00832000
  858. MVC MN400PNC,VMPNCH NO. OF CARDS PUNCHED @V2B2638 00833000
  859. MVC MN400LIN,VMLINS NO. OF LINES PRINTED @V2B2638 00834000
  860. MVC MN400CRD,VMCRDS NO. OF CARDS READ @V2B2638 00835000
  861. MVC MN400RST(4),VMRSTAT RSTAT, DSTAT, OSTAT, QSTAT @V2B2638 00836000
  862. MVC MN400PST(4),VMPSTAT PSTAT, ESTAT, TCNTL, MLEVL @V2B2638 00837000
  863. MVC MN400QLV(4),VMQLEVEL QLVL, CLEVL, TLEVL, PEND @V2B2638 00838000
  864. MVC MN400UPR,VMUPRIOR DIRECTORY OR 'SET' PRIORITY @V2B2638 00839000
  865. MVI MN4RSV1,X'00' RESERVED FIELD = 0 @V2B2638 00840000
  866. MVC MN400RES,VMPAGES NO. OF PAGES RESIDENT @V2B2638 00841000
  867. MVC MN400WSS,VMWSPROJ ESTIMATED WORKING SET SIZE @V2B2638 00842000
  868. MVC MN400PDR,VMPDRUM DRUM ALLOCATED PAGE FRAMES @V2B2638 00843000
  869. MVC MN400PDK,VMPDISK DISK ALLOCATED PAGE FRAMES @V2B2638 00844000
  870. L R2,=A(DMKPRGTI) ADDRESS OF THE INTERVAL @V2B2638 00845000
  871. MVC MN400INT,0(R2) INTERVAL BETWEEN DATA COLLECTIONS@V2B2638 00846000
  872. MVC MN400LPR,VMLSTPRC LAST PROBLEM STATE PU @V60BEBC 00846500
  873. SKIPUSER TM MONFLAG1,MONSYSVM WORKING WITH SYSTEM VMBLOK? @V4075A4 00847000
  874. BO SETEND YES, GO GET POINTER TO LAST USER @V4075A4 00848000
  875. CR R8,R10 NO RELOAD, USUAL CASE. DONE YET? @V2B2638 00849000
  876. BER R6 YUP, EXIT THEN. @V2B2638 00850000
  877. L R8,VMPNT NEXT, PLEASE. @V2B2638 00851000
  878. B MOVUDATA GO EXAMINE THIS USER. @V2B2638 00852000
  879. SPACE 00853000
  880. SETEND NI MONFLAG1,255-MONSYSVM NOT USING SYS VMBLOK @V4075A4 00854000
  881. L R10,VMPNT SYSTEM IS USER 0, LAST IS USER 1 @V4075A4 00855000
  882. LTR R10,R10 IS THE SYSTEM THE ONLY ONE ON? @V2B2638 00856000
  883. BZR R6 YES, THEN DONE NOW. @V2B2638 00857000
  884. L R8,VMPNT-VMBLOK(R10) AIM AT USER NO. 2 @V2B2638 00858000
  885. B MOVUDATA AND GO EXAMINE HIM. @V2B2638 00859000
  886. DROP R1,R8 @V2B2638 00860000
  887. USING VMBLOK,R11 @V2B2638 00861000
  888. EJECT 00862000
  889. ******* 00863000
  890. * 00864000
  891. * CLASS 5 CODE 0, INSTSIM, INSTRUCTION SIMULATION 00865000
  892. * 00866000
  893. ******* 00867000
  894. MONCOD50 LA R0,MN500LEN LENGTH OF THE RECORD @V2B2638 00868000
  895. BAL R5,PREPREC GET SPACE & CREATE HEADER @V2B2638 00869000
  896. BAL R5,TSTSUSP @VA10215 00869500
  897. USING MN500,R1 ADDRESS THE RECORD @V2B2638 00870000
  898. MVC MN500UID,VMUSER USERID ISSUING INSTRUCTION @V2B2638 00871000
  899. MVC MN500INS,VMINST GET THE INSTRUCTION @V2B2638 00872000
  900. MVC MN500VAD,VMPSW+4 GET THE VIRT INST. ADDR @V2B2638 00873000
  901. MVI MN500VAD,X'00' CLEAR TOP BYTE @V2B2638 00874000
  902. STPT MONCLOCK GET USERS CURRENT TOTAL TIME @V2B2638 00875000
  903. MVC MN500OVH,MONCLOCK MOVE IT INTO DATA RECORD @V2B2638 00876000
  904. B EXIT2 @V2B2638 00877000
  905. DROP R1 @V2B2638 00878000
  906. EJECT 00879000
  907. ******* 00880000
  908. * 00881000
  909. * CLASS 6 CODE 1, DASTAP, COLLECT DEVICE STATISTICS 00882000
  910. * 00883000
  911. * REGISTER USAGE IN THIS ROUTINE: 00884000
  912. * 00885000
  913. * R0 - DEVICE COUNT 00886000
  914. * R1 - CHANNEL INDEX 00887000
  915. * R2 - CONTROL UNIT INDEX 00888000
  916. * R3 - DEVICE INDEX 00889000
  917. * R4 - BXLE INCREMENT CONSTANT 00890000
  918. * R5 - BXLE COMPARAND VALUE 00891000
  919. * R6 - CHANNEL BLOCK ADDRESS / DEVICE TYPE BYTE 00892000
  920. * R7 - CONTROL UNIT BLOCK ADDRESS 00893000
  921. * R8 - DEVICE BLOCK ADDRESS 00894000
  922. * R9 - MONCOM ADDRESS 00895000
  923. * R10 - POINTER WITHIN DEVICE LIST FOR PASS 2 00896000
  924. * R11 - VMBLOCK ADDRESS 00897000
  925. * R12 - BASE REGISTER 00898000
  926. * R13 - NOT USED 00899000
  927. * R14 - DEVICE TYPE CHECK BYTE / BALR TO DMKFREE 00900000
  928. * R15 - POINTER WITHIN MN600 RECORD FOR PASS 2 00901000
  929. * 00902000
  930. ******* 00903000
  931. USING RDEVBLOK,R8 @V2B2638 00904000
  932. MONCOD61 LH R1,MONDVNUM GET THE NUMBER OF DEVICES @V2B2638 00905000
  933. MH R1,=AL2(MN600DLN) LENGTH OF EACH RECORD @V2B2638 00906000
  934. LA R0,MN600HLN(R1) PLUS LENGTH OF HDR -> R0 @V2B2638 00907000
  935. BAL R5,PREPREC GET SPACE AND CREATE REC HEADER @V2B2638 00908000
  936. BAL R5,TSTSUSP1 @VA10215 00908500
  937. USING MN600HDR,R1 @V4075A4 00909000
  938. LH R3,MONDVNUM GET THE NUMBER OF DEVICES @V2B2638 00910000
  939. STH R3,MN600NUM PUT IN THE BUFFER/USE IT FOR BCT @V2B2638 00911000
  940. LA R1,MN600HLN(R1) REPOSITION FIELD POINTER @V2B2638 00912000
  941. DROP R1 DROP HEADER DSECT @V2B2638 00913000
  942. USING MN600DEV,R1 SWITCH TO RECORD DSECT @V2B2638 00914000
  943. L R2,MONDVLST ADDRESSS OF DEVICE LIST @V2B2638 00915000
  944. USING RCUBLOK,R7 @V2B2638 00916000
  945. USING RCHBLOK,R5 @V2B2638 00917000
  946. MOVEADD L R8,0(R2) NEXT DEVICE BLOCK POINTER @V2B2638 00918000
  947. L R7,RDEVCUA PICK UP CONTROL UNIT ADDRESS @V2B2638 00919000
  948. MVC MN600ADD,RDEVADD GET THE DEVICE ADDRESS @V2B2638 00920000
  949. OC MN600ADD+1(1),RCUADD+1 AND CONTROL UNIT ADDR @V2B2638 00921000
  950. TM RCUTYPE,RCUSUB IS THIS A SUB-CONTROL BLOCK? @V2B2638 00922000
  951. BZ *+8 NOPE, CU BLOCK PTR IS OK AS IS @V2B2638 00923000
  952. L R7,RCUPRIME PICK UP ADDR OF THE PRIME CU @V2B2638 00924000
  953. L R5,RCUCHA PICK UP ADDR OF THE CH BLOCK @V2B2638 00925000
  954. OC MN600ADD(1),RCHADD ADD CHANNEL ADDRESS @V2B2638 00926000
  955. MVC MN600TY,RDEVTYPC DEVICE TYPE CODE @V2B2638 00927000
  956. MVC MN600SER,RDEVSER VOLUME SERIAL NUMBER @V2B2638 00928000
  957. MVC MN600CNT,RDEVIOCT I/O COUNT FOR THIS DEVICE @V2B2638 00929000
  958. LA R2,MNDEVLEN(R2) NEXT DEVICE BLOCK @V60BEBC 00930000
  959. LA R1,MN600DLN(R1) NEXT MONITOR RECORD FIELD @V2B2638 00931000
  960. BCT R3,MOVEADD GO DO THE NEXT DEVICE @V2B2638 00932000
  961. L R2,MONUTRB UTILIZATION ACTIVE?? @V60BEBC 00933000
  962. LTR R2,R2 WAS IT SPECIFIED? @V60BEBC 00933100
  963. BZR R6 NO, DON'T COLLECT DATA @V60BEBC 00933200
  964. L R3,MONCHPTR GET NUMBER OF SAMPLES @V60BEBC 00933300
  965. LH R3,0(R3) SAMPLES TO REG 3 @V60BEBC 00933400
  966. LTR R3,R3 ANY SAMPLES TAKEN SINCE LAST TIM@V60BEBC 00933500
  967. BZR R6 NO, DON'T COLLECT DATA @V60BEBC 00933600
  968. DROP R1,R5,R7,R8 @V2B2638 00934000
  969. EJECT 00935000
  970. *** @V60BEBC 00935070
  971. * @V60BEBC 00935140
  972. * CLASS 6, CODE 2, DASTAP, I/O UTILIZATION @V60BEBC 00935210
  973. * @V60BEBC 00935280
  974. *** @V60BEBC 00935350
  975. MONCOD62 LH R1,MONDVNUM GET NUMBER OF DEVICES @V60BEBC 00935420
  976. MH R1,=AL2(MN602DLN) LENGTH OF EACH RECORD @V60BEBC 00935490
  977. LA R0,2 SIMULATE CODE 2 @V60BEBC 00935560
  978. ST R0,MONCODE MONITOR CALL FOR DASTAP @V60BEBC 00935630
  979. LA R0,MN602HLN(R1) REC LENGTH PLUS HDR LENGTH TO R0@V60BEBC 00935700
  980. BAL R5,PREPREC GET SPACE AND CREATE HEADER @V60BEBC 00935770
  981. BAL R5,TSTSUSP1 @VA10215 00935810
  982. CALL DMKENT62 COLLECT UTILIZATION DATA @V60BEBC 00935840
  983. BR R6 RETURN @V60BEBC 00935910
  984. ******* 00936000
  985. * 00937000
  986. * CLASS 7 CODE 0, SEEKS, COLLECT DASD ARM MOVEMENT STATISTICS 00938000
  987. * 00939000
  988. ******* 00940000
  989. SPACE 00941000
  990. MONCOD70 LA R0,MN700LEN LENGTH OF THE RECORD @V2B2638 00942000
  991. BAL R5,PREPREC GET SPACE & CREATE HEADER @V2B2638 00943000
  992. BAL R5,TSTSUSP @VA10215 00943500
  993. USING MN700,R1 ADDRESS THE BLOCK @V2B2638 00944000
  994. MVC MN700UID,VMUSER REQUESTOR @V2B2638 00945000
  995. USING RCHBLOK,R6 @V2B2638 00946000
  996. USING RCUBLOK,R7 @V2B2638 00947000
  997. USING RDEVBLOK,R8 @V2B2638 00948000
  998. USING IOBLOK,R10 @V2B2638 00949000
  999. L R8,MONREGS+R8*4 RESTORE R8 TO VALUE AT MC TIME @V4M0117 00950000
  1000. L R10,MONREGS+R10*4 RESTORE R10 AS WELL @V4M0117 00951000
  1001. BAL R14,RDHEX GET REAL DEV ADDR IN HEX @VA03543 00952000
  1002. STH R2,MN700ADD PUT REAL DEV ADDR IN THE RECORD @VA03543 00953000
  1003. MVC MN700CYL,IOBCYL CYL SEEK ADD. @V2B2638 00954000
  1004. TM IOBFLAG,IOBPAG IS THIS A PAGING OPERATION @VA09047 00954100
  1005. BNO NOTPAGSK NO NOT PAGING OPERATION @VA09047 00954200
  1006. MVC MN700CYL,PAGECYL CYL SEEK ADDRESS @VA09047 00954300
  1007. NOTPAGSK DS 0H @VA09047 00954400
  1008. MVC MN700CCY,RDEVCYL CURRENT ARM POSITION @V2B2638 00955000
  1009. MVC MN700QDV,RDEVQCNT DEVICE QUEUED TASK COUNT @V2B2638 00956000
  1010. MVC MN700QCU,RCUQCNT+1 C.U. QUEUED TASK COUNT @V2B2638 00957000
  1011. MVC MN700QCH,RCHQCNT+1 CHANNEL QUEUED TASK CNT @V2B2638 00958000
  1012. TM RDEVFLAG,RDEVSKUP TEST SEEK DIRECTION FLAG @V2B2638 00959000
  1013. BZ SEKNOTUP GOING DOWN THE VOLUME @V2B2638 00960000
  1014. MVI MN700DIR,X'01' SET SEEK UP FLAG IN DATA RECORD @V2B2638 00961000
  1015. B EXIT2 DONE @V2B2638 00962000
  1016. SEKNOTUP MVI MN700DIR,X'00' SET SEEK DOWN FLAG @V2B2638 00963000
  1017. B EXIT2 DONE @V2B2638 00964000
  1018. SPACE 3 00965000
  1019. RDHEX EQU * CONVERT RDEVBLOK PTR TO HEX @VA03543 00966000
  1020. * REAL DEV ADDR 00967000
  1021. LH R2,RDEVADD GET DEVICE ADDRESS @VA03543 00968000
  1022. L R7,RDEVCUA ADDRESS OF CU BLOCK @VA03543 00969000
  1023. LH R3,RCUADD GET CU ADDRESS @VA03543 00970000
  1024. OR R2,R3 ADD CU ADDRESS TO DEV ADDRESS @VA03543 00971000
  1025. TM RCUTYPE,RCUSUB IS THIS A SUB CONTROL UNIT ? @VA03543 00972000
  1026. BZ *+8 NOPE, BRANCH @VA03543 00973000
  1027. L R7,RCUPRIME GET ADDRESS OF PRIME CU @VA03543 00974000
  1028. L R6,RCUCHA NOW GET ADDRESS OF CH BLOCK @VA03543 00975000
  1029. LH R3,RCHADD GET CHANNEL ADDRESS @VA03543 00976000
  1030. OR R2,R3 ADD IN CH ADDRESS @VA03543 00977000
  1031. BR R14 RETURN TO CALLER @VA03543 00978000
  1032. DROP R1,R6,R7,R8,R10 @VA03543 00979000
  1033. EJECT 00980000
  1034. ******* 00981000
  1035. * 00982000
  1036. * CLASS 8 CODE 2, SYSPROF, DEVICE STATISTICS AND SYSTEM CNTRS 00983000
  1037. * 00984000
  1038. ****** 00985000
  1039. SPACE 00986000
  1040. MONCOD82 LA R0,MNCLSYS SIMULATE SYSTEM PROFILE CLASS @VM01017 00987000
  1041. STH R0,MONCLASS ... @V2B2638 00988000
  1042. LA R0,MNCODA ... @VM01017 00989000
  1043. ST R0,MONCODE ... @V2B2638 00990000
  1044. LH R1,MONDVNUM NUMBER OF DEVICES @V2B2638 00991000
  1045. LR R6,R1 SAVE FOR BCT LOOP @V2B2638 00992000
  1046. SLL R1,2 4 BYTES PER DEVICE @V2B2638 00993000
  1047. LA R0,MN802DLN+MN802CLN(R1) XTRA DATA LEN -> R0 @V2B2638 00994000
  1048. BAL R5,PREPREC GET SPACE AND CREATE HEADER @V2B2638 00995000
  1049. BAL R5,TSTSUSP @VA10215 00995500
  1050. USING MN802DEV,R1 ADDRESS THE DEVICE PORTION @V2B2638 00996000
  1051. STH R6,MN802NUM NUMBER OF DEV. INTO THE REC @V2B2638 00997000
  1052. L R2,MONDVLST START OF DEVICE ADD. LIST @V2B2638 00998000
  1053. MOVEADDR L R8,0(R2) PICK UP RDEVBLOK ADDRESS @V2B2638 00999000
  1054. USING RDEVBLOK,R8 ADDRESS THE RDEVBLOK @V2B2638 01000000
  1055. MVC MN802CNT,RDEVIOCT COUNT OF I/O TO THIS DEVICE @V2B2638 01001000
  1056. LA R1,4(,R1) BUMP TO NEXT DATA SLOT @V2B2638 01002000
  1057. LA R2,MNDEVLEN(R2) BUMP TO NEXT DEVICE @V60BEBC 01003000
  1058. BCT R6,MOVEADDR DO THE NEXT DEVICE @V2B2638 01004000
  1059. LA R1,MN802DLN(R1) READJUST BUFFER POINTER @V2B2638 01005000
  1060. DROP R1,R8 @V2B2638 01006000
  1061. SPACE 3 01007000
  1062. USING MN802CTR,R1 ADDRESS THE REMAINDER OF THE REC @V2B2638 01008000
  1063. L R2,=A(DMKSYSNM) @V2B2638 01009000
  1064. MVC MN802NAU,0(R2) NO. OF LOGGED ON USERS @V2B2638 01010000
  1065. MVC MN802PGR,PGREAD NO. OF SYSTEM PAGE READS @V2B2638 01011000
  1066. MVC MN802PGW,PGWRITE NO. OF SYSTEM PAGE WRITES @V2B2638 01012000
  1067. L R2,=A(DMKDSPNP) @V2B2638 01013000
  1068. MVC MN802NPP,0(R2) NO. OF SYSTEM PAGABLE PAGES @V2B2638 01014000
  1069. MVC MN802WID,IDLEWAIT SYSTEM IDLE WAIT TIME @V2B2638 01015000
  1070. MVC MN802WPG,PAGEWAIT SYSTEM PAGE WAIT TIME @V2B2638 01016000
  1071. MVC MN802WIO,IONTWAIT SYSTEM I/O WAIT TIME @V2B2638 01017000
  1072. MVC MN802PRB,PROBTIME SYSTEM PROBLEM TIME @V2B2638 01018000
  1073. B EXIT2 @V2B2638 01019000
  1074. DROP R1 @V2B2638 01020000
  1075. EJECT 01021000
  1076. *. 01022000
  1077. * 01023000
  1078. * THE FOLLOWING TABLE IS FOR THE TABLE DRIVEN MONITOR 01024000
  1079. * DATA COLLECTOR. 01025000
  1080. * 01026000
  1081. * IT IS IMPERATIVE THAT THE ORDER OF THIS TABLE REMAIN 01027000
  1082. * INTACT. 01028000
  1083. * CHANGING THE TABLE WILL AFFECT THE TAPE RECORD 01029000
  1084. * FORMAT, THEREBY AFFECTING ANY AND ALL DATA REDUCTION 01030000
  1085. * PROGRAMS DEPENDENT UPON THE TAPE FORMAT. 01031000
  1086. * 01032000
  1087. * THE FOLLOWING EXTRNS IDENTIFY OTHER EXTERNAL REFERENCES 01033000
  1088. * WHICH CONTAIN MONITOR DATA, BUT THE DATA COLLECTION 01034000
  1089. * IS NOT TABLE DRIVEN. 01035000
  1090. SPACE 01036000
  1091. EXTRN DMKDSPNP NUMBER OF SYSTEM PAGABLE PAGES @V2B2638 01037000
  1092. EXTRN DMKSCHPU SUM OF WORKING SETS OF IN Q USERS@V2B2638 01038000
  1093. EXTRN DMKSCHW1 NUMBER OF USERS ELIGABLE FOR Q1 @V2B2638 01039000
  1094. EXTRN DMKSCHW2 NUMBER OF USERS ELIGABLE FOR Q2 @V2B2638 01040000
  1095. EXTRN DMKSCHN1 NUMBER OF USERS IN Q1 @V2B2638 01041000
  1096. EXTRN DMKSCHN2 NUMBER OF USERS IN Q2 @V2B2638 01042000
  1097. EXTRN DMKSCHQ1 ADDRESS OF Q1 USER BEING ADDED @V2B2638 01043000
  1098. EXTRN DMKSCHAL QUEUE DROP FLAG (REASON FOR DROP)@V2B2638 01044000
  1099. EXTRN DMKCPEID SOFTWARE SYSTEM LEVEL @V2B2638 01045000
  1100. EXTRN DMKSYSOC SYSTEM OWNED VOLUME COUNT @V2B2638 01046000
  1101. EXTRN DMKSYSOW SYSTEM OWNED VOLUME LIST @V2B2638 01047000
  1102. EXTRN DMKSYSNM NO. OF USERS LOGGED ON THE SYSTEM@V2B2638 01048000
  1103. SPACE 5 01049000
  1104. EJECT 01050000
  1105. *. 01051000
  1106. * 01052000
  1107. * ENTRY POINT - 01053000
  1108. * 01054000
  1109. * DMKMONPR - ALLOCATE A MONITOR RECORD IN THE CURRENT BUFFER 01055000
  1110. * 01056000
  1111. * ENTRY CONDITIONS - 01057000
  1112. * 01058000
  1113. * GPR0 - LENGTH OF REQUESTED RECORD 01059000
  1114. * GPR9 - ADDRESS OF MONCOM 01060000
  1115. * GPR12 - ADDRESS OF ENTRY POINT 01061000
  1116. * GPR13 - ADDRESS OF STANDARD SAVE AREA 01062000
  1117. * 01063000
  1118. * EXIT CONDITIONS - 01064000
  1119. * 01065000
  1120. * GPR0 - ADDRESS OF DMKMONIO 01066000
  1121. * GPR1 - POINTER TO ALLOCATED RECORD 01067000
  1122. * OR AS A CONDITION CODE, 0 ON SUSPEND 01067500
  1123. * GPR5 - CONTENTS NOT SAVED BY DMKMONPR 01068000
  1124. * 01069000
  1125. * CALLS TO OTHER ROUTINES 01070000
  1126. * 01071000
  1127. * DMKIOSQR - TO INITIATE I/O FOR JUST FILLED DATA PAGE 01072000
  1128. * 01073000
  1129. * REGISTER USAGE - 01074000
  1130. * 01075000
  1131. * OPERATION - 01076000
  1132. * 01077000
  1133. * MONITOR RECORD ALLOCATION 01078000
  1134. * 01079000
  1135. * DMKMONPR IS CALLED EXTERNALLY VIA SVC, AND INTERNALLY, VIA 01080000
  1136. * BAL AS ROUTINE 'PREPREC' IN ORDER TO ALLOCATE A MONITOR 01081000
  1137. * RECORD FROM THE CURRENT BUFFER. 01082000
  1138. * R0 - WORK REG 01083000
  1139. * R1 - WORK REG 01084000
  1140. * R2 - RECORD LENGTH + HEADER 01085100
  1141. * R3 - WORK REG 01086000
  1142. * R4 - WORK REG 01087000
  1143. * R5 - RETURN ADDRESS 01088000
  1144. * R6 - LINK TO PAGEFULL SUBROUTINE 01089000
  1145. * R7 - RETURN CODE FROM PAGEFULL 01090000
  1146. * R8 - ADDRESS OF ABSOLUTE PSA 01091000
  1147. * R9 - ADDRESS OF MONCOM 01092000
  1148. * R10 - ADDRESS OF IOB 01093000
  1149. * R11 - USED TO SAVE ADDR OF CURRENT RECORD FOR USE LATER 01094000
  1150. * R12 - ADDRESS OF DMKMON 01095000
  1151. * R13 - ADDRESS OF SAVEAREA 01096000
  1152. * R14 - WORK REG 01097000
  1153. * R15 - WORK REG 01098000
  1154. * 01099000
  1155. * 01100000
  1156. * ALL ENTRIES TO DMKMON ARE UNDER THE SYSTEM LOCK, EXCEPT ONE, 01101000
  1157. * WHICH IS THE SEEKS CLASS MONITOR CALL. THE ONLY SERIALIZATION 01102000
  1158. * PROBLEM IS IN ALLOCATING A RECORD FROM THE CURRENT BUFFER AND 01103000
  1159. * SCHEDULING A BUFFER TO BE WRITTEN TO TAPE. 01104000
  1160. * 01105000
  1161. * THE PROBLEM OF ALLOCATING A RECORD IS SOLVED BY USING COMPARE- 01106000
  1162. * AND-SWAP TO UPDATE MONNEXT TO POINT TO THE NEXT FREE BYTE 01107000
  1163. * IN THE CURRENT BUFFER. IF BOTH PROCESSORS TRY TO ALLOCATE 01108000
  1164. * A RECORD AT THE SAME TIME, ONLY ONE PROCESSOR'S CS WILL 01109000
  1165. * SUCCEED. THE OTHER WILL FAIL, CAUSING THE PROCESSOR TO 01110000
  1166. * START OVER THE PROCESS, WHICH WILL CAUSE IT TO PICK UP THE 01111000
  1167. * NEW VALUE OF MONNEXT SET BY THE OTHER PROCESSOR. 01112000
  1168. * 01113000
  1169. * THE PROBLEM OF SCHEDULING A BUFFER TO BE WRITTEN TO TAPE IS 01114000
  1170. * SOLVED BY USING COMPARE-AND-SWAP TO SET AN INDICATION THAT 01115000
  1171. * THE CURRENT BUFFER IS BEING SCHEDULED FOR I/O. IF BOTH 01116000
  1172. * PROCESSOR'S TRY TO DO THIS AT THE SAME TIME, ONE WILL SUCCEED 01117000
  1173. * AND CONTINUE ON WITH SCHEDULE I/O PROCESSING. THE OTHER WILL 01118000
  1174. * FAIL AND GO BACK TO RETRY ALLOCATING A RECORD. THE FIELDS IN 01119000
  1175. * MONCOM RELATING TO WHICH BUFFER IS CURRENT AND THE BUFFER 01120000
  1176. * STATE BITS CAN BE UPDATED WITHOUT COMPARE-AND-SWAP BECAUSE THE 01121000
  1177. * INITIAL CS WILL ONLY PERMIT ONE PROCESSOR TO TAKE THE PATH 01122000
  1178. * WHICH UPDATES THESE FIELDS. 01123000
  1179. * 01124000
  1180. * THE FIELD MONIOBF IS ZERO IF NO MONITOR I/O IS ACTIVE, 01125000
  1181. * A POSITIVE ADDRESS IF I/O IS ACTIVE, AND A NEGATIVE ADDRESS 01126000
  1182. * IF I/O IS PENDING AS WELL AS ACTIVE. BECAUSE ONE PROCESSOR 01127000
  1183. * CAN BE CAUSING A BUFFER TO BE SCHEDULED FOR I/O WHILE AN I/O 01128000
  1184. * INTERRUPT FROM ANOTHER BUFFER IS BEING PROCESSED ON THE OTHER 01129000
  1185. * PROCESSOR, MONIOBF MUST BE UPDATED VIA COMPARE-AND-SWAP. 01130000
  1186. * IF A CS FAILS, THE OTHER PROCESSOR HAS CAUSED THE I/O STATUS 01131000
  1187. * TO CHANGE, SO THAT STATUS MUST BE RE-EVALUATED. 01132000
  1188. * 01133000
  1189. * DMKMONPR: 01134000
  1190. * 01135000
  1191. * SET R5 TO POINT TO AN EXIT MACRO. R5 IS THE RETURN 01136000
  1192. * ADDRESS TO BE COMPATIBLE WITH INTERNAL USE OF 01137000
  1193. * PREPREC. GO TO PREPRECR (PREPREC MAINLINE). 01138000
  1194. * 01139000
  1195. * PREPREC: 01140000
  1196. * 01141000
  1197. * PREPREC IS INTERNAL ENTRY POINT. GET ADDRESS OF 01142000
  1198. * A SAVE AREA, (THERE'S ONE FOR EACH PROCESSOR), SAVE 01143000
  1199. * CALLER'S R13 IN IT, AND PUT ADDRESS OF SAVE AREA IN R13. 01144000
  1200. * 01145000
  1201. * PREPRECR: 01146000
  1202. * 01147000
  1203. * THIS IS WHERE EXTERNAL AND INTERNAL ENTRY POINTS JOIN. 01148000
  1204. * IF NOT SPECIAL 1-BUFFER CASE, GO TO CHKROOM. OTHERWISE 01149000
  1205. * MAKE SURE TAPE IS NOT BUSY. IF ONLY 1 BUFFER IS BEING 01150000
  1206. * USED AND TAPE IS STILL WRITING IT OUT, MONITOR 01151000
  1207. * SUSPENSION IS NECESSARY SO GO TO SUSPEND1. 01152000
  1208. * 01153000
  1209. * CHKROOM: 01154000
  1210. * 01155000
  1211. * ADD LENGTH OF RECORD REQUESTED TO MONNEXT TO SEE IF 01156000
  1212. * REQUESTED RECORD LENGTH WILL FIT IN THE CURRENT BUFFER. 01157000
  1213. * IF IT WILL, GO TO PREPCOM TO ALLOCATE IT. IF NOT, GO 01158000
  1214. * TO CLPGFULL TO INVOKE THE PAGE FULL ROUTINE. FOR THE 01159000
  1215. * 1-BUFFER CASE, AN ADDITIONAL CHECK IS MADE TO ENSURE 01160000
  1216. * THAT ANOTHER PERFORM RECORD CAN FIT. IF IT CANNOT, 01161000
  1217. * PAGEFULL IS INVOKED NOW TO MAKE ROOM FOR IT. 01162000
  1218. * 01163000
  1219. * CLPGFULL: 01164000
  1220. * 01165000
  1221. * MAKE SURE OTHER PROCESSOR HAS NOT CAUSED SUSPENSION, 01166000
  1222. * IF IT HAS, GO TO SUSPEXIT TO EXIT. MAKE SURE OTHER 01167000
  1223. * PROCESSOR IS NOT IN THE PROCESS OF SCHEDULING I/O, IF 01168000
  1224. * IT IS, GO BACK TO CHKROOM TO RETRY. BRANCH AND LINK 01169000
  1225. * TO PAGEFULL. IF PAGEFULL RETURNS A NON-ZERO RETURN 01170000
  1226. * CODE, THE OTHER PROCESSOR SCHEDULED THE I/O ALREADY, 01171000
  1227. * SO RETURN TO CHKROOM TO RETRY. 01172000
  1228. * 01173000
  1229. * PREPCOM: 01174000
  1230. * 01175000
  1231. * CLAIM THE SLOT THAT'S BEEN ALLOCATED IN THE BUFFER 01176000
  1232. * BY SETTING A NEW VALUE OF MONNEXT JUST BEYOND IT. 01177000
  1233. * IN THE AP CASE, A COMPARE-AND-SWAP IS USED TO DO THIS. 01178000
  1234. * IF THE CS FAILS, THE OTHER PROCESSOR HAS CLAIMED THE 01179000
  1235. * SAME SLOT THAT THIS PROCESSOR THOUGHT WAS AVAILABLE, 01180000
  1236. * AND SO IT IS NECESSARY TO GO BACK TO CHKROOM TO 01181000
  1237. * START OVER. OTHERWISE, THE STANDARD HEADER IS FILLED 01182000
  1238. * IN, THE REGISTERS ARE RESTORED, AND CONTROL IS RETURNED 01183000
  1239. * TO THE CALLER, EITHER VIA BR OR SVC 12. 01184000
  1240. * 01185000
  1241. * PAGEFULL: 01186000
  1242. * 01187000
  1243. * FOR AP, TO FORCE ALL OTHER ATTEMPTS TO GET SPACE 01188000
  1244. * IN THIS BUFFER TO FAIL, AND TO INDICATE THAT THE 01189000
  1245. * BUFFER IS BEING SCHEDULED FOR I/O, USE COMPARE-AND-SWAP 01190000
  1246. * TO PUT THE CURRENT VALUE OF PAGEND (THE LAST BYTE 01191000
  1247. * IN THE BUFFER) INTO MONNEXT. IF THE CS FAILS, THE 01192000
  1248. * OTHER PROCESSOR IS SCHEDULING THE I/O, SO SET THE 01193000
  1249. * RETRY CONDITION CODE AND RETURN TO THE CALLER. 01194000
  1250. * OTHERWISE CONTINUE. 01195000
  1251. * 01196000
  1252. * CHKTAPE: 01197000
  1253. * 01198000
  1254. * GET THE CURRENT VALUE OF MONIOBF, THE POINTER TO THE 01199000
  1255. * BUFFER CURRENTLY BEING WRITTEN, IF ANY. IF MONIOBF IS 01200000
  1256. * ZERO, THEN NO I/O IS CURRENTLY ACTIVE, AND THIS I/O CAN 01201000
  1257. * BE SCHEDULED WITHOUT FEAR OF AN I/O INTERRUPT COMING 01202000
  1258. * FROM THE TAPE. IF MONIOBF IS A POSITIVE ADDRESS, THEN 01203000
  1259. * I/O IS ACTIVE, BUT NO FURTHER I/O IS PENDING. AN AP 01204000
  1260. * INTERACTION IS POSSIBLE IF THE INTERRUPT FROM THIS I/O 01205000
  1261. * COMES IN ON THE OTHER PROCESSOR WHILE THE I/O IS BEING 01206000
  1262. * MADE POSSIBLE ON THIS PROCESSOR. IF MONIOBF IS 01207000
  1263. * NEGATIVE, THE COMPLEMENT OF THE ADDRESS OF THE BUFFER 01208000
  1264. * BEING WRITTEN OUT, THEN AT LEAST ONE BUFFER IS WAITING 01209000
  1265. * TO BE WRITTEN OUT, AS WELL AS THE ONE BEING WRITTEN OUT. 01210000
  1266. * IN THIS CASE, NOTHING NEEDS TO BE DONE WITH THE TAPE. 01211000
  1267. * WHEN THE TWO BUFFERS ALREADY WAITING ARE WRITTEN OUT, 01212000
  1268. * THIS ONE WILL BE PICKED UP AND WRITTEN AUTOMATICALLY. 01213000
  1269. * 01214000
  1270. * IF MONIOBF = 0, THEN GO TO SCHEDIO TO SCHEDULE THE 01215000
  1271. * BUFFER TO BE WRITTEN OUT. 01216000
  1272. * 01217000
  1273. * IF MONIOBF > 0 THEN COMPLEMENT MONIOBF AND TRY TO 01218000
  1274. * SWAP COMPLEMENTED VALUE BACK IN, TO INDICATE THAT I/O 01219000
  1275. * IS NOW PENDING. IF THIS SUCCEEDS, GO TO GTNXTBUF. 01220000
  1276. * OTHERWISE, I/O INTERRUPT HAS COME IN, MONIOBF IS NOW 01221000
  1277. * ZERO, GO BACK TO TAPECS TO RE-EVALUATE. 01222000
  1278. * 01223000
  1279. * IF MONIOBF < 0 THEN GO TO GTNXTBUF. 01224000
  1280. * 01225000
  1281. * SCHEDIO: 01226000
  1282. * 01227000
  1283. * SET NEW VALUE OF MONIOBF TO INDICATE THAT TAPE IS BUSY. 01228000
  1284. * SET UP IOB FOR BUFFER WRITE. CALL IOS VIA A CPEXBLOK. 01229000
  1285. * 01230000
  1286. * GTNXTBUF: 01231000
  1287. * 01232000
  1288. * GET THE ADDRESS OF THE NEXT BUFFER, WRAPPING TO THE 01233000
  1289. * FIRST BUFFER IF NECESSARY. IF THE BUFFER IS 01234000
  1290. * AVAILABLE, MARK IT AS THE ACTIVE COLLECTOR, SET 01235000
  1291. * UP THE NEW MONCRBUF, MONNEXT, AND PAGEND VALUES, AND 01236000
  1292. * THEN RETURN TO THE CALLER OF PAGEFULL. IF THE BUFFER 01237000
  1293. * IS NOT AVAILABLE, THEN CHECK IF THIS IS THE ONE-BUFFER 01238000
  1294. * CASE. IF IT IS, LACK OF AN AVAILABLE BUFFER IS OKAY, SO 01239000
  1295. * RETURN. OTHERWISE, GO TO SUSPEND1 TO SUSPEND THE 01240000
  1296. * MONITOR. 01241000
  1297. * 01242000
  1298. * SUSPEND1: 01243000
  1299. * 01244000
  1300. * SET THE SUSPEND FLAG, ZERO OUT MC MASKS IN BOTH PSAS, 01245000
  1301. * INCREMENT THE SUSPEND COUNT, RECORD THE TOD OF SUSPEND. 01246000
  1302. * IF ENTERED FROM TIMER INTERRUPT, RETURN TO CALLER OF 01247000
  1303. * PREPREC. OTHERWISE EXIT TO DISPATCHER. 01248000
  1304. * 01249000
  1305. SPACE 01250000
  1306. DMKMONPR RELOC @V4075A4 01251000
  1307. LA R5,EXITP GET RETURN ADD FOR EXT ENTRY @V4075A4 01252000
  1308. ST R5,SAVER5 PUT RETURN ADDR IN SAVE AREA @V4075A4 01253000
  1309. ST R13,SAVEWRK1 SAVE R13 @V4075A4 01254000
  1310. LA R1,DMKMONIO GET ADDRESS OF I/O INT HANDLER @V4M0118 01255000
  1311. ST R1,R0*4+SAVEREGS RETURN IT TO EXT CALLER @V4M0118 01256000
  1312. B PREPRECR SKIP AROUND SAVE AREA MANIP @V4075A4 01257000
  1313. PREPREC TM APSTAT1,PROCIO AM I THE APU? @V4075A4 01258000
  1314. BZ APUSAVE YES, SAVE REGS IN APU SAVE AREA @V4075A4 01259000
  1315. LA R15,MONSAVE1 GET ADDRESS OF CPU'S SAVE AREA @V4075A4 01260000
  1316. B STOREGS CONTINUE WITH PREPREC PROCESSING @V4075A4 01261000
  1317. APUSAVE LA R15,MONSAVE2 GET ADDRESS OF APU'S SAVE AREA @V4075A4 01262000
  1318. STOREGS STM R0,R11,16(R15) SAVE REGS IN APPROP SAVE AREA @V4075A4 01263000
  1319. ST R13,12(R15) SAVE CALLER'S R13 @V4075A4 01264000
  1320. LR R13,R15 TRANSFER SAVE AREA ADDR TO R13 @V4075A4 01265000
  1321. PREPRECR TM MONFLAG1,MON1BUF SPECIAL 1-BUFFER CASE? @V4075A4 01266000
  1322. BZ CHKROOM NO, SKIP SPECIAL CHECK @V4075A4 01267000
  1323. L R2,MONIOBF IF 1-BUFFER CASE AND I/O IS @V4075A4 01268000
  1324. LTR R2,R2 STILL ACTIVE, @V4075A4 01269000
  1325. BNZ SUSPEND1 THEN ABANDON ALL HOPE @V4075A4 01270000
  1326. CHKROOM LR R2,R0 LENGTH OF RECORD REQ'D TO R2 @V4075A4 01271000
  1327. LA R2,MNHDRLEN(R2) ADD IN STD HEADER LENGTH @V4075A4 01272000
  1328. CHKROOM1 DS 0H @VA09843 01272500
  1329. L R8,PREFIXA GET ADDRESSABILITY TO ABS PSA @V4075A4 01273000
  1330. L R3,MONNEXT(R8) POINT TO NEXT AVAIL BUFFER SLOT @V4075A4 01274000
  1331. LR R11,R3 SAVE ADDR OF CURR REC FOR LATER @V4M0153 01275000
  1332. LA R4,0(R2,R3) R4 -> FUTURE NEXT AVAIL SLOT @V4075A4 01276000
  1333. C R4,PAGEND(R8) DOES RECORD FIT IN BUFFER? @V4075A4 01277000
  1334. BNL CLPGFULL NO, CALL PAGE FULL ROUTINE @V4075A4 01278000
  1335. TM MONFLAG1,MON1BUF IS THIS 1-BUFFER CASE? @V4075A4 01279000
  1336. BZ PREPCOM NO, NO SPECIAL TEST NEEDED @V4075A4 01280000
  1337. LA R1,MNHDRLEN+MN000LEN(R4) IS THERE ROOM FOR @V4075A4 01281000
  1338. * ANOTHER PERFORM RECORD? 01282000
  1339. TM APSTAT1,APUOPER IS THERE THE APU RECORD @V4M0135 01283000
  1340. BZ NOAPU TO WORRY ABOUT? @V4M0135 01284000
  1341. LA R1,MNHDRLEN+MN001LEN(R1) YES, ADD IT IN @V4M0135 01285000
  1342. NOAPU EQU * @V4M0135 01286000
  1343. C R1,PAGEND(R8) IF NOT, SCHEDULE I/O NOW @V4075A4 01287000
  1344. BNH PREPCOM IT WILL FIT, XFER TO NORM PATH @V4075A4 01288000
  1345. CLPGFULL TM MONFLAG2,SUSPEND HAS OTHER PU CAUSED SUSP? @V4075A4 01289000
  1346. BNZ SUSPEXIT YES, IGNORE THIS MONITOR CALL @V4075A4 01290000
  1347. TM MONFLAG3,CLSUS+SPOOLED SPOOLING AND CLOSE SUSP @V50A2B5 01291000
  1348. BO SUSPEXIT YES @V50A2B5 01292000
  1349. CLC PAGEND-IPLPSW(4,R8),MONNEXT-IPLPSW(R8) DOES @V4075A4 01293000
  1350. * MONNEXT INDICATE THAT OTHER PU 01294000
  1351. * IS SCHEDULING I/O ? 01295000
  1352. BE CHKROOM1 YES, RETURN @VA09843 01296100
  1353. BAL R6,PAGEFULL GO SCHED I/O AND GET NEXT BUFF @V4075A4 01297000
  1354. LTR R7,R7 CHECK RESULTS OF PAGEFULL @V4075A4 01298000
  1355. BNZ CHKROOM1 OTHER PU INTERFERRED. TRY AGAIN @VA09843 01299100
  1356. TM MONFLAG1,CFSTOP WAS MONITOR STOPPED ? @V4M0238 01300000
  1357. BO PRRET YES - MONITOR WILL NOT USE THIS @V4M0238 01301000
  1358. * RECORD NOW. TRAILER RCD WILL BE @V4M0238 01302000
  1359. * WRITTEN IN THIS BUFFER WHEN I/O @V4M0238 01303000
  1360. * COMPLETES FOR THE LAST RECORD. @V4M0238 01304000
  1361. LA R4,0(R2,R3) COMPUTE FUTURE VALUE OF MONNEXT @V4075A4 01305000
  1362. PREPCOM TM APSTAT1,APUOPER IS APU OPERATIONAL? @V4075A4 01306000
  1363. BZ NOCS1 NO, NO COMPARE-AND-SWAP NEEDED @V4075A4 01307000
  1364. CS R3,R4,MONNEXT-IPLPSW(R8) CLAIM THE SLOT @V4075A4 01308000
  1365. BNZ CHKROOM1 OTHER PU GOT IT. GO GET ANOTHER @VA09843 01309100
  1366. B NOST1 BRANCH AROUND STORE @V4075A4 01310000
  1367. NOCS1 ST R4,MONNEXT SET NEW MONNEXT VALUE (UP MODE) @V4075A4 01311000
  1368. NOST1 EQU * @V4075A4 01312000
  1369. LA R1,MNHDRLEN(R3) SET R1 PAST HEADER FOR CALLER @V2B2638 01313000
  1370. USING MNHDR,R3 DSECT FOR HEADER @V2B2638 01314000
  1371. SLL R2,16 RECORD SIZE TO TOP HALF @V2B2638 01315000
  1372. ST R2,MNHRECSZ RECORD SIZE AND ZERO @V2B2638 01316000
  1373. MVC MNHCLASS,MONCLASS+1 CLASS AND CODE FROM ... @V2B2638 01317000
  1374. MVC MNHCODE,MONCODE+2 ... LOW CORE @V2B2638 01318000
  1375. STCK MONCLOCK GET TIME OF DAY @V2B2638 01319000
  1376. BC 3,DOWNWEGO CLOCK NOT FUNCTIONING @VA04301 01320000
  1377. MVC MNHTOD(5),MONCLOCK+1 5 BYTES = 16 U-SEC ACCUR @V2B2638 01321000
  1378. ST R1,SAVER1 SET RETURN R1 VALUE @V4075A4 01322000
  1379. PRRET EQU * NO DATA WRITTEN TO NEW BUFFER @V4M0238 01323000
  1380. LM R0,R11,16(R13) REST REGS FROM APPROP SAVE AREA @V4075A4 01324000
  1381. L R13,SAVEWRK1 RESTORE R13 @V4075A4 01325000
  1382. BR R5 RETURN TO CALLER @V2B2638 01326000
  1383. DROP R3 @V2B2638 01327000
  1384. EXITP EXIT RETURN TO EXTERNAL CALLER @V4075A4 01328000
  1385. SPACE 1 01329000
  1386. EJECT 01330000
  1387. ****** 01331000
  1388. * 01332000
  1389. * PAGEFULL - THIS ROUTINE CALLS IOS TO WRITE OUT BUFFER, 01333000
  1390. * AND UPDATES THE BUFFER CONTROL POINTERS 01334000
  1391. * 01335000
  1392. * REGS ON ENTRY - 01336000
  1393. * R2 - RECORD LENGTH + HEADER 01336100
  1394. * R3 - CURRENT VALUE OF MONNEXT 01337000
  1395. * R5 - PREPREC'S RETURN ADDRESS 01338000
  1396. * R6 - PAGEFULL'S RETURN ADDRESS 01339000
  1397. * R8 - ADDRESS OF ABSOLUTE PSA 01340000
  1398. * R9 - ADDRESS OF MONCOM 01341000
  1399. * 01342000
  1400. * REGS ON EXIT - 01343000
  1401. * R2 - MUST REMAIN AS IS RECORD LENGTH + HEADER 01343100
  1402. * R7 - RETURN CODE 01344000
  1403. * 0 - I/O SCHEDULED AND NEXT BUFFER OBTAINED 01345000
  1404. * 4 - OTHER PROCESSOR SCHEDULED I/O, RETRY 01346000
  1405. * 01347000
  1406. ****** 01348000
  1407. SPACE 01349000
  1408. PAGEFULL L R4,PAGEND(R8) R4 -> LAST BYTE IN CUR BUFF @V4075A4 01350000
  1409. TM APSTAT1,APUOPER APU OPERATIONAL? @V4075A4 01351000
  1410. BZ NOCS2 NO, USE STORE INSTEAD OF CS @V4075A4 01352000
  1411. CS R3,R4,MONNEXT-IPLPSW(R8) SWAP IT IN TO MONNEXT @V4075A4 01353000
  1412. * INDICATE THAT SCHEDULE OF 01354000
  1413. * I/O IS IN PROGRESS 01355000
  1414. BZ PREPWRIT CS SUCCESSFUL, CONTINUE @V4075A4 01356000
  1415. LA R7,4 OTHER PROCESSOR DID IT, SO @V4075A4 01357000
  1416. * RETURN RETRY INDICATION 01358000
  1417. BR R6 RETURN TO CALLER @V4075A4 01359000
  1418. NOCS2 ST R4,MONNEXT IND THAT I/O IS BEING SCHED (UP) @V4075A4 01360000
  1419. PREPWRIT L R4,MONCURBF GET ADDRESS OF CURRENT BUFFER @V4075A4 01361000
  1420. TM MONFLAG3,SPOOLED ARE WE SPOOLED @V50A2B5 01362000
  1421. BNO NOSPL004 NO @V50A2B5 01363000
  1422. NI 8(R4),MONBUFIO FLAG BUF 'SCHEDULED FOR IO'@V50A2B5 01364000
  1423. B NOSPL005 @V50A2B5 01365000
  1424. NOSPL004 NI 2(R4),MONBUFIO FLAG BUF 'SCHEDULED FOR IO'@V50A2B5 01366000
  1425. NOSPL005 EQU * @V50A2B5 01367000
  1426. SR R3,R4 CALC RECORD LENGTH TO BE WRITTEN @V4075A4 01368000
  1427. TM MONFLAG1,MON1BUF SPECIAL ONE-BUFFER CASE? @V4075A4 01369000
  1428. BZ CHKTAPE NO, LENGTH COMPUTED IS CORRECT @V4075A4 01370000
  1429. AR R3,R2 YES, ADD IN LENGTH OF @V4075A4 01371000
  1430. * CURRENT PERF RECORD 01372000
  1431. CHKTAPE TM MONFLAG3,SPOOLED IS THIS IO TO BE SPOOLED? @V50A2B5 01373000
  1432. BNO NOSPLCHK NO SPECIAL PROCESSING @V50A2B5 01374000
  1433. LA R7,X'10'(R0) COMPUTE THE LENGTH @V50A2B5 01375000
  1434. SR R3,R7 @V50A2B5 01376000
  1435. STH R3,0(R7,R4) PUT IN THE RECORD @V50A2B5 01377000
  1436. B RESMCOM @V50A2B5 01378000
  1437. NOSPLCHK STH R3,0(R4) @V50A2B5 01379000
  1438. * (STD VB FORMAT) 01380000
  1439. RESMCOM EQU * @V50A2B5 01381000
  1440. TAPECS L R1,MONIOBF GET ADDR OF BUFF BEING WRITTEN @V4075A4 01382000
  1441. LTR R1,R1 IS THERE I/O GOING ON ALREADY? @V4075A4 01383000
  1442. BZ SCHEDIO NO, GO AHEAD AND CALL IOS @V4075A4 01384000
  1443. BM GTNXTBUF ADDRESS IN TWO'S COMPLEMENT @V4075A4 01385000
  1444. * FORM, I/O ALREADY PENDING, 01386000
  1445. * NO NEED TO DO ANYTHING 01387000
  1446. * FALL THROUGH, I/O ALREADY ACTIVE, INDICATE THAT I/O IS NOW PENDING 01388000
  1447. LCR R0,R1 MAKE ADDRESS OF BUFFER NEGATIVE @V4075A4 01389000
  1448. TM APSTAT1,APUOPER IS APU OPERATIONAL? @V4075A4 01390000
  1449. BZ NOCS3 NO, NO COMPARE-SWAP NECESSARY @V4075A4 01391000
  1450. CS R1,R0,MONIOBF INDICATE I/O PENDING @V4075A4 01392000
  1451. BNZ TAPECS SOMETHING HAPPENED ON OTHER @V4075A4 01393000
  1452. * PROCESSOR, TRY AGAIN 01394000
  1453. B GTNXTBUF IT WENT OK, GET NEXT AVAIL BUFF @V4075A4 01395000
  1454. NOCS3 ST R0,MONIOBF SET I/O PDG INDICATOR IN MONIOBF @V4075A4 01396000
  1455. B GTNXTBUF GO GET NEXT AVAIL BUFFER @V4075A4 01397000
  1456. SPACE 01398000
  1457. SCHEDIO ST R4,MONIOBF SAVE ADDR OF BUFF BEING WRITTEN, @V4075A4 01399000
  1458. * ALSO INDICATES THAT TAPE IS BUSY 01400000
  1459. MVC MONIOSLT(4),MONCRSLT UPDATE THE I/O SLOT @V4075A4 01401000
  1460. L R10,MONAIOB ADDRESS THE IOB @V2B2638 01402000
  1461. USING IOBLOK,R10 @V2B2638 01403000
  1462. LA R0,IOBSIZE*8(R10) ADDRESS OF THE WRITE CCW @V2B2638 01404000
  1463. ST R0,IOBCAW SET THE CAW FOR THE WRITE @V2B2638 01405000
  1464. ST R4,IOBSIZE*8(R10) PUT DATA ADDR IN THE CCW @V2B2638 01406000
  1465. MVI IOBSIZE*8(R10),X'01' PUT THE OP CODE BACK IN @V2B2638 01407000
  1466. STH R3,IOBSIZE*8+6(R10) PUT BYTE COUNT INTO THE CCW @V4075A4 01408000
  1467. EJECT 01409000
  1468. ****** 01410000
  1469. * 01411000
  1470. * NOW IT IS TIME TO START THE TAPE, BUT TO AVOID CONFLICTS 01412000
  1471. * IF THE CALL TO IOS SHOULD FIELD AN ERROR, AN ASYNCHRONOUS 01413000
  1472. * CALL IS MADE TO IOS VIA A CPEXBLOK. 01414000
  1473. * WE NOW SET UP THE CPEXBLOK SUCH THAT IOS WILL BE CALLED 01415000
  1474. * WHEN IT IS UNSTACKED, NEXT TIME (OR SO) THROUGH THE 01416000
  1475. * DISPATCHER. WE CAN THEN CONTINUE TO MONITOR THE SYSTEM 01417000
  1476. * WITHOUT TEMPORARILY SUSPENDING IT FOR THE CALL, ETC. 01418000
  1477. * 01419000
  1478. ****** 01420000
  1479. SPACE 1 01421000
  1480. L R1,IOBMISC GET THE BACK POCKET CPEXBLOK @V2B2638 01422000
  1481. USING CPEXBLOK,R1 @V2B2638 01423000
  1482. STM R0,R15,CPEXR0 SAVE THE REGS @V2B2638 01424000
  1483. LA R0,GETCPEX RETURN ADDRESS ... @V2B2638 01425000
  1484. ST R0,CPEXADD ... INTO THE CPEXBLOK @V2B2638 01426000
  1485. L R0,ASYSVM ADDRESS OF THE SYSTEM VMBLOK @V2B2638 01427000
  1486. ST R0,CPEXR0+R11*4 SYS IS CHARGED FOR THE IO @V2B2638 01428000
  1487. LA R0,GOTO ADDRESS OF THE RETURN POINT @V2B2638 01429000
  1488. TM MONFLAG3,SPOOLED ARE WE SPOOLED @V50A2B5 01430000
  1489. BNO NOSPL006 NO @V50A2B5 01431000
  1490. LA R0,CLEANIO GO TO MON PROCESSING @V50A2B5 01432000
  1491. NOSPL006 EQU * @V50A2B5 01433000
  1492. ST R0,CPEXR0+R5*4 SAVE IN R5 @V2B2638 01434000
  1493. CALL DMKSTKCP STACK THE CPEXBLOK ON THE DSP Q @V2B2638 01435000
  1494. DROP R1 @V2B2638 01436000
  1495. GTNXTBUF EQU * @V50A2B5 01437000
  1496. TM MONFLAG3,SPOOLED ARE WE SPOOLED @V50A2B5 01438000
  1497. BNO STDPATH NO @V50A2B5 01439000
  1498. L R1,MONSPLCT BUMP UP SPOOL COUNT @V50A2B5 01440000
  1499. LA R1,1(R1) HERE @V50A2B5 01441000
  1500. ST R1,MONSPLCT STORE IT @V50A2B5 01442000
  1501. L R1,=A(DMKSYSAT) CHECK FOR REAL TIME MONITOR @V60BEBC 01442250
  1502. TM 0(R1),MONSLMT ACTIVE? @V60BEBC 01442500
  1503. BO STDPATH YES, DON'T CHECK RECORD COUNT @V60BEBC 01442750
  1504. L R1,=A(DMKSYSMX) COMPARE COUNT AGAINST MAX @V50A2B5 01443000
  1505. L R1,0(R1) LOAD IT IN @V50A2B5 01444000
  1506. C R1,MONSPLCT COMPARE IT @V50A2B5 01445000
  1507. BH STDPATH NOT OVER YET @V50A2B5 01446000
  1508. MVC CPCREG8(4),ZEROES DISABLE MONITOR @V50A2B5 01447000
  1509. L R1,PREFIXB TURN OFF OTHER PREFIX @V50A2B5 01448000
  1510. MVC CPCREG8-IPLPSW(4,R1),ZEROES @V50A2B5 01449000
  1511. LCTL C8,C8,ZEROES TURN OF CREG 8 @V50A2B5 01450000
  1512. OI MONFLAG3,CLSUS SUSPEND UNTIL ALL IO DONE @V50A2B5 01451000
  1513. OI 9(R4),TRAP TRAP THIS IO @V50A2B5 01452000
  1514. B SUSPEXIT EXIT IMMEDIATELY @V50A2B5 01453000
  1515. STDPATH EQU * @V50A2B5 01454000
  1516. L R1,MONCRSLT GET ADDRESS OF CURRENT BUF @V50A2B5 01455000
  1517. LA R1,8(R1) POINT TO NEXT BUFFER SLOT @V50A2B5 01456000
  1518. CLI 0(R1),X'FF' HAVE WE WRAPPED? @V4075A4 01457000
  1519. BNE NOWRAP NO, WE'RE OK @V4075A4 01458000
  1520. LA R1,MONBUF1 WRAP TO THE FIRST OF THE SLOTS @V4075A4 01459000
  1521. NOWRAP L R4,0(R1) POINT TO NEXT BUFFER @V4075A4 01460000
  1522. SR R7,R7 SET ZERO RETURN CODE-NO RETRY @V4075A4 01461000
  1523. TM MONFLAG3,SPOOLED SEE IF SPOOLED @V50A2B5 01462000
  1524. BNO OLDCHK NO @V50A2B5 01463000
  1525. TM 8(R4),MONBUFAV SEE IF BUFFER AVAILABLE @V50A2B5 01464000
  1526. BZ POSSSUSP @V50A2B5 01465000
  1527. OI 8(R4),MONBUFAC FLAG BUFF 'ACTIVE COLLECTOR' @V50A2B5 01466000
  1528. B RESME1 @V50A2B5 01467000
  1529. OLDCHK TM 2(R4),MONBUFAV SEE IF BUFFER AVAILABLE @V50A2B5 01468000
  1530. BZ POSSSUSP @V50A2B5 01469000
  1531. OI 2(R4),MONBUFAC FLAG BUFFER ACTIVE COLLECTOR @V50A2B5 01470000
  1532. RESME1 EQU * @V50A2B5 01471000
  1533. ST R4,MONCURBF UPDATE CURRENT BUFFER POINTER @V4075A4 01472000
  1534. ST R1,MONCRSLT UPDATE CURR BUFFER SLOT POINTER @V4075A4 01473000
  1535. LA R3,4(R4) POINT TO FIRST RECORD IN BUFFER @V4075A4 01474000
  1536. TM MONFLAG3,SPOOLED SEE IF WE ARE SPOOLING @V50A2B5 01475000
  1537. BNO *+8 NO @V50A2B5 01476000
  1538. LA R3,16(R3) YES, BUMP IN BY 16 @V50A2B5 01477000
  1539. LA R4,4088(R4) @VA09843 01478100
  1540. LA R8,MONNEXT-PSA(R8) @VA09843 01478600
  1541. STM R3,R4,0(R8) @VA09843 01479100
  1542. L R8,PREFIXA @VA09843 01479600
  1543. BR R6 RETURN TO CALLER OF PAGEFULL @V4075A4 01482000
  1544. POSSSUSP TM MONFLAG1,MON1BUF IS THIS 1-BUFFER CASE? @V4075A4 01483000
  1545. BZ SUSPEND1 NO, NO FREE BUFFS, MUST SUSPEND @V4075A4 01484000
  1546. LR R3,R11 YES, LACK OF FREE BUFFERS IS OK, @V4075A4 01485000
  1547. * GET ADDRESS OF CUR RECORD 01486000
  1548. ST R3,MONNEXT(R8) SAVE IT IN APPROPRIATE PLACE @V4075A4 01487000
  1549. BR R6 RETURN TO CALLER @V4075A4 01488000
  1550. EJECT 01489000
  1551. ******** 01490000
  1552. * 01491000
  1553. * ARRIVE HERE TO MAKE A CALL TO IOS. 01492000
  1554. * 01493000
  1555. * 'GETCPEX' - REPLACE THE BACKPOCKET CPEXBLOK ADDRESSED 01494000
  1556. * BY IOBMISC. 01495000
  1557. * 'CALLIOS' - TO CALLIOS AND RETURN. 01496000
  1558. * 01497000
  1559. * R5 - RETURN ADDRESS 01498000
  1560. * R9 - ADDRESS OF MONCOM 01499000
  1561. * R10 - ADDRESS OF THE IOB 01500000
  1562. * 01501000
  1563. ******** 01502000
  1564. SPACE 01503000
  1565. GETCPEX LA R0,CPEXSIZE SIZE OF CPEXBLOK @V2B2638 01504000
  1566. CALL DMKFREE GET A NEW BACK POCKET CPEXBLOK @V2B2638 01505000
  1567. ST R1,IOBMISC SAVE ITS ADDRESS @V2B2638 01506000
  1568. CALLIOS XC IOBFLAG(2),IOBFLAG CLEAR THE IOB FOR REUSE @V2B2638 01507000
  1569. L R8,MONARDB ADDRESS OF THE REAL DEVICE BLOK @V2B2638 01508000
  1570. TM MONFLAG3,SPOOLED IS THIS SPOOLED MONITORING @V50A2B5 01509000
  1571. BO CALLMIA @V50A2B5 01510000
  1572. CALL DMKIOSQR QUEUE THE I/O REQUEST @V2B2638 01511000
  1573. BR R5 RETURN TO LOCAL CALLER @V2B2638 01512000
  1574. CALLMIA EQU * @V50A2B5 01513000
  1575. L R1,IOBSIZE*8(R10) GET THE DATA ADDRESS @V50A2B5 01514000
  1576. CALL DMKMIAWO WRITE OUT THE PAGE @V50A2B5 01515000
  1577. C R1,F2 SEE IF SHUTDOWN SCHEDULED @V50A2B5 01516000
  1578. BE GOTO YES, LEAVE @V50A2B5 01517000
  1579. BR R5 @V50A2B5 01518000
  1580. SPACE 1 01519000
  1581. CALLIOS1 L R1,IOBSIZE*8(R10) GET THE DATA ADDRESS @V50A2B5 01520000
  1582. CALL DMKMIAWO WRITE OUT THE BUFFER @V50A2B5 01521000
  1583. C R1,F2 SEE IF SHUTDOWN SCHEDULED @V50A2B5 01522000
  1584. BE GOTO YES, JUST EXIT @V50A2B5 01523000
  1585. LA R0,CPEXSIZE START OFF A CPEXBLOK @V50A2B5 01524000
  1586. CALL DMKFREE GET THE STORAGE FOR IT @V50A2B5 01525000
  1587. USING CPEXBLOK,R1 01526000
  1588. STM R0,R15,CPEXR0 STORE THE REGISTERS @V50A2B5 01527000
  1589. LA R0,CLEANIO GET RETURN ADDRESS @V50A2B5 01528000
  1590. ST R0,CPEXADD STORE IT @V50A2B5 01529000
  1591. CALL DMKSTKCP STACK IT @V50A2B5 01530000
  1592. BR R5 DO NORMAL RETURN @V50A2B5 01531000
  1593. DROP R1 01532000
  1594. SPACE 5 01533000
  1595. SUSPEND1 OI MONFLAG2,SUSPEND SET SUSPEND STATUS @V4075A4 01534000
  1596. MVC CPCREG8(4),ZEROES DON'T FORGET THE PSA FIELD @V2B2638 01535000
  1597. L R8,PREFIXB ADDRESS OTHER PROCESSOR'S PSA @V4075A4 01536000
  1598. MVC CPCREG8-IPLPSW(4,R8),ZEROES ZERO OUT OTHER @V4075A4 01537000
  1599. * PROCESSOR'S MC MASK 01538000
  1600. LA R0,1 ADD ONE TO THE COUNT OF @V2B2638 01539000
  1601. AL R0,MONSUSCT SUSPENDS @V2B2638 01540000
  1602. ST R0,MONSUSCT ... @V2B2638 01541000
  1603. LCTL C8,C8,ZEROES DISABLE FURTHER INTERRUPTS @V4075A4 01542000
  1604. STCK MONSUSCK RECORD TOD OF SUSPENSION @V2B2638 01543000
  1605. BC 3,DOWNWEGO CLOCK NOT FUNCTIONING @VA04301 01544000
  1606. SUSPEXIT SR R1,R1 ZERO R1 -- NO BUFFER SPACE @VA10215 01545200
  1607. ST R1,SAVER1 PASS R1 TO CALLER @VA10215 01545300
  1608. LM R0,R11,16(R13) REST REGS FROM APPROP SAVE AREA @V4075A4 01547000
  1609. L R13,12(R13) AND R13 AT BAL TO PREPREC @VA07862 01547500
  1610. BR R5 R5 RETURN TO CALLER @VA10215 01548100
  1611. TSTSUSP LTR R1,R1 TEST BUFFER SPACE @VA10215 01548200
  1612. BZ EXIT2 NO SPACE - LEAVE @VA10215 01548300
  1613. BR R5 CONTINUE @VA10215 01548400
  1614. TSTSUSP1 LTR R1,R1 TEST BUFFER SPACE @VA10215 01548500
  1615. BZR R6 NO SPACE - RETURN TO CALLER @VA10215 01548600
  1616. BR R5 CONTINUE @VA10215 01548700
  1617. EJECT 01549000
  1618. *. 01550000
  1619. * 01551000
  1620. * ENTRY POINT - 01552000
  1621. * 01553000
  1622. * DMKMONIO - HANDLE I/O INTERRUPTS FOR THE MONITOR TAPE 01554000
  1623. * 01555000
  1624. * ENTRY CONDITIONS - 01556000
  1625. * 01557000
  1626. * GPR10 - ADDRESS OF IOB ASSOCIATED WITH THE INTERRUPT 01558000
  1627. * GPR12 - ADDRESS OF ENTRY POINT 01559000
  1628. * 01560000
  1629. * CALLS TO OTHER ROUTINES - 01561000
  1630. * 01562000
  1631. * DMKFRET - RETURN A BLOCK OF STORAGE TO THE SYSTEM 01563000
  1632. * DMKERMSG - WRITE AN ERROR MESSAGE TO A USER 01564000
  1633. * DMKSCHRT - DEQUEUE A TIMER REQUEST BLOCK 01565000
  1634. * DMKPTRFR - RETURN A PAGE TO FREE STORAGE 01566000
  1635. * DMKPTRUL - UNLOCK A PAGE FRAME 01567000
  1636. * DMKDSPCH - RETURN CONTROL TO THE DISPATCHER 01568000
  1637. * DMKIOSQR - TO SCHEDULE AN I/O REQUEST 01569000
  1638. * 01570000
  1639. * EXTERNAL REFERENCES - 01571000
  1640. * 01572000
  1641. * DMKPRGMC - ADDR OF THE MONITOR COMMUNICATIONS BLOCK 01573000
  1642. * DMKPRGTI - ADDR OF THE MONITOR INTERVAL 01574000
  1643. * DMKPRGC8 - ADDR OF THE ENABLED CLASS MASK 01575000
  1644. * DMKPRGMI - ADDR OF THE ADDR OF THE MONITOR INTERRUPT HANDLER 01576000
  1645. * 01577000
  1646. * OPERATION - 01578000
  1647. *  01579000
  1648. * MONITOR I/O INTERRUPT PROCESSING 01580000
  1649. * 01581000
  1650. * DMKMONIO: 01582000
  1651. * 01583000
  1652. * IF FINAL TAPE STATUS IS NOT BEING RETURNED, THEN 01584000
  1653. * THE COPIED I/O BLOCK IS FRETED AND CONTROL IS 01585000
  1654. * PASSED TO THE DISPATCHER. 01586000
  1655. * 01587000
  1656. * IF THERE IS AN IOERBLOK, FRET IT. 01588000
  1657. * 01589000
  1658. * IF THE I/O WAS NOT 'FATAL' THEN GO TO STEP 01590000
  1659. * 'CHKUC'. 01591000
  1660. * 01592000
  1661. * FATAL: 01593000
  1662. * IF THE 'ERROR' FLAG HAS ALREADY BEEN SET THEN GO TO 01594000
  1663. * STEP 'ERRONERR'. 01595000
  1664. * 01596000
  1665. * SET THE 'ERROR' FLAG. 01597000
  1666. * 01598000
  1667. * ERRONERR: 01599000
  1668. * IF THE 'TRUN' FLAG HAS NOT BEEN SET THEN GO TO STEP 01600000
  1669. * 'EOT'. OTHERWISE CALL DMKERMSG TO SEND MESSAGE 220 01601000
  1670. * TO THE OPERATOR AND TO GO STEP 'FINISHUP'. 01602000
  1671. * 01603000
  1672. * CHKUC: 01604000
  1673. * IF A UNIT CHECK DID NOT OCCUR THEN GO TO STEP 01605000
  1674. * 'CHKUE'. IF A UC DID OCCUR AND THE 'TRUN' FLAG IS 01606000
  1675. * OFF THEN GO TO STEP 'FATAL'. IF THE 'TRUN' FLAG IS 01607000
  1676. * ON AND THE INTERRUPT CAME WITH CUE AND DE THEN: 01608000
  1677. * 01609000
  1678. * IF THE 'CFSTOP' FLAG IS ON THEN GO TO STEP 01610000
  1679. * 'FINISHUP'. 01611000
  1680. * 01612000
  1681. * OTHERWISE SEND MESSAGE 219 TO THE OPERATOR 01613000
  1682. * FIRST AND THEN GO TO STEP 'FINISHUP'. 01614000
  1683. * 01615000
  1684. * CHKUE: 01616000
  1685. * IF THE IOB CAME WITHOUT UE THEN GO TO STEP 01617000
  1686. * 'CLEANIO'. 01618000
  1687. * 01619000
  1688. * EOT: 01620000
  1689. * INDICATE THAT THE SYSTEM IS STOPPING THE MONITOR. 01621000
  1690. * CLEAR THE IOBLOK FOR REUSE; STOP ALL MONITOR 01622000
  1691. * ACTIVITY BY DISABLEING MC INTERRUPTS; READJUST THE 01623000
  1692. * CCW'S TO WRITE A TAPE MARK AND REWIND/UNLOAD THE 01624000
  1693. * TAPE; SET THE 'TRUN' FLAG TO INDICATE THAT TAPE 01625000
  1694. * FINAL PROCESSING HAS BEEN PERFORMED; LINK TO THE 01626000
  1695. * TAPE I/O MANAGER TO INITIATE THE TAPE I/O; GO TO 01627000
  1696. * THE DISPATCHER. 01628000
  1697. * 01629000
  1698. * CLEANIO: 01630000
  1699. * FLAG THE BUFFER THAT WAS JUST WRITTEN AS 'AVAILABLE'. 01631000
  1700. * IF THIS IS ONE-BUFFER CASE, FLAG IT AS THE 'ACTIVE 01632000
  1701. * COLLECTOR', STORE ZEROS IN MONIOBF TO INDICATE TAPE FREE, 01633000
  1702. * GO TO REACTVAT TO REACTIVATE THE MONITOR IF IT'S BEEN 01634000
  1703. * SUSPENDED, OTHERWISE GO TO CHKSTOP. FOR NON-ONE-BUFFER 01635000
  1704. * CASE, FALL THROUGH TO CHKIOPDG. 01636000
  1705. * 01637000
  1706. * CHKIOPDG: 01638000
  1707. * POINT TO NEXT BUFFER, WRAPPING TO FIRST ONE IF NECESSARY. 01639000
  1708. * IF IT IS NOT WAITING FOR I/O, THEN GO TO NOIOPDG. 01640000
  1709. * IT IS WAITING FOR I/O, IT IS NOW NECESSARY TO DETERMINE 01641000
  1710. * WHETHER TO SET ITS ADDRESS IN MONIOBF AS POSITIVE OR 01642000
  1711. * NEGATIVE. POINT TO YET THE NEXT BUFFER. IF IT IS 01643000
  1712. * WAITING FOR I/O, COMPLEMENT THE ADDRESS OF THE FIRST 01644000
  1713. * BUFFER. 01645000
  1714. * 01646000
  1715. * SETIOBUF: 01647000
  1716. * USE COMPARE-AND-SWAP TO SET THE NEW VALUE OF MONIOBF. 01648000
  1717. * IF THE CS FAILS, THEN WHILE THIS PROCESSOR FOUND NO 01649000
  1718. * FURTHER I/O PENDING, SUCH I/O HAS JUST BECOME PENDING 01650000
  1719. * ON THE OTHER PROCESSOR, SO GO BACK TO CKNXTBUF TO 01651000
  1720. * RE-EVALUATE IT. 01652000
  1721. *. 01653000
  1722. SPACE 01654000
  1723. ENTRY DMKMONIO @V2B2638 01655000
  1724. DMKMONIO EQU * @V2B2638 01656000
  1725. USING *,R12 @V2B2638 01657000
  1726. SL R12,=A(DMKMONIO-DMKMON) ESTABLISH ADDR @V2B2638 01658000
  1727. USING MONCOM,R9 @V2B2638 01659000
  1728. USING DMKMON,R12 @V2B2638 01660000
  1729. L R9,=A(DMKPRGMC) GET ADDR OF MONCOM @V2B2638 01661000
  1730. L R9,0(R9) ... @V2B2638 01662000
  1731. L R1,MONAIOB ADDRESS OF BASE IOB @V2B2638 01663000
  1732. CR R1,R10 SAME IOB? @V2B2638 01664000
  1733. LA R5,GOTO SET RETURN ADDRESS AFTER FRET @V2B2638 01665000
  1734. BNE FRETIOB NOPE, NOT FINAL INT. IGNORE @V2B2638 01666000
  1735. BAL R5,FRETIOER IN ANY CASE, RETURN THE IOERBLOK @V2B2638 01667000
  1736. TM IOBSTAT,IOBFATAL WAS THAT FATAL? @V2B2638 01668000
  1737. BZ CHKUC NOPE, MAYBE IT WAS UC @V2B2638 01669000
  1738. CHKERR TM MONFLAG1,ERROR FATAL, BEEN HERE BEFORE? @V2B2638 01670000
  1739. BO ERRONERR YES, ERROR ON ERROR @V2B2638 01671000
  1740. OI MONFLAG1,ERROR NO, INDICATE WEVE BEEN HERE ONCE @V2B2638 01672000
  1741. TM MONFLAG1,TRUN BEEN THROUGH EOT BEFORE? @V2B2638 01673000
  1742. LA R2,IOBSIZE*8+8*1(R10) SET FOR EOT CAW = WTM1 @V2B2638 01674000
  1743. BZ EOT NOPE, THEN DO SHUTDOWN NOW @V2B2638 01675000
  1744. * OTHERWISE, ERROR STOPPING MONITOR ON EOT, SO QUIT NOW. 01676000
  1745. SPACE 2 01677000
  1746. ERRONERR LA R2,220 MSG220, TAPE ERR, MON SHUTDOWN @V2B2638 01678000
  1747. MSGCOMM O R2,=X'B0C90000' RETURN HERE + ALARM + @V2B2638 01679000
  1748. * OPERATOR + INFORMATION MSG 01680000
  1749. SLR R1,R1 ZIP R1 = NO SUBSTITUTABLES @V2B2638 01681000
  1750. ICM R0,B'1110',MODID+3 ISSUEING MODULE ID @V2B2638 01682000
  1751. CALL DMKERMSG GO PUT OUT THE MESSAGE @V2B2638 01683000
  1752. L R15,PRGMC ADDRESS OF DMKPRGMC (MONCOM PTR) @V4M0238 01684000
  1753. L R15,0(R15) ADDRESS MONCOM @V4M0238 01685000
  1754. LTR R15,R15 IF ZERO, DMKMNIFI ALREADY CALLED @V4M0238 01686000
  1755. BZ GOTO EXIT TO DISP WHEN MNIFI COMPLETE @V4M0238 01687000
  1756. B FINISHUP DONE ALL WE CAN, SHUTDOWN MON. @V2B2638 01688000
  1757. SPACE 3 01689000
  1758. CHKUC TM IOBCSW+4,UC DID WE GET A UC? @V2B2638 01690000
  1759. BZ CHKUE NOPE, GO CHECK UNIT EXCEPTION @V2B2638 01691000
  1760. TM MONFLAG1,TRUN UC AFTER WTM, RUN SEQUENCE? @V2B2638 01692000
  1761. BZ CHKERR NO, BAD NEWS, STOP THE MONITOR @V2B2638 01693000
  1762. TM IOBCSW+4,CUE+DE DID IT COME WITH CUE AND DE @V2B2638 01694000
  1763. BNO ERRONERR NOPE, SOMETHING WENT HAYWIRE @V2B2638 01695000
  1764. TM MONFLAG1,CFSTOP STOPPING BY REQUEST? @V2B2638 01696000
  1765. BO FINISHUP YUP, THEN BE EXPIDITIOUS @V2B2638 01697000
  1766. TM MONFLAG1,ERROR ERROR OR EOT? @V2B2638 01698000
  1767. BO ERRONERR TAPE ERROR, MSG 220. @V2B2638 01699000
  1768. LA R2,219 MSG NO 219, EOT, MON SHUTDOWN @V2B2638 01700000
  1769. B MSGCOMM JOIN COMMON MSG CODE @V2B2638 01701000
  1770. SPACE 3 01702000
  1771. CHKUE TM IOBCSW+4,UE DID WE GET UE ? @V2B2638 01703000
  1772. BZ CLEANIO NOPE, INTERRUPT IS GOOD @V2B2638 01704000
  1773. L R1,IOBCSW GET THE ENDING CCW ADDR @V2B2638 01705000
  1774. LA R1,0(R1) CLEAR ANY UNDUE GARBAGE @V2B2638 01706000
  1775. LA R2,IOBSIZE*8+8*1(R10) END OF WRITE CCW @V2B2638 01707000
  1776. CR R1,R2 IS THAT WHERE WE STOPPED? @V2B2638 01708000
  1777. BNE NOTONWR NOPE, BR @V2B2638 01709000
  1778. EOT MVC MONUSER(8),=CL8'SYSTEM' SYSTEM CAUSED THE STOP @V2B2638 01710000
  1779. LCTL C8,C8,ZEROES QUICK, SHUT OFF ALL MONITORING @V2B2638 01711000
  1780. MVC CPCREG8(4),ZEROES STOP ALL MONITORING @V2B2638 01712000
  1781. L R8,PREFIXB ADDRESS THE OTHER PSA @V4075A4 01713000
  1782. MVC CPCREG8-IPLPSW(4,R8),ZEROES ZERO OUT OTHER @V4075A4 01714000
  1783. * PROCESSOR'S MC MASK 01715000
  1784. OI MONFLAG1,TRUN INDICATE TAPE RUN CMD BEEN DONE @V2B2638 01716000
  1785. TM MONFLAG1,ERROR FLAG ON OR OFF @VA13418 01717000
  1786. BZ RESETCAW IF OFF, PROCESS NORMALLY @VA13418 01717200
  1787. ST R2,IOBCAW SET THE PROPER CAW ADDRESS @VA13418 01717400
  1788. BAL R5,CALLIOS GET THE TAPE MOVING AGAIN @VA13418 01717600
  1789. B ERRONERR UNRECOVERABLE ERROR ON TAPE @VA13418 01717800
  1790. SPACE 01718000
  1791. NOTONWR LA R2,IOBSIZE*8+8*2(R10) END OF WTM1 CCW @V2B2638 01719000
  1792. CR R1,R2 IS THAT WHERE WE STOPPED? @V2B2638 01720000
  1793. BE RESETCAW YES, SET FOR WTM2 AND RESTART @V2B2638 01721000
  1794. LA R2,IOBSIZE*8+8*3(R10) SET FOR RUN AND RESTART @V2B2638 01722000
  1795. RESETCAW ST R2,IOBCAW SET THE PROPER CAW ADDR @V2B2638 01723000
  1796. BAL R5,CALLIOS GET THE TAPE MOVING AGAIN @V2B2638 01724000
  1797. B GOTO GET LOST TILL 'RUN' IS DONE @V2B2638 01725000
  1798. SPACE 3 01726000
  1799. CLEANIO L R3,MONIOBF GET ADDR OF BUFFER WRITTEN OUT @V4075A4 01727000
  1800. LPR R2,R3 R3 MAY BE NEG, GET POS VALUE @V4075A4 01728000
  1801. TM MONFLAG3,SPOOLED SEE IF WE ARE SPOOLING @V50A2B5 01729000
  1802. BNO NOSPL007 @V50A2B5 01730000
  1803. OI 8(R2),MONBUFAV TURN ON AVAILABLE BIT @V50A2B5 01731000
  1804. B NOSPL008 @V50A2B5 01732000
  1805. NOSPL007 OI 2(R2),MONBUFAV TURN ON AVAILABLE BIT @V50A2B5 01733000
  1806. NOSPL008 EQU * @V50A2B5 01734000
  1807. L R8,PREFIXA GET POINTER TO ABSOLUTE PREFIX @V4075A4 01735000
  1808. L R4,MONIOSLT GET ADDR OF SLOT OF BUFF WRITTEN @V4075A4 01736000
  1809. TM MONFLAG1,MON1BUF IS THIS 1-BUFFER CASE? @V4075A4 01737000
  1810. BZ CHKIOPDG NO, SKIP SPECIAL LOGIC @V4075A4 01738000
  1811. TM MONFLAG3,SPOOLED SEE IF WE ARE SPOOLING @V50A2B5 01739000
  1812. BNO NOSPL009 @V50A2B5 01740000
  1813. OI 8(R2),MONBUFAC TURN ON ACCEPTING BIT @V50A2B5 01741000
  1814. LA R5,20(R2) GET ADDRESS OF 1ST RECORD @V50A2B5 01742000
  1815. B NOSPL010 @V50A2B5 01743000
  1816. NOSPL009 OI 2(R2),MONBUFAC TURN ON ACCEPTING BIT @V50A2B5 01744000
  1817. LA R5,4(R2) GET ADDRESS OF 1ST RECORD @V50A2B5 01745000
  1818. NOSPL010 EQU * @V50A2B5 01746000
  1819. ST R5,MONNEXT(R8) SAVE IT IN PSA @V4075A4 01747000
  1820. SR R1,R1 CLEAR A REG @V4075A4 01748000
  1821. ST R1,MONIOBF INDICATE TAPE NO LONGER BUSY @V4075A4 01749000
  1822. TM MONFLAG2,SUSPEND HAS MONITOR BEEN SUSPENDED? @V4075A4 01750000
  1823. BNZ REACTVAT YES, GO REACTIVATE IT @V4075A4 01751000
  1824. B CHKSTOP GO CHECK FOR STOP PROCESSING @V4075A4 01752000
  1825. CHKIOPDG LA R6,8(R4) POINT TO NEXT SLOT @V50A2B5 01753000
  1826. CLI 0(R6),X'FF' SHOULD WE WRAP? @V4075A4 01754000
  1827. BNE NOWRAPI NO, ALL SET @V4075A4 01755000
  1828. LA R6,MONBUF1 YES, WRAP @V4075A4 01756000
  1829. NOWRAPI L R5,0(R6) GET ADDRESS OF NEXT BUFFER @V4075A4 01757000
  1830. TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01758000
  1831. BNO NOSPL011 @V50A2B5 01759000
  1832. TM 8(R5),255-MONBUFIO TEST FOR IO PENDING @V50A2B5 01760000
  1833. BNZ NOIOPDG @V50A2B5 01761000
  1834. B NOSPL012 @V50A2B5 01762000
  1835. NOSPL011 TM 2(R5),255-MONBUFIO TEST FOR IO PENDING @V50A2B5 01763000
  1836. BNZ NOIOPDG @V50A2B5 01764000
  1837. NOSPL012 EQU * @V50A2B5 01765000
  1838. ST R6,MONIOSLT YES, SAVE SLOT ADDRESS @V4075A4 01766000
  1839. LH R2,0(R5) GET LENGTH OF REC TO BE WRITTEN @V4075A4 01767000
  1840. * 01768000
  1841. * GO TO NEXT BUFFER TO SEE IF I/O WILL STILL BE PENDING 01769000
  1842. * 01770000
  1843. LA R6,8(R6) POINT TO NEXT SLOT @V50A2B5 01771000
  1844. CLI 0(R6),X'FF' SHOULD WE WRAP? @V4075A4 01772000
  1845. BNE NOWRAPJ NO, ALL SET @V4075A4 01773000
  1846. LA R6,MONBUF1 YES, WRAP @V4075A4 01774000
  1847. NOWRAPJ L R1,0(R6) POINT TO NEXT BUFFER @V4075A4 01775000
  1848. CKNXTBUF LPR R5,R5 IF R5 IS COMPLEMENTED, RESET @V4075A4 01776000
  1849. TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01777000
  1850. BNO NOSPL013 @V50A2B5 01778000
  1851. TM 8(R1),255-MONBUFIO TEST FOR IO PENDING @V50A2B5 01779000
  1852. BNZ SETIOBUF @V50A2B5 01780000
  1853. B NOSPL014 @V50A2B5 01781000
  1854. NOSPL013 TM 2(R1),255-MONBUFIO TEST FOR IO PENDING @V50A2B5 01782000
  1855. BNZ SETIOBUF @V50A2B5 01783000
  1856. NOSPL014 EQU * @V50A2B5 01784000
  1857. LCR R5,R5 YES, COMPLEMENT BUFF ADDR @V4075A4 01785000
  1858. SETIOBUF TM APSTAT1,APUOPER IS APU OPERATIONAL? @V4075A4 01786000
  1859. BZ NOCS4 NO, USE STORE INSTEAD OF CS @V4075A4 01787000
  1860. CS R3,R5,MONIOBF SET NEW MONIOBF VALUE WITH CS @V4075A4 01788000
  1861. BNZ CKNXTBUF INTERFERENCE, TRY AGAIN @V4075A4 01789000
  1862. B NOST4 BRANCH AROUND STORE INST @V4075A4 01790000
  1863. NOCS4 ST R5,MONIOBF SET NEW MONIOBF VALUE @V4075A4 01791000
  1864. NOST4 EQU * @V4075A4 01792000
  1865. LA R1,IOBSIZE*8(R10) ADDRESS OF THE WRITE CCW @V2B2638 01793000
  1866. ST R1,IOBCAW STORE IN THE CAW @V2B2638 01794000
  1867. LPR R5,R5 ENSURE POSITIVE VALUE @V4M0152 01795000
  1868. ST R5,IOBSIZE*8(R10) SET UP THE CCW DATA ADDRESS @V4075A4 01796000
  1869. MVI IOBSIZE*8(R10),X'01' RESTORE THE OP CODE @V2B2638 01797000
  1870. STH R2,IOBSIZE*8+6(R10) SET CCW DATA LENGTH @V2B2638 01798000
  1871. TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01799000
  1872. BNO DOIOS NO @V50A2B5 01800000
  1873. BAL R5,CALLIOS1 CALL SPECIAL ROUTINE @V50A2B5 01801000
  1874. B DONEIOS @V50A2B5 01802000
  1875. DOIOS BAL R5,CALLIOS DO REGULAR CALL @V50A2B5 01803000
  1876. DONEIOS EQU * @V50A2B5 01804000
  1877. L R8,PREFIXA RESTORE PTR TO FORCE TO ABS 0 @V4M0153 01805000
  1878. * NOTE THAT RETURN HERE MAY BE ON 01806000
  1879. * THE OTHER PROCESSOR. 01807000
  1880. TM MONFLAG2,SUSPEND WAS MONITOR SUSPENDED? @V4075A4 01808000
  1881. BZ GOTO NO, GO EXIT @V4075A4 01809000
  1882. LPR R3,R3 ENSURE POSITIVE VALUE @V4M0152 01810000
  1883. TM MONFLAG3,CLSUS DO WE HOLD OFF ON UNSUSPEND@V50A2B5 01811000
  1884. BO GOTO YES @V50A2B5 01812000
  1885. TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01813000
  1886. BNO NOSPL001 @V50A2B5 01814000
  1887. OI 8(R3),MONBUFAC FLAG BUFF 'ACTIVE COLLECTOR'@V50A2B5 01815000
  1888. B NOSPL002 @V50A2B5 01816000
  1889. NOSPL001 OI 2(R3),MONBUFAC FLAG BUFFER ACTIVE @V50A2B5 01817000
  1890. NOSPL002 EQU * @V50A2B5 01818000
  1891. ST R3,MONCURBF SET CURR BUFF POINTER IN MONCOM @V4075A4 01819000
  1892. ST R4,MONCRSLT @V4075A4 01820000
  1893. LA R5,4(R3) R5 -> FIRST AVAIL REC IN BUFF @V4075A4 01821000
  1894. TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01822000
  1895. BNO NOSPL003 @V50A2B5 01823000
  1896. LA R5,16(R5) YES, BUMP BY 16 @V50A2B5 01824000
  1897. NOSPL003 EQU * @V50A2B5 01825000
  1898. ST R5,MONNEXT(R8) SAVE IT IN ABSOLUTE PSA @V4075A4 01826000
  1899. O R5,=F'4088' CREATE ADDRESS OF LAST BYTE @V50A2B5 01827000
  1900. ST R5,PAGEND(R8) SAVE IT IN ABSOLUTE PSA @V4075A4 01828000
  1901. REACTVAT TM MONFLAG3,CLSUS DO I KEEP SUSPENDED @V50A2B5 01829000
  1902. BO GOTO YES @V50A2B5 01830000
  1903. NI MONFLAG2,255-SUSPEND RESET SUSPEND STATUS @V50A2B5 01831000
  1904. L R1,=A(DMKPRGC8) GET THE MONITOR MASK @V2B2638 01832000
  1905. MVC CPCREG8(4),0(R1) MOVE TO PSA @V2B2638 01833000
  1906. L R8,PREFIXB ADDRESS THE OTHER PSA @V4075A4 01834000
  1907. MVC CPCREG8-IPLPSW(4,R8),0(R1) PROPAGATE MC MASK @V4075A4 01835000
  1908. LCTL C8,C8,CPCREG8 RESTORE WHATEVER MON WAS BEFORE @V2B2638 01836000
  1909. LA R0,MNCLPERF DUMMY A SUSPEND CALL, CL 0... @VM01017 01837000
  1910. STH R0,MONCLASS ... @VM01017 01838000
  1911. LA R0,MNCOSUS SUSPEND CODE @VM01017 01839000
  1912. ST R0,MONCODE ... @V2B2638 01840000
  1913. LA R0,MN099LEN LENGTH OF SUSPENSION RECORD @V2B2638 01841000
  1914. BAL R5,PREPREC GET SPACE & CREATE HDR @V2B2638 01842000
  1915. LTR R1,R1 TEST FOR BUFFER SPACE @VA10215 01842300
  1916. BZ GOTO NO SPACE -- DISPATCH @VA10215 01842600
  1917. USING MN099,R1 ADDRESS THE RECORD @V2B2638 01843000
  1918. MVC MN099TOD,MONSUSCK+1 TOD AT SUSPENSION @V2B2638 01844000
  1919. MVC MN099CNT,MONSUSCT COUNT OF SUSPENSIONS @V2B2638 01845000
  1920. TM MONFLAG1,MONLSTBK HANDLING "LAST BLOCK" ? @VA04526 01846000
  1921. BO TRAILER YES (SUSPENDED ON THE LAST BLK)..@VA04526 01847000
  1922. * TRY IT AGAIN. 01848000
  1923. B GOTO OFF TO THE DISPATCHER @VA03658 01849000
  1924. SPACE 01850000
  1925. NOIOPDG SR R1,R1 CLEAR R1 FOR USE IN CS @V4075A4 01851000
  1926. TM APSTAT1,APUOPER IS APU OPERATIONAL? @V4075A4 01852000
  1927. BZ NOCS5 NO, USE STORE INSTEAD OF CS @V4075A4 01853000
  1928. CS R3,R1,MONIOBF SWAP IN TAPE FREE INDICATION @V4075A4 01854000
  1929. BNZ CLEANIO I/O IS NOW PENDING, GO GET IT @V4075A4 01855000
  1930. B NOST5 BRANCH AROUND STORE INST @V4075A4 01856000
  1931. NOCS5 ST R1,MONIOBF INDICATE THAT TAPE IS FREE @V4075A4 01857000
  1932. NOST5 EQU * @V4075A4 01858000
  1933. CHKSTOP TM MONFLAG1,CFSTOP DID SOMEBODY SAY STOP ON US? @V2B2638 01859000
  1934. BZ GOTO NOPE, ALL DONE. @V2B2638 01860000
  1935. TM MONFLAG1,TRUN HAS THIS BEEN DONE ONCE? @V2B2638 01861000
  1936. BO FINISHUP YES, THEN BEATIT @V2B2638 01862000
  1937. TRAILER CALL DMKMNITR EXIT TO TRAILER ROUTINE @V4075A4 01863000
  1938. B GOTO EXIT TO DISPATCHER 01864000
  1939. SPACE 01865000
  1940. FINISHUP CALL DMKMNIFI EXIT TO FINISHUP ROUTINE @V4075A4 01866000
  1941. FRETIOB ST R5,IOBMISC2 SAVE THE RETURN ADDRESS @V2B2638 01867000
  1942. BAL R5,FRETIOER DROP THE IOERBLOK IF ONE EXISTS @V2B2638 01868000
  1943. L R5,IOBMISC2 RELOAD THE RETURN ADDRESS @V2B2638 01869000
  1944. LA R1,0(R10) CLEAR HI BYTE AND MOVE TO R1 @V2B2638 01870000
  1945. LA R0,IOBSIZE GET SIZE OF STANDARD IOB @V2B2638 01871000
  1946. C R1,MONAIOB IS THIS THE MONITOR BASE IOB? @V2B2638 01872000
  1947. BNE STDIOB NO, STANDARD IOB SIZE @V2B2638 01873000
  1948. LA R0,IOBSIZE+4 SET FOR IOB + CCW'S @V2B2638 01874000
  1949. STDIOB CALL DMKFRET RETURN THE STORAGE @V2B2638 01875000
  1950. BR R5 RETURN TO CALLER @V2B2638 01876000
  1951. SPACE 3 01877000
  1952. FRETIOER L R1,IOBIOER GET THE IOER ADDRESS @V2B2638 01878000
  1953. LTR R1,R1 IS THERE ONE? @V2B2638 01879000
  1954. BZR R5 NOPE, RETURN @V2B2638 01880000
  1955. LA R0,IOERSIZE GET THE CORRECT SIZE @V2B2638 01881000
  1956. CALL DMKFRET FRET THE IOERBLOK @V2B2638 01882000
  1957. SLR R1,R1 CLEAR THE IOB POINTER @V2B2638 01883000
  1958. ST R1,IOBIOER ... @V2B2638 01884000
  1959. BR R5 RETURN TO CALLER @V2B2638 01885000
  1960. EJECT 01886000
  1961. *. 01887000
  1962. * 01888000
  1963. * ENTRY POINT - 01889000
  1964. * 01890000
  1965. * DMKMONTI - HANDLE A TIMER INTERRUPT 01891000
  1966. * 01892000
  1967. * ENTRY CONDITIONS - 01893000
  1968. * 01894000
  1969. * GPR10 - ADDRESS OF THE TRQBLOK 01895000
  1970. * GPR12 - ADDRESS OF THE ENTRY POINT 01896000
  1971. * 01897000
  1972. * EXIT CONDITIONS - 01898000
  1973. * 01899000
  1974. * NONE 01900000
  1975. * 01901000
  1976. * CALLS TO OTHER ROUTINES - 01902000
  1977. * 01903000
  1978. * DMKSCHST - TO RE-ESTABLISH A TIMER REQUEST AFTER INTERRUPT 01904000
  1979. * DMKDSPCH - RETURN CONTROL TO 01905000
  1980. * 01906000
  1981. * EXTERNAL REFERENCES - 01907000
  1982. * 01908000
  1983. * DMKPRGMC - ADDR OF THE MONITOR COMMUNICATIONS BLOCK 01909000
  1984. * DMKPRGTI - ADDR OF THE MONITOR INTERVAL 01910000
  1985. * 01911000
  1986. * OPERATION - 01912000
  1987. *  01913000
  1988. * MONITOR TIMER INTERRUPT PROCESSING 01914000
  1989. * 01915000
  1990. * DMKMONTI: 01916000
  1991. * 01917000
  1992. * INDICATE THAT A TIMER INTERRUPT IS BEING HANDLED. 01918000
  1993. * 01919000
  1994. * REINITIALIZE THE TRQBLOK FOR THE NEXT INTERVAL. 01920000
  1995. * 01921000
  1996. * CALL DMKSCHST TO ENQUEUE THE NEXT REQUEST. 01922000
  1997. * 01923000
  1998. * CHECK THE MONITOR MASK IN CPCREG8 (IN PSA), IF 01924000
  1999. * PERFORM IS ACTIVE THEN SIMULATE A CLASS 0 CODE 0 01925000
  2000. * MONITOR CALL INTERRUPT. 01926000
  2001. * 01927000
  2002. * CHECK THE MONITOR MASK IN CPCREG8; IF USER IS 01928000
  2003. * ACTIVE THEN SIMULATE A CLASS 4 CODE 0 MONITOR CALL 01929000
  2004. * INTERRUPT. 01930000
  2005. * 01931000
  2006. * CHECK THE MONITOR MASK IN CPCREG8; IF DASTAP IS 01932000
  2007. * ACTIVE THEN SIMULATE A CLASS 6 CODE 1 MONITOR CALL 01933000
  2008. * INTERRUPT. 01934000
  2009. * 01935000
  2010. * RESET THE TIMER INTERRUPT ACTIVE FLAG AND GO TO THE 01936000
  2011. * DISPATCHER. 01937000
  2012. * 01938000
  2013. *. 01939000
  2014. ENTRY DMKMONTI @V2B2638 01940000
  2015. DMKMONTI DS 0H @V2B2638 01941000
  2016. USING *,R12 @V2B2638 01942000
  2017. SL R12,=A(DMKMONTI-DMKMON) ESTAB. BASE ADDR @V2B2638 01943000
  2018. USING DMKMON,R12 @V2B2638 01944000
  2019. LR R1,R10 TRQBLOK IN R1 FOR TRB PROCESS @V2B2638 01945000
  2020. USING TRQBLOK,R1 @V2B2638 01946000
  2021. L R9,=A(DMKPRGMC) GET ADDR OF MONCOM @V2B2638 01947000
  2022. L R9,0(,R9) ... @V2B2638 01948000
  2023. L R3,=A(DMKPRGTI) GET POINTER TO TIME INCREMENT @VA10057 01948200
  2024. LH R3,0(R3) GET TIME INCREMENT @VA10057 01948400
  2025. LTR R3,R3 IS THERE ONE? @VA10057 01948600
  2026. BZ GOTO NO-NO MORE MONITOR PERF @VA10057 01948800
  2027. USING MONCOM,R9 @V2B2638 01949000
  2028. OI MONFLAG1,MONTIINT FLAG TIMER INTERRUPT HANDLER @V2B2638 01950000
  2029. STCK TRQBTOD TIME OF DAY FOR REQUEST (NOW) @V2B2638 01951000
  2030. BC 12,CLOCKOK IS CLOCK FUNCTIONING? @VA04301 01952000
  2031. DOWNWEGO GOTO DMKCVTAB CLOCK DAMAGED...ABEND CVT001 @VA04301 01953000
  2032. CLOCKOK EQU * @VA04301 01954000
  2033. SLR R2,R2 CLEAR FOR MULTIPLICATION @V2B2638 01957000
  2034. M R2,=F'1000000' CALCULATE IN UNITS OF U-SECONDS @V2B2638 01958000
  2035. SLDL R2,12 ALIGN WITH TOD FORMAT @V2B2638 01959000
  2036. AL R3,TRQBTOD+4 ADD IN TOD LOW ORDER BITS @V2B2638 01960000
  2037. BC 12,*+8 SKIP IF NO OVERFLOW @V2B2638 01961000
  2038. AL R2,F1 ADD 1 SEC. TO HIGH ORDER TOD @V2B2638 01962000
  2039. AL R2,TRQBTOD ADD IN HIGH ORDER TOD BITS @V2B2638 01963000
  2040. STM R2,R3,TRQBVAL NEXT INTERRUPT DUE AT THIS TIME @V2B2638 01964000
  2041. CALL DMKSCHST INSERT TRB IN REQUEST BLOCK CHAIN@V2B2638 01965000
  2042. DROP R1 @V2B2638 01966000
  2043. TM CPCREG8+2,PERFCL MUST WE DO PERF COLLECTION @V2B2638 01967000
  2044. BZ CHKDASD NO, MAY BE DASD CLASS @VM01054 01968000
  2045. * CLASS X CODE SETUP DEFERRED UNTIL DMKMIA BROUGHT IN (THIS PU 01969000
  2046. * MIGHT LOOSE CONTROL) 01970000
  2047. BAL R6,MONCOD00 GO COLLECT DATA @V2B2638 01971000
  2048. CHKDASD TM CPCREG8+2,DASDCL MUST WE DO DASTAP COLLECTION? @VM01054 01972000
  2049. BZ CHKUSER NOPE, CHECK USER @VM01054 01973000
  2050. LA R0,MNCLDAST SIMULATE DASTAP CLASS @VM01054 01974000
  2051. STH R0,MONCLASS @VM01054 01975000
  2052. LA R0,MNCODAS AND CODE @VM01054 01976000
  2053. ST R0,MONCODE @VM01054 01977000
  2054. BAL R6,MONCOD61 COLLECT THE DATA @VM01054 01978000
  2055. CHKUSER TM CPCREG8+2,USERCL MUST WE DO USER COLLECTION? @VM01054 01979000
  2056. BZ NOMORE NOPE, DONE @VM01054 01980000
  2057. LA R0,MNCLUSER YES, SIMULATE USER CLASS @VM01054 01981000
  2058. STH R0,MONCLASS @VM01054 01982000
  2059. LA R0,MNCOUSER AND USER CODE @VM01054 01983000
  2060. ST R0,MONCODE @VM01054 01984000
  2061. BAL R6,MONCOD40 GO COLLECT THE DATA @VM01054 01985000
  2062. NOMORE NI MONFLAG1,255-MONTIINT TIMER INT. PROCESSING DONE@VM01054 01986000
  2063. SPACE 01987000
  2064. L R1,MONSACT GET SAMPLE COUNT @V60BEBC 01988000
  2065. LA R1,1(R1) INCREMENT IT @V60BEBC 01988080
  2066. ST R1,MONSACT SAVE IT BACK @V60BEBC 01988160
  2067. L R2,=A(DMKSYSAT) GET LIMIT FLAG @V60BEBC 01988240
  2068. TM 0(R2),MONSLMT CLOSE ON SAMPLE LIMIT?? @V60BEBC 01988320
  2069. BZ GOTO NO, GET OUT @V60BEBC 01988400
  2070. L R2,=A(DMKSYSMX) YES, SO COMPARE @V60BEBC 01988480
  2071. C R1,0(R2) FOR EQUAL @V60BEBC 01988560
  2072. BL GOTO LIMIT NOT REACHED @V60BEBC 01988640
  2073. XC MONSACT,MONSACT CLEAR SAMPLE COUNT @V60BEBC 01988720
  2074. CALL DMKMIACC CLOSE THE FILE AND @V60BEBC 01988800
  2075. GOTO GOTO DMKDSPCH GO TO THE DISPATCHER @V60BEBC 01988880
  2076. EJECT 01989000
  2077. *********************************************************************** 01990000
  2078. * 01991000
  2079. * CONSTANTS AND WORK AREAS 01992000
  2080. * 01993000
  2081. *********************************************************************** 01994000
  2082. DS 0F @V2B2638 01995000
  2083. SPACE 1 01996000
  2084. Q1DROP EQU X'40' QUEUE DROP INDICATOR @V2B2638 01997000
  2085. PRGMC DC A(DMKPRGMC) ADDRESS OF MONCOM POINTER @V4M0238 01998000
  2086. LTORG @V2B2638 01999000
  2087. COPY SPOOL @V50A2B5 02000000
  2088. EJECT 02001000
  2089. COPY EQU @V2B2638 02002000
  2090. COPY ALLOC @V2B2638 02003000
  2091. PSA @V2B2638 02004000
  2092. COPY MONBLOKS @V2B2638 02005000
  2093. COPY VMBLOK @V2B2638 02006000
  2094. COPY SAVE @V2B2638 02007000
  2095. COPY IOBLOKS @V2B2638 02008000
  2096. COPY IOER @V2B2638 02009000
  2097. COPY CORE @V2B2638 02010000
  2098. COPY DEVTYPES @V2B2638 02011000
  2099. COPY RBLOKS @V2B2638 02012000
  2100. IOBLOK DSECT CONTINUE THE DSECT @VA09047 02012010
  2101. * ANY CHANGES IN PAGESIZE MUST ALSO BE REFLECTED 02012020
  2102. * IN DMKUSO AND DMKPAG 02012030
  2103. ORG , MAKE SURE WE'RE AT THE END @VA09047 02012040
  2104. PAGECCWS DS 6D SPACE FOR PAGING CCWS @VA09047 02012050
  2105. ORG PAGECCWS CCW DEFINITIONS @VA09047 02012060
  2106. PAGESK DS D SPACE FOR SEEK @VA09047 02012070
  2107. PAGESS DS D SPACE FOR SET SECTOR @VA09047 02012080
  2108. PAGESRCH DS D SPACE FOR SEARCH @VA09047 02012090
  2109. PAGESTIC DS F SPACE FOR TIC @VA09047 02012100
  2110. PAGEIOB DS F POINTER TO SLOT SORTED IOBLOK @VA09047 02012110
  2111. PAGERW DS D SPACE FOR READ/WRITE @VA09047 02012120
  2112. PAGEPRI EQU PAGERW+5 SPACE FOR REQUEST PRIORITY @VA09047 02012130
  2113. PAGESNS DS D SPACE FOR SENSE/TIC @VA09047 02012140
  2114. ORG PAGESNS+7 @VA09047 02012150
  2115. PAGESRCD DS X SPACE FOR SLOT NUMBER @VA09047 02012160
  2116. PAGESEEK DS D SPACE FOR SEEK ARGUMENT AND @VA09047 02012170
  2117. * SECTOR 02012180
  2118. ORG PAGESEEK+2 @VA09047 02012190
  2119. PAGECYL DS H SPACE FOR CYLINDER ADDRESS @VA09047 02012200
  2120. PAGEHEAD DS H SPACE FOR HEAD ADDRESS @VA09047 02012210
  2121. PAGERCD DS X SPACE FOR RECORD NUMBER @VA09047 02012220
  2122. PAGESECT DS X SECTOR NUMBER @VA09047 02012230
  2123. PAGESIZE EQU (*-IOBLOK)/8 SIZE OF EXTENDED IOBLOK IN @VA09047 02012240
  2124. * DOUBLE WORDS 02012250
  2125. EJECT 02012260
  2126. COPY TIMER @V2B2638 02013000
  2127. END 02014000
ibm/vm370-lib/cp/dmkmon.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator