MON TITLE 'DMKMON (CP) VM/370 - RELEASE 6' 00001000 ISEQ 73,80 VALIDATE SEQUENCING OF INPUT @V2B2638 00002000 COPY OPTIONS @V2B2638 00003000 COPY LOCAL @V2B2638 00004000 SPACE 4 00005000 DMKMON CSECT @V2B2638 00006000 MODID DC CL8'DMKMON' IDENTIFICATION FOR DUMPS @V2B2638 00007000 USING SAVEAREA,R13 @V2B2638 00008000 USING PSA,R0 @V2B2638 00009000 EJECT 00010000 *. 00011000 * 00012000 * MODULE NAME - 00013000 * 00014000 * DMKMON 00015000 * 00016000 * FUNCTION - 00017000 * 00018000 * TO PROCESS COMMANDS AND REQUESTS ASSOCIATED WITH THE 00019000 * MONITOR, INCLUDING MONITOR CALL INTERRUPTS WITHIN THE 00020000 * CONTROL PROGRAM. 00021000 * 00022000 * ATTRIBUTES - 00023000 * 00024000 * REENTRANT, PAGABLE, 00025000 * 00026000 * CALLED VIA: 00027000 * BRANCH FROM DMKPRG 00028000 * 00029000 * RE-ENTERED VIA: 00030000 * IOBLOK IRA AFTER MONITOR TAPE I/O INTERRUPT. 00031000 * TRQBLOK IRA AFTER TIME LAPSE EXPIRATION. 00032000 * 00033000 * ENTRY POINTS - 00034000 * 00035000 * DMKMONMI - TO PROCESS A MONITOR CALL PROGRAM INTERRUPT 00036000 * DMKMON00 - TO WRITE CLASS 0 RECORDS WHEN MON IS STARTED 00037000 * DMKMON40 - TO WRITE CLASS 4 RECORDS WHEN MON IS STARTED 00038000 * DMKMONPR - TO ALLOCATE A MONITOR RECORD 00039000 * DMKMONIO - TO PROCESS TAPE INTERRUPTS RETURNED BY DMKIOS 00040000 * DNKMONTI - TO HANDLE TIMER REQUEST INTERRUPTS 00041000 * 00042000 * ENTRY CONDITIONS - 00043000 * 00044000 * REFER TO THE PROLOG ASSOCIATED WITH EACH ENTRY POINT 00045000 * 00046000 * EXIT CONDITIONS - 00047000 * 00048000 * REFER TO THE PROLOG ASSOCIATED WITH EACH ENTRY POINT 00049000 * 00050000 * EXTERNAL REFERENCES / CALLS TO OTHER ROUTINES - 00051000 * 00052000 * THE FOLLOWING ARE FUNCTIONAL EXTERNAL REFERENCES 00053000 * OR ROUTINES WHICH ARE CALLED BY THE MONITOR. 00054000 * REFER TO THE DATA COLLECTION TABLE FOR ALL DATA 00055000 * EXTERNAL REFERENCES PERTAINING TO COUNTERS, ETC. 00056000 * 00057000 EXTRN DMKQCNWT WRITE A LINE TO THE CONSOLE @V2B2638 00058000 EXTRN DMKIOSQR REQUEST CP I/O TO A DEVICE @V2B2638 00059000 EXTRN DMKDSPCH FIND SOME OTHER WORK TO BE DONE @V2B2638 00060000 EXTRN DMKFREE OBTAIN A BLOCK OF FREE STORAGE @V2B2638 00061000 EXTRN DMKFRET RETURN A BLOCK OF FREE STORAGE @V2B2638 00062000 EXTRN DMKSTKCP STACK A CPEXBLOK @V2B2638 00063000 EXTRN DMKPRGC8 ENABLED CLASSES OF MONITOR EVENTS@V2B2638 00064000 EXTRN DMKPRGMI ADDRESS OF MONITOR INT HANDLER @V2B2638 00065000 EXTRN DMKPRGMC ADDRESS OF COMMUNICATIONS AREA @V2B2638 00066000 EXTRN DMKPRGTI INT BETWEEN TIMER COLLECTIONS @V2B2638 00067000 EXTRN DMKERMSG SEND AN ERROR MESSAGE @V2B2638 00068000 EXTRN DMKPTRUL UNLOCK A PAGE @V2B2638 00069000 EXTRN DMKPTRFT OBTAIN A PAGE OF FREE STORAGE @V2B2638 00070000 EXTRN DMKSCHST STACK A TIMER REQUEST BLOCK @V2B2638 00071000 EXTRN DMKSCHRT REMOVE A STACKED TIMER REQ BLOCK @V2B2638 00072000 EXTRN DMKMIAWO,DMKSYSMX @V50A2B5 00073000 EXTRN DMKPGTVR @V50A2B5 00074000 EXTRN DMKMIAX1,DMKMIAX2,DMKMIAY1,DMKMIAY2,DMKMIA @V50A2B5 00075000 EXTRN DMKCVTDT OBTAIN DATE AND TIME IN EBCDIC @V2B2638 00076000 EXTRN DMKCVTAB ABEND CVT001 IF CLOCK DAMAGED @VA04301 00077000 EXTRN DMKMNITR ROUTINE TO WRITE TRAILER RECORD @V4075A4 00078000 EXTRN DMKMNIFI ROUTINE TO CLOSE DOWN MONITOR @V4075A4 00079000 AIF (NOT &AP).LOKCT4 00079500 EXTRN DMKLOKCT LOCK COUNTERS @V4075A4 00080000 EXTRN DMKLOKSY SYSTEM LOCK COUNTERS @V4M0153 00081000 EXTRN DMKLOKFR DMKFRE LOCK COUNTERS @V4M0153 00082000 .LOKCT4 ANOP 00082500 EXTRN DMKFRENP ADDTIONAL DMKFRE LOCK COUNTERS @V4M0153 00083000 AIF (NOT &AP).LOKRL4 00083500 EXTRN DMKLOKRL RUNLIST LOCK COUNTERS @V4M0153 00084000 EXTRN DMKLOKTR TIMER REQUEST QUEUE COUNTERS @V4M0153 00085000 EXTRN DMKLOKDS DISPATCHER QUEUES COUNTERS @V4M0153 00086000 .LOKRL4 ANOP 00086100 EXTRN DMKIOSNM ALTERNATE PATH COUNTERS @V60BEBC 00086200 EXTRN DMKENTUT I/O UTILIZATION INTERVAL @V60BEBC 00086300 EXTRN DMKFREST ANCHOR FOR SUBPOOL SPLITS @V60BEBC 00086400 EXTRN DMKSYSAT MONITOR LIMIT FLAG @V60BEBC 00086500 EXTRN DMKENT62 ROUTINE TO GATHER I/O UTILIZATION@V60BEBC 00086600 EXTRN DMKMIACC MONITOR CLOSE SPOOL FILE RTN @V60BEBC 00086700 * 00087000 * REGISTER USAGE IN THIS MODULE - 00088000 * 00089000 * R0 - WORK REG 00090000 * R1 - WORK REG 00091000 * R2 - WORK REG 00092000 * R3 - WORK REG 00093000 * R4 - WORK REG 00094000 * R5 - BAL REG FOR PREPREC (AND FROM THERE TO SIO) ROUTINE 00095000 * R6 - RCHBLOK / RETURN ADDRESS FOR TIMER COLLECTION ROUTINES 00096000 * R7 - RCUBLOK / WORKREG 00097000 * R8 - RDEVBLOK / WORKREG 00098000 * R9 - MONCOM ADDRESS 00099000 * R10 - IOB ADDRESS WITHIN I/O ROUTINES AND I/O DATA COLLECTION 00100000 * R11 - VMBLOK ADDRESS 00101000 * R12 - BASE ADDRESS 00102000 * R13 - FOR MI ENTRY, R13 OF ISSUER 00103000 * R14 - BALR LINKAGE 00104000 * R15 - BALR LINKAGE 00105000 * 00106000 *. 00107000 EJECT 00108000 *. 00109000 * 00110000 * ENTRY POINT - 00111000 * 00112000 * DMKMONMI - MONITOR CALL PROGRAM INTERRUPT HANDLER 00113000 * 00114000 * ENTRY CONDITIONS - 00115000 * 00116000 * GPR12 - ENTRY POINT ADDRESS 00117000 * MONITOR CALL PROGRAM OLD PSW IN LOCATION X'28' 00118000 * MONITOR CALL CLASS HALFWORD IN MONCLASS X'94' 00119000 * MONITOR CALL CODE FULLWORD IN MONCODE X'9C' 00120000 * 00121000 * EXIT CONDITIONS 00122000 * 00123000 * NONE 00124000 * 00125000 * CALLS TO OTHER ROUTINES 00126000 * 00127000 * DMKIOSQR - TO INITIATE I/O FOR JUST FILLED DATA PAGE 00128000 * 00129000 * EXTERNAL REFERENCES 00130000 * 00131000 * REFER TO THE DATA COLLECTION TABLE FOR ALL EXTERNAL 00132000 * REFERENCES PERTAINING TO DATA COUNTERS, ETC. 00133000 * 00134000 * REGISTER USAGE - 00135000 * 00136000 * GPR0 - WORK REG. 00137000 * GPR1 - ADDRESS OF CURRENT BUFFER DATA ENTRY 00138000 * GPR2-4 WORK REGISTERS 00139000 * GPR5 - LINK TO THE BUFFER MANAGEMENT ROUTINE (PREPREC) 00140000 * GPR6 - RETURN REG FOR TIMER DATA COLLECTION ROUTINE 00141000 * GPR7 - WORK REG. 00142000 * GPR8 - ADDRESS OF RDEVBLOK (WHERE APPLICABLE) 00143000 * GPR9 - ADDRESS OF MONCOM 00144000 * GPR10 - ADDRESS OF IOBLOK (WHERE APPLICABLE) 00145000 * GPR11 - ADDRESS OF VMBLOK 00146000 * GPR12 - BASE REG. 00147000 * GPR13 - NOT USED 00148000 * GPR14 - WORK REG. 00149000 * GPR15 - WORK REG. 00150000 * 00151000 * OPERATION - 00152000 *  00153000 * MONITOR CALL INTERRUPT PROCESSING 00154000 * 00155000 * DMKMONMI: 00156000 * 00157000 * THE MONITOR CALL CLASS AND CODE ARE RETREIVED FROM 00158000 * PSA AND A BRANCH IS MADE TO THE APPROPRIATE MONITOR 00159000 * CLASS ROUTINE. 00160000 * 00161000 * FROM THE APPROPRIATE MONITOR CLASS ROUTINE A BRANCH 00162000 * IS MADE TO THE APPROPRIATE MONITOR CODE ROUTINE 00163000 * (THE DATA COLLECTION ROUTINE). 00164000 * 00165000 * EACH ROUTINE COLLECTING DATA CALLS THE BUFFER 00166000 * MANAGEMENT ROUTINE FOR THE AMOUNT OF SPACE NEEDED 00167000 * TO CONTAIN THE SPECIFIC RECORD. 00168000 * 00169000 * THE FOLLOWING IS A SUMMARY OF WHAT DATA EACH OF THE 00170000 * VARIOUS ROUTINES COLLECTS, AND THE COLLECTION 00171000 * VEHICLE. 00172000 * 00173000 * CLASS 0 - PERFORM (TIMER DRIVEN) 00174000 * CODE 0 - COLLECT SYSTEM CLOCKS AND 00175000 * COUNTERS. 00176000 * CODE 1 - COLLECT APU CLOCKS AND COUNTERS. 00177000 * CODE 97 - MONITOR TAPE HEADER RECORD, 00178000 * CREATED BY DMKMONTH. 00179000 * CODE 98 - MONITOR TAPE TRAILER RECORD, 00180000 * CREATED BY DMKMONIO. 00181000 * CODE 99 - MONITOR SUSPENSION DUE TO TAPE 00182000 * BUSY, CREATED BY DMKMONIO. 00183000 * 00184000 * CLASS 1 - RESPONSE (MONITOR CALL) 00185000 * CODE 0 - BEGIN A CONSOLE READ. 00186000 * CODE 1 - CONSOLE OUTPUT. 00187000 * CODE 2 - END A CONSOLE READ. 00188000 * CODE 3 - BEGIN SLEEP WITH TIME OUT. 00189000 * CODE 4 - USER LOGON 00190000 * CODE 5 - USER LOGOFF 00191000 * 00192000 * CLASS 2 - SCHEDULER (MONITOR CALL) 00193000 * CODE 2 - DROP USER FROM Q. 00194000 * CODE 3 - ADD USER TO Q. 00195000 * CODE 4 - ADD USER TO ELIGABLE LIST. 00196000 * 00197000 * CLASS 3 - RESERVED (MONITOR CALL) 00198000 * 00199000 * CLASS 4 - USER (TIMER DRIVEN) 00200000 * CODE 0 - COLLECT VIRT. MACH STATISTICS. 00201000 * 00202000 * CLASS 5 - INSTRUCTION SIMULATION (MONITOR CALL) 00203000 * CODE 0 - BEGIN INSTRUCTION. 00204000 * 00205000 * CLASS 6 - DASTAP (TIMER DRIVEN) 00206000 * CODE 0 - INITIALIZE AND CREATE DASTAP 00207000 * HEADER, CALLED FROM DMKMONTH. 00208000 * CODE 1 - COLLECT DEVICE INFORMATION. 00209000 * 00210000 * CLASS 7 - SEEKS (MONITOR CALL) 00211000 * CODE 0 - DASD SEEK CHANNEL PROGRAM ISSUED. 00212000 * 00213000 * CLASS 8 - SYSPROF (MONITOR CALL - VIA CLASS 2) 00214000 * CODE 2 - COLLECT DEVICE I/O COUNTS AND 00215000 * SYSTEM CLOCKS. 00216000 * 00217000 * AFTER THE APPROPRIATE MONITOR DATA IS COLLECTED THE 00218000 * GENERAL REGISTERS ARE RESTORED FROM DMKPRG AND 00219000 * SYSTEM PROCESSING RESUMES FROM THE PROGRAM OLD 00220000 * PSW. 00221000 * 00222000 * BUFFER MANAGEMENT: 00223000 * THE BUFFER MANAGEMENT ROUTINE MAINTAINS A POINTER 00224000 * TO THE BUFFER CURRENTLY COLLECTING DATA. IF A RECORD 00225000 * IS REQUESTED WHICH OVERFLOWS THE BUFFER, OR IF ONLY ONE 00226000 * BUFFER IS BEING USED AND THE NEXT RECORD WOULD OVERFLOW 00227000 * THE BUFFER, THEN A POINTER TO THE NEXT AVAILABLE BUFFER 00228000 * IS GOTTEN, AND CONTROL IS PASSED TO THE TAPE MANAGEMENT 00229000 * ROUTINE TO WRITE OUT THE BUFFER. 00230000 * 00231000 * TAPE I/O MANAGEMENT: 00232000 * THE TAPE MANAGEMENT ROUTINE KEEPS TRACK OF THE 00233000 * CURRENT STATUS OF THE TAPE. IF THE TAPE IS NOT 00234000 * BUSY THEN A CPEXBLOK IS STACKED WHICH WILL CALL 00235000 * DMKIOSQR TO WRITE THE BUFFER TO TAPE. AFTER THE 00236000 * CPEXBLOK IS STACKED, RETURN IS MADE FROM WHENCE WE 00237000 * CAME. 00238000 * IF THE TAPE IS BUSY, INDICATION IS MADE THAT I/O IS 00239000 * PENDING, SO THAT THE I/O INTERRUPT HANDLER WILL RE-START 00240000 * THE TAPE WHEN THE CURRENT I/O FINISHES. 00241000 * 00242000 * NOTE: WHEN THE CPEXBLOK IS UNSTACKED BY THE 00243000 * DISPATCHER A CALL IS MADE TO DMKFREE TO REPLACE THE 00244000 * BACK POCKET CPEXBLOK. THIS WILL NOT CAUSE AN 00245000 * EXTEND SINCE THE DISPATCHER JUST UNSTACKED AND 00246000 * FRETED THE CPEXBLOK. ALTHOUGH THE DISPATCHER FRET 00247000 * MAY HAVE CAUSED A DIS-EXTEND, RESULTING IN AN 00248000 * EXTEND ON THIS CALL; THIS EXTEND WOULD NOT INVOLVE 00249000 * I/O. 00250000 * 00251000 * SUSPENSION: 00252000 * IF NO BUFFERS ARE AVAILABLE THEN MONITORING IS SUSPENDED. 00253000 * IN THIS CASE, EACH BUFFER IS EITHER BEING WRITTEN TO 00254000 * TAPE, OR WAITING TO BE WRITTEN. A COUNT IS MAINTAINED 00255000 * IN THIS CASE, THERE ARE 2 FULL BUFFERS OF DATA. 00256000 * ONE HAS BEEN SCHEDULED TO GO TO TAPE BUT THE TAPE 00257000 * I/O HAS NOT COMPLETED AND THE OTHER BUFFER IS FULL 00258000 * AND WAITING TO GO TO TAPE. A COUNT IS MAINTAINED 00259000 * OF THE NUMBER OF TIMES THAT THIS CONDITION 00260000 * OCCURRS. A NOTE IS MADE THAT THE MONITOR IS 00261000 * SUSPENDED, ALONG WITH THE CURRENT TOD CLOCK VALUE. 00262000 * 00263000 * AT THIS POINT THE REASON FOR ENTRY INTO DMKMON IS 00264000 * IGNORED AND EXIT IS MADE BACK TO DMKPRG IF ENTRY 00265000 * WAS VIA AN MC INSTRUCTION OR TO THE DISPATCHER IF 00266000 * ENTRY WAS MADE VIA A TIMER INTERRUPT. THE MONITOR 00267000 * IS LEFT DISABLED FOR MC INTERRUPTS. IF A MONITOR 00268000 * TIMER INTERRUPT SHOULD OCCUR, THEN THE TIMER 00269000 * ROUTINE WILL BE DECEIVED INTO THINKING THAT THERE 00270000 * ARE NO EVENTS TO MONITOR. HOWEVER, THE NEXT TIMER 00271000 * INTERRUPT IS SET UP BEFORE HE EXITS TO THE 00272000 * DISPATCHER, SO THE TIMER INTERRUPT PROCESS IS NOT 00273000 * FORGOTTEN. 00274000 * 00275000 * THE MONITOR I/O INTERRUPT HANDLER WILL DETECT THE 00276000 * SUSPEND CONDITION AND DO WHAT IS NECESSARY TO 00277000 * RESUME MONITORING. SEE THE I/O INTERRUPT HANDLER 00278000 * FOR DETAILS OF THAT FUNCTION. 00279000 * 00280000 *. 00281000 EJECT 00282000 ENTRY DMKMONMI @V2B2638 00283000 DMKMONMI DS 0H @V2B2638 00284000 USING *,R12 @V2B2638 00285000 SL R12,=A(DMKMONMI-DMKMON) COMMON BASE ADDRESS @V2B2638 00286000 USING DMKMON,R12 @V2B2638 00287000 USING SAVEAREA,R13 @V2B2638 00288000 USING VMBLOK,R11 @V4075A4 00289000 USING MONCOM,R9 COMMUNICATIONS AREA DSECT @V2B2638 00290000 L R9,=A(DMKPRGMC) GET ADDR OF MONCOM @V2B2638 00291000 L R9,0(R9) ... @V2B2638 00292000 LTR R9,R9 HAS MONITOR BEEN SHUT DOWN? @V4075A4 00293000 BZ EXIT2 YES, MONCOM GONE, EXIT @V4075A4 00294000 TM MONFLAG1,CFSTOP TRYING TO SHUTDOWN MONITOR? @V4075A4 00295000 BNZ EXIT2 YES, EXIT @V4075A4 00296000 L R3,MONCODE MC INTERRUPT CODE FROM PSA @V2B2638 00297000 SLL R3,2 TIMES 4 FOR CODE BRANCH TABLE @V2B2638 00298000 LH R5,MONCLASS MC INTERRUPT CLASS FROM PSA @V2B2638 00299000 SLL R5,2 TIMES 4 FOR CLASS BRANCH TABLE @V2B2638 00300000 B MONBRTBL(R5) OFF TO CORRESPONDING BRANCH INST @V2B2638 00301000 SPACE 1 00302000 MONBRTBL B EXIT2 CLASS 0, TIMER, PERFORM @V2B2638 00303000 B MONCL1 CLASS 1, EVENT, RESPONSE @V2B2638 00304000 B MONCL2 CLASS 2, EVENT, SCHEDULER @V2B2638 00305000 B MONCL3 CLASS 3, EVENT, TIMING @V2B2638 00306000 B EXIT2 CLASS 4, TIMER, USER @V2B2638 00307000 B MONCL5 CLASS 5, EVENT, INSTSIM @V2B2638 00308000 B EXIT2 CLASS 6, TIMER, DASTAP @V2B2638 00309000 B MONCL7 CLASS 7, EVENT, SEEKS @V2B2638 00310000 B EXIT2 CLASS 8, EVENT, SYSTEM PROFILE @V2B2638 00311000 B EXIT2 RESERVED @V2B2638 00312000 B EXIT2 RESERVED @V2B2638 00313000 B EXIT2 RESERVED @V2B2638 00314000 B EXIT2 RESERVED @V2B2638 00315000 B EXIT2 RESERVED @V2B2638 00316000 B EXIT2 RESERVED @V2B2638 00317000 B EXIT2 RESERVED @V2B2638 00318000 EJECT 00319000 MONCL1 LA R1,ENDCL1-MONCODS1 GET LENGTH OF CL 1 BR TABLE @V2B2638 00320000 CR R3,R1 WILL BRANCH FALL WITHIN IT @V2B2638 00321000 BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00322000 B MONCODS1(R3) GO TO APPROPRIATE CLASS 1 RTN. @V2B2638 00323000 SPACE 1 00324000 MONCODS1 B MONCOD10 BEGIN CONSOLE READ OPERATION @V2B2638 00325000 B MONCOD11 CONSOLE OUTPUT LINE @V2B2638 00326000 B MONCOD12 END OF CONSOLE READ OPERATION @V2B2638 00327000 B MONCOD13 BEGIN SLEEP WITH TIMEOUT @V2B2638 00328000 B MONCOD14 USER LOGON 00329000 B MONCOD15 USER LOGOFF 00330000 ENDCL1 EQU * @V2B2638 00331000 SPACE 5 00332000 MONCL2 LA R1,ENDCL2-MONCODS2 GET LENGTH OF CL 2 BR TABLE @V2B2638 00333000 CR R3,R1 WILL BRANCH FALL WITHIN IT @V2B2638 00334000 BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00335000 B MONCODS2(R3) GO TO APPROPRIATE ROUTINE @V2B2638 00336000 SPACE 1 00337000 MONCODS2 B EXIT2 RESERVED @V2B2638 00338000 B EXIT2 RESERVED @V2B2638 00339000 B MONCOD22 DROP USER FROM Q @V2B2638 00340000 B MONCOD23 ADD USER TO Q @V2B2638 00341000 B MONCOD24 ADD USER TO ELIGABLE LIST @V2B2638 00342000 ENDCL2 EQU * @V2B2638 00343000 SPACE 5 00344000 MONCL3 LA R1,ENDCL3-MONCODS3 GET LENGTH OF CL 3 BR TABLE @V2B2638 00345000 CR R3,R1 WILL BRANCH FALL WITHIN IT @V2B2638 00346000 BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00347000 B MONCODS3(R3) BRANCH FOR CLASS 3 (TIMING) @V2B2638 00348000 SPACE 1 00349000 MONCODS3 B MONCOD30 BEGIN TIMING @V2B2638 00350000 B MONCOD31 END TIMING @V2B2638 00351000 ENDCL3 EQU * @V2B2638 00352000 SPACE 5 00353000 MONCL5 LA R1,ENDCL5-MONCODS5 GET LENGTH OF CL 5 BR TABLE @V2B2638 00354000 CR R3,R1 WILL BRANCH FALL WITHIN TABLE @V2B2638 00355000 BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00356000 B MONCODS5(R3) GO TO APPROPRIATE ROUTINE @V2B2638 00357000 SPACE 1 00358000 MONCODS5 B MONCOD50 BEGIN INSTRUCTION SIMULATION @V2B2638 00359000 ENDCL5 EQU * @V2B2638 00360000 SPACE 5 00361000 MONCL7 LA R1,ENDCL7-MONCODS7 GET LENGTH OF CL 7 BR TABLE @V2B2638 00362000 CR R3,R1 WILL BRANCH FALL WITHIN TABLE @V2B2638 00363000 BNL EXIT2 NO, NO DATA COLLECTION @V2B2638 00364000 B MONCODS7(R3) GO TO APPROPRIATE ROUTINE @V2B2638 00365000 SPACE 1 00366000 MONCODS7 B MONCOD70 COLLECT DATA ON DASD SEEKS @V2B2638 00367000 ENDCL7 EQU * @V2B2638 00368000 SPACE 5 00369000 EXIT2 LM R0,R15,MONREGS REST REGS AT MC TIME @V4M0117 00370000 LPSW PROPSW RETURN FROM WHENCE WE CAME..... @V2B2638 00371000 EJECT 00372000 *. 00373000 * 00374000 * ENTRY POINT - 00375000 * DMKMON00 - COLLECT CLASS 0, CODE 0 & 1 PERFORM DATA 00376000 * 00377000 * ENTRY CONDITIONS - 00378000 * 00379000 * R12 - ENTRY POINT ADDRESS 00380000 * R13 - SAVE AREA ADDRESS 00381000 * 00382000 * EXIT CONDITIONS - 00383000 * 00384000 * R0 - ADDRESS OF DMKMONIO 00385000 * 00386000 * CALLS TO OTHER ROUTINES - 00387000 * 00388000 * NONE 00389000 * 00390000 * EXTERNAL REFERENCES 00391000 * 00392000 * REFER TO THE DATA COLLECTION TABLE FOR ALL EXTERNAL 00393000 * REFERENCES PERTAINING TO DATA COUNTERS, ETC. 00394000 * 00395000 * REGISTER USAGE - 00396000 * 00397000 * GPR0 - WORK REG 00398000 * GPR1 - ADDRESS OF CURRENT BUFFER DATA ENTRY 00399000 * GPR2-4 - WORK REGS 00400000 * GPR5 - LINK TO THE BUFFER MANAGEMENT ROUTINE (PREPREC) 00401000 * GPR6 - ADDRESS OF RETURN POINT 00402000 * GPR7 - WORK REG 00403000 * GPR8 - ADDRESS OF RDEVBLOK 00404000 * GPR9 - ADDRESS OF MONCOM 00405000 * GPR10-11 - WORK REGS 00406000 * GPR12 - BASE REG 00407000 * GPR13 - SAVE AREA 00408000 * GPR14-15 - WORK REGS 00409000 * 00410000 * OPERATION - 00411000 * 00412000 * THIS ROUTINE IS NORMALLY CALLED INTERNALLY, VIA BAL 00413000 * TO MONCOD00. THE EXTERNAL ENTRY POINT IS PROVIDED 00414000 * SO THAT DMKMNITH (TAPE HEADER ROUTINE) CAN WRITE THE 00415000 * INITIAL PERFORM RECORDS, IF NECESSARY. PERFORMANCE 00416000 * RELATED COUNTERS IN VARIOUS SYSTEM MODULES ARE COLLECTED 00417000 * AND WRITTEN IN A CLASS 0 CODE 0 RECORD. IF THE ATTACHED 00418000 * PROCESSOR IS ACTIVE, CARE MUST BE TAKEN TO FETCH THOSE 00419000 * COUNTERS CONTAINED IN THE PSA FROM THE CPU'S PSA, AND, 00420000 * IT IS NECESSARY TO WRITE A CLASS 0 CODE 1 RECORD FOR 00421000 * COUNTERS CONTAINED IN THE ATTACHED PROCESSOR'S PSA, AND 00422000 * SPECIAL COUNTERS OF INTEREST IN THE AP ENVIRONMENT. 00423000 * 00424000 *. 00425000 ******* 00426000 * 00427000 * CLASS 0 CODE 0, PERFORM, TIMER DRIVEN COUNTER DATA COLLECTION 00428000 * 00429000 ******* 00430000 SPACE 00431000 DMKMON00 RELOC ENTRY FOR DMKMNITH @V4075A4 00432000 LA R6,EXITP SET R6 WITH RET ADDR FOR COMPAT @V4075A4 00433000 MONCOD00 EQU * @V50A2B5 00434000 L R1,=A(DMKMIA) ADDRESS OF DMKMIA @V50A2B5 00435000 TRANS 2,1,OPT=(SYSTEM,BRING,DEFER,LOCK) BRING IN @V50A2B5 00436000 LA R0,MNCLPERF SIMULATE EFFECTS @VMD0140 00437000 STH R0,MONCLASS OF A MONITOR @VMD0140 00438000 LA R0,MNCOSYS CALL CLASS ZERO, @VMD0140 00439000 ST R0,MONCODE CODE ZERO @VMD0140 00440000 LA R0,MN000LEN GET LENGTH OF THE RECORD @V50A2B5 00441000 BAL R5,PREPREC OBTAIN THE NECESSARY SPACE @V2B2638 00442000 BAL R5,TSTSUSP1 @VA10215 00442500 USING MN000,R1 ADDRESS THE RECORD @V2B2638 00443000 TM APSTAT1,APUOPER AM I RUNNING IN AP MODE? @V4075A4 00444000 BNO CPUDATA NO, NO NEED FOR SPECIAL PREFIX @V4075A4 00445000 TM APSTAT1,PROCIO AM I THE APU? @V4075A4 00446000 BO CPUDATA NO, NO NEED FOR SPECIAL PREFIX @V4075A4 00447000 L R2,PREFIXB APU MUST ADDRESS CPU'S PREFIX @V4075A4 00448000 * TO GATHER CPU PERFORM DATA 00449000 B PREFXOK1 GO GET THE DATA @V4075A4 00450000 CPUDATA SR R2,R2 ZERO PREFIX POINTER @V4075A4 00451000 PREFXOK1 LM R3,R4,IDLEWAIT-IPLPSW(R2) IDLE WAIT TIME @V4075A4 00452000 STM R3,R4,MN000WID SAVE VALUE IN RECORD @V4075A4 00453000 LM R3,R4,PAGEWAIT-IPLPSW(R2) PAGE WAIT TIME @V4075A4 00454000 STM R3,R4,MN000WPG SAVE VALUE IN RECORD @V4075A4 00455000 LM R3,R4,IONTWAIT-IPLPSW(R2) IONT WAIT TIME @V4075A4 00456000 STM R3,R4,MN000WIO SAVE VALUE IN RECORD @V4075A4 00457000 LM R3,R4,PROBTIME-IPLPSW(R2) PROBLEM TIME @V4075A4 00458000 STM R3,R4,MN000PRB SAVE VALUE IN RECORD @V4075A4 00459000 LR R7,R2 SAVE PSA POINTER @V4075A4 00460000 SPACE 00461000 LA R1,MN000PSI-MN000(R1) READJUST BUFFER POINTER @V2B2638 00462000 L R15,ASYSVM GET CORRECT SEG PAGES @V50A2B5 00463000 LCTL C1,C1,VMSEG-VMBLOK(R15) @V50A2B5 00464000 L R3,=A(DMKMIAX1) GET BEGINNING OF TABLE @V50A2B5 00465000 LRA R3,0(0,R3) TRANSLATE ADDRESS @V50A2B5 00466000 LA R4,4 INCREMENT VALUE @V2B2638 00467000 L R5,=A(DMKMIAX2) GET THE END OF THE TABLE @V50A2B5 00468000 LRA R5,0(0,R5) TRANSLATE ADDRESS @V50A2B5 00469000 COLLECTA L R2,0(R3) GET DATA ADDRESS @V2B2638 00470000 C R2,F4096 IS THIS A PSA FIELD? @V4075A4 00471000 BNL ADDOK NO, NO NEED FOR PREFIXING @V4075A4 00472000 AR R2,R7 YES, POINT TO APPROPRIATE PSA @V4075A4 00473000 ADDOK EQU * @V4075A4 00474000 MVC 0(4,R1),0(R2) MOVE DATA TO BUFFER @V2B2638 00475000 LA R1,4(R1) INCREMENT THE DATA FIELD PTR @V2B2638 00476000 BXLE R3,R4,COLLECTA AGAIN UNTIL DONE @V2B2638 00477000 SPACE 00478000 LM R3,R5,=A(DMKSCHW1,DMKSCHW2,DMKPRGTI) @V2B2638 00479000 DROP R1 @V2B2638 00480000 USING MN000Q1E,R1 RE-ESTABLISH THE BASE @V2B2638 00481000 MVC MN000Q1E,0(R3) NO. OF USERS WAITING TO ENTER Q1 @V2B2638 00482000 MVC MN000Q2E,0(R4) NO. OF USERS WAITING TO ENTER Q2 @V2B2638 00483000 MVC MN000INT,0(R5) INTVAL BETWEEN DATA COLLECTIONS @V2B2638 00484000 L R7,ARIODV GET START OF REAL DEVICES @V2B2638 00485000 L R2,=A(DMKSYSOC) GET COUNT OF SYSTEM ... @V2B2638 00486000 L R2,0(R2) ... OWNED VOLUMES @V2B2638 00487000 L R3,=A(DMKSYSOW) START OF SYS OWNED LIST @V2B2638 00488000 SLR R0,R0 CLEAR FOR FOLLOWING CALCULATIONS @VA03723 00489000 LR R4,R0 ... @VA03723 00490000 LR R14,R0 ... @VA03723 00491000 LR R15,R0 ... @VA03723 00492000 B NEXTENT NOW GO CHECK OUT FIRST ENTRY @V2B2638 00493000 SPACE 00494000 INDEX LA R3,8(R3) BUMP TO NEXT SYSTEM OWNED ENTRY @V2B2638 00495000 NEXTENT LH R8,6(R3) PICK UP INDEX @V2B2638 00496000 LTR R8,R8 IS THERE ONE? @V2B2638 00497000 BM NXTSYS NOPE, NO DEVICE HERE @V2B2638 00498000 SLL R8,3 CONVERT TO BYTE DISPLACEMENT @V2B2638 00499000 AR R8,R7 CREATE RDEVBLOK ADDRESS @V2B2638 00500000 USING RDEVBLOK,R8 ADDRESS IT... @V2B2638 00501000 IC R4,RDEVTYPE GET THE DEVICE TYPE CODE @VA03723 00502000 L R8,RDEVALLN GET PRIMARY ALLOCATION BLOCK @VA03723 00503000 DROP R8 NO MORE RDEVBLOK @VA03723 00504000 USING ALOCBLOK,R8 ADDRESS ALOCBLOK @VA03723 00505000 LTR R8,R8 IS THERE AN ALOCBLOK? @VA03723 00506000 BZ NXTSYS NOPE, THEN SKIP THIS DEVICE @VA03723 00507000 SRL R4,1 SHIFT DOWN BY ONE, SMALLER INDEX @VA03723 00508000 CLM R4,B'0001',F8+3 BIT IN THE HIGHER HALF ? @VA03723 00509000 BL LOWBITS NOPE, LOWER HALF, BR. @VA03723 00510000 SRL R4,4 SHIFT BIT IN UPPER HALF TO LOWER @VA03723 00511000 IC R0,TBLHIGH(R4) PICK UP MULTIPLIER (PAGES/CYL) @VA03723 00512000 B *+8 AND CONTINUE @VA03723 00513000 LOWBITS IC R0,TBLLOW(R4) PICK UP MULTIPLIER (PAGES/CYL) @VA03723 00514000 LH R5,ALOCMAX GET DEVICE CYL COUNT @VA03723 00515000 SH R5,ALOCNTMP REMOVE NON-TEMP CYLINDERS @VA03723 00516000 MR R4,R0 CYL * (PAGES/CYL) = PAGES @VA03723 00517000 AR R14,R5 ADD PAGES THIS DEVICE TO TOTAL @VA03723 00518000 LH R5,ALOCUSED GET NO CYLS CURRENTLY USED @VA03723 00519000 SH R5,ALOCNTMP REMOVE NON-TEMP CYLINDERS @VA03723 00520000 MR R4,R0 CYL * (PAGES/CYL) = PAGES @VA03723 00521000 AR R15,R5 ADD PAGES USED THIS DEV TO TOTAL @VA03723 00522000 DROP R8 NO MORE ALOCBLOK @VA03723 00523000 NXTSYS BCT R2,INDEX LOOK AT ALL OWNED DEVICES @VA03723 00524000 LTR R3,R14 GET TOTAL PAGES AVAILABLE @VA03723 00525000 BZ AVAIL0 NONE AVAILABLE (!?), BR @VA03723 00526000 LA R0,100 NO. OF PAGES PER PSEUDO CYLINDER @VA03723 00527000 DR R2,R0 CALC NO OF PSEUDO CYLINDERS AVAIL@VA03723 00528000 AVAIL0 STH R3,MN000PPC SAVE PSEUDO CYL. CAPACITY @VA03723 00529000 LTR R3,R15 GET TOTAL PAGES USED @VA03723 00530000 BZ ALOC0 NONE ALLOCATED (!?), BR. @VA03723 00531000 SLR R2,R2 CLEAR FOR DIVIDE @VA03723 00532000 DR R2,R0 CALC NO OF PSEUDO CYLINDERS USED @VA03723 00533000 ALOC0 STH R3,MN000PPA SAVE PSEUDO CYL USED COUNT @VA03723 00534000 ALTPCTRS L R2,=A(DMKIOSNM) GET ADDR ALT PATH COUNTERS @V60BEBC 00534100 MVC MN000ISD(16),0(R2) MOVE ALT PATH COUNTERS @V60BEBC 00534200 STUTCTRS L R2,=A(DMKFRENP) GET ADDR OF STORAGE COUNTERS @V60BEBC 00534300 MVC MN000EXT(8),0(R2) GET EXTEND,UNEXTEND COUNT @V60BEBC 00534400 L R2,=A(DMKFREST) GET ADDR OF SPLIT COUNTERS @V60BEBC 00534500 MVC MN000ATT(8),40(R2) GET ATTEMPTED + ACTUAL SPLITS@V60BEBC 00534600 TM APSTAT1,APUOPER ARE WE RUNNING AP? @V4075A4 00535000 BNO UNLOCK @VA08204 00536000 EJECT 00537000 ******* 00538000 * 00539000 * CLASS 0 CODE 1 PERFORM APU DATA 00540000 * 00541000 ******* 00542000 SPACE 2 00543000 MONCOD01 L R0,F1 SET UP TO CHANGE CODE @V4075A4 00544000 ST R0,MONCODE SAVE IT @V4075A4 00545000 LA R0,MN001LEN GET LENGTH OF RECORD @V4075A4 00546000 BAL R5,PREPREC GO GET A BUFFER @V4075A4 00547000 BAL R5,TSTSUSP1 @VA10215 00547500 TM APSTAT1,PROCIO AM I THE APU? @V4075A4 00548000 BZ APUDATA YES, NO NEED FOR SPECIAL PREFIX @V4075A4 00549000 L R2,PREFIXB NO, ADDRESS THE APU'S PSA @V4075A4 00550000 B PREFXOK2 GO GET THE DATA @V4075A4 00551000 APUDATA LA R2,0 CLEAR OUT R2 FOR APU CASE @V4075A4 00552000 USING MN001,R1 @V4075A4 00553000 PREFXOK2 LM R3,R4,IDLEWAIT-IPLPSW(R2) SYSTEM IDLE TIME @V4075A4 00554000 STM R3,R4,MN001WID @V4075A4 00555000 LM R3,R4,PAGEWAIT-IPLPSW(R2) SYSTEM PAGE WAIT @V4075A4 00556000 STM R3,R4,MN001WPG SAVE IT IN RECORD @V4075A4 00557000 LM R3,R4,IONTWAIT-IPLPSW(R2) SYSTEM I/O WAIT @V4075A4 00558000 STM R3,R4,MN001WIO SAVE IT IN RECORD @V4075A4 00559000 LM R3,R4,PROBTIME-IPLPSW(R2) SYSTEM PROBLEM TIME @V4075A4 00560000 STM R3,R4,MN001PRB SAVE IT IN RECORD @V4075A4 00561000 LA R1,MN001NXR-MN001(R1) POINT PAST TOD VALUES @V4075A4 00562000 L R15,ASYSVM GET CORRECT SEG TABLE @V50A2B5 00563000 LCTL C1,C1,VMSEG-VMBLOK(R15) @V50A2B5 00564000 L R3,=A(DMKMIAY1) GET BEGINNING OF THE TABLE @V50A2B5 00565000 LRA R3,0(0,R3) @V50A2B5 00566000 LA R4,4 LOAD INDEX INCREMENT @V4075A4 00567000 L R5,=A(DMKMIAY2) GET THE END OF THE TABLE @V50A2B5 00568000 LRA R5,0(0,R5) TRANSLATE IT @V50A2B5 00569000 COLLECTB L R7,0(R3) GET ADDRESS OF A COUNTER @V4075A4 00570000 C R7,F4096 IS IT IN THE PSA? @V4075A4 00571000 BNL ADDOK2 NO, NO PREFIX NEEDED @V4075A4 00572000 AR R7,R2 IN PSA, ADD IN PREFIX VALUE @V4075A4 00573000 ADDOK2 MVC 0(4,R1),0(R7) MOVE COUNTER VALUE INTO RECORD @V4075A4 00574000 LA R1,4(R1) POINT TO NEXT LOCATION IN RECORD @V4075A4 00575000 BXLE R3,R4,COLLECTB CHECK FOR END OF TABLE AND LOOP @V50A2B5 00576000 UNLOCK DS 0H @VA08204 00576500 L R2,=A(DMKMIA) GET ADDRESS OF PAGE TO UNLOCK @VA09228 00577000 LRA R2,0(0,R2) @VA08204 00577500 CALL DMKPTRUL @V50A2B5 00578000 BR R6 END OF APU COUNTER TABLE @V50A2B5 00579000 SPACE 5 00580000 * 10 20 40 XX 80 RDEVTYPE BIT POSITION 00581000 TBLHIGH DC AL1(057,150,032,000,000) 3330,3380,2314,X,0 HRC106DK 00582100 SPACE 00583000 * 01 02 04 XX 08 RDEVTYPE BIT POSITION 00584000 TBLLOW DC AL1(024,024,096,000,120) 3340,2305,3375,X,3350 HRC106DK 00585100 EJECT 00586000 ******* 00587000 * 00588000 * CLASS 1 CODE 0, RESPONSE, BEGIN CONSOLE READ 00589000 * 00590000 * CLASS 1 CODE 3, RESPONSE, BEGIN SLEEP WITH TIME OUT 00591000 * 00592000 * CLASS 1 CODE 4, RESPONSE, USER LOGON 00593000 * 00594000 * CLASS 1 CODE 5, RESPONSE, USER LOGOFF 00595000 * 00596000 ******* 00597000 SPACE 00598000 MONCOD10 EQU * @V2B2638 00599000 MONCOD14 EQU * 00600000 MONCOD15 EQU * 00601000 MONCOD13 LA R0,MN10XLEN RECORD LENGTH @V2B2638 00602000 BAL R5,PREPREC GET SPACE AND CREATE HEADER @V2B2638 00603000 BAL R5,TSTSUSP @VA10215 00603500 USING MN10X,R1 ADDRESS THE RECORD @V2B2638 00604000 BAL R5,USADD GET USER ID AND DEVICE ADDR @V2B2638 00605000 B EXIT2 DONE. @V2B2638 00606000 SPACE 5 00607000 ******* 00608000 * 00609000 * CLASS 1 CODE 1, RESPONSE, WRITE A LINE TO THE CONSOLE 00610000 * 00611000 * CLASS 1 CODE 2, RESPONSE, CONSOLE READ COMPLETE 00612000 * 00613000 ******* 00614000 SPACE 00615000 MONCOD11 EQU * @V2B2638 00616000 MONCOD12 L R6,MONREGS+R6*4 GET R6 AT MC TIME (CONTASK) @V4M0117 00617000 USING CONTASK,R6 00618000 LH R1,CONCNT GET BYTE COUNT FOR I/O LINE 00619000 C R1,=F'128' MAX OF 128 CHAR (3277 MAY BE MORE@V2B2638 00620000 BNH ADD11 NOT EXCEEDING MAX, OK AS IS @V2B2638 00621000 LA R1,128 TOO BIG , SET DEFAULT @V2B2638 00622000 ADD11 LA R0,MN10YLEN(,R1) ADJ FOR USERID, ADDR, CNT @V2B2638 00623000 BAL R5,PREPREC GET SPACE AND CREATE HEADER @V2B2638 00624000 BAL R5,TSTSUSP @VA10215 00624500 BAL R5,USADD GET USERID AND DEVICE ADDR @V2B2638 00625000 LH R2,CONCNT READ/WRITE COUNT 00626000 L R3,CONADDR DATA ADDRESS 00627000 DROP R6 00628000 C R2,=F'128' RESTRICT MAX LINE RECORDED TO 128@V2B2638 00629000 BNH STCOUNT WITHIN BOUNDS, COUNT OK AS IS @V2B2638 00630000 LA R2,128 TOO BIG SET MAX. @V2B2638 00631000 STCOUNT STC R2,MN10YCNT STORE IN MONITOR RECORD @V2B2638 00632000 LTR R2,R2 IS THERE ANY DATA? @V2B2638 00633000 BZ EXIT2 NOPE, DROP OUT IF NULL LINE @V2B2638 00634000 BCTR R2,0 LESS 1 FOR EXECUTE @V2B2638 00635000 EX R2,MOVEDATA COLLECT THE DATA @V2B2638 00636000 B EXIT2 DONE. @V2B2638 00637000 SPACE 5 00638000 MOVEDATA MVC MN10YIO(0),0(R3) CONSOLE INPUT/OUTPUT DATA @V2B2638 00639000 EJECT 00640000 USADD MVC MN10XUID,VMUSER MOVE USERID TO MONITOR BUFFER @V2B2638 00641000 L R8,VMTERM GET RDEVICE ADDR FOR THE TERMINAL@V2B2638 00642000 LTR R8,R8 IS THERE ONE? (DISCONNECTED?) @V2B2638 00643000 BZ DISCONN YES, DISCONNECTED, USE DUMMY @V2B2638 00644000 LR R4,R6 SAVE POSSIBLE CONTASK ADDR @VA03543 00645000 BAL R14,RDHEX GET THE DEVICE ADDR IN HEX @VA03543 00646000 STH R2,MN10XADD PUT DEV ADDR IN MONITOR RECORD @VA03543 00647000 LR R6,R4 RESTORE POSSIBLE CONTASK ADDR @VA03543 00648000 BR R5 RETURN TO CALLER @VA03543 00649000 SPACE 3 00650000 DISCONN MVC MN10XADD,F0 MAKE LINE ADDR 0 FOR DISC USER @V2B2638 00651000 BR R5 AND NOW RETURN @V2B2638 00652000 DROP R1 00653000 EJECT 00654000 ******* 00655000 * 00656000 * CLASS 2, CODE 2, SCHEDULE, DROP USER FROM QUEUE 00657000 * 00658000 ******* 00659000 SPACE 00660000 MONCOD22 LA R0,MN202LEN LENGTH OF THE RECORD @V2B2638 00661000 BAL22 BAL R5,PREPREC GET SPACE AND CREATE HEADER @V2B2638 00662000 BAL R5,TSTSUSP @VA10215 00662500 USING MN20X,R1 ADDRESS THE DSECT @V2B2638 00663000 LM R2,R7,=A(DMKDSPNP,DMKSCHPU,DMKSCHW1,DMKSCHW2,DMKSCHN1,DMX00664000 KSCHN2) 00665000 MVC MN20XUID,VMUSER USERID BEING ADDED/DROPPED @V2B2638 00666000 MVC MN20XNPP,0(R2) NO. OF PAGABLE PAGES @V2B2638 00667000 MVC MN20XSWS,0(R3) SUM OF WORKING SETS OF IN Q USERS@V2B2638 00668000 MVC MN20XQ1N,0(R6) NO. OF USERS IN Q1 @V2B2638 00669000 MVC MN20XQ2N,0(R7) NO. OF USERS IN Q2 @V2B2638 00670000 MVC MN20XQ1E,0(R4) NO. OF USERS WAITING TO ENTER Q1 @V2B2638 00671000 MVC MN20XQ2E,0(R5) NO. OF USERS WAITING TO ENTER Q2 @V2B2638 00672000 MVC MN20XWSS,VMWSPROJ PROJECTED WSS FOR THIS USER @V2B2638 00673000 IC R2,TRACPROC GET CP TRACE PROCESSOR ID @V4075A4 00674000 STC R2,MN20XPRC SAVE IT IN RECORD @V4075A4 00675000 CLC MONCODE(4),F3 WAS IT CODE 2,3, OR 4 @V2B2638 00676000 BE COD23 ITS MC CODE 3 FOR ADD Q @V2B2638 00677000 SPACE 00678000 MVC MN20YTTI,VMTTIME GET SUPERVISORY TIME @V2B2638 00679000 MVC MN20YVTI,VMVTIME GET VIRT MACHINE TIME @V2B2638 00680000 CLC MONCODE,F4 CODE 4? @V2B2638 00681000 BE COD24 YUP, BR @V2B2638 00682000 SPACE 00683000 MVC MN202PRI,VMQPRIOR PRIORITY TO RE-ENTER Q @V2B2638 00684000 L R2,=A(DMKSCHAL) CODE 2 DROP Q, NOW WHICH ONE @V2B2638 00685000 TM 0(R2),Q1DROP WAS HE DROPPED FROM Q1 ? @V2B2638 00686000 MVI MN20XQNM,X'01' SET INDICATOR IN RECORD @V2B2638 00687000 BO *+8 YES, NO CHANGES @V2B2638 00688000 MVI MN20XQNM,X'02' NO, SHOW DROP FROM Q2 @V2B2638 00689000 TM 0(R2),X'20' WAS USER TIME SLICE ENDED? @V2B2638 00690000 BZ *+8 NO, SKIP FLAG SETTING @V2B2638 00691000 OI MN20XQNM,X'64' ADD 100 TO 'QUEUE' VARIABLE @V2B2638 00692000 L R2,VMPGREAD TOTAL PAGE READS @V2B2638 00693000 S R2,VMRDINQ LESS NUMBER STORED AT ENTRY @V2B2638 00694000 STH R2,MN202PGR IS PAGE READS WHILE IN Q. @V2B2638 00695000 MVC MN202APR,VMPGRINQ+2 SUM OF PAGES RES @ PAGE READ@VA03126 00696000 XC MN202REF,MN202REF FIELD RESERVED FOR IBM USE @VA09337 00697700 MVC MN202RES,VMPAGES PAGES RESIDENT @V2B2638 00699000 MVC MN202PST,VMSTEALS NO. OF WAITS FOR STOLEN PGS @V2B2638 00700000 MVC MN202IOC,VMIOCNT USER NON-SPOOLED IO CNT @V2B2638 00701000 MVC MN202PNC,VMPNCH USER CARDS PUNCHED @V2B2638 00702000 MVC MN202LIN,VMLINS USER LINES PRINTED @V2B2638 00703000 MVC MN202CRD,VMCRDS USER CARDS READ @V2B2638 00704000 MVC MN202LPR,VMLSTPRC LAST PROBLEM STATE PU @V60BEBC 00704500 TM CPCREG8+3,SPROFCL SYSTEM PROFILE CLASS ACTIVE? @V2B2638 00705000 BO MONCOD82 YES, MORE DATA TO COLLECT @V2B2638 00706000 B EXIT2 FINISHED WITH IT FOR THIS LAP @V2B2638 00707000 EJECT 00708000 ******* 00709000 * 00710000 * CLASS 2 CODE 3, SCHEDULE, ADD USER TO QUEUE 00711000 * 00712000 ******* 00713000 SPACE 00714000 MONCOD23 LA R0,MN203LEN LENGTH OF THIS RECORD @V2B2638 00715000 B BAL22 JOIN DROP QUEUE DATA COLLECTION @V2B2638 00716000 SPACE 3 00717000 COD23 L R2,MONREGS+R15*4 R15 AT MC TIME = A(QUEUE) @V4M0117 00718000 L R3,=A(DMKSCHQ1) ADDRESS OF Q1 @V2B2638 00719000 CR R2,R3 WAS USER ADDED TO Q1? @V2B2638 00720000 MVI MN20XQNM,X'01' ASSUME SO @V2B2638 00721000 BE NOTQ2AD ASSUMPTION CORRECT. @V2B2638 00722000 MVI MN20XQNM,X'02' INDICATE ADD TO Q2 @V2B2638 00723000 NOTQ2AD EQU * @V4075A4 00724000 TM CPCREG8+3,SPROFCL SYSTEM PROFILE CLASS ACTIVE? @V2B2638 00725000 BO MONCOD82 YES, MORE DATA TO COLLECT @V2B2638 00726000 B EXIT2 NO, DONE WITH THIS LAP @V2B2638 00727000 SPACE 5 00728000 ******* 00729000 * 00730000 * CLASS 2 CODE 4, SCHEDULE, ADD USER TO ELIGABLE LIST 00731000 * 00732000 ******* 00733000 SPACE 00734000 MONCOD24 LA R0,MN204LEN LENGTH OF THIS RECORD @V2B2638 00735000 B BAL22 JOIN COMMON CODE @V2B2638 00736000 SPACE 1 00737000 COD24 MVC MN204PRI,VMEPRIOR ELIGABLE LIST PRIORITY @V2B2638 00738000 TM VMQLEVEL,VMQ1 TO BE ADDED TO Q1 ELIG. LIST? @V2B2638 00739000 MVI MN20XQNM,X'01' ASSUME YES. @V2B2638 00740000 BO EXIT2 ASSUMPTION CORRECT, DONE. @V2B2638 00741000 MVI MN20XQNM,X'02' NO, Q2 ELIG. LIST @V2B2638 00742000 TM VMQLEVEL,VMAEX HIGH PRIOR. Q2? @V2B2638 00743000 BZ EXIT2 NO, DONE @V2B2638 00744000 OI MN20XQNM,X'64' YES, 'OR' DEC 100 @V2B2638 00745000 B EXIT2 DONE. @V2B2638 00746000 EJECT 00747000 ******* 00748000 * 00749000 * CLASS 3 CODE 0-1, TIMING, RECORD TIMING EVENTS 00750000 * 00751000 ******* 00752000 SPACE 00753000 MONCOD30 EQU * BEGIN AND END OF TIMING ARE SAME @V2B2638 00754000 MONCOD31 LA R0,4 BASE REG DATA ONLY HERE. @V2B2638 00755000 BAL R5,PREPREC GET SPACE & CREATE HEADER @V2B2638 00756000 BAL R5,TSTSUSP @VA10215 00756500 MVC 0(4,R1),MONREGS+R12*4 GET BASE REG AT MC TIME @V4M0117 00757000 B EXIT2 DONE @V2B2638 00758000 EJECT 00759000 *. 00760000 * 00761000 * ENTRY POINT - 00762000 * 00763000 * DMKMON40 - COLLECT USER STATISTICS 00764000 * 00765000 * ENTRY CONDITIONS - 00766000 * 00767000 * GPR12 - ENTRY POINT 00768000 * GPR13 - SAVE AREA 00769000 * 00770000 * EXIT CONDITIONS - 00771000 * 00772000 * NONE 00773000 * 00774000 * CALLS TO OTHER ROUTINES - 00775000 * 00776000 * NONE 00777000 * 00778000 * REGISTER USAGE - 00779000 * 00780000 * R0 - WORK REG 00781000 * R1 - ADDRESS OF CURRENT BUFFER DATA ENTRY 00782000 * R2-R4 - WORK REGS 00783000 * R5 - LINK TO PREPREC 00784000 * R6 - RETURN ADDRESS 00785000 * R7 - WORK REG 00786000 * R8 - VMBLOK 00787000 * R9 - MONCOM 00788000 * R10 - VMBLOK 00789000 * R11 - NOT USED 00790000 * R12 - ADDRESS OF DMKMON 00791000 * R13 - SAVE AREA 00792000 * R14-R15 - WORK REGS 00793000 * 00794000 * OPERATION - 00795000 * 00796000 * LIKE DMKMON00, THIS ENTRY POINT IS PROVIDED SO THAT 00797000 * DMKMNITH CAN INVOKE THE USER DATA COLLECTION ROUTINE 00798000 * WHEN THE MONITOR IS STARTED. BEGINNING WITH THE SYSTEM 00799000 * VMBLOK, A RECORD IS WRITTEN FOR THE STATISTICS IN EACH 00800000 * VMBLOK IN THE SYSTEM. 00801000 * 00802000 *. 00803000 ******* 00804000 * 00805000 * CLASS 4 CODE 0, USER, COLLECT USER STATISTICS 00806000 * 00807000 ******* 00808000 SPACE 00809000 DMKMON40 RELOC EXTERNAL ENTRY FOR DMKMNITH @V4075A4 00810000 LA R6,EXITP SET R6 WITH RET ADDR FOR COMPAT @V4075A4 00811000 MONCOD40 OI MONFLAG1,MONSYSVM IND WORKING WITH SYS VMBLOK @V4075A4 00812000 L R8,ASYSVM START WITH THE SYSTEM VMBLOK @V2B2638 00813000 LR R0,R11 SAVE R11 VALUE @V4M0203 00814000 LR R11,R8 SET UP R11 TEMPORARILY @V4M0203 00815000 CHARGE SYNC SYNCHRONIZE TIMER @V4M0203 00816000 LR R11,R0 RESTORE R11 @V4M0203 00817000 B DOSYS COLLECT SYSTEM WITHOUT CHECK @V2B2638 00818000 DROP R11 @V2B2638 00819000 USING VMBLOK,R8 @V2B2638 00820000 MOVUDATA DS 0H @V2B2638 00821000 TM VMRSTAT,VMLOGON IS USER REALLY ON? @V2B2638 00822000 BO SKIPUSER ONLY HALF THERE, SKIP HIM. @V2B2638 00823000 DOSYS LA R0,MN400LEN LENGTH OF RECORD TO BE COLLECTED @V2B2638 00824000 BAL R5,PREPREC GET SPACE & CREATE HEADER @V2B2638 00825000 BAL R5,TSTSUSP1 @VA10215 00825500 USING MN400,R1 ADDRESS THE BLOCK @V2B2638 00826000 MVC MN400UID,VMUSER OBVIOUSLY WE NEED HIS ID @V2B2638 00827000 MVC MN400TTI,VMTTIME SUPERVISOR TIME @V2B2638 00828000 MVC MN400VTI,VMVTIME PROBLEM TIME @V2B2638 00829000 MVC MN400PGR,VMPGREAD NO. OF PAGE READS @V2B2638 00830000 MVC MN400PGW,VMPGWRIT NO. OF PAGE WRITES @V2B2638 00831000 MVC MN400IOC,VMIOCNT VIRTUAL NON SPOOLED SIO CNT @V2B2638 00832000 MVC MN400PNC,VMPNCH NO. OF CARDS PUNCHED @V2B2638 00833000 MVC MN400LIN,VMLINS NO. OF LINES PRINTED @V2B2638 00834000 MVC MN400CRD,VMCRDS NO. OF CARDS READ @V2B2638 00835000 MVC MN400RST(4),VMRSTAT RSTAT, DSTAT, OSTAT, QSTAT @V2B2638 00836000 MVC MN400PST(4),VMPSTAT PSTAT, ESTAT, TCNTL, MLEVL @V2B2638 00837000 MVC MN400QLV(4),VMQLEVEL QLVL, CLEVL, TLEVL, PEND @V2B2638 00838000 MVC MN400UPR,VMUPRIOR DIRECTORY OR 'SET' PRIORITY @V2B2638 00839000 MVI MN4RSV1,X'00' RESERVED FIELD = 0 @V2B2638 00840000 MVC MN400RES,VMPAGES NO. OF PAGES RESIDENT @V2B2638 00841000 MVC MN400WSS,VMWSPROJ ESTIMATED WORKING SET SIZE @V2B2638 00842000 MVC MN400PDR,VMPDRUM DRUM ALLOCATED PAGE FRAMES @V2B2638 00843000 MVC MN400PDK,VMPDISK DISK ALLOCATED PAGE FRAMES @V2B2638 00844000 L R2,=A(DMKPRGTI) ADDRESS OF THE INTERVAL @V2B2638 00845000 MVC MN400INT,0(R2) INTERVAL BETWEEN DATA COLLECTIONS@V2B2638 00846000 MVC MN400LPR,VMLSTPRC LAST PROBLEM STATE PU @V60BEBC 00846500 SKIPUSER TM MONFLAG1,MONSYSVM WORKING WITH SYSTEM VMBLOK? @V4075A4 00847000 BO SETEND YES, GO GET POINTER TO LAST USER @V4075A4 00848000 CR R8,R10 NO RELOAD, USUAL CASE. DONE YET? @V2B2638 00849000 BER R6 YUP, EXIT THEN. @V2B2638 00850000 L R8,VMPNT NEXT, PLEASE. @V2B2638 00851000 B MOVUDATA GO EXAMINE THIS USER. @V2B2638 00852000 SPACE 00853000 SETEND NI MONFLAG1,255-MONSYSVM NOT USING SYS VMBLOK @V4075A4 00854000 L R10,VMPNT SYSTEM IS USER 0, LAST IS USER 1 @V4075A4 00855000 LTR R10,R10 IS THE SYSTEM THE ONLY ONE ON? @V2B2638 00856000 BZR R6 YES, THEN DONE NOW. @V2B2638 00857000 L R8,VMPNT-VMBLOK(R10) AIM AT USER NO. 2 @V2B2638 00858000 B MOVUDATA AND GO EXAMINE HIM. @V2B2638 00859000 DROP R1,R8 @V2B2638 00860000 USING VMBLOK,R11 @V2B2638 00861000 EJECT 00862000 ******* 00863000 * 00864000 * CLASS 5 CODE 0, INSTSIM, INSTRUCTION SIMULATION 00865000 * 00866000 ******* 00867000 MONCOD50 LA R0,MN500LEN LENGTH OF THE RECORD @V2B2638 00868000 BAL R5,PREPREC GET SPACE & CREATE HEADER @V2B2638 00869000 BAL R5,TSTSUSP @VA10215 00869500 USING MN500,R1 ADDRESS THE RECORD @V2B2638 00870000 MVC MN500UID,VMUSER USERID ISSUING INSTRUCTION @V2B2638 00871000 MVC MN500INS,VMINST GET THE INSTRUCTION @V2B2638 00872000 MVC MN500VAD,VMPSW+4 GET THE VIRT INST. ADDR @V2B2638 00873000 MVI MN500VAD,X'00' CLEAR TOP BYTE @V2B2638 00874000 STPT MONCLOCK GET USERS CURRENT TOTAL TIME @V2B2638 00875000 MVC MN500OVH,MONCLOCK MOVE IT INTO DATA RECORD @V2B2638 00876000 B EXIT2 @V2B2638 00877000 DROP R1 @V2B2638 00878000 EJECT 00879000 ******* 00880000 * 00881000 * CLASS 6 CODE 1, DASTAP, COLLECT DEVICE STATISTICS 00882000 * 00883000 * REGISTER USAGE IN THIS ROUTINE: 00884000 * 00885000 * R0 - DEVICE COUNT 00886000 * R1 - CHANNEL INDEX 00887000 * R2 - CONTROL UNIT INDEX 00888000 * R3 - DEVICE INDEX 00889000 * R4 - BXLE INCREMENT CONSTANT 00890000 * R5 - BXLE COMPARAND VALUE 00891000 * R6 - CHANNEL BLOCK ADDRESS / DEVICE TYPE BYTE 00892000 * R7 - CONTROL UNIT BLOCK ADDRESS 00893000 * R8 - DEVICE BLOCK ADDRESS 00894000 * R9 - MONCOM ADDRESS 00895000 * R10 - POINTER WITHIN DEVICE LIST FOR PASS 2 00896000 * R11 - VMBLOCK ADDRESS 00897000 * R12 - BASE REGISTER 00898000 * R13 - NOT USED 00899000 * R14 - DEVICE TYPE CHECK BYTE / BALR TO DMKFREE 00900000 * R15 - POINTER WITHIN MN600 RECORD FOR PASS 2 00901000 * 00902000 ******* 00903000 USING RDEVBLOK,R8 @V2B2638 00904000 MONCOD61 LH R1,MONDVNUM GET THE NUMBER OF DEVICES @V2B2638 00905000 MH R1,=AL2(MN600DLN) LENGTH OF EACH RECORD @V2B2638 00906000 LA R0,MN600HLN(R1) PLUS LENGTH OF HDR -> R0 @V2B2638 00907000 BAL R5,PREPREC GET SPACE AND CREATE REC HEADER @V2B2638 00908000 BAL R5,TSTSUSP1 @VA10215 00908500 USING MN600HDR,R1 @V4075A4 00909000 LH R3,MONDVNUM GET THE NUMBER OF DEVICES @V2B2638 00910000 STH R3,MN600NUM PUT IN THE BUFFER/USE IT FOR BCT @V2B2638 00911000 LA R1,MN600HLN(R1) REPOSITION FIELD POINTER @V2B2638 00912000 DROP R1 DROP HEADER DSECT @V2B2638 00913000 USING MN600DEV,R1 SWITCH TO RECORD DSECT @V2B2638 00914000 L R2,MONDVLST ADDRESSS OF DEVICE LIST @V2B2638 00915000 USING RCUBLOK,R7 @V2B2638 00916000 USING RCHBLOK,R5 @V2B2638 00917000 MOVEADD L R8,0(R2) NEXT DEVICE BLOCK POINTER @V2B2638 00918000 L R7,RDEVCUA PICK UP CONTROL UNIT ADDRESS @V2B2638 00919000 MVC MN600ADD,RDEVADD GET THE DEVICE ADDRESS @V2B2638 00920000 OC MN600ADD+1(1),RCUADD+1 AND CONTROL UNIT ADDR @V2B2638 00921000 TM RCUTYPE,RCUSUB IS THIS A SUB-CONTROL BLOCK? @V2B2638 00922000 BZ *+8 NOPE, CU BLOCK PTR IS OK AS IS @V2B2638 00923000 L R7,RCUPRIME PICK UP ADDR OF THE PRIME CU @V2B2638 00924000 L R5,RCUCHA PICK UP ADDR OF THE CH BLOCK @V2B2638 00925000 OC MN600ADD(1),RCHADD ADD CHANNEL ADDRESS @V2B2638 00926000 MVC MN600TY,RDEVTYPC DEVICE TYPE CODE @V2B2638 00927000 MVC MN600SER,RDEVSER VOLUME SERIAL NUMBER @V2B2638 00928000 MVC MN600CNT,RDEVIOCT I/O COUNT FOR THIS DEVICE @V2B2638 00929000 LA R2,MNDEVLEN(R2) NEXT DEVICE BLOCK @V60BEBC 00930000 LA R1,MN600DLN(R1) NEXT MONITOR RECORD FIELD @V2B2638 00931000 BCT R3,MOVEADD GO DO THE NEXT DEVICE @V2B2638 00932000 L R2,MONUTRB UTILIZATION ACTIVE?? @V60BEBC 00933000 LTR R2,R2 WAS IT SPECIFIED? @V60BEBC 00933100 BZR R6 NO, DON'T COLLECT DATA @V60BEBC 00933200 L R3,MONCHPTR GET NUMBER OF SAMPLES @V60BEBC 00933300 LH R3,0(R3) SAMPLES TO REG 3 @V60BEBC 00933400 LTR R3,R3 ANY SAMPLES TAKEN SINCE LAST TIM@V60BEBC 00933500 BZR R6 NO, DON'T COLLECT DATA @V60BEBC 00933600 DROP R1,R5,R7,R8 @V2B2638 00934000 EJECT 00935000 *** @V60BEBC 00935070 * @V60BEBC 00935140 * CLASS 6, CODE 2, DASTAP, I/O UTILIZATION @V60BEBC 00935210 * @V60BEBC 00935280 *** @V60BEBC 00935350 MONCOD62 LH R1,MONDVNUM GET NUMBER OF DEVICES @V60BEBC 00935420 MH R1,=AL2(MN602DLN) LENGTH OF EACH RECORD @V60BEBC 00935490 LA R0,2 SIMULATE CODE 2 @V60BEBC 00935560 ST R0,MONCODE MONITOR CALL FOR DASTAP @V60BEBC 00935630 LA R0,MN602HLN(R1) REC LENGTH PLUS HDR LENGTH TO R0@V60BEBC 00935700 BAL R5,PREPREC GET SPACE AND CREATE HEADER @V60BEBC 00935770 BAL R5,TSTSUSP1 @VA10215 00935810 CALL DMKENT62 COLLECT UTILIZATION DATA @V60BEBC 00935840 BR R6 RETURN @V60BEBC 00935910 ******* 00936000 * 00937000 * CLASS 7 CODE 0, SEEKS, COLLECT DASD ARM MOVEMENT STATISTICS 00938000 * 00939000 ******* 00940000 SPACE 00941000 MONCOD70 LA R0,MN700LEN LENGTH OF THE RECORD @V2B2638 00942000 BAL R5,PREPREC GET SPACE & CREATE HEADER @V2B2638 00943000 BAL R5,TSTSUSP @VA10215 00943500 USING MN700,R1 ADDRESS THE BLOCK @V2B2638 00944000 MVC MN700UID,VMUSER REQUESTOR @V2B2638 00945000 USING RCHBLOK,R6 @V2B2638 00946000 USING RCUBLOK,R7 @V2B2638 00947000 USING RDEVBLOK,R8 @V2B2638 00948000 USING IOBLOK,R10 @V2B2638 00949000 L R8,MONREGS+R8*4 RESTORE R8 TO VALUE AT MC TIME @V4M0117 00950000 L R10,MONREGS+R10*4 RESTORE R10 AS WELL @V4M0117 00951000 BAL R14,RDHEX GET REAL DEV ADDR IN HEX @VA03543 00952000 STH R2,MN700ADD PUT REAL DEV ADDR IN THE RECORD @VA03543 00953000 MVC MN700CYL,IOBCYL CYL SEEK ADD. @V2B2638 00954000 TM IOBFLAG,IOBPAG IS THIS A PAGING OPERATION @VA09047 00954100 BNO NOTPAGSK NO NOT PAGING OPERATION @VA09047 00954200 MVC MN700CYL,PAGECYL CYL SEEK ADDRESS @VA09047 00954300 NOTPAGSK DS 0H @VA09047 00954400 MVC MN700CCY,RDEVCYL CURRENT ARM POSITION @V2B2638 00955000 MVC MN700QDV,RDEVQCNT DEVICE QUEUED TASK COUNT @V2B2638 00956000 MVC MN700QCU,RCUQCNT+1 C.U. QUEUED TASK COUNT @V2B2638 00957000 MVC MN700QCH,RCHQCNT+1 CHANNEL QUEUED TASK CNT @V2B2638 00958000 TM RDEVFLAG,RDEVSKUP TEST SEEK DIRECTION FLAG @V2B2638 00959000 BZ SEKNOTUP GOING DOWN THE VOLUME @V2B2638 00960000 MVI MN700DIR,X'01' SET SEEK UP FLAG IN DATA RECORD @V2B2638 00961000 B EXIT2 DONE @V2B2638 00962000 SEKNOTUP MVI MN700DIR,X'00' SET SEEK DOWN FLAG @V2B2638 00963000 B EXIT2 DONE @V2B2638 00964000 SPACE 3 00965000 RDHEX EQU * CONVERT RDEVBLOK PTR TO HEX @VA03543 00966000 * REAL DEV ADDR 00967000 LH R2,RDEVADD GET DEVICE ADDRESS @VA03543 00968000 L R7,RDEVCUA ADDRESS OF CU BLOCK @VA03543 00969000 LH R3,RCUADD GET CU ADDRESS @VA03543 00970000 OR R2,R3 ADD CU ADDRESS TO DEV ADDRESS @VA03543 00971000 TM RCUTYPE,RCUSUB IS THIS A SUB CONTROL UNIT ? @VA03543 00972000 BZ *+8 NOPE, BRANCH @VA03543 00973000 L R7,RCUPRIME GET ADDRESS OF PRIME CU @VA03543 00974000 L R6,RCUCHA NOW GET ADDRESS OF CH BLOCK @VA03543 00975000 LH R3,RCHADD GET CHANNEL ADDRESS @VA03543 00976000 OR R2,R3 ADD IN CH ADDRESS @VA03543 00977000 BR R14 RETURN TO CALLER @VA03543 00978000 DROP R1,R6,R7,R8,R10 @VA03543 00979000 EJECT 00980000 ******* 00981000 * 00982000 * CLASS 8 CODE 2, SYSPROF, DEVICE STATISTICS AND SYSTEM CNTRS 00983000 * 00984000 ****** 00985000 SPACE 00986000 MONCOD82 LA R0,MNCLSYS SIMULATE SYSTEM PROFILE CLASS @VM01017 00987000 STH R0,MONCLASS ... @V2B2638 00988000 LA R0,MNCODA ... @VM01017 00989000 ST R0,MONCODE ... @V2B2638 00990000 LH R1,MONDVNUM NUMBER OF DEVICES @V2B2638 00991000 LR R6,R1 SAVE FOR BCT LOOP @V2B2638 00992000 SLL R1,2 4 BYTES PER DEVICE @V2B2638 00993000 LA R0,MN802DLN+MN802CLN(R1) XTRA DATA LEN -> R0 @V2B2638 00994000 BAL R5,PREPREC GET SPACE AND CREATE HEADER @V2B2638 00995000 BAL R5,TSTSUSP @VA10215 00995500 USING MN802DEV,R1 ADDRESS THE DEVICE PORTION @V2B2638 00996000 STH R6,MN802NUM NUMBER OF DEV. INTO THE REC @V2B2638 00997000 L R2,MONDVLST START OF DEVICE ADD. LIST @V2B2638 00998000 MOVEADDR L R8,0(R2) PICK UP RDEVBLOK ADDRESS @V2B2638 00999000 USING RDEVBLOK,R8 ADDRESS THE RDEVBLOK @V2B2638 01000000 MVC MN802CNT,RDEVIOCT COUNT OF I/O TO THIS DEVICE @V2B2638 01001000 LA R1,4(,R1) BUMP TO NEXT DATA SLOT @V2B2638 01002000 LA R2,MNDEVLEN(R2) BUMP TO NEXT DEVICE @V60BEBC 01003000 BCT R6,MOVEADDR DO THE NEXT DEVICE @V2B2638 01004000 LA R1,MN802DLN(R1) READJUST BUFFER POINTER @V2B2638 01005000 DROP R1,R8 @V2B2638 01006000 SPACE 3 01007000 USING MN802CTR,R1 ADDRESS THE REMAINDER OF THE REC @V2B2638 01008000 L R2,=A(DMKSYSNM) @V2B2638 01009000 MVC MN802NAU,0(R2) NO. OF LOGGED ON USERS @V2B2638 01010000 MVC MN802PGR,PGREAD NO. OF SYSTEM PAGE READS @V2B2638 01011000 MVC MN802PGW,PGWRITE NO. OF SYSTEM PAGE WRITES @V2B2638 01012000 L R2,=A(DMKDSPNP) @V2B2638 01013000 MVC MN802NPP,0(R2) NO. OF SYSTEM PAGABLE PAGES @V2B2638 01014000 MVC MN802WID,IDLEWAIT SYSTEM IDLE WAIT TIME @V2B2638 01015000 MVC MN802WPG,PAGEWAIT SYSTEM PAGE WAIT TIME @V2B2638 01016000 MVC MN802WIO,IONTWAIT SYSTEM I/O WAIT TIME @V2B2638 01017000 MVC MN802PRB,PROBTIME SYSTEM PROBLEM TIME @V2B2638 01018000 B EXIT2 @V2B2638 01019000 DROP R1 @V2B2638 01020000 EJECT 01021000 *. 01022000 * 01023000 * THE FOLLOWING TABLE IS FOR THE TABLE DRIVEN MONITOR 01024000 * DATA COLLECTOR. 01025000 * 01026000 * IT IS IMPERATIVE THAT THE ORDER OF THIS TABLE REMAIN 01027000 * INTACT. 01028000 * CHANGING THE TABLE WILL AFFECT THE TAPE RECORD 01029000 * FORMAT, THEREBY AFFECTING ANY AND ALL DATA REDUCTION 01030000 * PROGRAMS DEPENDENT UPON THE TAPE FORMAT. 01031000 * 01032000 * THE FOLLOWING EXTRNS IDENTIFY OTHER EXTERNAL REFERENCES 01033000 * WHICH CONTAIN MONITOR DATA, BUT THE DATA COLLECTION 01034000 * IS NOT TABLE DRIVEN. 01035000 SPACE 01036000 EXTRN DMKDSPNP NUMBER OF SYSTEM PAGABLE PAGES @V2B2638 01037000 EXTRN DMKSCHPU SUM OF WORKING SETS OF IN Q USERS@V2B2638 01038000 EXTRN DMKSCHW1 NUMBER OF USERS ELIGABLE FOR Q1 @V2B2638 01039000 EXTRN DMKSCHW2 NUMBER OF USERS ELIGABLE FOR Q2 @V2B2638 01040000 EXTRN DMKSCHN1 NUMBER OF USERS IN Q1 @V2B2638 01041000 EXTRN DMKSCHN2 NUMBER OF USERS IN Q2 @V2B2638 01042000 EXTRN DMKSCHQ1 ADDRESS OF Q1 USER BEING ADDED @V2B2638 01043000 EXTRN DMKSCHAL QUEUE DROP FLAG (REASON FOR DROP)@V2B2638 01044000 EXTRN DMKCPEID SOFTWARE SYSTEM LEVEL @V2B2638 01045000 EXTRN DMKSYSOC SYSTEM OWNED VOLUME COUNT @V2B2638 01046000 EXTRN DMKSYSOW SYSTEM OWNED VOLUME LIST @V2B2638 01047000 EXTRN DMKSYSNM NO. OF USERS LOGGED ON THE SYSTEM@V2B2638 01048000 SPACE 5 01049000 EJECT 01050000 *. 01051000 * 01052000 * ENTRY POINT - 01053000 * 01054000 * DMKMONPR - ALLOCATE A MONITOR RECORD IN THE CURRENT BUFFER 01055000 * 01056000 * ENTRY CONDITIONS - 01057000 * 01058000 * GPR0 - LENGTH OF REQUESTED RECORD 01059000 * GPR9 - ADDRESS OF MONCOM 01060000 * GPR12 - ADDRESS OF ENTRY POINT 01061000 * GPR13 - ADDRESS OF STANDARD SAVE AREA 01062000 * 01063000 * EXIT CONDITIONS - 01064000 * 01065000 * GPR0 - ADDRESS OF DMKMONIO 01066000 * GPR1 - POINTER TO ALLOCATED RECORD 01067000 * OR AS A CONDITION CODE, 0 ON SUSPEND 01067500 * GPR5 - CONTENTS NOT SAVED BY DMKMONPR 01068000 * 01069000 * CALLS TO OTHER ROUTINES 01070000 * 01071000 * DMKIOSQR - TO INITIATE I/O FOR JUST FILLED DATA PAGE 01072000 * 01073000 * REGISTER USAGE - 01074000 * 01075000 * OPERATION - 01076000 * 01077000 * MONITOR RECORD ALLOCATION 01078000 * 01079000 * DMKMONPR IS CALLED EXTERNALLY VIA SVC, AND INTERNALLY, VIA 01080000 * BAL AS ROUTINE 'PREPREC' IN ORDER TO ALLOCATE A MONITOR 01081000 * RECORD FROM THE CURRENT BUFFER. 01082000 * R0 - WORK REG 01083000 * R1 - WORK REG 01084000 * R2 - RECORD LENGTH + HEADER 01085100 * R3 - WORK REG 01086000 * R4 - WORK REG 01087000 * R5 - RETURN ADDRESS 01088000 * R6 - LINK TO PAGEFULL SUBROUTINE 01089000 * R7 - RETURN CODE FROM PAGEFULL 01090000 * R8 - ADDRESS OF ABSOLUTE PSA 01091000 * R9 - ADDRESS OF MONCOM 01092000 * R10 - ADDRESS OF IOB 01093000 * R11 - USED TO SAVE ADDR OF CURRENT RECORD FOR USE LATER 01094000 * R12 - ADDRESS OF DMKMON 01095000 * R13 - ADDRESS OF SAVEAREA 01096000 * R14 - WORK REG 01097000 * R15 - WORK REG 01098000 * 01099000 * 01100000 * ALL ENTRIES TO DMKMON ARE UNDER THE SYSTEM LOCK, EXCEPT ONE, 01101000 * WHICH IS THE SEEKS CLASS MONITOR CALL. THE ONLY SERIALIZATION 01102000 * PROBLEM IS IN ALLOCATING A RECORD FROM THE CURRENT BUFFER AND 01103000 * SCHEDULING A BUFFER TO BE WRITTEN TO TAPE. 01104000 * 01105000 * THE PROBLEM OF ALLOCATING A RECORD IS SOLVED BY USING COMPARE- 01106000 * AND-SWAP TO UPDATE MONNEXT TO POINT TO THE NEXT FREE BYTE 01107000 * IN THE CURRENT BUFFER. IF BOTH PROCESSORS TRY TO ALLOCATE 01108000 * A RECORD AT THE SAME TIME, ONLY ONE PROCESSOR'S CS WILL 01109000 * SUCCEED. THE OTHER WILL FAIL, CAUSING THE PROCESSOR TO 01110000 * START OVER THE PROCESS, WHICH WILL CAUSE IT TO PICK UP THE 01111000 * NEW VALUE OF MONNEXT SET BY THE OTHER PROCESSOR. 01112000 * 01113000 * THE PROBLEM OF SCHEDULING A BUFFER TO BE WRITTEN TO TAPE IS 01114000 * SOLVED BY USING COMPARE-AND-SWAP TO SET AN INDICATION THAT 01115000 * THE CURRENT BUFFER IS BEING SCHEDULED FOR I/O. IF BOTH 01116000 * PROCESSOR'S TRY TO DO THIS AT THE SAME TIME, ONE WILL SUCCEED 01117000 * AND CONTINUE ON WITH SCHEDULE I/O PROCESSING. THE OTHER WILL 01118000 * FAIL AND GO BACK TO RETRY ALLOCATING A RECORD. THE FIELDS IN 01119000 * MONCOM RELATING TO WHICH BUFFER IS CURRENT AND THE BUFFER 01120000 * STATE BITS CAN BE UPDATED WITHOUT COMPARE-AND-SWAP BECAUSE THE 01121000 * INITIAL CS WILL ONLY PERMIT ONE PROCESSOR TO TAKE THE PATH 01122000 * WHICH UPDATES THESE FIELDS. 01123000 * 01124000 * THE FIELD MONIOBF IS ZERO IF NO MONITOR I/O IS ACTIVE, 01125000 * A POSITIVE ADDRESS IF I/O IS ACTIVE, AND A NEGATIVE ADDRESS 01126000 * IF I/O IS PENDING AS WELL AS ACTIVE. BECAUSE ONE PROCESSOR 01127000 * CAN BE CAUSING A BUFFER TO BE SCHEDULED FOR I/O WHILE AN I/O 01128000 * INTERRUPT FROM ANOTHER BUFFER IS BEING PROCESSED ON THE OTHER 01129000 * PROCESSOR, MONIOBF MUST BE UPDATED VIA COMPARE-AND-SWAP. 01130000 * IF A CS FAILS, THE OTHER PROCESSOR HAS CAUSED THE I/O STATUS 01131000 * TO CHANGE, SO THAT STATUS MUST BE RE-EVALUATED. 01132000 * 01133000 * DMKMONPR: 01134000 * 01135000 * SET R5 TO POINT TO AN EXIT MACRO. R5 IS THE RETURN 01136000 * ADDRESS TO BE COMPATIBLE WITH INTERNAL USE OF 01137000 * PREPREC. GO TO PREPRECR (PREPREC MAINLINE). 01138000 * 01139000 * PREPREC: 01140000 * 01141000 * PREPREC IS INTERNAL ENTRY POINT. GET ADDRESS OF 01142000 * A SAVE AREA, (THERE'S ONE FOR EACH PROCESSOR), SAVE 01143000 * CALLER'S R13 IN IT, AND PUT ADDRESS OF SAVE AREA IN R13. 01144000 * 01145000 * PREPRECR: 01146000 * 01147000 * THIS IS WHERE EXTERNAL AND INTERNAL ENTRY POINTS JOIN. 01148000 * IF NOT SPECIAL 1-BUFFER CASE, GO TO CHKROOM. OTHERWISE 01149000 * MAKE SURE TAPE IS NOT BUSY. IF ONLY 1 BUFFER IS BEING 01150000 * USED AND TAPE IS STILL WRITING IT OUT, MONITOR 01151000 * SUSPENSION IS NECESSARY SO GO TO SUSPEND1. 01152000 * 01153000 * CHKROOM: 01154000 * 01155000 * ADD LENGTH OF RECORD REQUESTED TO MONNEXT TO SEE IF 01156000 * REQUESTED RECORD LENGTH WILL FIT IN THE CURRENT BUFFER. 01157000 * IF IT WILL, GO TO PREPCOM TO ALLOCATE IT. IF NOT, GO 01158000 * TO CLPGFULL TO INVOKE THE PAGE FULL ROUTINE. FOR THE 01159000 * 1-BUFFER CASE, AN ADDITIONAL CHECK IS MADE TO ENSURE 01160000 * THAT ANOTHER PERFORM RECORD CAN FIT. IF IT CANNOT, 01161000 * PAGEFULL IS INVOKED NOW TO MAKE ROOM FOR IT. 01162000 * 01163000 * CLPGFULL: 01164000 * 01165000 * MAKE SURE OTHER PROCESSOR HAS NOT CAUSED SUSPENSION, 01166000 * IF IT HAS, GO TO SUSPEXIT TO EXIT. MAKE SURE OTHER 01167000 * PROCESSOR IS NOT IN THE PROCESS OF SCHEDULING I/O, IF 01168000 * IT IS, GO BACK TO CHKROOM TO RETRY. BRANCH AND LINK 01169000 * TO PAGEFULL. IF PAGEFULL RETURNS A NON-ZERO RETURN 01170000 * CODE, THE OTHER PROCESSOR SCHEDULED THE I/O ALREADY, 01171000 * SO RETURN TO CHKROOM TO RETRY. 01172000 * 01173000 * PREPCOM: 01174000 * 01175000 * CLAIM THE SLOT THAT'S BEEN ALLOCATED IN THE BUFFER 01176000 * BY SETTING A NEW VALUE OF MONNEXT JUST BEYOND IT. 01177000 * IN THE AP CASE, A COMPARE-AND-SWAP IS USED TO DO THIS. 01178000 * IF THE CS FAILS, THE OTHER PROCESSOR HAS CLAIMED THE 01179000 * SAME SLOT THAT THIS PROCESSOR THOUGHT WAS AVAILABLE, 01180000 * AND SO IT IS NECESSARY TO GO BACK TO CHKROOM TO 01181000 * START OVER. OTHERWISE, THE STANDARD HEADER IS FILLED 01182000 * IN, THE REGISTERS ARE RESTORED, AND CONTROL IS RETURNED 01183000 * TO THE CALLER, EITHER VIA BR OR SVC 12. 01184000 * 01185000 * PAGEFULL: 01186000 * 01187000 * FOR AP, TO FORCE ALL OTHER ATTEMPTS TO GET SPACE 01188000 * IN THIS BUFFER TO FAIL, AND TO INDICATE THAT THE 01189000 * BUFFER IS BEING SCHEDULED FOR I/O, USE COMPARE-AND-SWAP 01190000 * TO PUT THE CURRENT VALUE OF PAGEND (THE LAST BYTE 01191000 * IN THE BUFFER) INTO MONNEXT. IF THE CS FAILS, THE 01192000 * OTHER PROCESSOR IS SCHEDULING THE I/O, SO SET THE 01193000 * RETRY CONDITION CODE AND RETURN TO THE CALLER. 01194000 * OTHERWISE CONTINUE. 01195000 * 01196000 * CHKTAPE: 01197000 * 01198000 * GET THE CURRENT VALUE OF MONIOBF, THE POINTER TO THE 01199000 * BUFFER CURRENTLY BEING WRITTEN, IF ANY. IF MONIOBF IS 01200000 * ZERO, THEN NO I/O IS CURRENTLY ACTIVE, AND THIS I/O CAN 01201000 * BE SCHEDULED WITHOUT FEAR OF AN I/O INTERRUPT COMING 01202000 * FROM THE TAPE. IF MONIOBF IS A POSITIVE ADDRESS, THEN 01203000 * I/O IS ACTIVE, BUT NO FURTHER I/O IS PENDING. AN AP 01204000 * INTERACTION IS POSSIBLE IF THE INTERRUPT FROM THIS I/O 01205000 * COMES IN ON THE OTHER PROCESSOR WHILE THE I/O IS BEING 01206000 * MADE POSSIBLE ON THIS PROCESSOR. IF MONIOBF IS 01207000 * NEGATIVE, THE COMPLEMENT OF THE ADDRESS OF THE BUFFER 01208000 * BEING WRITTEN OUT, THEN AT LEAST ONE BUFFER IS WAITING 01209000 * TO BE WRITTEN OUT, AS WELL AS THE ONE BEING WRITTEN OUT. 01210000 * IN THIS CASE, NOTHING NEEDS TO BE DONE WITH THE TAPE. 01211000 * WHEN THE TWO BUFFERS ALREADY WAITING ARE WRITTEN OUT, 01212000 * THIS ONE WILL BE PICKED UP AND WRITTEN AUTOMATICALLY. 01213000 * 01214000 * IF MONIOBF = 0, THEN GO TO SCHEDIO TO SCHEDULE THE 01215000 * BUFFER TO BE WRITTEN OUT. 01216000 * 01217000 * IF MONIOBF > 0 THEN COMPLEMENT MONIOBF AND TRY TO 01218000 * SWAP COMPLEMENTED VALUE BACK IN, TO INDICATE THAT I/O 01219000 * IS NOW PENDING. IF THIS SUCCEEDS, GO TO GTNXTBUF. 01220000 * OTHERWISE, I/O INTERRUPT HAS COME IN, MONIOBF IS NOW 01221000 * ZERO, GO BACK TO TAPECS TO RE-EVALUATE. 01222000 * 01223000 * IF MONIOBF < 0 THEN GO TO GTNXTBUF. 01224000 * 01225000 * SCHEDIO: 01226000 * 01227000 * SET NEW VALUE OF MONIOBF TO INDICATE THAT TAPE IS BUSY. 01228000 * SET UP IOB FOR BUFFER WRITE. CALL IOS VIA A CPEXBLOK. 01229000 * 01230000 * GTNXTBUF: 01231000 * 01232000 * GET THE ADDRESS OF THE NEXT BUFFER, WRAPPING TO THE 01233000 * FIRST BUFFER IF NECESSARY. IF THE BUFFER IS 01234000 * AVAILABLE, MARK IT AS THE ACTIVE COLLECTOR, SET 01235000 * UP THE NEW MONCRBUF, MONNEXT, AND PAGEND VALUES, AND 01236000 * THEN RETURN TO THE CALLER OF PAGEFULL. IF THE BUFFER 01237000 * IS NOT AVAILABLE, THEN CHECK IF THIS IS THE ONE-BUFFER 01238000 * CASE. IF IT IS, LACK OF AN AVAILABLE BUFFER IS OKAY, SO 01239000 * RETURN. OTHERWISE, GO TO SUSPEND1 TO SUSPEND THE 01240000 * MONITOR. 01241000 * 01242000 * SUSPEND1: 01243000 * 01244000 * SET THE SUSPEND FLAG, ZERO OUT MC MASKS IN BOTH PSAS, 01245000 * INCREMENT THE SUSPEND COUNT, RECORD THE TOD OF SUSPEND. 01246000 * IF ENTERED FROM TIMER INTERRUPT, RETURN TO CALLER OF 01247000 * PREPREC. OTHERWISE EXIT TO DISPATCHER. 01248000 * 01249000 SPACE 01250000 DMKMONPR RELOC @V4075A4 01251000 LA R5,EXITP GET RETURN ADD FOR EXT ENTRY @V4075A4 01252000 ST R5,SAVER5 PUT RETURN ADDR IN SAVE AREA @V4075A4 01253000 ST R13,SAVEWRK1 SAVE R13 @V4075A4 01254000 LA R1,DMKMONIO GET ADDRESS OF I/O INT HANDLER @V4M0118 01255000 ST R1,R0*4+SAVEREGS RETURN IT TO EXT CALLER @V4M0118 01256000 B PREPRECR SKIP AROUND SAVE AREA MANIP @V4075A4 01257000 PREPREC TM APSTAT1,PROCIO AM I THE APU? @V4075A4 01258000 BZ APUSAVE YES, SAVE REGS IN APU SAVE AREA @V4075A4 01259000 LA R15,MONSAVE1 GET ADDRESS OF CPU'S SAVE AREA @V4075A4 01260000 B STOREGS CONTINUE WITH PREPREC PROCESSING @V4075A4 01261000 APUSAVE LA R15,MONSAVE2 GET ADDRESS OF APU'S SAVE AREA @V4075A4 01262000 STOREGS STM R0,R11,16(R15) SAVE REGS IN APPROP SAVE AREA @V4075A4 01263000 ST R13,12(R15) SAVE CALLER'S R13 @V4075A4 01264000 LR R13,R15 TRANSFER SAVE AREA ADDR TO R13 @V4075A4 01265000 PREPRECR TM MONFLAG1,MON1BUF SPECIAL 1-BUFFER CASE? @V4075A4 01266000 BZ CHKROOM NO, SKIP SPECIAL CHECK @V4075A4 01267000 L R2,MONIOBF IF 1-BUFFER CASE AND I/O IS @V4075A4 01268000 LTR R2,R2 STILL ACTIVE, @V4075A4 01269000 BNZ SUSPEND1 THEN ABANDON ALL HOPE @V4075A4 01270000 CHKROOM LR R2,R0 LENGTH OF RECORD REQ'D TO R2 @V4075A4 01271000 LA R2,MNHDRLEN(R2) ADD IN STD HEADER LENGTH @V4075A4 01272000 CHKROOM1 DS 0H @VA09843 01272500 L R8,PREFIXA GET ADDRESSABILITY TO ABS PSA @V4075A4 01273000 L R3,MONNEXT(R8) POINT TO NEXT AVAIL BUFFER SLOT @V4075A4 01274000 LR R11,R3 SAVE ADDR OF CURR REC FOR LATER @V4M0153 01275000 LA R4,0(R2,R3) R4 -> FUTURE NEXT AVAIL SLOT @V4075A4 01276000 C R4,PAGEND(R8) DOES RECORD FIT IN BUFFER? @V4075A4 01277000 BNL CLPGFULL NO, CALL PAGE FULL ROUTINE @V4075A4 01278000 TM MONFLAG1,MON1BUF IS THIS 1-BUFFER CASE? @V4075A4 01279000 BZ PREPCOM NO, NO SPECIAL TEST NEEDED @V4075A4 01280000 LA R1,MNHDRLEN+MN000LEN(R4) IS THERE ROOM FOR @V4075A4 01281000 * ANOTHER PERFORM RECORD? 01282000 TM APSTAT1,APUOPER IS THERE THE APU RECORD @V4M0135 01283000 BZ NOAPU TO WORRY ABOUT? @V4M0135 01284000 LA R1,MNHDRLEN+MN001LEN(R1) YES, ADD IT IN @V4M0135 01285000 NOAPU EQU * @V4M0135 01286000 C R1,PAGEND(R8) IF NOT, SCHEDULE I/O NOW @V4075A4 01287000 BNH PREPCOM IT WILL FIT, XFER TO NORM PATH @V4075A4 01288000 CLPGFULL TM MONFLAG2,SUSPEND HAS OTHER PU CAUSED SUSP? @V4075A4 01289000 BNZ SUSPEXIT YES, IGNORE THIS MONITOR CALL @V4075A4 01290000 TM MONFLAG3,CLSUS+SPOOLED SPOOLING AND CLOSE SUSP @V50A2B5 01291000 BO SUSPEXIT YES @V50A2B5 01292000 CLC PAGEND-IPLPSW(4,R8),MONNEXT-IPLPSW(R8) DOES @V4075A4 01293000 * MONNEXT INDICATE THAT OTHER PU 01294000 * IS SCHEDULING I/O ? 01295000 BE CHKROOM1 YES, RETURN @VA09843 01296100 BAL R6,PAGEFULL GO SCHED I/O AND GET NEXT BUFF @V4075A4 01297000 LTR R7,R7 CHECK RESULTS OF PAGEFULL @V4075A4 01298000 BNZ CHKROOM1 OTHER PU INTERFERRED. TRY AGAIN @VA09843 01299100 TM MONFLAG1,CFSTOP WAS MONITOR STOPPED ? @V4M0238 01300000 BO PRRET YES - MONITOR WILL NOT USE THIS @V4M0238 01301000 * RECORD NOW. TRAILER RCD WILL BE @V4M0238 01302000 * WRITTEN IN THIS BUFFER WHEN I/O @V4M0238 01303000 * COMPLETES FOR THE LAST RECORD. @V4M0238 01304000 LA R4,0(R2,R3) COMPUTE FUTURE VALUE OF MONNEXT @V4075A4 01305000 PREPCOM TM APSTAT1,APUOPER IS APU OPERATIONAL? @V4075A4 01306000 BZ NOCS1 NO, NO COMPARE-AND-SWAP NEEDED @V4075A4 01307000 CS R3,R4,MONNEXT-IPLPSW(R8) CLAIM THE SLOT @V4075A4 01308000 BNZ CHKROOM1 OTHER PU GOT IT. GO GET ANOTHER @VA09843 01309100 B NOST1 BRANCH AROUND STORE @V4075A4 01310000 NOCS1 ST R4,MONNEXT SET NEW MONNEXT VALUE (UP MODE) @V4075A4 01311000 NOST1 EQU * @V4075A4 01312000 LA R1,MNHDRLEN(R3) SET R1 PAST HEADER FOR CALLER @V2B2638 01313000 USING MNHDR,R3 DSECT FOR HEADER @V2B2638 01314000 SLL R2,16 RECORD SIZE TO TOP HALF @V2B2638 01315000 ST R2,MNHRECSZ RECORD SIZE AND ZERO @V2B2638 01316000 MVC MNHCLASS,MONCLASS+1 CLASS AND CODE FROM ... @V2B2638 01317000 MVC MNHCODE,MONCODE+2 ... LOW CORE @V2B2638 01318000 STCK MONCLOCK GET TIME OF DAY @V2B2638 01319000 BC 3,DOWNWEGO CLOCK NOT FUNCTIONING @VA04301 01320000 MVC MNHTOD(5),MONCLOCK+1 5 BYTES = 16 U-SEC ACCUR @V2B2638 01321000 ST R1,SAVER1 SET RETURN R1 VALUE @V4075A4 01322000 PRRET EQU * NO DATA WRITTEN TO NEW BUFFER @V4M0238 01323000 LM R0,R11,16(R13) REST REGS FROM APPROP SAVE AREA @V4075A4 01324000 L R13,SAVEWRK1 RESTORE R13 @V4075A4 01325000 BR R5 RETURN TO CALLER @V2B2638 01326000 DROP R3 @V2B2638 01327000 EXITP EXIT RETURN TO EXTERNAL CALLER @V4075A4 01328000 SPACE 1 01329000 EJECT 01330000 ****** 01331000 * 01332000 * PAGEFULL - THIS ROUTINE CALLS IOS TO WRITE OUT BUFFER, 01333000 * AND UPDATES THE BUFFER CONTROL POINTERS 01334000 * 01335000 * REGS ON ENTRY - 01336000 * R2 - RECORD LENGTH + HEADER 01336100 * R3 - CURRENT VALUE OF MONNEXT 01337000 * R5 - PREPREC'S RETURN ADDRESS 01338000 * R6 - PAGEFULL'S RETURN ADDRESS 01339000 * R8 - ADDRESS OF ABSOLUTE PSA 01340000 * R9 - ADDRESS OF MONCOM 01341000 * 01342000 * REGS ON EXIT - 01343000 * R2 - MUST REMAIN AS IS RECORD LENGTH + HEADER 01343100 * R7 - RETURN CODE 01344000 * 0 - I/O SCHEDULED AND NEXT BUFFER OBTAINED 01345000 * 4 - OTHER PROCESSOR SCHEDULED I/O, RETRY 01346000 * 01347000 ****** 01348000 SPACE 01349000 PAGEFULL L R4,PAGEND(R8) R4 -> LAST BYTE IN CUR BUFF @V4075A4 01350000 TM APSTAT1,APUOPER APU OPERATIONAL? @V4075A4 01351000 BZ NOCS2 NO, USE STORE INSTEAD OF CS @V4075A4 01352000 CS R3,R4,MONNEXT-IPLPSW(R8) SWAP IT IN TO MONNEXT @V4075A4 01353000 * INDICATE THAT SCHEDULE OF 01354000 * I/O IS IN PROGRESS 01355000 BZ PREPWRIT CS SUCCESSFUL, CONTINUE @V4075A4 01356000 LA R7,4 OTHER PROCESSOR DID IT, SO @V4075A4 01357000 * RETURN RETRY INDICATION 01358000 BR R6 RETURN TO CALLER @V4075A4 01359000 NOCS2 ST R4,MONNEXT IND THAT I/O IS BEING SCHED (UP) @V4075A4 01360000 PREPWRIT L R4,MONCURBF GET ADDRESS OF CURRENT BUFFER @V4075A4 01361000 TM MONFLAG3,SPOOLED ARE WE SPOOLED @V50A2B5 01362000 BNO NOSPL004 NO @V50A2B5 01363000 NI 8(R4),MONBUFIO FLAG BUF 'SCHEDULED FOR IO'@V50A2B5 01364000 B NOSPL005 @V50A2B5 01365000 NOSPL004 NI 2(R4),MONBUFIO FLAG BUF 'SCHEDULED FOR IO'@V50A2B5 01366000 NOSPL005 EQU * @V50A2B5 01367000 SR R3,R4 CALC RECORD LENGTH TO BE WRITTEN @V4075A4 01368000 TM MONFLAG1,MON1BUF SPECIAL ONE-BUFFER CASE? @V4075A4 01369000 BZ CHKTAPE NO, LENGTH COMPUTED IS CORRECT @V4075A4 01370000 AR R3,R2 YES, ADD IN LENGTH OF @V4075A4 01371000 * CURRENT PERF RECORD 01372000 CHKTAPE TM MONFLAG3,SPOOLED IS THIS IO TO BE SPOOLED? @V50A2B5 01373000 BNO NOSPLCHK NO SPECIAL PROCESSING @V50A2B5 01374000 LA R7,X'10'(R0) COMPUTE THE LENGTH @V50A2B5 01375000 SR R3,R7 @V50A2B5 01376000 STH R3,0(R7,R4) PUT IN THE RECORD @V50A2B5 01377000 B RESMCOM @V50A2B5 01378000 NOSPLCHK STH R3,0(R4) @V50A2B5 01379000 * (STD VB FORMAT) 01380000 RESMCOM EQU * @V50A2B5 01381000 TAPECS L R1,MONIOBF GET ADDR OF BUFF BEING WRITTEN @V4075A4 01382000 LTR R1,R1 IS THERE I/O GOING ON ALREADY? @V4075A4 01383000 BZ SCHEDIO NO, GO AHEAD AND CALL IOS @V4075A4 01384000 BM GTNXTBUF ADDRESS IN TWO'S COMPLEMENT @V4075A4 01385000 * FORM, I/O ALREADY PENDING, 01386000 * NO NEED TO DO ANYTHING 01387000 * FALL THROUGH, I/O ALREADY ACTIVE, INDICATE THAT I/O IS NOW PENDING 01388000 LCR R0,R1 MAKE ADDRESS OF BUFFER NEGATIVE @V4075A4 01389000 TM APSTAT1,APUOPER IS APU OPERATIONAL? @V4075A4 01390000 BZ NOCS3 NO, NO COMPARE-SWAP NECESSARY @V4075A4 01391000 CS R1,R0,MONIOBF INDICATE I/O PENDING @V4075A4 01392000 BNZ TAPECS SOMETHING HAPPENED ON OTHER @V4075A4 01393000 * PROCESSOR, TRY AGAIN 01394000 B GTNXTBUF IT WENT OK, GET NEXT AVAIL BUFF @V4075A4 01395000 NOCS3 ST R0,MONIOBF SET I/O PDG INDICATOR IN MONIOBF @V4075A4 01396000 B GTNXTBUF GO GET NEXT AVAIL BUFFER @V4075A4 01397000 SPACE 01398000 SCHEDIO ST R4,MONIOBF SAVE ADDR OF BUFF BEING WRITTEN, @V4075A4 01399000 * ALSO INDICATES THAT TAPE IS BUSY 01400000 MVC MONIOSLT(4),MONCRSLT UPDATE THE I/O SLOT @V4075A4 01401000 L R10,MONAIOB ADDRESS THE IOB @V2B2638 01402000 USING IOBLOK,R10 @V2B2638 01403000 LA R0,IOBSIZE*8(R10) ADDRESS OF THE WRITE CCW @V2B2638 01404000 ST R0,IOBCAW SET THE CAW FOR THE WRITE @V2B2638 01405000 ST R4,IOBSIZE*8(R10) PUT DATA ADDR IN THE CCW @V2B2638 01406000 MVI IOBSIZE*8(R10),X'01' PUT THE OP CODE BACK IN @V2B2638 01407000 STH R3,IOBSIZE*8+6(R10) PUT BYTE COUNT INTO THE CCW @V4075A4 01408000 EJECT 01409000 ****** 01410000 * 01411000 * NOW IT IS TIME TO START THE TAPE, BUT TO AVOID CONFLICTS 01412000 * IF THE CALL TO IOS SHOULD FIELD AN ERROR, AN ASYNCHRONOUS 01413000 * CALL IS MADE TO IOS VIA A CPEXBLOK. 01414000 * WE NOW SET UP THE CPEXBLOK SUCH THAT IOS WILL BE CALLED 01415000 * WHEN IT IS UNSTACKED, NEXT TIME (OR SO) THROUGH THE 01416000 * DISPATCHER. WE CAN THEN CONTINUE TO MONITOR THE SYSTEM 01417000 * WITHOUT TEMPORARILY SUSPENDING IT FOR THE CALL, ETC. 01418000 * 01419000 ****** 01420000 SPACE 1 01421000 L R1,IOBMISC GET THE BACK POCKET CPEXBLOK @V2B2638 01422000 USING CPEXBLOK,R1 @V2B2638 01423000 STM R0,R15,CPEXR0 SAVE THE REGS @V2B2638 01424000 LA R0,GETCPEX RETURN ADDRESS ... @V2B2638 01425000 ST R0,CPEXADD ... INTO THE CPEXBLOK @V2B2638 01426000 L R0,ASYSVM ADDRESS OF THE SYSTEM VMBLOK @V2B2638 01427000 ST R0,CPEXR0+R11*4 SYS IS CHARGED FOR THE IO @V2B2638 01428000 LA R0,GOTO ADDRESS OF THE RETURN POINT @V2B2638 01429000 TM MONFLAG3,SPOOLED ARE WE SPOOLED @V50A2B5 01430000 BNO NOSPL006 NO @V50A2B5 01431000 LA R0,CLEANIO GO TO MON PROCESSING @V50A2B5 01432000 NOSPL006 EQU * @V50A2B5 01433000 ST R0,CPEXR0+R5*4 SAVE IN R5 @V2B2638 01434000 CALL DMKSTKCP STACK THE CPEXBLOK ON THE DSP Q @V2B2638 01435000 DROP R1 @V2B2638 01436000 GTNXTBUF EQU * @V50A2B5 01437000 TM MONFLAG3,SPOOLED ARE WE SPOOLED @V50A2B5 01438000 BNO STDPATH NO @V50A2B5 01439000 L R1,MONSPLCT BUMP UP SPOOL COUNT @V50A2B5 01440000 LA R1,1(R1) HERE @V50A2B5 01441000 ST R1,MONSPLCT STORE IT @V50A2B5 01442000 L R1,=A(DMKSYSAT) CHECK FOR REAL TIME MONITOR @V60BEBC 01442250 TM 0(R1),MONSLMT ACTIVE? @V60BEBC 01442500 BO STDPATH YES, DON'T CHECK RECORD COUNT @V60BEBC 01442750 L R1,=A(DMKSYSMX) COMPARE COUNT AGAINST MAX @V50A2B5 01443000 L R1,0(R1) LOAD IT IN @V50A2B5 01444000 C R1,MONSPLCT COMPARE IT @V50A2B5 01445000 BH STDPATH NOT OVER YET @V50A2B5 01446000 MVC CPCREG8(4),ZEROES DISABLE MONITOR @V50A2B5 01447000 L R1,PREFIXB TURN OFF OTHER PREFIX @V50A2B5 01448000 MVC CPCREG8-IPLPSW(4,R1),ZEROES @V50A2B5 01449000 LCTL C8,C8,ZEROES TURN OF CREG 8 @V50A2B5 01450000 OI MONFLAG3,CLSUS SUSPEND UNTIL ALL IO DONE @V50A2B5 01451000 OI 9(R4),TRAP TRAP THIS IO @V50A2B5 01452000 B SUSPEXIT EXIT IMMEDIATELY @V50A2B5 01453000 STDPATH EQU * @V50A2B5 01454000 L R1,MONCRSLT GET ADDRESS OF CURRENT BUF @V50A2B5 01455000 LA R1,8(R1) POINT TO NEXT BUFFER SLOT @V50A2B5 01456000 CLI 0(R1),X'FF' HAVE WE WRAPPED? @V4075A4 01457000 BNE NOWRAP NO, WE'RE OK @V4075A4 01458000 LA R1,MONBUF1 WRAP TO THE FIRST OF THE SLOTS @V4075A4 01459000 NOWRAP L R4,0(R1) POINT TO NEXT BUFFER @V4075A4 01460000 SR R7,R7 SET ZERO RETURN CODE-NO RETRY @V4075A4 01461000 TM MONFLAG3,SPOOLED SEE IF SPOOLED @V50A2B5 01462000 BNO OLDCHK NO @V50A2B5 01463000 TM 8(R4),MONBUFAV SEE IF BUFFER AVAILABLE @V50A2B5 01464000 BZ POSSSUSP @V50A2B5 01465000 OI 8(R4),MONBUFAC FLAG BUFF 'ACTIVE COLLECTOR' @V50A2B5 01466000 B RESME1 @V50A2B5 01467000 OLDCHK TM 2(R4),MONBUFAV SEE IF BUFFER AVAILABLE @V50A2B5 01468000 BZ POSSSUSP @V50A2B5 01469000 OI 2(R4),MONBUFAC FLAG BUFFER ACTIVE COLLECTOR @V50A2B5 01470000 RESME1 EQU * @V50A2B5 01471000 ST R4,MONCURBF UPDATE CURRENT BUFFER POINTER @V4075A4 01472000 ST R1,MONCRSLT UPDATE CURR BUFFER SLOT POINTER @V4075A4 01473000 LA R3,4(R4) POINT TO FIRST RECORD IN BUFFER @V4075A4 01474000 TM MONFLAG3,SPOOLED SEE IF WE ARE SPOOLING @V50A2B5 01475000 BNO *+8 NO @V50A2B5 01476000 LA R3,16(R3) YES, BUMP IN BY 16 @V50A2B5 01477000 LA R4,4088(R4) @VA09843 01478100 LA R8,MONNEXT-PSA(R8) @VA09843 01478600 STM R3,R4,0(R8) @VA09843 01479100 L R8,PREFIXA @VA09843 01479600 BR R6 RETURN TO CALLER OF PAGEFULL @V4075A4 01482000 POSSSUSP TM MONFLAG1,MON1BUF IS THIS 1-BUFFER CASE? @V4075A4 01483000 BZ SUSPEND1 NO, NO FREE BUFFS, MUST SUSPEND @V4075A4 01484000 LR R3,R11 YES, LACK OF FREE BUFFERS IS OK, @V4075A4 01485000 * GET ADDRESS OF CUR RECORD 01486000 ST R3,MONNEXT(R8) SAVE IT IN APPROPRIATE PLACE @V4075A4 01487000 BR R6 RETURN TO CALLER @V4075A4 01488000 EJECT 01489000 ******** 01490000 * 01491000 * ARRIVE HERE TO MAKE A CALL TO IOS. 01492000 * 01493000 * 'GETCPEX' - REPLACE THE BACKPOCKET CPEXBLOK ADDRESSED 01494000 * BY IOBMISC. 01495000 * 'CALLIOS' - TO CALLIOS AND RETURN. 01496000 * 01497000 * R5 - RETURN ADDRESS 01498000 * R9 - ADDRESS OF MONCOM 01499000 * R10 - ADDRESS OF THE IOB 01500000 * 01501000 ******** 01502000 SPACE 01503000 GETCPEX LA R0,CPEXSIZE SIZE OF CPEXBLOK @V2B2638 01504000 CALL DMKFREE GET A NEW BACK POCKET CPEXBLOK @V2B2638 01505000 ST R1,IOBMISC SAVE ITS ADDRESS @V2B2638 01506000 CALLIOS XC IOBFLAG(2),IOBFLAG CLEAR THE IOB FOR REUSE @V2B2638 01507000 L R8,MONARDB ADDRESS OF THE REAL DEVICE BLOK @V2B2638 01508000 TM MONFLAG3,SPOOLED IS THIS SPOOLED MONITORING @V50A2B5 01509000 BO CALLMIA @V50A2B5 01510000 CALL DMKIOSQR QUEUE THE I/O REQUEST @V2B2638 01511000 BR R5 RETURN TO LOCAL CALLER @V2B2638 01512000 CALLMIA EQU * @V50A2B5 01513000 L R1,IOBSIZE*8(R10) GET THE DATA ADDRESS @V50A2B5 01514000 CALL DMKMIAWO WRITE OUT THE PAGE @V50A2B5 01515000 C R1,F2 SEE IF SHUTDOWN SCHEDULED @V50A2B5 01516000 BE GOTO YES, LEAVE @V50A2B5 01517000 BR R5 @V50A2B5 01518000 SPACE 1 01519000 CALLIOS1 L R1,IOBSIZE*8(R10) GET THE DATA ADDRESS @V50A2B5 01520000 CALL DMKMIAWO WRITE OUT THE BUFFER @V50A2B5 01521000 C R1,F2 SEE IF SHUTDOWN SCHEDULED @V50A2B5 01522000 BE GOTO YES, JUST EXIT @V50A2B5 01523000 LA R0,CPEXSIZE START OFF A CPEXBLOK @V50A2B5 01524000 CALL DMKFREE GET THE STORAGE FOR IT @V50A2B5 01525000 USING CPEXBLOK,R1 01526000 STM R0,R15,CPEXR0 STORE THE REGISTERS @V50A2B5 01527000 LA R0,CLEANIO GET RETURN ADDRESS @V50A2B5 01528000 ST R0,CPEXADD STORE IT @V50A2B5 01529000 CALL DMKSTKCP STACK IT @V50A2B5 01530000 BR R5 DO NORMAL RETURN @V50A2B5 01531000 DROP R1 01532000 SPACE 5 01533000 SUSPEND1 OI MONFLAG2,SUSPEND SET SUSPEND STATUS @V4075A4 01534000 MVC CPCREG8(4),ZEROES DON'T FORGET THE PSA FIELD @V2B2638 01535000 L R8,PREFIXB ADDRESS OTHER PROCESSOR'S PSA @V4075A4 01536000 MVC CPCREG8-IPLPSW(4,R8),ZEROES ZERO OUT OTHER @V4075A4 01537000 * PROCESSOR'S MC MASK 01538000 LA R0,1 ADD ONE TO THE COUNT OF @V2B2638 01539000 AL R0,MONSUSCT SUSPENDS @V2B2638 01540000 ST R0,MONSUSCT ... @V2B2638 01541000 LCTL C8,C8,ZEROES DISABLE FURTHER INTERRUPTS @V4075A4 01542000 STCK MONSUSCK RECORD TOD OF SUSPENSION @V2B2638 01543000 BC 3,DOWNWEGO CLOCK NOT FUNCTIONING @VA04301 01544000 SUSPEXIT SR R1,R1 ZERO R1 -- NO BUFFER SPACE @VA10215 01545200 ST R1,SAVER1 PASS R1 TO CALLER @VA10215 01545300 LM R0,R11,16(R13) REST REGS FROM APPROP SAVE AREA @V4075A4 01547000 L R13,12(R13) AND R13 AT BAL TO PREPREC @VA07862 01547500 BR R5 R5 RETURN TO CALLER @VA10215 01548100 TSTSUSP LTR R1,R1 TEST BUFFER SPACE @VA10215 01548200 BZ EXIT2 NO SPACE - LEAVE @VA10215 01548300 BR R5 CONTINUE @VA10215 01548400 TSTSUSP1 LTR R1,R1 TEST BUFFER SPACE @VA10215 01548500 BZR R6 NO SPACE - RETURN TO CALLER @VA10215 01548600 BR R5 CONTINUE @VA10215 01548700 EJECT 01549000 *. 01550000 * 01551000 * ENTRY POINT - 01552000 * 01553000 * DMKMONIO - HANDLE I/O INTERRUPTS FOR THE MONITOR TAPE 01554000 * 01555000 * ENTRY CONDITIONS - 01556000 * 01557000 * GPR10 - ADDRESS OF IOB ASSOCIATED WITH THE INTERRUPT 01558000 * GPR12 - ADDRESS OF ENTRY POINT 01559000 * 01560000 * CALLS TO OTHER ROUTINES - 01561000 * 01562000 * DMKFRET - RETURN A BLOCK OF STORAGE TO THE SYSTEM 01563000 * DMKERMSG - WRITE AN ERROR MESSAGE TO A USER 01564000 * DMKSCHRT - DEQUEUE A TIMER REQUEST BLOCK 01565000 * DMKPTRFR - RETURN A PAGE TO FREE STORAGE 01566000 * DMKPTRUL - UNLOCK A PAGE FRAME 01567000 * DMKDSPCH - RETURN CONTROL TO THE DISPATCHER 01568000 * DMKIOSQR - TO SCHEDULE AN I/O REQUEST 01569000 * 01570000 * EXTERNAL REFERENCES - 01571000 * 01572000 * DMKPRGMC - ADDR OF THE MONITOR COMMUNICATIONS BLOCK 01573000 * DMKPRGTI - ADDR OF THE MONITOR INTERVAL 01574000 * DMKPRGC8 - ADDR OF THE ENABLED CLASS MASK 01575000 * DMKPRGMI - ADDR OF THE ADDR OF THE MONITOR INTERRUPT HANDLER 01576000 * 01577000 * OPERATION - 01578000 *  01579000 * MONITOR I/O INTERRUPT PROCESSING 01580000 * 01581000 * DMKMONIO: 01582000 * 01583000 * IF FINAL TAPE STATUS IS NOT BEING RETURNED, THEN 01584000 * THE COPIED I/O BLOCK IS FRETED AND CONTROL IS 01585000 * PASSED TO THE DISPATCHER. 01586000 * 01587000 * IF THERE IS AN IOERBLOK, FRET IT. 01588000 * 01589000 * IF THE I/O WAS NOT 'FATAL' THEN GO TO STEP 01590000 * 'CHKUC'. 01591000 * 01592000 * FATAL: 01593000 * IF THE 'ERROR' FLAG HAS ALREADY BEEN SET THEN GO TO 01594000 * STEP 'ERRONERR'. 01595000 * 01596000 * SET THE 'ERROR' FLAG. 01597000 * 01598000 * ERRONERR: 01599000 * IF THE 'TRUN' FLAG HAS NOT BEEN SET THEN GO TO STEP 01600000 * 'EOT'. OTHERWISE CALL DMKERMSG TO SEND MESSAGE 220 01601000 * TO THE OPERATOR AND TO GO STEP 'FINISHUP'. 01602000 * 01603000 * CHKUC: 01604000 * IF A UNIT CHECK DID NOT OCCUR THEN GO TO STEP 01605000 * 'CHKUE'. IF A UC DID OCCUR AND THE 'TRUN' FLAG IS 01606000 * OFF THEN GO TO STEP 'FATAL'. IF THE 'TRUN' FLAG IS 01607000 * ON AND THE INTERRUPT CAME WITH CUE AND DE THEN: 01608000 * 01609000 * IF THE 'CFSTOP' FLAG IS ON THEN GO TO STEP 01610000 * 'FINISHUP'. 01611000 * 01612000 * OTHERWISE SEND MESSAGE 219 TO THE OPERATOR 01613000 * FIRST AND THEN GO TO STEP 'FINISHUP'. 01614000 * 01615000 * CHKUE: 01616000 * IF THE IOB CAME WITHOUT UE THEN GO TO STEP 01617000 * 'CLEANIO'. 01618000 * 01619000 * EOT: 01620000 * INDICATE THAT THE SYSTEM IS STOPPING THE MONITOR. 01621000 * CLEAR THE IOBLOK FOR REUSE; STOP ALL MONITOR 01622000 * ACTIVITY BY DISABLEING MC INTERRUPTS; READJUST THE 01623000 * CCW'S TO WRITE A TAPE MARK AND REWIND/UNLOAD THE 01624000 * TAPE; SET THE 'TRUN' FLAG TO INDICATE THAT TAPE 01625000 * FINAL PROCESSING HAS BEEN PERFORMED; LINK TO THE 01626000 * TAPE I/O MANAGER TO INITIATE THE TAPE I/O; GO TO 01627000 * THE DISPATCHER. 01628000 * 01629000 * CLEANIO: 01630000 * FLAG THE BUFFER THAT WAS JUST WRITTEN AS 'AVAILABLE'. 01631000 * IF THIS IS ONE-BUFFER CASE, FLAG IT AS THE 'ACTIVE 01632000 * COLLECTOR', STORE ZEROS IN MONIOBF TO INDICATE TAPE FREE, 01633000 * GO TO REACTVAT TO REACTIVATE THE MONITOR IF IT'S BEEN 01634000 * SUSPENDED, OTHERWISE GO TO CHKSTOP. FOR NON-ONE-BUFFER 01635000 * CASE, FALL THROUGH TO CHKIOPDG. 01636000 * 01637000 * CHKIOPDG: 01638000 * POINT TO NEXT BUFFER, WRAPPING TO FIRST ONE IF NECESSARY. 01639000 * IF IT IS NOT WAITING FOR I/O, THEN GO TO NOIOPDG. 01640000 * IT IS WAITING FOR I/O, IT IS NOW NECESSARY TO DETERMINE 01641000 * WHETHER TO SET ITS ADDRESS IN MONIOBF AS POSITIVE OR 01642000 * NEGATIVE. POINT TO YET THE NEXT BUFFER. IF IT IS 01643000 * WAITING FOR I/O, COMPLEMENT THE ADDRESS OF THE FIRST 01644000 * BUFFER. 01645000 * 01646000 * SETIOBUF: 01647000 * USE COMPARE-AND-SWAP TO SET THE NEW VALUE OF MONIOBF. 01648000 * IF THE CS FAILS, THEN WHILE THIS PROCESSOR FOUND NO 01649000 * FURTHER I/O PENDING, SUCH I/O HAS JUST BECOME PENDING 01650000 * ON THE OTHER PROCESSOR, SO GO BACK TO CKNXTBUF TO 01651000 * RE-EVALUATE IT. 01652000 *. 01653000 SPACE 01654000 ENTRY DMKMONIO @V2B2638 01655000 DMKMONIO EQU * @V2B2638 01656000 USING *,R12 @V2B2638 01657000 SL R12,=A(DMKMONIO-DMKMON) ESTABLISH ADDR @V2B2638 01658000 USING MONCOM,R9 @V2B2638 01659000 USING DMKMON,R12 @V2B2638 01660000 L R9,=A(DMKPRGMC) GET ADDR OF MONCOM @V2B2638 01661000 L R9,0(R9) ... @V2B2638 01662000 L R1,MONAIOB ADDRESS OF BASE IOB @V2B2638 01663000 CR R1,R10 SAME IOB? @V2B2638 01664000 LA R5,GOTO SET RETURN ADDRESS AFTER FRET @V2B2638 01665000 BNE FRETIOB NOPE, NOT FINAL INT. IGNORE @V2B2638 01666000 BAL R5,FRETIOER IN ANY CASE, RETURN THE IOERBLOK @V2B2638 01667000 TM IOBSTAT,IOBFATAL WAS THAT FATAL? @V2B2638 01668000 BZ CHKUC NOPE, MAYBE IT WAS UC @V2B2638 01669000 CHKERR TM MONFLAG1,ERROR FATAL, BEEN HERE BEFORE? @V2B2638 01670000 BO ERRONERR YES, ERROR ON ERROR @V2B2638 01671000 OI MONFLAG1,ERROR NO, INDICATE WEVE BEEN HERE ONCE @V2B2638 01672000 TM MONFLAG1,TRUN BEEN THROUGH EOT BEFORE? @V2B2638 01673000 LA R2,IOBSIZE*8+8*1(R10) SET FOR EOT CAW = WTM1 @V2B2638 01674000 BZ EOT NOPE, THEN DO SHUTDOWN NOW @V2B2638 01675000 * OTHERWISE, ERROR STOPPING MONITOR ON EOT, SO QUIT NOW. 01676000 SPACE 2 01677000 ERRONERR LA R2,220 MSG220, TAPE ERR, MON SHUTDOWN @V2B2638 01678000 MSGCOMM O R2,=X'B0C90000' RETURN HERE + ALARM + @V2B2638 01679000 * OPERATOR + INFORMATION MSG 01680000 SLR R1,R1 ZIP R1 = NO SUBSTITUTABLES @V2B2638 01681000 ICM R0,B'1110',MODID+3 ISSUEING MODULE ID @V2B2638 01682000 CALL DMKERMSG GO PUT OUT THE MESSAGE @V2B2638 01683000 L R15,PRGMC ADDRESS OF DMKPRGMC (MONCOM PTR) @V4M0238 01684000 L R15,0(R15) ADDRESS MONCOM @V4M0238 01685000 LTR R15,R15 IF ZERO, DMKMNIFI ALREADY CALLED @V4M0238 01686000 BZ GOTO EXIT TO DISP WHEN MNIFI COMPLETE @V4M0238 01687000 B FINISHUP DONE ALL WE CAN, SHUTDOWN MON. @V2B2638 01688000 SPACE 3 01689000 CHKUC TM IOBCSW+4,UC DID WE GET A UC? @V2B2638 01690000 BZ CHKUE NOPE, GO CHECK UNIT EXCEPTION @V2B2638 01691000 TM MONFLAG1,TRUN UC AFTER WTM, RUN SEQUENCE? @V2B2638 01692000 BZ CHKERR NO, BAD NEWS, STOP THE MONITOR @V2B2638 01693000 TM IOBCSW+4,CUE+DE DID IT COME WITH CUE AND DE @V2B2638 01694000 BNO ERRONERR NOPE, SOMETHING WENT HAYWIRE @V2B2638 01695000 TM MONFLAG1,CFSTOP STOPPING BY REQUEST? @V2B2638 01696000 BO FINISHUP YUP, THEN BE EXPIDITIOUS @V2B2638 01697000 TM MONFLAG1,ERROR ERROR OR EOT? @V2B2638 01698000 BO ERRONERR TAPE ERROR, MSG 220. @V2B2638 01699000 LA R2,219 MSG NO 219, EOT, MON SHUTDOWN @V2B2638 01700000 B MSGCOMM JOIN COMMON MSG CODE @V2B2638 01701000 SPACE 3 01702000 CHKUE TM IOBCSW+4,UE DID WE GET UE ? @V2B2638 01703000 BZ CLEANIO NOPE, INTERRUPT IS GOOD @V2B2638 01704000 L R1,IOBCSW GET THE ENDING CCW ADDR @V2B2638 01705000 LA R1,0(R1) CLEAR ANY UNDUE GARBAGE @V2B2638 01706000 LA R2,IOBSIZE*8+8*1(R10) END OF WRITE CCW @V2B2638 01707000 CR R1,R2 IS THAT WHERE WE STOPPED? @V2B2638 01708000 BNE NOTONWR NOPE, BR @V2B2638 01709000 EOT MVC MONUSER(8),=CL8'SYSTEM' SYSTEM CAUSED THE STOP @V2B2638 01710000 LCTL C8,C8,ZEROES QUICK, SHUT OFF ALL MONITORING @V2B2638 01711000 MVC CPCREG8(4),ZEROES STOP ALL MONITORING @V2B2638 01712000 L R8,PREFIXB ADDRESS THE OTHER PSA @V4075A4 01713000 MVC CPCREG8-IPLPSW(4,R8),ZEROES ZERO OUT OTHER @V4075A4 01714000 * PROCESSOR'S MC MASK 01715000 OI MONFLAG1,TRUN INDICATE TAPE RUN CMD BEEN DONE @V2B2638 01716000 TM MONFLAG1,ERROR FLAG ON OR OFF @VA13418 01717000 BZ RESETCAW IF OFF, PROCESS NORMALLY @VA13418 01717200 ST R2,IOBCAW SET THE PROPER CAW ADDRESS @VA13418 01717400 BAL R5,CALLIOS GET THE TAPE MOVING AGAIN @VA13418 01717600 B ERRONERR UNRECOVERABLE ERROR ON TAPE @VA13418 01717800 SPACE 01718000 NOTONWR LA R2,IOBSIZE*8+8*2(R10) END OF WTM1 CCW @V2B2638 01719000 CR R1,R2 IS THAT WHERE WE STOPPED? @V2B2638 01720000 BE RESETCAW YES, SET FOR WTM2 AND RESTART @V2B2638 01721000 LA R2,IOBSIZE*8+8*3(R10) SET FOR RUN AND RESTART @V2B2638 01722000 RESETCAW ST R2,IOBCAW SET THE PROPER CAW ADDR @V2B2638 01723000 BAL R5,CALLIOS GET THE TAPE MOVING AGAIN @V2B2638 01724000 B GOTO GET LOST TILL 'RUN' IS DONE @V2B2638 01725000 SPACE 3 01726000 CLEANIO L R3,MONIOBF GET ADDR OF BUFFER WRITTEN OUT @V4075A4 01727000 LPR R2,R3 R3 MAY BE NEG, GET POS VALUE @V4075A4 01728000 TM MONFLAG3,SPOOLED SEE IF WE ARE SPOOLING @V50A2B5 01729000 BNO NOSPL007 @V50A2B5 01730000 OI 8(R2),MONBUFAV TURN ON AVAILABLE BIT @V50A2B5 01731000 B NOSPL008 @V50A2B5 01732000 NOSPL007 OI 2(R2),MONBUFAV TURN ON AVAILABLE BIT @V50A2B5 01733000 NOSPL008 EQU * @V50A2B5 01734000 L R8,PREFIXA GET POINTER TO ABSOLUTE PREFIX @V4075A4 01735000 L R4,MONIOSLT GET ADDR OF SLOT OF BUFF WRITTEN @V4075A4 01736000 TM MONFLAG1,MON1BUF IS THIS 1-BUFFER CASE? @V4075A4 01737000 BZ CHKIOPDG NO, SKIP SPECIAL LOGIC @V4075A4 01738000 TM MONFLAG3,SPOOLED SEE IF WE ARE SPOOLING @V50A2B5 01739000 BNO NOSPL009 @V50A2B5 01740000 OI 8(R2),MONBUFAC TURN ON ACCEPTING BIT @V50A2B5 01741000 LA R5,20(R2) GET ADDRESS OF 1ST RECORD @V50A2B5 01742000 B NOSPL010 @V50A2B5 01743000 NOSPL009 OI 2(R2),MONBUFAC TURN ON ACCEPTING BIT @V50A2B5 01744000 LA R5,4(R2) GET ADDRESS OF 1ST RECORD @V50A2B5 01745000 NOSPL010 EQU * @V50A2B5 01746000 ST R5,MONNEXT(R8) SAVE IT IN PSA @V4075A4 01747000 SR R1,R1 CLEAR A REG @V4075A4 01748000 ST R1,MONIOBF INDICATE TAPE NO LONGER BUSY @V4075A4 01749000 TM MONFLAG2,SUSPEND HAS MONITOR BEEN SUSPENDED? @V4075A4 01750000 BNZ REACTVAT YES, GO REACTIVATE IT @V4075A4 01751000 B CHKSTOP GO CHECK FOR STOP PROCESSING @V4075A4 01752000 CHKIOPDG LA R6,8(R4) POINT TO NEXT SLOT @V50A2B5 01753000 CLI 0(R6),X'FF' SHOULD WE WRAP? @V4075A4 01754000 BNE NOWRAPI NO, ALL SET @V4075A4 01755000 LA R6,MONBUF1 YES, WRAP @V4075A4 01756000 NOWRAPI L R5,0(R6) GET ADDRESS OF NEXT BUFFER @V4075A4 01757000 TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01758000 BNO NOSPL011 @V50A2B5 01759000 TM 8(R5),255-MONBUFIO TEST FOR IO PENDING @V50A2B5 01760000 BNZ NOIOPDG @V50A2B5 01761000 B NOSPL012 @V50A2B5 01762000 NOSPL011 TM 2(R5),255-MONBUFIO TEST FOR IO PENDING @V50A2B5 01763000 BNZ NOIOPDG @V50A2B5 01764000 NOSPL012 EQU * @V50A2B5 01765000 ST R6,MONIOSLT YES, SAVE SLOT ADDRESS @V4075A4 01766000 LH R2,0(R5) GET LENGTH OF REC TO BE WRITTEN @V4075A4 01767000 * 01768000 * GO TO NEXT BUFFER TO SEE IF I/O WILL STILL BE PENDING 01769000 * 01770000 LA R6,8(R6) POINT TO NEXT SLOT @V50A2B5 01771000 CLI 0(R6),X'FF' SHOULD WE WRAP? @V4075A4 01772000 BNE NOWRAPJ NO, ALL SET @V4075A4 01773000 LA R6,MONBUF1 YES, WRAP @V4075A4 01774000 NOWRAPJ L R1,0(R6) POINT TO NEXT BUFFER @V4075A4 01775000 CKNXTBUF LPR R5,R5 IF R5 IS COMPLEMENTED, RESET @V4075A4 01776000 TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01777000 BNO NOSPL013 @V50A2B5 01778000 TM 8(R1),255-MONBUFIO TEST FOR IO PENDING @V50A2B5 01779000 BNZ SETIOBUF @V50A2B5 01780000 B NOSPL014 @V50A2B5 01781000 NOSPL013 TM 2(R1),255-MONBUFIO TEST FOR IO PENDING @V50A2B5 01782000 BNZ SETIOBUF @V50A2B5 01783000 NOSPL014 EQU * @V50A2B5 01784000 LCR R5,R5 YES, COMPLEMENT BUFF ADDR @V4075A4 01785000 SETIOBUF TM APSTAT1,APUOPER IS APU OPERATIONAL? @V4075A4 01786000 BZ NOCS4 NO, USE STORE INSTEAD OF CS @V4075A4 01787000 CS R3,R5,MONIOBF SET NEW MONIOBF VALUE WITH CS @V4075A4 01788000 BNZ CKNXTBUF INTERFERENCE, TRY AGAIN @V4075A4 01789000 B NOST4 BRANCH AROUND STORE INST @V4075A4 01790000 NOCS4 ST R5,MONIOBF SET NEW MONIOBF VALUE @V4075A4 01791000 NOST4 EQU * @V4075A4 01792000 LA R1,IOBSIZE*8(R10) ADDRESS OF THE WRITE CCW @V2B2638 01793000 ST R1,IOBCAW STORE IN THE CAW @V2B2638 01794000 LPR R5,R5 ENSURE POSITIVE VALUE @V4M0152 01795000 ST R5,IOBSIZE*8(R10) SET UP THE CCW DATA ADDRESS @V4075A4 01796000 MVI IOBSIZE*8(R10),X'01' RESTORE THE OP CODE @V2B2638 01797000 STH R2,IOBSIZE*8+6(R10) SET CCW DATA LENGTH @V2B2638 01798000 TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01799000 BNO DOIOS NO @V50A2B5 01800000 BAL R5,CALLIOS1 CALL SPECIAL ROUTINE @V50A2B5 01801000 B DONEIOS @V50A2B5 01802000 DOIOS BAL R5,CALLIOS DO REGULAR CALL @V50A2B5 01803000 DONEIOS EQU * @V50A2B5 01804000 L R8,PREFIXA RESTORE PTR TO FORCE TO ABS 0 @V4M0153 01805000 * NOTE THAT RETURN HERE MAY BE ON 01806000 * THE OTHER PROCESSOR. 01807000 TM MONFLAG2,SUSPEND WAS MONITOR SUSPENDED? @V4075A4 01808000 BZ GOTO NO, GO EXIT @V4075A4 01809000 LPR R3,R3 ENSURE POSITIVE VALUE @V4M0152 01810000 TM MONFLAG3,CLSUS DO WE HOLD OFF ON UNSUSPEND@V50A2B5 01811000 BO GOTO YES @V50A2B5 01812000 TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01813000 BNO NOSPL001 @V50A2B5 01814000 OI 8(R3),MONBUFAC FLAG BUFF 'ACTIVE COLLECTOR'@V50A2B5 01815000 B NOSPL002 @V50A2B5 01816000 NOSPL001 OI 2(R3),MONBUFAC FLAG BUFFER ACTIVE @V50A2B5 01817000 NOSPL002 EQU * @V50A2B5 01818000 ST R3,MONCURBF SET CURR BUFF POINTER IN MONCOM @V4075A4 01819000 ST R4,MONCRSLT @V4075A4 01820000 LA R5,4(R3) R5 -> FIRST AVAIL REC IN BUFF @V4075A4 01821000 TM MONFLAG3,SPOOLED ARE WE SPOOLING @V50A2B5 01822000 BNO NOSPL003 @V50A2B5 01823000 LA R5,16(R5) YES, BUMP BY 16 @V50A2B5 01824000 NOSPL003 EQU * @V50A2B5 01825000 ST R5,MONNEXT(R8) SAVE IT IN ABSOLUTE PSA @V4075A4 01826000 O R5,=F'4088' CREATE ADDRESS OF LAST BYTE @V50A2B5 01827000 ST R5,PAGEND(R8) SAVE IT IN ABSOLUTE PSA @V4075A4 01828000 REACTVAT TM MONFLAG3,CLSUS DO I KEEP SUSPENDED @V50A2B5 01829000 BO GOTO YES @V50A2B5 01830000 NI MONFLAG2,255-SUSPEND RESET SUSPEND STATUS @V50A2B5 01831000 L R1,=A(DMKPRGC8) GET THE MONITOR MASK @V2B2638 01832000 MVC CPCREG8(4),0(R1) MOVE TO PSA @V2B2638 01833000 L R8,PREFIXB ADDRESS THE OTHER PSA @V4075A4 01834000 MVC CPCREG8-IPLPSW(4,R8),0(R1) PROPAGATE MC MASK @V4075A4 01835000 LCTL C8,C8,CPCREG8 RESTORE WHATEVER MON WAS BEFORE @V2B2638 01836000 LA R0,MNCLPERF DUMMY A SUSPEND CALL, CL 0... @VM01017 01837000 STH R0,MONCLASS ... @VM01017 01838000 LA R0,MNCOSUS SUSPEND CODE @VM01017 01839000 ST R0,MONCODE ... @V2B2638 01840000 LA R0,MN099LEN LENGTH OF SUSPENSION RECORD @V2B2638 01841000 BAL R5,PREPREC GET SPACE & CREATE HDR @V2B2638 01842000 LTR R1,R1 TEST FOR BUFFER SPACE @VA10215 01842300 BZ GOTO NO SPACE -- DISPATCH @VA10215 01842600 USING MN099,R1 ADDRESS THE RECORD @V2B2638 01843000 MVC MN099TOD,MONSUSCK+1 TOD AT SUSPENSION @V2B2638 01844000 MVC MN099CNT,MONSUSCT COUNT OF SUSPENSIONS @V2B2638 01845000 TM MONFLAG1,MONLSTBK HANDLING "LAST BLOCK" ? @VA04526 01846000 BO TRAILER YES (SUSPENDED ON THE LAST BLK)..@VA04526 01847000 * TRY IT AGAIN. 01848000 B GOTO OFF TO THE DISPATCHER @VA03658 01849000 SPACE 01850000 NOIOPDG SR R1,R1 CLEAR R1 FOR USE IN CS @V4075A4 01851000 TM APSTAT1,APUOPER IS APU OPERATIONAL? @V4075A4 01852000 BZ NOCS5 NO, USE STORE INSTEAD OF CS @V4075A4 01853000 CS R3,R1,MONIOBF SWAP IN TAPE FREE INDICATION @V4075A4 01854000 BNZ CLEANIO I/O IS NOW PENDING, GO GET IT @V4075A4 01855000 B NOST5 BRANCH AROUND STORE INST @V4075A4 01856000 NOCS5 ST R1,MONIOBF INDICATE THAT TAPE IS FREE @V4075A4 01857000 NOST5 EQU * @V4075A4 01858000 CHKSTOP TM MONFLAG1,CFSTOP DID SOMEBODY SAY STOP ON US? @V2B2638 01859000 BZ GOTO NOPE, ALL DONE. @V2B2638 01860000 TM MONFLAG1,TRUN HAS THIS BEEN DONE ONCE? @V2B2638 01861000 BO FINISHUP YES, THEN BEATIT @V2B2638 01862000 TRAILER CALL DMKMNITR EXIT TO TRAILER ROUTINE @V4075A4 01863000 B GOTO EXIT TO DISPATCHER 01864000 SPACE 01865000 FINISHUP CALL DMKMNIFI EXIT TO FINISHUP ROUTINE @V4075A4 01866000 FRETIOB ST R5,IOBMISC2 SAVE THE RETURN ADDRESS @V2B2638 01867000 BAL R5,FRETIOER DROP THE IOERBLOK IF ONE EXISTS @V2B2638 01868000 L R5,IOBMISC2 RELOAD THE RETURN ADDRESS @V2B2638 01869000 LA R1,0(R10) CLEAR HI BYTE AND MOVE TO R1 @V2B2638 01870000 LA R0,IOBSIZE GET SIZE OF STANDARD IOB @V2B2638 01871000 C R1,MONAIOB IS THIS THE MONITOR BASE IOB? @V2B2638 01872000 BNE STDIOB NO, STANDARD IOB SIZE @V2B2638 01873000 LA R0,IOBSIZE+4 SET FOR IOB + CCW'S @V2B2638 01874000 STDIOB CALL DMKFRET RETURN THE STORAGE @V2B2638 01875000 BR R5 RETURN TO CALLER @V2B2638 01876000 SPACE 3 01877000 FRETIOER L R1,IOBIOER GET THE IOER ADDRESS @V2B2638 01878000 LTR R1,R1 IS THERE ONE? @V2B2638 01879000 BZR R5 NOPE, RETURN @V2B2638 01880000 LA R0,IOERSIZE GET THE CORRECT SIZE @V2B2638 01881000 CALL DMKFRET FRET THE IOERBLOK @V2B2638 01882000 SLR R1,R1 CLEAR THE IOB POINTER @V2B2638 01883000 ST R1,IOBIOER ... @V2B2638 01884000 BR R5 RETURN TO CALLER @V2B2638 01885000 EJECT 01886000 *. 01887000 * 01888000 * ENTRY POINT - 01889000 * 01890000 * DMKMONTI - HANDLE A TIMER INTERRUPT 01891000 * 01892000 * ENTRY CONDITIONS - 01893000 * 01894000 * GPR10 - ADDRESS OF THE TRQBLOK 01895000 * GPR12 - ADDRESS OF THE ENTRY POINT 01896000 * 01897000 * EXIT CONDITIONS - 01898000 * 01899000 * NONE 01900000 * 01901000 * CALLS TO OTHER ROUTINES - 01902000 * 01903000 * DMKSCHST - TO RE-ESTABLISH A TIMER REQUEST AFTER INTERRUPT 01904000 * DMKDSPCH - RETURN CONTROL TO 01905000 * 01906000 * EXTERNAL REFERENCES - 01907000 * 01908000 * DMKPRGMC - ADDR OF THE MONITOR COMMUNICATIONS BLOCK 01909000 * DMKPRGTI - ADDR OF THE MONITOR INTERVAL 01910000 * 01911000 * OPERATION - 01912000 *  01913000 * MONITOR TIMER INTERRUPT PROCESSING 01914000 * 01915000 * DMKMONTI: 01916000 * 01917000 * INDICATE THAT A TIMER INTERRUPT IS BEING HANDLED. 01918000 * 01919000 * REINITIALIZE THE TRQBLOK FOR THE NEXT INTERVAL. 01920000 * 01921000 * CALL DMKSCHST TO ENQUEUE THE NEXT REQUEST. 01922000 * 01923000 * CHECK THE MONITOR MASK IN CPCREG8 (IN PSA), IF 01924000 * PERFORM IS ACTIVE THEN SIMULATE A CLASS 0 CODE 0 01925000 * MONITOR CALL INTERRUPT. 01926000 * 01927000 * CHECK THE MONITOR MASK IN CPCREG8; IF USER IS 01928000 * ACTIVE THEN SIMULATE A CLASS 4 CODE 0 MONITOR CALL 01929000 * INTERRUPT. 01930000 * 01931000 * CHECK THE MONITOR MASK IN CPCREG8; IF DASTAP IS 01932000 * ACTIVE THEN SIMULATE A CLASS 6 CODE 1 MONITOR CALL 01933000 * INTERRUPT. 01934000 * 01935000 * RESET THE TIMER INTERRUPT ACTIVE FLAG AND GO TO THE 01936000 * DISPATCHER. 01937000 * 01938000 *. 01939000 ENTRY DMKMONTI @V2B2638 01940000 DMKMONTI DS 0H @V2B2638 01941000 USING *,R12 @V2B2638 01942000 SL R12,=A(DMKMONTI-DMKMON) ESTAB. BASE ADDR @V2B2638 01943000 USING DMKMON,R12 @V2B2638 01944000 LR R1,R10 TRQBLOK IN R1 FOR TRB PROCESS @V2B2638 01945000 USING TRQBLOK,R1 @V2B2638 01946000 L R9,=A(DMKPRGMC) GET ADDR OF MONCOM @V2B2638 01947000 L R9,0(,R9) ... @V2B2638 01948000 L R3,=A(DMKPRGTI) GET POINTER TO TIME INCREMENT @VA10057 01948200 LH R3,0(R3) GET TIME INCREMENT @VA10057 01948400 LTR R3,R3 IS THERE ONE? @VA10057 01948600 BZ GOTO NO-NO MORE MONITOR PERF @VA10057 01948800 USING MONCOM,R9 @V2B2638 01949000 OI MONFLAG1,MONTIINT FLAG TIMER INTERRUPT HANDLER @V2B2638 01950000 STCK TRQBTOD TIME OF DAY FOR REQUEST (NOW) @V2B2638 01951000 BC 12,CLOCKOK IS CLOCK FUNCTIONING? @VA04301 01952000 DOWNWEGO GOTO DMKCVTAB CLOCK DAMAGED...ABEND CVT001 @VA04301 01953000 CLOCKOK EQU * @VA04301 01954000 SLR R2,R2 CLEAR FOR MULTIPLICATION @V2B2638 01957000 M R2,=F'1000000' CALCULATE IN UNITS OF U-SECONDS @V2B2638 01958000 SLDL R2,12 ALIGN WITH TOD FORMAT @V2B2638 01959000 AL R3,TRQBTOD+4 ADD IN TOD LOW ORDER BITS @V2B2638 01960000 BC 12,*+8 SKIP IF NO OVERFLOW @V2B2638 01961000 AL R2,F1 ADD 1 SEC. TO HIGH ORDER TOD @V2B2638 01962000 AL R2,TRQBTOD ADD IN HIGH ORDER TOD BITS @V2B2638 01963000 STM R2,R3,TRQBVAL NEXT INTERRUPT DUE AT THIS TIME @V2B2638 01964000 CALL DMKSCHST INSERT TRB IN REQUEST BLOCK CHAIN@V2B2638 01965000 DROP R1 @V2B2638 01966000 TM CPCREG8+2,PERFCL MUST WE DO PERF COLLECTION @V2B2638 01967000 BZ CHKDASD NO, MAY BE DASD CLASS @VM01054 01968000 * CLASS X CODE SETUP DEFERRED UNTIL DMKMIA BROUGHT IN (THIS PU 01969000 * MIGHT LOOSE CONTROL) 01970000 BAL R6,MONCOD00 GO COLLECT DATA @V2B2638 01971000 CHKDASD TM CPCREG8+2,DASDCL MUST WE DO DASTAP COLLECTION? @VM01054 01972000 BZ CHKUSER NOPE, CHECK USER @VM01054 01973000 LA R0,MNCLDAST SIMULATE DASTAP CLASS @VM01054 01974000 STH R0,MONCLASS @VM01054 01975000 LA R0,MNCODAS AND CODE @VM01054 01976000 ST R0,MONCODE @VM01054 01977000 BAL R6,MONCOD61 COLLECT THE DATA @VM01054 01978000 CHKUSER TM CPCREG8+2,USERCL MUST WE DO USER COLLECTION? @VM01054 01979000 BZ NOMORE NOPE, DONE @VM01054 01980000 LA R0,MNCLUSER YES, SIMULATE USER CLASS @VM01054 01981000 STH R0,MONCLASS @VM01054 01982000 LA R0,MNCOUSER AND USER CODE @VM01054 01983000 ST R0,MONCODE @VM01054 01984000 BAL R6,MONCOD40 GO COLLECT THE DATA @VM01054 01985000 NOMORE NI MONFLAG1,255-MONTIINT TIMER INT. PROCESSING DONE@VM01054 01986000 SPACE 01987000 L R1,MONSACT GET SAMPLE COUNT @V60BEBC 01988000 LA R1,1(R1) INCREMENT IT @V60BEBC 01988080 ST R1,MONSACT SAVE IT BACK @V60BEBC 01988160 L R2,=A(DMKSYSAT) GET LIMIT FLAG @V60BEBC 01988240 TM 0(R2),MONSLMT CLOSE ON SAMPLE LIMIT?? @V60BEBC 01988320 BZ GOTO NO, GET OUT @V60BEBC 01988400 L R2,=A(DMKSYSMX) YES, SO COMPARE @V60BEBC 01988480 C R1,0(R2) FOR EQUAL @V60BEBC 01988560 BL GOTO LIMIT NOT REACHED @V60BEBC 01988640 XC MONSACT,MONSACT CLEAR SAMPLE COUNT @V60BEBC 01988720 CALL DMKMIACC CLOSE THE FILE AND @V60BEBC 01988800 GOTO GOTO DMKDSPCH GO TO THE DISPATCHER @V60BEBC 01988880 EJECT 01989000 *********************************************************************** 01990000 * 01991000 * CONSTANTS AND WORK AREAS 01992000 * 01993000 *********************************************************************** 01994000 DS 0F @V2B2638 01995000 SPACE 1 01996000 Q1DROP EQU X'40' QUEUE DROP INDICATOR @V2B2638 01997000 PRGMC DC A(DMKPRGMC) ADDRESS OF MONCOM POINTER @V4M0238 01998000 LTORG @V2B2638 01999000 COPY SPOOL @V50A2B5 02000000 EJECT 02001000 COPY EQU @V2B2638 02002000 COPY ALLOC @V2B2638 02003000 PSA @V2B2638 02004000 COPY MONBLOKS @V2B2638 02005000 COPY VMBLOK @V2B2638 02006000 COPY SAVE @V2B2638 02007000 COPY IOBLOKS @V2B2638 02008000 COPY IOER @V2B2638 02009000 COPY CORE @V2B2638 02010000 COPY DEVTYPES @V2B2638 02011000 COPY RBLOKS @V2B2638 02012000 IOBLOK DSECT CONTINUE THE DSECT @VA09047 02012010 * ANY CHANGES IN PAGESIZE MUST ALSO BE REFLECTED 02012020 * IN DMKUSO AND DMKPAG 02012030 ORG , MAKE SURE WE'RE AT THE END @VA09047 02012040 PAGECCWS DS 6D SPACE FOR PAGING CCWS @VA09047 02012050 ORG PAGECCWS CCW DEFINITIONS @VA09047 02012060 PAGESK DS D SPACE FOR SEEK @VA09047 02012070 PAGESS DS D SPACE FOR SET SECTOR @VA09047 02012080 PAGESRCH DS D SPACE FOR SEARCH @VA09047 02012090 PAGESTIC DS F SPACE FOR TIC @VA09047 02012100 PAGEIOB DS F POINTER TO SLOT SORTED IOBLOK @VA09047 02012110 PAGERW DS D SPACE FOR READ/WRITE @VA09047 02012120 PAGEPRI EQU PAGERW+5 SPACE FOR REQUEST PRIORITY @VA09047 02012130 PAGESNS DS D SPACE FOR SENSE/TIC @VA09047 02012140 ORG PAGESNS+7 @VA09047 02012150 PAGESRCD DS X SPACE FOR SLOT NUMBER @VA09047 02012160 PAGESEEK DS D SPACE FOR SEEK ARGUMENT AND @VA09047 02012170 * SECTOR 02012180 ORG PAGESEEK+2 @VA09047 02012190 PAGECYL DS H SPACE FOR CYLINDER ADDRESS @VA09047 02012200 PAGEHEAD DS H SPACE FOR HEAD ADDRESS @VA09047 02012210 PAGERCD DS X SPACE FOR RECORD NUMBER @VA09047 02012220 PAGESECT DS X SECTOR NUMBER @VA09047 02012230 PAGESIZE EQU (*-IOBLOK)/8 SIZE OF EXTENDED IOBLOK IN @VA09047 02012240 * DOUBLE WORDS 02012250 EJECT 02012260 COPY TIMER @V2B2638 02013000 END 02014000