REX TITLE 'DMTREX (RSCS) VM/370 - RELEASE 6' 00001000 *. 00002000 * MODULE NAME - 00003000 * 00004000 * DMTREX 00005000 * 00006000 * FUNCTION - 00007000 * 00008000 * THIS ROUTINE FUNCTIONS AS THE CONTROLLING SUPERVISOR 00009000 * TASK AND TOGETHER WITH DMTCMX, DMTMGX, DMTSYS, DMTCOM, 00010000 * DMTMSG, AND DMTCRE MAKE UP THE REX SUPERVISOR TASK. 00011000 * 00012000 * ATTRIBUTES - 00013000 * 00014000 * NON-REUSABLE 00015000 * 00016000 * ENTRY POINTS - 00017000 * 00018000 * DMTREX - AT TASK INITIATION TIME 00019000 * DMTREXHC - CP WRITE ENTRY 00020000 * DMTREXVL - VERSION AND TITLE ENTRY POINT 00021000 * DMTREXCN - REX CONSOLE I/O REQ TABLE 00022000 * DMTREXID - OP MSG XFER ID 00023000 * 00024000 * ENTRY CONDITIONS - 00025000 * 00026000 * R15= ENTRY ADDRESS 00027000 * 00028000 * EXIT CONDITIONS - 00029000 * 00030000 * NORMAL - THIS ROUTINE IS ALWAYS ACTIVE 00031000 * ERROR - THIS ROUTINE IS ALWAYS ACTIVE 00032000 * 00033000 EJECT 00034000 * 00035000 * CALLS TO OTHER ROUTINES - 00036000 * 00037000 * SEE ENTRY TO EACH ROUTINE 00038000 * 00039000 * EXTERNAL REFERENCES - 00040000 * 00041000 * TCOM - COMMON ROUTINE VECTOR TABLE 00042000 * TLINKS - LINK TABLE CHAIN 00043000 * 00044000 * TABLES / WORKAREAS - 00045000 * 00046000 * SEE ENTRY TO EACH ROUTINE 00047000 * 00048000 * REGISTER USAGE - 00049000 * 00050000 * ALL SUBROUTINES IN THE MODULE CONFORM GENERALLY TO THIS USAGE; 00051000 * ANY INDIVIDUAL DEVIATIONS OR EXTENSIONS ARE LISTED WITH THE 00052000 * COMMAND DESCRIPTION 00053000 * 00054000 * GPR0 = PARM REGISTER 00055000 * GPR1 = IOTABLE ADDRESSABILITY 00056000 * GPR2 = LINK TABLE ADDRESSABILITY 00057000 * GPR3 = WORK 00058000 * GPR4 = WORK 00059000 * GPR5 = WORK 00060000 * GPR6 = WORK 00061000 * GPR7 = WORK 00062000 * GPR8 = WORK 00063000 * GPR9 = WORK 00064000 * GPR10 = WORK 00065000 * GPR11 = WORK 00066000 * GPR12 = BASE REGISTER 00067000 * GPR13 = WORK 00068000 * GPR14 = RETURN 00069000 * GPR15 = COMMON VECTOR TABLE ADDRESSABILITY 00070000 * 00071000 * NOTES - 00072000 * 00073000 * NONE 00074000 * 00075000 * OPERATION - 00076000 * 00077000 * SEE EACH SECTION 00078000 * 00079000 *. 00080000 EJECT 00081000 PUNCH 'SLC 010000' 00082000 SPACE 00083000 DMTREX CSECT 00084000 SPACE 00085000 ENTRY DMTREXHC CP WRITE ENTRY 00086000 ENTRY DMTREXVL VERSIO AND TITLE ENTRY POINT 00087000 ENTRY DMTREXCN REX CONSOLE I/O REQ TABLE 00088000 ENTRY DMTREXID OP MSG XFER ID 00089000 SPACE 00090000 REXSAVE DC 0D'0' BEGINNING OF MONITOR SAVE AREA 00091000 SPACE 00092000 REXPSW DC X'FF04',AL2(0),A(REXINIT) INITIAL PSW FOR DISPATCH 00093000 SPACE 00094000 REXREG0 DC F'0' INITIAL REGISTER CONTENTS 00095000 REXREG1 DC F'0' 00096000 REXREG2 DC F'0' 00097000 REXREG3 DC F'0' 00098000 REXREG4 DC F'0' 00099000 REXREG5 DC F'0' 00100000 REXREG6 DC F'0' 00101000 REXREG7 DC F'0' 00102000 REXREG8 DC F'0' 00103000 REXREG9 DC F'0' 00104000 REXREG10 DC F'0' 00105000 REXREG11 DC F'0' 00106000 REXREG12 DC A(DMTREX) BASE REGISTER FOR FIRST PAGE 00107000 REXREG13 DC F'0' 00108000 REXREG14 DC F'0' 00109000 REXREG15 DC A(REXINIT) ENTRY ADDRESS AT INITIATION 00110000 SPACE 00111000 REQLOCK DC F'0' SYNCH LOCK FOR REQUEST ARRIVAL 00112000 SPACE 3 00113000 REXSTOPD DC 9D'0' TASK SAVE AREA SAVE AREA @VM01109 00113200 SPACE 1 @VM01109 00113400 REXEPTAF DC 16F'0' PROG CHEK REG SAVE AREA @VM01109 00113600 SPACE 1 @VM01109 00113800 DMTREXVL DC 0F'0' ENTRY POINT FOR VERSION AND TITLE 00114000 REXVER DC CL8'6' RELEASE LEVEL @VA10186 00115100 REXLEV DC CL8'0' LEVEL 00116000 REXDATE DC CL8'08/09/79' MONTH/DAY/YEAR @VA10186 00117100 EJECT 00118000 *. 00119000 * 00120000 * ENTRY NAME - 00121000 * 00122000 * REXINIT 00123000 * 00124000 * FUNCTION - 00125000 * 00126000 * THIS ROUTINE PERFORMS THE INITIALIZATION FOR THE DMTREX TASK 00127000 * 00128000 * CALLS TO OTHER ROUTINES - 00129000 * 00130000 * DMTASY - TO INITIATE CONSOLE ASYNCH EXIT 00131000 * DMTCRE - TO CREATE DMTAXS AND DMTLAX TASKS 00132000 * DMTMSG - TO WRITE THE INITIAL MSG 00133000 * 00134000 * OPERATION - 00135000 * 00136000 * 1. SET UP STORAGE DUMP COMMAND 00137000 * 00138000 * 2. RESERVE REX STORAGE 00139000 * 00140000 * 3. INITIALIZE TVECTORS 00141000 * 00142000 * 4. INITIALIZE CONSOLE ASYNCH EXIT 00143000 * 00144000 * 5. INITIALIZE AXS AND LAX 00145000 * 00146000 * 6. INITIALIZE PROGRAM CHECK HANDLER 00147000 * 00148000 * RESPONSES - 00149000 * 00150000 * DMTREX000I RSS (VER V, LEV 1, MM/DD/YY) READY 00151000 * 00152000 * ERROR MESSAGES - 00153000 * 00154000 * NONE 00155000 * 00156000 *. 00157000 SPACE 00158000 REXINIT DC 0H'0' SET ALIGNMENT FOR START OF CODE 00159000 SPACE 00160000 USING DMTREX,R12 DEFINE FIRST PAGE ADDRESSABILITY 00161000 USING SVECTORS,0 GET SVECTORS ADDRESSABILITY 00162000 USING COMDSECT,R15 GET COMMON ROUTINE TABLE ADDR 00163000 USING IOTABLE,R1 GET IOTABLE ADDRESSABILITY 00164000 USING LINKTABL,R2 GET LINKTABL ADDRESSABILITY 00165000 EJECT 00166000 * 00167000 * SET UP STORAGE DUMP COMMAND 00168000 * 00169000 L R1,MAINSIZE RSCS VIRTUAL PAGE COUNT 00170000 BCTR R1,0 ADDR OF LAST PAGE 00171000 ST R1,REXWORK TO STORAGE FOR CONVERSION 00172000 UNPK REXDUMPR+9(5),REXWORK+2(3) SPREAD HEX DIGITS 00173000 MVI REXDUMPR+9,C'-' RESTORE LEFT CLOBBERED CHAR 00174000 MVI REXDUMPR+13,C'F' RESTORE RIGHT CLOBBERED CHAR 00175000 TR REXDUMPR+10(3),REXTOEBC-240 TRANSLATE ABCDEF 00176000 SPACE 2 00177000 * 00178000 * RESERVE STORAGE 00179000 * 00180000 LA R13,REXCSAVE GET COMMON SAVE ADDR 00181000 LR R0,R12 ADDR OF START OF FIRST PAGE 00182000 L R1,REXEND LAST ADDRESS OF REX 00183000 SLR R1,R0 TOTAL STORAGE IN USE 00184000 SRL R1,12 TOTAL PAGES IN USE BY REX -1 00185000 SRL R0,12 PAGE NUMBER OF FIRST PAGE 00186000 L R2,MAINMAP GET MAINSTORAGE MAP 00187000 ALR R2,R0 ADDR OF MAP BYTE FOR FIRST PAGE 00188000 BCTR R1,0 REDUCE BY ONE 00189000 LTR R1,R1 ANY TO RESERVE? 00190000 BM REXINAME NO 00191000 EX R1,REXSQUAT RESERVE REX STORAGE 00192000 EJECT 00193000 * 00194000 * INITIALIZE TASK NAME 00195000 * 00196000 REXINAME EQU * 00197000 L R1,ACTIVE GET THIS TASK TABLE ENTRY 00198000 MVC TASKNAME-TASKE(4,R1),REXREX SET TASK NAME 00199000 SPACE 2 00200000 * 00201000 * INITIALIZE TVECTORS 00202000 * 00203000 MVC TVECTOR0(20),REXTVECT MOVE IN THE ADDRS 00204000 SPACE 2 00205000 * 00206000 * GET VIRTUAL CONSOLE DEVICE ADDRESS 00207000 * 00208000 SR R1,R1 ZERO 00209000 BCTR R1,0 -1 FOR CONS ADDR REQ 00210000 DIAG R1,R2,X'24' ASK VM/370 FOR CONS ADDR 00211000 BC 14,REXICGOT CONS ADDR IN REG.1 00212000 MVI REXCONSL+DEVCODE-IOTABLE,X'FF' SET DISCON 00213000 LA R1,CONSADDR AND DEFAULT CONS ADDR 00214000 REXICGOT EQU * 00215000 STH R1,REXCONSL+DEVCUU-IOTABLE SET CONS ADDR 00216000 SPACE 2 00217000 * 00218000 * INITIALIZE CONSOLE ASYN EXIT 00219000 * 00220000 LH R0,REXCONSL+DEVCUU-IOTABLE CLEAR TOP HALF 00221000 LA R1,REXASYN GET ASYN ADDR 00222000 L R15,ASYNREQ GET SYSTEM ASYN SET ROUTINE 00223000 BALR R14,R15 GO SET THE EXIT 00224000 EJECT 00225000 * 00226000 * INITIALIZE AXS AND LAX 00227000 * 00228000 L R2,TLINKS GET START OF LINK TABLE CHAIN 00229000 LA R2,8(R2) GET THE ACTUAL ENTRY 00230000 MVC LACTTNME(4),REXAXS+3 SET THE NAME TO INIT AXS 00231000 MVC LACTDRVR(8),REXAXS AND THE DRIVER TYPE 00232000 SR R0,R0 00233000 L R15,=V(DMTCRE) GET TASK START ROUTINE ADDR 00234000 BALR R14,R15 AND INITIATE AXS 00235000 LTR R15,R15 DID IT WORK? 00236000 BNZ REXITERM NO - ERROR EXIT 00237000 SPACE 1 00238000 MVC LACTTNME(4),REXLAX+3 SET THE NAME TO INIT LAX 00239000 MVC LACTDRVR(8),REXLAX AND THE DRIVER TYPE 00240000 SR R0,R0 00241000 L R15,=V(DMTCRE) GET TASK START ROUTINE ADDR 00242000 BALR R14,R15 AND INITIATE LAX 00243000 LTR R15,R15 DID IT WORK? 00244000 BNZ REXITERM NO - ERROR EXIT 00245000 MVC LACTTNME(4),REXREX RESET REX NAME IN LINK TABLE 00246000 MVC LACTDRVR(8),LDEFDRVR DRIVER ID TO DEFAULT 00247000 SPACE 2 00248000 * 00249000 * INITIALIZE ACTIVE LINK COUNT 00250000 * 00251000 L R1,TLINKS ADDR OF LINK TABLE 00252000 XC 6(2,R1),6(R1) NONE ACTIVE TO START 00253000 SPACE 2 00254000 * 00255000 * INITIALIZE PROGRAM CHECK MANAGER 00256000 * 00257000 MVC NEWPROG(8),REXPROG SET PROG CHEC EXIT TO REX 00258000 SPACE 2 00259000 * 00260000 * ISSUE INITIAL MESSAGE 00261000 * 00262000 MSG 000,(REXVER,REXLEV,REXDATE) INITIAL MSG 00263000 SPACE 00264000 B REXCYCLE GO 00265000 SPACE 1 00266000 REXSQUAT MVC 1(0,R2),0(R2) TO BE EXECUTED FROM ABOVE 00267000 EJECT 00268000 *. 00269000 * 00270000 * ENTRY NAME - 00271000 * 00272000 * REXCYCLE 00273000 * 00274000 * FUNCTION - 00275000 * 00276000 * THIS ROUTINE MONITORS A LIST OF SYNCH LOCKS LOOKING FOR 00277000 * WORK FOR DMTREX TO PERFORM 00278000 * 00279000 * CALLS TO OTHER ROUTINES - 00280000 * 00281000 * DMTWAT - TO WAIT FOR WORK TO DO 00282000 * DMTAKE - TO TAKE A REQUEST FROM ANOTHER TASK 00283000 * DMTPST - TO POST COMPLETION OF A CONSOLE ATTN 00284000 * 00285000 * OPERATION - 00286000 * 00287000 * 1. CHECK PROGRAM CHECK, REQUEST ARRIVAL, CONSOLE ATTN, 00288000 * AND CONSOLE I/O SYNCH LOCKS. 00289000 * 00290000 * 2. IF ANY ARE POSTED BRANCH TO THE APPROPRIATE ROUTINE 00291000 * TO PROCESS THE REQUEST. 00292000 * 00293000 * 3. AFTER ALL SYNCH LOCKS ARE CHECKED, WAIT ON THE 00294000 * SYNCH LOCK LIST 00295000 * 00296000 * RESPONSES - 00297000 * 00298000 * NONE 00299000 * 00300000 * ERROR MESSAGES - 00301000 * 00302000 * NONE 00303000 * 00304000 *. 00305000 SPACE 00306000 REXCYCLE DC 0H'0' 00307000 CLI PROGLOCK,X'00' PROGRAM CHECKS AFOOT? 00308000 BNE REXPCHEK YEP - KILL A DRIVER OR SO 00309000 CLI REQLOCK,X'00' REQUEST AROUND HERE? 00310000 BNE REXACCPT YES - TAKE AND PROCESS ONE 00311000 CLI ATTNLOCK,X'00' ATTN SEEN? 00312000 BNE REXWHA YEP 00313000 TM REXLOCKS+8,X'40' WAS CONSOLE RUNNING? 00314000 BO REXNOIO NO - SKIP COMPLETION CHECK 00315000 CLI REXCONSL,X'00' POSTED 00316000 BE REXWAIT STILL RUNNING - WAIT 00317000 OI REXLOCKS+8,X'40' MARK CONSOLE IDLE 00318000 L R1,REXCONSL+PROGADDR-IOTABLE LOOK AT LAST I/O 00319000 TM 0(R1),X'01' WAS IT A WRITE? 00320000 BNO REXLINE NO - PROCESS INPUT LINE 00321000 TM REXCONSL+ENDCSW+4-IOTABLE,ATTN ATTN ON WRITE? 00322000 BO REXQUERY YES - STOP TYPING AND READ 00323000 REXNOIO EQU * 00324000 TM REXLOCKS+4,X'40' READ REQUESTED? 00325000 BO REXQUERY YES - START THE READ 00326000 SPACE 00327000 REXOUTRY EQU * 00328000 LA R1,REXOUT CONSOLE LINE BUFFER 00329000 L R2,TLINKS GET LINK TABLE CHAIN ADDR 00330000 LA R2,8(R2) GET MY LINK TABLE ENTRY 00331000 L R15,TCOM GET COMMON ROUTINE ADDR 00332000 L R15,GMSGREQ AND GET A LINE TO TYPE 00333000 BALR R14,R15 GO UNSTACK A MSG 00334000 LTR R15,R15 TEST RETURN CODE 00335000 BZ REXTYPE START THE CONSOLE WRITE 00336000 SPACE 00337000 REXWAIT EQU * 00338000 LA R1,REXLOCKS GET THE SYNCH LOCK LIST 00339000 L R15,WAITREQ SYSTEM WAIT ROUTINE 00340000 BALR R14,R15 GO WAIT 00341000 B REXCYCLE AND GO TO TOP 00342000 SPACE 1 00343000 REXWHA EQU * 00344000 XC ATTNLOCK(4),ATTNLOCK CLEAR THE SYNCH LOCK 00345000 TM REXLOCKS+8,X'40' WAS THE CONSOLE RUNNING? 00346000 BNO REXDEFER YES 00347000 REXQUERY EQU * 00348000 NI REXLOCKS+8,X'FF'-X'40' SET CONSOLE RUNNING 00349000 LA R0,REXREAD ADDR OF CONSOLE READ PROG 00350000 LA R1,REXCONSL ADDR OF CONSOLE I/O TABLE 00351000 ST R0,PROGADDR STORE CCW INTO CAW 00352000 XC IOSYNCH(4),IOSYNCH CLEAR SYNCH LOCK 00353000 L R15,IOREQ SYSTEM I/O REQUEST ROUTINE 00354000 BALR R14,R15 ISSUE THE I/O REQUEST 00355000 B REXCYCLE AND CONTINUE 00356000 SPACE 1 00357000 REXDEFER EQU * 00358000 OI REXLOCKS+4,X'40' SKIP ATTN FROM CONSOLE 00359000 B REXCYCLE AND CONTINUE 00360000 EJECT 00361000 REXLINE EQU * 00362000 TM REXCONSL+ENDCSW+4-IOTABLE,UE #CP COMMAND? @VA03114 00362400 BO REXCYCLE YES, DO ANOTHER READ @VA03114 00362800 LA R1,REXCONSL GET CONSOLE IOTABLE ADDR 00363000 MVI REXREQ,X'03' INITIALIZE COUNT FOR NULL REQUEST 00364000 MVI REXREQ+1,X'00' AND INIT CON FUNCT REQ CODE 00365000 LH R2,REXREAD+6 INIT CCW READ CHAR COUNT 00366000 SH R2,ENDCSW+6 NUMBER OF CHARS ACTUALLY READ 00367000 BZ REXSET PASS NULL LINE ALONG TO CONSOLE FUNS 00368000 LA R3,REXIN ADDR OF INPUT BUFFER 00369000 LA R4,3(R2) ADD THREE FOR THE CONTROL BYTES 00370000 STC R4,REXREQ AND SET THE COUNT IN THE REQUEST BUF 00371000 MVI REXREQ+4,X'40' BLANK FIRST BYTE 00372000 MVC REXREQ+5(L'REXREQ-5),REXREQ+4 BLANK REST OF BUF 00373000 BCTR R2,0 BUMP CHAR CNT DOWN BY ONE 00374000 EX R2,REXUPPER FORCE UPPER CASE 00375000 EX R2,REXMOVER MOVE THE INPUT LINE TO REQ BUFFER 00376000 REXSET EQU * 00377000 XC REXTAKE(4),REXTAKE CLEAR ORIGIN TASK NAME 00378000 BAL R14,REQXEQ RATTLE DOWN THROUGH THE REQ EXECUTOR 00379000 NI REXLOCKS+4,X'FF'-X'40' NOW WATCH ATTNS 00380000 B REXCYCLE AND CONTINUE 00381000 SPACE 00382000 REXUPPER OC 0(0,R3),REXREQ+4 EXECUTED TO FORCE UPPER CASE 00383000 REXMOVER MVC REXREQ+4(0),0(R3) EXECUTED TO SET CONSOLE LINE REQ 00384000 EJECT 00385000 REXTYPE EQU * 00386000 LA R1,REXOUT+10 GET THE START OF MESSAGE TEX @VA03279 00387100 SR R2,R2 CLEAR R2 FOR IC 00388000 IC R2,REXOUT GET LENGTH OF MSG 00389000 SH R2,=H'8' ADJUST FOR LOCID @VA03279 00389100 DIAG R1,R2,X'5C' EDIT THE MSG ACCORDING TO EMSG 00390000 LTR R2,R2 ANYTHING TO WRITE? 00391000 BZ REXOUTRY NO..TRY ANOTHER 00392000 SPACE 00393000 CLI REXCONSL+DEVCODE-IOTABLE,TYP3210 CONNECTED? 00394000 BE REXCONON YEP - USE IT 00395000 CLI DMTREXID,C' ' ANY MSG ID? 00396000 BE REXCYCLE NOPE - THROW MSG AWAY 00397000 BCTR R2,0 DECREMENT COUNT ONE 00398000 EX R2,REXLJUST LEFT JUSTIFY MSG TEXT 00399000 LA R2,L'REXMSG+1(R2) TOTAL VM/370 CMD LENGTH 00400000 LA R1,REXMSG START ADDR OF VM/370 CMD 00401000 BAL R14,DMTREXHC GIVE IT TO VM/370 00402000 * 00403000 * IGNORE REJECTS FOR NOW 00404000 * 00405000 B REXCYCLE LOOK FOR MORE TO DO 00406000 SPACE 00407000 REXCONON EQU * 00408000 NI REXLOCKS+8,X'FF'-X'40' RESET CONSOLE RUNNING 00409000 STH R2,REXWRITE+6 STORE COUNT IN CCW 00410000 STCM R1,B'0111',REXWRITE+1 AND THE ADDR 00411000 LA R0,REXWRITE R0=ADDR OF REPLY OUT CHAN PROG 00412000 LA R1,REXCONSL R1 = ADDRESS OF CONSOLE I/O TABLE 00413000 ST R0,PROGADDR SET REPLY PROG ADDR IN CON I/O TABLE 00414000 XC IOSYNCH(4),IOSYNCH CLEAR SYNCH LOCK FOR REPLY I/O 00415000 L R15,IOREQ R15 = ENTRY FOR I/O SERVICE 00416000 BALR R14,R15 DO THE CONSOLE OUTPUT 00417000 B REXCYCLE GO TRY SOMETHING ELSE 00418000 SPACE 00419000 REXLJUST MVC REXOUT(0),0(1) EXECUTED TO LEFT JUSTIFY 00420000 SPACE 3 00421000 REXACCPT EQU * 00422000 LR R0,R15 ERROR RET CODE --> POST CODE 00423000 LA R1,REXTAKE R1 = TAKE TABLE ADDRESS 00424000 L R15,TAKEREQ R15 = ENTRY FOR REQUEST TAKE SERVICE 00425000 BALR R14,R15 RESP TO LAST REQ, TAKE ANOTHER 00426000 SRA R15,3 CHECK RETURN CODE FOR A NEW REQUEST 00427000 BNZ REXCYCLE NO REQ LEFT-GO LOOK AT THE CONSOLE 00428000 BAL R14,REQXEQ GO DIRECTLY TO EXECUTE THE TAKEN REQ 00429000 B REXACCPT RESPOND AND TRY TO TAKE ANOTHER 00430000 EJECT 00431000 * 00432000 * ASYNCHRONOUS CONSOLE INTERRUPT ROUTINE 00433000 * 00434000 REXASYN EQU * 00435000 TM CSW+4,X'80' IS ATTENTION STATUS SET? 00436000 BCR 14,R14 (BNO) FAST RETURN TO DISPATCH IF NOT 00437000 L R12,TASKSAVE-TASKE(R13) RESET REX BASE REGISTER 00438000 SPACE 00439000 CLI REXCONSL+DEVCODE-IOTABLE,TYP3210 DISCONNECTED? 00440000 BNE REXASYHI YEP - RECONNECT TIME 00441000 REXASYNA SR R0,R0 CLEAR CODE REGISTER FOR POST @VA04494 00442100 LA R1,ATTNLOCK R1=ADDR OF CONSOLE ATTN SYN LOCK 00443000 L R15,POSTREQ R15 = ENTRY ADDRESS FOR POST ROUTINE 00444000 BR R15 POST THE ATTN SYN LOCK AND RET 00445000 SPACE 00446000 REXASYHI EQU * 00447000 MVI REXCONSL+DEVCODE-IOTABLE,TYP3210 RECONNECT 00448000 B REXASYNA OK TO READ NOW @VA04494 00449100 EJECT 00450000 *. 00451000 * 00452000 * ENTRY NAME - 00453000 * 00454000 * REXPCHEK 00455000 * 00456000 * FUNCTION - 00457000 * 00458000 * PROGRAM CHECK HANDLER 00459000 * 00460000 * CALLS TO OTHER ROUTINES - 00461000 * 00462000 * DMTDSP - EXIT TO DISPATCHER 00463000 * DMTPST - TO POST THE PROGRAM CHECK SYNCH LOCK 00464000 * 00465000 * OPERATION - 00466000 * 00467000 * 1. SCAN FOR PGAM CHECK FLAG IN EACH LINK TABLE 00468000 * ENTRY. 00469000 * 00470000 * 2. IF FOUND, DUMP MAIN STORAGE. 00471000 * 00472000 * 3. AND DEACTIVATE THE LINK 00473000 * 00474000 * RESPONSES - 00475000 * 00476000 * NONE 00477000 * 00478000 * ERROR MESSAGES - 00479000 * 00480000 * NONE 00481000 * 00482000 *. 00483000 SPACE 00484000 REXPCHEK EQU * 00485000 XC PROGLOCK(4),PROGLOCK CLEAR THE PROG CHEK SYN LOCK 00486000 L R2,TLINKS SET UP FOR LINK SCAN 00487000 L R3,0(R2) TOTAL LINK COUNT 00488000 BCTR R3,0 SKIP LOCAL ENTRY 00489000 LTR R3,R3 ANY MORE DEFINED? 00490000 BNP REXCYCLE NOPE - WHA...? 00491000 LA R2,8(R2) SET START AT FIRST NON-LOCAL 00492000 REXPLTAB EQU * 00493000 LA R2,LINKLEN(R2) BUMP TO NEXT LINK TABL 00494000 TM LFLAG,LACTIVE+LHALT FORCE THIS ONE? 00495000 BO REXPFORC YEP - GO TO IT 00496000 REXPNEXT EQU * 00497000 BCT R3,REXPLTAB DO ANOTHER 00498000 B REXCYCLE AND QUIT WHEN AT END 00499000 EJECT 00500000 REXPFORC EQU * 00501000 NI LFLAG,X'FF'-LHALT RESET FORCE FLAG 00502000 SPACE 00503000 USING TASKE,R4 TASK ELEMENT ADDRESSABILITY 00504000 SPACE 00505000 LA R4,TASKQ INITIALIZE FOR TASK SCAN 00506000 REXPTEL EQU * 00507000 ICM R4,B'1111',TASKNEXT GO TO NEXT TASK ELM 00508000 BZ REXPTMIS DIDN'T FIND IT 00509000 CLC TASKNAME(4),LACTTNME IS THIS IT? 00510000 BNE REXPTEL NOPE - TRY NEXT 00511000 SPACE 00512000 * 00513000 * TASK ELEMENT TO BE FORCED ADDRESSED BY REG.4 00514000 * 00515000 STM R2,R3,REXCSAVE SAVE LINK TABLE SCAN 00516000 SPACE 00517000 SPACE 00521000 MVI REXREQ+1,X'F3' PROG CHECK TERMINATE REQ CODE 00522000 L R2,REXCSAVE RESTORE LINK TABLE POINTER 00523000 MVC REXTAKE(4),LACTTNME SET TASK NAME FOR TERM 00524000 BAL R14,REQXEQ DO THE TERMINATE 00525000 SPACE 00526000 LM R2,R3,REXCSAVE RESTORE LINK TABLE SCAN 00527000 B REXPNEXT AND BACK FOR MORE 00528000 SPACE 00529000 REXPTMIS EQU * 00530000 BAL R14,DEACT NO MATCHING TASK ...? 00531000 B REXPNEXT TRY ANOTHER 00532000 EJECT 00533000 * 00534000 * PROGRAM CHECK ASYNCHRONOUS EXIT ROUTINE 00535000 * 00536000 SPACE 00537000 REXOUCH EQU * 00538000 STM R12,R13,SSAVE TEMP SAVE 00539000 L R12,NEWPROG+4 A(REXOUCH) 00540000 LA R13,REXOUCH-DMTREX REXOUCH DISPLACEMENT 00541000 SLR R12,R13 RESTORE REX BASE REG 00542000 SPACE 00543000 MVC NEWPROG(8),REXBOMBR TURN OFF PROG CHECKS 00544000 SPACE 00545000 STM R0,R15,REXEPTAF SAVE PROGRAM CHECK REGS @VM01109 00545300 MVC REXEPTAF+4*R12(2*4),SSAVE CORRECT R12 & R13 @VM01109 00545500 LA R1,REXDUMPR GET START OF DUMP MSG @VA04352 00545510 LA R2,L'REXDUMPR AND THE LENGTH @VA04352 00545520 BAL R14,DMTREXHC AND WRITE TO CP @VA04352 00545530 LA R1,REXDUMPC GET DUMP CLOSE REQ @VA08751 00545540 LA R2,L'REXDUMPC GET LENGTH OF REQ @VA08751 00545550 BAL R14,DMTREXHC ISSUE DIAGNOSE FOR CP CL@VA08751 00545560 SPACE 1 @VM01109 00545700 CLI ACTIVE,X'00' RUNNING DISPATCHED? 00546000 BE REXDIE NOPE - FORGET IT 00547000 L R13,ACTIVE EXECUTING TASK ELEMENT 00548000 L R13,TASKSAVE-TASKE(R13) EXECUTING TASK SAVE AREA 00549000 SPACE 00550000 USING TAREA,R13 TEMP ADDRESSABILITY 00551000 SPACE 00552000 MVC TPSW(8),OLDPROG SAVE HIS INTERRUPTED PSW 00553000 MVC TGREG0(4*16),REXEPTAF AND REGISTER CONTENTS @VM01109 00554500 MVI ACTIVE,X'00' AND MARK US UNDISPATCHED 00556000 DROP R13 00557000 SPACE 00558000 L R4,ACTIVE SET TASK ELEMENT REG 00559000 L R2,TLINKS INITIALIZE FOR LINK TABL SCAN 00560000 L R3,0(R2) COUNT OF LINK TABLES 00561000 LA R2,8(R2) START OF LINK TABLES 00562000 BCTR R3,0 SKIP LOCAL LINK TABLE 00563000 LTR R3,R3 ANY LEFT? 00564000 BZ REXDIE NOPE - PROG CHECK IN SUP 00565000 REXONEXT EQU * 00566000 LA R2,LINKLEN(R2) TO NEXT TABLE ENTRY 00567000 CLC LACTTNME(4),TASKNAME IS THIS THE LINK? 00568000 BE REXHALT YEP - DEACTIVATE HIM 00569000 BCT R3,REXONEXT KEEP LOOKING 00570000 SPACE 00571000 * 00572000 * NO MATCH FOUND - MUST BE PROG CHECK IN REX, AXS, OR LAX 00573000 * 00574000 REXDIE EQU * 00575000 LA R4,TASKQ INITIALIZE FOR FINAL TASK SCAN 00576000 REXDTEL EQU * 00577000 ICM R4,B'1111',TASKNEXT TO NEXT TASK ELEMENT 00578000 BZ REXDQUIT READY FOR FINAL DISPATCH 00579000 OI TASKSTAT,LIMBO STOP DISPATCHING 00580000 CLC TASKNAME(4),REXREX IS THIS REX? 00581000 BNE REXDTEL NOPE - DO NEXT 00582000 TM TASKSTAT,WAITING+LOCKLIST WAITING ON SINGLE? 00583000 BNM REXDRSET NOPE - NO NEED TO CLEAR 00584000 L R1,REXREG1 ADDR OF SOLE SYNCH LOCK 00585000 XC 1(3,R1),1(R1) CLEAR LINK TABLE ADDR 00586000 EJECT 00587000 REXDRSET EQU * 00588000 NI TASKSTAT,X'FF'-WAITING-LIMBO SET FOR DISPCH 00589000 B REXDTEL AND SCAN ANOTHER TASK 00590000 SPACE 00591000 REXDQUIT EQU * 00592000 MVC REXSTOPD(8+16*4),DMTREX SAVE REX IRRPTED STAT @VM01109 00593010 ST R12,REXREG12 SET BASE REG 00594000 LA R1,REXPTERM TERMINATE ROUTINE ENTRY 00595000 ST R1,REXPSW+4 SET MYSTERIOUS BRANCH 00596000 L R15,DISPATCH DISPATCHER ENTRY 00597000 BALR R14,R15 DISPATCH REX 00598000 SPACE 00599000 REXHALT EQU * 00600000 OI TASKSTAT,LIMBO SET TASK UNDISPATCHABLE 00601000 OI LFLAG,LHALT AND LINK TO BE FORCED 00602000 CLI PROGLOCK,X'00' PROGCHEK SYNLOCK POSTED? 00603000 BNE REXHEXIT YEP - NO NEED TO POST AGAIN 00604000 SR R0,R0 SET POST CODE TO 0 00605000 LA R1,PROGLOCK ADDR OF PROGCHEK SYNLOCK 00606000 L R15,POSTREQ ENTRY FOR POST SERVICE 00607000 BALR R14,R15 TELL REX ABOUT PROG CHECK 00608000 REXHEXIT EQU * 00609000 MVC NEWPROG(8),REXPROG ALLOW MORE PROGRAM CHECKS 00610000 L R15,DISPATCH DISPATCHER ENTRY POINT 00611000 BALR R14,R15 RESTART NORMAL OPERATION 00612000 SPACE 00613000 DROP R4 00614000 EJECT 00615000 *. 00616000 * 00617000 * ENTRY NAME - 00618000 * 00619000 * REXITERM 00620000 * 00621000 * FUNCTION - 00622000 * 00623000 * THIS ROUTINE IS ENTERED WHEN THE INITIALIZATION OF RSCS 00624000 * FAILS 00625000 * 00626000 * CALLS TO OTHER ROUTINES - 00627000 * 00628000 * GMSGREQ - TO UNSTACK A MESSAGE BUFFER 00629000 * DMTWAT - TO WAIT FOR COMPLETION OF A MSG WRITE 00630000 * 00631000 * OPERATION - 00632000 * 00633000 * 1. ISSUE INITIALIZATION FAILURE MSG 00634000 * 00635000 * 2. DUMP CONTENTS OF MAIN STORAGE 00636000 * 00637000 * 3. TYPE ANY REMAINING MESSAGES 00638000 * 00639000 * 4. LOAD DIABLED WAIT PSW 00640000 * 00641000 * RESPONSES - 00642000 * 00643000 * NONE 00644000 * 00645000 * ERROR MESSAGES - 00646000 * 00647000 * DMTREX090T PROGRAM CHECK IN SUPERVISOR -- RSS SHUTDOWN 00648000 * DMTREX091T INITIALIZATION FIALURE -- RSS SHUTDOWN 00649000 * 00650000 *. 00651000 SPACE 2 00652000 REXITERM DC 0H'0' 00653000 MVC LACTTNME(4),REXREX MOVE IN TASKNAME 00654000 STM R0,R15,REXEPTAF SAVE REGISTERS @VM01109 00655010 MSG 091 TELL OF DISTRESS 00656000 B REXSHUT TERMINATE RSCS PROCESSING 00657000 EJECT 00658000 REXPTERM EQU * 00659000 MSG 090 FATAL PROGRAM CHECK MSG 00660000 SPACE 00661000 REXSHUT EQU * 00662000 EJECT 00666000 * 00667000 * TYPE THE REMAINING MESSAGES 00668000 * 00669000 TM REXLOCKS+8,X'40' CONSOLE RUNNING? 00670000 LA R1,REXCONSL GET THE CONSOLE 00671000 BNO REXSWAIT YEP - WAIT 00672000 REXFLUSH EQU * 00673000 LA R1,REXOUT ADDR OF MSG LINE BUFFER 00674000 L R2,TLINKS GET MY LINK TABLE ENTRY 00675000 LA R2,8(R2) REALLY START HERE 00676000 L R15,TCOM GET COMMON ENTRY VECTOR 00677000 L R15,GMSGREQ AND THE MSG DECHAIN ROUTINE ADDR 00678000 BALR R14,R15 AND TRY TO GET A MESSAGE 00679000 LTR R15,R15 GET ANY? 00680000 BNZ REXHANG NO 00681000 SPACE 00682000 LA R1,REXOUT+2 ADDR OF START OF MSG 00683000 SR R2,R2 CLEAR FOR IC 00684000 IC R2,REXOUT MSG CHAR COUNT 00685000 DIAG R1,R2,X'5C' EDIT MSG A LA EMSG 00686000 LTR R2,R2 ANY COUNT LEFT? 00687000 BZ REXFLUSH NOPE - TRY ANOTHER 00688000 SPACE 00689000 CLI REXCONSL+DEVCODE-IOTABLE,TYP3210 CONNECTED? 00690000 BE REXFCONF YES - WRITE IT 00691000 CLI DMTREXID,C' ' ANY ID FOR MSG? 00692000 BE REXHANG NOPE - QUIT NOW 00693000 BCTR R2,0 DECREMENT COUNT 00694000 EX R2,REXLJUST LEFT JUSTIFY MSG TEXT 00695000 LA R2,L'REXMSG+1(R2) TOTAL VM/370 CMD LEN 00696000 LA R1,REXMSG START ADDR OF VM/370 CMD 00697000 BAL R14,DMTREXHC GIVE IT TO VM/370 00698000 B REXFLUSH AND FLUSH SOME MORE 00699000 SPACE 00700000 REXFCONF EQU * 00701000 SH R2,=H'8' UPDATE COUNT FOR LOCID @VA03279 00701100 LA R1,8(R1) AND THE START OF MSG FOR LOC @VA03279 00701200 STH R2,REXWRITE+6 SET THE COUNT 00702000 STCM R1,B'0111',REXWRITE+1 AND THE ADDR 00703000 LA R1,REXCONSL GET THE CONSOLE IOTABLE 00704000 USING IOTABLE,R1 GET IOTABLE ADDRESSABILITY 00705000 LA R0,REXWRITE CONSOLE WRITE CCW ADDR 00706000 ST R0,PROGADDR STORE IN THE IOTABLE CAW 00707000 XC IOSYNCH(4),IOSYNCH CLEAR THE SYNCH LOCK 00708000 L R15,IOREQ GET THE SYSTEM I/O EXECUTATOR 00709000 BALR R14,R15 AND ISSUE THE I/O 00710000 REXSWAIT EQU * 00711000 L R15,WAITREQ SYSTEM WAIT ROUTINE 00712000 BALR R14,R15 GO WAIT 00713000 B REXFLUSH AND CONTINUE 00714000 SPACE 00715000 REXHANG EQU * 00716000 LPSW REXBOMBR ALL OVER WITH 00717000 EJECT 00718000 *---------------------------------------------------------------------* 00719000 * * 00720000 * REX MONITOR CONTROL AREA * 00721000 * * 00722000 *---------------------------------------------------------------------* 00723000 SPACE 2 00724000 REXREX DC 0F'0',CL4'REX ' TASK NAME 00725000 REXAXS DC 0F'0',CL8'DMTAXS' AXSNAME 00726000 REXLAX DC 0F'0',CL8'DMTLAX' LAXNAME 00727000 SPACE 00728000 REXTVECT DC 0F'0' 00729000 DC V(DMTSYSLK) LINK TABLE CHAIN 00730000 DC V(DMTSYSRT) ROUTE TABLE CHAIN 00731000 DC V(DMTSYSPT) SWITCHABLE PORT CHAIN 00732000 DC V(DMTSYSTQ) TAG SLOT QUEUE 00733000 DC V(DMTCOMVC) COMMON ROUTINE VECTOR 00734000 SPACE 00735000 REXEND DC V(DMTSYSND) END OF REX INITIAL LOAD 00736000 SPACE 3 00737000 REXLOCKS DC 0F'0' MAIN REX WAIT LIST 00738000 DC X'00',AL3(REQLOCK) REQ ARRVL SYN LOCK ADDR 00739000 DC X'00',AL3(ATTNLOCK) CONS ATTN SYN LOCK ADDR 00740000 DC X'40',AL3(REXCONSL) CONS I/O SYN LOCK ADDR 00741000 DC X'80',AL3(PROGLOCK) PROG CHEK SYN LOCK ADDR 00742000 EJECT 00743000 ATTNLOCK DC 0F'0',X'00',AL3(0) CONS ATTNLOCK LOCK 00744000 SPACE 00745000 REXCONSL DC F'0' SYNCHRONIZATION LOCK FOR I/O OPERATION 00746000 DC AL2(CONSADDR) CUU CONSOLE DEVICE ADDRESS 00747000 DC AL1(1) ONE BYTE REQUESTED ON UNIT CHECK 00748000 DC AL1(TYP3210) CONSOLE DEVICE TYPE CODE 00749000 DC A(0) CHANNEL PROGRAM ADDRESS TO BE FILLED IN 00750000 DC 2F'0' SIO COND CODE AND ENDING CSW RETURN INFORMATION 00751000 DC X'00' SENSE RETURN INFORMATION ON UNIT CHECK 00752000 DC 3X'00' UNUSED 00753000 DMTREXCN EQU REXCONSL EXTERNAL NAME 00754000 SPACE 00755000 CONSADDR EQU X'009' DEFAULT CONSOLE CUU 00756000 SPACE 2 00757000 REXREAD CCW X'0A',REXIN,SILI,L'REXIN READ OPERATOR RESPONSE 00758000 REXWRITE CCW X'09',REXOUT+2,SILI,0 TYPE A CONS MSG 00759000 SPACE 2 00760000 REXIN DC CL130' ' CONS INPUT BUFFER 00761000 SPACE 00762000 REXMSG DC CL11'M OP' MSG COMMAND START 00763000 DMTREXID EQU REXMSG+2 XFER USER ID 00764000 REXOUT DC CL130' ' OUTPUT BUFFER 00765000 EJECT 00766000 REXTAKE DC 0F'0' REQUEST TAKE TABLE 00767000 DC CL4' ' SENDING TASK NAME FILLED IN BY TAKE MANAGER 00768000 DC AL1(L'REXREQ),AL3(REXREQ) ADDR AND LENGTH OF REQ BUFFER 00769000 DC A(REXRESP) ADDRESS OF RESPONSE BUFFER 00770000 SPACE 2 00771000 REXREQ DC XL140'00' TAKE REQUEST BUFFER 00772000 SPACE 00773000 REXRESP DC AL1(0) NEVER ANY RESPONSE MESSAGES 00774000 SPACE 3 00775000 REXCSAVE DC 18F'0' COMMON SAVE AREA ADDR 00776000 SPACE 3 00777000 PROGLOCK DC 0F'0',X'00',AL3(0) PROGRAM CHECK SYNCH LOCK 00778000 SPACE 2 00779000 REXPROG DC 0D'0',X'00040000',A(REXOUCH) NORMAL PROG NEW 00780000 REXBOMBR DC 0D'0',X'00020000',A(X'001') HANG UP PSW @VM01136 00781010 SPACE 2 00782000 REXTOEBC DC C'0123456789ABCDEF' TRANS HEX TO EBCDIC 00783000 SPACE 00784000 REXDUMPR DC C'DU 000000-000FFF' VM/370 DUMP COMMAND 00785000 REXDUMPC DC C'CL PRINTER' VM/370 CL PRT REQUEST @VA08751 00785100 SPACE 2 00786000 REXWORK DC 2F'0' FOR NUMBER CONVERSION 00787000 EJECT 00790000 *. 00791000 * 00792000 * ENTRY NAME - 00793000 * 00794000 * REQXEQ 00795000 * 00796000 * FUNCTION - 00797000 * 00798000 * 00799000 * THIS ROUTINE SCANS THE FUNCTION TABLE AND CALLS THE 00800000 * APPROPRIATE ROUTINE BASED ON THAT CODE. 00801000 * 00802000 * CALLS TO OTHER ROUTINES - 00803000 * 00804000 * DMTCMX - FOR CODE X'00' - COMMAND 00805000 * DMTMGX - FOR CODE X'02' - MESSAGE 00806000 * 00807000 * OPERATION - 00808000 * 00809000 * 1. SCAN THE REQUEST TABLE FOR A MATCH 00810000 * 00811000 * 2. CALL THE ROUTINE SPECIFIED WHEN A MATCH IS FOUND 00812000 * 00813000 * RESPONSES - 00814000 * 00815000 * NONE 00816000 * 00817000 * ERROR MESSAGES - 00818000 * 00819000 * NONE 00820000 * 00821000 *. 00822000 SPACE 00823000 REQXEQ DC 0H'0' 00824000 LM R3,R5,REQSETUP SET REGS FOR REQUEST TABLE SCAN 00825000 REQSCAN EQU * 00826000 CLC 0(1,R3),REXREQ+1 DOES THE TABLE ENTRY MATCH THE REQ CODE 00827000 BE REQCALL YEP - GO EXIT TO THE INDICATED EXECUTOR ROUTINE 00828000 BXLE R3,R4,REQSCAN OTHERWISE SCAN TO THE END OF THE TABLE 00829000 SPACE 00830000 LA R15,REQNOHIT R15 = ERROR CODE FOR NO CODE MATCH 00831000 BR R14 RETURN TO CALLER 00832000 SPACE 00833000 REQCALL EQU * 00834000 MVI REXRESP,X'00' INITIALIZE THE RESPONSE COUNT TO ZERO 00835000 LM R0,R1,REXTAKE PASS SENDING TASK NAME AND REQ BUFF ADDR 00836000 L R15,0(R3) R15 = ENTRY ADDRESS FOR INDICATED EXECUTOR 00837000 BR R15 GO TO EXECUTOR WITH R14 AS SET BY CALLER 00838000 EJECT 00839000 *---------------------------------------------------------------------* 00840000 * * 00841000 * REQUEST EXECUTION CONTROL AREA * 00842000 * * 00843000 *---------------------------------------------------------------------* 00844000 SPACE 00845000 REQSETUP DC A(REQTABLE) 00846000 DC A(REQINC) 00847000 DC A(REQEND-REQINC) 00848000 SPACE 00849000 REQINC EQU 4 LENGTH OF A TABLE ENTRY 00850000 SPACE 00851000 REQTABLE DC 0F'0' 00852000 DC X'00',VL3(DMTCMX) CODE X'00' => CONSOLE FUNCTION 00853000 DC X'02',VL3(DMTMGX) CODE X'02' => MESSAGE REQUEST 00854000 DC X'03',AL3(TERMINAT) CODE X'03' => TERMINATE REQUEST 00855000 DC X'F3',AL3(TERMINAT) CODE X'F3' => PROG CHECK TERMINATE 00856000 REQEND EQU * 00857000 SPACE 00858000 REQNOHIT EQU X'FF' ERROR (POST) CODE FOR CODE NOT FOUND 00859000 EJECT 00860000 *. 00861000 * 00862000 * ENTRY NAME - 00863000 * 00864000 * DEACT 00865000 * 00866000 * FUNCTION - 00867000 * 00868000 * DEACTIVATE LINK TABLE ENTRY 00869000 * 00870000 * CALLS TO OTHER ROUTINES - 00871000 * 00872000 * NONE 00873000 * 00874000 * ENTRY: 00875000 * 00876000 * R2 = ADDR OF LINK TABLE TO BE DEACTIVATED 00877000 * R14 = RETURN ADDRESS 00878000 * 00879000 * OPERATION - 00880000 * 00881000 * 1. FREE ASSOCIATED PORT FOR THIS LINKID 00882000 * 00883000 * 2. MARK LINK NOT ACTIVE AND CLEAR ACTIVE TASK NAME 00884000 * 00885000 * 00886000 * RESPONSES - 00887000 * 00888000 * NONE 00889000 * 00890000 * ERROR MESSAGES - 00891000 * 00892000 * NONE 00893000 * 00894000 *. 00895000 SPACE 00896000 DEACT DC 0H'0' 00897000 STM R14,R15,REXWORK SAVE REGS TO BE USED 00898000 L R14,TPORTS START OF PORT TABLE 00899000 ICM R15,B'1111',0(R14) COUNT OF ENTRIES 00900000 BZ DEALFREE NO ENTRIES - NO WORK 00901000 LA R14,8(R14) FIRST ENTRY 00902000 OI LACTLINE,X'F0' MARK AS IF ACTIVE ENTRY 00903000 DEAFRENX EQU * 00904000 CLC LACTLINE(2),0(R14) IS THIS THE ONE? 00905000 BE DEAFREGT FOUND IT 00906000 LA R14,2(R14) NEXT ENTRY 00907000 BCT R15,DEAFRENX TRY IT 00908000 EJECT 00909000 * 00910000 * ENTRY NOT FOUND 00911000 * 00912000 SPACE 00913000 DEALFREE EQU * 00914000 L R14,TLINKS ADDR OF START OF LINK TABLES 00915000 LH R15,6(R14) COUNT OF CURRENT ACTIVE LINKS 00916000 BCTR R15,0 ONE LESS THAN BEFORE 00917000 LTR R15,R15 IS NUMBER NOW NEGATIVE 00918000 BNM DEASTOW NO - USE IT AS IS 00919000 SLR R15,R15 MINIMUM ACTIVE LINKS IS ZERO 00920000 DEASTOW EQU * 00921000 STH R15,6(R14) SET NEW ACTIVE COUNT 00922000 SPACE 00923000 NI LFLAG,X'FF'-LACTIVE MARK LINK TABLE ENTRY INACTIVE 00924000 XC LMSGQ(4),LMSGQ CLEAR ANY PENDING MESSAGES @VA03645 00924100 XC LACTTNME(4),LACTTNME ALSO CLEAR ACTIVE TASK NAME 00925000 SPACE 00926000 LM R14,R15,REXWORK RESTORE CALLER'S REGS 00927000 BR R14 AND RETURN TO HIM 00928000 SPACE 2 00929000 DEAFREGT EQU * 00930000 NI 0(R14),X'0F' SET ENTRY FREE 00931000 B DEALFREE AND DECREMENT ACTIVE 00932000 EJECT 00933000 *. 00934000 * 00935000 * ENTRY NAME - 00936000 * 00937000 * MSG 00938000 * 00939000 * FUNCTION - 00940000 * 00941000 * MESSAGE WRITE SUBROUTINE 00942000 * 00943000 * CALLS TO OTHER ROUTINES - 00944000 * 00945000 * DMTMGX - TO WRITE MESSAGE 00946000 * 00947000 * OPERATION - 00948000 * 00949000 * 1. CONTRUCT PARAMETER LIST 00950000 * 00951000 * 2. ISSUE CALL TO DMTMGX TO WRITE MESSAGE 00952000 * 00953000 * RESPONSES - 00954000 * 00955000 * NONE 00956000 * 00957000 * ERROR MESSAGES - 00958000 * 00959000 * NONE 00960000 * 00961000 *. 00962000 SPACE 1 00963000 MSG EQU * 00964000 STM R14,R2,MSGSAVE SAVE REGISTERS 00965000 LTR R2,R0 ANYTHING SPECIFIED? 00966000 BNP MSGEXIT NO 00967000 BCTR R2,0 REDUCE COUNT BY ONE 00968000 EX R2,MSGRFILL MOVE VARIABLE FIELD TO MSG REQ 00969000 LA R2,MSGRHLEN(R2) GET MSG LENGTH 00970000 STC R2,MSGREQ AND STORE IN REQ 00971000 LA R1,MSGREQ GET THE MSG REQ ADDR 00972000 L R15,=V(DMTMGX) MSG MANAGER ADDR 00973000 BALR R14,R15 AND WRITE THE MSG 00974000 L R14,MSGSAVE RESTORE RETURN REGISTER 00975000 MSGEXIT EQU * 00976000 LM R0,R2,MSGSAVE+8 RESTORE OTHER REGISTERS 00977000 BR R14 AND RETURN 00978000 SPACE 00979000 MSGRFILL MVC MSGRINFO(0),0(R1) TO BE EXECUTED FROM ABOVE 00980000 SPACE 2 00981000 MSGREQ DC 0F'0',AL1(0),X'02',AL1(0,0) CNT, CODE 00982000 MSGRLINK DC CL8' ' LINKID 00983000 MSGRVM DC CL8' ' RESPONSE VM 00984000 MSGRMOD DC C'REX' MODULE NAME 00985000 DC C' ' ACTION CODE 00986000 MSGRINFO DC H'0',AL2(0) MSG NUMBER 00987000 DC 7CL8' ' MAX NUMBER OF VARIABLE FIELDS 00988000 MSGRHLEN EQU MSGRINFO-MSGREQ HEADER LENGTH 00989000 SPACE 00990000 MSGSAVE DC 6F'0' SAVE AREA 00991000 EJECT 00992000 *---------------------------------------------------------------------* 00993000 * * 00994000 * HVC -- HYPERVISOR CALL SUBROUTINE * 00995000 * * 00996000 *---------------------------------------------------------------------* 00997000 SPACE 00998000 * ON ENTRY: R1 = ADDR OF CP CONSOLE COMMAND LINE 00999000 * R2 = TOTAL CHARACTER COUNT FOR THE COMMAND 01000000 * 01001000 * ON EXIT: R1 = UNMODIFIED 01002000 * R2 = RETURN CODE FROM CP 01003000 * R15 = NUMBER OF INVALID PARAMETER 01004000 * (SET ONLY WHEN INVALID PARAMETER SPECIFIED) 01005000 SPACE 01006000 DMTREXHC DC 0H'0' 01007000 DC X'83120008' DIAGNOSE INSTRUCTION ENTRY TO CP CONS FUNCT 01008000 BR R14 VERY SHORT ROUTINE 01009000 EJECT 01010000 *---------------------------------------------------------------------* 01011000 * * 01012000 * PARMGET -- LINE SCANNING SUBROUTINE * 01013000 * * 01014000 *---------------------------------------------------------------------* 01015000 SPACE 01016000 * ON ENTRY: R3 = ADDRESS OF START OF STRING 01017000 * R5 = ADDRESS OF END OF STRING 01018000 * 01019000 * ON EXIT: R3 = FIRST NONDELIMETER CHARACTER SCANNED; 01020000 * IF NONE FOUND, END OF STRING 01021000 * R4 = UNMODIFIED IF NO NONDELIMETER CHAR SCANNED; 01022000 * OTHERWISE, ADDRESS OF FIRST DELIMETER CHAR 01023000 * IF NONE, END OF STRING. 01024000 * R5 = UNMODIFIED 01025000 * 01026000 * A DELIMETER CHAR IS ANY CHARACTER OF THE FORM B'XX000000' 01027000 SPACE 01028000 PARMGET DC 0H'0' 01029000 LA R5,0(R5) CLEAR HIGH ORDER BYTE JUST IN CASE 01030000 BCTR R3,0 BUMP START OF STRING POINTER BACK FOR CONVENIENCE 01031000 PARMFIND EQU * 01032000 LA R3,1(R3) LOOK AT THE NEXT CHARACTER 01033000 CLR R3,R5 HAVE WE HIT THE END OF THE STRING? 01034000 BCR 11,R14 (BNL) YEP - LOOK NO MORE 01035000 TM 0(R3),X'3F' IS THIS CHARACTER A DELIMETER? 01036000 BZ PARMFIND YEP - KEEP LOOKING FOR A NONDELIMETER 01037000 LR R4,R3 OTHERWISE SET UP FOR NEXT PHASE OF SCAN 01038000 PARMSCAN EQU * 01039000 LA R4,1(R4) LOOK AT THE NEXT CHARACTER 01040000 CLR R4,R5 ARE WE AT THE END OF THE STRING YET? 01041000 BCR 11,R14 (BNL) RETURN IMMEDIATELY IF SO 01042000 TM 0(R4),X'3F' IS THIS CHARACTER A DELIMETER? 01043000 BNZ PARMSCAN KEEP SCANNING FOR A DELIMETER IF NOT 01044000 BR R14 OTHERWISE ALL DONE - RETURN 01045000 EJECT 01046000 *. 01047000 * 01048000 * ENTRY NAME - 01049000 * 01050000 * TERMINAT 01051000 * 01052000 * FUNCTION - 01053000 * 01054000 * TO TERMINATE A SPECIFIED TASK 01055000 * 01056000 * CALLS TO OTHER ROUTINES - 01057000 * 01058000 * DMTASK - TO TERMINATE THE SPECIFIED TASK 01059000 * DMTMGX - TO WRITE THE TERMINATION MSG 01060000 * 01061000 * OPERATION - 01062000 * 01063000 * 1. FIND THE LINK TABLE ENTRY FOR THE SPECIFIED 01064000 * TASK 01065000 * 01066000 * 2. REQUEST TASK TERMINATION, IF SUCCESSFUL RETURN 01067000 * 01068000 * 3. IF NOT SUCCESSFUL, MODIFY THE TASK TO POINT 01069000 * TO QUIESCE, TO ALLOW FOR I/O COMPLETION 01070000 * 01071000 * 4. DEACTIVATE THE LINK ENTRY 01072000 * 01073000 * 5. WRITE TERMINATION MSG 01074000 * 01075000 * RESPONSES - 01076000 * 01077000 * DMTREX002I LINK 'LINKID' DEACTIVATED 01078000 * 01079000 * ERROR MESSAGES - 01080000 * 01081000 * DMTREX080E PROGRAM CHECK -- LINK 'LINKID' DEACTIVATED 01082000 * 01083000 *. 01084000 SPACE 2 01085000 TERMINAT DC 0H'0' 01086000 STM R14,R3,TERSAVE SAVE REGISTERS 01087000 L R3,TLINKS START OF LINK TABLE CHAIN 01088000 LA R2,8(R3) FIRST LINK TABLE ENTRY 01089000 L R3,0(R3) NUMBER OF LINK TABLE ENTRIES 01090000 SPACE 01091000 TERLSCAN EQU * 01092000 TM LFLAG,LACTIVE IS THE LINK ACTIVE? 01093000 BNO TERSKIP NO - SKIP IT 01094000 CL R0,LACTTNME IS THIS THE ONE WE SEEK? 01095000 BE TERLHIT YES - DEACTIVATE IT 01096000 EJECT 01097000 TERSKIP EQU * 01098000 LA R2,LINKLEN(R2) BUMP TO NEXT LINK 01099000 BCT R3,TERLSCAN KEEP LOOKING FOR THE LINK 01100000 SPACE 01101000 * 01102000 * NONE FOUND - JUST TERMINATE THE TASK 01103000 * 01104000 EJECT 01105000 TERTKILL EQU * 01106000 * 01107000 * R0 CONTAINS NAME OF TASK TO BE TERMINATED 01108000 * 01109000 SR R1,R1 ZERO 01110000 BCTR R1,0 -1 TO SIGNAL TERMINATE REQ 01111000 L R15,TASKREQ GET SYSTEM TASK ROUTINE 01112000 BALR R14,R15 GO TERMINATE THE TASK 01113000 LTR R15,R15 DID IT WORK? 01114000 BZ TEREXIT YES - DONE 01115000 SRA R15,3 /8 AND TEST (RETURN CODE) 01116000 BNZ TEREXIT NO SUCH TASK FOUND 01117000 * 01118000 * TASK STILL HAS ACTIVE I/O - EXECUTION SUSPENDED 01119000 * 01120000 LA R3,TASKQ INITIALIZE TASK QUEUE ELEMENT POINTE 01121000 SPACE 01122000 USING TASKE,R3 GET TASK ELEMENT ADDRESSABILITY 01123000 SPACE 01124000 TERTSCAN EQU * 01125000 ICM R3,B'1111',TASKNEXT LOAD NEXT ELEMT AND TEST FOR END 01126000 BZ TEREXIT TASK NOT FOUND - EXIT 01127000 CL R0,TASKNAME IS THIS THE ONE? 01128000 BNE TERTSCAN LOOK THROUGH THE TASK QUEUE 01129000 * 01130000 * FOUND IT - TERMINATING TASK'S TABLE ADDR IS IN R3 01131000 * 01132000 L R1,TASKSAVE GET THIS TASKS SAVE AREA 01133000 SPACE 01134000 USING TAREA,R1 GET TASK SAVE AREA ADDRESSABILITY 01135000 SPACE 01136000 XC TPSW(4),TPSW MASK HIM OFF 01137000 LA R14,QUIESCE GET THE QUIESCE ROUT ADDR 01138000 ST R14,TPSW+4 RESUME ADDR = QUIESCE 01139000 ST R1,TASKNAME UNIQUE, UNPRINTABLE TASK NAME 01140000 ST R1,TGREG0 SAME TO QUIESCEE'S R0 01141000 ST R14,TGREG2 QUIESCEE'S BASE REG 01142000 MVC TGREG4+3(1),TASKID GIVE QUIESCEE TASK ID 01143000 LA R14,TGREG13 SET UP HANGUP SYNCH LOCK 01144000 ST R14,TGREG12 SET HANGUP SYNCH LOCK 01145000 XC TGREG13(4),TGREG13 SET HANGUP SYNCH LOCK 01146000 MVI TASKSTAT,X'00' RESTART QUIESCEE 01147000 TEREXIT EQU * 01148000 LM R14,R3,TERSAVE RESTORE REGISTERS 01149000 BR R14 AND RETURN 01150000 EJECT 01151000 TERLHIT EQU * 01152000 BAL R14,DEACT DEACTIVATE THE TABLE ENTRY 01153000 SPACE 01154000 LA R15,002 TERMINATE MSG CODE 01155000 CLI REXREQ+1,X'F3' PROGRAM CHECK TERMINATE? 01156000 BNE TERMSET NOPE - NORMAL MSG 01157000 LA R15,80 SET PROGCHEK TERM MSG CODE 01158000 TERMSET EQU * 01159000 STH R15,MSGRINFO SET IN REQ ELEMENT 01160000 MVC MSGRINFO+4(8),LINKID SET DEACTIVATED LINK ID 01161000 MVI MSGREQ,28+8-1 SET MSG REQ LENGTH 01162000 LA R1,MSGREQ ADDR OF MSG REQUEST 01163000 L R15,=V(DMTMGX) MESSAGE EXECUTOR ENTRY POINT 01164000 BALR R14,R15 ISSUE TERMINATE MESSAGE 01165000 SPACE 01166000 B TERTKILL AND CONTINUE 01167000 SPACE 01168000 DROP R1,R2,R3 01169000 SPACE 3 01170000 TERSAVE DC 6F'0' SAVE AREA 01171000 EJECT 01172000 *. 01173000 * 01174000 * ENTRY NAME - 01175000 * 01176000 * QUIESCE 01177000 * 01178000 * FUNCTION - 01179000 * 01180000 * THIS ROUTINE BECOMES THE TASK CODE FOR A TASK IN THE 01181000 * PROCESS OF TERMINATION. 01182000 * 01183000 * CALLS TO OTHER ROUTINES - 01184000 * 01185000 * DMTASK - TO TERMINATE THE TASK 01186000 * DMTWAT - TO WAIT FOR I/O COMPLETION 01187000 * 01188000 * OPERATION - 01189000 * 01190000 * 1. LOOK FOR ANY OUTSTANDING I/O FOR THE 01191000 * TERMINATING TASK. 01192000 * 01193000 * 2. IF FOUND ISSUE HIO AND WAIT FOR COMPLETION 01194000 * 01195000 * 3. WHEN ALL I/O IS COMPLETE TERMINATE 01196000 * THE TASK 01197000 * 01198000 * RESPONSES - 01199000 * 01200000 * NONE 01201000 * 01202000 * ERROR MESSAGES - 01203000 * 01204000 * NONE 01205000 * 01206000 *. 01207000 SPACE 2 01208000 QUIESCE EQU * 01209000 SPACE 01210000 USING QUIESCE,R2 GET ADDRESSABILITY 01211000 USING IOE,R3 GET IOE ADDRESSABILITY 01212000 SPACE 01213000 BALR R14,0 RETURN ADDR 01214000 LA R3,MPXIOQ GET START OF MPX CHAIN 01215000 B QUIOPURG AND PURGE THE I/O 01216000 SPACE 1 01217000 BALR R14,0 RETURN ADDR 01218000 LA R3,SELIOQ GET START OF SEL CHAIN 01219000 B QUIOPURG AND PURGE THE I/O 01220000 SPACE 01221000 SR R1,R1 CLEAR R1 01222000 BCTR R1,0 -1 (TERMINATE REQ CODE) 01223000 L R15,TASKREQ GIVE THE SYSTEM TASK ROUT ADDR 01224000 BALR R14,R15 AND CALL THE ROUTINE 01225000 * 01226000 * FAILED - GIVE UP 01227000 * 01228000 LR R1,R12 POINTS AT R13 SAVE SLOT 01229000 * WAS CLEARED BY TERMINAT 01230000 L R15,WAITREQ GET SYSTEM WAIT ROUTINE 01231000 BALR R14,R15 AND WAIT FOREVER 01232000 EJECT 01233000 QUIOPURG EQU * 01234000 ICM R3,B'1111',IONEXT POINT TO THE NEXT ELEMENT 01235000 BZ 8(R14) END OF CHAIN 01236000 CLM R4,B'0001',IOID IS THIS ONE OURS? 01237000 BNE QUIOPURG NO - TRY NEXT 01238000 SPACE 01239000 LH R1,IOADDR BUSY DEVICE ADDRESS 01240000 HIO 0(R1) STOP THE I/O 01241000 ICM R1,B'1111',IOTABLEA GET THE IOTABLE 01242000 BNM QUICK NOT SENSE 01243000 L R1,IOTABLEA-IOE(R1) GET THE IOTABLE ADDR 01244000 SPACE 01245000 USING IOTABLE,R1 GET IOTABLE ADDRESSABILITY 01246000 SPACE 01247000 QUICK EQU * 01248000 * 01249000 * BELOW IS VALID ONLY BECAUSE QUIESCE RUNS MASKED OFF 01250000 * 01251000 XC IOSYNCH(4),IOSYNCH CLEAR SYNCH LOCK 01252000 L R15,WAITREQ GET SYSTEM WAIT PROCESSOR 01253000 BR R15 RETURN DIRECTLY 01254000 SPACE 01255000 DROP R1 01256000 LTORG @VA04356 01256500 EJECT 01257000 COPY SVECTORS 01258000 EJECT 01259000 COPY TAREA 01260000 EJECT 01261000 COPY IOE 01262000 EJECT 01263000 COPY IOTABLE 01264000 EJECT 01265000 COPY TASKE 01266000 EJECT 01267000 COPY LINKTABL 01268000 EJECT 01269000 COPY RSSEQU 01270000 EJECT 01271000 COPY DEVTYPES 01272000 END 01273000