CFP TITLE 'DMKCFP (CP) VM/370 - RELEASE 6' 00001000
ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
*. 00003000
* MODULE NAME - 00004000
* 00005000
* DMKCFP 00006000
* 00007000
* FUNCTION - 00008000
* 00009000
* TO SIMULATE THE REAL MACHINES PUSH BUTTONS. 00010000
* 00011000
* ATTRIBUTES - 00012000
* 00013000
* REENTRANT, PAGEABLE, CALLED VIA SVC 00014000
* 00015000
* ENTRY POINTS - 00016000
* 00017000
* DMKCFPRR - ENTRY TO HANDLE SYSTEM RESETS FROM OTHER 00018000
* CP ROUTINES. 00019000
* DMKCFPRD - ENTRY TO RESET DEVICES FOR OTHER CP ROUTINES. 00020000
* 00021000
* ENTRY CONDITIONS - 00022000
* 00023000
* GPR9 - ADDRESS OF COMMAND LINE BUFFER 00024000
* GPR11 - ADDRESS OF VMBLOK 00025000
* GPR12 - ADDRESS OF ENTRY POINT 00026000
* GPR13 - ADDRESS OF SAVEAREA 00027000
* 00028000
* EXIT CONDITIONS - 00029000
* 00030000
* NORMAL - 00031000
* GPR2 = 0 00032000
* 00033000
* ERROR - 00034000
* GPR2 = ERROR MESSAGE CODE NUMBER 00035000
* 00036000
* CALLS TO OTHER ROUTINES - 00037000
* 00038000
* DMKSCNFD - TO LOCATE NEXT ARGUMENT IN THE COMMAND LINE 00039000
* DMKCVTHB - CONVERT HEXADECIMAL ADDRESSES TO BINARY 00040000
* DMKSCNVU - TO LOCATE ADDRESSES OF THE VIRTUAL DEVICE BLOKS 00041000
* DMKVDREL - TO RELEASE A VIRTUAL DEVICE 00042000
* DMKQCNSY - TO SYNCHRONIZE TERMINAL OUTPUT 00043000
* DMKQCNWT - TO OUTPUT MESSAGES TO THE TERMINAL 00044000
* DMKVATBC - TO RELEASE SHADOW TABLES FOR V370R 00045000
* DMKVATMD - TO ENTER VIRTUAL MACHINE IN TRANSLATE MODE 00046000
* DMKFREE - TO OBTAIN STORAGE FROM FREE STORAGE 00047000
* DMKFRET - TO RETURN STORAGE TO FREE STORAGE 00048000
* DMKVSPCR - TO CLOSE VIRTUAL CARD READER 00049000
* DMKVSPCO - TO CLOSE VIRTUAL PRINTER OR PUNCH 00050000
* DMKPTRUL - TO UNLOCK A PAGE IN VIRTUAL MACHINE 00051000
* DMKPGSPO - TO CLEAR VIRTUAL STORAGE TO BINARY ZEROS 00052000
* DMKERMSG - TO SEND ERROR MESSAGES TO THE TERMINAL. 00053000
* DMKCFPRR - TO HANDLE SYSTEM RESET FUNCTION 00054000
* DMKPTRAN - TO BRING A PAGE IN CORE 00055000
* DMKCVTBH - CONVERT BINARY DATA TO HEXADECMAL 00056000
* DMKCFPRD - TO RESET A VIRTUAL DEVICE 00057000
* DMKSCHRT - TO RESET OUTSTANDING TIMER REQUEST 00058000
* DMKPERT - TO RESET TRACING FUNCTION 00059000
* DMKSTKCP - TO STACK CPEXBLOK FOR VIRTUAL CTCA RESET 00060000
* DMKPTRPW - TO WAIT FOR PAGING COMPLETION BEFORE SYSTEM RESET 00061100
* DMKDIBDR - TO DROP A DIALED LINE 00062000
* DMKVCARD - TO RESET A NOT-BUSY VIRTUAL CTCA 00063000
* DMKSTKIO - TO STACK AN I/O BLOCK FOR PROCESSING 00064000
* DMKUNTFR - TO RELEASE A CCW PACKAGE 00065000
* DMKRPAGT - TO READ A PAGE IN CORE 00066000
* DMKSCNVS - TO SEARCH FOR A VOLUME 00067000
* DMKCVTDB - CONVERT DECIMAL TO BINARY 00068000
* DMKIOSQR - TO EXECUTE REAL INPUT/OUTPUT REQUESTS 00069000
* DMKIOSHA - HALT AN ACTIVE REAL DEVICE 00070000
* DMKTRCPB - PUT BACK INST. ALTERED BY TRACE 00071000
* DMKVIOIN - PRESENT DE STATUS WHEN RES MDISK IS RELEASED 00072000
* DMKVMCUA - RESET VIRTUAL MACHINE COMMUNICATIONS 00073000
* HDKD7CTM - TERMINATE ACTIVE LOGICAL DEVICES HRC065DK 00073100
* 00074000
* EXTERNAL REFERENCES - 00075000
* 00076000
* DMKSYSVM - LOCATION OF THE SYSTEM VMBLOK 00077000
* DMKIOSRW - INTRPT RETURN FOR DASD RELEASE IOBLOK 00078000
* 00079000
* TABLES/WORKAREAS - 00080000
* 00081000
* RDEVBLOK, IOBLOK, VMBLOK, VDEVBLOK, VCUBLOK, VCHBLOK 00082000
* 00083000
* REGISTER USAGE - 00084000
* 00085000
* GPR0 - ARGUMENT LENGTH (PASSED BACK FROM DMKSCNFD) 00086000
* GPR1 - ARGUMENT ADDRESS (PASSED BACK FROM DMKSCNFD) 00087000
* GPR2 -PASS PARAMETERS TO CALLED ROUTINES 00088000
* GPR3 - WORK REG 00089000
* GPR4 - WORK REG 00090000
* GPR5 - WORK REG 00091000
* GPR6 - VCHBLOK ADDRESS 00092000
* GPR7 - VCUBLOK ADDRESS 00093000
* GPR8 - VDEVBLOK ADDRESS 00094000
* GPR9 - RDEVBLOK ADDRESS 00095000
* GPR10 - IOBLOK ADDRESS 00096000
* GPR11 - VMBLOK ADDRESS 00097000
* GPR12 - BASE REG 00098000
* GPR13 - SAVEAREA ADDRESS 00099000
* GPR14 - LINKAGE REG 00100000
* GPR15 - LINKAGE REG 00101000
* 00102000
* OPERATION - 00103000
* 00104000
* THE VARIOUS SUBROUTINES IN THIS MODULE ARE CALLED BY DMKCFM. 00105000
* THE FORMAT AND DESCRIPTION OF EACH COMMAND IS LISTED 00106000
* 00107000
*. 00108000
EJECT 00109000
COPY OPTIONS 00110000
COPY LOCAL 00111000
SPACE 2 00112000
DMKCFP START 00113000
SPACE 00114000
MODID DC CL8'DMKCFP' 00115000
SPACE 00116000
USING PSA,R0 00117000
USING VMBLOK,R11 00118000
USING SAVEAREA,R13 00119000
SPACE 00120000
EXTRN DMKERMSG 00121000
EXTRN DMKCVTDB 00122000
EXTRN DMKCVTBH 00123000
EXTRN DMKVMI 00124000
EXTRN DMKRPAGT 00125000
EXTRN DMKCVTHB 00126000
EXTRN DMKVIOMK 00127000
EXTRN DMKPGSPO 00128000
EXTRN DMKPTRUL 00129000
EXTRN DMKUNTFR 00130000
EXTRN DMKVDREL,DMKQCNSY @V200820 00131000
EXTRN DMKSCNFD 00132000
EXTRN DMKSCNVD,DMKTRCPB @V200820 00133000
EXTRN DMKVSPCO 00134000
EXTRN DMKVSPCR 00135000
EXTRN DMKSNTBL,DMKSCNVS @V304235 00136000
EXTRN DMKSCNVU 00137000
EXTRN DMKPERT 00138000
EXTRN DMKSTKIO,DMKSTKCP 00139000
EXTRN DMKVATBC 00140000
EXTRN DMKVATMD 00141000
EXTRN DMKSCHRT 00142000
EXTRN DMKDIBDR @VA13704 00143000
EXTRN DMKIOSRW @VA04026 00144000
EXTRN DMKIOSHA 00145000
EXTRN DMKVIOIN @V407438 00146000
EXTRN DMKSSUCF @VA11455 00146110
AIF (NOT &ISAM).NOUNTS **AIF** 00147000
EXTRN DMKUNTIS INTERRUPT RETURN FOR ISAM I/O @VA02130 00148000
.NOUNTS ANOP 00149000
EXTRN DMKVCARD 00150000
EXTRN DMKBLDRT,DMKBLDRL,DMKPGSPP @V304635 00151000
EXTRN DMKIOSQR 00152000
EXTRN DMKLOCKQ,DMKLOCKD @VM08908 00153000
EXTRN DMKPTRPW @VA08037 00154100
EXTRN DMKVMCUA @V387045 00155000
EXTRN HDKD7CTM HRC065DK 00155100
EJECT 00156000
*. 00157000
* 00158000
* SUBROUTINE NAME - 00159000
* DMKCFPRR 00160000
* 00161000
* FUNCTION - 00162000
* TO HANDLE SYSTEM RESETS FROM OTHER CP ROUTINES 00163000
* 00164000
* OPERATION - 00165000
* IF THE USER IS IN PAGE WAIT WHEN DMKCFPRR IS ENTERED, 00166000
* A CALL IS MADE TO DMKPGSPW TO STACK A CPEXBLOK 00167000
* AND EXIT TO THE DISPATCHER. WHEN THE PAGE REQUEST IS 00168000
* SATISFIED, RETURN IS MADE TO DMKCFP AND EXECUTION RESUMES 00169000
* WITH THE FOLLOWING STEPS. 00170000
* 1. BAL R10 TO LABEL RESYSTEM TO RESET THE SYSTEM. 00171000
* 2. IF USER IS IN LOGOFF, EXIT. 00172000
* 3. SET UP AN IDLE MESSAGE FOR THE TERMINAL AND SET THE 00173000
* RETURN TO LABEL RESEXIT WHICH IS AN EXIT. 00174000
* 4. CALL DMKQCNWT TO SEND THE IDLES. 00175000
* 5. GOTO DMKDSPCH (DISPATCH) . 00176000
* 00177000
* RESPONSES - 00178000
* NONE 00179000
* 00180000
* ERROR MESSAGES - 00181000
* NONE 00182000
*. 00183000
EJECT 00184000
DMKCFPRR RELOC SYSTEM RESET FROM OTHER CP ROUTINES 00185000
TM VMRSTAT,VMPGWAIT IS USER IN PAGE WAIT? @VA04369 00186000
BZ PGCOMP NO - CONTINUE PROCESSING @VA04369 00187000
CL R11,ASYSVM IS IT SYSTEM VMBLOK? @VA04369 00188000
BE PGCOMP YES - CONTINUE PROCESSING @VA04369 00189000
CALL DMKPTRPW @VA08037 00190100
PGCOMP EQU * @VA04369 00191000
NI VMPSTAT,X'FF'-(VMNOTRAN+VMPAGEX) RESET 00192000
NI VMFSTAT,X'FF'-VMFAUTO RESET AUTOPOLL H.S. TOO @V386298 00193000
LA R1,VMUSER POINT TO THE USERID @VM08908 00194000
CALL DMKLOCKQ LOCK THE VIRTUAL MACHINE @VM08908 00195000
BAL R10,RESYSTEM RESET THE VIRTUAL MACHINE 00196000
CALL DMKQCNSY SYNCHRONIZE THE TERMINAL ACTIVITY@V200820 00197000
CFPUNLK EQU * @V240820 00198000
LA R1,VMUSER POINT TO THE USERID @VM08908 00199000
CALL DMKLOCKD UNLOCK THE VIRTUAL MACHINE @VM08908 00200000
B RESEXIT EXIT WHEN COMPLETE @V200820 00201000
EJECT 00202000
*. 00203000
* SUBROUTINE NAME - 00204000
* RESYSTEM 00205000
* 00206000
* FUNCTION - 00207000
* RESET THE COMPLETE VIRTUAL MACHINE. 00208000
* 00209000
* OPERATION - 00210000
* 1. FOR A EC MODE MACHINE, STORE RESET VALUES IN THE CONTROL 00211000
* REGISTERS AND CALL DMKVATBC TO RELEASE THE SHADOW TABLES. 00212000
* RELEASE ANY QUEUED PSEUDO PAGE FAULT BLOCKS. 00213000
* IF IT IS A NON-EC MODE MACHINE, STORE THE RESET 00214000
* VALUE IN THE CREG 0 FOUND IN THE VMBLOK. 00215000
* 2. GET THE NEXT SET OF VIRTUAL DEVICE BLOK ADDRESSES. 00216000
* 3. CALL DMKCFPRD TO RESET THE VIRTUAL DEVICE. 00217000
* 4. IF IT IS A TERMINAL DEVICE, CALL DMKVDBRL TO RELEASE THE 00218000
* DEVICE. 00219000
* 5. CLEAR THE PENDING INTERRURPTS. THEN IF NOT THE LAST 00220000
* DEVICE, GO BACK TO STEP 2. IF IT IS THE LAST DEVICE, 00221000
* RETURN ON REG 10. 00222000
* 00223000
* RESPONSES - 00224000
* NONE 00225000
* 00226000
* ERROR MESSAGES - 00227000
* NONE 00228000
* 00229000
*. 00230000
EJECT 00231000
RESYSTEM DS 0H PERFORM A VIRTUAL SYSTEM RESET 00232000
TM VMCXSTAT,VMBCAUTH VMCF ACTIVE ? @V387045 00233000
BZ CFPNVMCF NO..CONTINUE... @V387045 00234000
CALL DMKVMCUA RESET VIRTUAL MACHINE @V387045 00235000
* COMMUNICATION 00236000
CFPNVMCF EQU * @V387045 00237000
CLC INSTWRD1+1(3),ZEROES Are LDEVs active? HRC065DK 00237100
BE LDEVDONE No, anchor is zero HRC065DK 00237200
CALL HDKD7CTM Call rtn to term LDEVs HRC065DK 00237300
* 00237400
LDEVDONE EQU * HRC065DK 00237500
AIF (NOT &TRACE(6)).NTR1 00238000
TM VMTRCTL,VMTRBRIN ARE WE TRACING BRIN'S? @VA00786 00239000
BZ TRCNOACT NOT ACTIVE, BR. @VA00786 00240000
CALL DMKTRCPB CALL PUTBACK ROUTINE TO RESET @V200820 00241000
TRCNOACT EQU * @VA00786 00242000
.NTR1 ANOP 00243000
TM VMPSTAT,VMV370R IS THIS AN EC-MODE MACHINE ??? 00244000
BZ RESNEX NO 00245000
L R2,VMECEXT EXTENSION BLOK ADDRESS 00246000
USING ECBLOK,R2 00247000
L R9,EXTCPTRQ @V408246 00248000
USING TRQBLOK,R9 @V408246 00249000
MVC EXTCR0(8),ZEROES CLEAR C-REGS 0,1 @V240820 00250000
MVC EXTCR2(8),FFS SET C-REGS 2,3 TO X'FFFF' @V240820 00251000
MVC EXTCR4(12*4),ZEROES CLEAR C-REGS 4-15 @V240820 00252000
MVI EXTCR0+3,X'E0' RESET VALUES IN C-REGS 0,14,15 00253000
MVI EXTCR14,X'C4' ... 00254000
MVI EXTCR15+2,X'02' ... 00255000
TM VMDSTAT,VMINQ IN-Q? @V408246 00256000
BZ NQTMR @V408246 00257000
LM R3,R4,VMTMOUTQ REMAINING TIME LEFT IN QUEUE @V408246 00258000
LTR R3,R3 DID IT GO MINUS? @V408246 00259000
BNM *+8 NO, ITS OK TO USE IT @V408246 00260000
LM R3,R4,ZEROES MUST NOT BE NEGATIVE @V408246 00261000
LM R5,R6,TRQBQUE TIME OF LAST VALUE @V408246 00262000
TM VMTLEVEL,VMCPUTMR TRACKING VIRTUAL CPU TIMER? @V408246 00263000
BO TRKTMR YES - SPECIAL HANDLING @V408246 00264000
LR R5,R3 REMAINING TIME TO LEAVE IN QUEUE @V408246 00265000
LR R6,R4 ..... @V408246 00266000
B NOTRKTMR @V408246 00267000
TRKTMR DS 0H HERE IF TRACKING VIRTUAL CPU @V408246 00268000
* TIMER 00269000
LM R7,R8,EXTCPTMR USERS VIRTUAL CPU TIMER VALUE @V408246 00270000
SLR R8,R4 CALCULATE HOW LONG USER @V408246 00271000
BC 8+2+1,*+8 HAS BEEN RUNNING IN @V408246 00272000
SL R7,F1 PROBLEM STATE SINCE LAST TIMER @V408246 00273000
SLR R7,R3 INSTRUCTION ..... @V408246 00274000
SLR R6,R8 USE THIS FACTOR SO THAT WHEN @V408246 00275000
BC 8+2+1,*+8 SCHEDULER DROPS HIM @V408246 00276000
SL R5,F1 WE WON'T FOWL UP VIRTUAL CPU @V408246 00277000
SLR R5,R7 ..... @V408246 00278000
NOTRKTMR DS 0H @V408246 00279000
NI VMTLEVEL,X'FF'-VMCPUTMR NOLONGER TRACKING @V408246 00280000
STM R5,R6,TRQBQUE SAVE RESULT FOR SCHEDULAR.. @V408246 00281000
TM CPSTATUS,CPRUN WAS SYSTEM IN PROBLEM STATE? @VA07582 00282000
BZ NOPROBT NO, CONTINUE NORMALLY @VA07582 00283000
C R11,RUNUSER IS THIS USER RUNUSER? @VA07582 00284000
BNE NOPROBT NO, CONTINUE NORMALLY @VA07582 00285000
* REGS R3 AND R4 CONTAIN VMTMOUTQ 00286000
LM R7,R8,PROBSTRT GET TIMER AT PROBLEM STATE START @VA07582 00287000
SLR R8,R4 CALC 2ND HALF OF ELAPSED TIME @VA07582 00288000
BNM *+6 WAS THERE A CARRY? @VA07582 00289000
BCTR R7,0 NO CARRY, SIGNIFICANT DIFFERENCE @VA07582 00290000
SLR R7,R3 CALC 1ST HALF OF ELAPSED TIME @VA07582 00291000
LM R3,R4,PROBTIME GET TOTAL PROBLEM TIME @VA07582 00292000
SLR R4,R8 SUBTRCT 2ND HALF OF ELAPSED TIME @VA07582 00293000
BNM *+6 WAS THERE A CARRY? @VA07582 00294000
BCTR R3,0 NO CARRY, SIGNIFICANT DIFFERENCE @VA07582 00295000
SLR R3,R7 SUBTRCT 1ST HALF OF ELAPSED TIME @VA07582 00296000
STM R3,R4,PROBTIME STORE NEW TOTAL PROBLEM TIME @VA07582 00297000
STM R5,R6,PROBSTRT SET PROBSTRT FOR DSP CALCULATION @VA07582 00298000
NOPROBT DS 0H @VA07582 00299000
STM R5,R6,VMTMOUTQ SAVE TIME TILL QUEUE DROP.. @V408246 00300000
DROP R9 @V408246 00301000
NQTMR DS 0H @V408246 00302000
MVC EXTCPTMR,FFS RESET THE CPU TIMER 00303000
L R1,EXTCCTRQ POINT TO TRQBLOK FOR CLOCK COMPARATOR 00304000
USING TRQBLOK,R1 00305000
ICM R0,15,TRQBFPNT CHECK FOR OUTSTANDING REQUEST @V240820 00306000
BZ SETCKC NO .. 00307000
CALL DMKSCHRT CALL THE SCHEDULER TO RESET IT 00308000
SLR R2,R2 CLEAR TRQBLOK POINTER FOR USOFF 00309000
ST R2,TRQBFPNT .. BLOCK HAS BEEN DEQUEUED 00310000
SETCKC MVC TRQBVAL,ZEROES RESET CLOCK COMPARATOR @VA01177 00311000
DROP R1 00312000
DROP R2 00313000
CALL DMKVATBC RELEASE SHADOW TABLES, IF ANY 00314000
NI VMESTAT,VMMICSVC+VMINVPAG ONLY LEAVE THESE. @VA01198 00315000
B RESNEX1 CONTINUE 00316000
RESNEX EQU * RESET VIRTUAL C-REG 0 00317000
LA R2,X'E0' RESET VALUE FOR C-REG 0 00318000
ST R2,VMVCR0 SET IN VMBLOK 00319000
RESNEX1 EQU * CONTINUE SYSTEM RESET 00320000
NI VMVCR14,X'FF'-VMIOLOG FOR EC AND BCMODE, RESET @VMD0103 00321000
* VMBLOK COPY OF CREG 14 IOLOG BIT. 00322000
NI VMPEND,X'FF'-VMPGPND RESET PENDING PAGE FAULTS @V213135 00323000
LA R0,PGBSIZE GET SIZE OF PAGE FAULT BLOK @V213135 00324000
L R2,VMPGPNT POINT TO FIRST BLOK ON STACK @V213135 00325000
USING PGBLOK,R2 ADDRESSABILITY @V213135 00326000
SPACE 00327000
PFLOOP LTR R1,R2 ANY MORE BLOKS TO FRET ? @V213135 00328000
BZ RESNX2 NO -- CONTINUE WITH RESET @V213135 00329000
L R2,PGPNT POINT TO NEXT BLOK @V213135 00330000
CALL DMKFRET AND FRET THIS ONE @V213135 00331000
ST R2,VMPGPNT SAVE POINTER TO NEXT ONE. @V213135 00332000
B PFLOOP CONTINUE @V213135 00333000
DROP R2 @V213135 00334000
SPACE 00335000
RESNX2 EQU * CONTINUE WITH RESET @V213135 00336000
MVC VMPSW(8),=AL2(WAIT,0,0,0) DISABLE WAIT PSW @V240820 00337000
SLR R0,R0 ZERO CONSTANT @V240820 00339000
SR R1,R1 ZERO VMCHTBL INDEX 00340000
LA R4,2 LOAD INDEX INCREMENT 00341000
LA R5,30 LOAD INDEX COMPARAND 00342000
RESNCH LH R6,VMCHTBL(R1) LOAD NEXT CHANNEL BLOK INDEX 00343000
LTR R6,R6 DOES CHANNEL EXIST ? 00344000
BM RESXCH NO, INDEX TO NEXT ONE 00345000
A R6,VMCHSTRT POINT TO VCHBLOK 00346000
USING VCHBLOK,R6 @V240820 00347000
STH R0,VCHCUINT CLEAR PENDING CU INTERRUPT FLAGS 00348000
NI VCHSTAT,VCHDED DON'T RESET DED. CHANNEL FLAG. 00349000
SR R2,R2 ZERO VCHCUTBL INDEX 00350000
RESNCU LH R7,VCHCUTBL(R2) LOAD NEXT CU BLOK INDEX 00351000
LTR R7,R7 DOES COUNTROL UNIT EXIST 00352000
BM RESXCU NO, INDEX TO NEXT ONE 00353000
A R7,VMCUSTRT POINT TO VCUBLOK 00354000
USING VCUBLOK,R7 @V240820 00355000
STH R0,VCUDVINT CLEAR PENDING DEVICE INTERRUPT STATUS 00356000
STH R0,VCUINTS CLEAR CU INTERRUPT STATUS 00357000
MVI VCUSTAT,X'00' CLEAR CONTROL UNIT STATUS 00358000
SR R3,R3 ZERO VCUDVTBL INDEX 00359000
RESNDV LH R8,VCUDVTBL(R3) LOAD NEXT DEVICE BLOK INDEX 00360000
LTR R8,R8 DOES DEVICE EXIST ? 00361000
BM RESXDV NO, INDEX TO NEXT ONE 00362000
A R8,VMDVSTRT POINT TO VDEVBLOK 00363000
USING VDEVBLOK,R8 @V240820 00364000
LH R9,VMVTERM INDEX TO THE VIRT. CONS. @VA04020 00365000
A R9,VMDVSTRT POINT TO VDEVBLOK FOR IT @VA04020 00366000
CR R8,R9 IS IT THE VIRT. CONSOLE @VA04020 00367000
BE CFPCALL YES, WE WANT TO FIRST MAKE SURE @VA03351 00368000
* THAT ALL OUTSTANDING PAGING IS TAKEN 00369000
* CARE OF BEFORE GOING TO DMKVDREL 00370000
* TO RESET AND RELEASE THE DEVICE 00371000
* AND DOING AWAY WITH THE VIRT CONS BLOCKS 00372000
TM VMRSTAT,VMLOGOFF LOGGING OUT ?? @V200930 00373000
BO RESLOG YES @V200930 00374000
CFPCALL EQU * @VA03351 00375000
CALL DMKCFPRD RESET DEVICE @V200930 00376000
B RESXDV CONTINUE WITH NEXT DEVICE @V240820 00377000
RESLOG EQU * RESET AS PART OF LOGOFF PROCESS @VM08908 00378000
CALL DMKVDREL RESET AND RELEASE THE DEVICE @VM08908 00379000
L R9,FFS X'FFFFFFFF' @VA01881 00380000
STH R9,VCUDVTBL(R3) MARK DEVICE DETACHED @VA01881 00381000
STH R9,VDEVADD @VA01881 00382000
RESXDV BXLE R3,R4,RESNDV BRANCH IF MORE DEVICES ON THIS CU 00383000
RESXCU BXLE R2,R4,RESNCU BRANCH IF MORE CONTROL UNITS ON THIS CHAN 00384000
TM VMRSTAT,VMLOGOFF IS USER LOGGING OFF ? @VA13280 00384100
BZ RESXCH NO, SKIP DEDICATED CHAN. CHECK @VA13280 00384200
TM VCHSTAT,VCHDED IS THIS A DEDICATED CHANNEL ? @VA13280 00384300
BZ RESXCH NO, SKIP DEDICATED CHAN. CHECK @VA13280 00384400
*-------RESET DEDICATED CHANNEL FLAG IN RCHBLOK-------* 00384500
L R9,VCHRCHAD GET RCHBLOK ADDRESS @VA13280 00384600
NI RCHSTAT-RCHBLOK(R9),X'FF'-RCHDED @VA13280 00384700
*DETACH CHANNEL MSG TO OPERATOR AT LOGOFF IF NO DET CMD ISSUED 00384710
LR R3,R1 SAVE R1 TEMPORARILY @VA13588 00384720
LH R1,RCHADD-RCHBLOK(R9) REAL CHANNEL ADDRESS @VA13588 00384730
CALL DMKCVTBH CONVERT CHAN ADDR TO HEX @VA13588 00384740
LR R9,R1 SAVE R1 TEMPORARILY @VA13588 00384750
LA R0,DETDSIZE SEZE OF THE MSG @VA13588 00384760
CALL DMKFREE GET FREE STORAGE @VA13588 00384770
USING DETMSG,R1 TEMP ADDRESSABILITY @VA13588 00384780
MVC DETMSG(DETSIZE1),=C'CHAN X DETACHED ' @VA13588 00384790
MVC DETUSER(8),VMUSER THE USERID @VA13588 00384800
STCM R9,B'0100',DETRADD CHANNEL NUMBER @VA13588 00384810
LA R0,DETSIZE SIZE OF THE MESSAGE @VA13588 00384820
CALL DMKQCNWT,PARM=NORET+OPERATOR WRITE TO OPERATOR @VA13588 00384830
LA R0,DETDSIZE SIZE OF THE MSG @VA13588 00384840
CALL DMKFRET FRET THE MSG STORAGE @VA13588 00384850
DROP R1 DROP TEMP ADDRESSABILITY @VA13588 00384860
SLR R0,R0 RESTORE R0 @VA13588 00384870
LR R1,R3 RESTORE R1 @VA13588 00384880
RESXCH BXLE R1,R4,RESNCH BRANCH IF MORE CHANNELS ON THIS MACHINE 00385000
STC R0,VMPEND RESET SUMMARY PENDING FLAGS 00386000
STH R0,VMIOINT CLEAR IO INTERRUPTS @V200198 00387000
STH R0,VMIOACTV RESET ACTIVE IO MASK 00388000
L R1,VMSTOR RESTORE VIRTUAL MEMORY SIZE. @V304635 00389000
L R2,XRIGHT24 CLEAR TO MAXIMUN MEMORY SIZE. @V304635 00390000
CL R0,VMSEG IS USER FULLY LOGGED ON @V304635 00391000
BE NOTLOGED NO - SKIP PAGE RELEASE @V304635 00392000
CALL DMKPGSPP RELEASE AREA DEFINED IN (R1-R2) @V304635 00393000
CALL DMKPGSPO RELEASE ALL NAMED SYSTEMS @V304635 00394000
CLC VMSTOR,VMSIZE WAS VIRTUAL STORAGE EXPANDED ? @V304635 00395000
BE PASSREL YES - THEN BYPASS PAGE RELEASE @V304635 00396000
SRL R1,12 DROP OF DISPLACEMENT @V304635 00397000
L R2,VMSIZE PRESENT SIZE OF VM (EXPANDED) @V304635 00398000
SRL R2,12 DROP OFF DISPLACEMENT @V304635 00399000
BCTR R2,0 MINUS 1 PAGE FOR BLD @V304635 00400000
CLR R1,R2 FIRST ADDR. > LAST ? @V304635 00401000
BNL SKIPREL YES - SKIP CALL TO RELEASE PAGES @V304635 00402000
SLL R1,16 POSITION FIRST PAGE TO RELEASE @V304635 00403000
OR R1,R2 PUT BEGIN/ENDING ADDRESS TOGETHER@V304635 00404000
CALL DMKBLDRL,PARM=DELPAGES FRET THE ADDRESS RANGE @V304635 00405000
* IN R1 00406000
SKIPREL L R1,VMSTOR NOW RESTORE VIRTUAL STORAGE SIZE @V304635 00407000
ST R1,VMSIZE STORE BACK OLD MEMORY SIZE. @V304635 00408000
SRL R1,12 DROP OFF DISPLACEMENT FOR BLD.. @V304635 00409000
BCTR R1,R0 MINUS 1 PAGE @V304635 00410000
CALL DMKBLDRT,PARM=OLDVMSEG+KEEPSEGS+NEWPAGES+NEWSEGS 00411000
PASSREL DS 0H HERE IF 'VMSIZE' EQUALED 'VMSTOR'@V304635 00412000
NOTLOGED DS 0H HERE IF USER NO FULLY LOGGED ON. @V304635 00413000
NI VMRSTAT,255-VMIOWAIT MAKE SURE USER NOT IN IOWAIT 00414000
L R2,VMPXINT START OF QUEUE @V200198 00415000
LA R0,XINTSIZE SIZE OF EXTERNAL INTERRUPT BLOCK @V200198 00416000
RESLOOP LTR R1,R2 ANYTHING? @V200198 00417000
BZ RESEND FINIS... @V200198 00418000
L R2,0(,R1) FETCH FORWARD CHAIN POINTER @V200198 00419000
CALL DMKFRET RELEASE THE INTERRUPT BLOCK @V240820 00420000
B RESLOOP AGAIN @V200198 00421000
SPACE 00422000
RESEND EQU * SETUP FOR ECMODE PENDING INTRPTS @V240820 00423000
ST R1,VMPXINT SET CHAIN POINTER TO ZERO @V240820 00424000
TM VMPSTAT,VMV370R ECMODE OPTION MACHINE ? @V240820 00425000
BZR R10 NO -- RESET IS COMPLETE @V240820 00426000
TM VMRSTAT,VMLOGOFF USER LOGGING OFF? @VA04200 00427000
BOR R10 YES - RESET IS COMPLETE @VA04200 00428000
LA R0,XINTSIZE STORAGE FOR EXTERNAL INTERRUPTS @V240820 00429000
CALL DMKFREE ONE FOR TOD CLOCK COMPARATOR @V240820 00430000
LR R3,R1 SAVE THE ADDRESS @V240820 00431000
CALL DMKFREE ONE FOR THE CPU TIMER @V240820 00432000
ST R1,XINTNEXT-XINTBLOK(,R3) CHAIN THE BLOCKS @V240820 00433000
ST R3,VMPXINT CONNECT TO THE VMBLOK @V240820 00434000
MVC XINTSORT-XINTBLOK(12,R3),CKCPEND SETUP CKC @V240820 00435000
MVC XINTSORT-XINTBLOK(12,R1),CPTPEND SETUP CPT @V240820 00436000
SLR R0,R0 ZERO CONSTANT @V240820 00437000
ST R0,XINTNEXT-XINTBLOK(,R1) CLEAR POINTER @V240820 00438000
BR R10 RESET IS NOW COMPLETE @V240820 00439000
SPACE 00440000
CKCPEND DC X'10400000',X'10040800',XL4'00' COMPARATOR @V240820 00441000
CPTPEND DC X'10500000',X'10050400',XL4'00' CPU TIMER @V240820 00442000
EJECT 00443000
*. 00444000
* SUBROUTINE NAME - 00445000
* DMKCFPRD 00446000
* 00447000
* FUNCTION - 00448000
* 00449000
* RESET A VIRTUAL DEVICE. 00450000
* 00451000
* OPERATION - 00452000
* 00453000
* DMKCFPRD IS CALLED TO RESET A VIRTUAL DEVICE. ANY SENSE 00454000
* BYTES, CSW STATUS, OR IOERBLOKS ARE RELEASED AND SET TO 00455000
* ZERO. ACTIVE I/O, IF ANY, IS RESET VIA A CALL TO DMKIOSHA 00456000
* (DEDICATED OR DASD DEVICES ONLY), OR TO THE APPROPRIATE 00457000
* DEVICE HANDLER (DMKVSP, DMKVCA, DMKDIA, ETC.). 00458000
* SPECIAL HANDLING IS AS FOLLOWS: 00459000
* DIALED LINES OR DIALED GRAPHIC DEVICES ARE RELEASED 00460000
* VIA A CALL TO DMKDIBDR. 00461000
* VIRTUAL CTCA DEVICES ARE RESET VIA A CALL TO DMKVCARD. 00462000
* VIRTUAL SPOOL INPUT DEVICES ARE CLOSED VIA A CALL TO 00463000
* DMKVSPCR (CLOSE READER). 00464000
* VIRTUAL SPOOL OUTPUT DEVICES ARE CLOSED VIA A CALL TO 00465000
* DMKVSPCO (CLOSE OUTPUT). 00466000
* DEDICATED REAL CTCA DEVICES ARE RESET VIA A REAL 'HDV' 00467000
* ISSUED VIA A CALL TO DMKIOSQR. 00468000
* DEDICATED DASD DEVICES WHICH SUPPORT RESERVE/RELEASE ARE 00469000
* RELEASED VIA A CALL TO DMKIOSQR. 00470000
* MINIDISKS WHICH REQUEST VIRTUAL RESERVE/RELEASE SUPPORT 00471000
* ARE RELEASED SO THAT OTHER USERS WAITING FOR THE DEVICE 00472000
* WILL RECEIVE A DEVICE END. 00473000
* 00474000
* 00475000
* RESPONSES - 00476000
* NONE 00477000
* 00478000
* ERROR MESSSAGES - 00479000
* NONE 00480000
*. 00481000
EJECT 00482000
DMKCFPRD RELOC RESET A VIRTUAL DEVICE 00483000
USING VCHBLOK,R6 00484000
USING VCUBLOK,R7 00485000
USING VDEVBLOK,R8 00486000
L R1,VDEVIOER GET POINTER TO ERROR BLOK 00487000
LTR R1,R1 IS THERE ONE ?? 00488000
BZ RESIOER NO -- GO CLEAR WORK REGISTER 00489000
TM VDEVSTAT,VDEVDED DEDICATED DEVICE 00490000
BO GETIOER YES -- SENSE BYTES IN IOERBLOK 00491000
TM VDEVTYPC,CLASURI+CLASURO UNIT RECORD ?? 00492000
BNZ RESIOER YES -- SENSE BYTES IN VDEVBLOK 00493000
CLI VDEVTYPE,TYP3215 CONSOLE ?? 00494000
BE RESIOER YES -- SENSE BYTES IN VDEVBLOK 00495000
SPACE 00496000
GETIOER BAL R5,FRTIOER2 RETURN THE IOERBLOK @VA00884 00497000
SPACE 00498000
RESIOER SR R0,R0 CLEAR WORK REGISTER 00499000
ST R0,VDEVIOER CLEAR ERROR FIELD 00500000
NI VDEVFLAG,255-VDEVUC TURN OFF UNIT CHECK FLAG 00501000
ST R0,VDEVCSW ZERO THE VIRTUAL CSW 00502000
ST R0,VDEVCSW+4 .. 00503000
SLR R2,R2 CLEAR @VA08629 00503100
ICM R2,7,VDEVIO ANY PENDING I/O? @VA08629 00503200
BZ CHKPEND NO, CONTINUE @VA08629 00503300
LR R1,R2 IOBLOK ADDRESS TO R1 @VA08629 00503400
CFPRUNQ L R2,IOBFPNT-IOBLOK(R1) ADDRESS OF NEXT ON QUEUE @VA08629 00503500
LA R0,IOBSIZE PREPARE TO FRET IOBLOKS @VA08629 00503600
CALL DMKFRET RELEASE BLOCK @VA08629 00503700
LTR R2,R2 ANY MORE? @VA08629 00503800
BZ CFPCLR NO @VA08629 00503900
LR R1,R2 PREPARE TO GO THRU LOOP AGAIN @VA08629 00504000
B CFPRUNQ REPEAT @VA08629 00504100
CFPCLR STCM R2,7,VDEVIO CLEAR CHAIN POINTER @VA08629 00504200
CHKPEND TM VDEVSTAT,VDEVPEND+VDEVCHAN+VDEVCUE ANYTHING @VA08629 00504300
* PENDING? 00504400
BNZ RESPEND YES -- CLEAR ALL PENDING INTERRUPTS 00505000
RESCONT EQU * TEST FOR RESET MSS DEVICE @V60B6B8 00506010
TM PSAMSS,MSSPRES IS MSS DEFINED IN THIS SYSTEM @V60B6B8 00506020
BZ NOTVUA CAN'T BE A VUA @V60B6B8 00506030
TM VDEVTYPC,CLASDASD @VA11970 00506032
BNO NOTVUA @VA11970 00506034
L R1,VDEVREAL GET RDEVBLOK @V60B6B8 00506040
USING RDEVBLOK,R1 ASSEMBLER ADDRESSABILITY @V60B6B8 00506050
CLI RDEVCLAS,CLASDASD IS THIS A DASD DEVICE @V60B6B8 00506060
BNE NOTVUA CAN'T BE A VUA @V60B6B8 00506070
CLI RDEVTYPE,TYP3330 IS IT A 3330 @V60B6B8 00506080
BNE NOTVUA CAN'T BE A VUA @V60B6B8 00506090
TM RDEVFTR,VIRTUAL+SYSVIRT IS IT A VUA @V60B6B8 00506100
BZ NOTVUA NOPE @V60B6B8 00506110
CALL DMKSSUCF @VA11455 00506121
NOTVUA EQU * PROCESS OTHER DEVICE STATUS @V60B6B8 00506130
TM VDEVSTAT,VDEVBUSY IS THE DEVICE BUSY ? @V60B6B8 00506140
BO RESBUSY BRANCH IF YES 00507000
TM VDEVSTAT,VDEVDED IS THIS A DEDICATED DEVICE ? 00508000
BO DEDDEV YUP, GO CHECK IT OUT @V407438 00509000
TM VDEVTYPC,CLASURI+CLASURO+CLASTERM SPOOLING DEVICE ? 00510000
BNZ RESSPOL YES 00511000
CLI VDEVTYPC,CLASSPEC MAYBE VIRTUAL CHAN-TO-CHAN ADAPTER 00512000
BE RESCTCA IF YES - SPECIAL HANDLING 00513000
B CHKVRES GO CHECK VIRT RESERVED MDISK @V407438 00514000
SPACE 00515000
DEDDEV EQU * NON BUSY DEDICATED DEVICE @V407438 00516000
TM VDEVTYPC,CLASTERM+CLASGRAF DIAL TYPE DEVICE? @V407438 00517000
BNZ RESDIAL YUP, GO HANDLE @V407438 00518000
TM VDEVTYPC,CLASDASD+CLASTAPE IS THIS TAPE OR DASD?@V407438 00519000
BNZ REALREL YUP, GO HANDLE @V407438 00520000
LA R0,CLASSPEC*256+TYPCTCA IS IT REAL CTCA?? @V407438 00521000
CH R0,VDEVTYPC ... @V407438 00522000
BE RESRCTC YES, GO HANDLE. @V407438 00523000
LA R0,CLASSPEC*256+TYP3851 IS IT MSC PORT ? @V407466 00524000
CH R0,VDEVTYPC ... @V407466 00525000
BE SUSPMSC YES, ISSUE SUSPEND ORDER @V407466 00526000
B TESTDED NOPE, BR. @V407438 00527000
EJECT 00528000
TESTDED EQU * @VA03191 00529000
SWITCH SWITCH TO MAIN PROCESSOR @V407510 00530000
L R9,VDEVREAL LOAD REAL DEV BLOK @VA03191 00531000
USING RDEVBLOK,R9 @VA03191 00532000
L R10,RDEVAIOB LOAD ACTIVE IOBLOK @VA03191 00533000
USING IOBLOK,R10 @VA03191 00534000
LTR R10,R10 IS THERE ACTIVE IOB ON REAL DEV? @VA03191 00535000
BZ RESEXIT NO--EXIT @VA03191 00536000
TM IOBSPEC,IOBUNSL IS IT UNSL INT? @VA03191 00537000
BO RESDED YES--TRY TO HALT THE IO @VA03191 00538000
RESEXIT EXIT RETURN TO THE CALLER 00539000
SPACE 2 00540000
RESDIAL EQU * CHECK TO DROP DIALED LINE 00541000
TM VDEVFLAG,VDEVDIAL CONNECTED VIA 'DIAL' ? 00542000
BZ TESTDED NO--NOT HANDLED HERE @VA03191 00543000
CALL DMKDIBDR DROP THE LINE @VA13704 00544000
B RESEXIT AND NOW EXIT 00545000
EJECT 00546000
SUSPMSC LA R0,SUSPENDL ACQ. IOBLOK PLUS EXTENSION @V407466 00547000
CALL DMKFREE ... @V407466 00548000
LR R10,R1 R10 IOBLOK ADDRESSABILITY @V407466 00549000
USING SUSPEND,R10 00550000
XC SUSPEND(IOBSIZE*8),SUSPEND CLEAR IOBLOK @V407466 00551000
MVC MSC87A(MSCL),MSC87B MOVE CCWS TO IOB EXTENSION @V407466 00552000
LA R1,MSC87A RELOCATE CCW ADDRESSES @V407466 00553000
L R0,MSC87A ... @V407466 00554000
ALR R0,R1 ADJUST ADDRESS @V407466 00555000
ST R0,MSC87A ... @V407466 00556000
USING IOBLOK,R10 RE-ESTABLISH ADDRESSABILITY 00557000
ST R1,IOBCAW CHANNEL PROGRAM ADDRESS @V407466 00558000
MVC IOBUSER,ASYSVM CHARGE IT TO THE SYSTEM @V407466 00559000
LA R1,SUSPDONE RETURN ADDRESS AFTER I/O @V407466 00560000
ST R1,IOBIRA ... @V407466 00561000
LA R0,CPEXSIZE GET A CPEXBLOK @V407466 00562000
CALL DMKFREE ACQUIRE STORAGE FOR BLOCK @V407466 00563000
ST R1,IOBMISC2 SAVE CPEXBLOK ADDRESS @V407466 00564000
USING CPEXBLOK,R1 00565000
STM R0,R15,CPEXR0 SAVE REGS ACROSS CALL TO IOS @V407466 00566000
DROP R1 00567000
L R8,VDEVREAL RDEVBLOK ADDRESS FOR IOS CALL @V407466 00568000
CALL DMKIOSQR PERFORM I/O REQUEST @V407466 00569000
GOTO DMKDSPCH DMKDSPCH GO OFF TO DISPATCHER @V407466 00570000
SPACE 00571000
SUSPDONE EQU * 00572000
USING *,R12 00573000
L R1,IOBMISC2 RESTORE CPEXBLOK ADDRESS @V407466 00574000
USING CPEXBLOK,R1 ADDRESSABILITY 00575000
LM R0,R15,CPEXR0 RESTORE CFP'S REGISTERS @V407466 00576000
DROP R1 00577000
USING DMKCFP,R12 00578000
LR R1,R11 GET ADDRESS OF CALLER'S VMBLOK @V4M0007 00579000
L R11,ASYSVM REPLACE R11 WITH SYSTEM VMBLOK - @V4M0007 00580000
* R11 VALUE WHEN IOB IS UNSTACKED @V4M0007 00581000
SWTCHVM SWITCH BACK TO CALLER'S VMBLOK @V4M0007 00582000
TM IOBSTAT,IOBFATAL+IOBCC3 I/O SUCCESSFUL?? @V407466 00583000
BZ IOBONLY YES, FRET IOB ONLY @V407466 00584000
BAL R5,FRETIOER RELEASE IOERBLOK IF THERE IS ONE @V407466 00585000
IOBONLY LA R0,CPEXSIZE RELEASE CPEXBLOK @V407466 00586000
L R1,IOBMISC2 ADDRESS OF CPEXBLOK @V407466 00587000
CALL DMKFRET RELEASE BLOCK @V407466 00588000
LA R0,SUSPENDL SIZE OF IOB PLUS EXTENSION @V407466 00589000
LR R1,R10 BLOCK ADDRESS TO R1 @V407466 00590000
CALL DMKFRET RELEASE STORAGE @V407466 00591000
B RESEXIT EXIT @V407466 00592000
EJECT 00593000
RESPEND STH R0,VDEVINTS CLEAR DEVICE INTERRUPT STATUS 00594000
TM VDEVSTAT,VDEVCUE CUE PENDING FOR THIS DEVICE ? 00595000
BZ RESPNDCH NO - CHECK FOR CHANNEL END 00596000
NI VCUSTAT,255-(VCUCUEPN+VCUACTV) CLEAR OUT FLAGS @VA03150 00597000
NI VCUINTS,255-CUE ... 00598000
RESPNDCH TM VDEVSTAT,VDEVCHAN CHANNEL END FOR THIS DEVICE ? 00599000
BZ RESPNDEV NO - GO CLEAR DEVICE INTERRUPTS 00600000
NI VCUSTAT,255-(VCUCEPND+VCUACTV) CLEAR OUT FLAGS @VA03818 00601000
NI VCHSTAT,255-VCHCEPND ... 00602000
STH R0,VCHCEDEV ... 00603000
RESPNDEV NI VDEVSTAT,255-(VDEVPEND+VDEVCHAN+VDEVCUE) 00604000
L R1,=A(DMKVIOMK) LOAD ADDRESS OF INTERRUPT MASKS 00605000
LH R2,VDEVADD LOAD VIRTUAL DEVICE ADDRESS 00606000
AR R2,R2 MULTIPLY IT BY 2 00607000
LA R2,0(R1,R2) POINT TO THE PROPER MASK 00608000
XC VCUDVINT,0(R2) TURN OFF PENDING FLAG IN VCUBLOK 00609000
BNZ RESCONT BRANCH IF OTHER INTERRUPTS PENDING 00610000
LH R2,VCUADD LOAD VIRTUAL CONTROL UNIT ADDRESS 00611000
SRL R2,3 MULTIPLY IT BY 2 00612000
LA R2,0(R1,R2) POINT TO THE PROPER MASK 00613000
XC VCHCUINT,0(R2) TURN OFF PENDING FLAG IN VCHBLOK 00614000
BNZ RESCONT BRANCH IF OTHER INTERRUPTS PENDING 00615000
LH R2,VCHADD LOAD VIRTUAL CHANNEL ADDRESS 00616000
SRL R2,7 MULTIPLY IT BY 2 00617000
LA R2,0(R1,R2) POINT TO THE PROPER MASK 00618000
XC VMIOINT,0(R2) TURN OFF CHANNEL PENDING FLAG 00619000
BNZ RESCONT MORE CHANNELS PENDING 00620000
NI VMPEND,X'FF'-VMIOPND TURN OFF SUMMARY PENDING FLAG 00621000
B RESCONT CONTINUE 00622000
EJECT 00623000
RELTD TM VDEVTYPC,CLASDASD+CLASTAPE IS THIS TAPE OR DASD?@V407438 00624000
BZ RESEXIT NOPE, DONE @V407438 00625000
TM VDEVSTAT,VDEVDED IS IT DEDICATED? @V407438 00626000
BO REALREL YUP, GO HANDLE DEDICATED CASE @V407438 00627000
CHKVRES TM VDEVFLG2,VDEVRES MDISK VIRT RESERVED FOR USER @V407438 00628000
BO REALREL YES, GO DO REAL RELEASE (MAYBE) @V407438 00629000
NI VDEVFLG2,X'FF'-VDEVODE DON'T OWE ANY DEV END @V407438 00630000
TM VDEVFLG2,VDEVCPEX WAITING FOR VIRT RELEASE? @V407438 00631000
BZ RESEXIT NOPE, CONTINUE @V407438 00632000
CALL DMKSCNVD GET VIRT ADDRESS IN CCU FORM @V407438 00633000
LR R0,R1 SAVE CCU IN R0 @V407438 00634000
L R5,VDEVRRB GET VRRBLOK @V407438 00635000
USING VRRBLOK,R5 ADDRESS THE VRRBLOK @V407438 00636000
USING CPEXBLOK,R1 ADDRESS THE CPEXBLOK @V407438 00637000
LA R1,VRRCPEX-(CPEXFPNT-CPEXBLOK) ADDRSS THE ANCHOR@V407438 00638000
NEXTCPEX LR R2,R1 SAVE THE PREVIOUS CPEXBLOK ADDR @V407438 00639000
L R1,CPEXFPNT GET NEXT CPEXBLOK ON THE QUEUE @V407438 00640000
LTR R1,R1 IS THERE ONE? @V407438 00641000
BNZ CFP1OK YUP, GO CHECK IT OUT @V407438 00642000
ABEND 1 SOMEBODY GOOFED @V407438 00643000
CFP1OK CL R11,CPEXR11 IS THIS THE RIGHT USER? @V407438 00644000
BNE NEXTCPEX NOPE, KEEP LOOKING @V407438 00645000
CL R0,CPEXMISC IS THIS THE RIGHT VIRT DEVICE? @V407438 00646000
BNE NEXTCPEX NOPE, KEEP LOOKING @V407438 00647000
MVC CPEXFPNT-CPEXBLOK(4,R2),CPEXFPNT DEQUE THIS BLOK@V407438 00648000
OI CPEXADD,X'80' MAKE RETURN ADDR NEG. FOR WAITEE @V407438 00649000
CALL DMKSTKCP STACK THE CPEXBLOK ON THE DSP Q @V407438 00650000
LA R0,CPEXSIZE NOW GET ANOTHER CPEXBLOK FOR US @V407438 00651000
CALL DMKFREE TO SYNCHRONIZE THE ONE WE JUST @V407438 00652000
STM R0,R15,CPEXR0 STACKED. @V407438 00653000
LA R0,RESYNCH RETURN ADDRESS @V407438 00654000
ST R0,CPEXADD FOR WHEN SYNCHRONIZATION COMPLETE@V407438 00655000
CALL DMKSTKCP STACK THIS CPEX BEHIND THE OTHER @V407438 00656000
GOTO DMKDSPCH WAIT ON RES/REL RELATED I/O RESET@V407438 00657000
SPACE 00658000
RESYNCH NI VMRSTAT,X'FF'-(VMIDLE+VMEXWAIT) ALLOW BACK IN Q @V407438 00659000
NI VDEVFLG2,X'FF'-(VDEVCPEX+VDEVODE) NO CPEX, NO DE@V407438 00660000
B RESEXIT DONE. @V407438 00661000
DROP R1,R5 NO MORE CPEXBLOK OR VRRBLOK @V407438 00662000
SPACE 00663000
REALREL EQU * HERE TO DO A REAL RELEASE @V407438 00664000
TM VDEVFLAG,VDEVRSRL IS RELEASE A VALID CCW? @V407438 00665000
BZ VIRTREL NOPE, GO DO VIRT RELEASE (MAYBE) @V407438 00666000
LA R0,IOBSIZE GET AN IOBLOK FOR THE I/O @VA04026 00667000
CALL DMKFREE . . . FROM FREE STORAGE @VA04026 00668000
LR R10,R1 NORMAL ADDRESSABILITY @VA04026 00669000
USING IOBLOK,R10 . . . @VA04026 00670000
XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR IT OUT @VA04026 00671000
LA R0,(RCWCCW+8-RCWTASK)/8 RCWTASK SIZE @VA04026 00672000
CALL DMKFREE GET AN RCWTASK FOR THE CCW @VA04026 00673000
USING RCWTASK,R1 TEMPORARILY . . . @VA04026 00674000
XC RCWTASK(RCWCCW-RCWTASK),RCWTASK @VA04026 00675000
MVC RCWHEAD(2),FFS FILL IN X'FFFF' HEADER FLAG @VA04026 00676000
MVC RCWCCW(8),=X'9400000030000018' RELEASE CCW @VA04026 00677000
TM VDEVTYPC,CLASDASD IS THIS A DASD DEVICE? @V407438 00678000
BO *+8 YUP, ALL SET FOR X'94' RELEASE @V407438 00679000
MVI RCWCCW,X'D4' NOPE, THEN SET FOR TAPE RELEASE @V407438 00680000
STH R0,RCWCCNT RCWTASK SIZE IN DBL-WDS @VA04026 00681000
MVI RCWRCNT+1,X'01' ONE REAL CCW @VA04026 00682000
LA R1,RCWCCW POINT TO THE RELEASE CCW @VA04026 00683000
DROP R1 FINISHED FOR NOW @VA04026 00684000
ST R1,IOBCAW START OF THE CHANNEL PROGRAM @VA04026 00685000
MVC IOBUSER(4),ASYSVM CHARGE IT TO THE SYSTEM @VA04026 00686000
L R1,=A(DMKIOSRW) IOS WILL FRET THE STORAGE @VA04026 00687000
ST R1,IOBIRA . . .WHEN THE I/O IS COMPLETE @VA04026 00688000
LR R1,R8 SAVE VDEVBLOK ADDRESS @V407438 00689000
L R8,VDEVREAL LET R8 = RDEVBLOK FOR DMKIOS @VA04026 00690000
CALL DMKIOSQR RELEASE THE DISK DRIVE @VA04026 00691000
LR R8,R1 RESTORE VDEVBLOK ADDRESS @V407438 00692000
VIRTREL EQU * HERE TO DO A VIRTUAL RELEASE @V407438 00693000
TM VDEVSTAT,VDEVDED IS DISK/TAPE DEDICATED? @V407438 00694000
BO RESEXIT YUP, DONE. (ONLY MINIDISKS LEFT) @V407438 00695000
TM VDEVFLG2,VDEVRRF MDISK WITH RES/REL FEATURE? @V407438 00696000
BZ RESEXIT NOPE, DONE, BR. @V407438 00697000
L R5,VDEVRRB GET ADDR OF VRRBLOK @V407438 00698000
USING VRRBLOK,R5 ADDRESS THE VRRBLOK @V407438 00699000
NI VDEVFLG2,X'FF'-VDEVRES VIRT DEV NO LONGER RESV @V407438 00700000
NI VRRSTAT,X'FF'-VRRRES DITTO @V407438 00701000
NXTCPEX L R1,VRRCPEX GET FIRST/NEXT CPEXBLOK WAITING @V407438 00702000
LTR R1,R1 IS ANYONE WAITING FOR THE MDISK? @V407438 00703000
BZ NXTIOB NOPE, GO TRY DEVICE END INTS @V407438 00704000
USING CPEXBLOK,R1 ADDRESS THE CPEXBLOK @V407438 00705000
L R0,CPEXFPNT GET THE ADDRESS OF THE NEXT ONE @V407438 00706000
ST R0,VRRCPEX AND MAKE IT FIRST ON CHAIN @V407438 00707000
CALL DMKSTKCP STACK THE UNCHAINED CPEXBLOK @V407438 00708000
B NXTCPEX CONTINUE UNTIL ALL UNSTACKED @V407438 00709000
DROP R1,R5 NO MORE CPEXBLOK OR VRRBLOK @V407438 00710000
SPACE 00711000
NXTIOB L R8,VDEVLINK GET NEXT VDEVBLOK USING THIS MDSK@V407438 00712000
CL R8,SAVER8 SAME ONE WE ENTERED ON? @V407438 00713000
BE RESEXIT YUP, WERE DONE, BR. @V407438 00714000
TM VDEVFLG2,VDEVODE DO WE OWE THIS VDEV A DE INT @V407438 00715000
BZ NXTIOB NOPE, LOOK THROUGH ALL VDEVBLOKS @V407438 00716000
NI VDEVFLG2,X'FF'-VDEVODE WE DON'T OWE IT ANYMORE @V407438 00717000
LA R0,IOBSIZE GET AN IOBLOK @V407438 00718000
CALL DMKFREE FROM FREE STORAGE @V407438 00719000
LR R10,R1 NORMAL ADDRESSABILITY PLEASE @V407438 00720000
XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR OUT THE BLOCK @V407438 00721000
ST R1,IOBLINK AS THOUGH IT CAME FROM IOS @V407438 00722000
MVI IOBCSW+4,DE ENDING STATUS = DEVICE END @V407438 00723000
L R0,=A(DMKVIOIN) ADDRESS OF THE INT. HANDLER @V407438 00724000
ST R0,IOBIRA THATS WHERE WE WANT IT TO GO @V407438 00725000
L R11,VDEVUSER VDEVBLOK OWNER FOR SCN & IOB @V407466 00726000
ST R11,IOBUSER IOB IS FOR THE DE RECEIVER AV407438 00727000
CALL DMKSCNVD GET THE VIRTUAL CCU PLEASE @V407438 00728000
L R11,SAVER11 RESTORE CALLER'S R11 @V407466 00729000
STH R1,IOBVADD PUT CCU IN THE IOB TOO. @V407438 00730000
CALL DMKSTKIO THAT SHOULD DO IT... @V407438 00731000
B NXTIOB CONTINUE WITH THE NEXT NOW. @V407438 00732000
SPACE 00733000
EJECT 00734000
RESRCTC EQU * IF REAL CTCA, ISSUE REAL HALT I/O 00735000
LA R0,CLASSPEC*256+TYPCTCA DEVICE CLASS, TYPE 00736000
CH R0,VDEVTYPC IS THIS A DEDICATED CTCA ? 00737000
BNE TESTDED NO--NOT HANDLED HERE @VA03191 00738000
L R9,VDEVREAL POINT TO RDEVBLOK @VA06017 00739000
USING RDEVBLOK,R9 @VA06017 00740000
ICM R10,B'1111',RDEVAIOB IS THERE AN ACTIVE IOB @VA06017 00741000
BNZ RESDED YES ISSUE HALT I/O @VA06017 00742000
DROP R9 @VA06017 00743000
LR R15,R8 COPY THE VDEVICE ADDR @VA00884 00744000
SL R15,VMDVSTRT COMPUTE RELATIVE VDEV ADDR @VA00884 00745000
ST R15,SAVEWRK8 SAVE IT @VA00884 00746000
L R8,VDEVREAL POINT TO REAL DEVICE BLOCK 00747000
LA R0,IOBSIZE FREE STORAGE FOR AN IOBLOK 00748000
CALL DMKFREE ... 00749000
LR R10,R1 ADDRESS VIA GR10 00750000
USING IOBLOK,R10 00751000
XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR OUT THE ENTIRE BLOCK 00752000
ST R11,IOBUSER SAVE VMBLOCK ADDR @VA00884 00753000
ST R8,IOBMISC SAVE THE RDEVBLOK ADDRESS @VA02130 00754000
ST R13,IOBMISC2 . . .AND THE SAVEAREA ADDRESS @VA02130 00755000
OI IOBSPEC,IOBHIO MAKE THIS A HALT I/O 00756000
LA R15,CTCAIRA INTERRUPT RETURN AFTER HALT I/O @VA02130 00757000
B STOREIRA SET IOBIRA AND CALL DMKIOSQR @VA02130 00758000
SPACE 2 00759000
USING *,R12 HERE ON COMPLETION ... @VA00884 00760000
CTCAIRA SL R12,=A(CTCAIRA-DMKCFP) ESTABLISH ADDRESSABILITY @VA00884 00761000
USING DMKCFP,R12 (WHEW) @VA00884 00762000
L R1,IOBIOER POINT TO IOERBLOK @VA03831 00763000
LTR R1,R1 IS THERE ONE? @VA03831 00764000
BZ CTCATIO NO @VA03831 00765000
BAL R5,FRTIOER2 YES - FRET IT @VA03831 00766000
ST R1,IOBIOER CLEAR THE IOERBLOK POINTER @VA00884 00767000
CTCATIO STH R1,IOBFLAG ZERO IOBFLAG & IOBSTAT @VA03831 00768000
MVI IOBSPEC,IOBTIO NOW DO A TIO TO CLEAR ANY INT. @VA00884 00769000
L R8,IOBMISC PICK UP RDEVBLOK ADDR FOR DMKIOS @VA02130 00770000
LA R15,CFPIO SET IRA FOR ENTRY AFTER I/O @VA00884 00771000
STOREIRA ST R15,IOBIRA STORE THE INT RETURN ADD @VA00884 00772000
CALL DMKIOSQR SCHEDULE A HALT I/O @VA00884 00773000
GOTO DMKDSPCH WAIT FOR STATUS @VA00884 00774000
EJECT 00775000
RESBUSY TM VDEVSTAT,VDEVCHBS IS THE VIRTUAL SUBCHANNEL BUSY ? 00776000
BZ RESSTAT NO, DO NOT RESET THE CHANNEL AND CU 00777000
NI VCUSTAT,255-(VCUBUSY+VCUCHBSY+VCUACTV) TURN OFF @VA03150 00778000
* CONTROL UNIT BUSY FLAGS 00779000
NI VCHSTAT,255-VCHBUSY TURN OFF CHANNEL BUSY FLAG 00780000
RESSTAT TM VDEVSTAT,VDEVDED IS THIS A DEDICATED DEVICE ? 00781000
BO RESHALT BRANCH IF YES 00782000
TM VDEVTYPC,CLASURI+CLASURO SPOOL DEVICE ? 00783000
BNZ RESSPOL BRANCH IF YES 00784000
NI VDEVSTAT,255-(VDEVBUSY+VDEVCHBS) FLAG DEVICE NOT BUSY 00785000
CLI VDEVTYPE,TYP3215 CONSOLE ?? 00786000
BE RESEXIT YES -- DMKCNS WILL HANDLE 00787000
RESHALT L R9,VDEVREAL LOAD THE REAL DEVICE BLOCK ADDRESS 00788000
NI VDEVSTAT,255-(VDEVBUSY+VDEVCHBS) FLAG DEVICE NOT BUSY 00789000
USING RDEVBLOK,R9 00790000
L R10,VDEVIOB GET ACTIVE IOBLOK 00791000
USING IOBLOK,R10 USE STANDARD ADDRESSABILITY 00792000
LTR R10,R10 ACTIVE CHANNEL PROGRAM ? 00793000
BZ RELTD NOPE, TEST FOR RELEASE PROCESSING@V407438 00794000
RESDED OI IOBFLAG,IOBRES FLAG IOB AS RESET @VA03191 00795000
CL R11,AVMREAL IS USER IN V=R AREA @VA00996 00796000
BNE NOTVRIOB NO - @VA00996 00797000
L R15,IOBMISC WAS THE CCW'S TRANSLATED ? @VA00996 00798000
LTR R15,R15 IOBMISC IS NON-ZERO IF THEY WERE @VA00996 00799000
BNZ *+8 BRANCH IF TRANSLATED. @VA00996 00800000
ST R15,IOBCAW INDICATE NO CALL TO DMKUNT. @VA00996 00801000
NOTVRIOB LA R15,CFPIO ADDRESS OF NEW IRA RETURN @VA00996 00802000
AIF (&ISAM).CHKUNT **AIF** 00803000
ST R15,IOBIRA AND SAVE IN THE IOBLOK @VA02130 00804000
AGO .NOTISM @VA02130 00805000
.CHKUNT L R14,=A(DMKUNTIS) CHECK FOR ISAM IOBLOK @VA02130 00806000
CL R14,IOBIRA IS THIS AN ISAM CCW STRING ? @VA02130 00807000
BNE NOTISAM NO -- JUST RESET THE IRA @VA02130 00808000
ST R15,IOBMISC COME HERE AFTER DMKUNTIS @VA02130 00809000
B SAVESAVE @VA02130 00810000
NOTISAM EQU * RESET IOBIRA FOR RETURN HERE @VA02130 00811000
ST R15,IOBIRA SAVE ADDRESS FOR RETURN @VA02130 00812000
SAVESAVE EQU * SAVE ADDRESS OF OUR SAVEAREA @VA02130 00813000
.NOTISM ANOP 00814000
ST R13,IOBMISC2 SAVEAREA ADDRESS FOR LATER USE @VA02130 00815000
TM VDEVTYPC,CLASTERM+CLASSPEC TERMINAL OR CTCA ? 00816000
BZ CKACTIVE NO- 0.K. TO HALT 00817000
TM VDEVSTAT,VDEVDED HAS THE CONNECTION BEEN MADE 00818000
BZ CKVIRT NO - GO SEE IF IT HAS BEEN STARTED 00819000
SPACE 00820000
CKACTIVE EQU * HERE TO HALT AN ACTIVE I/O REQUEST @VA04182 00821000
SL R8,VMDVSTRT REMEMBER THE DISPLACEMENT OF THE VDEVBLOK 00822000
ST R8,SAVEWRK8 IN THE SAVEAREA 00823000
LR R8,R9 POINT TO THE REAL DEVICE BLOCK WITH R8 00824000
DROP R9 @VA03831 00825000
CALL DMKIOSHA HALT THE ACTIVE DEVICE 00826000
GOTO DMKDSPCH WAIT FOR THE IOB TO BE UNSTACKED 00827000
EJECT 00828000
CKVIRT EQU * FIND OUT IF THE DIAL PROCESS HAS STARTED 00829000
CLI VDEVTYPC,CLASSPEC SPECIAL-CLASS DEVICE ? 00830000
BE RESSPEC YES - CHECK FOR CTCA 00831000
TM VDEVFLAG,VDEVDIAL STARTED TO DIAL ? 00832000
BO CFPWAIT YES - WAIT FOR I/O TO COMPLETE 00833000
RESVIRT NI VDEVFLAG,X'FF'-VDEVENAB DEVICE NO LONGER ENABLED .. 00834000
L R15,IOBUSER GET THE IOB OWNER @VA03161 00835000
LTR R15,R15 IS THERE ANY? @VA03161 00836000
BNZ *+8 YES--CONTINUE @VA03161 00837000
ST R11,IOBUSER MAKE SURE OWNER IS THERE @VA03161 00838000
ST R10,IOBLINK THIS IS THE ONLY IOBLOK 00839000
CALL DMKSTKIO STACK THE IOBLOK FOR PROCESSING 00840000
SPACE 00841000
CFPWAIT SL R8,VMDVSTRT REMEMBER DISPLACEMENT OF VDEVBLOK 00842000
ST R8,SAVEWRK8 IN THE SAVEAREA 00843000
GOTO DMKDSPCH AND EXIT TO AWAIT COMPLETION ON I/O ... 00844000
SPACE 2 00845000
CFPIO EQU * HERE AFTER IOBLOK HAS BEEN UNSTACKED 00846000
USING *,R12 TEMPORARY ADDRESSABILITY VIA IOBIRA 00847000
SL R12,=A(CFPIO-DMKCFP) REESTABLISH STANDARD 00848000
USING DMKCFP,R12 ADDRESSABILITY 00849000
L R13,IOBMISC2 PICK POINTER TO SAVE AREA @VA02130 00850000
L R8,SAVEWRK8 GET DISPLACEMENT OF VDEVBLOK 00851000
AL R8,VMDVSTRT AND POINT TO VDEVBLOK 00852000
L R9,IOBLINK SAVE LINK FIELD 00853000
TM IOBSPEC,IOBTIO+IOBHIO WAS THIS REALLY A START I/O ? 00854000
BNZ FRETIOB NO -- JUST FRET THE IOBLOK 00855000
CLR R9,R10 IS THIS THE ORIGINAL IOBLOK ?? 00856000
BNE FRETIOB NO -- SIMPLY GET RID OF IT 00857000
TM VMDSTAT,VMTIO WAS USER IN TIO BUSY LOOP 00858000
BNO CKDIAG NO- BRANCH 00859000
CLI VDEVTYPC,CLASTERM SLOW SPEED TERMINAL DEVICE 00860000
BNE *+8 NO- BRANCH 00861000
NI VMRSTAT,X'FF'-VMIDLE YES- LET USER ENTER Q 00862000
NI VMRSTAT,X'FF'-VMEXWAIT REMOVE EX WAIT FOR ALL DEVICES 00863000
NI VMDSTAT,X'FF'-VMTIO REMOVE TIO FLAG 00864000
EJECT 00865000
CKDIAG EQU * 00866000
TM IOBFLAG,IOBHVC WAS THIS I/O INITIATED VIA DIAGNOSE 00867000
BZ *+8 NO -- 00868000
NI VMRSTAT,X'FF'-(VMEXWAIT+VMIOWAIT) TAKE OUT OF WAIT 00869000
L R0,IOBCAW GET ADDRESS OF CCW PACKAGE @VA00996 00870000
LTR R0,R0 SHOULD THEY BE FRETTED ? @VA00996 00871000
BZ NOCALL NO - THERE ARE NONE. @VA00996 00872000
CALL DMKUNTFR RELEASE THE CCW PACKAGE @VA00996 00873000
NOCALL CLI VDEVTYPC,CLASTERM TERMINAL TYPE DEVICE ? @VA00996 00874000
BE TSTDIAL2 YES, TEST FOR DIALED DEVICE @V200730 00875000
CLI VDEVTYPC,CLASGRAF GRAF DEVICE ?? @V200730 00876000
BNE FRETIOB NO, CONT @V200730 00877000
TSTDIAL2 DS 0H @V200730 00878000
TM VDEVFLAG,VDEVDIAL WAS IT CONNECTED VIA DIAL 00879000
BZ FRETIOB NO -- 00880000
CALL DMKDIBDR IF SO, INFORM THE PREVIOUS USER @VA13704 00881000
FRETIOB BAL R5,FRETIOER RETURN ANY IOERBLOK @VA00884 00882000
LR R1,R10 POINT TO THE IOBLOK @VA00884 00883000
LA R0,IOBSIZE AND GET ITS SIZE 00884000
CALL DMKFRET RETURN IT TO FREE STORAGE 00885000
CLR R9,R10 ARE WE FINISHED WITH THIS OPERATION ? 00886000
BNE CFPWAIT NO -- MORE INTERRUPTS TO COME 00887000
SLR R0,R0 CLEAR 00888000
ST R0,VDEVIOB ACTIVE IOBLOK POINTER 00889000
B RELTD GO CHECK OUT RELEASE PROCESSING @V407438 00890000
EJECT 00891000
FRETIOER L R1,IOBIOER POINT TO THE IOERBLOK (VIA R10) @VA00884 00892000
LTR R1,R1 ZERO? @VA00884 00893000
BNZ FRTIOER2 NO - GO FRET IOERBLOK @VA03831 00894000
TM VDEVSTAT,VDEVDED IS REAL DEVICE DEDICATED? @VA03831 00895000
BZR R5 NO @VA03831 00896000
ST R5,SAVEWRK6 SAVE RETURN REGISTER @VA03831 00897000
L R5,VDEVREAL USE R5 AS BASE FOR RDEVBLOK @VA03831 00898000
SWITCH SWITCH TO MAIN PROCESSOR @V407510 00899000
USING RDEVBLOK,R5 @VA03831 00900000
L R1,RDEVIOER POINT TO POSSIBLE IOERBLOK @VA03831 00901000
MVC RDEVIOER,ZEROES MAKE SURE POINTER IS CLEARED @VA03831 00902000
DROP R5 @VA03831 00903000
L R5,SAVEWRK6 RESTORE RETURN REGISTER @VA03831 00904000
LTR R1,R1 WAS RDEVIOER ZERO? @VA03831 00905000
BZR R5 YES - NO IOERBLOK TO FRET @VA03831 00906000
FRTIOER2 EQU * ENTER HERE IF IOERBLOK IS HUNG @VA00884 00907000
* OFF VDEVBLOK 00908000
USING IOERBLOK,R1 @VA00884 00909000
LA R0,IOERSIZE GET THE BASE SIZE @VA00884 00910000
AH R0,IOEREXT AND ANY EXTRA SPACE ON THE END @VA00884 00911000
DROP R1 @VA00884 00912000
CALL DMKFRET FRET THE IOERBLOK @VA00884 00913000
SR R1,R1 CLEAR R1 (TO ZERO THE POINTER) @VA00884 00914000
BR R5 AND RETURN (VIA R5). @VA00884 00915000
EJECT 00916000
RESSPOL NI VDEVFLAG,255-VDEVCCW1 TURN OFF 1ST CCW FLAG 00917000
TM VDEVTYPC,CLASURO IS THIS AN OUTPUT DEVICE ?? 00918000
BO RESOPUT BRANCH IF YES 00919000
CLI VDEVTYPE,TYP3210 IS IT A CONSOLE ?? @V200730 00920000
BNE NOTCONS NO, CONT @V200730 00921000
USING VCONCTL,R2 @V200730 00922000
L R2,VDEVCON GET POINTER TO VIRTUAL CONTASK @V305535 00923000
TM VDEVCFLG,VDEVAUCR AUTOLOG ON USER @V305535 00924000
BZ FRETRBUF NO - CLEAR CONSOLE BLOCKS @V305535 00925000
TM VMRSTAT,VMLOGOFF IN LOG-OFF NOW ? @V305535 00926000
BO FRETRBUF YES - CLEAR CONSOLE BLOCKS @V305535 00927000
TM VMOSTAT,VMKILL FORCE LOG-OFF CONDITION ? @V305535 00928000
BZ NOTRBUF NO - LEAVE BUFFER ALONE @V305535 00929000
FRETRBUF LTR R2,R2 CHECK FOR VCONCTL BLOCK @V305535 00930000
BZ NOTCONS NO - CHECK FOR LOGOUT @V200730 00931000
ICM R1,15,VCONRBUF IS THERE A READ BUFFER ? @V240820 00932000
BZ NOTRBUF NO, CONT @V200730 00933000
SLR R0,R0 CLEAR @V200730 00934000
ST R0,VCONRBUF CLEAR POINTER @V200730 00935000
LH R0,VCONRBSZ YES - GET SIZE IN DWDS HRC101DK 00936490
CALL DMKFRET FRET IT. @V200730 00937000
NOTRBUF EQU * @V240820 00938000
ICM R1,15,VCONWBUF IS THERE A WRITE BUFFER ? @V240820 00939000
BZ NOTCONS NO, CONT @V200730 00940000
SLR R0,R0 CLEAR @V200730 00941000
ST R0,VCONWBUF CLEAR BUFFER ADDRESS @V200730 00942000
IC R0,VCONWBSZ GET SIZE IN DBL WDS @V200730 00943000
CALL DMKFRET FRET BUFFER @V200730 00944000
DROP R2 @V200730 00945000
NOTCONS EQU * HERE IF CONTASK IS NON-EXISTANT. @V200730 00946000
TM VMRSTAT,VMLOGOFF IS USER LOGGING OFF ???? 00947000
BZ RESEXIT BRANCH IF NOT 00948000
CLI VDEVTYPC,CLASTERM CONSOLE DEVICE ? 00949000
BE RESCSPL YES -- RESET CONSOLE SPOOL FLAG @VA04165 00950000
NI VDEVSFLG,X'FF'-VDEVFEED RESET FEED FLAG 00951000
ICM R0,15,VDEVSPL IS THERE AN ACTIVE SPOOL FILE ? @V240820 00952000
BZ RESEXIT NO -- JUST EXIT @V240820 00953000
SL R8,VMDVSTRT VDEVBLOK DISPLACEMENT @VA01460 00954000
CALL DMKVSPCR,PARM=0 CLOSE THE CARD READER 00955000
AL R8,VMDVSTRT VDEVBLOK ADDRESS @VA01460 00956000
B RESIOER CLEAR THE FLAGS AGAIN 00957000
EJECT 00958000
RESCSPL DS 0H @VA10854 00959010
TM VDEVTYPE,TYPSS COMMUN CONSOL ? @VA10854 00959020
BM RESEXIT TTY OR SS @VA10854 00959030
NI VDEVFLAG,X'FF'-VDEVCSPL @VA10854 00959040
RESOPUT EQU * RESET OUTPUT SPOOL DEVICE @V240820 00960000
ICM R0,15,VDEVSPL IS THERE AN ACTIVE SPOOL FILE ? @V240820 00961000
BZ RESEXIT NO -- JUST EXIT @V240820 00962000
SL R8,VMDVSTRT VDEVBLOK DISPLACEMENT @VA01460 00963000
CALL DMKVSPCO,PARM=0 CLOSE THE PRINTER OR PUNCH 00964000
AL R8,VMDVSTRT VDEVBLOK ADDRESS @VA01460 00965000
B RESIOER CLEAR THE FLAGS AGAIN 00966000
SPACE 1 00967000
RESSPEC EQU * RESET SPECIAL DEVICES 00968000
CLI VDEVTYPE,TYPCTCA VIRTUAL CHAN-TO-CHAN ADAPTER ? 00969000
BNE CFPWAIT NO -- WAIT FOR I/O COMPLETION 00970000
USING CHXBLOK,R9 VDEVREAL POINTS TO CHXBLOK 00971000
TM CHXFLAG,CHBWAIT IS THE X-SIDE WAITING ? 00972000
BZ CFPWAIT NO -- WE CAN WAIT FOR INTERRUPT 00973000
L R1,CHXCNCT CPEXBLOK FOR RE-CONNECT 00974000
ST R0,CHXCNCT (DO NOT STACK THE BLOCK TWICE) 00975000
CALL DMKSTKCP RESTART ACTIVITY TO CLEAR I/O 00976000
NI CHXFLAG,255-CHBWAIT NO LONGER IN WAIT STATUS 00977000
B CFPWAIT WAIT FOR COMPLETION 00978000
SPACE 00979000
RESCTCA EQU * RESET OF NOT-BUSY CHAN-TO-CHAN ADAPTER 00980000
CLI VDEVTYPE,TYPCTCA IS THIS VIRTUAL CTCA ? 00981000
BNE RESEXIT NO -- WE'RE ALL DONE ALREADY 00982000
TM VDEVSTAT,VDEVNRDY IS THE ADAPTER 'COUPLE'D YET ? 00983000
BO RESEXIT NO -- ALL DONE 00984000
CALL DMKVCARD PERFORM NECESSARY STATUS UPKEEP 00985000
B RESEXIT ...AND EXIT 00986000
DROP R6,R7,R8,R10 00987000
EJECT 00988000
EJECT 00989000
LTORG 00990000
EJECT 00991000
* CHANNEL PROGRAM USED TO SUSPEND MSC INTERFACE WHEN IPL OF VS 00992000
* SYSTEM IS INVOKED. 00993000
SPACE 00994000
MSC87B CCW X'87',MSC22B-MSC87B,CC,4 EXECUTE CCW @V407466 00995000
MSC03B CCW X'03',0,SILI,1 CHAINED TO NOP @V407466 00996000
MSC22B DC X'22008000' SUSPEND MSC INTERFACE @V407466 00997000
MSCL EQU *-MSC87B LENGTH OF CHANNEL PROGRAM 00998000
EJECT 00999000
PSA , @V306638 01000000
COPY CONBUF @V306638 01001000
COPY CORE @V306638 01002000
COPY DEVTYPES @V306638 01003000
COPY EQU @V306638 01004000
COPY IOBLOKS @V306638 01005000
* DSECT FOR EXTENDED IOBLOK 01006000
SUSPEND DSECT @V407466 01007000
DS (IOBSIZE)D SIZE OF IOBLOK @V407466 01008000
MSC87A DS D EXECUTE CCW @V407466 01009000
MSC03A DS D NOP @V407466 01010000
MSC22A DS D MSC SUSPEND ORDER @V407466 01011000
SUSPENDL EQU (*-SUSPEND)/8 @V407466 01012000
COPY IOER @V306638 01013000
COPY PGBLOK @V306638 01014000
COPY RBLOKS @V306638 01015000
COPY SAVE @V306638 01016000
COPY SAVTABLE @V306638 01017000
COPY SHRTABLE @V306638 01018000
COPY SYSTBL @V306638 01019000
COPY TIMER @V306638 01020000
COPY TREXT @V306638 01021000
COPY UDIRECT @V407438 01022000
COPY VBLOKS @V306638 01023000
COPY VCTCA @V306638 01024000
COPY VMBLOK @V306638 01025000
COPY XINTBLOK @V306638 01026000
DETMSG DSECT RESPONSE FOR DETACH CHANNEL AT LOGOFF TIME@VA13588 01026090
DS CL4,CL1 CHANNEL,BLANK @VA13588 01026140
DETRADD DS CL1,CL2 CHANNEL ADDRESS,BLANK @VA13588 01026190
DS CL8,CL2 DETACHED,BLANK @VA13588 01026240
DETSIZE1 EQU *-DETMSG MSG SIZE(MINUS USERID) @VA13588 01026290
DETUSER DS CL8 USERID @VA13588 01026340
DETSIZE EQU *-DETMSG MSG SIZE @VA13588 01026390
DETDSIZE EQU (DETSIZE+7)/8 SIZE IN DOUBLE WORDS @VA13588 01026440
END 01027000