CCW TITLE 'DMKCCW (CP) VM/370 - RELEASE 6' 00001000
ISEQ 73,80 00002000
*. 00003000
* MODULE NAME - 00004000
* 00005000
* DMKCCW 00006000
* 00007000
* FUNCTION - 00008000
* 00009000
* TO TAKE THE LIST(S) OF VIRTUAL CCWS ASSOCIATED WITH 00010000
* A USER'S 'SIO', AND TRANSLATE IT INTO A REAL CCW LIST. 00011000
* 00012000
* ATTRIBUTES - 00013000
* 00014000
* REENTRANT, RESIDENT, CALLED VIA SVC 00015000
* 00016000
* ENTRY POINT - 00017000
* 00018000
* DMKCCWTR - TRANSLATE USER'S CCW-LIST 00019000
* 00020000
* ENTRY CONDITIONS - 00021000
* 00022000
* GPR 2 = USER'S CAW (WITH HIGH-ORDER BYTE INCLUDED) 00023000
* GPR 8 = RELATIVE ADDRESS OF VIRTUAL DEVICE BLOCK 00024000
* GPR 9 = USER'S CAW (WITH HIGH-ORDER BYTE REMOVED) 00025000
* GPR 10 = ADDRESS OF IOBLOK (WITH USER'S IOBCAW FILLED IN) 00026000
* GPR 11 = ADDRESS OF USER'S VMBLOK 00027000
* GPR 12 = ADDRESS OF DMKCCWTR 00028000
* GPR 13 = ADDRESS OF STANDARD SAVE AREA 00029000
* 00030000
* EXIT CONDITIONS - 00031000
* 00032000
* GPR 1 > 0: NORMAL EXIT. 00033000
* GPR 1 = 0: DO NOT CALL DMKIOS ROUTINE 00034000
* (AS FOR VIRTUAL ENABLE ISSUED FOR A DIALED LINE) 00035000
* IN ANY EVENT, ALL NEEDED DATA HAS BEEN STORED IN THE IOBLOK, 00036000
* INCLUDING THE POINTER TO THE LIST OF REAL CCWS. 00037000
* 00038000
* CALLS TO OTHER ROUTINES - 00039000
* 00040000
* DMKFREE - TO OBTAIN FREE STORAGE FOR LIST(S) OF REAL CCWS 00041000
* DMKFRET - TO RETURN FREE STORAGE 00042000
* DMKUNTRS - TO RELOCATE SENSE BYTE INFORMATION WHEN NECESSARY 00043000
* DMKDIBSM - TO HANDLE CCW STRING PROCESSING FOR @V407510 00044000
* DIALED LINES @V407510 00045000
* DMKISMTR - TO TRANSLATE ISAM READS (IF ANY ARE FOUND) 00046000
* DMKPTRLK - TO LOCK A PAGE IN STORAGE 00047000
* DMKPTRAN - TO BRING IN A PAGE OF STORAGE 00048000
* DMKDSBSD - TO DO REAL BUFFER UNLOAD (2305/3330/40/50/8HRC011DK 00049490
* DMKRSESD - TO DO REAL BUFFER UNLOAD FOR THE 3800 PRINTER 00050000
* DMKSCNRU - TO OBTAIN ADDRESS OF RDEVBLOK 00051000
* DMKSCNVD - TO GET VIRTUAL DEVICE ADDRESS IN CCU FORM 00052000
* DMKUNTFR - TO UNDO THE TRANSLATION PERFORMED IF NEEDED 00053000
* DMKVMASH - RETURN A CHANGED SHARED PAGE TO FREE STORAGE 00054000
* DMKPTRFR - GET A FREE PAGE FROM THE PAGING MANAGER 00055000
* DMKPTRUL - TO UNLOCK A LOCKED PAGE 00056000
* DMKTRKVA - TO VERIFY ASSIGNED ADDRESS OF AN ALTERNATE TRACK 00057000
* 00058000
* EXTERNAL REFERENCES - 00059000
* 00060000
* DMKSYSRM - REAL MACHINE STORAGE SIZE 00061000
EJECT 00062000
* TABLES / WORK AREAS - 00063000
* 00064000
* LIST OF REAL CCWS 00065000
* 00066000
* REGISTER USAGE - 00067000
* 00068000
* GPR 0 = NO. DBL WORDS FREE STORAGE / WORK REGISTER 00069000
* GPR 1 = ADDRESS OF FREE STORAGE / WORK REGISTER 00070000
* GPR 2 = REAL ADDRESS OF USER CCW / WORK REGISTER 00071000
* GPR 3 = USER CCW COMMAND-CODE & ADDRESS (1ST HALF OF CCW) 00072000
* GPR 4 = BYTE-COUNT (LESS 1) IN USER CCW 00073000
* GPR 5 = SECOND BASE REGISTER FOR DMKCCW 00074000
* GPR 6 = ADDRESS OF RCWCCW (REAL CCWS BEING CREATED) 00075000
* GPR 7 = ADDRESS OF CONTROL WORDS 00076000
* GPR 8 = ADDRESS OF VIRTUAL DEVICE BLOCK / WORK REGISTER 00077000
* GPR 9 = ADDRESS OF VIRTUAL CCWS 00078000
* GPR 10 = ADDRESS OF IOBLOK / LINKING REGISTER / WORK REGISTER 00079000
* GPR 11 = ADDRESS OF USER'S VMBLOK 00080000
* GPR 12 = BASE REGISTER 00081000
* GPR 13 = ADDRESS OF STANDARD SAVE AREA 00082000
* GPR 14 = WORK / LINKING REGISTER 00083000
* GPR 15 = WORK REGISTER 00084000
* 00085000
* NOTES - 00086000
* 00087000
* A "STATUS MODIFIER" TYPE OF CCW AS MENTIONED HEREIN IS ONE 00088000
* WHERE THE CCW STRING IS EXPECTED TO CONTINUE TWO CCWS LATER, 00089000
* IRRESPECTIVE OF THE CCW WHICH IMMEDIATELY FOLLOWS (FOR 00090000
* EXAMPLE A "SEARCH ID EQUAL" FOR A DASD DEVICE). 00091000
* 00092000
* OPERATION - 00093000
* 00094000
* DMKCCWTR USES THREE PHASES TO TRANSLATE THE USER'S CCW LIST(S) 00095000
* TO REAL CCW LIST(S) USABLE BY CP, AS FOLLOWS: 00096000
* (1) INITIALIZATION PHASE 00097000
* (2) TRANSLATION PHASE 00098000
* (3) TIC-SCAN PHASE 00099000
* 00100000
* THE OPERATION OF THESE THREE PHASES IS AS FOLLOWS: 00101000
* 00102000
* 1. THE INITIALIZATION PHASE CHECKS FOR GROSS ERRORS IN 00103000
* THE CCW CHAIN (E.G. CAW NOT DOUBLE-WORD ALIGNED OR WITHIN 00104000
* USER CORE); IF THIS IS OK, THEN FREE STORAGE IS OBTAINED FOR 00105000
* A HEADER CONTAINING APPROPRIATE POINTERS AND COUNTS, AND FOR 00106000
* THE REAL CCWS AND CONTROL INFORMATION (IF ANY) TO BE CREATED. 00107000
* ALSO, A TABLE FOR USE BY THE TRANSLATION PHASE IS SET UP, 00108000
* DEPENDING UPON THE DEVICE CLASS, TO FACILITATE QUICK 00109000
* DECIPHERING AND HANDLING OF THE VARIOUS CCW COMMANDS 00110000
* FOR A PARTICULAR DEVICE CLASS AND/OR TYPE. 00111000
EJECT 00112000
* 2. THE TRANSLATION PHASE, ENTERED NEXT, PROCESSES EACH CCW 00113000
* ACCORDING TO ITS TYPE. TICS THAT CANNOT BE IMMEDIATELY 00114000
* TRANSLATED ARE FLAGGED FOR LATER PROCESSING BY TICSCAN. 00115000
* A READ OR WRITE COMMAND THAT SPECIFIES DATA CROSSING 4096-BYTE 00116000
* PAGE BOUNDARIES IS REVISED TO INCLUDE AN IDA FLAG, POINTING 00117000
* TO AN INDIRECT DATA ADDRESS LIST (IDAL), A PAIR OF WORDS 00118000
* FOR EACH 4096-BYTE PAGE, IN WHICH EACH WORD HANDLES A 00119000
* DATA-TRANSFER OF 2048 BYTES (OR LESS); THE REAL CCW IS FLAGGED 00120000
* WITH THE IDA BIT ON, AND A "TRANS" CALL IS MADE 00121000
* TO BRING IN AND LOCK EACH HALF PAGE NEEDED. 00122000
* 00123000
* VIRTUAL CCWS HAVING AN IDA FLAG SET, IN SIMILAR FASHION, ARE 00124000
* CONVERTED TO USE TRANSLATED ADDRESSES FOR EACH IDAW (INDIRECT 00125000
* DATA ADDRESS WORD) IN THE VIRTUAL IDAL, WITH ONE TRANS CALL 00126000
* FOR EACH IDAW - A REAL IDAW IN THE REAL CCW LIST CORRESPONDING 00127000
* TO EACH VIRTUAL IDAW. 00128000
* 00129000
* IF THE FREE STORAGE ALLOTTED IN THE INITIALIZATION PHASE IS 00130000
* INSUFFICIENT FOR THE TRANSLATION, THEN THE CURRENT CCW CHAIN 00131000
* (HEADER, CCWS, AND CONTROL WORDS) IS MOVED TO A LARGER FREE 00132000
* STORAGE AREA, CCWS WHICH HAVE BEEN ALREADY PROCESSED ARE 00133000
* RELOCATED TO THE NEW CONTROL AREA IF NECESSARY, THE OLD 00134000
* AREA RETURNED TO FREE STORAGE, AND TRANSLATING THEN CONTINUES 00135000
* USING THE NEW (LARGER) AREA. 00136000
* 00137000
* FURTHER DETAILS ON THE TRANSFORMATIONS PERFORMED BY DMKCCWTR 00138000
* FOR CCW COMMANDS FOR VARIOUS DEVICE CLASSES ARE GIVEN IN 00139000
* INDIVIDUAL SECTIONS, AS FOLLOWS: 00140000
* "DASD" - NON-DEDICATED DASD DEVICES (I.E. MINI-DISKS) 00141000
* "DEDD" - DEDICATED DASD DEVICES 00142000
* "TAPE" - TAPE DEVICES 00143000
* "TERM" - TERMINAL CLASSES 00144000
* "DIAL" - "DIALED LINE" CLASSES 00145000
* "CONS" - DEDICATED CPU CONSOLES 00146000
* "MSC " - 3851 MSC PORT 00147000
* "OTHR" - ALL OTHER DEVICE CLASSES 00148000
* 00149000
* 3. THE TIC-SCAN PHASE IS ENTERED WHEN THE TRANSLATE PHASE CAN 00150000
* GO NO FURTHER - THAT IS, WHEN THE LIST BEING PROCESSED ENDS 00151000
* WITH A NON-CHAINED COMMAND OR A TRANSLATABLE TIC. THE TIC- 00152000
* SCAN PHASE SCANS FOR FLAGGED TICS, AND THEN TRANSFERS TO THE 00153000
* TRANSLATION PHASE WITH THE NEW VIRTUAL CCW LIST ADDRESS. THIS 00154000
* PROCESS IS REPEATED AS NECESSARY UNTIL THE USER'S CCW LIST HAS 00155000
* BEEN FULLY TRANSLATED (INTO AS MANY REAL CCW LISTS AS NEEDED). 00156000
* 00157000
* THE TIC-SCAN PHASE IS ENTERED ONLY IF ABSOLUTELY NECESSARY; 00158000
* THE TRANSLATION PHASE MAKES EVERY EFFORT TO TRANSLATE TICS 00159000
* IF AT ALL POSSIBLE; ONLY IF THIS CANNOT BE DONE IS THE 00160000
* TIC-SCAN PHASE ENTERED. 00161000
* 00162000
* FOR DASD DEVICES, IF THE VIRTUAL RESERVE RELEASE 00163000
* FEATURE BIT IS ON IN THE VDEVBLOK, PERFORM THE 00164000
* FOLLOWING LOGIC, OTHERWISE SKIP THIS SECTION. 00165000
* IF THE DEVICE IS NOT RESERVED BY ANYONE, OR IF IT IS 00166000
* RESERVED BY THIS USER CONTINUE. IF THE DEVICE IS 00167000
* RESERVED BY ANOTHER USER THEN CALL DMKUNTFR TO UNDO THE 00168000
* TRANSLATION WHICH HAS BEEN PERFORMED AND EXIT TO THE 00169000
* CALLER, UNLESS SENSE BYTES HAVE BEEN TRANSFERRED TO THE 00170000
* USERS STORAGE, IN WHICH CASE WE MUST "ENQUEUE" ON THE 00171000
* MINIDISK AND WAIT UNTIL IT IS NO LONGER RESERVED 00172000
* AT WHICH TIME THE I/O CAN PROCEED. 00173000
* IF THE I/O IS TO CONTINUE, AND THIS CCW CHAIN CONTAINS 00174000
* A RESERVE COMMAND, THEN FLAG THE VDEVBLOK AND THE RESERVE/ 00175000
* RELEASE EXTENSION BLOCK AS RESERVED. IF THIS CCW CHAIN 00176000
* CONTAINS A RELEASE CCW, THEN FLAG THE IOBLOK AS CONTAINING 00177000
* A RELEASE CCW, SO THAT DMKUNTFR WILL "RELEASE" THE 00178000
* VIRTUAL DISK. 00179000
* 00180000
* IF ISAM LOGIC IS SUPPORTED, AND IF ANY ISAM READS ARE FOUND, 00181000
* ONE CONTROL WORD AT THE END OF EACH CCW-CHAIN IS USED TO 00182000
* REMEMBER WHERE THE ISAM READS ARE, AND AT THE END OF DMKCCW, 00183000
* JUST PRIOR TO EXIT, DMKISMTR IS CALLED TO PERFORM THE 00184000
* NECESSARY ISAM TRANSLATIONS OF THE CCW STRING(S). 00185000
*. 00186000
EJECT 00187000
* MACRO TO MAKE ROOM FOR A RELOCATED SEEK ARGUMENT 00188000
* (OR EQUIVALENT) OF 8 BYTES (OR LESS) 00189000
SPACE 00190000
MACRO 00191000
&LABEL XROOM &N 00192000
&LABEL LA R14,&N.(,R6) - POINT BEYOND END OF CURRENT COMMAND 00193000
BAL R15,CCWCHKRM - TEST FOR SUFFICIENT STORAGE 00194000
MEND 00195000
SPACE 2 00196000
MACRO 00197000
&LABEL CCTBL &NAME,&X,&Y 00198000
GBLB &TRACE(25) 00199000
* 00200000
&LABEL DC AL2(CCWINVLD-CCWSTART) - 0 CCW CMD INVALID @VA12408 00201000
DC AL2(&NAME.X1-CCWSTART) @VA12408 00202000
DC AL2(&NAME.X2-CCWSTART) @VA12408 00203000
DC AL2(&NAME.X3-CCWSTART) @VA12408 00204000
DC AL2(&NAME.X4-CCWSTART) @VA12408 00205000
DC AL2(&NAME.X5-CCWSTART) @VA12408 00206000
DC AL2(&NAME.X6-CCWSTART) @VA12408 00207000
DC AL2(&NAME.X7-CCWSTART) @VA12408 00208000
DC AL2(CCWTIC-CCWSTART) - COMMON CODE FOR 'TIC' @VA12408 00209000
DC AL2(&NAME.X9-CCWSTART) @VA12408 00210000
DC AL2(&NAME.XA-CCWSTART) @VA12408 00211000
DC AL2(&NAME.XB-CCWSTART) @VA12408 00212000
DC AL2(&NAME.XC-CCWSTART) @VA12408 00213000
DC AL2(&NAME.XD-CCWSTART) @VA12408 00214000
DC AL2(&NAME.XE-CCWSTART) @VA12408 00215000
DC AL2(&NAME.XF-CCWSTART) @VA12408 00216000
SPACE 1 00217000
DC H'&X' 32 = INITIAL NUM. OF DW'S TO GET 00218000
DC H'&Y' 34 = INCREMENTAL NUM. OF DW'S 00219000
* TO ADD 00220000
SPACE 00221000
MEND 00222000
EJECT 00223000
* THE FOLLOWING TWO MACROS GENERATE CALLS TO 'TRANBRNG' AND 'TRANLOCK' 00224000
* AND INCLUDE INSTRUCTIONS TO INVOKE THE CP ASSIST FUNCTIONS. 00225000
SPACE 00226000
MACRO 00227000
&LABEL TRANBRNG &ENTRYPT,&RETURN= 00228000
LCLC &EXIT 00229000
AIF ('&LABEL' EQ '').NOLBL 00230000
&LABEL EQU * 00231000
.NOLBL AIF ('&RETURN' EQ '').DFLBL 00232000
&EXIT SETC '&RETURN' 00233000
AGO .INSTR 00234000
.DFLBL ANOP 00235000
&EXIT SETC 'BRNG'.'&SYSNDX' 00236000
.INSTR ENTRY &ENTRYPT 00237000
DS 0H EXECUTE CP ASSIST "TRANBRNG" 00238000
&ENTRYPT DC X'E608',S(ACORETBL,&EXIT) *** 00239000
BAL R14,TRANBRNG 00240000
AIF ('&RETURN' EQ '').EXLBL 00241000
MEXIT 00242000
.EXLBL ANOP 00243000
&EXIT EQU * 00244000
MEND 00245000
SPACE 00246000
MACRO 00247000
&LABEL TRANLOCK &ENTRYPT,&RETURN= 00248000
LCLC &EXIT 00249000
AIF ('&LABEL' EQ '').NOLBL 00250000
&LABEL EQU * 00251000
.NOLBL AIF ('&RETURN' EQ '').DFLBL 00252000
&EXIT SETC '&RETURN' 00253000
AGO .INSTR 00254000
.DFLBL ANOP 00255000
&EXIT SETC 'LOCK'.'&SYSNDX' 00256000
.INSTR ENTRY &ENTRYPT 00257000
DS 0H EXECUTE CP ASSIST "TRANLOCK" 00258000
&ENTRYPT DC X'E609',S(ACORETBL,&EXIT) *** 00259000
BAL R14,TRANLOCK 00260000
AIF ('&RETURN' EQ '').EXLBL 00261000
MEXIT 00262000
.EXLBL ANOP 00263000
&EXIT EQU * 00264000
MEND 00265000
EJECT 00266000
COPY OPTIONS 00267000
COPY LOCAL 00268000
DMKCCW CSECT MODULE NAME 00269000
ENTRY DMKCCWTR MAIN ENTRY POINT 00270000
ENTRY DMKCCW0,DMKCCW1,DMKCCWGN @V3M4026 00271000
SPACE 00272000
AIF (NOT &ISAM).CCW1 00273000
EXTRN DMKISMTR TO DO ISAM TRANSLATION 00274000
.CCW1 ANOP 00275000
EXTRN DMKUNTRS TO RELOCATE SENSE BYTE INFO. WHEN NEEDED 00276000
EXTRN DMKDIBSM SIMULATE I/O TO NOT-YET-DIALED 2702 @V407510 00277000
EXTRN DMKSYSRM 00278000
EXTRN DMKPTRFR,DMKPTRUL @V60BC11 00279000
EXTRN DMKDSBSD BUFFER UNLOAD 2305/3330/40/50/80 HRC011DK 00280490
EXTRN DMKRSESD UNIT RECORD (3800) BUFFER LOAD @V60B9BA 00281000
EXTRN DMKSCNRU TO OBTAIN RDEVBLOK ADDRESS @VA03833 00282000
EXTRN DMKSCNVD @V407438 00283000
EXTRN DMKUNTFR @V407438 00284000
EXTRN DMKVMASH @VA07351 00285000
EXTRN DMKTRKVA TO VERIFY ALTERNATE TRACK SEEKS @V56BDA8 00286000
EXTRN DMKSTKCP STACK CPEXBLOK @VA08631 00286100
SPACE 00287000
USING PSA,R0 00288000
USING RCWCCW,R6 00289000
USING VDEVBLOK,R8 00290000
USING IOBLOK,R10 00291000
USING VMBLOK,R11 00292000
USING DMKCCW,R12 @VA12408 00293000
USING CCWSTART+4096,R5 @VA12408 00293500
USING SAVEAREA,R13 00294000
SPACE 00295000
DMKCCWTR ENTER ENTER "CCWTRANS": 00296000
LCTL C1,C1,VMSEG USE CORRECT SEGMENT TABLE @V304635 00297000
L R5,=A(CCWSTART+4096) SECOND BASE REG @VA12408 00298000
SLR R0,R0 CLEAR ALL FLAGS AT 'SAVEWRK1' 00300000
ST R0,SAVEWRK1 AND 00301000
MVC SAVEWRK2(ENDWORK-SAVEWRK2),ZEROES CLEAR ENTIRE WORKAREA 00302000
MVI MEMO1,CCWFIRST SIGNAL: FIRST CCW-STRING. 00303000
AL R8,VMDVSTRT LET R8 = A(VDEVBLOK) 00304000
LA R14,ADDEVTBL SET R14 TO SAVE POINTER DEVTABLE @VA04000 00305000
CLI VDEVTYPC,CLASDASD IS THIS A DASD DEVICE ? 00306000
BE DASDINIT YES - INITIALIZE ACCORDINGLY 00307000
LA R1,TAPETBL IF NOT, ASSUME IT'S TAPE @VA04000 00308000
CLI VDEVTYPC,CLASTAPE IS IT ? 00309000
BER R14 '<BE> ADDEVTBL' - YES @VA04000 00310000
CLI VDEVTYPC,CLASTERM "TERMINAL" CLASS ? 00311000
BE TERMINIT YES 00312000
LA R1,MSCTBL 3851 MSC TABLE @V407466 00313000
LA R15,CLASSPEC*256+TYP3851 3851 MSC @V407466 00314000
CH R15,VDEVTYPC IS IT 3851 MSC? @V407466 00315000
BER R14 YES, GO PROCESS @V407466 00316000
LA R1,OTHRTBL 'OTHER' IF NONE ABOVE @VA04000 00317000
LA R15,CLASSPEC*256+TYPUNSUP ONE LAST CHECK @VM08862 00318000
CH R15,VDEVTYPC IS THIS A DUMMY DEVICE ? @VM08862 00319000
BNER R14 NO -- "OTHER" IT IS @VM08862 00320000
L R15,VDEVREAL ADDRESS OF RDEVBLOK @VM08862 00321000
USING RDEVBLOK,R15 @VM08862 00322000
CLI RDEVFTR,X'00' ANY SUB-CLASS FOR ME ? @VM08862 00323000
BER R14 NO -- LET IT GO @VM08862 00324000
TM RDEVFTR,CLASURI+CLASURO+CLASGRAF SPECIAL ? @VM08862 00325000
BNZR R14 NO --- @VM08862 00326000
LA R1,DEDDTBL DEDICATED DUMMY DASD @VA04000 00327000
CLI RDEVFTR,CLASDASD IS THAT RIGHT ? @V2A2029 00328000
BER R14 YES -- @VM08862 00329000
LA R1,TERMTBL DEDICATED DUMMY TERMINAL @VA04000 00330000
CLI RDEVFTR,CLASTERM IS THAT RIGHT ? (1030,ETC) @VM08862 00331000
BER R14 YES -- @VM08862 00332000
LA R1,TAPETBL ONLY ONE LEFT IS TAPE ? @VA04000 00333000
BR R14 GO PROCESS CCW STRINGS @VM08862 00334000
DROP R15 @VM08862 00335000
SPACE 00336000
TERMINIT DS 0H INITIALIZE FOR ALL TERMINAL DEVICES: 00337000
LA R1,SDLCTBL POINT TO SDLC TABLE @V67CDF1 00337200
USING VDEVBLOK,R8 @V67CDF1 00337400
CLI VDEVTYPE,TYPSDLC IS IT AN SDLC @V67CDF1 00337600
BER R14 YES DO IT @V67CDF1 00337800
LA R1,CONSTBL POINT TO CPU TABLE @VA04000 00338000
CLI VDEVTYPE,TYP3210 IS IT DEDICATED CONSOLE ?? 00339000
BCR 8,R14 YES, GO DO IT 00340000
LA R1,TERMTBL SET FOR TERMINAL TABLE @VA04000 00341000
TM VDEVSTAT,VDEVDED YES, IS LINE DEDICATED ? 00342000
BZ SETDIAL IF NOT THEN IT'S A DIALED LINE. 00343000
TM VDEVFLAG,VDEVDIAL IF YES, IS THE DIALED FLAGBIT ON 00344000
BZR R14 '<BZ> ADDEVTBL' IF NOT @VA04000 00345000
SETDIAL LA R1,DIALTBL DIALED LINE @VA04000 00346000
BR R14 AND 'B CCWGTFRE' - TO GET FREE STORAGE. 00347000
SPACE 00348000
DASDINIT DS 0H INITIALIZE FOR ALL DASD DEVICES: 00349000
AIF (NOT &ISAM).CCW2 00350000
TM VMPSTAT,VMISAM DOES USER WANT ISAM CHECKING ? 00351000
BZ CCWINDSD IF NOT, FORGET IT. 00352000
OI MEMO1,CHEKISAM BUT IF YES, SIGNAL: CHECK FOR ISAM READS 00353000
.CCW2 ANOP 00354000
CCWINDSD EQU * @V60B6B8 00355000
NI MEMO2,FULL-PRECCW ENSURE FLAG TURNED OFF @V60B6B8 00356000
L R3,VDEVREAL ADDR OF RDEVBLOK @V60B6B8 00357000
USING RDEVBLOK,R3 TELL ASSEMBLER @V60B6B8 00358000
CLI RDEVTYPE,TYP3330 IS IT A 3330 @V60B6B8 00359000
BNE SETTABL NO, NO CHANCE FOR 3330V @V60B6B8 00360000
TM RDEVFTR,VIRTUAL+SYSVIRT IS RDEV A 3330V @V60B6B8 00361000
BNZ TESTVDEV YES, CHECK OUT THE VDEV TYPE @V60B6B8 00362000
SETTABL EQU * POINT TO CORRECT TRANS TABLE @V60B6B8 00363000
TM VDEVSTAT,VDEVDED IS THE DEVICE DEDICATED @V60B6B8 00364000
BO CCWINDED YES @V60B6B8 00365000
LA R1,DASDTBL TRANS TABLE FOR MINI-DISKS @V60B6B8 00366000
B NOPREFXA AND CONTINUE @V60B6B8 00367000
TESTVDEV EQU * SEE IF MSS PREFIX NEEDED @V60B6B8 00368000
TM VDEVSTAT,VDEVDED IS DEVICE DEDICATED @V60B6B8 00369000
BO SETDEDT YES, SET TABLE PTR @V60B6B8 00370000
OI MEMO2,PRECCW INDICATE MSS PREFIX NEEDED @V60B6B8 00371000
LA R1,DASDTBL TRANSLATION TABLE @V60B6B8 00372000
B NOPREFXA AND CONTINUE @V60B6B8 00373000
SETDEDT EQU * @V60B6B8 00374000
MVC VDEVPOSN(VDEVPOSL),ZEROES INIT SEEK ARG @V60B6B8 00375000
LA R1,DEDDTBL TABLE OF ROUTINES TO TRANS CCWS @V60B6B8 00376000
TM VDEVFLG2,VDEVVIRT VIRTUAL 3330V ? @VA09758 00377010
BO NOPREFXA YES, NO MSS PREFIX @V60B6B8 00378000
OI MEMO2,PRECCW INDICATE PREFIX NEEDED @V60B6B8 00379000
NOPREFXA EQU * @V60B6B8 00380000
DROP R3 @V60B6B8 00381000
OI MEMO1,NEEDSEEK SIGNAL: SEEK NEEDED IF NOT USER-SUPPLIED 00382000
LH R15,VDEVPOSN PICK UP 'VIRTUAL' CYLINDER NUMBER 00383000
AH R15,VDEVRELN ADD RELOCATION FACTOR 00384000
STH R15,IOBCYL STORE TENTATIVE "IOBCYL" IN IOBLOK. 00385000
L R3,VDEVREAL PICK UP 'REAL DEVICE' ADDRESS @V304498 00386000
TM RDEVFTR-RDEVBLOK(R3),FTREXTSN EXTENDED SENSE @V304498 00387000
* BYTE FORMAT ? 00388000
BZ CCW01 NO, TEST FOR PSEUDO 2311 DEVICE @V304498 00389000
MVI CCWCTL,RCWHMR YES, FLAG RELOCATE CYL NO. IN SENSE BYTES 00390000
CCW01 TM VDEVFLAG,VDEV231T+VDEV231B IS THIS A "FAKE" 2311 ? 00391000
BCR 8,R14 "BZ CCWGTFRE" IF NOT - FORGET IT. 00392000
MVI CCWCTL,RCW2311 IF YES, SET CCWCTL FOR RCWCTL USE AND 00393000
BR R14 GO GET FREE STORAGE AND GET WITH IT. 00394000
DROP R10 (THRU WITH IOBLOK FOR NOW) 00395000
DROP R8 DON'T COUNT ON R8 ANY MORE NOW EITHER. 00396000
SPACE 00397000
CCWINDED LA R1,DEDDTBL DEDICATED DASD DEVICE @VA04000 00398000
SPACE 1 00399000
ADDEVTBL ST R1,DEVTABLE SAVE ADDRESS OF DEVICE TABLE @VA04000 00400000
B CCWGTFRE GET A RCWTASK @VA04000 00401000
SPACE 2 00402000
CCWNEWV LH R15,VIRCOMND REMEMBER "PREVIOUS" CCW COMMAND & FLAGS 00403000
STH R15,PRVCOMND ... 00404000
CCWNEWVA EQU * @VA12408 00405000
NI MEMO1,X'FF'-CCWFIRST SIGNAL-NOT FIRST CCW STRING@VA12408 00405500
LA R9,0(,R9) STRIP HIGH-ORDER BYTE FROM R9 00406000
EJECT 00407000
CCWGTFRE L R1,DEVTABLE RESTORE ADDRESS OF DEVICE TABLE @VA04000 00408000
LH R0,32(,R1) GET APPROPRIATE NUM. DW'S @VA04000 00409000
CALL DMKFREE OF FREE STORAGE 00410000
SLR R3,R3 CLEAR R3 (NOTE: R2 IS IMMATERIAL) 00411000
LR R14,R1 SET R14 = ADDRESS OF THE AREA 00412000
LR R15,R0 COUNT INTO R15 00413000
SLL R15,3 IN BYTES, PLEASE 00414000
LA R7,0(R14,R15) REMEMBER END OF AREA, FOR CONTROL WORDS 00415000
MVCL R14,R2 CLEAR THE CCW-STRING. 00416000
USING RCWTASK,R1 REFERENCE THE RCWTASK (BRIEFLY) 00417000
ST R9,RCWVCAW STORE VIRTUAL ADDRESS OF CCW CHAIN 00418000
STH R0,RCWCCNT STORE TOTAL NO. OF DBL-WORDS 00419000
L R15,FFS INITIALIZE RCWHEAD 00420000
STH R15,RCWHEAD TO 'FFFF' 00421000
DROP R1 00422000
LA R6,RCWHSIZ(,R1) POINT TO WHERE CCWS WILL BEGIN 00423000
AIF (NOT &ISAM).CCW02 00424000
TM MEMO1,CHEKISAM SHOULD WE CHECK FOR ISAM READS ? 00425000
BZ CCW02 TRF IF NOT - R7 OK AS IS. 00426000
SL R7,F4 YES, LEAVE ONE WORD IN CONTROL AREA FOR ISAM 00427000
.CCW02 ANOP 00428000
CCW02 EQU * CHECK FOR I/O TO A VUA @V60B6B8 00429000
* 00430000
* IF THE RDEVICE IS AN MSS VUA, PUT THE THREE 00431000
* CCW PREFIX ON THE REAL CHANNEL PROGRAM 00432000
* 00433000
USING VDEVBLOK,R8 @V60B6B8 00434000
TM MEMO2,PRECCW POSSIBILITY OF PREFIX @V60B6B8 00435000
BZ CCW03 NO, REAL DEVICE NOT 3330V @V60B6B8 00436000
TM VDEVFLG2,VDEVVIRT USER HAVE CYL FLT SUPPORT ? @VA09758 00437010
BO CCW03 YES, NO SPECIAL SUPPORT FOR HIM @V60B6B8 00438000
DROP R8 @V60B6B8 00439000
LR R14,R1 SAVE RCWTASK ADDR OVER TRANS @VA13400 00439100
TRANS 2,9,OPT=(BRING,DEFER) @VA13400 00439200
LR R1,R14 RESTORE RCWTASK ADDR AFTER TRANS @VA13400 00439300
CLI 0(R2),X'04' IS IT A SENSE CCW? @VA13400 00439400
BNE SETPRFX NO - THEN WE DO NEED THE PREFIX @VA13400 00439500
TM 4(R2),CC IS THE SENSE CMD-CHAINED? @VA13400 00439600
BNO CCW03 NO - THEN WE DON'T NEED PREFIX @VA13400 00439700
SETPRFX EQU * PUT SKELETON PREFIX IN RCWTASK @V60B6B8 00440000
MVC 0(FAULTL,R6),FAULTCCW MOVE IN 3 CCW'S @V60B6B8 00441000
LA R2,FAULTL(R6) POINT PAST THE PREFIX @V60B6B8 00442000
STCM R2,7,PREOFF(R6) POINT THE 'TIC' PAST THE PREFIX @V60B6B8 00443000
OI MEMO2,HADRCGEN CP GENERATED CCWS ARE PRESENT @V60B6B8 00444000
LR R6,R2 POINT BASE REG PAST PREFIX @V60B6B8 00445000
CCW03 EQU * CONTINUE STANDARD PROCESSING @V60B6B8 00446000
TM MEMO1,CCWFIRST IS THIS FIRST CCW STRING? @V60B6B8 00447000
BO CCW04 TRF IF YES. 00448000
L R2,THISRCW OLD 'THIS' RCWTASK NOW BECOMES 00449000
ST R2,PREVRCW THE 'PREVIOUS' RCWTASK (& KEEP IN R2) 00450000
USING RCWTASK,R2 ... 00451000
ST R1,RCWPNT STORE OUR ADDR IN HEADER OF PREVIOUS TASK 00452000
DROP R2 00453000
MVI MEMO2,00 CLEAR MEMO2 (LOCAL) FLAG BYTE, 00454000
MVC LOCWORK(ENDWORK-LOCWORK),ZEROES CLEAR LOCAL WORK AREA 00455000
ST R1,THISRCW NOW STORE POINTER TO CURRENT RCWTASK 00456000
OUT EQU * @VA12408 00457000
L R12,=A(CCWSTART) START OF PART TWO ADDRESSBLTY @VA12408 00457300
B CCWNXT1-CCWSTART(R12) ENTER MAIN LOOP PROCESSING@VA12408 00457600
* 00458000
CCW04 ST R1,FIRSTRCW STORE POINTER TO VERY FIRST CCW TASK 00459000
ST R1,THISRCW AND POINTER TO CURRENT RCWTASK 00460000
TM SAVER9+3,07 WAS ORIGINAL CAW DBL-WORD ALIGNED ? 00461000
BZ OUT IF YES, ENTER MAIN PROCESSNG LOOP@VA12408 00462000
L R12,=A(CCWSTART) NOT, FORCE A CHANNEL PRGM CHK @VA12408 00462600
B CCWBAD-CCWSTART(R12) GO THERE @VA12408 00463200
DS 0D @V60B6B8 00464000
FAULTCCW EQU * DEFINE THE MSS CCW PREFIX @V60B6B8 00465000
* 00466000
* FOLLOWING IS THE CCW PREFIX STRING FOR 3330V DEVICES 00467000
* 00468000
* THIS PREFIX WILL TRAP THE STATUS MODIFIER 00469000
* GENERATED BY THE MSS SA ON A CYLINDER FAULT 00470000
* 00471000
DC X'07',AL3(0),AL1(CC),AL1(RCWGEN+RCWREL),AL2(6) @V60B6B8 00472000
DC X'08',AL3(0),AL1(CC+SILI),AL1(RCWGEN+RCWREL),AL2(0) 00473000
DC X'03',AL3(0),AL1(SILI),AL1(RCWGEN),AL2(1) @V60B6B8 00474000
FAULTL EQU *-FAULTCCW LENGTH OF PREFIX CHAN PROG @V60B6B8 00475000
PREOFF EQU 9 @V60B6B8 00476000
SEEKOFF EQU 17 @V60B6B8 00477000
VDEVPOSL EQU 4 @V60B6B8 00478000
PREFLAG EQU 20 @VA10883 00478100
PRECTL EQU 21 @VA10883 00478200
EJECT 00479000
* 00479010
* GET A LARGER AREA FROM FREE STORAGE, MOVE HEADER, CCWS, AND 00479020
* CONTROL DATA FROM THE OLD (SMALLER) AREA TO THE NEW (BIGGER) AREA, 00479030
* RELOCATING CCW ADDRESSES IF NECESSARY. THEN RETURN THE OLD 00479040
* BLOCK TO FREE STORAGE, REVISE ALL NEEDED POINTERS, ETC., AND 00479050
* CONTINUE TRANSLATING USING THE NEW (LARGER) BLOCK: 00479060
* 00479070
ROOM L R8,THISRCW POINT TO BEGINNING OF THIS RCWTSK@VA12408 00479080
USING RCWTASK,R8 REFERENCE SAME 00479090
LH R0,RCWCCNT GET OLD TOTAL DBL-WORD COUNT 00479100
L R10,DEVTABLE LOAD ADDRESS OF DEVICE TABLE @VA04000 00479110
AH R0,34(,R10) ADD EXTRA WORD COUNT FROM TABLE @VA04000 00479120
CALL DMKFREE GET A NEW (LARGER) FREE STORAGE AREA 00479130
LR R2,R8 GET BEGINNING OF OLD AREA, 00479140
LR R3,R6 HOW FAR WE GOT, 00479150
SLR R3,R2 NOW WE HAVE THE COUNT IN R3 00479160
LH R15,34(,R10) GET EXTRA WORD COUNT AGAIN @VA04000 00479170
SLL R15,3 IN BYTES, PLEASE, 00479180
LR R14,R7 GET DISPLACEMENT OF OLD CONTROL WORDS 00479190
SLR R14,R8 FROM BEGINNING OF BLOCK; THIS PLUS R15 00479200
ALR R15,R14 = COUNT OF NEW BLOCK UP TO CONTROL WORDS 00479210
LR R14,R1 ADDRESS OF NEW AREA IN R14 00479220
LA R10,0(R14,R15) BEGINNING OF NEW CONTROL WORDS INTO R10 00479230
MVCL R14,R2 OLD CCWS TO NEW AREA & CLEAR EXTRA WORDS 00479240
STH R0,RCWCCNT-RCWTASK(,R1) NOW STORE NEW DBL-WORD COUNT 00479250
LH R3,RCWCCNT GET OLD COUNT AGAIN, 00479260
SLL R3,3 INTO BYTES, 00479270
ALR R3,R8 COMPUTE END OF OLD CONTROL WORD AREA 00479280
SR R3,R7 NOW WE HAVE COUNT OF OLD CONTROL WORDS 00479290
BNP CCWNR02 (IF THERE ARE NONE, DON'T MOVE THEM) 00479300
LR R2,R7 BEGINNING OF CONTROL WORD AREA TO R2 00479310
LR R15,R3 COUNT (NONZERO) INTO R15, 00479320
LR R14,R10 SET R14 FOR MOVING CONTROL WORDS: 00479330
MVCL R14,R2 NOW MOVE OLD CONTROL WORDS TO NEW AREA 00479340
* 00479350
DROP R8 00479360
CCWNR02 L R2,PREVRCW REFERENCE THE "PREVIOUS" CCW STRING 00479370
LTR R2,R2 (IF ANY) 00479380
BP CCWNR03 PATCH POINTERS IF DOES EXIST. 00479390
ST R1,FIRSTRCW IF NONEXISTENT, REVISE "FIRSTRCW" 00479400
B CCWNR04 AND CONTINUE. 00479410
USING RCWTASK,R2 00479420
CCWNR03 ST R1,RCWPNT REVISE POINTER OF "PREVIOUS" CCW STRING 00479430
DROP R2 00479440
* 00479450
CCWNR04 ST R1,THISRCW STORE NEW "BEGINNING OF CCWS" 00479460
LR R3,R1 GET RELOCATION FACTOR IN R3 = 00479470
SR R3,R8 ADDR. OF NEW CCWS - ADDR. OF OLD ONES 00479480
LR R4,R10 DITTO FOR THE CONTROL WORDS 00479490
SR R4,R7 ... 00479500
SLR R6,R8 MAKE R6 A DISPLACEMENT, 00479510
LA R14,8 R14=8 FOR BXLE USE, 00479520
LA R15,0(R1,R6) POINT TO END OF AREA 00479530
SLR R15,R14 LESS 8 FOR BXLE LOOP 00479540
ALR R6,R1 NEW R6 FOR USE LATER 00479550
LA R1,RCWHSIZ(,R1) SET R1 TO BEGINNING OF CCWS 00479560
EJECT 00479570
* 00479580
* TIGHT LOOP TO RELOCATE CCW ADDRESSES: 00479590
* 00479600
* REGISTERS ARE USED AS FOLLOWS: 00479610
* R1 = ADDRESS OF CCWS BEING CHECKED (INCREMENTED BY 8 ON BXLE) 00479620
* R2 USED FOR WORK REGISTER, FOR RELOCATING A CCW-ADDRESS 00479630
* R3 = (ADDRESS OF NEW CCWS) - (ADDRESS OF OLD CCWS) 00479640
* R4 = (ADDR. OF NEW CONTROL AREA) - (ADDR. OF OLD CONTROL AREA) 00479650
* R7 = ADDRESS OF OLD CONTROL WORD AREA 00479660
* R14 = 8 (FOR BXLE) 00479670
* R15 = ADDRESS OF LAST DBL-WORD OF CCWS. 00479680
* 00479690
CNOP 0,4 FULL-WORD ALIGN LOOP FOR GOOD PERFORMANCE: 00479700
CCWRELLP TM 5(R1),RCWREL SHOULD ADDRESS BE RELOCATED ? 00479710
BO CCWRELAD TRF IF YES. 00479720
BXLE R1,R14,CCWRELLP ITERATE RELOCATING LOOP. 00479730
B CCWRELFN RELOCATING IS FINISHED. 00479740
* 00479750
CCWRELAD L R2,0(,R1) PICK UP CCW COMMAND & ADDRESS, 00479760
LA R2,0(,R2) STRIP OFF OP-CODE, 00479770
CLR R2,R7 WAS COMMAND IN CONTROL AREA ? 00479780
BL CCWREL2 TRF IF NOT. 00479790
AR R2,R4 RELOCATE TO NEW CONTROL AREA, 00479800
STCM R2,7,1(R1) STORE RELOCATED ADDRESS. 00479810
BXLE R1,R14,CCWRELLP ITERATE RELOCATING LOOP. 00479820
B CCWRELFN RELOCATING IS FINISHED. 00479830
* 00479840
CCWREL2 AR R2,R3 RELOCATE TO NEW CCW AREA, 00479850
STCM R2,7,1(R1) STORE RELOCATED ADDRESS. 00479860
BXLE R1,R14,CCWRELLP ITERATE RELOCATING LOOP. 00479870
* 00479880
CCWRELFN DS 0H RELOCATION OF CCW-ADDRESSES IS FINISHED: 00479890
USING RCWTASK,R8 00479900
LH R0,RCWCCNT GET SIZE OF OLD AREA, 00479910
DROP R8 00479920
LR R1,R8 AND ADDRESS OF SAME, 00479930
CALL DMKFRET NOW 'FRET' THE OLD BLOCK, 00479940
LR R7,R10 NEW R7 (AREA FOR CONTROL WORDS) 00479950
B OUT NOW GO PICK UP WHERE WE LEFT OFF. 00479960
SPACE 3 00479970
LTORG 00479980
EJECT 00479990
* MAIN LOOP TO PROCESS USER CCWS: 00480000
* R6 = ADDRESS OF WHERE TO PUT NEXT CCW BEING CREATED (RCWCCW) 00481000
* R7 = CURRENT ADDRESS OF CONTROL-WORD AREA 00482000
* R9 = VIRTUAL ADDRESS OF USER CCWS 00483000
SPACE 00484000
*. 00485000
*********************************************************************** 00486000
* 00487000
* 00488000
* CP ASSIST INSTRUCTION "DECCW0" - DECODE THE NEXT VIRTUAL CCW 00489000
* 00490000
* 00491000
* OPERANDS: 00492000
* 1 = ADDRESS OF 'CCWDATA' (DATA LIST) 00493000
* 2 = ADDRESS OF 'CCWEXITS' (EXIT LIST) 00494000
* 00495000
* REGISTER INPUT: (BYTE 0 OF GPR 6, 7, AND 9 MUST BE ZERO) 00496000
* GPR 6 = ADDRESS OF PREVIOUS REAL CCW 00497000
* GPR 7 = ADDRESS PAST THE END OF RCWTASK'S 'RCWCCW' SPACE 00498000
* GPR 9 = VIRTUAL ADDRESS OF PREVIOUS VIRTUAL CCW 00499000
* GPR 11 = ADDRESS OF THE VMBLOK 00500000
* GPR 13 = ADDRESS OF THE SAVEAREA 00501000
* 00502000
* SYSTEM DATA AREAS REFERENCED (BY MODULE WHERE APPLICABLE): 00503000
* DMKCCW - DEVICE TABLE 00504000
* DMKSYS - 'CORTABLE' 00505000
* SAVEAREA, VMBLOK 00506000
* 00507000
* 00508000
* EXITS TO SPECIFIED OPERAND 2 LIST ADDRESSES: 00509000
* 00510000
* +0 'CCWBAD' (ERROR TRYING TO DECODE VIRTUAL CCW) 00511000
* REGISTER OUTPUT: 00512000
* GPR 1 = GPR 9 ENTRY VALUE + 8 00513000
* GPR 6 = ENTRY VALUE + 8 00514000
* GPR 8 = UNPREDICTABLE 00515000
* GPR 9 = ENTRY VALUE + 8 00516000
* 00517000
* +4 'CCWNROOM' (RCWTASK TOO SMALL - MUST GET A LARGER ONE) 00518000
* REGISTER OUTPUT: 00519000
* GPR 6,9 = SAME AS ABOVE (EXIT TO +0 'CCWBAD') 00520000
* 00521000
* +8 'CCWTIC1' (A TIC FOLLOWS A VIRTUAL CCW WITH CHAIN DATA SET) 00522000
* REGISTER OUTPUT: 00523000
* GPR 1 = VIRTUAL DATA ADDRESS FROM CCW (BYTE 0 = ZERO) 00524000
* GPR 2 = ADDRESS OF 'CCWGENRL' FOR 'BCR R2' USE 00525000
* GPR 3 = VIRTUAL CCW COMMAND CODE AND DATA ADDRESS 00526000
* GPR 4 = VIRTUAL CCW FLAG BYTES AND COUNT 00527000
* GPR 6,9 = SAME AS THAT FOR EXIT TO +0 'CCWBAD' 00528000
* GPR 8 = ADDRESS OF THE VDEVBLOK 00529000
* 00530000
* +12 'ADDRINVL' (VIRTUAL CCW'S DATA ADDRESS IS NOT VALID) 00531000
* REGISTER OUTPUT: 00532000
* GPR 1,2,4,6,8,9 = SAME AS ABOVE (EXIT TO +8 'CCWTIC1') 00533000
* GPR 3 = SAME AS ABOVE EXIT EXCEPT BYTE 0 MAY BE ALTERED 00534000
* GPR 14,15 = UNPREDICTABLE 00535000
* 00536000
* +16 'CCWTIC' (VIRTUAL CCW HAS A BYTE COUNT OF ZERO) 00537000
* REGISTER OUTPUT: 00538000
* GPR 1,2,3,6,8,9 = SAME AS ABOVE (EXIT TO +12 'ADDRINVL') 00539000
* GPR 4 = VIRTUAL CCW BYTE COUNT MINUS ONE 00540000
* GPR 14,15 = UNPREDICTABLE 00541000
* 00542000
* +20 'NGCCW' (PAGE WITH VIRTUAL CCW IS NOT RESIDENT OR SHARED) 00543000
* REGISTER OUTPUT: 00544000
* GPR 1,6,8,9 = SAME AS THAT FOR EXIT TO +0 'CCWBAD' 00545000
* GPR 2 = UNPREDICTABLE 00546000
* 00547000
* EXIT TO A CCW COMMAND TRANSLATION ROUTINE: (NORMAL COMPLETION) 00548000
* REGISTER OUTPUT: SAME AS EXIT TO +16 'CCWTIC' 00549000
* 00550000
* NOTE: THE EXIT ADDRESS = GPR 12 + HALFWORD OFFSET OBTAINED 00551000
* BY USING TWICE THE VALUE OF BITS 4-7 OF THE VIRTUAL CCW 00552000
* AS AN INDEX INTO THE TABLE POINTED TO BY 'DEVTABLE'. 00553000
* 00554000
*********************************************************************** 00555000
*. 00556000
SPACE 00557000
CCWSTART DS 0H START OF SECOND PART @VA12408 00558000
USING *,R12 ADDRESSABILITY FOR SECOND PART @VA12408 00559000
CCWNEXT DS 0H EXECUTE CP ASSIST "DECCW0" @VA12408 00560000
DMKCCW0 DC X'E604',S(CCWDATA,CCWEXITS) ***@V3M4026 00561000
SPACE 00562000
LA R9,8(,R9) POINT TO NEXT USER CCW %V3M4038 00563000
LH R15,VIRCOMND SAVE "PREVIOUS" CCW CMD & FLAGS %V3M4038 00564000
STH R15,PRVCOMND ... %V3M4038 00565000
LA R6,8(,R6) POINT TO NEXT POSITION IN CHAIN %V3M4038 00566000
LA R14,8(,R6) LET R14 LOOK 8 BYTES FARTHER %V3M4038 00567000
CLR R14,R7 LEAVE ROOM FOR AT LEAST ONE CMD %V3M4038 00568000
BH CCWNROOM IF NO ROOM, EXPAND CCW-STRING %V3M4038 00569000
EJECT 00570000
*. 00571000
*********************************************************************** 00572000
* 00573000
* 00574000
* CP ASSIST INSTRUCTION "DECCW1" - DECODE THE FIRST VIRTUAL CCW 00575000
* 00576000
* 00577000
* OPERANDS AND SYSTEM DATA AREAS REFERENCED: SAME AS "DECCW0" 00578000
* 00579000
* REGISTER INPUT: (BYTE 0 OF GPR 6 AND 9 MUST BE ZER0) 00580000
* GPR 6 = ADDRESS OF PREVIOUS REAL CCW 00581000
* GPR 9 = VIRTUAL ADDRESS OF PREVIOUS VIRTUAL CCW 00582000
* GPR 11 = ADDRESS OF THE VMBLOK 00583000
* GPR 13 = ADDRESS OF THE SAVEAREA 00584000
* 00585000
* 00586000
* EXITS TO SPECIFIED OPERAND 2 LIST ADDRESSES: 00587000
* 00588000
* +0 'CCWBAD' (ERROR TRYING TO DECODE VIRTUAL CCW) 00589000
* REGISTER OUTPUT: 00590000
* GPR 1 = SAME AS GPR 9 00591000
* GPR 8 = UNPREDICTABLE 00592000
* 00593000
* +8 'CCWTIC1' (A TIC FOLLOWS A VIRTUAL CCW WITH CHAIN DATA SET) 00594000
* REGISTER OUTPUT: 00595000
* GPR 1 = VIRTUAL DATA ADDRESS FROM CCW (BYTE 0 = ZERO) 00596000
* GPR 2 = ADDRESS OF 'CCWGENRL' FOR 'BCR R2' USE 00597000
* GPR 3 = VIRTUAL CCW COMMAND CODE AND DATA ADDRESS 00598000
* GPR 4 = VIRTUAL CCW FLAG BYTES AND COUNT 00599000
* GPR 8 = ADDRESS OF THE VDEVBLOK 00600000
* 00601000
* +12 'ADDRINVL' (VIRTUAL CCW'S DATA ADDRESS IS NOT VALID) 00602000
* REGISTER OUTPUT: 00603000
* GPR 1,2,4,8 = SAME AS ABOVE (EXIT TO +8 'CCWTIC1') 00604000
* GPR 3 = SAME AS ABOVE EXIT EXCEPT BYTE 0 MAY BE ALTERED 00605000
* GPR 14,15 = UNPREDICTABLE 00606000
* 00607000
* +16 'CCWTIC' (VIRTUAL CCW HAS A BYTE COUNT OF ZERO) 00608000
* REGISTER OUTPUT: 00609000
* GPR 1,2,3,8 = SAME AS ABOVE (EXIT TO +12 'ADDRINVL') 00610000
* GPR 4 = VIRTUAL CCW BYTE COUNT MINUS ONE 00611000
* GPR 14,15 = UNPREDICTABLE 00612000
* 00613000
* +20 'NGCCW' (PAGE WITH VIRTUAL CCW IS NOT RESIDENT OR SHARED) 00614000
* REGISTER OUTPUT: 00615000
* GPR 1 = SAME AS GPR 9 00616000
* GPR 2,8 = UNPREDICTABLE 00617000
* 00618000
* EXIT TO A CCW COMMAND TRANSLATION ROUTINE: (NORMAL COMPLETION) 00619000
* REGISTER OUTPUT: SAME AS EXIT TO +16 'CCWTIC' 00620000
* 00621000
* NOTE: EXIT = GPR 12 + HALFWORD OFFSET (SEE "DECCW0" ABOVE) 00622000
* 00623000
*********************************************************************** 00624000
*. 00625000
EJECT 00626000
CCWNXT1 EQU * %V3M4038 00627000
SPACE 00628000
DS 0H EXECUTE CP ASSIST "DECCW1" %V3M4038 00629000
DMKCCW1 DC X'E60C',S(CCWDATA,CCWEXITS) ***%V3M4038 00630000
SPACE 00631000
LR R1,R9 NOW GET THE USER'S NEXT CCW: %V3M4038 00632000
NGCCW TRANBRNG DMKCCWB1,RETURN=BRING1 %V3M4038 00633000
BNZ CCWBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 00634000
BRING1 L R8,SAVER8 NOW RESTORE R8 = A(VDEVBLOK) %V3M4038 00635000
AL R8,VMDVSTRT ... %V3M4038 00636000
USING VDEVBLOK,R8 ... %V3M4038 00637000
LM R3,R4,0(R2) GET CCW COMMAND FROM USER'S PAGE %V3M4038 00638000
STM R3,R4,RCWCCW STORE IN REAL CCW CHAIN %V3M4038 00639000
MVI RCWCTL,00 CLEAR CP'S CONTROL BYTE %V3M4038 00640000
LA R1,0(,R3) ADDRESS BITS ONLY INTO R1 %V3M4038 00641000
LA R2,CCWGENRL SET R2 FOR "BCR" USE %V3M4038 00642000
TM PRVFLAG,CD "PREVIOUS" CCW HAVE CHAIN DATA ? %V3M4038 00643000
BZ NOTCD NO, DON'T WORRY ABOUT TIC %V4M0198 00644000
* IF PREVIOUS CCW WAS DATA-CHAINED, LOOK FOR TIC AS THIS COMMAND: 00645000
IC R14,RCWCOMND GET REAL OP-CODE %V4M0156 00646000
N R14,F15 ISOLATE LOW-ORDER 4 BITS %V4M0156 00647000
CL R14,F8 IS IT A 'TIC' = '08' ? %V4M0156 00648000
BNE CHOOSEOP IF NOT, USE OP CODE OF 00 %V4M0156 00649000
MVI RCWCOMND,CDTIC IF YES, SIGNAL TIC AFTER CD %V4M0156 00650000
B CCWTIC1 JOIN NORMAL TIC-PROCESSING LOGIC %V4M0156 00651000
NOTCD DS 0H %V4M0198 00652000
STCM R3,8,VIRCOMND IF NOT, REMEMBER OPCODE. %V3M4038 00653000
CCWNXT2 STCM R4,8,VIRFLAG REMEMBER CCW+4 = FLAG BITS %V3M4038 00654000
NI VIRFLAG,CC+CD VIRFLAG=CC/CD BITS OF REAL FLAG %V3M4038 00655000
LRA R14,0(,R1) IS ADDR. IN CCW WITHIN USER CORE %V3M4038 00656000
BC 8+2,CCWNXT3 IF SEGMENT VALID CONTINUE %V408246 00657000
ADDRINVL DS 0H @V4M0156 00658000
CALL DMKPTRAN,PARM=DEFER LET PTR HANDLE SEGMENT @V408246 00659000
* INVALID 00660000
BC 2,ADDRCHEK @V408246 00661000
CCWNXT3 DS 0H %V408246 00662000
LA R2,CCWGENRL RESET R2 FOR BCR USE %V408246 00663000
IC R14,VIRCOMND OK. GET OP CODE IN R14 (RIGHT END%V408246 00664000
N R14,F15 ISOLATE LOW-ORDER 4 BITS %V3M4038 00665000
ALR R14,R14 DOUBLE IT (0, 2, ... , 30) %V3M4038 00666000
L R15,DEVTABLE ADDRESS OF DEVICE TABLE %V3M4038 00667000
LH R15,0(R14,R15) GET DISP. OF OP-CODE PROCESSING %V3M4038 00668000
N R4,XRIGHT16 ISOLATE BYTE-COUNT IN R4; SET CC %V3M4038 00669000
BCTR R4,0 BYTE-COUNT -1 INTO R4; CC INTACT %V3M4038 00670000
BNZ 0(R12,R15) IF IT WAS >0, GO TO INDEXED CODE %V3M4038 00671000
* 00672000
* NOTE: UPON ARRIVAL AT INDEXED CODE, ENTRY CONDITIONS ARE AS FOLLOWS: 00673000
* R1 HOLDS UNTRANSLATED VIRTUAL ADDRESS (HIGH BYTE STRIPPED OFF) 00674000
* R2 = A(CCWGENRL) FOR "BCR" USE 00675000
* R3 HOLD CCW COMMAND-CODE & UNTRANSLATED VIRTUAL ADDRESS 00676000
* R4 HOLDS BYTE COUNT LESS 1 (0 OR POSITIVE) 00677000
* R8 = A(VDEVBLOK) 00678000
* 8-BYTE VIRTUAL CCW IS IN "RCWCCW" (R6) 00679000
* TRUE CCW COMMAND CODE IS IN "RCWCOMND" 00680000
* CCW COMMAND CODE TO BE ANALYZED IS IN "VIRCOMND" 00681000
* OTHER REGISTERS (R6-R8 ETC. HAVE USUAL VALUE) 00682000
* 00683000
* IF DROPPED THRU THE ABOVE "BNZ", THE BYTE-COUNT WAS ZERO; 00684000
* IN THIS CASE, THE COMMAND SHOULD BE A "TIC" (ERROR OTHERWISE): 00685000
CL R14,F16 IF A TIC, R14 = 16 (08 X 2) %V3M4038 00686000
BNE CCWBAD CMD INVALID DUE TO ZERO COUNT %V3M4038 00687000
EJECT 00688000
* PROCESS "TIC" COMMANDS AS MUCH AS POSSIBLE WHEN THEY ARE ENCOUNTERED: 00689000
DROP R8 A(VDEVBLOK) NOT NEEDED BY TIC HANDLING 00690000
CCWTIC MVI RCWCOMND,X'08' MAKE REAL COMMAND CODE = USUAL VALUE 00691000
MVI VIRFLAG,00 CLEAR VIRTUAL FLAG 00692000
CCWTIC1 SLR R0,R0 SET UP 2ND WORD OF TIC (UNUSED HALF) 00693000
ICM R0,8,PRVCOMND WITH THE "PREVIOUS COMMAND" OP-CODE FIRST 00694000
ST R0,RCWFLAG (NEEDED IN CASE OF CHAIN-DATA TO TIC) 00695000
L R10,THISRCW ACCESS THIS RCWTASK, 00696000
USING RCWTASK,R10 ... 00697000
LRA R14,0(,R1) IS ADDR. WITHIN USER'S CORE @V304635 00698000
BC 8+2,CCWTIC1B IF SEGMENT VALID CONTINUE @V408246 00699000
CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 00700000
BC 2,CCWBAD @V408246 00701000
CCWTIC1B DS 0H @V408246 00702000
TM RCWADDR+3,07 IS THE ADDR. DBL-WORD ALIGNED ? @V1D0632 00703000
BNZ CCWCHKPV NO - PURPOSELY LEAVE "AS IS" @V1D0632 00704000
* (FOR EXAMPLE "TIC 002" FOR TCAM), AND 00705000
* CHECK WHETHER TO CONTINUE THIS STRING 00706000
CL R1,RCWVCAW CHECK ADDRESS AGAINST THE FIRST VIRT. CCW 00707000
BL CCWTIC8 IF LESS, IT'S DEFINITELY OUTSIDE OUR RANGE 00708000
CLR R1,R9 IF NOT, SEE IF IT'S BELOW WHERE WE ARE NOW 00709000
BNL CCWTIC6 TRF IF NOT, IT'S HIGHER INSTEAD @VA06269 00710000
TM MEMO2,HADRCGEN HAVE WE HAD ANY CP-GENERATED CCWS ? 00711000
BZ CCWTIC2 IF NOT, RELOCATING THE ADDRESS IS TRIVIAL 00712000
LR R15,R9 COMPUTE HOW MANY BYTES BACK IT WAS 00713000
SR R15,R1 ... 00714000
CL R15,F8 EXACTLY 8 (TIC *-8) ? 00715000
BNE CCWTIC1A IF NOT WE MUST USE THE SUBROUTINE 00716000
TM PRVFLAG,SMCOM PREVIOUS COMMAND STATUS MODIFIER TYPE ? 00717000
BO CCWTIC2 IF YES TO BOTH OF ABOVE RELOCATE DIRECTLY 00718000
CCWTIC1A BAL R14,TICSUBI RESOLVE ADDRESS IN TIC @VA04000 00719000
LR R1,R3 PUT REAL ADDR IN R1 @VA04842 00720000
B CCWTIC4 AND GO SET RELOCATABLE FLAG-BIT. 00721000
CCWTIC2 SR R1,R9 MAKE R1 "RELATIVE" (A NEGATIVE NUMBER) 00722000
TM MEMO2,HADAPOLL HAVE WE HAD AN AUTOPOLL CCW ? 00723000
BO CCWTIC12 YES -SPECIAL CHECK IS NEEDED @VA04000 00724000
CCWTIC3 AR R1,R6 ADD REAL ADDRESS OF WHERE WE ARE NOW 00725000
CCWTIC4 CLI RCWCOMND,CDTIC DATA CHAIN THRU A TIC? @VA04842 00726000
BNE CCWTIC4B NO...GO STORE TIC-TO ADDR @VA04842 00727000
CLC 0(1,R1),PRVCOMND IF CD ON, DO OP-CODES MATCH? @VA04842 00728000
BE CCWTIC4B OK IF YES. @VA04842 00729000
CLI 0(R1),X'00' IF NOT, TIC-TO OP-CODE = X'00'? @VA04842 00730000
BNE CCWTIC8A NO...MUST MAKE ANOTHER PASS @VA04842 00731000
LA R14,RCWHSIZ(,R10) POINT TO 1ST CCW IN TASK @VA04842 00732000
LR R15,R1 REFERENCE TIC-TO ADDRESS @VA04842 00733000
CCWTIC4A S R15,F8 BACK OFF 8 ON TIC-TO ADDRESS @VA04842 00734000
CR R15,R14 DON'T RUN OFF FRONT OF TASK @VA04842 00735000
BL CCWTIC8A IF WE DO, MAKE ANOTHER PASS @VA04842 00736000
CLI 0(R15),X'00' IS OP-CODE STILL = X'00'? @VA04842 00737000
BE CCWTIC4A YES...KEEP BACKING UP @VA04842 00738000
CLC 0(1,R15),PRVCOMND NO...DO OP-CODES MATCH? @VA04842 00739000
BNE CCWTIC8A NO...MUST MAKE ANOTHER PASS @VA04842 00740000
CCWTIC4B EQU * CHAIN-DATA OFF, OR OP-CODES @VA04842 00741000
* MATCH: 00742000
STCM R1,7,RCWADDR+1 STORE INTERNALLY-RELOCATED ADDRESS 00743000
CCWTIC4C OI RCWCTL,RCWREL INDICATE ADDRESS IS RELOCATED @VA05538 00744000
B CCWCHKPV GO CHECK PREV CCW FOR STAT MOD OR TIC *+16 00745000
* 00746000
* HERE IF ADDRESS IN TIC > WHERE WE ARE NOW (R6): 00747000
CCWTIC6 TM PRVFLAG,SMCOM WAS PREVIOUS COMMAND STATUS-MODIFIER TYPE? 00748000
BZ CCWTIC8 IF NOT, DON'T TRY TO RELOCATE IT. 00749000
SLR R1,R9 IF IT WAS, GET RELATIVE DISPLACEMENT 00750000
CL R1,F16 IS IT MORE THAN 16 ? 00751000
BH CCWTIC7 IF YES, DON'T TRY TO RELOCATE IT NOW. 00752000
LA R14,16(R6,R1) IF 16 OR LESS, LOOK BEYOND FUTURE COMMAND 00753000
CLR R14,R7 DOES THAT RUN INTO OUR CONTROL AREA ? 00754000
BH CCWTIC7 IF YES, HANDLE IT AS UNPROCESSED. 00755000
CL R1,F8 IS IT JUST 8 BYTES AHEAD ? 00756000
BNH CCWTIC6A YES...WE'RE OK...CONTINUE @VA04842 00757000
OI VIRFLAG,FWDTIC IF = 16 (> 8), REMEMBER FORWARD TIC 00758000
CCWTIC6A AR R1,R6 ADD REAL ADDR OF WHERE WE ARE NOW@VA04842 00759000
B CCWTIC4B AND GO STORE IT IN THE CCW @VA04842 00760000
* 00761000
CCWTIC7 ALR R1,R9 RESTORE R1 WHERE WE SUBTRACTED R9 BEFORE 00762000
* 00763000
CCWTIC8 BAL R14,TICSUBX RESOLVE TIC ADDRESS @VA04000 00764000
BZ CCWTIC8A CC ZERO - COULDN'T RESOLVE IT. @V1D0632 00765000
STCM R3,7,RCWADDR+1 OK, STORE REAL ADDRESS (IN R3) @V1D0632 00766000
* IN THE TIC 00767000
B CCWCHKPV AND CHECK WHETHER TO CONTINUE @V1D0632 00768000
* THIS STRING 00769000
SPACE 00770000
* IF ALL OF THE ABOVE IS TO NO AVAIL, FLAG AS AN UNPROCESSED TIC: 00771000
CCWTIC8A OI MEMO1,HADUTIC SIGNAL: AT LEAST ONE @V1D0632 00772000
* UNPROCESSED TIC 00773000
LH R15,CNTUNTIC BUMP COUNT OF HOW MANY WE'VE HAD 00774000
AL R15,F1 ... 00775000
STH R15,CNTUNTIC ... 00776000
LR R14,R6 GET DISPLACEMENT OF THIS TIC FROM 00777000
SR R14,R10 BEGINNING OF THIS RCWTASK 00778000
TM MEMO2,HADUTIC HAVE WE ALREADY HAD ONE ON THIS RCWTASK ? 00779000
BO CCWTIC9 IF YES, ADD TO END OF EXISTING CHAIN. 00780000
STH R14,RCWHEAD IF NOT, STORE DISPLACEMENT OF 1ST ONE 00781000
OI MEMO2,HADUTIC SIGNAL WE'VE HAD ONE NOW, 00782000
B CCWTIC10 AND CONTINUE BELOW. 00783000
* 00784000
CCWTIC9 LH R15,UNTICLST GET DISPLACEMENT OF LAST UNPROCESSED TIC 00785000
STH R14,6(R10,R15) STORE OUR DISPLACEMENT IN HIS COUNT FIELD 00786000
* 00787000
CCWTIC10 STH R14,UNTICLST STORE NEW DISPLACEMENT OF UNPROCESSED TIC 00788000
TM PRVFLAG,SMCOM+FWDTIC PREV CMD STAT MODIFIER OR FWD TIC ? 00789000
BNZ CCWNEXT IF YES (EITHER), GO GET NEXT COMMAND. 00790000
OI MEMO2,STRTNEW IF NOT, SIGNAL "START NEW CCW CHAIN" 00791000
LA R15,8(,R9) POINT TO END OF LAST VIRTUAL CCW 00792000
L R9,RCWADDR AND LET R9 BE POINTER TO NEXT CCWS 00793000
B CCWNXT15 AND GO TERMINATE THIS RCWTASK. 00794000
SPACE 1 00795000
SPACE 00796000
CHOOSEOP LA R14,PRVCOMND POINT AT PREVIOUS CCW %V3M4038 00797000
L R15,THISRCW POINT AT FIRST CCW... %V3M4038 00798000
LA R15,RCWHSIZ(,R15) ...IN THIS RCWTASK %V3M4038 00799000
CR R6,R15 IS THAT WHERE WE ARE? %V3M4038 00800000
BE CHOOSE2 IF YES...USE PREVIOUS OP-CODE. %V3M4038 00801000
LA R14,ZEROES IF NOT, USE OP-CODE OF X'00' %V3M4038 00802000
CHOOSE2 ICM R3,8,0(R14) PICK UP PREVIOUS OP-CODE OR X'00'%V3M4038 00803000
STCM R3,8,RCWCOMND STORE IT IN REAL OP-CODE %V3M4038 00804000
B CCWNXT2 AND HANDLE AS ALWAYS %V3M4038 00805000
DROP R10 (THRU WITH RCWTASK HERE) 00806000
EJECT 00807000
DASDWRIT DS 0F HANDLE "WRITE" TYPE CCW FOR NON-DED DASD: 00808000
LA R14,CLASSOK RETURN ADDR INTO R14 00809000
CLI VIRCOMND,X'73' IS CCW A DIAG WRITE? 00810000
BE CLASSCHK YES-- 00811000
CLI VIRCOMND,X'53' IS CCW A DIAG LOAD? 00812000
BE CLASSCHK YES-- 00813000
CLASSOK EQU * 00814000
USING VDEVBLOK,R8 (MUST BE IN EFFECT AT THIS POINT) 00815000
TM VDEVFLAG,VDEVRDO IS THE DASD DEVICE "READ ONLY" ? 00816000
BO REJECT1 @VA14597 00817100
DROP R8 00818000
EJECT 00819000
*. 00820000
*********************************************************************** 00821000
* 00822000
* 00823000
* CP ASSIST INSTRUCTION "CCWGENRL" - COMMON CCW PROCESSING 00824000
* 00825000
* 00826000
* OPERANDS: 00827000
* 1 = ADDRESS OF 'GENDATA' (DATA LIST) 00828000
* 2 = ADDRESS OF 'GENEXITS' (EXIT LIST) 00829000
* 00830000
* REGISTER INPUT: 00831000
* GPR 1 = VIRTUAL ADDRESS OF THE DATA AREA 00832000
* GPR 4 = BYTE COUNT MINUS ONE 00833000
* GPR 6 = ADDRESS OF THE REAL CCW 00834000
* GPR 9 = ADDRESS OF THE VIRTUAL CCW 00835000
* GPR 11 = ADDRESS OF THE VMBLOK 00836000
* GPR 13 = ADDRESS OF THE SAVEAREA 00837000
* 00838000
* SYSTEM DATA AREAS REFERENCED: 00839000
* IOBLOK, RCWTASK, SAVEAREA, VDEVBLOK, VMBLOK 00840000
* 00841000
* 00842000
* EXITS TO SPECIFIED OPERAND 2 LIST ADDRESSES: 00843000
* 00844000
* +0 'FWDIDAL' (CCW HAS IDA FLAG SET) 00845000
* REGISTER OUTPUT: NONE CHANGED BY THIS INSTRUCTION 00846000
* 00847000
* +4 'CCWMANYF' (CCW'S DATA AREA CROSSES A PAGE BOUNDARY) 00848000
* REGISTER OUTPUT: NONE CHANGED BY THIS INSTRUCTION 00849000
* 00850000
* +8 'CCWNXT9A' (VIRTUAL DATA ADDRESS CANNOT BE TRANSLATED) 00851000
* REGISTER OUTPUT: NONE CHANGED BY THIS INSTRUCTION 00852000
* 00853000
* +12 'SHRDPAGE' (CCW'S DATA ADDRESS POINTS TO SHARED PAGE) 00854000
* REGISTER OUTPUT: 00855000
* GPR 2 = REAL ADDRESS OF THE DATA AREA 00856000
* 00857000
* +16 'CCWNXT10' (VIRTUAL DEVICE HAS SENSE BYTES PRESENT) 00858000
* REGISTER OUTPUT: 00859000
* GPR 2 = REAL ADDRESS OF THE DATA AREA 00860000
* GPR 8 = ADDRESS OF THE VDEVBLOK 00861000
* 00862000
* +20 'CCWNEXT' (NOT AT END OF CCW'S YET, GO TRANSLATE NEXT) 00863000
* REGISTER OUTPUT: SAME AS THAT OF +16 'CCWNXT10' 00864000
* 00865000
* +24 'CCWNEWV2' (SUPPOSED TO START A NEW RCWTASK) 00866000
* REGISTER OUTPUT: 00867000
* GPR 2 = REAL ADDRESS OF THE DATA AREA 00868000
* GPR 8 = ADDRESS OF THE VDEVBLOK 00869000
* GPR 10 = ADDRESS OF THE CURRENT RCWTASK 00870000
* GPR 14-15 = UNPREDICTABLE 00871000
* 00872000
* +28 'TICSCAN' (A TIC CCW HAS NOT BEEN PROCESSED) 00873000
* REGISTER OUTPUT: SAME AS THAT OF +24 'CCWNEWV2' 00874000
* 00875000
* +32 'CCWDIAL' ('DEVTABLE' EQUALS THE ADDRESS OF 'DIALTBL') 00876000
* REGISTER OUTPUT: 00877000
* GPR 2 = REAL ADDRESS OF THE DATA AREA 00878000
* GPR 8 = ADDRESS OF THE VDEVBLOK 00879000
* GPR 10 = ADDRESS OF THE IOBLOK 00880000
* GPR 14-15 = UNPREDICTABLE 00881000
* 00882000
* +36 'CALLISM' (AN ISAM READ HAS BEEN FOUND) 00883000
* REGISTER OUTPUT: SAME AS THAT OF +32 'CCWDIAL' 00884000
* 00885000
* +40 'CCWEXIT' (MUST EXIT WITHOUT USING CP ASSIST "RETURN") 00886000
* REGISTER OUTPUT: 00887000
* GPR 0-11, 14-15 = UNPREDICTABLE 00888000
* 00889000
* +44 'CCWNXT12' (VIRTUAL MACHINE USING SHARED SEGMENTS) 00890000
* REGISTER OUTPUT: SAME AS THAT OF +16 'CCWNXT10' 00891000
* 00892000
* +48 'ITSAREL' (DASD WITH RESERVE/RELEASE) 00893000
* REGISTER OUTPUT: SAME AS THAT OF +32 'CCWDIAL' 00894000
* 00895000
* 00896000
* EXIT TO CALLER: (FULL COMPLETION EXIT VIA CP ASSIST "RETURN") 00897000
* REGISTER OUTPUT: 00898000
* GPR 0-11 = VALUES FROM THE SAVEAREA 00899000
* GPR 14-15 = UNPREDICTABLE 00900000
* 00901000
*********************************************************************** 00902000
*. 00903000
SPACE 00904000
CCWGENRL EQU * HANDLE GENERAL CASE FORWARD- @V3M4038 00905000
* DIRECTION DATA-TRANSMITTING CCW: 00906000
SPACE 00907000
DS 0H EXECUTE CP ASSIST "CCWGENRL" @V3M4038 00908000
DMKCCWGN DC X'E60F',S(GENDATA,GENEXITS) ***@V3M4038 00909000
SPACE 00910000
TM RCWFLAG,IDA IS USER'S IDA FLAG-BIT SET ? %V3M4038 00911000
BO FWDIDAL IF YES, GO HANDLE. %V3M4038 00912000
L R0,XPAGNUM SET TO ISOLATE PAGE NUMBER %V3M4038 00913000
LA R2,0(R1,R4) ADDRESS OF LAST BYTE OF DATA %V3M4038 00914000
NR R2,R0 ENDING PAGE NUMBER IN R2 %V3M4038 00915000
NR R0,R1 STARTING PAGE NUMBER IN R0 %V3M4038 00916000
CLR R0,R2 START AND END IN SAME PAGE ? %V3M4038 00917000
BNE CCWMANYF HANDLE VIA IDAL LOGIC IF NOT %V3M4038 00918000
CCWNXT9 TRANS 2,1,LCTL=NO GET THE REAL PAGE ADDRESS %V3M4038 00919000
BNZ CCWNXT9A MUST BRING PAGE INTO STORAGE %V3M4038 00920000
CALL DMKPTRLK LOCK THE PAGE FRAME %V3M4038 00921000
B CCWNXT9B PAGE LOCKED - CONTINUE... %V3M4038 00922000
CCWNXT9A CALL DMKPTRAN,PARM=BRING+DEFER+LOCK GO GET THE PAGE %V3M4038 00923000
CCWNXT9B EQU * %V3M4038 00924000
BNZ CCWBAD4 ERROR IF INVALID VIRTUAL ADDR. %V3M4038 00925000
STCM R2,7,RCWADDR+1 STORE THE REAL ADDR. IN CCW %V3M4038 00926000
OI RCWCTL,RCWIO INDICATE DATA PAGE TO BE UNLOCKED%V3M4038 00927000
BAL R14,CCWCHKSH CHECK IF THIS A SHARED PAGE %V3M4038 00928000
BZ CCWNXT11 IF NOT - PROCEED NORMALLY %V3M4038 00929000
SHRDPAGE BAL R14,CKSHRCHG WAS SHARED PAGE CHANGED ? @V386198 00930000
BZ CCWNXT9C NO, SEE IF COPY NEEDED @VA05378 00931000
CALL DMKPTRUL UNLOCK THE PAGE @VA05378 00932000
B CCWNXT9 REISSUE TRANS @VA05378 00933000
CCWNXT9C TM VIRCOMND,X'01' WRITE TYPE COMMAND ? @VA05378 00934000
BZ CCWNXT11 IF NOT - THEN DON'T COPY DATA @V304735 00935000
ST R7,SAVEWRK9 SAVE REG. OVER CALL @V304735 00936000
LA R15,1 GET INCREMENT OF 1 @V407508 00937000
AL R15,SHRLKCNT ADD ONE TO CPSHRLK COUNT @V407508 00938000
ST R15,SHRLKCNT STORE UPDATED COUNT @V407508 00939000
OI CPSTAT2,CPSHRLK LOCK SYSTEM TILL WE GET PAGE @V304735 00940000
CALL DMKPTRFR,AFFINITY GET A NEW PAGE @VA10216 00941500
L R15,SHRLKCNT GET CURRENT CPSHRLK COUNT @V407508 00942000
BCTR R15,0 DECREMENT COUNT BY 1 @V407508 00943000
ST R15,SHRLKCNT STORE UPDATED COUNT @V407508 00944000
LTR R15,R15 TEST IF THE COUNT IS NOW 0 @V407508 00945000
BNZ *+8 NO, SKIP RESET OF CPSHRLK @V407508 00946000
NI CPSTAT2,X'FF'-CPSHRLK UNLOCK SYSTEM @V304735 00947000
MVI CORFLAG-CORTABLE(R7),CORFLUSH @V408246 00948000
NI RCWCTL,X'FF'-RCWIO FLAG NOT LOCKED @V304735 00949000
OI RCWCTL,RCWSHR PAGE GOTTTEN FROM DMKPTRFR @V304735 00950000
LR R14,R7 TRANSFER ADDRESS OF CORTABLE @V304735 00951000
L R7,SAVEWRK9 RESTORE USED REGISTER @V304735 00952000
ST R3,TEMPR3 SAVE REG. @V304735 00953000
SL R14,ACORETBL LEAVE INDEX PORTION OF CORTABLE @V304735 00954000
SLL R14,8 R14 = NOW REAL PAGE ADDRESS @V304735 00955000
LH R3,RCWCNT GET USER'S CCW BYTE COUNT @V304735 00956000
LR R15,R2 GET ORIGINAL REAL ADDRESS @V304735 00957000
N R15,F4095 LEAVE THE DISPLACEMENT ONLY @V304735 00958000
OR R14,R15 'OR' DISP. TO REAL TARGET ADDR. @V304735 00959000
LR R15,R3 SET UP LENGTH OF MOVE @V304735 00960000
ST R2,TEMPR2 SAVE ORIGINAL PAGE ADDRESS @V304735 00961000
ST R14,TEMPR14 SAVE ADDRESS OF REPLACEMENT PAGE @V304735 00962000
MVCL R14,R2 MOVE ORIGINAL TO NEW @V304735 00963000
L R14,TEMPR14 RESTORE REPLACEMENT PAGE ADDRESS @V304735 00964000
L R2,TEMPR2 RESTORE ORIGINAL PAGE ADDRESS @V304735 00965000
L R3,TEMPR3 RESTORE REG. @V304735 00966000
LR R15,R2 GET ORIGINAL PAGE ADDRESS @V304735 00967000
N R15,XPAGNUM CLEAR DISPLACEMENT @V304735 00968000
SRL R15,8 INDEX INTO CORETBL @V304735 00969000
AL R15,ACORETBL FIND ACTUAL CORETBL ENTRY @V304735 00970000
L R15,CORSWPNT-CORTABLE(,R15) POINTER TO SWAP @V304735 00971000
L R15,SWPFLAG-SWPFLAG(,R15) GET KEYS. @V304735 00972000
N R15,=A(X'F8F8') CLEAR CHANGE/REFERENCE BITS @V304735 00973000
N R14,XPAGNUM CLEAR DISPLACEMENT @V304735 00974000
LA R14,2048(,R14) LAST HALF OF NEW PAGE @V304735 00975000
SSK R15,R14 SET UP THE KEY @V304735 00976000
SRL R15,8 POSITION FOR FIRST HALF PAGE @V304735 00977000
N R14,XPAGNUM BACK TO BEGINING ADDRESS @V304735 00978000
SSK R15,R14 SET THE REAL KEY @V304735 00979000
LR R10,R14 SAVE REAL PAGE ADDRESS @V304735 00980000
CALL DMKPTRUL UNLOCK THE ORIGINAL PAGE @V304735 00981000
N R2,F4095 LEAVE ONLY THE DISPLACEMENT @V304735 00982000
OR R2,R10 PUT IT IN REPLACEMENT PAGE @V304735 00983000
STCM R2,7,RCWADDR+1 SAVE THE NEW ADDRESS @V304735 00984000
L R15,VMACNT1 GET STAT. COUNTER @V304735 00985000
LA R15,1(,R15) ADD ONE TO IT @V304735 00986000
ST R15,VMACNT1 SAVE NEW TOTAL @V304735 00987000
* 00988000
CCWNXT11 DS 0H CHECK FOR COMPLETION %V3M4038 00989000
TM RCWCTL,RCWSHR ANY PAGES TAKEN FROM DMKPTRFR %V3M4038 00990000
BZ CCWNXT10 NO - CONTINUE %V3M4038 00991000
NI RCWCTL,X'FF'-RCWIO IF YES - THEN CANT BE LOCKED.%V3M4038 00992000
CCWNXT10 DS 0H %V3M4038 00993000
BAL R10,CLRSENSE CLEAR ANY SENSE BYTES PRESENT %V3M4038 00994000
CCWNXT12 EQU * CHECK FOR SHARED SEGMENT SYSTEMS %V3M4038 00995000
BAL R10,CCSHRSEG PERFORM PROTECTION CHECKING %V3M4038 00996000
CCWNXT14 EQU * NOW TEST FOR END OF CCW STRING: %V3M4038 00997000
TM VIRFLAG,CC+CD CMD- OR DATA-CHAINED ? %V3M4038 00998000
BNZ CCWNEXT IF YES, GO GET NEXT COMMAND. %V3M4038 00999000
CCWCHKPV TM PRVFLAG,SMCOM+FWDTIC PREV CMD STAT MOD./FWD TIC %V3M4038 01000000
BNZ CCWNEXT IF YES (EITHER), CONTINUE %V3M4038 01001000
SPACE 01002000
CCWNXT13 L R10,THISRCW STRING FINISHED; ACCESS RCWTASK %V3M4038 01003000
USING RCWTASK,R10 ... %V3M4038 01004000
LA R15,8(,R9) POINT TO END OF LAST VIRTUAL CCW %V3M4038 01005000
CCWNXT15 SL R15,RCWVCAW LESS THE BEGINNING, %V3M4038 01006000
SRL R15,3 DIVIDED BY 8 GIVES US %V3M4038 01007000
STH R15,RCWVCNT THE COUNT OF VIRTUAL CCWS. %V3M4038 01008000
LA R14,RCWHSIZ(,R10) POINT TO START OF REAL CCWS %V3M4038 01009000
LA R15,8(,R6) POINT TO END OF LAST REAL CCW %V3M4038 01010000
SLR R15,R14 LESS THE BEGINNING %V3M4038 01011000
SRL R15,3 DIVIDED BY 8 GIVES US %V3M4038 01012000
STH R15,RCWRCNT THE COUNT OF REAL CCWS %V3M4038 01013000
CCWNXT16 TM MEMO2,STRTNEW SUPPOSED TO START A NEW ONE NOW? %V3M4038 01014000
BO CCWNEWV2 IF YES, GO TO IT FORTHWITH. %V3M4038 01015000
TM MEMO1,HADUTIC ELSE CHECK FOR UNPROCESSED TICS %V3M4038 01016000
BO TICSCAN HAD ONE - TRANSFER TO TIC SCAN %V3M4038 01017000
CCWNXT18 L R10,SAVER10 TRANSLATION AND TICSCAN FINISHED %V3M4038 01018000
USING IOBLOK,R10 REFERENCE IOBLOK AGAIN, %V3M4038 01019000
L R15,FIRSTRCW FILL IN REAL CAW ADDRESS, %V3M4038 01020000
LA R15,RCWHSIZ(,R15) ... %V3M4038 01021000
STCM R15,7,IOBCAW+1 ... %V3M4038 01022000
L R8,SAVER8 DEVELOP VDEVBLOK ADDRESS %V3M4038 01023000
AL R8,VMDVSTRT ... %V3M4038 01024000
CLC DEVTABLE,=A(DIALTBL) PROCESSING A DIALED LINE ? %V3M4038 01025000
BE CCWDIAL IF DIAL - TAKE THE BRANCH %V3M4038 01026000
USING VDEVBLOK,R8 REFERENCE VDEVBLOK; %V3M4038 01027000
CLI VDEVTYPC,CLASGRAF GRAF DEVICE ? %V3M4038 01028000
BNE CCWNXT19 NO, CONTINUE %V3M4038 01029000
TM VDEVTYPE,TYP3277+TYP3278 3270 DEVICE @V60A6B6 01030000
BZ CCWEXIT NO, GO EXIT @V60A6B6 01031000
TM VDEVSTAT,VDEVDED IS IT DEDICATED ? %V3M4038 01032000
BZ CCWDIAL NO - I/O TO NON-DIALED 3270 %V3M4038 01033000
CCWNXT19 EQU * CONTINUE: %V3M4038 01034000
CLI VDEVTYPC,CLASDASD IS THIS A DASD DEVICE? %V407438 01035000
BNE CCWEXIT NOPE, DONE. BR. %V407438 01036000
TM VDEVFLG2,VDEVRRF MDSK WITH RES/REL FEATURE %V407438 01037000
BZ CCWNXT28 NOPE, GO CHECK ON ISAM %V407438 01038000
ITSAREL DS 0H @V4M0156 01039000
L R2,VDEVRRB GET ADDRESS OF VRRBLOK @V407438 01040000
USING VRRBLOK,R2 ADDRESS THE VRRBLOK @V407438 01041000
TM MEMO3,XFERSENS WAS SENSE DATA XFERED TO VIRT STG@V407438 01042000
BZ CCWNXT22 NOPE, GO SEE IF DEVICE IS FREE @V407438 01043000
CCWRST2 TM VDEVFLG2,VDEVRES MDISK RESERVED FOR THIS USER @V407438 01044000
BO CCWNXT28 YES, THIS GUY OWNES IT, CONTINUE @V407438 01045000
TM VRRSTAT,VRRRES IS THE MDISK RESERVED BY ANYONE? @V407438 01046000
BO CCWDEFER YES, DEFER PROCESSING @VA08631 01047100
LA R15,CCWDEFER RETURN TO THIS ADDR IF ANOTHER @VA08631 01047200
* USER HAS SENSE BYTES OUTSTANDING 01047300
* FOR THIS MINIDISK 01047400
B CCWNXT26 CONTINUE @VA08631 01047500
CCWDEFER DS 0H @VA08631 01048100
LA R0,CPEXSIZE SIZE OF CPEXBLOC 01048200
CALL DMKFREE GET THE STORAGE PLEASE @V407438 01049000
USING CPEXBLOK,R1 ADDRESS THE DSECT PLEASE @V407438 01050000
STM R0,R15,CPEXR0 SAVE THE CURRENT REGS @V407438 01051000
LR R3,R1 USE R3 FOR THE CPEXBLOK @V407438 01052000
DROP R1 NO MORE CPEXBLOK FROM R1 @V407438 01053000
USING CPEXBLOK,R3 USE R3 INSTEAD FOR THE CPEXBLOK @V407438 01054000
CALL DMKSCNVD GET DEVICE ADDRESS IN CCU FORM @V407438 01055000
ST R1,CPEXMISC SAVE THAT IN MISC FOR DMKCFPRD @V407438 01056000
LA R0,CCWRSTRT RESTART ADDRESS PLEASE @V407438 01057000
ST R0,CPEXADD THATS WHERE TO RETURN @V407438 01058000
L R0,VRRCPEX GET THE CHAIN OF WAITING TASKS @V407438 01059000
ST R0,CPEXFPNT PUT THIS ONE ON THE CHAIN @V407438 01060000
ST R3,VRRCPEX DITTO @V407438 01061000
OI VDEVFLG2,VDEVCPEX FLAG WAITING FOR "RELEASE" @V407438 01062000
OI VMRSTAT,VMIDLE DROP USER FROM QUEUE DURING WAIT @V407438 01063000
GOTO DMKDSPCH AND WAIT FOR A "RELEASE" @V407438 01064000
* DROP FROM QUEUE, LEAVE IN EXECUTION WAIT 01065000
* IF DEVICE IS RESET, CPEXADD IS SET NEGATIVE, LTR'ED BY DMKDSP 01066000
CCWRSTRT BM CCWNXT24 DEVICE RESET, BR. @V407438 01067000
NI VMRSTAT,X'FF'-VMIDLE REMOVE FROM WAIT @V407438 01068000
NI VDEVFLG2,X'FF'-VDEVCPEX CFPRR - NOT WTNG ON CPEX@V407438 01069000
B CCWRST2 AND TRY IT AGAIN @V407438 01070000
DROP R3 NO MORE CPEXBLOK @V407438 01071000
SPACE 01072000
CCWNXT22 TM VDEVFLG2,VDEVRES USER HAVE MDISK RESERVED NOW @V407438 01073000
BO CCWNXT28 YES, CONTINUE @V407438 01074000
TM VRRSTAT,VRRRES DOES ANYONE ELSE HAVE IT RESERVED@V407438 01075000
BO CCWNXT24 SOMEONE ELSE HAS IT RESERVED @VA08631 01076100
LA R15,CCWDEFER RETURN TO THIS ADDR IF ANOTHER @VA08631 01076200
* USER HAS SENSE BYTES OUTSTANDING 01076300
* FOR THIS MINIDISK 01076400
B CCWNXT26 CONTINUE @VA08631 01076500
CCWNXT24 OI IOBSPEC2,IOBCLN MARK IOB FOR CLEAN UP ONLY @V407438 01077000
CALL DMKUNTFR TOO BAD, UNDO THE CCW TRANSLATION@V407438 01078000
B CCWEXIT RETURN NOW, IOBCAW = 0 FROM UNTFR@V407438 01079000
SPACE 01080000
CCWNXT26 TM MEMO3,RESINCHA DOES CCW CHAIN HAVE A RESERVE? @VA08631 01081010
BZ CCWNXT28 NO, CONTINUE @VA08631 01081020
LR R1,R8 SAVE CURRENT VDEVBLOK ADDRESS @VA08631 01081030
CCWLINK DS 0H @VA08631 01081040
L R8,VDEVLINK GET VDEV FOR LINK TO SAME MINI @VA08631 01081050
CR R1,R8 ARE WE BACK TO WHERE WE STARTED? @VA08631 01081060
BE CCWNXT27 YES, LET USER RESERVE CONTINUE @VA08631 01081070
TM VDEVFLAG,VDEVUC UC/SENSE OUTSTANDING FOR @VA08631 01081080
* ANOTHER USER? 01081090
BZ CCWLINK NO, KEEP LOOKING @VA08631 01081100
LR R8,R1 RESTORE CURRENT VDEVBLOK @VA08631 01081110
BR R15 RETURN TO EITHER REFLECT BUSY OR @VA08631 01081120
* STACK CPEXBLOK UNTIL SENSE BYTES 01081130
* HAVE BEEN OFFLOADED 01081140
CCWNXT27 OI VDEVFLG2,VDEVRES FLAG VDEVBLOK RESERVED @VA08631 01081150
OI VRRSTAT,VRRRES ALSO, LET EVERYONE KNOW IT @V407438 01084000
ST R11,VRRUSER SAVE IN CASE OF RESET @V407438 01085000
CALL DMKSCNVD GET CCU FORM OF VIRT ADDR @V407438 01086000
STH R1,VRRADD SAVE FOR INFORMATIONAL USE ONLY @V407438 01087000
CCWNXT28 EQU * HERE WHEN DONE WITH MDISK CHECKS %V407438 01088000
AIF (NOT &ISAM).CCWEXIT %V3M4038 01089000
TM MEMO1,HADISAM DID WE HAVE ANY ISAM READS TODAY %V3M4038 01090000
BZ CCWEXIT NOPE - EXIT FORTHWITH. %V3M4038 01091000
TM VDEVSTAT,VDEVDED DEDICATED DASD DEVICE ? %V3M4038 01092000
BO CALLISM YES -- ISAM IS ALLOWED %V3M4038 01093000
ICM R15,8+4,VDEVRELN TEST FOR RELOCATION ZERO %V3M4038 01094000
BNZ CCWEXIT NOPE - ISAM IS NOT ALLOWED %V3M4038 01095000
CALLISM EQU * FIX UP ISAM CHANNEL PROGRAM @VM01021 01096000
CALL DMKISMTR YES, LET ISAM TRANSLATE PHASE DO IT. 01097000
.CCWEXIT ANOP 01098000
AIF (&ISAM).NOCPAIS @V386198 01099000
CALLISM EQU * A "CCWGENRL" ASSIST EXIT ADDR @V386198 01100000
.NOCPAIS ANOP @V386198 01101000
DROP R8,R10 (THRU WITH RCWTASK & VDEVBLOK) @V386198 01102000
CCWEXIT EXIT EXIT - CCW CHAIN(S) COMPLETED. %V3M4038 01103000
EJECT 01104000
* CHECK TO SEE IF USER IS OF PROPER CLASS TO ISSUE 01105000
* MICRO-CODE ALTERING INSTRUCTIONS TO THE 3830 01106000
CLASSCHK DS 0H 01107000
L R15,SAVER8 RESTORE R15 = A(VDEVBLOK) @VA04001 01108000
AL R15,VMDVSTRT ... @VA04001 01109000
USING VDEVBLOK,R15 @VA04001 01110000
CLI VDEVTYPC,CLASDASD DASD CLASS? 01111000
BNER R14 NOT APPLICABLE 01112000
TM VDEVTYPE,TYP3330+TYP3340+TYP3350+TYP3380 HRC011DK 01113490
DROP R15 01114000
BZR R14 NO--NORMAL PROCESSING 01115000
TM VMCLEVEL,VMCLASSF MUST BE CLASS F USER 01116000
BOR R14 NORMAL PROCESSING IF SO 01117000
B CCWFORCE OTHERWISE FORCE A CHANNEL CHECK 01118000
CCWNEWV2 EQU * SET UP ADDRESSABILITY @VA12408 01118200
L R12,=A(DMKCCW) BASE FOR PART ONE @VA12408 01118400
B CCWNEWVA-DMKCCW(R12) GO THERE @VA12408 01118600
SPACE 3 01119000
* CHECK WHETHER TO CLEAR ANY SENSE BYTES (I/O ERROR BLOCKS): 01120000
CLRSENSE L R8,SAVER8 RESTORE R8 = A (VDEVBLOK) %V3M4038 01121000
AL R8,VMDVSTRT ... %V3M4038 01122000
USING VDEVBLOK,R8 ... %V3M4038 01123000
TM VDEVFLAG,VDEVUC VIRTUAL SENSE BYTES PRESENT ? %V3M4038 01124000
BCR 8,R10 <BZ> NOPE - EXIT FORTHWITH. %V3M4038 01125000
* VIRTUAL DEVICE SENSE-BYTES PRESENT - CHECK WHETHER TO CLEAR THEM: 01126000
TM VIRFLAG,SVSEN SHOULD WE SAVE THE SENSE-BYTES ? 01127000
BCR 1,R10 <BO> IF YES, LEAVE THEM THERE (EXIT). 01128000
NI VDEVFLAG,255-VDEVUC OTHERWISE, RESET THE FLAG-BIT 01129000
LA R0,IOERSIZE SET R0 AND 01130000
L R1,VDEVIOER R1, AND 01131000
USING IOERBLOK,R1 01132000
AH R0,IOEREXT ADD EXTRA SIZE (IF ANY) TO DBL-WORD COUNT 01133000
DROP R1 01134000
CALL DMKFRET RETURN THE IO ERROR-BLOCK 01135000
SLR R0,R0 CLEAR THE 01136000
ST R0,VDEVIOER ADDRESS 01137000
TM VDEVFLG2,VDEVRRF VIRTUAL RESERVE/RELEASE FEAT? @VA08631 01138010
BZR R10 NO, RETURN @VA08631 01138020
L R15,VDEVRRB GET ADDR OF VRRBLOK @VA08631 01138030
USING VRRBLOK,R15 ESTABLISH ADDRESSABILITY @VA08631 01138040
TM VRRSTAT,VRRRES SOMEONE GOT THIS MDISK RESERVED? @VA08631 01138050
BOR R10 YES, RETURN @VA08631 01138060
NEXTCPEX L R1,VRRCPEX REQUESTS WAITING FOR SENSE DATA @VA08631 01138070
* TO BE OFFLOADED AS A 01138080
* RESULT OF A UNIT CHECK? 01138090
LTR R1,R1 ARE THERE ANY? @VA08631 01138100
BZR R10 NO, FORGET IT @VA08631 01138110
USING CPEXBLOK,R1 ESTABLISH ADDRESSABILITY @VA08631 01138120
L R0,CPEXFPNT UNCHAIN THIS CPEXBLOK @VA08631 01138130
ST R0,VRRCPEX ... @VA08631 01138140
CALL DMKSTKCP AND STACK FOR RESTART @VA08631 01138150
L R15,VDEVRRB RELOAD R15 @VA08631 01138160
B NEXTCPEX AND CONTINUE TO UNSTACK REST @VA08631 01138170
DROP R15,R1 @VA08631 01138180
SPACE 01139000
DROP R8 01140000
SPACE 01141000
* IF READ-TYPE CCW FOR SHARED SEGMENT, ADJUST CAW KEY 01142000
* (R10 = RETURN-REGISTER - TO "CCWNXT14") 01143000
CCSHRSEG TM VMOSTAT,VMSHR RUNNING WITH SHARED SEGMENTS ? %V3M4038 01144000
BCR 8,R10 <BZ> NOPE - RETURN TO CCWNXT14 %V3M4038 01145000
LTR R2,R2 DOES R2 HOLD A VALID REAL DATA-ADDRESS ? 01146000
BCR 4,R10 <BM> IF NOT, NO ADJUSTMENT, PLEASE. 01147000
TM VIRCOMND,X'01' WRITE-, CONTROL-, OR SEARCH- CCW @V202232 01148000
BO CHKFETCH YES, CHECK FOR FETCH PROTECT VIOL@V202232 01149000
TM RCWFLAG,SKIP IF A READ, IS THE SKIP FLAG SET? @V202232 01150000
BZ CHKCAWKY NO - MUST CHECK PROTECTION KEY. @V202232 01151000
BR R10 YES - NO ADJUSTMENT NECESSARY. @V202232 01152000
SPACE 01153000
CHKFETCH EQU * CHECK FOR FETCH-PROTECT VIOLATION@V202232 01154000
L R15,X2048BND GET MASK FOR BITS 8-20 @V202232 01155000
NR R15,R2 GET REAL ADDR OF STORAGE KEY BLK @V202232 01156000
ISK R15,R15 GET THE REAL STORAGE KEY @V202232 01157000
N R15,F8 ISOLATE AND CHECK THE FETCH-BIT @V202232 01158000
BCR 8,R10 <BZ> NOT SET = NO FETCH @V202232 01159000
* PROTECT WANTED 01160000
* SET - CONTINUE: 01161000
CHKCAWKY BAL R14,CCWCHKEY TEST FOR STORAGE PROTECTION VIOL @V202232 01162000
L R14,SAVER10 REFERENCE THE IOBLOK 01163000
USING IOBLOK,R14 ... 01164000
BZR R10 CC = 0 , STORAGE KEY OK @V304735 01165000
TM MEMO1,PROTCAW IS CAW ALREADY PROTECTED ? @V304735 01166000
BOR R10 YES - RETURN TO CALLER @V304735 01167000
OI MEMO1,PROTCAW IF NOT - PROTECT IT NOW @V304735 01168000
MVI IOBCAW,X'10' SET CAW KEY = 1 @V304735 01169000
CLM R15,1,IOBCAW SHARED PAGE KEY = 1 @V304735 01170000
BNER R10 NO - LEAVE (FORCE PROTECTION @V304735 01171000
* CHECK) 01172000
MVI IOBCAW,X'20' FORCE PROTECTION CHECK @V304735 01173000
BR R10 RETURN AT 'CCWNXT14' @V304735 01174000
DROP R14 @V304735 01175000
CKSHRCHG TM VMOSTAT,VMSHR USER RUNNING A SHARED SYSTEM ? @V304735 01176000
BZR R14 IF NOT - RETURN TO CALLER @V304735 01177000
LR R15,R2 REAL ADDRESS FOR 'ISK' @V304735 01178000
N R15,X2048BND CLEAN UP THE ADDRESS @V304735 01179000
ISK R15,R15 GET THE REAL STORAGE KEY @V304735 01180000
N R15,F2 WAS IT CHANGED ? @V304735 01181000
BNZ CALLVMA IF YES - RELEASE RUNUSER @V304735 01182000
LA R15,2048(,R2) CHECK SECOND HALF OF PAGE @V304735 01183000
N R15,XPAGNUM CLEAR DISPLACEMENT @V304735 01184000
CLR R15,R2 IS ADDRESS STILL WITHIN REAL PAGE@V304735 01185000
BNH NXTKEY IF YES - GET 2'ND HALF OF PAGE @V304735 01186000
CLI *+1,X'00' SET CONDITION CODE @V304735 01187000
BR R14 RETURN @V304735 01188000
SPACE 1 01189000
NXTKEY LA R15,2048(,R2) GET SECOND PART OF PAGE @V304735 01190000
N R15,X2048BND CLEAN UP ADDRESS @V304735 01191000
ISK R15,R15 GET THE REAL STORAGE KEY @V304735 01192000
N R15,F2 WAS IT CHANGED BY RUNUSER @V304735 01193000
BNZ CALLVMA IF YES - RELEASE RUNUSER @V304735 01194000
CLI *+1,X'00' SET CONDITION CODE @V304735 01195000
BR R14 RETURN TO CALLER @V304735 01196000
SPACE 1 01197000
CALLVMA ST R14,SAVEWRK4 SAVE R14 ACROSS CALL (VMA USES @VA05770 01198000
* FOR BALR) 01199000
LA R14,0(R14) ZERO HIGH ORDER FOR COMPARE @VA12785 01199100
LA R15,NOTLCK GET ADDR FOR COMPARE @VA12785 01199300
CR R14,R15 @VA12785 01199500
BE CALLVMA1 WE DIDN'T LOCK SO WON'T UNLOCK @VA12785 01199700
CALL DMKPTRUL UNLOCK PAGE @VA07988 01200000
CALLVMA1 DS 0H @VA12785 01200100
CALL DMKVMASH FLAG ALL CHANGED SHARED PAGES @VA07351 01201000
TRANS 2,1,OPT=(BRING,DEFER,LOCK) @VA07988 01202000
L R14,SAVEWRK4 RESTORE R14 (IN CASE VMA USED IT @VA05770 01203000
LCTL C1,C1,VMSEG REESTABLISH CONTROL REG 1 @VA05706 01204000
TM *+1,X'FF' SET COND. CODE 3 @V304735 01205000
BR R14 RETURN TO CALLER @V304735 01206000
EJECT 01207000
* DATA WILL CROSS AT LEAST ONE 4096-BYTE PAGE BOUNDARY: 01208000
* (OR IDA IS TO BE USED "ON PURPOSE" FOR SENSE, READ-HOME-ADDRESS, 01209000
* OR READ-RECORD-R0, WHERE CONTROL WORD INFO FOLLOWS THE ONE IDAW) 01210000
* (ENTER AT "CCWMANY2" IF IDA SET "ON PURPOSE" AS MENTIONED ABOVE) 01211000
* 01212000
CCWMANYF LRA R14,0(,R1) IS ADDR. IN CCW WITHIN USERS @V304635 01213000
* STORAGE 01214000
BC 8+2,CCWMANY2 IF SEGMENT VALID CONTINUE @V408246 01215000
CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 01216000
BC 2,CCWBAD4 @V408246 01217000
CCWMANY2 DS 0H OK - SEE HOW MUCH ROOM WE HAVE & NEED: 01218000
LR R14,R1 SET FOR "BEGINNING" ADDRESS 01219000
LA R15,0(R1,R4) ADDRESS OF LAST BYTE TO BE READ/WRITTEN 01220000
BAL R10,IDAWSUB SEE HOW MUCH ROOM WE NEED AND HAVE 01221000
LR R4,R1 GET STARTING ADDRESS IN R4, 01222000
O R4,F4095 THEN ROUND TO NEXT PAGE-START, 01223000
LA R4,1(,R4) ... 01224000
SLR R4,R1 R4 - R1 GIVES THE FIRST COUNT 01225000
LA R10,2048 SET R10 TO +2048 01226000
* 01227000
CCWIDA1 DS 0H HANDLE FORWARD OR BACKWARD PAGE CROSSOVERS VIA IDA: 01228000
LR R7,R15 NEW R7 01229000
STCM R7,7,RCWADDR+1 STORE IN ADDRESS BYTES OF COMMAND 01230000
LR R3,R1 REMEMBER ADDRESS (WITHOUT HI BYTE) IN R3 01231000
OI RCWFLAG,IDA SET REAL IDA FLAG-BIT 01232000
TRANLOCK DMKCCWL1 ... %V3M4038 01233000
ST R2,0(,R7) STORE REAL DATA ADDRESS IN IDAL 01234000
CL R4,F2048 WAS FIRST COUNT MORE THAN 2K? 01235000
BNH CCWIDA5 IF NOT, NO "2ND HALF OF PAGE" TO WORK ON. 01236000
* 01237000
S R0,F1 DECREMENT HALF-PAGE COUNT 01238000
BZ CCWIDA6A ALL DONE, GO REMEMBER ONE VALID ADDRESS 01239000
LA R7,4(,R7) BUMP CNTRLST PNTR TO NEXT WORD 01240000
O R1,F2047 GO TO END OF 2048-BYTE BLOK 01241000
LTR R10,R10 FORWARD OR BACKWARD ? 01242000
BP CCWIDA3 TRF IF FORWARD. 01243000
AR R1,R10 ADD NEGATIVE R10 FOR READ BACKWARD 01244000
B CCWIDA4 AND CONTINUE BELOW. 01245000
CCWIDA3 LA R1,1(,R1) UP TO HALF-PAGE BOUNDARY 01246000
CCWIDA4 TRANLOCK DMKCCWL2 TRANSLATE AND LOCK DATA PAGE %V3M4038 01247000
ST R2,0(,R7) AND SAVE ADDRESS IN IDAW 01248000
* 01249000
CCWIDA5 LA R7,4(,R7) BUMP R7 FOR NEXT CONTROL WORD 01250000
LTR R10,R10 FORWARD OR BACKWARD ? 01251000
BP AR34 GO ADD IF FORWARD. 01252000
SLR R3,R4 SUBTRACT IF BACKWARD 01253000
B CCWIDA6 AND GO SET UP R1 FOR TRANS CALLS. 01254000
AR34 ALR R3,R4 FWD, POINT TO START OF NEXT VPAGE 01255000
CCWIDA6 LR R1,R3 SET R1 FROM R3 FOR NEXT VPAGE(S) 01256000
CCWIDA6A LR R4,R2 REMEMBER ONE VALID REAL DATA ADDRESS 01257000
S R0,F1 DECREMENT HALF-PAGE COUNT, 01258000
BNP CCWIDA7 IF NOT PLUS, WE'RE ALL DONE. 01259000
* 01260000
CCWIDALP DS 0H LOOP TO TRANSLATE & LOCK HALF-PAGES: 01261000
TRANLOCK DMKCCWL3,RETURN=LOCK3 GET REAL ADDR. IN R2 %V3M4038 01262000
BNZ IDAWBAD BEWARE OF ADDRESS NO GOOD %V3M4038 01263000
LOCK3 ST R2,0(,R7) STORE IDAW =REAL A(PAGE IN IDAL) @V386198 01264000
LA R7,4(,R7) BUMP CONTROL-LIST POINTER BY 4, 01265000
AR R1,R10 ADJUST VIRT ADDR BY + OR - 2048 01266000
BCT R0,CCWIDALP AND ITERATE TRANSLATE-LOCK LOOP. 01267000
* 01268000
CCWIDA7 OI RCWCTL,RCWREL+RCWIO ADDRESS RELOCATABLE, PAGES LOCKED 01269000
CCWIDA8 L R7,RCWADDR NOW RE-OBTAIN R7 01270000
LA R7,0(,R7) ... 01271000
LR R2,R4 RESTORE R2 TO A (VALID) REAL DATA ADDRESS 01272000
B CCWNXT11 AND GO CHECK FOR COMPLETION. 01273000
* 01274000
IDAWBAD L R2,FFS ADDRESS N.G., SET IDAW POSITIVELY INVALID 01275000
ST R2,0(,R7) ... 01276000
CLR R4,R2 HAVE WE HAD AT LEAST ONE GOOD ADDRESS ? 01277000
BNE CCWIDA7 YES - SET RCWREL+RCWIO FLAG-BITS 01278000
IDAWBADR OI RCWCTL,RCWREL NO - JUST SET RCWREL FLAG-BIT 01279000
B CCWIDA8 AND FINISH UP. 01280000
IDAWBAD1 EQU * INVALID DATA ADDRESS @VA03162 01281000
L R15,=A(DMKSYSRM) GET REAL MACHINE @VA03162 01282000
L R15,0(,R15) SIZE @VA03162 01283000
ST R15,0(,R7) SET DATA ADDRESS INVALID @VA03162 01284000
B IDAWBADR CONTINUE... @VA03162 01285000
EJECT 01286000
* HANDLE IDA FLAG IN READ-BACKWARD USER CCW: 01287000
* (ENTERED DIRECTLY AT "HNDUSIDA" WITH R10 ALREADY = 2) 01288000
SPACE 01289000
* HANDLE INVALID COMMAND WITH IDAW SET - PERFORM VALIDITY CHECKING OF 01290000
* USER'S 1ST IDAW (AS CHANNEL WOULD DO), WITHOUT LOCKING ANY PAGES: 01291000
* NOTE - SKIP FLAG IS SET IN RCWFLAG; RCWINVL IS SET IN RCWCTL 01292000
* THE FOLLOWING CHECK ALSO TAKES PLACE ON CONTROL COMMANDS WHICH 01293000
* USE IDAL'S. IN THAT CASE, THE 'RCWREL' BIT IS SET TO AVOID 01294000
* CHECKING MORE THAN THE FIRST ENTRY IN THE IDAL. NO PAGES ARE 01295000
* INTENDED TO BE LOCKED IN THIS CASE. 01296000
* 01297000
SPACE 2 01298000
CTLCMDID OI RCWCTL,RCWREL MARK CCW RELOCATABLE TO AVOID @VA03180*01299000
CHECKING MORE THAN THE FIRST IDAL ENTRY. 01300000
INVIDAW SLR R4,R4 PRETEND BYTE-COUNT = 1 (SIC) & FWD CCW: 01301000
OI RCWFLAG,SKIP SET SKIP FLAG (TO BE SAFE FOR CP) 01302000
* AND CONTINUE TO "FWDIDAL" ... 01303000
TM RCWCTL,RCWINVL INVALID CCW ? @VA08844 01303100
BO FWDIDAL YES @VA08844 01303200
ICM R4,3,RCWCNT LOAD DATA LENGTH @VA08844 01303300
BCTR R4,R0 BYTE-COUNT-1 @VA08844 01303400
SPACE 01304000
* HANDLE IDA FLAG IN FORWARD-DIRECTION USER CCW: 01305000
FWDIDAL SLR R10,R10 R10=0 MEANS FORWARD 01306000
* 01307000
HNDUSIDA DS 0H 01308000
TM RCWADDR+3,X'03' IS THE IDAW FULL-WORD ALIGNED ? 01309000
BNZ CCWBAD INVALID CCW IF NOT 01310000
TRANBRNG DMKCCWB2,RETURN=BRING2 GET ADDR. OF IDAL %V3M4038 01311000
BNZ CCWBAD INVALID CCW IF NOT IN HIS SPACE %V3M4038 01312000
BRING2 L R14,0(,R2) GET 'STARTING ADDRESS' FROM IDAL @V386198 01313000
LR R15,R14 R15 WILL BE THE 'ENDING ADDRESS' 01314000
LR R1,R14 REMEMBER IDAW ADDRESS IN R1 01315000
EX 0,DORIGHT(R10) ADJUST R14 OR R15 - WHICHEVER IS RIGHT 01316000
BAL R10,IDAWSUB SEE HOW MUCH ROOM WE HAVE & NEED 01317000
LR R7,R15 IF OK, WE HAVE A NEW R7 01318000
STCM R7,7,RCWADDR+1 STORE IN ADDRESS BYTES OF COMMAND 01319000
L R4,FFS R4: VALID REAL DATA ADDRESS NOT FOUND YET 01320000
TM 0(R2),255 INVALID IDAW ? @VA03162 01321000
BNZ IDAWBAD YES..CONTINUE... @VA03162 01322000
CL R1,VMSIZE CHECK 1ST IDAW (HIGH ORDER BYTE - SIZE) 01323000
BNL IDAWBAD1 INVALID DATA ADDRESS @VA03162 01324000
LRA R14,0(,R1) IS IDAW WITHIN USERS STORAGE @V304635 01325000
BC 8+2,USIDAL1 IF SEGMENT VALID CONTINUE @V408246 01326000
CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 01327000
BC 2,IDAWBAD @V408246 01328000
USIDAL1 DS 0H @V408246 01329000
TM RCWCTL,RCWINVL+RCWREL INVALID CCW OR @VA03180*01330000
CONTROL COMMAND? 01331000
BZ IDAOK5 NOPE - GO BRING & LOCK 1ST PAGE. 01332000
B IDAWBADR YES - 1ST IDAW OK, JUST SET RCWREL FLAG. 01333000
* 01334000
USIDAL2 LA R3,4(,R3) ADVANCE TO NEXT USER IDAL WORD 01335000
LA R7,4(,R7) AND NEXT REAL IDAL WORD 01336000
LR R1,R3 GET IDAW FROM USER'S IDAL LIST 01337000
TRANBRNG DMKCCWB3,RETURN=BRING3 %V3M4038 01338000
BNZ IDAWBAD (BEWARE OF INVALID ADDRESS) %V3M4038 01339000
BRING3 L R1,0(0,R2) GET REAL IDAW ADDRESS @V386198 01340000
CL R1,VMSIZE VALIDATE IT (HIGH ORDER BYTE MUST BE 00) 01341000
BNL IDAWBAD TRF IF NOT VALID 01342000
LRA R14,0(,R1) IS IDAW WITHIN USER'S STORAGE @V304635 01343000
BC 8+2,IDAOK5 CONTINUE IF VALID SEGMENT @V408246 01344000
CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 01345000
BC 2,IDAWBAD @V408246 01346000
IDAOK5 TRANLOCK DMKCCWL4 OK, BRING IN DATA-PAGE FOR I/O %V3M4038 01347000
LR R4,R2 OK, REMEMBER ONE VALID REAL DATA ADDRESS 01348000
ST R2,0(,R7) AND STORE REAL ADDRESS IN REAL IDAL 01349000
BCT R0,USIDAL2 ITERATE LOOP IF THERE ARE MORE TO DO. 01350000
B CCWIDA7 WHEN THRU, SET FLAG-BITS AND FINISH UP. 01351000
* 01352000
* KEEP THE NEXT TWO IN ORDER - EXECUTED INDEXED BY R10: 01353000
DORIGHT ALR R15,R4 FWD - COMPUTE 'ENDING ADDRESS' 01354000
SLR R14,R4 BACKWARD - COMPUTE 'STARTING ADDRESS' 01355000
EJECT 01356000
* SUBROUTINE TO OBTAIN CONTROL INFORMATION OF UP TO 8 BYTES 01357000
* FROM USER CORE (E.G. FOR RELOCATING CYLINDER NUMBERS), OR 01358000
* TO PLACE INFORMATION (E.G. SENSE BYTES) IN USER CORE. 01359000
* 01360000
* ENTRY POINTS - 01361000
* 01362000
* CNTRLSUB - OBTAIN CONTROL INFORMATION FROM USER CORE 01363000
* CNTRLSBW - "WRITE" INFORMATION INTO USER CORE 01364000
* 01365000
* ENTRY CONDITIONS: 01366000
* CCW IS IN "RCWCCW" AS USUAL 01367000
* R1 = ADDRESS OF DATA 01368000
* R3 = CCW-COMMAND AND ADDRESS OF DATA 01369000
* R4 = BYTE-COUNT LESS 1 01370000
* R8 = ADDRESS OF DATA TO BE "WRITTEN" FOR CNTRLSBW ENTRY ONLY 01371000
* R10 = RETURN-REGISTER 01372000
* 01373000
* EXIT CONDITIONS: 01374000
* IF DATA-ADDRESSING ERROR OCCURRED, TRANSFERS TO CCWBAD . 01375000
* OTHERWISE, DATA HAS BEEN PLACED IN "R7" CONTROL AREA 01376000
* FOR "CNTRLSUB" ENTRY, OR "WRITTEN" TO USER-CORE FOR 01377000
* "CNTRLSBW" ENTRY. 01378000
* 01379000
* R0-R4 NOT PRESERVED AT EXIT. 01380000
* R8 = USUAL VALUE OF A(VDEVBLOK) 01381000
SPACE 01382000
CNTRLSUB SLR R8,R8 R8=0 MEANS OBTAIN DATA FROM USER-CORE 01383000
CL R4,F7 MAKE SURE BYTE-COUNT-LESS-1 NOT > 7 01384000
BNH CNTRLSB1 OK IF NOT. 01385000
LA R4,8 IF BYTE-COUNT WAS > 8, MAKE IT 8 01386000
TM RCWCTL,RCWHMR+RCW2311 DOING THIS FOR TRICKY CASES ? 01387000
BNZ *+8 YES - DON'T CHANGE BYTE COUNT IN REAL CCW 01388000
STH R4,RCWCNT ... 01389000
BCTR R4,0 AND NOW 7 IN THE REGISTER ITSELF. 01390000
CNTRLSB1 EQU * 01391000
LR R0,R1 ADDRESS OF FIRST BYTE OF DATA 01392000
ALR R0,R4 NOW ADDRESS OF LAST DATA BYTE 01393000
XROOM 16 IF OK, GET ROOM FOR CONTROL BYTES IN R7 01394000
SL R7,F8 IF ENOUGH ROOM, GET NEW R7 (OLD ONE - 8) 01395000
TM RCWFLAG,IDA IS USER'S IDA FLAG-BIT SET ? 01396000
BZ CNTRLSB3 TRF IF NOT (R1 HOLDS VIRT. ADDR. WE NEED) 01397000
CNTRLSB2 EQU * FETCH AND INTERPRET IDAW 01398000
L R0,F3 CHECK CCW ALIGNMENT 01399000
NR R0,R1 (MUST BE FULL-WORD ALIGNED) 01400000
BNZ CNTRLBAD INVALID CCW IF NOT 01401000
TRANBRNG DMKCCWB4,RETURN=BRING4 BRING IN THE IDAW %V3M4038 01402000
BNZ CNTRLBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01403000
BRING4 L R1,0(0,R2) GET ADDRESS FROM IDA WORD @V386198 01404000
CL R1,VMSIZE VALIDATE IT (HIGH-ORDER MUST BE ZERO) 01405000
BNL CNTRLBAD TOO BAD, FELLOW 01406000
LRA R14,0(,R1) VALID IDAW ADDRESS @V304635 01407000
BC 8+2,CNTRLS2A CONTINUE IF VALID SEGMENT @V408246 01408000
CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 01409000
BC 2,CNTRLBAD @V408246 01410000
CNTRLS2A DS 0H @V408246 01411000
LR R0,R1 ...ALSO INTO GR0 01412000
ALR R0,R4 NEW "ADDRESS OF LAST BYTE" INTO R0 01413000
CNTRLSB3 EQU * CHECK 2K-BOUNDARY CROSSINGS 01414000
L R2,X2048BND ...FOR PROTECTION CHECKING 01415000
NR R0,R2 ISOLATE PAGE-ENDING ADDRESS IN R0, 01416000
LR R14,R0 REMEMBER IN R14 BRIEFLY (IN CASE NEEDED) 01417000
NR R2,R1 ISOLATE PAGE-STARTING-ADDRESS IN R2 01418000
SR R0,R2 GET DIFFERENCE (IF ANY) IN R0 01419000
BZ CNTRLSB4 TRF IF THEY ARE THE SAME (NOTE R0=0) 01420000
SLR R14,R1 IF NO, GET NO. OF BYTES LEFT IN THIS PAGE 01421000
BCTR R14,0 (LESS 1 FOR EX-MVC LATER) 01422000
LR R0,R4 PUT OLD TOTAL-COUNT-LESS-1 IN R0, 01423000
SLR R0,R14 LESS R14 COUNT = RESIDUE IN NEXT VIRT PAGE 01424000
LR R4,R14 R14 COUNT NOW INTO R4 01425000
CNTRLSB4 TRANBRNG DMKCCWB5,RETURN=BRING5 GET CONTROL BYTES %V3M4038 01426000
BNZ CNTRLBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01427000
BRING5 LTR R8,R8 WHICH ENTRY DID WE COME IN ? @V386198 01428000
BNZ CNTRLSB5 TRF IF "CNTRLSBW" ENTRY. 01429000
EX R4,EXMVCR72 MOVE ALL/SOME CONTROL BYTES TO OUR R7 AREA 01430000
LTR R0,R0 IS THERE ANY RESIDUE IN NEXT VIRT PAGE ? 01431000
BNZ CNTRLSB6 IF YES, PROCEED. 01432000
CNTRLEXT L R8,SAVER8 WHEN ALL THRU, RESTORE R8 = A(VDEVBLOK), 01433000
AL R8,VMDVSTRT ... 01434000
BR R10 AND EXIT TO CALLER. 01435000
* 01436000
CNTRLSB5 BAL R14,CCWCHKEY CHECK FOR USER PROTECTION KEY SET 01437000
BC 7,SRCHID5A IF CC NOT 0, HANDLE AS GENERAL CASE 01438000
EX R4,EXMVCR28 IF OK, "WRITE" DATA TO USER CORE 01439000
LTR R0,R0 IS THERE ANY MORE DATA TO BE MOVED ? 01440000
BZ CNTRLEXT IF NOT (R0=0), GO RESTORE R8 AND EXIT. 01441000
LA R8,1(R8,R4) IF YES, BUMP R8 FOR MORE DATA TO MOVE 01442000
* 01443000
CNTRLSB6 LA R1,1(R1,R4) GET TENTATIVE NEXT VIRT. PAGE ADDRESS, 01444000
TM RCWFLAG,IDA WAS USER IDA SET ? 01445000
BZ CNTRLSB7 TRF IF NOT - GET REST OF CONTROL BYTES. 01446000
LA R1,4(,R3) IF IDA SET, POINT AT NEXT USER IDAW 01447000
TRANBRNG DMKCCWB6,RETURN=BRING6 GET 2ND IDAW %V3M4038 01448000
BNZ CNTRLBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01449000
BRING6 L R2,0(,R2) GET REAL ADDR OF REM. CNTL BYTES @V386198 01450000
LR R1,R2 NOW SAFELY INTO R1 01451000
CL R1,VMSIZE VALIDATE IT (HIGH ORDER MUST BE ZERO) 01452000
BNL CNTRLBAD SORRY ABOUT THAT 01453000
LRA R14,0(,R1) IS THIS A VALID VIRTUAL ADDRESS @V304635 01454000
BC 8+2,CNTRLS6A CONTINUE IF SEGMENT VALID @V408246 01455000
CALL DMKPTRAN,PARM=DEFER OTHERWISE LET DMKPTRAN @V408246 01456000
* HANDLE 01457000
BC 2,CNTRLBAD @V408246 01458000
CNTRLS6A DS 0H @V408246 01459000
N R2,F2047 THAT ADDRESS MUST BE 2048-BYTE ALIGNED 01460000
BNZ CNTRLBAD ERROR IF NOT (COULDN'T TRUST THE DATA) 01461000
CNTRLSB7 LA R3,1(R4,R7) GET WHERE-TO-PUT REMAINING CONTROL BYTES 01462000
* (NOTE: HARMLESS IF "CNTRLSBW" ENTRY) 01463000
LR R4,R0 AND GET REMAINING-BYTE-COUNT IN R4 01464000
BCTR R4,0 (LESS 1 FOR EX-MVC) 01465000
TRANBRNG DMKCCWB7,RETURN=BRING7 GET REM. CNTL BYTES %V3M4038 01466000
BNZ CNTRLBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01467000
BRING7 LTR R8,R8 WHICH WAY TO GO NOW ?? @V386198 01468000
BNZ CNTRLSB8 NOW I REMEMBER ... 01469000
EX R4,EXMVCR32 MOVE LAST FEW CONTROL BYTES TO OUR R7 AREA 01470000
B CNTRLEXT AND (FINALLY) EXIT TO CALLER (WHEW). 01471000
* 01472000
CNTRLSB8 BAL R14,CCWCHKEY CHECK FOR USER PROTECTION KEY SET 01473000
BC 7,SRCHID5A IF CC NOT 0, HANDLE AS GENERAL CASE 01474000
EX R4,EXMVCR28 IF OK, MOVE LAST FEW BYTES TO USER CORE 01475000
B CNTRLEXT AND GO EXIT. 01476000
* 01477000
EXMVCR72 MVC 0(*-*,R7),0(R2) OBTAINS ALL OR FIRST FEW CONTROL BYTES 01478000
EXMVCR32 MVC 0(*-*,R3),0(R2) OBTAINS LAST FEW CONTROL BYTES 01479000
EXMVCR28 MVC 0(*-*,R2),0(R8) MOVES DATA TO USER CORE 01480000
EXMVCLST MVC 8(0,R15),0(R1) MOVE OLD LIST TO NEW LIST @VW01384 01481000
* 01482000
* ENTER HERE FOR "CNTRLSBW" ENTRY: 01483000
CNTRLSBW TM RCWFLAG,IDA IS USER'S IDA FLAG-BIT SET ? 01484000
BO CNTRLSB2 IF YES, GO GET IDAW, ETC. 01485000
LR R0,R1 FIRST BYTE OF DATA... 01486000
ALR R0,R4 NOW LAST BYTE OF DATA 01487000
CL R0,VMSIZE HOPEFULLY WITHIN THE USER'S MACHINE ? 01488000
BNL CNTRLBAD IF NOT - CHK OUT BAD ADDRESS @V304635 01489000
LR R14,R0 CHK. AGAINST TRANSLATE TABLES @V304635 01490000
LRA R14,0(,R14) WITHIN USER'S VIRTUAL STORAGE @V304635 01491000
BC 8+2,CNTRLSB3 IF YES - CHK. FOR PROTECTION @V304635 01492000
CALL DMKPTRAN,PARM=DEFER HAVE PTRAN HANDLE SEGMENT @V408246 01493000
* EXCEPTIONS 01494000
BC 8+4+1,CNTRLSB3 @V408246 01495000
* ERROR 01496000
* HERE IF INVALID ADDRESS FOUND IN THE ABOVE PROCESS: 01497000
CNTRLBAD LTR R8,R8 WHICH ENTRY DID WE COME IN ? 01498000
BNZ CCWBAD IF "CNTRLSBW", LEAVE R7 ALONE. 01499000
TM MEMO1,CCWSUBR ENTERED VIA DMKCCWSB ENTRY POINT ? 01500000
BO CCWEXIT YES - EXIT TO CALLER OF DMKCCWSB (CC=3) 01501000
MVC 0(8,R7),ZEROES CLEAR THE CONTROL-WORD AREA, AND 01502000
LA R7,8(,R7) BUMP R7 UP BY 8 SO IT CAN BE REUSED 01503000
* AND HANDLE AS A 'SICK ADDRESS' COMMAND: 01504000
CCWBAD DS 0H ADDRESS SPECIFIED BY USER CCW WAS BAD: 01505000
MVI RCWFLAG,X'03' SET CCW FLAG FIELD INVALID 01506000
CCWBAD2 MVC RCWADDR(4),XRIGHT24 SET OP-CODE AND ADDRESS INVALID 01507000
MVI RCWCTL,RCWINVL REMEMBER THAT IT IS INVALID 01508000
XC VIRCOMND(2),VIRCOMND ZERO PREVIOUS COMMAND @VA05410 01509000
B CCWCHKPV AND GO CHECK THE PREVIOUS COMMAND. 01510000
* 01511000
CCWINVLD DS 0H VIRTUAL CCW IS OSTENSIBLY INVALID: 01512000
OI RCWCTL,RCWINVL WE THINK THIS IS AN INVALID CCW 01513000
TM RCWFLAG,IDA IS IDA FLAG PERCHANCE SET 01514000
BO INVIDAW IF YES, VALIDITY-CHECK USER'S IDAL 01515000
CCWBAD4 L R15,=A(DMKSYSRM) GET REAL MACHINE SIZE 01516000
L R15,0(,R15) ... 01517000
N R15,XRIGHT24 CLEAR HIGH BYTE @VA03162 01518000
BNZ *+8 NOT 16 MEG MACHINE.. @VA03162 01519000
OI RCWFLAG,3 SET CCW INVALID FOR 16 MEG @VA03162 01520000
STCM R15,7,RCWADDR+1 YES - SUBSTITUTE "REAL MACHINE SIZE" 01521000
* NOTE: IN EITHER CASE, "RCWIO" IS NOT SET; 01522000
* DMKUNTFR WON'T TRY TO UNLOCK INVALID PAGE 01523000
CCWIOCHK BAL R10,CLRSENSE CLEAR ANY SENSE BYTES MAYBE LYING AROUND, 01524000
TM RCWCTL,RCWINVL DID WE THINK THIS WAS AN INVALID CCW ? 01525000
BZ CCWNXT14 NO - TEST FOR END OF CCW STRING 01526000
B CCWCHKPV YES - GO CHECK THE PREVIOUS COMMAND 01527000
EJECT 01528000
* SUBROUTINE TO COMPUTE HOW MANY IDAWS WILL BE 01529000
* NEEDED, AND IF THERE IS ENOUGH ROOM FOR THEM: 01530000
SPACE 01531000
IDAWSUB N R14,X2048BND ENTER HERE TO ISOLATE R14 AND R15 TO 01532000
N R15,X2048BND 2048-BYTE BOUNDARIES, AND CONTINUE: 01533000
SLR R15,R14 GET END ADDR - START ADDR 01534000
LA R15,0(0,R15) ALLOW STORAGE WRAP-AROUND, PREVENT PROG. 01535000
* CHECK IF R14 > R15.... 01536000
SRL R15,9(0) IDAL LENGTH IN BYTES 01537000
LA R14,4(0,R15) PLUS 4 NEEDED, INTO R14 01538000
LR R0,R14 R0 WILL CONTAIN IDA WORD COUNT 01539000
SRL R0,2(0) ... 01540000
LR R15,R7 PREVIOUS CONTROL WORD POINTER 01541000
SLR R15,R14 BACK UP TO START OF IDAL 01542000
LA R14,8(0,R6) POINT TO END OF CURRENT CCW 01543000
TM RCWFLAG,CC+CD IF IT IS CHAINED... 01544000
BZ *+8 NO - THAT'S ENOUGH ROOM 01545000
LA R14,8(0,R14) ...ALLOW FOR AT LEAST ONE MORE CCW 01546000
CLR R14,R15 IS THERE ENOUGH ROOM FOR THE IDAL ? 01547000
BCR 13,R10 'BNH' IF OK - EXIT TO CALLER. 01548000
B CCWNROOM GO EXPAND THE RCWTASK 01549000
SPACE 01550000
CCWCHKRM EQU * TEST FOR SUFFICIENT SPACE IN RCWTASK 01551000
TM RCWFLAG,CC+CD IF CHAINING IS ON... 01552000
BZ *+8 01553000
LA R14,8(0,R14) ALLOW ONE MORE CCW 01554000
CLR R14,R7 DO WE HAVE ENOUGH ROOM ? 01555000
BCR 13,R15 (BNH) YES - RETURN TO CALLER 01556000
SPACE 01557000
CCWNROOM EQU * @VA12408 01558000
L R12,=A(DMKCCW) BASE FOR FIRST PART @VA12408 01588000
B ROOM-DMKCCW(R12) GO THERE @VA12408 01618000
SPACE 3 01654000
*--------HERE ENDETH CCWTRANS LOGIC COMMON TO ALL DEVICE CLASSES------- 01655000
* (EXCEPT FOR DMKCCWSB & TICSCAN, WHICH ARE AT THE END) 01656000
EJECT 01657000
*. 01658000
* LOGIC FOR "DASD" = NON-DEDICATED DASD DEVICE CLASS 01659000
* 01660000
* DASDX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 01661000
* INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01662000
* AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01663000
* 01664000
* WRITE SPECIAL COUNT KEY AND DATA (01) OR ERASE TRACK (11) 01665000
* ARE HANDLED AS A GENERAL CASE DASD WRITE 01666000
* (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01667000
* 01668000
* IF > 11, CHECKS THAT CCW IS AN APPARENT "SEARCH ID" 01669000
* TYPE OF CCW (31, 51, ..., D1, F1) 01670000
* IF NOT, HANDLED AS AN INVALID CCW; IF YES, HANDLED AS A 01671000
* "STATUS MODIFIER" TYPE OF DATA TRANSFER & CHECKS FURTHER: 01672000
* 01673000
* CHECKS DEVICE TYPE; IF NOT 3330/40/50/80, HANDLES HRC011DK 01674290
* NORMALLY. HRC011DK 01674580
* 01675000
* IF 3330/40/50/80, CHECKS CYLINDER RELOCATION FACTOR; HRC011DK 01676490
* IF = 0, HANDLES NORMALLY. 01677000
* 01678000
* CHECKS BYTE COUNT; IF < 5, HANDLES NORMALLY. 01679000
* 01680000
* CHECKS 5TH BYTE ('R' BYTE OF 'CCHHR' ARGUMENT); 01681000
* IF NONZERO, HANDLES NORMALLY. 01682000
* 01683000
* FOR 3330/40/50/80, CYL RELOCATION FACTOR NONZERO, 5THHRC011DK 01684490
* (THAT IS, A "SEARCH ID" TYPE OF CCW ON "RECORD R0") 01685000
* RELOCATES 'CCHHR' FIELD TO CP CONTROL WORDS, ADDING THE 01686000
* CYLINDER RELOCATION FACTOR TO THE VIRTUAL CYLINDER NUMBER. 01687000
* 01688000
* NOTE: IF THE 'R' BYTE OF 'CCHHR' = 0 AT THE TIME A VIRTUAL 01689000
* SIO IS ISSUED BUT THE 'CCHHR' FIELD IS READ IN DYNAMICALLY BY 01690000
* THE CHANNEL PROGRAM BEFORE THE SEARCH ID CCW IS EXECUTED, THE 01691000
* REAL SEARCH ID CCW WILL USE THE RELOCATED 'CCHHR' FIELD 01692000
* INSTEAD OF THE 'CCHHR' FIELD WHICH WAS DYNAMICALLY READ IN, 01693000
* CAUSING ERRONEOUS RESULTS. TO AVOID THIS PROBLEM, THE 'R' 01694000
* BYTE OF 'CCHHR' SHOULD NOT BE DEFAULTED TO BINARY ZERO BY THE 01695000
* VIRTUAL MACHINE IF THE SEARCH ARGUMENTS ARE TO BE READ IN 01696000
* DYNAMICALLY AND A SEARCH ID ON "RECORD R0" IS NOT INTENDED. 01697000
* 01698000
* DASDX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 01699000
* FOR READ IPL (02), TRANSFORMS TO THE FOLLOWING: 01700000
* 1. INSERTS A SEEK TO REAL EQUIVALENT OF VIRTUAL CYLINDER ZERO 01701000
* 2. INSERTS A READ HOME ADDRESS (1A) WITH SKIP FLAG ON 01702000
* 3. THEN PUTS IN ORIGINAL READ IPL CCW BUT WITH OP CODE 01703000
* CHANGED TO READ (06). 01704000
* 4. FINALLY, HANDLES AS GENERAL CASE "READ" 01705000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01706000
* 01707000
* IF > 02, HANDLES AS GENERAL CASE "READ" 01708000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01709000
* 01710000
* DASDX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 01711000
* FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 01712000
* 01713000
* FOR RECALIBRATE (13), HANDLES SAME AS RESTORE (17) 01714000
* (SEE DESCRIPTION BELOW AT "DASD1317") 01715000
* 01716000
* IF > 13, INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL 01717000
* CYLINDER AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD 01718000
* A SEEK YET. 01719000
* 01720000
* FOR DIAG WRITE (73) HANDLES AS A GENERAL CASE DASD WRITE 01721000
* (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01722000
* 01723000
* OTHERS (E.G. SET SECTOR = 23 OR DIAG LOAD = 53) 01724000
* HANDLED AS GENERAL CASE OF DATA TRANSFER 01725000
* 01726000
* DASDX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 01727000
* FOR SENSE (04) OR EQUIVALENT, STORES SENSE BYTES FROM VIRTUAL 01728000
* DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK 01729000
* (NOTE: FOR 3330/40/50/80, CYLINDER NUMBER IN SENSE HRC011DK 01730490
* BYTES IS UN-RELOCATED TO FORM VIRTUAL CYLINDER HRC011DK 01730980
* NUMBER); HRC011DK 01731470
* IF NO VIRTUAL SENSE BYTES ARE AVAILABLE, HANDLES THE SAME AS 01732000
* READ HOME ADDRESS OR READ RECORD R0 (SEE "CCWRHARZ" BELOW) 01733000
* FOR 3330/40/50/80 ONLY, WITH A NONZERO RELOCATION HRC011DK 01734590
* FACTOR. OTHERWISE, HANDLED AS GENERAL CASE "READ" HRC011DK 01735180
* FOR MINIDISKS HAVEING THE VIRTUAL RESERVE/RELEASE FEATURE, 01736000
* IF A X'B4' (RESERVE) COMMAND CODE IS ENCOUNTERED, SET A 01737000
* FLAG TO REMEMBER THAT THE CCW CHAIN CONTAINS A RESERVE. 01738000
* IF A X'94' (RELEASE) COMMAND CODE IS ENCOUNTERED, SET A 01739000
* FLAG TO REMEMBER THAT THE CCW CHAIN CONTAINS A RELEASE. 01740000
* THESE RESERVE/RELEASE FLAGS ARE INTERROGATED JUST PRIOR 01741000
* TO EXIT FROM DMKCCW. 01742000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01743000
* 01744000
* IF NOT SENSE (04) OR EQUIVALENT, CHECKS FOR "BUFFER UNLOAD" 01745000
* (24 ON 2305 OR A4 ON 3330/40/50/80); IF FOUND,CALLS HRC011DK 01746290
* DMKDSBSD HRC011DK 01746580
* TO RECORD THE DASD ERROR COUNTS (UNLESS THE VIRTUAL MACHINE IS 01747000
* A "CLASS F" (I.E. "CE") USER). IN ANY EVENT, THE BUFFER 01748000
* UNLOAD IS THEN PROCESSED NORMALLY AS A READ TYPE CCW. 01749000
* THE ABOVE IS DONE IF THE DEVICE IS A 3800 PRINTER (CAME HERE 01750000
* VIA OTHRX4) AND THE CCW OP CODE IS 24 (BUFFER UNLOAD) 01751000
* EXCEPT THAT DMKRSESD IS CALLED TO DO THE WORK. 01752000
* 01753000
* ALL OTHER CCWS ENDING IN "4" ARE HANDLED AS GENERAL CASE READ 01754000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01755000
* 01756000
* DASDX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 01757000
* INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01758000
* AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01759000
* 01760000
* WRITE DATA (05) HANDLED AS A GENERAL CASE DASD WRITE 01761000
* (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01762000
* 01763000
* FOR WRITE RECORD R0 (15), CHECKS DEVICE TYPE 01764000
* IF NOT 3330/3340/3350, HANDLES AS A GENERAL CASE DASD WRITE 01765000
* (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01766000
* 01767000
* FOR WRITE RECORD R0 (15) ON 3330/40/50/80, REPLACE OP HRC011DK 01768290
* CODE BY HRC011DK 01768580
* READ RECORD R0 (16) WITH THE SKIP FLAG ON, AND CHECKS TO SEE 01769000
* IF DASD DEVICE IS READ ONLY - IF YES FORCES AN INVALID CCW; 01770000
* IF OK, USES SUBSTITUTED CCW = READ RECORD R0 WITH SKIP FLAG ON 01771000
* 01772000
* IF > 15, TREATS AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 01773000
EJECT 01774000
* DASDX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 01775000
* INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01776000
* AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01777000
* 01778000
* IF SKIP FLAG IS ON, LEAVES CCW "AS IS" (NO DATA IS READ) 01779000
* 01780000
* IF OP CODE IS READ RECORD R0 (16 OR 96), HANDLES AS A GENERAL 01781000
* CASE READ IF THE DEVICE IS NOT A 3330/40/50/80; FOR HRC011DK 01782490
* THESE DEVICES ARE PROCESSED AS DESCRIBED BELOW AT HRC011DK 01782980
* "CCWRHARZ". HRC011DK 01783470
* 01784000
* IF NOT A READ RECORD R0, HANDLES AS A GENERAL CASE READ 01785000
* IF ISAM CHECKING IS NOT WANTED. BUT IF ISAM CHECKING IS 01786000
* WANTED, CHECKS TO SEE IF ALL OF THESE CONDITIONS ARE MET: 01787000
* BYTE-COUNT = 10 01788000
* COMMAND-CHAIN FLAG IS SET 01789000
* OP-CODE IS 06 01790000
* VIRTUAL ADDRESS IS 7-BYTE ALIGNED (LAST 3 BITS ARE ONES) 01791000
* IF YES (ALL CRITERIA MET), FLAGS AS AN ISAM READ, AND 01792000
* REMEMBERS THAT AN ISAM READ OCCURRED; IF NOT, TREATS AS A 01793000
* GENERAL CASE READ (WITH STORAGE PROTECTION CHECK, AS USUAL). 01794000
* 01795000
* DASDX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 01796000
* FOR SEEK (07), HANDLES AS DESCRIBED BELOW AT "DASDSEEK". 01797000
* 01798000
* IF > 17, HANDLES AS AN INVALID CCW (EXCEPT FOR POSSIBLE 01799000
* SPECIAL HANDLING OF THE LETTER 'P' = X'D7'; SEE "SPECIAL 01800000
* TRANSFORMATION FOR ISAM HANDLING" BELOW). 01801000
* 01802000
* IF = RESTORE (17) ... 01803000
* "DASD1317" - HANDLE RESTORE (17) OR RECALIBRATE (13): 01804000
* TENTATIVELY SETS "IOBCYL" FIELD (IN IOBLOK) TO VALUE OF 01805000
* CYLINDER RELOCATION FACTOR (FOR USE BY DMKIOS). 01806000
* 01807000
* CLEARS VIRTUAL CYLINDER AND HEAD POSITION AND 01808000
* SETS FLAG TO INDICATE THAT "A SEEK IS NEEDED". 01809000
* 01810000
* IF COMMAND-CHAIN AND SILI FLAG ARE BOTH SET IN THE CCW, 01811000
* TREATS AS AN IRRELEVANT-ADDRESS CCW, AND GETS THE NEXT VIRTUAL 01812000
* CCW. (A SEEK TO THE REAL EQUIVALENT OF THE VIRTUAL CYLINDER 01813000
* ZERO WILL AUTOMATICALLY BE INSERTED AT THIS POINT.) 01814000
* 01815000
* IF "CC" AND SILI ARE NOT BOTH SET (THE CHANNEL PROGRAM WILL 01816000
* TERMINATE IN THIS CASE), CLEARS "IOBCYL" FIELD (IN IOBLOK) 01817000
* FOR USE BY DMKIOS, AND TREATS AS AN IRRELEVANT-ADDRESS CCW. 01818000
* 01819000
* DASDX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 01820000
* INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01821000
* AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01822000
* 01823000
* IF < 19, HANDLES AS AN INVALID CCW. 01824000
* 01825000
* FOR WRITE HOME ADDRESS (19), FORCES AN INVALID CCW 01826000
* IF THE DASD DEVICE IS READ ONLY. IF OK, CHECKS THE DEVICE 01827000
* TYPE; IF NOT 33XX, RELOCATES THE HOME ADDRESS FIELD HRC011DK 01828490
* TO CP CONTROL WORDS, ADDING THE CYLINDER RELOCATION FACTOR TO 01829000
* THE VIRTUAL CYL. NUMBER. FOR 33XX, HOWEVER, REPLACES HRC011DK 01830490
* THE WRITE HOME ADDRESS CCW BY A READ HOME ADDRESS OP CODE (1A) 01831000
* WITH THE SKIP FLAG SET. 01832000
* 01833000
* IF > 19, TREATS AS A "STATUS MODIFIER" TYPE OF DATA TRANSFER, 01834000
* AND CHECKS FOR SEARCH HOME ADDRESS EQUAL (39 OR B9); IF NOT 01835000
* 39 OR B9, HANDLES NORMALLY. IF = 39 OR B9, HANDLES NORMALLY 01836000
* IF THE RELOCATION FACTOR = 0, BUT OTHERWISE RELOCATES THE 01837000
* SEARCH ARGUMENTS TO CP CONTROL WORDS, ADDING THE CYLINDER 01838000
* RELOCATION FACTOR TO THE VIRTUAL CYLINDER NUMBER. 01839000
* 01840000
* DASDXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 01841000
* CHECKS FOR READ HOME ADDRESS CCW (1A OR 9A); 01842000
* HANDLES AS INVALID CCW IF NOT 1A OR 9A. 01843000
* 01844000
* INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01845000
* AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01846000
* 01847000
* IF BYTE COUNT = 1, OR SKIP FLAG IS SET, HANDLES NORMALLY 01848000
* 01849000
* OTHERWISE, ... 01850000
* "CCWRHARZ" - HANDLE READ HOME ADDRESS OR READ RECORD R0: 01851000
* CHECKS CYLINDER RELOCATION FACTOR; IF = 0, HANDLES NORMALLY. 01852000
* 01853000
* IF PREVIOUS CCW WAS DATA-CHAINED, HANDLES NORMALLY. 01854000
* 01855000
* OTHERWISE, OBTAINS 8 BYTES (OR LESS) FROM THE REAL STORAGE 01856000
* CORRESPONDING TO THE VIRTUAL ADDRESS IN THE READ HOME ADDRESS 01857000
* OR READ RECORD R0 CCW, REMEMBERING THE 8 BYTES IN CP CONTROL 01858000
* WORDS; A FLAG IS SET IN THE CCW TO SIGNAL CP'S UN-TRANSLATOR 01859000
* (DMKUNTFR) TO UN-RELOCATE THE CYLINDER NUMBER WHEN THE CHANNEL 01860000
* PROGRAM HAS COMPLETED, AND AN INDIRECT DATA ADDRESS LIST 01861000
* (IDAL) IS CREATED FOR THE DATA TRANSFER, TO FACILITATE THE 01862000
* LOCATION OF THE 8 BYTES WHICH WERE SAVED IN THE CP CONTROL 01863000
* WORDS (WHICH WILL BE IMMEDIATELY AFTER THE IDAL). (DMKUNTFR 01864000
* CHECKS TO SEE IF THE DATA HAS CHANGED BEFORE UN-RELOCATING 01865000
* THE CYLINDER NUMBER, TO AVOID ERRONEOUS DATA-REVISION IN THE 01866000
* CASE WHERE THE CHANNEL PROGRAM DID NOT ACTUALLY PERFORM THE 01867000
* READ HOME ADDRESS OR READ RECORD R0 CCW.) 01868000
* 01869000
* DASDXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 01870000
* FOR SEEK CYLINDER (0B), HANDLE AS DESCRIBED BELOW 01871000
* AT "DASDSEEK". 01872000
* 01873000
* FOR SEEK HEAD (1B), INSERTS A SEEK (TO REAL EQUIVALENT OF 01874000
* CURRENT VIRTUAL CYLINDER AND HEAD POSITION) IF CHANNEL PROGRAM 01875000
* HAS NOT HAD A SEEK YET, THEN HANDLE AT "DASDSEEK". 01876000
* 01877000
* IF > 1B (E.G. ORIENT = 2B), HANDLES CCW "AS IS" 01878000
* (ADDRESS IN CCW IS IRRELEVANT). 01879000
EJECT 01880000
* "DASDSEEK" - HANDLE SEEK <CYLINDER | HEAD> CCW: 01881000
* RELOCATES THE SEEK ARGUMENTS TO CP CONTROL WORDS 01882000
* 01883000
* CHECKS IF SEEK CCW IS COMMAND- OR DATA-CHAINED; 01884000
* IF NEITHER, SETS FLAG IN VIRTUAL DEVICE BLOCK 01885000
* (FOR DMKIOS) TO SIGNAL A STAND-ALONE SEEK. 01886000
* 01887000
* RESETS "SEEK IS NEEDED" FLAG; RELOCATES CYLINDER NUMBER BY 01888000
* ADDING CYLINDER RELOCATION FACTOR, AND (IF VALID) STORES AT 01889000
* "IOBCYL" (IN IOBLOK) FOR USE BY DMKIOS. FINALLY, IF CYLINDER 01890000
* RELOCATION FACTOR = 0 (AND BBCCHH FIELD WAS VALID), DOES NOT 01891000
* USE RELOCATED SEEK ARGUMENTS (IN CP CONTROL WORDS) AFTER ALL, 01892000
* BUT HANDLES AS GENERAL CASE OF DATA TRANSFER (A NECESSARY EVIL 01893000
* FOR CORRECT HANDLING OF ISAM AND SOME OTHER CHANNEL PROGRAMS). 01894000
* 01895000
* DASDXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 01896000
* HANDLED AS AN INVALID CCW 01897000
* 01898000
* DASDXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 01899000
* INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01900000
* AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01901000
* 01902000
* WRITE KEY AND DATA (0D) OR WRITE COUNT KEY AND DATA (1D) 01903000
* ARE HANDLED AS A GENERAL CASE DASD WRITE 01904000
* (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01905000
* 01906000
* ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 01907000
* 01908000
* DASDXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 01909000
* INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01910000
* AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01911000
* 01912000
* THEN HANDLES AS GENERAL CASE "READ" 01913000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01914000
* 01915000
* DASDXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 01916000
* INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01917000
* AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01918000
* 01919000
* FOR SPACE COUNT (0F), LIMITS BYTE COUNT TO 3 (IF IT 01920000
* WAS > 3) AND TREATS AS GENERAL CASE OF DATA TRANSFER. 01921000
* 01922000
* FOR SET FILE MASK (1F), LIMITS BYTE COUNT TO 1 01923000
* AND TREATS AS GENERAL CASE OF DATA TRANSFER. 01924000
* 01925000
* IF > 1F, HANDLES AS AN INVALID CCW. 01926000
EJECT 01927000
* SPECIAL TRANSFORMATION FOR ISAM HANDLING: 01928000
* IF ISAM IS SUPPORTED FOR THE SYSTEM AND THE VIRTUAL MACHINE, 01929000
* AND THERE HAS BEEN AN ISAM READ IN THE CHANNEL PROGRAM, THEN 01930000
* AN OP CODE OF BINARY ZERO (X'00') OR THE LETTER 'P' (X'D7') 01931000
* (WHICH WOULD NORMALLY BE AN INVALID CCW) IS TREATED AS VALID 01932000
* WITH THE OP CODE BEING REPLACED BY A 'SEEK HEAD' (X'1B'). 01933000
* 01934000
* THIS TRANSFORMATION IS NECESSARY FOR EITHER NON-DEDICATED OR 01935000
* DEDICATED DASD DEVICES. 01936000
*. 01937000
SPACE 2 01938000
* HANDLE THE VARIOUS COMMANDS FOR NON-DEDICATED DASD DEVICES: 01939000
USING VDEVBLOK,R8 (IN EFFECT FROM MAIN CODE AT "CCWNEXT") 01940000
SPACE 01941000
DASDX1 DS 0H 01 - 11 - 31/B1 - 51/D1 - 71/F1 01942000
BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 01943000
CLI VIRCOMND,X'11' IS IT = 01, OR 11 (ERASE TRACK) ? 01944000
BNH DASDWRIT IF YES, TREAT AS GENERAL CASE WRITE 01945000
* 01946000
* HANDLE ALL "SEARCH ID COMMANDS" 01947000
TM VIRCOMND,X'10' CHECK X'10' BIT - ON FOR ALL SRCH ID'S 01948000
BZ CCWINVLD INVALID IF NOT A "1". 01949000
OI VIRFLAG,SMCOM OK, INDICATE STATUS-MODIFIER-TYPE COMMAND 01950000
TM VDEVTYPE,TYP3330+TYP3340+TYP3350+TYP3380 HRC011DK 01951590
* SPECIAL R0 RECORD PROCESSING 3330/3340/3350/3380 HRC011DK 01952180
BCR 8,R2 "BZ CCWGENRL" IF NOT, NO PROBLEM. 01953000
LH R15,VDEVRELN CHECK RELOCATION FACTOR 01954000
LTR R15,R15 IS IT ZERO ? 01955000
BCR 8,R2 <BZ> "BZ CCWGENRL" IF YES - TREAT AS GEN CASE 01956000
CL R4,F4 CHECK "BYTE-COUNT LESS 1" (STILL IN R4) 01957000
BCR 4,R2 "BL CCWGENRL" IF BYTE-COUNT WAS < 5 01958000
TM RCWFLAG,IDA HOPEFULLY IDA ISN'T SET @V2A2029 01959000
BZ SRCHID3 TRF IF NOT - CHECK THE BYTE NOW. 01960000
BAL R10,CNTRLSUB GO GET THE CONTROL INFORMATION. 01961000
CLI 4(R7),00 IS IT RECORD R0 ? 01962000
BH SRCHID5 IF NOT, DON'T RELOCATE IT. 01963000
SRCHID1 LH R15,0(,R7) RELOCATE CYLINDER NUMBER 01964000
CH R15,VDEVBND IS VIRTUAL CC ABOVE MINIDISK? @V56BDA8 01965000
BH SRCHID2 YES, INVALID OR ALTERNATE TRACK @V56BDA8 01966000
AH R15,VDEVRELN (CC OF CCHHR ONLY) 01967000
STH R15,0(,R7) ... 01968000
* 01969000
SRCHID2 STCM R7,7,RCWADDR+1 STORE R7 IN ADDRESS BYTES OF COMMAND 01970000
OI RCWCTL,RCWREL INDICATE ADDRESS CAN BE RELOCATED 01971000
NI RCWFLAG,255-IDA REAL IDA FLAG MUST NOT BE SET 01972000
B CCWNXT11 WE'RE ALL DONE HERE. 01973000
* 01974000
SRCHID3 LA R1,4(,R3) CHECK 5TH BYTE = "R" OF CCHHR 01975000
TRANBRNG DMKCCWB8,RETURN=BRING8 ... %V3M4038 01976000
BNZ CCWBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01977000
BRING8 LA R1,0(,R3) RESTORE R1 TO ITS USUAL VALUE @V386198 01978000
CLI 0(R2),00 IS IT RECORD R0 ? 01979000
BH CCWGENRL IF NOT RECORD R0, HANDLE AS GENERAL CASE 01980000
BAL R10,CNTRLSUB GET THE CONTROL BYTES, 01981000
B SRCHID1 NOW GO RELOCATE THE CYLINDER NUMBER. 01982000
* 01983000
SRCHID5 MVC 0(8,R7),ZEROES CLEAR CONTROL WORD AREA WE WON'T BE USING 01984000
LA R7,8(,R7) AND BUMP R7 UP BY 8 AGAIN. 01985000
* 01986000
SRCHID5A LA R14,CCWGENRL SET R14 TO "RETURN" TO CCWGENRL 01987000
* AND ... 01988000
CCWRES14 DS 0H SUBROUTINE TO RESTORE R3-R4 & R1 TO USUAL VALUES: 01989000
LM R3,R4,RCWCCW RESTORE R3-R4 01990000
N R4,XRIGHT16 ... 01991000
BCTR R4,0 ... 01992000
LA R1,0(,R3) ALSO R1 01993000
BR R14 AND "RETURN TO CALLER". 01994000
SPACE 1 01995000
DASDX2 DS 0H 02 - 12/92 - 22 01996000
CLI VIRCOMND,X'02' IS IT 02 OR MORE ? 01997000
BH CHEKREAD IF > 02, TREAT AS GENERAL CASE DASD. 01998000
* PERFORM NECESSARY SIMULATIONS FOR 02 = READ IPL: 01999000
XROOM 32 MUST BE ROOM FOR 3 COMMANDS + SEEK ARGS 02000000
MVI RCWCOMND,X'06' MAKE THE OP-CODE AN 06 = READ, AND SAVE 02001000
MVC RCWCCW+16,RCWCCW ALTERED COMMAND TO 16 BYTES LATER 02002000
L R10,SAVER10 ACCESS IOBLOK, 02003000
USING IOBLOK,R10 ... 02004000
MVC IOBCYL(2),VDEVRELN LET IOBCYL POINT TO USER'S 1ST CYL 02005000
DROP R10 02006000
SLR R0,R0 CLEAR 02007000
ST R0,VDEVPOSN USER'S DISK POSITION 02008000
BAL R10,CCWPUTSK PUT IN A SEEK RIGHT HERE 02009000
MVC RCWCCW(8),DUMRDIPL NOW PUT IN DUMMY CCW AS NEEDED, 02010000
LA R6,8(,R6) NOW ADVANCE TO WHERE WE PUT THE READ 02011000
BAL R14,CCWRES14 RESTORE R3-R4 AND R1, AND 02012000
* NOTE: R2 IS STILL INTACT = A(CCWGENRL) 02013000
MVI VIRCOMND,X'06' SET VIRTUAL CCW = 06 IN CASE DATA-CHAINED 02014000
B READSKIP GO CHECK FOR SKIP FLAG ON, ETC. 02015000
SPACE 1 02016000
DASDX3 DS 0H 03 - 13 - 23 - 53 - 73 02017000
CLI VIRCOMND,X'13' CHECK FOR 03 OR 13 02018000
BL HNDLNOOP IF < 13 (MUST BE 03), USE 0 ADDRESS ETC. 02019000
BE DASD1317 IF = 13 (RECALIBRATE), GO HANDLE THAT. 02020000
* HANDLE 23 (SET SECTOR), 53 (DIAG LOAD) OR 73 (DIAG WRITE): 02021000
BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02022000
TM VIRCOMND,X'70' IS IT '73' = DIAG WRITE ? 02023000
BO DASDWRIT TRF IF YES. 02024000
CLI VIRCOMND,X'53' IS IT A DIAG LOAD 02025000
BE DASDWRIT YES-- 02026000
BR R2 IT MUST BE X'23'--SET SECTOR 02027000
* THEREFORE GO TO 'CCWGENRL' 02028000
SPACE 1 02029000
DASDX4 DS 0H 04 - 24 - 44 - 94 - A4 - B4 02030000
LA R14,CONT1 RETURN ADDR IN R14 02031000
TM MEMO2,PRECCW IS THERE AN MSS PREFIX @VA13204 02032000
BZ DASDX4OK NO @VA13204 02033000
LA R0,ZEROES POINT TO CCHH = 0 @VA13204 02034000
L R15,FIRSTRCW FIRST RCWTASK ADDRESS @VA13204 02035000
LA R15,RCWHSIZ(R15) BUMP OVER HEADER @VA13204 02036000
STCM R0,7,1(R15) SET SEEK ARG PTR @VA13204 02037000
NI MEMO2,FULL-PRECCW SEEK ARG NOW SET @VA13204 02038000
DASDX4OK EQU * @VA13204 02039000
CLI VIRCOMND,X'44' CHECK TO SEE OF A READ DIAGNOSE 02040000
* STATUS 1 WAS ISSUED 02041000
BE CLASSCHK 02042000
CONT1 EQU * 02043000
CLI VIRCOMND,X'04' IS IT A "SENSE" OR SOMETHING ELSE ? 02044000
BE HNDLSENS TRF IF REAL SENSE (04). 02045000
TM VDEVTYPC,CLASURO COULD THIS BE A 3800? @V60B9BA 02046000
BZ CONT1A XFER IF NOT @V60B9BA 02047000
CLI VDEVTYPE,TYP3800 IS IT REALLY A 3800? @V60B9BA 02048000
BNE READSKIP XFER IF NOT @V60B9BA 02049000
CLI VIRCOMND,X'24' IS IT THE UNLOAD ERROR LOG? @V60B9BA 02050000
BNE READSKIP XFER IF NOT @V60B9BA 02051000
B DASDCKBU GO DO THE UNLOAD ERROR LOG @V60B9BA 02052000
CONT1A TM VDEVTYPC,CLASDASD+CLASTAPE IS THIS DASD OR TAPE?@V60B9BA 02053000
BZ READSKIP NOPE, BR. @V407438 02054000
TM VIRCOMND,X'94' DASD OR TAPE RESERVE OR RELEASE? @V407438 02055000
BNO DASDCKBU NOPE, BR. @V407438 02056000
* WE NOW KNOW THAT THE DEVICE TYPE IS DASD OR TAPE, AND THAT 02057000
* THE COMMAND IS A 94, B4 (DASD REL/RES) OR D4, OR F4 (TAPE REL/RES) 02058000
MVC RCWCTL(1),CCWCTL RES/REL, MAKE SURE FLAG IS SET @V407438 02059000
TM VIRCOMND,X'20' IS IT RLSE? (CHK RLSE BIT IN CCW) 02060000
BZ CKRLSE YA, NOT AFFECTED BY ALT PATH 02061000
L R15,VDEVREAL GET ADDRESS OF THE RDEVBLOK @V407438 02062000
USING RDEVBLOK,R15 ADDRESS THE RDEVBLOK @V407438 02063000
SLR R0,R0 FOR COMPARE @V407438 02064000
CL R0,RDEVCUB ALT CU DEFINED? @V407438 02065000
BNE ALTPATH YES, ALT PATH EXISTS, BR. @V407438 02066000
L R15,RDEVCUA GET THE RCUBLOK ADDRESS @V407438 02067000
DROP R15 @V407438 02068000
USING RCUBLOK,R15 ADDRESS THE RCUBLOK @V407438 02069000
TM RCUTYPE,RCUSUB IS THIS A SUBORDINATE CTL UNIT? @V407438 02070000
BZ *+8 NOPE, BR. @V407438 02071000
L R15,RCUPRIME ADDRESS THE PRIME THEN... @V407438 02072000
CL R0,RCUCHB ANY ALTERNATE CHANNEL DEFINED? @V407438 02073000
BNE ALTPATH YES, BR. MUST CHANGE TO SENSE @V407438 02074000
DROP R15 NO MORE RCUBLOK @V407438 02075000
CKRLSE TM VDEVFLAG,VDEVRSRL WILL RES/REL WORK ON DEVICE? @V407438 02076000
BO CKDEDDEV YES, GO CHECK FOR DEDICATED @V407438 02077000
TM VDEVFLG2,VDEVRRF WONT WORK ON REAL, WANT VIRT? @V407438 02078000
BZ CKDEDDEV NOPE, BR. @V407438 02079000
SPACE 02080000
* HERE WHEN EITHER 1) THERE ARE ALTERNATE PATHS TO THE DEVICE 02081000
* (IN WHICH CASE WE CANNOT LET A REAL RESERVE OR RELEASE WORK DUE 02082000
* TO POSSABILITY OF "LOCKOUT") OR 2) THE USER WANTS VIRT RES / REL 02083000
* FOR THE MINIDISK AND THE REAL DEVICE WILL NOT ACCEPT A RES / REL 02084000
* (IN WHICH CASE WE MUST GUARANTEE THAT IT WILL WORK BY CHANGING 02085000
* IT TO A SENSE. 02086000
SPACE 02087000
ALTPATH MVI RCWCOMND,X'04' CHANGE REAL CCW TO SENSE @V407438 02088000
CKDEDDEV TM VDEVSTAT,VDEVDED IS THE DEVICE DEDICATED? @V407438 02089000
BO HNDLSENS YES, BR. @V407438 02090000
* NOT DEDICATED, THEREFORE IT MUST BE MINIDISK 02091000
TM VDEVFLG2,VDEVRRF MDISK WITH RES/REL FEATURE? @V407438 02092000
BZ HNDLSENS NOPE, NO VIRT RES/REL TODAY @V407438 02093000
CLI VIRCOMND,X'94' IS THIS A DASD RELEASE? @V407438 02094000
BE DASD94 YES, BR. @V407438 02095000
CLI VIRCOMND,X'B4' DASD RESERVE? @V407438 02096000
BNE HNDLSENS NOPE, HANDLE LIKE A SENSE, BR. @V407438 02097000
OI MEMO3,RESINCHA INDICATE THAT WE HAVE SEEN A RESV@V407438 02098000
B HNDLSENS ... AND CONTINUE @V407438 02099000
SPACE 02100000
DASD94 L R10,SAVER10 GET THE IOB POINTER @V407438 02101000
USING IOBLOK,R10 ADDRESS THE IOB @V407438 02102000
OI IOBSPEC2,IOBUNREL FLAG RELEASE FOR DMKUNTFR @V407438 02103000
SPACE 02104000
DROP R10 NO MORE IOBLOK @V407438 02105000
* 02106000
* HANDLE "SENSE" (04), "RELEASE" (94), OR "RESERVE" (B4): 02107000
HNDLSENS TM RCWFLAG,SKIP IS SKIP FLAG SET IN SENSE TYPE COMMAND ? 02108000
BO HNDLNOOP YES, USE 0 ADDR, DON'T CLEAR SENSE BYTES 02109000
IC R15,CCWCTL SET CP CONTROL BYTE (FOR HANDLING SENSE 02110000
STC R15,RCWCTL TYPE COMMAND ON 3330/40/50/80 HRC011DK 02111490
* 2305 OR PSEUDO 2311 02112000
TM VDEVFLAG,VDEVUC ARE VIRTUAL DEVICE BYTES PRESENT ? 02113000
BO HNDLXSEN IF YES, USE EXISTING SENSE DATA 02114000
CLI RCWCTL,00 NO, WILL THE SENSE BYTES NEED ADJUSTING ? 02115000
BCR 8,R2 "BZ CCWGENRL" IF NOT - REALLY DO THE SENSE 02116000
CLI RCWCTL,RCW2311 SIMULATED 2311 ? 02117000
BE CCWSENJN YES - DMKUNTFR MUST ADJUST SENSE BYTES 02118000
LH R15,VDEVRELN CHECK RELOCATION FACTOR 02119000
LTR R15,R15 IS IT ZERO ? 02120000
BNZ CCWSENJN NONZERO - SET UP FOR DMKUNTFR ETC. 02121000
* 02122000
NOUNREL NI RCWCTL,255-(RCWHMR+RCW2311) DON'T PLAY DMKUNTFR GAMES 02123000
B CCWGENRL AFTER ALL - TREAT AS GENERAL CASE INSTEAD 02124000
* 02125000
HNDLXSEN DS 0H HANDLE EXISTING SENSE BYTES: 02126000
OI MEMO3,XFERSENS SENSE DATA MOVED TO VIRT STG. @V407438 02127000
L R2,VDEVIOER POINT TO IO ERROR BLOCK 02128000
CLI CCWCTL,00 DO WE HAVE TO MANIPULATE THE SENSE BYTES? 02129000
BE PUTSENS NOPE (NOT 3330 OR FAKE 2311). 02130000
CALL DMKUNTRS YES - RELOCATE THE SENSE BYTE INFORMATION 02131000
PUTSENS DS 0H PUT AVAILABLE SENSE BYTES IN USER CORE: 02132000
USING IOERBLOK,R2 02133000
LH R14,IOERLEN GET LENGTH OF SENSE BYTES 02134000
LTR R14,R14 NO SENSE: DID NOT START @VA10398 02134010
BZ ZEROLNG @VA10398 02134020
BCTR R14,0 LESS 1 02135000
ZEROLNG DS 0H @VA10398 02135010
CLR R14,R4 SEE WHICH COUNT IS LESS 02136000
BNL SENSR4OK OK IF R4 WAS LESS OR EQUAL 02137000
LR R4,R14 USE R14 COUNT IF IT WAS LESS 02138000
DROP R8 02139000
SENSR4OK LA R8,IOERDATA NOW POINT TO THE SENSE DATA 02140000
DROP R2 02141000
TM PRVFLAG,CD PREVIOUS SENSE DATA CHAINED ? @VA03389 02142000
BZ *+8 NO..CONTINUE... @VA03389 02143000
SLR R14,R4 ADJUST SENSE BYTES @VA03389 02144000
ALR R8,R14 .... @VA03389 02145000
BAL R10,CNTRLSBW PUT THE SENSE-BYTES IN THE USER'S CORE 02146000
USING VDEVBLOK,R8 02147000
NI RCWFLAG,255-IDA ENSURE IDA FLAG NOT SET 02148000
OI RCWFLAG,SKIP AND NO TRANSMIT OF DATA, PLEASE 02149000
* LEAVE VIRT. ADDRESS (AS IS) IN THE CCW, & 02150000
* FINISH UP (NO CHECK FOR PROT. VIOL.) 02151000
L R8,SAVER8 RESTORE ADDRESS OF VDEVBLOK @VA08629 02151050
AL R8,VMDVSTRT GET TO RIGHT ONE @VA08629 02151075
CLI VDEVTYPC,CLASGRAF LOOKING FOR 2250/3250 FOR @VA08629 02151100
BNE HNDLNOOP SPECIAL PROCESSING @VA08629 02151125
TM VDEVTYPE,TYP2250 ... @VA08629 02151150
BZ HNDLNOOP NOT FOUND @VA08629 02151175
TM VIRFLAG,CC+CD LOOKING FOR STANDALONE SENSE @VA08629 02151200
BNZ HNDLNOOP NOT STANDALONE @VA08629 02151225
L R10,FIRSTRCW MAKE SURE THIS WAS FIRST @VA08629 02151250
CL R10,THISRCW COMMAND IN THE CHAIN @VA08629 02151275
BNE HNDLNOOP NO, FORGET IT @VA08629 02151300
LA R10,RCWHSIZ(,R10) POINT TO REAL SENSE @VA08629 02151325
CLR R10,R6 IS SENSE FIRST COMMAND @VA08629 02151350
BNE HNDLNOOP NO, FORGET IT @VA08629 02151375
USING IOBLOK,R10 ... @VA08629 02151400
L R10,SAVER10 GET ADDRESS OF IOBLOK @VA08629 02151425
OI IOBSPEC3,IOBSENSE TURN ON SPECIAL BIT FOR VSI @VA08629 02151450
L R1,VDEVIOER ADDRESS OF IOERBLOK @VA08629 02151475
USING IOERBLOK,R1 ADDRESSABILITY @VA08629 02151500
LH R1,IOERLEN NO. CP SENSE BYTES @VA08629 02151525
LH R14,RCWCCW+6 SENSE LENGTH SPECIFIED IN CCW @VA08629 02151550
CLR R1,R14 SEE WHICH COUNT IS LESS @VA08629 02151575
BNL *+8 USE LOWER OF TWO @VA08629 02151600
STH R1,IOBCSW+6 SAVE TO CALCULATE RESIDUAL COUNT @VA08629 02151625
DROP R1 @VA08629 02151650
B ZEROADDR CONTINUE ALONG TRANSLATION @VA08629 02151675
HNDLNOOP EQU * 02152000
TM RCWFLAG,IDA IS IDA PRESENT? 02153000
BZ ZEROADDR NO, BR @VA05221 02154000
OI VIRFLAG,SVSEN YES - SET TO SAVE SENS DATA 02155000
B CTLCMDID AND GO CHECK THE IDAL. 02156000
ZEROADDR SLR R15,R15 ZERO WORK REGISTER @VA05221 02157000
STCM R15,7,RCWADDR+1 ZERO DATA ADDRESS @VA05221 02158000
B CCWNXT10 CLEAR SENSE @VA06244 02159000
SPACE 2 02160000
DASDX5 DS 0H 05 - 15 - 25 - 35 - 45 - 55 - 65 - 75 ETC 02161000
BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02162000
CLI VIRCOMND,X'15' IS IT "WRITE RECORD R0" ? 02163000
BL DASDWRIT IF < 15, TREAT AS GENERAL CASE WRITE. 02164000
BH DASDSRCH IF > 15, TREAT AS GENERAL CASE "SEARCH". 02165000
* HANDLE "WRITE RECORD R0" 02166000
TM VDEVTYPE,TYP2311+TYP2314+TYP2305 VALID DEVICE TYPE 02167000
BNZ DASDWRIT IF YES (ANY OF THE ABOVE) GO AHEAD. 02168000
TM MEMO2,SKCECYL TEST FOR CE CYLINDER @V304498 02169000
BO DASDWRIT YES, PERMIT IT'S EXECUTION @V304498 02170000
* BUT FOR ANY OTHER (E.G. 3330/3340/3350/3380), HRC011DK 02171590
* READ ON NON-TRANSMIT, INSTEAD OF WRITING: HRC011DK 02172180
MVI RCWCOMND,X'16' SUBSTITUTE "READ RECORD R0" 02173000
OI RCWFLAG,SKIP+SILI AND DON'T TRANSMIT ANY DATA @VA06304 02174000
TM VDEVFLAG,VDEVRDO IS THE DASD DEVICE "READ ONLY" ? 02175000
BZ CLEARADD IF NOT, CLEAR ADDRESS FIELD & FINISH UP. 02176000
CCWFORCE NI RCWFLAG,SKIP+SILI WRITE ON R/O DASD - KEEP THESE 2 BITS 02177000
OI RCWFLAG,X'03' BUT STILL FORCE A CHANNEL PROGRAM CHECK 02178000
B CCWBAD2 AND USE 00FFFFFF FOR THE 1ST WORD, ETC. 02179000
SPACE 1 02180000
DASDX6 DS 0H 06/86 - 16/96 02181000
BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02182000
TM RCWFLAG,SKIP WAS SKIP-FLAG SET ? 02183000
BO CLEARADD TRF IF YES - DON'T LOCK ANY PAGES. 02184000
TM VIRCOMND,X'10' IS IT A "READ RECORD R0" (16 OR 96) ? 02185000
BO DASDRDR0 TRF IF YES - GO HANDLE. 02186000
* 02187000
* IF READ (06/86), THAT'S SIMPLE UNLESS WE HAVE ISAM CHECKING: 02188000
DASDRD06 DS 0H 06 OR 86 FOR A DASD DEVICE: 02189000
AIF (NOT &ISAM).READ06 02190000
TM MEMO1,CHEKISAM SHOULD WE CHECK FOR ISAM READS ? 02191000
BCR 8,R2 "BZ CCWGENRL" IF NOT, FORGET IT. 02192000
CL R4,F9 BYTE-COUNT-LESS-1 WILL BE 9 IF ISAM READ 02193000
BCR 7,R2 "BNE CCWGENRL" IF NOT - FORGET IT 02194000
TM RCWFLAG,CC FOR ISAM, WE MUST HAVE CC SET 02195000
BCR 8,R2 "BZ CCWGENRL" IF CC NOT SET 02196000
CLI RCWCOMND,X'06' OP-CODE MUST BE A REAL '06' 02197000
BCR 7,R2 "BNE CCWGENRL" IF '86' OR SUCH 02198000
TM RCWADDR+3,X'07' LAST 3 BITS OF VIRTUAL ADDRESS = 7 ? 02199000
BCR 14,R2 <BNO> BNO CCWGENRL IF NOT - NOT AN ISAM READ. 02200000
OI RCWCTL,RCWISAM SIGNAL: THIS IS AN ISAM READ 02201000
OI MEMO1,HADISAM AND SIGNAL WE'VE HAD AT LEAST ONE 02202000
L R14,THISRCW GET ADDRESS OF THIS RCWTASK @VA04000 02203000
USING RCWTASK,R14 @VA04000 02204000
LH R15,RCWCCNT GET SIZE OF ENTIRE RCWTASK @VA04000 02205000
SLL R15,3 MAKE IT IN BYTES @VA04000 02206000
ALR R15,R14 POINT TO THE END OF RCWTASK @VA04000 02207000
SL R15,F4 LESS 4 BYTES @VA04000 02208000
DROP R14 @VA04000 02209000
LR R14,R6 OBTAIN DISPLACEMENT OF THIS READ 02210000
SL R14,THISRCW FROM BEGINNING OF THIS RCWTASK 02211000
ST R14,0(,R15) SAVE DISP. IN LAST WORD OF @VA04000 02212000
* RCWTASK 02213000
OI MEMO2,HADISAM AND INDICATE WE'VE NOW HAD AN ISAM READ 02214000
.READ06 ANOP 02215000
BR R2 "B CCWGENRL" - GO HANDLE DASD READ OF 06 02216000
SPACE 02217000
* HANDLE "READ RECORD R0" ... 02218000
DASDRDR0 TM VDEVTYPE,TYP2311+TYP2314 IS IT 2311/2314/2319 ? 02219000
BCR 7,R2 "BNZ CCWGENRL" IF YES - GENERAL CASE 02220000
* 02221000
* READ RECORD R0 FOR 3330 (OR EQUIVALENT SITUATION), 02222000
* SET FLAG-BIT FOR "UNTRANS" TO "UNRELOCATE" THE CYLINDER NUMBER: 02223000
TM VIRCOMND,X'60' SHOULD BE EITHER 16 OR 96 02224000
BZ CCWRHARZ IT'S OK 02225000
B CCWINVLD INVALID IF 1ST HALF-BYTE NOT 1 OR 9 02226000
SPACE 1 02227000
AIF (NOT &ISAM).NOISAM2 02228000
DASDX0 DS 0H CHECK OP-CODE OF 00 (NORMALLY INVALID): 02229000
TM MEMO1,HADISAM BUT HAVE WE HAD AN ISAM READ ? 02230000
BZ CCWINVLD NO - THE CCW IS DEFINITELY INVALID. 02231000
CLI RCWCOMND,X'00' IS THE CCW SPECIFICALLY 00 ? 02232000
BE CCWSUB1B YES- SUBSTITUTE A SEEK HEAD 02233000
CLI RCWCOMND,C'P' IS THE CCW SPECIFICALLY 'P' 02234000
BNE CCWINVLD IF NOT, DON'T PLAY ANY GAMES. 02235000
CCWSUB1B MVI RCWCOMND,X'1B' FOR ISAM CCW'S 00 OR D7(P) LET'S 02236000
MVI VIRCOMND,X'1B' SUBSTITUTE A SEEK HEAD CCW. 02237000
TM VDEVSTAT,VDEVDED IS THE DASD DEVICE DEDICATED ? 02238000
BO DEDDSEEK YES. 02239000
B DASDSKHD NO - ADVANCE TO SEEK ROUTINE @V56BDA8 02240000
.NOISAM2 ANOP 02241000
SPACE 02242000
DASDX7 DS 0H 07 - 17 02243000
CLI VIRCOMND,X'17' IS IT 07 OR 17 ? 02244000
BL DASDSEEK TRF IF 07. 02245000
AIF (&ISAM).ISAMP 02246000
BH CCWINVLD INVALID COMMAND IF > 17 02247000
.ISAMP AIF (NOT &ISAM).NOISAMP 02248000
BH DASDX0 INVALID COMMAND; OR ISAM C'P' 02249000
.NOISAMP ANOP 02250000
* HANDLE "RESTORE" (17) OR "RECALIBRATE" (13) COMMAND: 02251000
DASD1317 DS 0H ... 02252000
L R10,SAVER10 REFERENCE IOBLOK 02253000
USING IOBLOK,R10 ... 02254000
MVC IOBCYL(2),VDEVRELN LET IOBCYL POINT TO USER'S 1ST CYL 02255000
SLR R0,R0 CLEAR 02256000
ST R0,VDEVPOSN USER'S VIRTUAL CCHH ARM POSITION 02257000
OI MEMO1,NEEDSEEK SIGNAL - WE MUST HAVE A SEEK ASAP 02258000
TM RCWFLAG,CC+SILI DOES IT LOOK LIKE CMD WILL SUCCEED ? 02259000
BO CLEARADD YES- IOBSYL OK, GO TEST FOR IDA @VA03179 02260000
STH R0,IOBCYL NO - STORE 0000 IN IOBCYL INSTEAD 02261000
B CLEARADD AND GO CHECK FOR IDA @VA03179 02262000
DROP R10 02263000
SPACE 1 02264000
DASDX9 DS 0H 19 - 29/A9 - 39/B9 - 49/C9 - 69/E9 02265000
BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02266000
CLI VIRCOMND,X'19' IS IT "WRITE HOME ADDRESS" ? 02267000
BH DASDSR39 IF > 19, CHECK FOR SEARCH HOME ADDRESS EQ 02268000
BL CCWINVLD (ERROR IF < 19) 02269000
* HANDLE "WRITE HOME ADDRESS" 02270000
TM VDEVFLAG,VDEVRDO IS THE DASD DEVICE "READ ONLY" ? 02271000
BO CCWFORCE IF YES, FORCE A CHANNEL PROGRAM CHECK 02272000
TM VDEVTYPE,TYP2311+TYP2314+TYP2305 VALID DEVICE TYPE 02273000
BNZ RELHOMAD IF YES, RELOCATE CYLINDER NO. & FINISH UP 02274000
TM MEMO2,SKCECYL TEST FOR CE CYLINDER @V304498 02275000
BO RELHOMAD YES, PERMIT IT'S EXECUTION @V304498 02276000
* FOR ANY OTHER DEVICE, READ NON-TRANSMIT INSTEAD OF WRITING: 02277000
MVI RCWCOMND,X'1A' SUBSTITUTE "READ HOME ADDRESS" 02278000
SETSKIP OI RCWFLAG,SKIP+SILI FORCE NON-TRANSMIT @VA06304 02279000
B CLEARADD AND GO FINISH UP. 02280000
* 02281000
* FOR ALLOWABLE "WRITE HOME ADDRESS", RELOCATE THE CC IN THE DATA: 02282000
RELHOMAD BAL R14,CHEKRELN CHECK FOR RELOCATION FACTOR = 0 ETC. 02283000
BCR 8,R2 <BZ> BZ CCWGENRL IF YES - TREAT AS GEN CASE 02284000
BAL R10,CNTRLSUB GET THE CONTROL BYTES WE NEED 02285000
LH R15,1(,R7) PICK UP CC (2ND AND 3RD BYTES) 02286000
AH R15,VDEVRELN ADD RELOCATION FACTOR 02287000
STH R15,1(,R7) AND STORE BACK AGAIN. 02288000
TM VDEVFLAG,VDEV231B BOTTOM HALF OF SIMULATED 2311 ? 02289000
BZ SRCHID2 NOPE - JUST FINISH UP. 02290000
LH R15,3(,R7) YES - GET HEAD NUMBER 02291000
AL R15,F10 ADD 10 FOR BOTTOM HALF FAKE 2311 02292000
STH R15,3(,R7) AND STORE IT BACK; 02293000
B SRCHID2 NOW GO FINISH UP. 02294000
SPACE 1 02295000
DASDSR39 DS 0H HANDLE VARIOUS STATUS-MODIFIER TYPE COMMANDS: 02296000
OI VIRFLAG,SMCOM REMEMBER STATUS-MODIFIER TYPE 02297000
TM VIRCOMND,X'39' IS IT 39/B9 (SEARCH HOME ADDRESS EQ) ? 02298000
BCR 14,R2 "BNO CCWGENRL" IF NOT, HANDLE AS USUAL CASE 02299000
BAL R14,CHEKRELN CHECK FOR RELOCATION FACTOR = 0 ETC. 02300000
BCR 8,R2 <BZ> "BZ CCWGENRL" IF YES - TREAT AS GEN CASE 02301000
BAL R10,CNTRLSUB SEARCH HOME ADDRESS EQ - GET CNTRL BYTES 02302000
TM VDEVFLAG,VDEV231B BOTTOM HALF OF SIMULATED 2311 ? 02303000
BZ SRCHID1 NOPE - JUST RELOCATE THE CYLINDER NO. 02304000
LH R15,2(,R7) YES - ADD 10 TO THE HEAD NUMBER FIRST 02305000
AL R15,F10 ... 02306000
STH R15,2(,R7) ... 02307000
B SRCHID1 NOW GO RELOCATE THE CYLINDER NUMBER. 02308000
SPACE 1 02309000
DASDXA DS 0H 1A/9A = "READ HOME ADDRESS" 02310000
CLI VIRCOMND,X'1A' CHECK FOR VALID READ HOME ADDRESS CCW 02311000
BE CCWRHA YES - GOT IT. 02312000
CLI VIRCOMND,X'9A' OR POSSIBLY 9A ... 02313000
BNE CCWINVLD NOPE - IT'S INVALID, THEN. 02314000
CCWRHA LTR R4,R4 CHECK "BYTE COUNT LESS 1" 02315000
BZ CHEKREAD IF BYTE COUNT WAS ONLY 1, JUST GEN. CASE 02316000
BAL R10,PUTSEEK PUT IN A SEEK (IF NEEDED) 02317000
TM RCWFLAG,SKIP SKIP FLAG SET ? 02318000
BO CLEARADD YES - JUST USE 0 ADDRESS ETC. AS USUAL. 02319000
* 02320000
* HANDLE READ HOME ADDRESS (1A OR 9A), READ RECORD R0 (16 OR 96), OR 02321000
* SENSE TYPE COMMANDS (04|94|B4), IN CASES WHERE IT WILL BE NECESSARY 02322000
* FOR "UNTRANS" (DMKUNTFR) TO "UN-RELOCATE" THE CYLINDER <& HEAD> 02323000
* NUMBER WHEN THE CCW STRING HAS BEEN EXECUTED, AND (HOPEFULLY) 02324000
* IF (AND ONLY IF) THE DATA WAS ACTUALLY READ IN: 02325000
* 02326000
CCWRHARZ DS 0H HANDLE READ HOME ADDRESS OR READ RECORD R0: 02327000
BAL R14,CHEKRELN CHECK FOR RELOCATION FACTOR = 0 ETC. 02328000
BCR 8,R2 <BZ> "BZ CCWGENRL" IF YES - TREAT AS GEN CASE 02329000
OI RCWCTL,RCWHMR SET FLAG FOR CNTRLSUB & DMKUNTFR USE 02330000
CCWSENJN DS 0H JOIN HERE FOR SENSE CASES - RCWCTL ALREADY SET: 02331000
TM PRVFLAG,CD WAS THE PREVIOUS CCW DATA-CHAINED ? 02332000
BO NOUNREL YES - DON'T TRY TO UN-RELOCATE ANYTHING 02333000
BAL R10,CNTRLSUB REMEMBER FIRST 8 BYTES (OR LESS) OF DATA 02334000
* IN OUR "CONTROL AREA" - SEE NOTES BELOW 02335000
BAL R14,CCWRES14 RESTORE R3-R4 & R1 TO THEIR USUAL VALUES 02336000
TM RCWFLAG,IDA IS IDA BY ANY CHANCE SET ? 02337000
BZ CCWMANY2 NO - LET "CCWMANY2" MAKE AN IDAL 02338000
B FWDIDAL YES - LET REGULAR USER-IDA LOGIC DO IT. 02339000
* 02340000
* IN EITHER CASE, WE WILL HAVE GENERATED AN IDAL IN OUR CONTROL AREA 02341000
* TO DO THE COMMAND, WITH THE FIRST 8 BYTES (OR LESS) OF THE "OLD" DATA 02342000
* SAVED IMMEDIATELY FOLLOWING THE IDAL, FOR USE BY DMKUNTFR, WHO WILL 02343000
* CHECK TO SEE IF THE DATA HAS CHANGED, BEFORE ATTEMPTING TO ADJUST THE 02344000
* INFORMATION (I.E. UN-RELOCATING THE CYLINDER <AND HEAD> DATA, 02345000
* OR ADJUSTING THE SENSE BYTES FOR A SIMULATED 2311). 02346000
SPACE 02347000
CHEKRELN TM VDEVFLAG,VDEV231B BOTTOM HALF OF SIMULATED 2311 ? 02348000
BCR 1,R14 <BO> YES - EXIT WITH CONDITION-CODE = 3 02349000
LH R15,VDEVRELN CHECK DASD CYLINDER RELOCATION FACTOR 02350000
LTR R15,R15 SET CONDITION CODE 02351000
BR R14 AND EXIT (WITH COND CODE SET) 02352000
SPACE 02353000
CHEKREAD EQU * 02354000
BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02355000
* 02356000
READSKIP TM RCWFLAG,SKIP WAS SKIP FLAG SET ? 02357000
BCR 8,R2 "BZ CCWGENRL" IF NOT - HANDLE AS USUAL. 02358000
* 02359000
CLEARADD DS 0H ADDRESS IS IRRELEVANT AND/OR SKIP FLAG IS SET: 02360000
* LEAVE VIRTUAL ADDRESS (AS IS) IN THE CCW, BUT 02361000
L R2,FFS -1 INTO R2 FOR BENEFIT OF PROTECTION-CHECKING 02362000
TM RCWFLAG,IDA IS IDA PRESENT? 02363000
BZ CCWNXT11 NO, BR. & CONTINUE 02364000
B CTLCMDID YES - GO HANDLE CONTROL CMD IDAL 02365000
SPACE 02366000
DASDXB DS 0H 0B - 1B - 2B 02367000
CLI VIRCOMND,X'1B' IS IT 0B, 1B, OR 2B ? 02368000
BL DASDSEEK TRF IF 0B (SEEK CYLINDER) 02369000
BH CLEARADD OR IF 2B (ORIENT) HANDLE THAT. 02370000
* HANDLE '1B' = SEEK HEAD: 02371000
BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02372000
SPACE 1 02373000
DASDSKHD TM MEMO3,SKALTCYL HAVE WE HAD A SEEK TO AN @V56BDA8 02374000
* ALTERNATE? 02375000
BZ DASDSEEK NO, NOTHING SPECIAL @V56BDA8 02376000
MVI RCWCOMND,X'FF' FORCE COMMAND REJECT @V56BDA8 02377000
L R10,SAVER10 GET IOB POINTER @V56BDA8 02378000
OI IOBSTAT-IOBLOK(R10),IOBALTSK FLAGGED SEEK HEAD @V56BDA8 02379000
SPACE 1 02380000
DASDSEEK DS 0H HANDLE VARIOUS "SEEK" COMMANDS: 02381000
TM RCWFLAG,CD DATA CHAINED SEEK ? @VA03619 02382000
BZ DASCTL NO..LEAVE COUNT AS IS.. @VA03619 02383000
CL R4,F3 COUNT LESS THAN 4 ? @VA03619 02384000
BNL DASCTL NO..LET IT GO.. @VA03619 02385000
B CCWINVLD TOO BAD @VA07271 02386000
DASCTL EQU * @VA03619 02387000
BAL R10,CNTRLSUB COUNT OK, GET THE SEEK ARGUMENTS 02388000
TM RCWFLAG,CC+CD COMMAND-CHAIN OR CHAIN-DATA ON ? 02389000
BNZ *+8 IF YES, ANOTHER CCW MUST FOLLOW. 02390000
OI VDEVFLAG,VDEVSAS IF NOT, SIGNAL STAND ALONE SEEK 02391000
BAL R10,CCWRELCH RELOCATE CYLINDER NUMBER 02392000
TM MEMO2,PRECCW IS THERE A PREFIX SEEK CCW @V60B6B8 02393000
BZ NORESET NO, CONTINUE @V60B6B8 02394000
L R1,FIRSTRCW PROCEED TO GET PREFIX CCW @V60B6B8 02395000
STCM R7,7,SEEKOFF(R1) POINT TO SEEK ARGUMENT @V60B6B8 02396000
NI MEMO2,FULL-PRECCW TURN OFF FLAG @V60B6B8 02397000
OI PRECTL(R1),RCWREL ADDRESS CAN BE RELOCATED @VA10883 02397100
NI PREFLAG(R1),255-IDA TURN IDA OFF @VA10883 02397200
B SRCHID2 LEAVE ARGUMENT IN RCWTASK @VA10883 02397300
NORESET EQU * @V60B6B8 02398000
CL R14,F4095 BEWARE ILLEGAL CYLINDER NUMBER 02399000
BE SRCHID2 LEAVE WELL ENOUGH ALONE IN THAT CASE. 02400000
BAL R14,CHEKRELN CHECK FOR RELOCATION FACTOR = 0 ETC. 02401000
BNZ SRCHID2 NOT 0, USE RELOCATED DATA IN CONTROL AREA 02402000
TM VIRFLAG,BADHEDNO ZERO - BEWARE INVALID HEAD NUMBER 02403000
BO SRCHID2 BAD - USE RELOCATED DATA AS ABOVE 02404000
B SRCHID5 OK - DON'T RELOCATE SEEK ARGS AFTER ALL. 02405000
SPACE 1 02406000
DASDXC EQU CCWINVLD READ BACKWARD INVALID FOR DASD DEVICES. 02407000
SPACE 1 02408000
DASDXD DS 0H 0D - 1D - 2D - 4D - 6D 02409000
BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02410000
CLI VIRCOMND,X'1D' IS IT WRITE (COUNT) KEY & DATA ? 02411000
BNH DASDWRIT TRF IF YES - EITHER 0D OR 1D. 02412000
* HANDLE GENERAL CASE OF "SEARCH" COMMANDS: 02413000
DASDSRCH DS 0H HANDLE VARIOUS "SEARCH" COMMANDS: 02414000
OI VIRFLAG,SMCOM SIGNAL: STATUS-MODIFIER TYPE COMMAND 02415000
BR R2 "B CCWGENRL" - HANDLE AS USUAL CASE. 02416000
SPACE 1 02417000
DASDXE EQU CHEKREAD 0E/8E - 1E/9E = GENERAL CASE OF DASD READ 02418000
SPACE 1 02419000
DASDXF DS 0H 0F - 1F 02420000
BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02421000
CLI VIRCOMND,X'1F' IS IT SET FILE-MASK OR SPACE COUNT ? 02422000
BL DASDX0F =0F = SPACE COUNT 02423000
BH CCWINVLD >1F - JUST SET THE SKIP FLAGBIT 02424000
* =1F = SET FILE MASK: 02425000
LA R4,1 IF SET FILE-MASK, MAKE SURE COUNT = 1 02426000
DASDXFJN STH R4,RCWCNT ... 02427000
BCTR R4,0 AND BYTE-COUNT LESS 1 IN R4, 02428000
BR R2 "B CCWGENRL" - HANDLE AS USUAL CASE. 02429000
* 02430000
DASDX0F CL R4,F2 SPACE COUNT: BYTE-COUNT SHOULD BE 3 OR LESS 02431000
BCR 13,R2 "BNH CCWGENRL" IF BYTE-COUNT NOT > 3 02432000
LA R4,3 IF > 3, MAKE IT 3 02433000
B DASDXFJN AND JOIN CODE ABOVE TO USE COUNT OF 3. 02434000
REJECT1 EQU * @VA14597 02434100
MVI RCWCOMND,INVCCW1 FORCE CMND REJECT @VA14597 02434300
B CCWINVLD INVALID CCW @VA14597 02434500
INVCCW1 EQU X'FE' FORCE CMND REJ. WITH FE CMMD CODE@VA14597 02434700
EJECT 02435000
* SUBROUTINE TO PUT IN A SEEK COMMAND WHEN NEEDED: 02436000
* R10 = RETURN-REGISTER 02437000
* ENTER AT "PUTSEEK" TO CHECK FOR ENOUGH ROOM FIRST 02438000
* 02439000
PUTSEEK EQU * CHECK IF SEEK NEEDED, PUT ONE IN IF YES 02440000
TM MEMO1,NEEDSEEK DO WE NEED ONE ? 02441000
BCR 8,R10 NO - RETURN IMMEDIATELY 02442000
XROOM 24 NEED TWO CCW'S + SEEK ARGS 02443000
* 02444000
* SUBROUTINE TO PUT IN A SEEK (WHERE NEEDED): 02445000
* 02446000
CCWPUTSK EQU * @VA01964 02447000
LM R14,R15,RCWCCW SAVE CCW UNDER CONSTRUCTION 02448000
MVC RCWCCW(8),DUMSEEK PUT IN DUMMY SEEK 02449000
SL R7,F8 DECREMENT CONTROL POINTER, 02450000
STCM R7,7,RCWADDR+1 STORE ADDRESS IN SEEK COMMAND. 02451000
TM MEMO2,PRECCW DO WE HAVE A PREFIX CCW @V60B6B8 02452000
BZ NORESETA NO, CONTINUE @V60B6B8 02453000
L R1,FIRSTRCW CURRENT RCW PTR @V60B6B8 02454000
STCM R7,7,SEEKOFF(R1) POINT PREFIX TO CORRECT ARG @V60B6B8 02455000
NI MEMO2,FULL-PRECCW TURN OFF FLAG @V60B6B8 02456000
NORESETA EQU * @V60B6B8 02457000
OI MEMO2,HADRCGEN SIGNAL CP GENERATED A CCW 02458000
LA R6,8(,R6) NOW BUMP R6 UP FOR NEXT CCW, 02459000
STM R14,R15,RCWCCW AND RESTORE THE CCW BEING BUILT 02460000
SLR R15,R15 R15 CLEAR PLEASE 02461000
L R14,VDEVPOSN GET CCHH VIRTUAL DASD POSITION, 02462000
SRDL R14,16 SHIFT R14-15 02463000
STM R14,R15,0(R7) STORE SEEK ARGUMENTS IN 00CCHH00 FORM AND 02464000
B CCWRELJN JOIN COMMON CODE IN "CCWRELCH" SURBOUTINE 02465000
EJECT 02466000
* 02467000
* SUBROUTINE TO RELOCATE CYLINDER/HEAD NUMBER: 02468000
* 02469000
CCWRELCH EQU * @VA01964 02470000
L R14,0(,R7) GET SEEK ADDRESS (BBCC FORM) 02471000
CLI VIRCOMND,X'1B' IS THIS A SEEK HEAD CCW ? @VA01964 02472000
BE CCWRELJN YES - DON'T CHECK CYLINDER @VA01964 02473000
NI MEMO2,255-SKCECYL CLEAR CE CYL FLAG @V304498 02474000
LH R15,VDEVBND NUMBER OF CYLS IN THIS MDISK @VA01964 02475000
CLR R14,R15 COMPARE WITH LIMIT (SHOULD BE LESS) 02476000
BNL CCWRLC3 IF TOO BIG, SUBSTITUTE A BIG NUMBER 02477000
CCWRELCE EQU * INITIALIZE SEEK ARGUMENT V304498 02478000
MVC VDEVPOSN(4),2(R7) NEW VIRTUAL CCHH FOR SEEK OR SEEK CYL 02479000
CCWRELJN AH R14,VDEVRELN IF OK, ADD RELOCATION FACTOR. 02480000
CCWRELAL EQU * DO NOT RELOCATE ALTERNATE @V56BDA8 02481000
* CYLINDERS 02482000
TM MEMO1,NEEDSEEK IS THIS THE FIRST SEEK ? @VA01964 02483000
BZ CCWRLC1 NO -- FORGET ABOUT 'IOBCYL' @VA01964 02484000
L R15,SAVER10 IOBLOK ADDRESS TO GR15 @VA01964 02485000
STH R14,IOBCYL-IOBLOK(,R15) SET VALID IOBCYL @VA01964 02486000
NI MEMO1,255-NEEDSEEK WE'VE HAD A SEEK ALREADY @VA01964 02487000
CCWRLC1 ST R14,0(,R7) STORE RELOCATED CYLINDER NUMBER. 02488000
TM VDEVFLAG,VDEV231T+VDEV231B IS THIS A "FAKE" 2311 ? 02489000
BCR 8,R10 EXIT IT NOT (R14 HOLDS RELOC. SEEK ARGS) 02490000
LH R15,4(,R7) IF FAKE 2311, PICK UP HH - HEAD NUMBER 02491000
CL R15,F9 CHECK FOR HIGHEST LEGITIMATE VALUE 02492000
BH CCWRLC4 BAD SHOW IF > 9. 02493000
TM VDEVFLAG,VDEV231B IS IT THE BOTTOM HALF ? 02494000
BCR 8,R10 IF NOT, EXIT FORTHWITH. 02495000
AL R15,F10 IF YES, ADD HEAD RELOCATION FACTOR OF 10 02496000
CCWRLC2 STH R15,4(,R7) STORE RELOCATED HEAD NUMBER 02497000
BR R10 AND EXIT. 02498000
* 02499000
CCWRLC3 TM VDEVTYPE,TYP3330+TYP3350 IS CE CYL AVAIL ? @V304498 02500000
BM CCWRLC6 YES, TEST FOR CE CYL SEEK ARG @V304498 02501000
TM VDEVTYPE,TYP3340 IS CE CYL AVAIL ? @V304498 02502000
BO CCWRLC10 YES, TEST FOR CE CYL SEEK ARG @V304498 02503000
CCWRLC3M L R14,F4095 SET "VERY LARGE" CYLINDER NO @V304498 02504000
NI MEMO1,255-NEEDSEEK WON'T GET PAST THIS CCW @VA01964 02505000
B CCWRLC1 AND GO STORE. 02506000
* 02507000
CCWRLC4 LA R15,255 SET "LARGE" HEAD NUMBER 02508000
OI VIRFLAG,BADHEDNO REMEMBER BAD HEAD NUMBER IN USE 02509000
B CCWRLC2 AND GO STORE. 02510000
SPACE 1 02511000
CCWRLC6 L R15,=F'1024' 3350 & 3330 (EMUL MODE) CE CYL @V304498 02512000
CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02513000
BE CCWRLC20 YES, SET CE CYL FLAG @V304498 02514000
B CCWRLC3M NO, PROCESS AS "VERY LARGE" CYL @V304498 02515000
CCWRLC10 L R15,VDEVREAL INITIALIZE "REAL DEVICE" ADDRESS @V304498 02516000
TM RDEVFTR-RDEVBLOK(R15),FTR35MB 3340 35MB VOL ? @V304498 02517000
BO CCWRLC30 YES, TEST FOR CE CYL ARG @V304498 02518000
* NO, TEST 3340 70MB VOLUME 02519000
L R15,=F'698' 3340 70MB CE CYL ADDR @V304498 02520000
CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02521000
BE CCWRLC20 YES, SET THE CE CYL FLAG @V304498 02522000
L R15,=F'699' 3340 70MB CE CYL ADDR @V304498 02523000
CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02524000
BE CCWRLC20 YES, SET THE CE FLAG @V304498 02525000
LA R15,2804 3344 CE CYL ADDR - HIGH @VA12810 02525200
CLR R14,R15 IS THE SEEK TO THE CE CYL ? @VA12810 02525400
BH CCWRLC3M NO, PROCESS AS "VERY LARGE" CYL @VA12810 02525600
L R15,=F'2800' 3344 CE CYL ADDRESS - LOW @V304498 02526000
CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02527000
BNL CCWRLC20 YES, GO SET CE CYL FLAG @VA12810 02528100
LA R15,696 IS IT A 3340-70 ALTERNATE CYL @VA12810 02528400
CLR R14,R15 ... @VA12810 02528700
BL CCWRLC3M NO, THEN GIVE SEEK REJECT @VA12810 02529000
LA R15,697 TRY THIS ALTERNATE CYL @VA12810 02529300
CLR R14,R15 IS IT THIS ONE ? @VA12810 02529600
BH CCWRLC3M NOT HERE EITHER, GIVE SEEK REJECT@VA12810 02529900
LA R15,696 IS IT A FULL-PACK MINI @VA12810 02530200
CH R15,VDEVBND ..... @VA12810 02530500
BH MAYBALTC NO, GO CHECK THE PRIMARY CYL ADDR@VA12810 02530800
B CCWRELAL OTHERWISE, NO NEED TO CHECK @VA12810 02531100
CCWRLC20 OI MEMO2,SKCECYL SET CE CYL FLAG @V304498 02532000
B CCWRELCE INITIALIZE SEEK ARGUMENT @V304498 02533000
CCWRLC30 L R15,=F'349' 3340 35MB CE CYL ADDR @V304498 02534000
CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02535000
BE CCWRLC20 YES, SET CE CYL FLAG @V304498 02536000
LA R15,348 3340 35MB ALT CYL ADDR ? @VA12810 02536100
CLR R14,R15 IS THE SEEK TO THE ALT CYL ? @VA12810 02536200
BNE CCWRLC3M NO, GO GIVE A SEEK REJECT @VA12810 02536300
LA R15,348 NO. OF 3340-35 PRIMARY CYLS @VA12810 02536400
CH R15,VDEVBND IS THIS A FULL PACK MINI ? @VA12810 02536500
BNH CCWRELAL YES, NO NEED TO CHECK PRIMARY CYL@VA12810 02536600
MAYBALTC CALL DMKTRKVA CHECK ALTERNATE CYLINDER ADDRESS @V56BDA8 02537000
LCTL C1,C1,VMSEG REESTABLISH CONTROL REG 1 @V56BDA8 02538000
LTR R1,R1 ERRORS? @V56BDA8 02539000
BM CCWRLC3M YES, DO NOT ALLOW @V56BDA8 02540000
SH R1,VDEVRELN CONVERT REAL TO VIRTUAL ADDRESS @V56BDA8 02541000
BM CCWRLC3M BELOW HIS MINI-DISK @V56BDA8 02542000
CLM R1,3,VDEVBND IS DEFECTIVE TRACK IN THIS @V56BDA8 02543000
* MINIDISK? 02544000
BNL CCWRLC3M NO, DO NOT ALLOW @V56BDA8 02545000
TM MEMO3,SKALTCYL HAVE WE ALREADY DONE ONE? @V56BDA8 02546000
BZ FIXSKHDS NO, CHECK OUT SEEK HEADS @V56BDA8 02547000
SKHDSFXD LH R14,2(,R7) REAL CYLINDER ADDRESS @V56BDA8 02548000
SH R14,VDEVRELN LESS RELOCATION FACTOR @V56BDA8 02549000
STH R14,VDEVPOSN REMEMBER CYLINDER POSITION @V56BDA8 02550000
MVC VDEVPOSN+2(2),4(R7) SAVE HEAD ADDRESS @V56BDA8 02551000
L R14,0(,R7) GET BACK 00CC @V56BDA8 02552000
B CCWRELAL REJOIN MAINLINE @V56BDA8 02553000
SPACE 1 02554000
FIXSKHDS OI MEMO3,SKALTCYL FLAG SEEK TO ALTERNATE CYLINDER @V56BDA8 02555000
L R15,FIRSTRCW ->FIRST RCWTASK @V56BDA8 02556000
DROP R6 @V56BDA8 02557000
USING RCWTASK,R15 @V56BDA8 02558000
SKHDSRCH LA R14,RCWCCW ->FIRST CCW IN RCWTASK @V56BDA8 02559000
USING RCWCCW,R14 @V56BDA8 02560000
LH R2,RCWRCNT NUMBER OF REAL CCWS @V56BDA8 02561000
LTR R2,R2 GOT ANY YET? @V56BDA8 02562000
BZ SKHDSFXD NO, ALL FINISHED @V56BDA8 02563000
SKHDLOOP CLI RCWCOMND,X'1B' SEEK HEAD? @V56BDA8 02564000
BNE NOTASKHD NO, CHECK NEXT CCW @V56BDA8 02565000
MVI RCWCOMND,X'FF' FORCE COMMAND REJECT @V56BDA8 02566000
L R1,SAVER10 GET IOB @V56BDA8 02567000
OI IOBSTAT-IOBLOK(R1),IOBALTSK FLAG A FLAGGED SEEK @V56BDA8 02568000
NOTASKHD LA R14,8(,R14) ->NEXT CCW @V56BDA8 02569000
BCT R2,SKHDLOOP CHECK IT OUT @V56BDA8 02570000
ICM R15,15,RCWPNT -->NEXT RCWTASK @V56BDA8 02571000
BNZ SKHDSRCH AND KEEP LOOKING @V56BDA8 02572000
B SKHDSFXD ALL FINISHED @V56BDA8 02573000
DROP R14,R15 @V56BDA8 02574000
USING RCWCCW,R6 @V56BDA8 02575000
EJECT 02576000
*. 02577000
* LOGIC FOR "DEDD" = DEDICATED DASD DEVICE CLASS 02578000
* 02579000
* DEDDX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 02580000
* WRITE SPECIAL COUNT KEY AND DATA (01) OR ERASE TRACK (11) 02581000
* ARE HANDLED AS GENERAL CASE OF DATA TRANSFER 02582000
* 02583000
* ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 02584000
* 02585000
* DEDDX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 02586000
* HANDLED AS GENERAL CASE "READ" 02587000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02588000
* 02589000
* DEDDX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 02590000
* FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 02591000
* IF NOT 03, HANDLES AS GENERAL CASE OF DATA TRANSFER 02592000
* 02593000
* DEDDX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 02594000
* IF SENSE (04) OR EQUIVALENT, STORES SENSE BYTES FROM VIRTUAL 02595000
* DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 02596000
* OTHERWISE, HANDLED AS GENERAL CASE "READ" 02597000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02598000
* 02599000
* DEDDX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 02600000
* WRITE DATA (05) AND WRITE RECORD R0 (15) 02601000
* ARE HANDLED AS GENERAL CASE OF DATA TRANSFER 02602000
* 02603000
* ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 02604000
* 02605000
* DEDDX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 02606000
* FOR READ DATA (06), DOES ISAM CHECKING (SEE "DASDX6" LOGIC) 02607000
* 02608000
* IF NOT 06, HANDLED AS GENERAL CASE "READ" 02609000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02610000
* 02611000
* DEDDX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 02612000
* FOR SEEK (07), CHECKS IF CCW IS COMMAND- OR DATA-CHAINED; 02613000
* IF NOT, SETS FLAG IN VIRTUAL DEVICE BLOCK (FOR DMKIOS) 02614000
* TO SIGNAL A STAND-ALONE SEEK. 02615000
* 02616000
* OTHERWISE, HANDLED AS GENERAL CASE OF DATA TRANSFER 02617000
* 02618000
* DEDDX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 02619000
* WRITE HOME ADDRESS (19) HANDLED 02620000
* AS GENERAL CASE OF DATA TRANSFER 02621000
* 02622000
* ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 02623000
* 02624000
* DEDDXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 02625000
* HANDLED AS GENERAL CASE "READ" 02626000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02627000
EJECT 02628000
* DEDDXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 02629000
* FOR SEEK CYLINDER (0B) OR SEEK HEAD (1B) CHECKS FOR POSSIBLE 02630000
* STAND-ALONE SEEK AS FOR 07 SEEK (SEE "DEDDX7" LOGIC ABOVE) 02631000
* 02632000
* OTHERWISE, HANDLED AS GENERAL CASE OF DATA TRANSFER 02633000
* 02634000
* DEDDXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 02635000
* HANDLED AS AN INVALID CCW 02636000
* 02637000
* DEDDXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 02638000
* WRITE KEY AND DATA (0D) OR WRITE COUNT KEY AND DATA (1D) 02639000
* ARE HANDLED AS GENERAL CASE OF DATA TRANSFER 02640000
* 02641000
* ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 02642000
* 02643000
* DEDDXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 02644000
* HANDLED AS GENERAL CASE "READ" 02645000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02646000
* 02647000
* DEDDXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 02648000
* HANDLED AS GENERAL CASE OF DATA TRANSFER 02649000
*. 02650000
SPACE 2 02651000
* HANDLE COMMANDS FOR DEDICATED DASD DEVICES ONLY: 02652000
SPACE 1 02653000
* DEDDX1 THRU DEDDX6 CODE "AT THE END" TO SOLVE ADDRESSABILITY SQUEEZE 02654000
SPACE 1 02655000
DEDDX7 DS 0H 07 - 17 02656000
CLI RCWCOMND,X'07' IS IT A SEEK (07) ? 02657000
BNE DEDDMON IF NOT X'07' JUST EXTRACT CYL-LOC@VA03670 02658000
* NOTE: ISAM CCW OF X'D7'(P) WILL WORK OK 02659000
DEDDSEEK TM RCWFLAG,CC+CD COMMAND-CHAIN OR CHAIN-DATA ON ? 02660000
BNZ DEDDMON IF SO, GO EXTRACT THE CYL-LOC @VA03670 02661000
OI VDEVFLAG,VDEVSAS IF NOT, SIGNAL STAND ALONE SEEK 02662000
SPACE 1 02663000
* SAVE CYLINDER NUMBER IN IOBCYL IN CASE MONITOR CLASS "SEEKS" ENABLED 02664000
DEDDMON BAL R10,CNTRLSUB GO DECIPHER THE CYLINDER NUMBER @VA03670 02665000
TM MEMO2,PRECCW IS THERE AN MSS PREFIX @V60B6B8 02666000
BZ NORESETC NOPE.... @VA11732 02667010
NI MEMO2,FULL-PRECCW TURN OFF THE FLAG @V60B6B8 02668000
L R1,FIRSTRCW PTR TO FIRST RCWTASK @V60B6B8 02669000
STCM R2,7,17(R1) POINT PREFIX TO SEEK ARG. @V60B6B8 02670000
NI PRECTL(R1),FULL-RCWREL DO NOT RELOCATE SEEK @VA13113 02670005
NORESETC DS 0H NO PREFIX ENTRY @VA11732 02670010
L R10,VDEVREAL GET THE RDEVBLOK @VA11732 02670020
TM RDEVFTR-RDEVBLOK(R10),VIRTUAL+SYSVIRT MSS TYPE @VA11732 02670030
BZ NORESETB NO .... CONTINUE @VA11732 02670040
TM VDEVFLG2,VDEVVIRT WAS IT VDEV AS VIRT @VA11732 02670050
BNO NORESETB NO ..... CONTINUE @VA11732 02670060
OI VIRFLAG,SMCOM ALLOW FOR STATUS MODIFIERABLE@VA11732 02670070
NORESETB EQU * SAVE SEEK CYL NUMBER @V60B6B8 02671000
L R10,SAVER10 RESTORE ADDRESS OF IOBLOK @VA03670 02672000
USING IOBLOK,R10 @VA03670 02673000
MVC IOBCYL(2),2(R7) MOVE CYLINDER NUMBER TO IOBLOK @VA03670 02674000
MVC VDEVPOSN(2),2(R7) SAVE CURRENT SEEK ARG @V60B6B8 02675000
DROP R10 @VA03670 02676000
B SRCHID5 RESTORE REGS AND GOTO CCWGENRL @VA03670 02677000
SPACE 1 02678000
* DEDDX9 THRU DEDDXF CODE "AT THE END" TO SOLVE ADDRESSABILITY SQUEEZE 02679000
EJECT 02680000
*. 02681000
* LOGIC FOR "TAPE" = TAPE DEVICE CLASS 02682000
* 02683000
* TAPEX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 02684000
* WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 02685000
* 02686000
* TAPEX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 02687000
* READ (02) HANDLED AS GENERAL CASE "READ" 02688000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02689000
* 02690000
* 02691000
* TAPEX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 02692000
* FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 02693000
* IF NOT 03, ADDRESS IN CCW IRRELEVANT - NO DATA TRANSFER OCCURS 02694000
* (BUT ANY EXISTING SENSE BYTES ARE CLEARED) 02695000
* 02696000
* TAPEX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 02697000
* IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 02698000
* DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 02699000
* OTHERWISE, HANDLED AS GENERAL CASE "READ" 02700000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02701000
* 02702000
* TAPEX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 02703000
* HANDLED AS AN INVALID CCW 02704000
* 02705000
* TAPEX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 02706000
* HANDLED AS AN INVALID CCW 02707000
* 02708000
* TAPEX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 02709000
* ADDRESS IN CCW IRRELEVANT - NO DATA TRANSFER OCCURS 02710000
* (BUT ANY EXISTING SENSE BYTES ARE CLEARED) 02711000
* 02712000
* TAPEX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 02713000
* HANDLED AS AN INVALID CCW 02714000
* 02715000
* TAPEXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 02716000
* HANDLED AS AN INVALID CCW 02717000
* 02718000
* TAPEXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 02719000
* FOR DIAGNOSTIC WRITE MODE SET (0B), HANDLES AS 02720000
* NO-OP (DOES NOT CLEAR SENSE BYTES IF ANY EXIST) 02721000
* 02722000
* FOR "TIE" (1B), HANDLES AS GENERAL CASE OF DATA TRANSFER, 02723000
* BUT FLAG IS SET TO SAVE SENSE BYTES (IF ANY EXIST) 02724000
* 02725000
* CHECKS FOR SET DIAGNOSE (4B) OR LOOP WRITE-TO-READ (8B); IF 02726000
* NEITHER, ADDRESS IN CCW IRRELEVANT - NO DATA TRANSFER OCCURS 02727000
* (BUT ANY EXISTING SENSE BYTES ARE CLEARED) 02728000
EJECT 02729000
* TAPEXB COMMANDS (CONTINUED): 02730000
* IF 4B OR 8B, CHECKS FOR DEVICE TYPE OF 3420 OR 3410: 02731000
* IF 3410 OR 3420, HANDLE AS GENERAL CASE OF DATA TRANSFER, 02732000
* BUT FLAG IS SET TO SAVE SENSE BYTES (IF ANY EXIST) 02733000
* 02734000
* IF 4B OR 8B (NOT 3410 OR 3420), ADDRESS IN CCW IRRELEVANT - NO 02735000
* DATA TRANSFER OCCURS (ANY EXISTING SENSE BYTES ARE CLEARED) 02736000
* 02737000
* TAPEXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 02738000
* IF = 0C, HANDLED AS A GENERAL CASE "READ BACKWARD" COMMAND 02739000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02740000
* (AND WITH APPROPRIATE HANDLING OF IDA IF DATA CROSSES A PAGE 02741000
* BOUNDARY OR IF IDA IS SET IN THE VIRTUAL READ BACKWARD CCW) 02742000
* 02743000
* IF NOT 0C, HANDLED AS AN INVALID CCW 02744000
* 02745000
* TAPEXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 02746000
* HANDLED AS AN INVALID CCW 02747000
* 02748000
* TAPEXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 02749000
* HANDLED AS AN INVALID CCW 02750000
* 02751000
* TAPEXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 02752000
* ADDRESS IN CCW IRRELEVANT - NO DATA TRANSFER OCCURS 02753000
* (BUT ANY EXISTING SENSE BYTES ARE CLEARED) 02754000
*. 02755000
SPACE 2 02756000
* HANDLE THE VARIOUS TAPE COMMANDS: 02757000
SPACE 1 02758000
* TAPEX1 THRU TAPEXA CODE "AT THE END" TO SOLVE ADDRESSABILITY SQUEEZE 02759000
SPACE 1 02760000
TAPEXB DS 0H VARIOUS CONTROL COMMANDS: 02761000
CLI VIRCOMND,X'1B' 0B OR 1B ? 02762000
BL HNDLNOOP IF 0B, USE 0 ADDRESS & DON'T CLEAR SENSE 02763000
BE TAPEXB2 IF 1B ("TIE") SAVE SENSE BYTES ETC. 02764000
TM VIRCOMND,X'C0' IS IT EITHER 4B OR 8B ? 02765000
BNM CLEARADD IF NOT, ADDRESS IS IRRELEVANT. 02766000
TM VDEVTYPE,TYP3420+TYP3410 IS IT A 3420 OR 3410? @VA04093 02767000
BZ CLEARADD IF NOT, ADDRESS IS IRRELEVANT. @VA04093 02768000
TAPEXB2 OI VIRFLAG,SVSEN SIGNAL: SAVE THE SENSE BYTES 02769000
BR R2 "B CCWGENRL" - HANDLE AS USUAL CASE. 02770000
SPACE 1 02771000
* TAPEXC THRU TAPEXF CODE "AT THE END" TO SOLVE ADDRESSABILITY SQUEEZE 02772000
EJECT 02773000
*. 02774000
* LOGIC FOR "TERM" = TERMINAL DEVICE CLASS 02775000
* 02776000
* TERMX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 02777000
* WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 02778000
* IF NOT 01, HANDLED AS AN INVALID CCW 02779000
* 02780000
* TERMX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 02781000
* READ (02) HANDLED AS GENERAL CASE "READ" 02782000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02783000
* 02784000
* IF NOT 02, 12 (FOR 2955), OR 42 (FOR 370X EMULATION LINE), 02785000
* HANDLED AS AN INVALID CCW 02786000
* 02787000
* TERMX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 02788000
* FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 02789000
* 02790000
* FOR SADZER (13), HANDLES AS DESCRIBED AT "TERMSAD" (BELOW) 02791000
* 02792000
* FOR MODE-SET (23), HANDLES AS GENERAL CASE OF DATA TRANSFER 02793000
* 02794000
* IF > 23, HANDLED AS AN INVALID CCW. 02795000
* 02796000
* TERMX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 02797000
* IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 02798000
* DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 02799000
* OTHERWISE, HANDLED AS GENERAL CASE "READ" 02800000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02801000
* 02802000
* IF RESERVE (F4) OR RELEASE (D4), CHANGES 02803000
* OP CODE TO 04, SETS SKIP & SILI FLAGBITS 02804000
* IN REAL CCW, AND HANDLES AS A NO-OP (DOES NOT CLEAR ANY 02805000
* EXISTING SENSE BYTES) 02806000
* 02807000
* IF NOT 04, F4, OR D4, HANDLED AS INVALID CCW 02808000
* 02809000
* TERMX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 02810000
* WRAP (05) HANDLED AS GENERAL CASE OF DATA TRANSFER 02811000
* IF NOT 05, HANDLED AS AN INVALID CCW 02812000
* 02813000
* TERMX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 02814000
* PREPARE (06) HANDLED AS GENERAL CASE "READ" 02815000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02816000
* 02817000
* IF NOT 06, HANDLED AS AN INVALID CCW 02818000
* 02819000
* TERMX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 02820000
* FOR SADONE (17), HANDLES AS DESCRIBED AT "TERMSAD" (BELOW) 02821000
* 02822000
* IF ENABLE (27), HANDLES AS GENERAL CASE OF DATA TRANSFER 02823000
* 02824000
* IF = 07 OR > 27, HANDLES AS AN INVALID CCW 02825000
EJECT 02826000
* TERMX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 02827000
* WRITE AUTO-POLL (09) TREATED AS A "STATUS MODIFIER" TYPE OF 02828000
* DATA TRANSFER; ALSO SETS FLAG TO REMEMBER THAT AN AUTO-POLL 02829000
* WAS PROCESSED (FOR SPECIAL HANDLING OF AUTO-POLL WRAP LIST). 02830000
* 02831000
* DIAL (29) HANDLED AS GENERAL CASE OF DATA TRANSFER 02832000
* 02833000
* IF NOT 09 OR 29, HANDLED AS AN INVALID CCW 02834000
* 02835000
* TERMXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 02836000
* INHIBIT (0A) HANDLED AS GENERAL CASE "READ" 02837000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02838000
* 02839000
* IF NOT 0A, HANDLED AS AN INVALID CCW 02840000
* 02841000
* TERMXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 02842000
* CHECKS THAT BITS FOR "SAD" CCW (X'13' BITS) ARE SET; 02843000
* INVALID CCW IF NOT; IF OK, HANDLE SADTWO (1B) AS FOLLOWS: 02844000
* "TERMSAD" - HANDLE TERMINAL "SAD" CCWS: 02845000
* GET "SAD" NUMBER FROM REAL DEVICE BLOCK; 02846000
* IF = 04, TREAT AS A NO-OP (WITH SKIP & SILI FLAGS SET) 02847000
* IF NOT = 04, THE "SAD" NUMBER IS ADDED TO THE "SAD" CCW 02848000
* TO PRODUCE THE APPROPRIATE OP CODE, AND THE SILI FLAG IS SET. 02849000
* 02850000
* TERMXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 02851000
* HANDLED AS AN INVALID CCW 02852000
* 02853000
* TERMXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 02854000
* BREAK (0D) HANDLED AS GENERAL CASE OF DATA TRANSFER 02855000
* IF NOT 0D, HANDLED AS AN INVALID CCW 02856000
* 02857000
* TERMXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 02858000
* SEARCH (0E) HANDLED AS GENERAL CASE "READ" 02859000
* ADDRESS PREPARE (1E) PSEUDO READ. SAME AS SEARCH (0E) 02860000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02861000
* 02862000
* IF NOT 0E OR 1E, HANDLE AS AN INVALID CCW 02863000
* 02864000
* TERMXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 02865000
* FOR SADTHREE (1F), HANDLES AS DESCRIBED ABOVE AT "TERMSAD" 02866000
* 02867000
* IF DISABLE (2F), HANDLES AS GENERAL CASE OF DATA TRANSFER 02868000
* 02869000
* IF > 2F, HANDLES AS AN INVALID CCW 02870000
*. 02871000
SPACE 2 02872000
* HANDLE VARIOUS COMMANDS FOR TERMINAL CLASS: 02873000
SPACE 02874000
TERMX1 DS 0H "WRITE" @VA01331 02875000
CLI VIRCOMND,01 SHOULD BE '01' @VA01331 02876000
BCR 8,R2 BE CCWGENRL IF YES. @VA01331 02877000
B CCWINVLD INVALID IF NOT 01. @VA01331 02878000
SPACE 2 02879000
TERMX2 DS 0H "READ" @VA01331 02880000
CLI VIRCOMND,02 SHOULD BE '02' @VA01331 02881000
BE READSKIP IF YES, GO CHECK SKIP FLAG @VA01331 02882000
CLI VIRCOMND,X'12' IS IT DIAG READ FOR 2955? @VA02607 02883000
BNE CKFOR42 NO,SEE IF X'42' CCW @VA03833 02884000
CLI VDEVTYPE,TYP2955 2955 COMMUNICATION LINE? @VA02607 02885000
BE READSKIP YES-GO CHECK SKIP FLAG @VA02607 02886000
B CCWINVLD INVALID CCW IF NOT THESE @VA02607 02887000
CKFOR42 CLI VIRCOMND,X'42' READ ON 370X EMUL. LINE? @VA03833 02888000
BNE CCWINVLD NO @VA03833 02889000
STM R0,R8,TEMPSAVE SAVE REGS TEMPORARILY @VA03833 02890000
L R8,VDEVREAL ADDRESS RDEVBLOK @VA03833 02891000
USING RDEVBLOK,R8 @VA03833 02892000
CLI RDEVTYPC,CLASTERM IS IT TERMINAL CLASS? @VA03833 02893000
BNE INVLD42 NO - BUT IT SHOULD BE @VA03833 02894000
CLC RDEVBASE,ZEROES IS THERE A BASE ADDRESS? @VA03833 02895000
BE INVLD42 NO - BUT THERE SHOULD BE @VA03833 02896000
LH R1,RDEVBASE BASE ADDRESS IN CCU FORM IN R1 @VA03833 02897000
CALL DMKSCNRU ADDRESS OF CCU'S RDEVBLOK IN R8 @VA03833 02898000
BC 7,INVLD42 RDEVBLOK NOT FOUND @VA03833 02899000
LA R1,CLASSPEC*256+TYP3704 DEV CLASS AND TYPE @VA03833 02900000
CH R1,RDEVTYPC IS IT REALLY A 370X? @VA03833 02901000
BNE INVLD42 NO - IT SHOULD BE @VA03833 02902000
CL R11,RDEVUSER IS 370X DEDICATED TO USER? @VA03833 02903000
BE OK42 YES - NO SECURITY PROBLEM THEN @VA03833 02904000
TM VMCLEVEL,X'FC' USER WITH JUST CLASS G OR H @VA03833 02905000
BZ INVLD42 NOT ALLOWED IF NOT DEDICATED @VA03833 02906000
USING VDEVBLOK,R8 @VA03833 02907000
OK42 LM R0,R8,TEMPSAVE RESTORE REGS @VA03833 02908000
B READSKIP GO CHECK SKIP FLAG @VA03833 02909000
INVLD42 LM R0,R8,TEMPSAVE RESTORE REGS @VA03833 02910000
B CCWINVLD INVALID CCW @VA03833 02911000
SPACE 02912000
TERMX3 DS 0H NOOP (03), SADZER (13), MODE-SET (23) 02913000
CLI VIRCOMND,X'13' IS IT 03 OR 13 ? 02914000
BL HNDLNOOP TRF IF 03 (NOOP). 02915000
BE TERMSAD TRF IF 13 (SADZER). 02916000
CLI VIRCOMND,X'23' IS IT MODE-SET ? 02917000
BCR 8,R2 "BE CCWGENRL" IF YES (GENERAL CASE) 02918000
B CCWINVLD INVALID COMMAND IF > 23. 02919000
SPACE 02920000
TERMX4 DS 0H SENSE (04), RELEASE (D4), OR RESERVE (F4) 02921000
CLI VIRCOMND,X'04' IS IT A REAL SENSE (04) ? 02922000
BE DASDX4 YES - CHECK WHETHER SKIP FLAG IS SET 02923000
* (NOTE: CCWCTL = 0) 02924000
CLI VIRCOMND,X'F4' RESERVE? @VA03178 02925000
BE TERMSENS YES @VA03178 02926000
CLI VIRCOMND,X'D4' RELEASE? @VA03178 02927000
BE TERMSENS YES @VA03178 02928000
B CCWINVLD INVALID CCW @VA03178 02929000
* 02930000
TERMSENS LA R15,04 FORCE AN OP-CODE OF "SENSE" 02931000
TERMSKIP OI RCWFLAG,SKIP SET SKIP (NON-TRANSMIT) FLAG 02932000
B TERMST15 GO STORE OP-CODE AND FINISH UP. 02933000
SPACE 02934000
TERMX5 DS 0H WRAP (05) 02935000
CLI VIRCOMND,X'05' SHOULD BE '05' 02936000
BCR 8,R2 "BE CCWGENRL" IF YES. 02937000
B CCWINVLD INVALID IF NOT 05. 02938000
SPACE 02939000
TERMX6 DS 0H PREPARE (06) 02940000
CLI VIRCOMND,X'06' SHOULD BE '06' 02941000
BE READSKIP IF YES, GO CHECK IF SKIP FLAG IS SET. 02942000
B CCWINVLD INVALID IF NOT 06. 02943000
SPACE 02944000
TERMX7 DS 0H SADONE (17) OR ENABLE (27) 02945000
CLI VIRCOMND,X'27' IS IT 17 OR 27 ? 02946000
BL CHEKSAD TRF IF 17 (SADONE). 02947000
BCR 8,R2 "BE CCWGENRL" IF 27 (ENABLE). 02948000
B CCWINVLD INVALID COMMAND IF > 27. 02949000
SPACE 02950000
TERMX9 DS 0H POLL (09) OR DIAL (29) 02951000
CLI VIRCOMND,X'09' IS IT 09 (AUTO-POLL) ? 02952000
BE STATMODC YES, SIGNAL STATUS-MODIFIER TYPE COMMAND 02953000
CLI VIRCOMND,X'29' NO, THEN IT BETTER BE DIAL (29) 02954000
BCR 8,R2 "BE CCWGENRL" IF YES 02955000
B CCWINVLD INVALID CCW IF NOT 09 OR 29. 02956000
SPACE 02957000
STATMODC OI VIRFLAG,SMCOM AUTOPOLL = STATUS-MODIFIER TYPE COMMAND 02958000
TM VMFSTAT,VMFAUTO VM USING AUTOPOLL HANDSHAKE ? @V386298 02959000
BOR R2 YES, FORGET ABOUT AUTOPOLL CCW. @V386298 02960000
OI MEMO2,HADAPOLL ELSE REMEMBER THAT THIS OCCURRED @V386298 02961000
BR R2 AND TREAT AS GENERAL CASE. 02962000
SPACE 02963000
TERMXA DS 0H INHIBIT (0A) 02964000
CLI VIRCOMND,X'0A' SHOULD BE '0A' 02965000
BE READSKIP IF YES, GO CHECK IF SKIP FLAG IS SET. 02966000
B CCWINVLD INVALID IF NOT 0A. 02967000
SPACE 02968000
TERMXB DS 0H SADTWO (1B) 02969000
CHEKSAD EQU * @VA03262 02970000
TM VIRCOMND,X'E0' POSSIBLE SAD ? @VA03262 02971000
BNZ CCWINVLD NO..INVALID CCW @VA03262 02972000
TM VIRCOMND,X'13' IS IT A SAD ? @VA03262 02973000
BNO CCWINVLD NO..INVALID CCW @VA03262 02974000
TERMSAD L R14,VDEVREAL POINT TO REAL DEVICE BLOCK 02975000
LTR R14,R14 (IF ANY) 02976000
BZ TERMSILI IF NOT THERE, LEAVE OP-CODE "AS IS" 02977000
USING RDEVBLOK,R14 02978000
SLR R15,R15 OBTAIN "SAD" NUMBER 02979000
IC R15,RDEVSADN ... 02980000
DROP R14 02981000
ALR R15,R15 IF 0, 1, 2, 3, MULTIPLY BY 4 02982000
ALR R15,R15 ... 02983000
C R15,F16 WAS IT RDEVSADN=4? (= NO-OP) @VA04021 02984000
LA R15,X'13'(,R15) PLUS X'13' = CORRECT "SAD" CCW COMMAND 02985000
BL TERMST15 NO -- STORE CORRECT SAD CMD @VA04021 02986000
LA R15,03 REPLACE SAD WITH NO-OP @VA04021 02987000
TERMST15 STC R15,RCWCOMND AND STORE CORRECT OP-CODE 02988000
TERMSILI OI RCWFLAG,SILI ENSURE SILI BIT IS SET 02989000
B HNDLNOOP AND GO FINISH UP. 02990000
SPACE 02991000
TERMXC EQU CCWINVLD "READ BACKWARD" IS INVALID. 02992000
SPACE 02993000
TERMXD DS 0H BREAK (0D) 02994000
CLI VIRCOMND,X'0D' SHOULD BE '0D' 02995000
BCR 8,R2 "BE CCWGENRL" IF YES. 02996000
B CCWINVLD INVALID IF NOT 0D. 02997000
SPACE 02998000
TERMXE DS 0H SEARCH (0E), ADPREP (1E) @VA05750 02999000
CLI VIRCOMND,X'0E' SHOULD BE '0E' 03000000
BE READSKIP IF YES, GO CHECK IF SKIP FLAG IS SET. 03001000
CLI VIRCOMND,X'1E' OR 'ADDRESS PREPARE' COMMAND @VA05750 03002000
BNE CCWINVLD INVALID IF NOT (0E) OR (1E) @VA07025 03003000
OI VIRFLAG,SMCOM STATUS MODIFIER COMMAND @VA07025 03004000
B READSKIP GO TO CHECK SKIP FLAG @VA07025 03005000
SPACE 03006000
TERMXF DS 0H SADTHREE (1F) OR DISABLE (2F) 03007000
CLI VIRCOMND,X'2F' IS IT 1F OR 2F ? 03008000
BL CHEKSAD TRF IF 1F (SADTHREE). 03009000
BCR 8,R2 "BE CCWGENRL" IF 2F (DISABLE). 03010000
B CCWINVLD INVALID COMMAND IF > 2F. 03011000
EJECT 03012000
*. 03012008
* LOGIC FOR "SDLC" = TERMINAL DEVICE CLASS-ICA SDLC TYPE 03012016
* 03012024
* SDLCX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 03012032
* WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 03012040
* OTHERWISE HANDLED AS AN INVALID CCW 03012048
* 03012056
* SDLCX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 03012064
* READ (02) HANDLED AS GENERAL CASE OF READ 03012072
* (CHECK FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03012080
* OTHERWISE HANDLED AS AN INVALID CCW 03012088
* 03012096
* SDLCX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 03012104
* NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 03012112
* SET-MODE (23), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012120
* OTHERWISE HANDLED AS AN INVALID CCW 03012128
* 03012136
* SDLCX4 = "SENSE" COMMANDS WITH THE LAST 4 BITS = 4: 03012144
* SENSE (04), STORES SENSE BYTES FROM VIRTUAL DEVICE BLOCK 03012152
* IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 03012160
* OTHERWISE, HANDLED AS GENERAL CASE OF READ 03012168
* (CHECK FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03012176
* SENSE SCB (14), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012184
* SENSE I/O (E4), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012192
* OTHERWISE HANDLED AS AN INVALID CCW 03012200
* 03012208
* SDLCX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5: 03012216
* WRITE PIU (05), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012224
* OTHERWISE HANDLED AS AN INVALID CCW 03012232
* 03012240
* SDLCX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 03012248
* READ PIU (06), HANDLED AS GENERAL CASE OR READ 03012256
* (CHECK FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03012264
* OTHERWISE HANDLED AS AN INVALID CCW 03012272
* 03012280
* SDLCX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 03012288
* ENABLE (27), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012296
* OTHERWISE HANDLED AS AN INVALID CCW 03012304
* 03012312
* SDLCX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 03012320
* AUTOPOLL (09), TREATED AS A "STATUS MODIFIER" TYPE OF DATA 03012328
* TRANSFER; ALSO SET FLAG TO REMEMBER THAT AN AUTOPOLL WAS 03012336
* PROCESSED (FOR SPECIAL HANDLING OF AUTO-POLL WRAP LIST) 03012344
* DIAL (29), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012352
* OTHERWISE HANDLED AS AN INVALID CCW 03012360
* 03012368
* SDLCXA = COMMANDS WITH THE LAST 4 BITS = A: 03012376
* HANDLED AS AN INVALID CCW 03012384
* 03012392
* SDLCXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 03012400
* CONTROL SCB (0B), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012408
* OTHERWISE HANDLED AS AN INVALID CCW 03012416
* 03012424
* SDLCXC = COMMANDS WITH THE LAST 4 BITS = C: 03012432
* HANDLED AS AN INVALID CCW 03012440
* 03012448
* SDLCXD = COMMANDS WITH THE LAST 4 BITS = D: 03012456
* HANDLED AS AN INVALID CCW 03012464
* 03012472
* SDLCXE = COMMANDS WITH THE LAST 4 BITS = E: 03012480
* HANDLED AS AN INVALID CCW 03012488
* 03012496
* SDLCXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 03012504
* POLL (0F), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012512
* DISABLE (2F), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012520
* OTHERWISE HANDLED AS AN INVALID CCW 03012528
*. 03012536
SPACE 2 03012544
SDLCX1 EQU TERMX1 GENERAL CASE DATA TRANSFER @V67CDF1 03012552
SDLCX2 DS 0H @V67CDF1 03012560
CLI VIRCOMND,X'02' READ COMMAND? @V67CDF1 03012568
BE READSKIP YES - GENERAL CASE READ @V67CDF1 03012576
B CCWINVLD NO - INVALID CCW @V67CDF1 03012584
SDLCX3 DS 0H @V67CDF1 03012592
CLI VIRCOMND,X'03' NO-OP COMMAND? @V67CDF1 03012600
BE HNDLNOOP YES - GENERAL CASE NO-OP @V67CDF1 03012608
CLI VIRCOMND,X'23' SET MODE COMMAND? @V67CDF1 03012616
BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012624
B CCWINVLD NO - INVALID CCW @V67CDF1 03012632
SDLCX4 CLI VIRCOMND,X'04' SENSE COMMAND? @V67CDF1 03012640
BE DASDX4 YES - GENERAL CASE OF READ @V67CDF1 03012648
CLI VIRCOMND,X'14' SENSE SCB? @V67CDF1 03012656
BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012664
CLI VIRCOMND,X'E4' SENSE I/O? @V67CDF1 03012672
BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012680
B CCWINVLD NO - INVALID CCW @V67CDF1 03012688
SDLCX5 EQU TERMX5 GENERAL CASE DATA TRANSFER @V67CDF1 03012696
SDLCX6 EQU TERMX6 GENERAL CASE OF READ @V67CDF1 03012704
SDLCX7 DS 0H @V67CDF1 03012712
CLI VIRCOMND,X'27' ENABLE? @V67CDF1 03012720
BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012728
B CCWINVLD NO - INVALID CCW @V67CDF1 03012736
SDLCX9 DS 0H @V67CDF1 03012744
CLI VIRCOMND,X'29' DIAL? @V67CDF1 03012752
BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012760
CLI VIRCOMND,X'09' AUTOPOLL? @V67CDF1 03012768
BNE CCWINVLD NO - INVALID CCW @V67CDF1 03012776
OI VIRFLAG,SMCOM TURN ON STATUS MODIFER @V67CDF1 03012784
BR R2 NOW GENERAL CASE DATA TRANSFER @V67CDF1 03012792
SDLCXA EQU CCWINVLD INVALID CCW @V67CDF1 03012800
SDLCXB DS 0H @V67CDF1 03012808
CLI VIRCOMND,X'0B' CONTROL SCB? @V67CDF1 03012816
BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012824
B CCWINVLD NO - INVALID CCW @V67CDF1 03012832
SDLCXC EQU CCWINVLD INVALID CCW @V67CDF1 03012840
SDLCXD EQU CCWINVLD INVALID CCW @V67CDF1 03012848
SDLCXE EQU CCWINVLD INVALID CCW @V67CDF1 03012856
SDLCXF CLI VIRCOMND,X'0F' POLL? @V67CDF1 03012864
BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012872
CLI VIRCOMND,X'2F' DISABLE? @V67CDF1 03012880
BER R2 YES - GENERAL CASE DATA TRANSER @V67CDF1 03012888
B CCWINVLD NO - INVALID CCW @V67CDF1 03012896
EJECT 03012904
*. 03013000
* LOGIC FOR "DIAL" = "DIALED LINE" DEVICE CLASS 03014000
* 03015000
* DIALX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 03016000
* WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 03017000
* IF NOT 01, HANDLED AS AN INVALID CCW 03018000
* 03019000
* DIALX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 03020000
* READ (02) HANDLED AS GENERAL CASE "READ" 03021000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03022000
* 03023000
* IF NOT 02, 12 (FOR 2955), OR 42 (FOR 370X EMULATION LINE), 03024000
* HANDLED AS AN INVALID CCW 03025000
* 03026000
* DIALX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 03027000
* FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 03028000
* 03029000
* FOR EITHER SADZER (13) OR MODE-SET (23), REPLACES OP CODE 03030000
* BY NO-OP (03), AND SETS SKIP & SILI FLAGS. 03031000
* 03032000
* IF > 23, HANDLES AS AN INVALID CCW. 03033000
* 03034000
* DIALX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 03035000
* IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 03036000
* DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 03037000
* OTHERWISE, HANDLED AS GENERAL CASE "READ" 03038000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03039000
* 03040000
* IF RESERVE (F4) OR RELEASE (D4), CHANGES 03041000
* OP CODE TO 04, SETS SKIP & SILI FLAGBITS 03042000
* IN REAL CCW, AND HANDLES AS A NO-OP (DOES NOT CLEAR ANY 03043000
* EXISTING SENSE BYTES) 03044000
* 03045000
* IF NOT 04, F4 OR D4, HANDLED AS INVALID CCW 03046000
* 03047000
* DIALX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 03048000
* WRAP (05) HANDLED AS GENERAL CASE OF DATA TRANSFER 03049000
* IF NOT 05, HANDLED AS AN INVALID CCW 03050000
* 03051000
* DIALX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 03052000
* PREPARE (06) HANDLED AS GENERAL CASE "READ" 03053000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03054000
* 03055000
* IF NOT 06, HANDLED AS AN INVALID CCW 03056000
* 03057000
* DIALX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 03058000
* FOR SADONE (17), REPLACES OP CODE BY NO-OP (03), 03059000
* AND SETS SKIP & SILI FLAGS. 03060000
* 03061000
* FOR ENABLE (27), CHECKS FLAG IN VIRTUAL DEVICE BLOCK TO SEE 03062000
* IF THE LINE IS ALREADY ENABLED; IF YES, SETS SKIP FLAG. 03063000
* IF NOT, REMEMBERS THAT A VIRTUAL ENABLE OCCURRED, AND REVISES 03064000
* THE CCW TO USE A DATA ARGUMENT OF A "CIRCLE C" (X'1F'). 03065000
* 03066000
* IF = 07 OR > 27, HANDLES AS AN INVALID CCW 03067000
EJECT 03068000
* DIALX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 03069000
* WRITE AUTO-POLL (09) TREATED AS A "STATUS MODIFIER" TYPE OF 03070000
* DATA TRANSFER; ALSO SETS FLAG TO REMEMBER THAT AN AUTO-POLL 03071000
* WAS PROCESSED (FOR SPECIAL HANDLING OF AUTO-POLL WRAP LIST). 03072000
* 03073000
* DIAL (29) HANDLED AS GENERAL CASE OF DATA TRANSFER 03074000
* 03075000
* IF NOT 09 OR 29, HANDLED AS AN INVALID CCW 03076000
* 03077000
* DIALXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 03078000
* INHIBIT (0A) HANDLED AS GENERAL CASE "READ" 03079000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03080000
* 03081000
* IF NOT 0A, HANDLED AS AN INVALID CCW 03082000
* 03083000
* DIALXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 03084000
* CHECKS THAT BITS FOR "SAD" CCW (X'13' BITS) ARE SET; 03085000
* INVALID CCW IF NOT; FOR SADTWO (1B), REPLACES OP CODE 03086000
* BY NO-OP (03), AND SETS SKIP & SILI FLAGS. 03087000
* 03088000
* DIALXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 03089000
* HANDLED AS AN INVALID CCW 03090000
* 03091000
* DIALXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 03092000
* BREAK (0D) HANDLED AS GENERAL CASE OF DATA TRANSFER 03093000
* IF NOT 0D, HANDLED AS AN INVALID CCW 03094000
* 03095000
* DIALXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 03096000
* SEARCH (0E) HANDLED AS GENERAL CASE "READ" 03097000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03098000
* 03099000
* IF NOT 0E, HANDLED AS AN INVALID CCW 03100000
* 03101000
* DIALXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 03102000
* FOR SADTHREE (1F), REPLACES OP CODE BY NO-OP (03), 03103000
* AND SETS SKIP & SILI FLAGS. 03104000
* 03105000
* FOR DISABLE (2F), RESETS FLAG IN VIRTUAL DEVICE BLOCK, 03106000
* REMEMBERS THAT A VIRTUAL DISABLE OCCURRED, AND 03107000
* SETS SKIP FLAG IN THE CCW. 03108000
* 03109000
* IF > 2F, HANDLES AS AN INVALID CCW 03110000
*. 03111000
SPACE 2 03112000
* HANDLE VARIOUS COMMANDS FOR "DIALED LINE" CLASS: 03113000
SPACE 03114000
*DIALX1 EQU TAPEX1 WRITE (01) 03115000
SPACE 03116000
*DIALX2 EQU TAPEX2 READ (02) 03117000
SPACE 03118000
DIALX3 DS 0H NOOP (03), SADZER (13), MODE-SET (23) 03119000
CLI VIRCOMND,X'03' IS IT 03 (NOOP) ? 03120000
BE HNDLNOOP YES. 03121000
CLI VIRCOMND,X'23' IS IT 13 OR 23, THEN ? 03122000
BNH DIALNOOP IF YES, REPLACE BY NO-OP, ETC. 03123000
B CCWINVLD INVALID COMMAND IF > 23. 03124000
SPACE 03125000
DIALX4 EQU TERMX4 SENSE (04), RELEASE (D4), OR RESERVE (F4) 03126000
SPACE 03127000
DIALX5 EQU TERMX5 WRAP (05) 03128000
SPACE 03129000
DIALX6 EQU TERMX6 PREPARE (06) 03130000
SPACE 03131000
DIALX7 DS 0H SADONE (17) OR ENABLE (27) 03132000
CLI VIRCOMND,X'27' IS IT 17 OR 27 ? 03133000
BL DIALSAD TRF IF 17 (SADONE). 03134000
BH CCWINVLD INVALID CCW IF > 27. 03135000
TM VDEVFLAG,VDEVENAB IF 27 (ENABLE), ALREADY ENABLED ? 03136000
BO SETSKIP YES - KEEP OP CODE BUT SET SKIP FLAG ETC. 03137000
XROOM 12 NEED ROOM FOR COMMAND + 1 CONTROL WORD 03138000
OI MEMO3,VIRTENAB AND REMEMBER WE DID THIS 03139000
S R7,F4 BACK OFF 4 BYTES ON CONTROL-WORD REGISTER 03140000
MVI 0(R7),CIRCLEC PUT NEEDED DATA-BYTE THEREIN, AND 03141000
CLI VDEVTYPE,TYPTTY IS THIS A TELETYPE? @VA11932 03141100
BNE SRCHID2 NO, CIRCLE C IS OKAY @VA11932 03141200
MVI 0(R7),X'DF' YES SEND A QUIET IDLE @VA11932 03141300
B SRCHID2 GO STORE R7 IN ADDRESS FIELD OF CCW, ETC. 03142000
SPACE 03143000
DIALX9 EQU TERMX9 POLL (09) OR DIAL (29) 03144000
SPACE 03145000
DIALXA EQU TERMXA INHIBIT (0A) 03146000
SPACE 03147000
DIALXB DS 0H SADTWO (1B) 03148000
DIALSAD TM VIRCOMND,X'13' ALL "SAD" COMMANDS MUST HAVE '13' BITS ON 03149000
BO DIALNOOP IF OK, REPLACE BY NO-OP, ETC. 03150000
B CCWINVLD INVALID COMMAND IF NOT 1B. 03151000
SPACE 03152000
DIALXC EQU CCWINVLD "READ BACKWARD" IS INVALID. 03153000
SPACE 03154000
DIALXD EQU TERMXD BREAK (0D) 03155000
SPACE 03156000
DIALXE EQU TERMXE SEARCH (0E) 03157000
SPACE 03158000
DIALXF DS 0F SADTHREE (1F) OR DISABLE (2F) 03159000
CLI VIRCOMND,X'2F' IS IT 1F OR 2F ? 03160000
BL DIALSAD TRF IF 1F (SADTHREE). 03161000
BH CCWINVLD INVALID CCW IF > 2F. 03162000
OI MEMO3,VIRTDISA SIGNAL VIRTUAL DISABLE OCCURRED, 03163000
NI VDEVFLAG,255-VDEVENAB SIGNAL NOW DISABLED 03164000
B SETSKIP SET SKIP FLAG, CLEAR ADDRESS 03165000
DIALNOOP LA R15,03 MAKE THE DISABLE (OR WHATEVER) A NO-OP, 03166000
B TERMSKIP SET SKIP FLAG, STORE OP-CODE, & CLR ADDR 03167000
EJECT 03168000
*. 03169000
* LOGIC FOR "OTHR" = "ALL OTHER" DEVICE CLASSES 03170000
* (EXCEPT FOR DEDICATED CPU CONSOLES) 03171000
* 03172000
* OTHRX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 03173000
* HANDLED AS GENERAL CASE OF DATA TRANSFER 03174000
* 03175000
* OTHRX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 03176000
* HANDLED AS GENERAL CASE "READ" 03177000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03178000
* 03179000
* OTHRX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 03180000
* FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 03181000
* IF NOT 03, HANDLED AS GENERAL CASE OF DATA TRANSFER 03182000
* 03183000
* OTHRX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 03184000
* IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 03185000
* DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 03186000
* OTHERWISE, HANDLED AS GENERAL CASE "READ" 03187000
* FOR A 3800 PRINTER, DO THE BUFFER UNLOAD FOR X'24' @V60B9BA 03188000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03189000
* 03190000
* OTHRX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 03191000
* HANDLED AS GENERAL CASE OF DATA TRANSFER 03192000
* 03193000
* OTHRX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 03194000
* HANDLED AS GENERAL CASE "READ" 03195000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03196000
* 03197000
* OTHRX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 03198000
* HANDLED AS GENERAL CASE OF DATA TRANSFER 03199000
* 03200000
* OTHRX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 03201000
* HANDLED AS GENERAL CASE OF DATA TRANSFER 03202000
* 03203000
* OTHRXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 03204000
* HANDLED AS GENERAL CASE "READ" 03205000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03206000
* 03207000
* OTHRXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 03208000
* HANDLED AS GENERAL CASE OF DATA TRANSFER 03209000
* 03210000
* OTHRXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 03211000
* HANDLED AS GENERAL CASE "READ BACKWARD" 03212000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03213000
* 03214000
* OTHRXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 03215000
* HANDLED AS GENERAL CASE OF DATA TRANSFER 03216000
* 03217000
* OTHRXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 03218000
* HANDLED AS GENERAL CASE "READ" 03219000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03220000
* 03221000
* OTHRXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 03222000
* HANDLED AS GENERAL CASE OF DATA TRANSFER 03223000
*. 03224000
SPACE 2 03225000
* HANDLE VARIOUS COMMANDS FOR ALL OTHER CLASSES: 03226000
SPACE 03227000
OTHRX1 EQU CCWGENRL GENERAL CASE "WRITE" 03228000
SPACE 03229000
OTHRX2 EQU READSKIP GENERAL CASE "READ" 03230000
SPACE 03231000
*OTHRX3 EQU DEDDX3 SORT OUT NO-OP FROM POSSIBLE DATA XFERS 03232000
SPACE 03233000
OTHRX4 EQU DASDX4 "SENSE" (04) OR OTHER 03234000
* (NOTE: CCWCTL = 0) 03235000
SPACE 03236000
OTHRX5 EQU CCWGENRL GENERAL CASE "WRITE" 03237000
SPACE 03238000
OTHRX6 EQU READSKIP GENERAL CASE "READ" 03239000
SPACE 03240000
OTHRX7 EQU CCWGENRL ASSUME POSSIBLE DATA TRANSFER 03241000
SPACE 03242000
OTHRX9 EQU * @V240820 03243000
LA R0,CLASSPEC*256+TYP3705 CHECK FOR 3704/5 NCP @V240820 03244000
CH R0,VDEVTYPC IS THIS A 3704 OR 3705 ? @V240820 03245000
BNER R2 NO -- GENERAL CASE WRITE @V240820 03246000
CLI VIRCOMND,X'09' 370X WRITE BREAK COMMAND ? @V240820 03247000
BNER R2 NO -- @V240820 03248000
TM VIRFLAG,CC IS COMMAND CHAIN ON? @VA05860 03249000
BNOR R2 NO - GENERAL CASE WRITE @VA05860 03250000
OI VIRFLAG,SMCOM MAY BE A STATUS MODIFIER CCW @V240820 03251000
BR R2 TREAT AS GENERAL CASE WRITE @V240820 03252000
SPACE 03253000
OTHRXA EQU READSKIP GENERAL CASE "READ" 03254000
SPACE 03255000
*OTHRXC EQU DRAWKCAB ASSUME "READ BACKWARD" POSSIBLY VALID. 03256000
SPACE 03257000
OTHRXD EQU CCWGENRL GENERAL CASE "WRITE" 03258000
SPACE 03259000
OTHRXE EQU READSKIP GENERAL CASE "READ" 03260000
SPACE 03261000
OTHRXF EQU CCWGENRL ASSUME POSSIBLE DATA TRANSFER 03262000
SPACE 2 03263000
OTHRXB CLI VIRCOMND,X'5B' SPECIAL 1287 READER CCW ? @VM08862 03264000
BNER R2 NO -- CCWGENRL CAN HANDLE IT @VM08862 03265000
CK1287 TM VDEVTYPC,CLASURI+CLASSPEC URI OR DUMMY ? @VM08862 03266000
BZR R2 NEITHER - CCWGENRL @VM08862 03267000
CLI VDEVTYPE,TYP1442R GENNED AS A 1442 ? @VM08862 03268000
BE CCW1287 YES - STATUS MODIFIER CMD @VM08862 03269000
CLI VDEVTYPE,TYPUNSUP GENNED AS A DUMMY ? @VM08862 03270000
BNER R2 NO -- GO TO CCWGENRL @VM08862 03271000
L R15,VDEVREAL GET THE RDEVBLOK ADDRESS @VM08862 03272000
CLI RDEVFTR-RDEVBLOK(R15),CLASURI SUB-CLASS URI ? @VM08862 03273000
BNER R2 NO -- CCWGENRL @VM08862 03274000
CCW1287 OI VIRFLAG,SMCOM STATUS MODIFIER TYPE COMMAND @VM08862 03275000
BR R2 . . . @VM08862 03276000
EJECT 03277000
* HANDLE VARIOUS COMMANDS FOR MSC PORT ADDRESSES ON 3851 MSS 03278000
SPACE 03279000
*. 03280000
* LOGIC FOR 3851 MSC PORT ADDRESS 03281000
* 03282000
* ALL HOST-TO-MSC COMMAND CODES WILL BE ALLOWED TO PASS THROUGH. 03283000
* THE 3851 WILL BE TREATED AS 'CLASSPEC'; A NEW TABLE WILL BE CREATED 03284000
* IN DMKCCW (MSCTBL) TO IDENTIFY THE ROUTINE WHICH WILL HANDLE 03285000
* EACH COMMAND CODE. THE MSC COMMAND CODES WILL BE HANDLED IN THE 03286000
* FOLLOWING MANNER: 03287000
* 03288000
* MSCX1 = ALL MSC COMMAND CODES WITH THE LAST 4 BITS EQUAL 1. 03289000
* 03290000
* DIAGNOSTIC WRITE (X'41') 03291000
* 03292000
* 1. THE DIAGNOSTIC WRITE COMMAND WILL BE HANDLED AS A NORMAL CASE 03293000
* WRITE CCW (CCWGENRL). 03294000
* 03295000
* 2. ALL OTHER COMMAND CODES IDENTIFIED BY A ONE IN THE LAST FOUR 03296000
* BITS OF THE OPCODE WILL BE TREATED AS INVALID (CCWINVLD). 03297000
* 03298000
* MSCX2 - 3851 COMMAND CODES WITH LAST 4 BITS EQUAL 2. 03299000
* 03300000
* DIAGNOSTIC READ (X'42') 03301000
* 03302000
* 1. THE DIAGNOSTIC READ CCW WILL BE HANDLED AS NORMAL CASE READ CCW 03303000
* (READSKIP). 03304000
* 03305000
* 2. OTHER CCWS WITH THE LAST FOUR BITS OF THE OPCODE EQUAL TWO WILL 03306000
* BE HANDLED AS INVALID FOR THE 3851 (CCWINVLD). 03307000
* 03308000
* MSCX3 - 3851 COMMAND CODES WITH THE LAST 4 BITS EQUAL 3 03309000
* 03310000
* DIAGNOSTIC CONTROL (X'43') 03311000
* 03312000
* 1. THE DIAGNOSTIC CONTROL CCW WILL BE HANDLED THE SAME AS A 03313000
* DIAGNOSTIC WRITE. 03314000
* 03315000
* NO OPERATION/MODIFIED NO OPERATION (X'03', X'A3') 03316000
* 03317000
* 1. BOTH OF THESE COMMAND CODES WILL BE HANDLED AS A NORMAL 03318000
* NO OPERATION. 03319000
* 03320000
* ALL OTHER COMMAND CODES WITH THE LAST FOUR BITS OF OPCODE EQUAL TO 03321000
* THREE WILL BE TREATED AS INVALID CCWS. 03322000
* 03323000
* SENSE (X'04') 03324000
* 03325000
* 1. THE X'04' CCW WILL BE TREATED AS A NORMAL SENSE (HNDLSENS). 03326000
* 03327000
* SENSE I/O (X'E4') 03328000
* 03329000
* 1. THIS CCW WILL BE TREATED AS A GENERAL CASE READ; SEVEN BYTES 03330000
* OF DATA ARE RETURNED TO THE HOST. PREVIOUS SENSE DATA IS LOST. 03331000
* 03332000
* READ BUFFERED LOG (X'A4') 03333000
* 03334000
* 1. THIS CCW WILL EFFECTIVELY BE TREATED AS A READ CCW WITH THE 03335000
* SENSE DATA SAVED. 03336000
* 03337000
* SWITCH (X'44') 03338000
* 03339000
* 1. THE SWITCH CCW WILL BE HANDLED AS A NO OPERATION. 03340000
* 03341000
* ALL OTHER COMMAND OPCODES WITH THE LAST 4 BITS EQUAL 4 WILL 03342000
* BE TREATED AS INVALID CCWS. 03343000
* 03344000
* MSCX6 - 3851 MSC COMMAND CODES WITH LAST 4 BITS OF OPCODE EQUAL 6 03345000
* 03346000
* PREPARED READ DATA (X'26') 03347000
* 03348000
* 1. THE ADDRESS PORTION OF THIS CCW IS NOT USED. THE PREPARE READ 03349000
* DATA CCW WILL BE TREATED AS A NO OPERATION EXCEPT THAT THE SVSEN FLAG 03350000
* IN VIRFLAG WILL NOT BE SET TO SAVE THE SENSE DATA. 03351000
* 03352000
* 2. IF THE VIRTUAL ADDRESS IN THE CCW IS INVALID, IT IS NOT A 03353000
* FATAL CONDITION FOR THE PREPARE READ DATA CCW. 03354000
* 03355000
* READ DATA (X'06') 03356000
* 03357000
* 1. THIS CCW WILL BE HANDLED AS A GENERAL CASE READ. 03358000
* 03359000
* ALL OTHER COMMAND CODES WITH THE LAST 4 BITS OF THE OPCODE 03360000
* EQUAL 6 WILL BE TREATED AS INVALID CCWS. 03361000
* 03362000
* MSCX7 - 3851 MSC COMMAND CODES WITH LAST 4 BITS EQUAL 7. 03363000
* 03364000
* INTERROGATE SYSTEM (X'27') 03365000
* 03366000
* 1. ALL INTERROGATE SYSTEM CCWS WILL BE TREATED AS GENERAL CASE WRITE 03367000
* CCWS. 03368000
* 03369000
* EXECUTE (X'87') 03370000
* 03371000
* 1. THE EXECUTE CCW WILL BE TREATED AS A GENERAL CASE WRITE. 03372000
* 03373000
* ALL OTHER COMMAND OPCODES WITH THE LAST 4 BITS OF THE OPCODE 03374000
* EQUAL 7 WILL BE TREATED AS INVALID CCWS. 03375000
*. 03376000
EJECT 03377000
MSCX1 EQU CCWGENRL DIAGNOSTIC WRITE @V407466 03378000
SPACE 03379000
MSCX2 EQU READSKIP DIAGNOSTIC READ @V407466 03380000
SPACE 03381000
MSCX3 EQU * @V407466 03382000
CLI VIRCOMND,DIAGCNT DIAG. CONTROL X'43' @V407466 03383000
BE CCWGENRL HANDLE SAME AS DIAG WRITE @V407466 03384000
CLI VIRCOMND,NOP NO-OPERATION (X'03') @V407466 03385000
BE HNDLNOOP YES @V407466 03386000
CLI VIRCOMND,MODNOP MODIFIED NOP (X'A3') @V407466 03387000
BE HNDLNOOP YES @V407466 03388000
B CCWINVLD ALL OTHERS INVALID FOR 3851 @V407466 03389000
SPACE 03390000
MSCX4 EQU * @V407466 03391000
CLI VIRCOMND,SENSE04 SENSE CCW (X'04') @V407466 03392000
BE HNDLSENS TREAT AS NORMAL SENSE @V407466 03393000
CLI VIRCOMND,SENSEE4 SENSE I/O (X'E4') @V407466 03394000
BE E4 TREAT AS GEN CASE READ @V407466 03395000
CLI VIRCOMND,SENSE44 SWITCH (X'44') @V407466 03396000
BNE CCWINVLD INVALID FOR 3851 @V407466 03397000
TM RCWFLAG,IDA IDA PRESENT? @V407466 03398000
BZ CCWNXT14 NO, BRANCH @V407466 03399000
B CTLCMDID @V407466 03400000
E4 TM RCWFLAG,SKIP SKIP FLAG SET ? @V407466 03401000
BO E4B YES, SAVE SENSE DATA @V407466 03402000
OI VIRFLAG,SVSEN SAVE SENSE DATA @V407466 03403000
BR R2 GO TO CCWGENRL @V407466 03404000
E4B OI VIRFLAG,SVSEN SAVE SENSE DATA @V407466 03405000
B CLEARADD PROCESS AS NORMAL READ @V407466 03406000
SPACE 03407000
MSCX5 EQU CCWINVLD INVALID FOR 3851 @V407466 03408000
SPACE 03409000
MSCX6 EQU * @V407466 03410000
CLI VIRCOMND,RDATA READ DATA (X'06') @V407466 03411000
BER R2 YES, GO TO CCWGENRL @V407466 03412000
CLI VIRCOMND,PREPRD PREPARE READ DATA (X'26') @V407466 03413000
BNE CCWINVLD ALL OTHERS INVALID @V407466 03414000
TM RCWFLAG,IDA IS IDA PRESENT? @V407466 03415000
BZ CCWNXT14 NO, BRANCH @V407466 03416000
B CTLCMDID GO CHECK THE IDAL @V407466 03417000
SPACE 03418000
MSCX7 EQU CCWGENRL @V407466 03419000
SPACE 03420000
MSCX8 EQU CCWINVLD @V407466 03421000
MSCX9 EQU CCWINVLD @V407466 03422000
MSCXA EQU CCWINVLD @V407466 03423000
MSCXB EQU CCWINVLD @V407466 03424000
MSCXC EQU CCWINVLD @V407466 03425000
MSCXD EQU CCWINVLD @V407466 03426000
MSCXE EQU CCWINVLD @V407466 03427000
MSCXF EQU CCWINVLD @V407466 03428000
EJECT 03429000
* SUBROUTINES TO PERFORM A "TRANS - BRING/DEFER" OR 03430000
* A "TRANS - BRING/DEFER/LOCK" - TO SAVE SPACE: 03431000
* 03432000
* AT ENTRY: 03433000
* R1 = VIRTUAL ADDRESS TO BE TRANSLATED 03434000
* R14 = RETURN REGISTER 03435000
* 03436000
* AT EXIT: 03437000
* R1 = VIRTUAL ADDRESS 03438000
* R2 = REAL ADDRESS 03439000
* CONDITION-CODE SET FROM LRA, DMKPTRLK, OR DMKPTRAN 03440000
* (CC = 0 IF VIRTUAL ADDRESS WAS LEGITIMATE, AND PAGE IS 03441000
* IN CORE, OR HAS BEEN BROUGHT INTO CORE WITHOUT ERROR) 03442000
* 03443000
* ENTER AT "TRANBRNG" TO PERFORM "TRANS - BRING/DEFER" 03444000
* OR 03445000
* ENTER AT "TRANLOCK" TO PERFORM "TRANS - BRING/DEFER/LOCK" 03446000
SPACE 03447000
*. 03448000
*********************************************************************** 03449000
* 03450000
* 03451000
* CP ASSIST INSTRUCTION "TRANBRNG" - TEST PAGE STATUS 03452000
* 03453000
* 03454000
* OPERANDS: 03455000
* 1 = ADDRESS OF 'ACORETBL' (ADDR OF THE ADDR OF 'CORTABLE') 03456000
* 2 = EXIT ADDRESS 03457000
* 03458000
* REGISTER INPUT: 03459000
* GPR 1 = VIRTUAL ADDRESS WITHIN THE PAGE 03460000
* 03461000
* SYSTEM DATA AREAS REFERENCED (BY MODULE): 03462000
* DMKSYS - 'CORTABLE' 03463000
* 03464000
* 03465000
* EXITS: 03466000
* 03467000
* 1. OPERAND 2 ADDRESS (NORMAL COMPLETION) 03468000
* 03469000
* REGISTER OUTPUT: 03470000
* GPR 2 = REAL ADDRESS THAT MAPS TO GPR 1 VIRTUAL ADDRESS 03471000
* 03472000
* 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL COMPLETION) 03473000
* 03474000
* NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT TO A NO-OP. 03475000
* 03476000
*********************************************************************** 03477000
*. 03478000
SPACE 03479000
TRANBRNG DS 0F 'TRANS' IN USER PAGE %V3M4038 03480000
ST R14,SAVREG14 SAVE CALLERS'S R14 %V3M4038 03481000
TRANBRG1 LRA R2,0(,R1) ATTEMPT TO GET REAL PAGE ADDRESS %V3M4038 03482000
BNZ TRANBRG2 NOT IN STORAGE - BRING IT IN %V3M4038 03483000
BAL R14,CCWCHKSH CHECK IT FOR SHARED PAGE %V3M4038 03484000
BZ TRANRETN NOT SHARED - RETURN TO CALLER %V3M4038 03485000
BAL R14,CKSHRCHG SEE IF PAGE WAS CHANGED @V304735 03486000
NOTLCK BNZ TRANBRG1 @VA12785 03487100
B TRANRETN RETURN TO CALLER @V304735 03488000
SPACE 1 03489000
TRANBRG2 LA R2,(BRING+DEFER) OPT. TO BRING IT IN @V304735 03490000
CALL DMKPTRAN BRING IN USERS PAGE @V304735 03491000
B TRANRETN RETURN TO CALLER @V304735 03492000
SPACE 03493000
*. 03494000
*********************************************************************** 03495000
* 03496000
* 03497000
* CP ASSIST INSTRUCTION "TRANLOCK" - TEST PAGE STATUS AND LOCK 03498000
* 03499000
* 03500000
* OPERANDS: 03501000
* 1 = ADDRESS OF 'ACORETBL' (ADDR OF THE ADDR OF 'CORTABLE') 03502000
* 2 = EXIT ADDRESS 03503000
* 03504000
* REGISTER INPUT: 03505000
* GPR 1 = VIRTUAL ADDRESS WITHIN THE PAGE 03506000
* 03507000
* SYSTEM DATA AREAS REFERENCED (BY MODULE): 03508000
* DMKSYS - 'CORTABLE' 03509000
* 03510000
* 03511000
* EXITS: 03512000
* 03513000
* 1. OPERAND 2 ADDRESS (NORMAL COMPLETION) 03514000
* 03515000
* REGISTER OUTPUT: 03516000
* GPR 2 = REAL ADDRESS THAT MAPS TO GPR 1 VIRTUAL ADDRESS 03517000
* 03518000
* 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL COMPLETION) 03519000
* 03520000
* NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT TO A NO-OP. 03521000
* 03522000
*********************************************************************** 03523000
*. 03524000
SPACE 03525000
TRANLOCK DS 0F 'TRANS' IN USER PAGE AND LOCK IT %V3M4038 03526000
ST R14,SAVREG14 SAVE CALLER'S R14 %V3M4038 03527000
TRANLCK1 LRA R2,0(,R1) ATTEMPT TO GET REAL ADDRESS %V3M4038 03528000
BNZ TRANCALL NOT RESIDENT - BRING IN AND LOCK %V3M4038 03529000
L R15,APTRLK A(DMKPTRLK) LOCK ROUTINE %V3M4038 03530000
BALR R14,R15 LOCK THIS PAGE %V3M4038 03531000
BAL R14,CCWCHKSH CHECK IF SHARED PAGE %V3M4038 03532000
BZ TRANRETN IF NOT - RETURN TO USER %V3M4038 03533000
BAL R14,CKSHRCHG TEST IF PAGE WAS CHANGED @V304735 03534000
BZ COPYPAGE NOT CHANGED, GO COPY IT @VA05378 03535000
CALL DMKPTRUL UNLOCK THE PAGE @VA05378 03536000
B TRANLCK1 REISSUE 'TRANS' @VA05378 03537000
SPACE 1 03538000
TRANCALL LA R2,(BRING+DEFER+LOCK) BRING/LOCK @V304735 03539000
CALL DMKPTRAN CALL PAGING MANAGER @V304735 03540000
BNZ TRANRETN ON ADDRESSING ERROR RETURN @V304735 03541000
BAL R14,CCWCHKSH IS THIS A SHARED PAGE ? @V304735 03542000
BZ TRANRETN NO - RETURN TO CALLER @V304735 03543000
SPACE 1 03544000
COPYPAGE TM VIRCOMND,X'01' WRITE TYPE COMMAND ? @V304735 03545000
BO GETPAGE YES - GET A NEW PAGE @V304735 03546000
ST R10,TEMPR10 SAVE REGISTER @V304735 03547000
BAL R10,CHKCAWKY CHECK CAW FOR PROTECTION @V304735 03548000
L R10,TEMPR10 RESTORE REGISTER @V304735 03549000
B TRANSCC0 RETURN TO LINE CODE @V304735 03550000
GETPAGE TM RCWFLAG,IDA MIGHT BE SHR+NONSHR PAGES @V304735 03551000
BO TRANSCC0 DON'T ALLOW IDA FOR SHARED PAGES @V304735 03552000
SVC 20 GET A PLACE TO SAVE REGISTERS @V304735 03553000
STM R0,R11,SAVEREGS SAVE THESE @V304735 03554000
XC SAVER12,SAVER12 SET UP FOR RELEASE (SVC-16) @V304735 03555000
LA R15,1 GET INCREMENT OF 1 @V407508 03556000
AL R15,SHRLKCNT ADD ONE TO CPSHRLK COUNT @V407508 03557000
ST R15,SHRLKCNT STORE UPDATED COUNT @V407508 03558000
OI CPSTAT2,CPSHRLK FREEZE THE SYSTEM @V304735 03559000
CALL DMKPTRFR,AFFINITY GET A NEW PAGE @VA10216 03560500
L R15,SHRLKCNT GET CURRENT CPSHRLK COUNT @V407508 03561000
BCTR R15,0 DECREMENT COUNT BY 1 @V407508 03562000
ST R15,SHRLKCNT STORE UPDATED COUNT @V407508 03563000
LTR R15,R15 TEST IF THE COUNT IS NOW 0 @V407508 03564000
BNZ *+8 NO, SKIP RESET OF CPSHRLK @V407508 03565000
NI CPSTAT2,X'FF'-CPSHRLK NOW CAN RUN USERS @V304735 03566000
MVI CORFLAG-CORTABLE(R7),CORFLUSH @V408246 03567000
OI RCWCTL,RCWSHR FLAG GOTTEN FROM DMKPTRFR @V304735 03568000
LR R14,R7 CORTABLE ADDRESS OF THIS PAGE @V304735 03569000
SL R14,ACORETBL LEAVE INDEX PORTION OF CORTABLE @V304735 03570000
SLL R14,8 R14 = NOW REAL PAGE ADDRESS @V304735 03571000
L R3,F4096 4096 BYTES TO MOVE @V304735 03572000
LR R15,R3 ALSO FOR 'R1+1' REGISTER @V304735 03573000
N R2,XPAGNUM DROP OFF DISPLACEMENT @V304735 03574000
MVCL R14,R2 MOVE ORIGINAL TO NEW @V304735 03575000
SL R14,F4096 'MVCL' CLOBBERED R14 @V304735 03576000
L R2,SAVER2 RESTORE ORIGINAL PAGE ADDRESS @V304735 03577000
LR R15,R2 GET ORIGINAL PAGE ADDRESS @V304735 03578000
N R15,XPAGNUM CLEAR DISPLACEMENT @V304735 03579000
SRL R15,8 INDEX INTO CORETBL @V304735 03580000
AL R15,ACORETBL FIND ACTUAL CORETBL ENTRY @V304735 03581000
L R15,CORSWPNT-CORTABLE(,R15) POINTER TO SWAP @V304735 03582000
L R15,SWPFLAG-SWPFLAG(,R15) GET KEYS. @V304735 03583000
N R15,=A(X'F8F8') CLEAR CHANGE/REFERENCE BITS @V304735 03584000
LA R14,2048(,R14) LAST HALF OF NEW PAGE @V304735 03585000
SSK R15,R14 SET UP THE KEY @V304735 03586000
SRL R15,8 POSITION FOR FIRST HALF PAGE @V304735 03587000
N R14,XPAGNUM BACK TO BEGINING ADDRESS @V304735 03588000
SSK R15,R14 SET THE REAL KEY @V304735 03589000
L R1,SAVER2 GET ADDRESS OF ORIGINAL PAGE @V304735 03590000
N R1,F4095 LEAVE JUST THE DISPLACEMENT @V304735 03591000
OR R1,R14 PUT IN REPLACEMENT PAGE NUMBER @V304735 03592000
ST R1,SAVER2 THIS BECOMES NEW PAGE ADDRESS @V304735 03593000
CALL DMKPTRUL UNLOCK THE ORIGINAL PAGE @V304735 03594000
L R15,VMACNT2 GET STAT. COUNTER @V304735 03595000
LA R15,1(,R15) ADD ONE TO IT @V304735 03596000
ST R15,VMACNT2 SAVE NEW TOTAL @V304735 03597000
LM R0,R11,SAVEREGS RESTORE ALL THE REMAINING @V304735 03598000
SVC 16 NOW RELEASE THIS SAVE AREA. @V304735 03599000
TRANSCC0 CLI *+1,X'00' SET CONDITION CODE FOR CALLER @V304735 03600000
TRANRETN L R14,SAVREG14 RESTORE CALLERS REGISTER %V3M4038 03601000
BR R14 RETURN TO CALLER %V3M4038 03602000
SPACE 1 03603000
EJECT 03604000
* VARIOUS CONSTANTS: 03605000
F2047 DC F'2047' 03606000
F2048 DC F'2048' 03607000
CIRCLEC EQU X'1F' ... 03608000
SPACE 03609000
* DUMMY SEEK CCW, AND DUMMY CCW FOR "READ IPL" (02): 03610000
DUMSEEK DC X'07',AL3(*-*),AL1(CC),AL1(RCWGEN+RCWREL),AL2(06) 03611000
DUMRDIPL DC X'1A',AL3(000),AL1(CC+SKIP),AL1(RCWGEN),AL2(05) 03612000
SPACE 03613000
SPACE 03614000
* "CCWCHKEY" = SUBROUTINE TO DETERMINE IF SENSE-BYTES CAN 03615000
* BE STORED IN USER'S MEMORY (GIVEN BY R2 AFTER A "TRANS") 03616000
* AT ENTRY: 03617000
* GPR 2 = REAL DATA ADDRESS 03618000
* GPR 14 = RETURN ADDRESS 03619000
* OTHER REGISTERS AS "IN USE" BY "CNTRLSBW" SUBROUTINE. 03620000
* AT EXIT: 03621000
* CONDITION CODE 0 = OK TO STORE DATA IN USER'S MEMORY. 03622000
* CONDITION CODE NONZERO = DO NOT STORE DATA THEREIN. 03623000
* 03624000
* NOTES: 03625000
* SAVER2 HOLDS THE ORIGINAL CAW (INCLUDING HIGH-ORDER BYTE) 03626000
* 03627000
CCWCHKEY EQU * CHECK FOR PROTECTION VIOLATIONS 03628000
L R15,X2048BND MASK FOR ALIGNMENT 03629000
NR R15,R2 R15 = REAL ADDR OF STORAGE KEY BLOCK 03630000
ISK R15,R15 GET THE REAL STORAGE KEY 03631000
N R15,F240 FOUR BITS ONLY 03632000
TM SAVER2,X'F0' CHECK USER'S CAW KEY = 0 @V304735 03633000
BZ CCWCHKSH IF = 00 , CHECK FOR SHARED PAGE @V304735 03634000
CLM R15,1,SAVER2 DOES REAL = VIRTUAL KEY @V304735 03635000
BNER R14 NO MIS-MATCHED, RETURN TO CALLER @V304735 03636000
CCWCHKSH TM VMOSTAT,VMSHR USER RUNNING A SHARED SYSTEM %V3M4038 03637000
BZR R14 NO - SET CC = 0 %V3M4038 03638000
ST R15,TEMPR15 SAVE REAL KEY %V3M4038 03639000
LR R15,R2 LOAD REAL STORAGE ADDRESS %V3M4038 03640000
N R15,XPAGNUM DROP DISPLACEMENT %V3M4038 03641000
SRL R15,8 INDEX VALUE INTO CORTABLE %V3M4038 03642000
AL R15,ACORETBL ADDRESS OF CORTABLE ENTRY %V3M4038 03643000
TM CORFLAG-CORTABLE(R15),CORSHARE SET CC = %V3M4038 03644000
L R15,TEMPR15 RESTORE REAL STORAGE KEY %V3M4038 03645000
BR R14 LEAVE WITH CC INTACK %V3M4038 03646000
SPACE 2 03647000
* VIRTUAL ADDRESS IN A CCW IS INVALID - CHECK WHETHER FATAL OR NOT: 03648000
* 03649000
ADDRCHEK TM VIRCOMND,X'03' "CONTROL" COMMAND - 03/07/0B/0F ? 03650000
BO CCWNXT3 YES - THAT'S GOOD. 03651000
TM VIRCOMND,X'01' "WRITE" - 01/05/09/0D ? 03652000
BO CCWBAD4 INVALID ADDRESS @VA03162 03653000
TM VIRCOMND,X'07' 00 (MAYBE OK FOR ISAM) OR 08 (TIC) ? 03654000
BZ CCWNXT3 YES - REGULAR CODE CAN HANDLE. 03655000
CLI VIRCOMND,PREPRD ADDR PORTION OF CCW NOT USED @V407466 03656000
BE CCWNXT3 CONSIDER PREP. READ DATA VALID @V407466 03657000
TM RCWFLAG,SKIP MUST BE READ OR SENSE - 02/04/06/0A/0C/0E 03658000
BO CCWNXT3 OK FOR THESE IF SKIP FLAG IS SET, 03659000
B CCWBAD4 INVALID ADDRESS @VA03162 03660000
EJECT 03661000
USING VDEVBLOK,R8 IN EFFECT WHEN WE GET HERE @VA04000 03662000
SPACE 03663000
* TAPEX- CODE NOT REQUIRING INTERNAL TRANSFERS: 03664000
SPACE 03665000
TAPEX1 EQU CCWGENRL "WRITE" (X1) @VA01331 03666000
SPACE 1 03667000
TAPEX2 EQU READSKIP "READ" (X2) @VA01331 03668000
SPACE 1 03669000
TAPEX3 DS 0H CONTROL @V202232 03670000
CLI VIRCOMND,03 03 = NO-OP @V202232 03671000
BE HNDLNOOP YES (DON'T CLEAR SENSE BYTES, @V202232 03672000
* IF ANY). 03673000
B CLEARADD NO. @V202232 03674000
SPACE 1 03675000
TAPEX4 EQU DASDX4 "SENSE" (04) OR OTHER. @V202232 03676000
* (NOTE: CCWCTL = 0) 03677000
SPACE 1 03678000
TAPEX5 EQU CCWGENRL @VA03331 03679000
SPACE 1 03680000
TAPEX6 EQU READSKIP @VA03331 03681000
SPACE 1 03682000
TAPEX7 EQU CLEARADD CONTROL - ADDRESS IS IRRELEVANT @V202232 03683000
SPACE 1 03684000
TAPEX9 EQU CCWGENRL @VA03331 03685000
SPACE 1 03686000
TAPEXA EQU READSKIP @VA03331 03687000
SPACE 1 03688000
TAPEXC DS 0H "READ BACKWARD" MAG TAPE COMMAND:@V202232 03689000
* HANDLE "BACKWARD" COMMANDS ... 03690000
DRAWKCAB OI RCWCOMND,X'0C' ENSURE READ-BACKWARD BITS SET @V202232 03691000
* IN REAL CCW 03692000
NI RCWCOMND,X'FC' (BUT MAKE SURE LOW-ORDER 2 BITS @V202232 03693000
* ARE 0) 03694000
* (FOR BENEFIT OF DMKUNTFR OR ANOTHER) 03695000
TM RCWFLAG,SKIP IS SKIP FLAG ON ? @V202232 03696000
BO CLEARADD IF YES, NO DATA TRANSMISSION AT @V202232 03697000
* ALL. 03698000
TM RCWFLAG,IDA IS USER'S IDA FLAG-BIT SET ? @V202232 03699000
LA R10,2 (SET R10 = 2 IN CASE NEEDED) @V202232 03700000
BO HNDUSIDA IF YES (IDA SET), GO HANDLE. @V202232 03701000
L R0,XPAGNUM SET R0 TO ISOLATE PAGE NUMBER @V202232 03702000
LR R2,R1 CALCULATE "BEGINNING ADDRESS" @V202232 03703000
SLR R2,R4 ... @V202232 03704000
LR R14,R2 REMEMBER IN R14 IN CASE NEEDED @V202232 03705000
* LATER 03706000
NR R2,R0 ISOLATE "PAGE-STARTING ADDRESS" @V202232 03707000
* IN R2, 03708000
NR R0,R1 AND "PAGE-ENDING" ADDRESS IN R0, @V202232 03709000
CLR R0,R2 ARE THEY THE SAME PAGE ? @V202232 03710000
BE CCWNXT9 TRF IF YES - GO TO IT. @V202232 03711000
LR R15,R1 "ENDING ADDRESS" @V202232 03712000
BAL R10,IDAWSUB SEE HOW MUCH ROOM WE HAVE AND @V202232 03713000
* NEED 03714000
LR R4,R1 COMPUTE BYTE-COUNT OF 1ST CHUNK @V202232 03715000
N R4,F4095 ... @V202232 03716000
LA R4,1(,R4) ... @V202232 03717000
LA R10,2048 -2048 INTO R10 @V202232 03718000
LNR R10,R10 ... @V202232 03719000
B CCWIDA1 AND GO JOIN "FORWARD" DIRECTION @V202232 03720000
* PATH. 03721000
SPACE 1 03722000
TAPEXD EQU CCWGENRL @VA03331 03723000
SPACE 1 03724000
TAPEXE EQU READSKIP @VA03331 03725000
SPACE 1 03726000
TAPEXF DS 0H CONTROL COMMAND FOR MAG TAPE @VA01700 03727000
CLI VIRCOMND,X'2F' BACKSPACE FILE @VA01700 03728000
BE NORELCU YES .. DO NOT RELEASE CU @VA01700 03729000
CLI VIRCOMND,X'3F' FORWARD SPACE FILE? @VA01700 03730000
BNE CLEARADD NO .. RELEASE CU @VA01700 03731000
NORELCU EQU * @VA01700 03732000
L R10,SAVER10 @VA01700 03733000
USING IOBLOK,R10 @VA01700 03734000
NI IOBFLAG,X'FF'-IOBRELCU RESET RELCU FLAG @VA01700 03735000
DROP R10 @VA04000 03736000
B CLEARADD AND CONTINUE .. @VA01700 03737000
SPACE 03738000
DIALX1 EQU TERMX1 WRITE (01) @VA01331 03739000
DIALX2 EQU TERMX2 READ (02) @VA01331 03740000
OTHRXC EQU * READ BACKWARD (-C) @VA01344 03741000
LA R2,DRAWKCAB SET FOR BACKWARD PROCESSING @VA01344 03742000
CLI VIRCOMND,X'1C' READ BACKWARD STATUS MODIFIER @VA01344 03743000
BCR 7,R2 IF NOT, PROCESS AS READ BACKWARD @VA01344 03744000
B CK1287 CHECK FOR 1287 @VA01344 03745000
EJECT 03746000
* DEDDX- CODE NOT REQUIRING INTERNAL TRANSFERS: 03747000
SPACE 03748000
DEDDX1 DS 0H 01 - 11 - 31/B1 - 51/D1 - 71/F1 @VA04000 03749000
TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03750000
BZ DEDDX1A NO @V60B6B8 03751000
BAL R14,ENDPRE SET SEEK ARG IN PREFIX @V60B6B8 03752000
DEDDX1A EQU * @V60B6B8 03753000
CLI VIRCOMND,X'11' IS IT 01 OR 11 = ERASE TRACK ? @VA04000 03754000
BNH CLASSOK IF YES - GENERAL WRITE CASE @VA04000 03755000
OI VIRFLAG,SMCOM IF > 11, TREAT AS STATUS MODIFIER@VA04000 03756000
BR R2 "B CCWGENRL" - HANDLE AS USUAL @VA04000 03757000
* CASE. 03758000
SPACE 1 03759000
DEDDX2 EQU * CCW OP 02,12,22,OR 92 TO DED DASD@V60B6B8 03760000
TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03761000
BZ READSKIP NO @V60B6B8 03762000
BAL R14,ENDPRE SET SEEK ARG IN PREFIX @V60B6B8 03763000
B READSKIP AND PROCESS @V60B6B8 03764000
SPACE 1 03765000
DEDDX3 DS 0H 03 - 13 - 23 - 53 - 73 @VA04000 03766000
TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03767000
BZ DEDDX3A NO, PROCESS THE NO - OP @V60B6B8 03768000
BAL R14,ENDPRE SET PREFIX SEEK ARGUMENT @V60B6B8 03769000
DEDDX3A EQU * @V60B6B8 03770000
CLI VIRCOMND,03 IS IT A NO-OP ? @VA04000 03771000
BE HNDLNOOP TRF IF YES. @VA04000 03772000
CLI VIRCOMND,X'53' DIAGNOSTIC LOAD ??? @VA04000 03773000
BE DASDWRIT YES, GO CHECK IT OUT ... @VA04000 03774000
CLI VIRCOMND,X'73' DIAGNOSTIC LOAD ??? @VA04000 03775000
BE DASDWRIT YES, HANDLE AS WRITE ... @VA04000 03776000
BR R2 IF NOT, "B CCWGENRL" - GENERAL @VA04000 03777000
* CASE. 03778000
SPACE 1 03779000
DEDDX4 EQU * PROCESS 04 - 24 ETC @VMI2005 03780000
TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03781000
BZ DASDX4 NO, STANDARD DASD PROCESS @V60B6B8 03782000
BAL R14,ENDPRE SET PREFIX SEEK ARGUMENT @V60B6B8 03783000
B DASDX4 NOW FINISH @V60B6B8 03784000
* (NOTE: CCWCTL = 0) 03785000
SPACE 1 03786000
DEDDX5 DS 0H 05 - 15 - 25 - 35 - 45 - 55 - @VA04000 03787000
* 65 - 75 ETC 03788000
TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03789000
BZ DEDDX5A NO @V60B6B8 03790000
BAL R14,ENDPRE SET SEEK ARG IN PREFIX @V60B6B8 03791000
DEDDX5A EQU * @V60B6B8 03792000
CLI VIRCOMND,X'15' IS IT 05 OR 15 ? @VA04000 03793000
BNH CLASSOK IF YES - GENERAL WRITE CASE @VA04000 03794000
OI VIRFLAG,SMCOM IF > 15, TREAT AS STATUS MODIFIER@VA04000 03795000
BR R2 "B CCWGENRL" - HANDLE AS USUAL @VA04000 03796000
* CASE. 03797000
SPACE 1 03798000
DEDDX6 DS 0H 08/86 - 16/96 @VA04000 03799000
TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03800000
BZ DEDDX6A NO @V60B6B8 03801000
BAL R14,ENDPRE SET THE PREFIX SEEK ARG @V60B6B8 03802000
DEDDX6A EQU * @V60B6B8 03803000
TM RCWFLAG,SKIP WAS SKIP-FLAG SET ? @VA04000 03804000
BO CLEARADD TRF IF YES - USE 0 ADDRESS, ETC. @VA04000 03805000
AIF (NOT &ISAM).READ06A 03806000
CLI RCWCOMND,X'06' IS IT A REAL '06' READ ? @VA04000 03807000
BE DASDRD06 TRF IF YES - CHECK FOR ISAM READ.@VA04000 03808000
.READ06A ANOP 03809000
BR R2 "B CCWGENRL" - HANDLE GENERAL @VA04000 03810000
* CASE. 03811000
SPACE 1 03812000
DEDDX9 DS 0H 19 - 29/A9 - 39/B9 - 69/E9 @VA04000 03813000
TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03814000
BZ DEDDX9A NO @V60B6B8 03815000
BAL R14,ENDPRE SET THE PREFIX SEEK ARG @V60B6B8 03816000
DEDDX9A EQU * @V60B6B8 03817000
CLI VIRCOMND,X'19' IS IT "WRITE HOME ADDRESS" @VA04000 03818000
BE CLASSOK IF YES - IT'S LEGAL @VA04000 03819000
OI VIRFLAG,SMCOM IF NOT, TREAT AS STATUS MODIFIER @VA04000 03820000
BR R2 "B CCWGENRL" - HANDLE AS USUAL @VA04000 03821000
* CASE. 03822000
SPACE 1 03823000
DEDDXA EQU DEDDX2 @V60B6B8 03824000
SPACE 1 03825000
DEDDXB DS 0H 0B - 1B - 2B @VA04000 03826000
CLI VIRCOMND,X'2B' EITHER 0B (SEEK CYL) OR 1B @VA04000 03827000
* (SEEK HEAD) ? 03828000
BL DEDDSEEK YES - CHECK FOR STAND ALONE @VA04000 03829000
* SEEK CASE 03830000
BR R2 NO - 'B CCWGENRL' @VA04000 03831000
SPACE 1 03832000
DEDDXC EQU CCWINVLD READ BACKWARD INVALID FOR DASD @VA04000 03833000
* DEVICES 03834000
SPACE 1 03835000
DEDDXD DS 0H 0D - 1D - 2D - 4D - 6D @VA04000 03836000
TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03837000
BZ DEDDXDA NO @V60B6B8 03838000
BAL R14,ENDPRE SET THE PREFIX SEEK ARG @V60B6B8 03839000
DEDDXDA EQU * @V60B6B8 03840000
CLI VIRCOMND,X'1D' IS IT WRITE (COUNT) KEY & DATA ? @VA04000 03841000
BNH CLASSOK IF YES (0D OR 1D) - IT'S OK @VA04000 03842000
OI VIRFLAG,SMCOM IF > 1D, TREAT AS STATUS MODIFIER@VA04000 03843000
BR R2 "B CCWGENRL" - HANDLE AS USUAL @VA04000 03844000
* CASE. 03845000
SPACE 1 03846000
DEDDXE EQU DEDDX2 @V60B6B8 03847000
SPACE 1 03848000
DEDDXF EQU CCWGENRL 0F - 1F @VA04000 03849000
SPACE 1 03850000
OTHRX3 EQU DEDDX3 (NECESSARY HERE) @VA04000 03851000
EJECT 03852000
* HERE FOR TIC TO A PREVIOUS CCW IN THE SAME RCWTASK, WHERE 03853000
* WE HAVE HAD AN AUTOPOLL CCW EARLIER IN THE SAME RCWTASK: 03854000
* 03855000
CCWTIC12 AR R1,R6 ADD REAL ADDRESS OF WHERE WE ARE NOW 03856000
STCM R1,7,RCWADDR+1 AND STORE NEEDED ADDRESS IN THE CCW 03857000
CLI 0(R1),X'09' NOW - DOES IT POINT TO AN AUTOPOLL CCW ? 03858000
BNE CCWTIC4C NOPE...FORGET IT. @VA05538 03859000
* (NOTE - R10 POINTS TO THIS RCWTASK) ... 03862000
LA R15,RCWHSIZ(,R10) REMEMBER ADDR OF 1ST CCW IN THIS TASK 03863000
L R10,SAVER10 NOW REFERENCE ORIGINAL IOBLOK 03864000
USING IOBLOK,R10 ... 03865000
OI IOBSPEC2,IOBWRAP WELL, WE'VE HAD ONE NOW. @V407438 03866000
OI 4(R1),PCIF SET PCI FLAGBIT IN THE AUTOPOLL CCW 03867000
LR R0,R6 COMPUTE DISPL. FROM 1ST CCW IN @VW01384 03868000
SR R0,R15 THIS CHAIN (R15=1ST CCW) @VW01384 03869000
LR R1,R9 GET ADDRESS OF VIRTUAL TIC 03870000
TRANLOCK DMKCCWL5 %V3M4038 03871000
* (NOTE - R2 HAS ADDRESS OF REAL VIRTUAL TIC) 03872000
ST R0,SAVEWRK9 SAVE DISPL. FOR LATER @VW01384 03873000
LA R0,1 SIZE OF POLL LIST AREA @VW01384 03874000
A R0,IOBMISC2 SIZE OF CURRENT LIST @VW01384 03875000
CALL DMKFREE GET STORAGE @VW01384 03876000
LR R15,R1 SAVE ADDRESS OF NEW LIST @VW01384 03877000
MVC 4(4,R15),SAVEWRK9 STORE DISPL. ADDRESS IN LIST @VW01384 03878000
ST R2,0(R15) STORE ADDRESS OF VIRTUAL TIC @VW01384 03879000
ST R0,IOBMISC2 STORE SIZE OF NEW POLL LIST @VW01384 03880000
L R1,IOBMISC GET ADDRESS OF OLD POLL LIST @VW01384 03881000
ST R15,IOBMISC STORE ADDRESS OF NEW POLL LIST @VW01384 03882000
BCTR R0,0 GET OLD LIST COUNT @VW01384 03883000
LTR R14,R0 SET UP FOR DATA MOVE @VW01384 03884000
BZ CCWTIC4C BRANCH IF NO OLD LIST @VA05538 03885000
SLL R14,3 TIMES 8 (NUMBER OF BYTES) @VW01384 03886000
BCTR R14,0 MINUS ONE FOR EX MOVE @VW01384 03887000
EX R14,EXMVCLST MOVE OLD LIST TO NEW LIST @VW01384 03888000
CALL DMKFRET RELEASE OLD LIST @VW01384 03889000
B CCWTIC4C GO SET NEEDED RELOC BIT IN CCW @VA05538 03890000
* CCW. 03891000
SPACE 03892000
DROP R10 (THRU WITH IOBLOK) @VA00924 03893000
EJECT 03894000
CCWDIAL DS 0H SPECIAL HANDLING OF "DIALED @VA00924 03895000
* LINES" PRIOR TO EXIT: 03896000
USING IOBLOK,R10 (IN EFFECT) @VA00924 03897000
USING VDEVBLOK,R8 (ALSO IN EFFECT AT ENTRY) @V200730 03898000
TM VDEVFLAG,VDEVDIAL DIALED FLAG-BIT ON ? @VA00924 03899000
BZ CCWDIAL1 NOPE. @VA00924 03900000
TM VDEVSTAT,VDEVDED IS THE DEVICE DEDICATED? @VA02971 03901000
BZ CCWDIAL1 IF NOT, DEVICE IS NOT YET @VA02971 03902000
* CONNECTED 03903000
TM MEMO3,VIRTDISA IF YES, WAS A DISABLE ISSUED ? @VA00924 03904000
BZ CCWEXIT IF NOT, NOTHING TO DO HERE. @VA00924 03905000
* R8 = A (VDEVBLOK), R10 = A(IOBLOK): 03906000
CCWDIAL1 EQU * HERE FOR SPECIAL LINE HANDLING: @VA00924 03907000
SLR R2,R2 CLEAR "R1" FOR BENEFIT OF CALLER @V200730 03908000
ST R2,SAVER1 ... @V200730 03909000
LH R2,VDEVTYPC GET CLAS AND TYPE FOR DMKDIASM @V200730 03910000
L R8,SAVER8 GET DISPLACEMENT OF VDEVBLOK @V200730 03911000
CALL DMKDIBSM SPECIAL CCW STRING PROCESSING @V407510 03912000
B CCWEXIT GO EXIT. @VA00924 03913000
SPACE 03914000
DROP R8,R10 (THRU WITH VDEVBLOK & IOBLOK) @VA00924 03915000
EJECT 03916000
* THE FOLLOWING ROUTINE IS ENTERED WHEN PROCESSING A 03917000
* CHANNEL PROGRAM TO A DEDICATED DASD DEVICE AND THE 03918000
* REAL DEVICE IS A 3330V. THE CP-GENERATED SEEK 03919000
* ARGUMENT HAS NOT YET BEEN SET, SO IT IS SET TO 03920000
* THE LAST-REFERENCED CYLINDER ON THE DEVICE, WHICH IS 03921000
* MAINTAINED IN FIELD VDEVPOSN. 03922000
ENDPRE EQU * @V60B6B8 03923000
LA R0,ZEROES @VMI2005 03924000
L R15,FIRSTRCW FIRST RCWTASK @V60B6B8 03925000
LA R15,RCWHSIZ(R15) BUMP OVER HEADER @V60B6B8 03926000
STCM R0,7,1(R15) INTO THE SEEK CCW @V60B6B8 03927000
NI MEMO2,FULL-PRECCW INDICATE SEEK RESOLVED @V60B6B8 03928000
BR R14 AND RETURN @V60B6B8 03929000
EJECT 03930000
* CHECK FOR 'BUFFER UNLOAD' ON 33XX (X'A4') OR 2305 (X'24'): HRC011DK 03931490
* IF YES, CALL DMKDSBSD TO RECORD THE HARDWARE STATISTICAL COUNTS, 03932000
* WITH THE SINGLE EXCEPTION OF A CLASS F USER ON A DEDICATED PACK. 03933000
SPACE 03934000
SPACE 03935000
USING VDEVBLOK,R8 03936000
SPACE 03937000
SPACE 1 03938000
DASDCKBU CLI CCWCTL,RCWHMR NON-DEDICATED 33XX/2305 HRC011DK 03939490
BE DASDCTYP YES - CHECK WHICH ONE. 03940000
CLI VDEVTYPC,CLASURO IS IT A 3800? @V60B9BA 03941000
BNE DASDCKB2 XFER IF NOT @V60B9BA 03942000
CLI VDEVTYPE,TYP3800 IS IS REALLY A 3800 ? @V60B9BA 03943000
BNE DASDCKB2 XFER IF NOT @V60B9BA 03944000
TM VMCLEVEL,VMCLASSF DED CLASS F (CE) USER? @V60B9BA 03945000
BO READSKIP YES - LET HIM HAVE THE REAL INFO @V60B9BA 03946000
LA R14,X'24' BUFFER UNLOAD FOR THE 3800 @V60B9BA 03947000
B CHEKA424 CONTINUE PROCESSING @V60B9BA 03948000
DASDCKB2 CLI VDEVTYPC,CLASDASD DEDICATED DASD DEVICE CLASS ?@V60B9BA 03949000
BNE READSKIP NOPE - JUST LET IT GO. 03950000
TM VMCLEVEL,VMCLASSF DEDICATED DASD CLASS F (CE) USER ? 03951000
BO READSKIP YES - LET HIM HAVE THE REAL INFO 03952000
DASDCTYP LA R14,X'A4' 33XX BUFFER UNLOAD CMD HRC011DK 03953590
TM VDEVTYPE,TYP3330+TYP3340+TYP3350+TYP3380 HRC011DK 03954180
BNZ CHEKA424 YES (WE GUESSED RIGHT) @V2A2029 03955000
CLI VDEVTYPE,TYP2305 MUST BE A 2305, THEN ? 03956000
BNE READSKIP "WRONG" SAID THE OLD MAN, ETC. ... 03957000
LA R14,X'24' X'24' = BUFFER UNLOAD FOR 2305 03958000
CHEKA424 CLM R14,1,VIRCOMND IS IT THE RIGHT CCW OP-CODE ? 03959000
BNE READSKIP NOPE - JUST LET IT GO. 03960000
L R8,VDEVREAL R8 MUST POINT TO REAL DEVICE BLOCK 03961000
DROP R8 NEEDED BY DMKDSBSD @VA08187 03962000
LA R0,IOBSIZE GET A DUMMY IOBLOK 03963000
CALL DMKFREE ... 03964000
XC 0(IOBSIZE*8,R1),0(R1) CLEAR HIM PLEASE 03965000
LR R10,R1 AND A(IOBLOK) INTO R10 @V60B9BA 03966000
USING RDEVBLOK,R8 TEMPORARY ADDRESSIBILITY @V60B9BA 03967000
CLI RDEVTYPC,CLASURO IS IT UNIT RECORD (3800) ? @V60B9BA 03968000
BNE CHEKA425 XFER IF NOT @V60B9BA 03969000
CALL DMKRSESD CALL UR BUFFER UNLOAD @V60B9BA 03970000
B CHEKA426 CONTINUE INLINE @V60B9BA 03971000
DROP R8 NO LONGER NEEDED @V60B9BA 03972000
CHEKA425 CALL DMKDSBSD CALL DASD BUFFER UNLOAD @V60B9BA 03973000
CHEKA426 LCTL C1,C1,VMSEG REESTABLISH CONTROL REG 1 @V60B9BA 03974000
CALL DMKFRET GIVE BACK THE DUMMY IOBLOK 03975000
LA R1,0(,R3) RESTORE R1 TO ITS USUAL VALUE, 03976000
B READSKIP THEN GO AHEAD & HANDLE THE CCW NORMALLY 03977000
* NOTE: R8 NO LONGER = A(VDEVBLOK). 03978000
SPACE 03979000
EJECT 03980000
* DMKCCWSB = EXTERNAL ENTRY POINT TO INVOKE "CNTRLSUB" INTERNAL 03981000
* SUBROUTINE, FOR OBTAINING CONTROL BYTES (E.G. SEEK DATA) 03982000
* 03983000
* USED (FOR EXAMPLE) BY "TRACE" (TO AVOID DUPLICATE CODE THEREIN) 03984000
* 03985000
* ENTRY CONDITIONS: 03986000
* R0 = NO. OF BYTES (LESS 1) TO BE MOVED (E.G. 6) 03987000
* R1 = ADDRESS OF VIRTUAL CCW (IN SAVE-AREA OF CALLER) 03988000
* R2 = ADDRESS INTO WHICH CONTROL INFO IS TO BE STORED 03989000
* 03990000
* EXIT CONDITIONS: 03991000
* CC = 0: CONTROL INFO STORED IN AREA GIVEN BY R2 AT ENTRY 03992000
* CC = 3: ADDRESS ERROR ENCOUNTERED OBTAINING USER DATA 03993000
SPACE 03994000
ENTRY DMKCCWSB 03995000
USING DMKCCWSB,R12 (VERY BRIEFLY) 03996000
DMKCCWSB ENTER SAVE REGS 0-11, 03997000
L R12,=A(CCWSTART) BASE FOR PART TWO @VA12408 03998000
USING CCWSTART,R12 ADDRESSABILITY NEEDED MAIN CODE @VA12408 03999000
LR R5,R12 BASE ADDRESS FOR DMKCCW @VA04000 04000000
AL R5,F4096 ADDRESSABILITY FOR 2'ND BASE @VA04000 04001000
LCTL C1,C1,VMSEG USER'S ADDRESS SPACE @VA04436 04002000
MVI MEMO1,CCWSUBR SIGNAL DMKCCWSB ENTRY POINT INVOKED 04003000
LR R6,R1 SET R6 = ADDRESS OF THE CCW 04004000
LR R7,R2 AND R7 = ADDRESS OF USER'S WORK AREA 04005000
BAL R14,CCWRES14 SET R1, R3, & R4 TO THEIR USUAL VALUES 04006000
LR R4,R0 BUT LET R4 = BYTE-COUNT-LESS-1 FROM R0 04007000
SLR R8,R8 R8=0 TO LOOK LIKE "CNTRLSUB" ENTRY POINT 04008000
BAL R10,CNTRLSBW ENTER AT CNTRLSBW TO CHECK IDA BIT ETC. 04009000
SR R15,R15 OK - RETURNS HERE - CLEAR CONDITION CODE 04010000
EXIT AND EXIT (E.G. TO "TRACE") WHEN ALL THRU. 04011000
SPACE 04012000
EJECT 04013000
TICSCAN DS 0F "TICSCAN" PHASE: @V1D0632 04050000
LH R9,CNTUNTIC COUNT OF UNPROCESSED TICS INTO R9 04051000
SLR R10,R10 R10=0 TO SEARCH ALL CCW CHAINS 04052000
L R7,TICBLK ADDRESS OF CURRENT BLOCK INTO R7 04053000
LTR R7,R7 (IF ANY) 04054000
BNZ TICSCAN2 IF IT EXISTS, GO AHEAD. 04055000
L R7,FIRSTRCW IF NOTHING THERE, START WITH "FIRSTRCW". 04056000
TICSCAN1 ST R7,TICBLK AND STORE ADDRESS OF FIRST/NEXT BLOCK 04057000
USING RCWTASK,R7 04058000
TICSCAN2 LH R15,RCWHEAD CHECK DISPLACEMENT OF 1ST UNPROCESSED TIC 04059000
LTR R15,R15 (IF ANY) 04060000
BNP TICSCAN4 TRF IF NOTHING THERE TO DO. 04061000
* 04062000
TICSCAN3 LA R6,0(R7,R15) GET ADDRESS OF "NEXT" UNPROCESSED TIC 04063000
L R1,RCWADDR GET ADDRESS IN R1 04064000
LA R1,0(,R1) (WITHOUT HIGH-ORDER BYTE, PLEASE) 04065000
BAL R14,TICSUBX ATTEMPT TO RESOLVE IT 04066000
BZ TICSCAN5 CONDITION-CODE 0 = WE FAILED (REALLY). 04067000
STCM R3,7,RCWADDR+1 OK, STORE REAL ADDRESS (IN R3) @V1D0632 04068000
* IN THE TIC 04069000
BCTR R9,0 IF WE SUCCEEDED, DECREMENT COUNT OF 04070000
STH R9,CNTUNTIC UNPROCESSED TICS AND STORE 04071000
LH R15,RCWCNT GET DISPLACEMENT OF NEXT UNPROCESSED TIC 04072000
STH R15,RCWHEAD STORE IN RCWHEAD FOR NEXT TIME AROUND 04073000
LTR R15,R15 IS THERE ANOTHER ONE TO BE DONE ? 04074000
BP TICSCAN3 IF YES, GO BUMP R6 AND DO THE NEXT ONE. 04075000
* 04076000
TICSCAN4 L R15,FFS MAKE SURE "RCWHEAD" = X'FFFF' 04077000
STH R15,RCWHEAD (FOR USE LATER BY "UNTRANS") 04078000
L R7,RCWPNT GET POINTER TO NEXT CCW STRING (IF ANY) 04079000
LTR R9,R9 CHECK IF ANY UNPROCESSED TICS ARE LEFT 04080000
BP TICSCAN1 IF YES, GO DO SOME MORE. 04081000
B CCWNXT18 IF NOT, GO FINISH UP AND EXIT. 04082000
DROP R7 04083000
* 04084000
* UNPROCESSED TIC IS STILL UNPROCESSED - START A NEW CHAIN: 04085000
TICSCAN5 L R9,RCWADDR SET R9 TO ADDRESS IN CCW 04086000
MVI VIRFLAG,00 CLEAR VIRTUAL FLAG 04087000
IC R15,RCWFLAG PICK UP "PREVIOUS OP-CODE" 04088000
STC R15,VIRCOMND STORE WHERE NEEDED 04089000
TM RCWCOMND,CDTIC WAS THIS "CHAIN DATA TO TIC" ? 04090000
BNO TICSCAN6 IF NOT, GET GOING. @VA12408 04091000
OI VIRFLAG,CD IF YES, SET "CHAIN DATA" FLAG AS NEEDED 04092000
TICSCAN6 EQU * @VA12408 04093000
L R12,=A(DMKCCW) FIRST PART ADDRESSABILTIY @VA12408 04093300
B CCWNEWV-DMKCCW(R12) CREATE A NEW CCW CHAIN @VA12408 04093600
EJECT 04094000
* SUBROUTINE TO SEARCH PREVIOUS OR ALL CHAINS AND IF FOUND TO 04095000
* PLACE IN R3 THE REAL ADDRESS FOR A TIC POINTING THERETO: 04096000
* 04097000
* ENTER AT "TICSUBX" TO SEARCH PREVIOUS (EXTERNAL) CHAINS 04098000
* AND TO RESOLVE THE ADDRESS IF FOUND: 04099000
DS 0D 04100000
TICSUBX LA R2,FIRSTRCW POINT AT POINTER TO FIRST RCW CHAIN 04101000
TICSUBX3 LA R3,TICSUB1 SET R3 FOR BCR INSTRUCTIONS @VA04842 04102000
USING RCWTASK,R2 04103000
TICSUB1 L R2,RCWPNT GET POINTER TO FIRST/NEXT RCWTASK 04104000
CLR R2,R10 DOES IT MATCH TERMINATING VALUE IN R10 ? 04105000
BCR 8,R14 EXIT IF YES (NOT FOUND) CONDITION-CODE 0 04106000
TICSUB2 CL R1,RCWVCAW CHECK ADDRESS IN TIC AGAINST @V1D0632 04107000
* VIRTUAL CAW 04108000
BCR 4,R3 "BL TICSUB1" IF TOO SMALL - TRY ANOTHER. 04109000
LH R0,RCWVCNT COMPUTE IN R0 04110000
SLL R0,3 THE VIRTUAL END 04111000
AL R0,RCWVCAW OF THE CCW STRING 04112000
CLR R1,R0 CHECK ADDRESS IN TIC AGAINST THIS VALUE 04113000
BCR 11,R3 "BNL TICSUB1" IF TOO BIG - TRY ANOTHER. 04114000
* THE CORRECT RCWTASK HAS BEEN FOUND: 04115000
LA R3,RCWHSIZ(,R2) SET R3 TO FIRST REAL ADDRESS, 04116000
L R4,RCWVCAW AND R4 TO 1ST VIRTUAL ADDRESS 04117000
LH R0,RCWVCNT CHECK THE VIRTUAL CCW 04118000
CH R0,RCWRCNT VERSUS THE REAL CCW COUNT 04119000
BE TICSUB2A IF THE SAME, DO IT THE EASY WAY @VA04842 04120000
ST R14,TEMPR14 DO IT THE HARD WAY @VA04842 04121000
BAL R14,TICSUB4 FIND THE CCW @VA04842 04122000
L R14,TEMPR14 RESTORE RETURN ADDR @VA04842 04123000
B TICSUB2B @VA04842 04124000
TICSUB2A SR R1,R4 MAKE R1 A DISPLACEMENT @VA04842 04125000
AR R3,R1 ADD TO BEGINNING REAL ADDR @VA04842 04126000
AR R1,R4 RESTORE R1 @VA04842 04127000
TICSUB2B CLI RCWCOMND,CDTIC DATA CHAIN THRU A TIC? @VA04842 04128000
BNER R14 NO...RETURN REPORTING SUCCESS @VA04842 04129000
* NOTE THAT OP-CODE OF 'PREVIOUS CCW' IS IN RCWFLAG OF THE TIC CCW: 04130000
CLC 0(1,R3),RCWFLAG DO OP-CODES MATCH? @VA04842 04131000
BE TICSUB8 YES...GO REPORT SUCCESS @VA04842 04132000
CLI 0(R3),CDTIC CDTIC TO A CDTIC? @VA04842 04133000
BE TICSUB8 WEIRD...(TIC TO A TIC) BUT DON'T @VA04842 04134000
* LOOP TRYING TO HANDLE...LET THE CHANNEL PROGRAM CHECK ON IT 04135000
CLI 0(R3),X'00' NO...IS TIC-TO OP-CODE = X'00'? @VA04842 04136000
BNE TICSUBX3 NO...MUST MAKE ANOTHER PASS @VA04842 04137000
TM 4(R3),X'03' TIC TO INVALID CCW ?? @VA05921 04138000
BNZ TICSUB8 YES,DON'T LOOP TRYING TO RESOLVE @VA05921 04139000
LA R0,RCWHSIZ(,R2) POINT AT 1ST CCW IN TASK @VA04842 04140000
LR R15,R3 REFERENCE TIC-TO ADDRESS @VA04842 04141000
TICSUB2C S R15,F8 BACK OFF 8 ON TIC-TO ADDRESS @VA04842 04142000
CR R15,R0 DON'T RUN OFF FRONT OF TASK @VA04842 04143000
BL TICSUBX3 IF WE DO...MAKE ANOTHER PASS @VA04842 04144000
CLI 0(R15),X'00' IS OP-CODE STILL = X'00'? @VA04842 04145000
BE TICSUB2C YES...KEEP BACKING UP @VA04842 04146000
CLC 0(1,R15),RCWFLAG NO...DO OP-CODES MATCH? @VA04842 04147000
BE TICSUB8 YES...GO REPORT SUCCESS @VA04842 04148000
B TICSUBX3 NO...KEEP ON LOOKING FOR CCW @VA04842 04149000
* 04150000
* ENTER AT "TICSUBI" TO RESOLVE AN ADDRESS IN THIS RCWTASK: 04151000
USING RCWTASK,R10 04152000
TICSUBI LA R3,RCWHSIZ(,R10) SET R3 TO FIRST REAL ADDRESS 04153000
L R4,RCWVCAW AND R4 TO 1ST VIRTUAL ADDRESS 04154000
DROP R10 04155000
TICSUB4 CLR R1,R4 DOES R1 MATCH THE VERY BEGINNING ? 04156000
BE TICSUB8 IF YES, START AT THE "REAL" BEGINNING. 04157000
LA R0,8 IF NOT, SET R0=8 (FOR 'ALR' USE), 04158000
LA R15,TICSUB6 SET R15 FOR "BCR" USE @V1D0632 04159000
B TICSUB7 START CHECKING AT JUST THE RIGHT PLACE. 04160000
* 04161000
DS 0D TIGHT LOOP TO FIND "CORRECT" REAL ADDRESS: 04162000
TICSUB5 ALR R4,R0 BUMP VIRTUAL ADDRESS BY 8, 04163000
TICSUB6 ALR R3,R0 BUMP REAL ADDRESS BY 8, 04164000
TICSUB7 TM 5(R3),RCWGEN IS THIS CCW CP-GENERATED ? 04165000
BCR 1,R15 "BO TICSUB6" IF YES - BUMP REAL ADDRESS. 04166000
CLR R1,R4 IF NOT, DOES ADDR IN CCW MATCH VIRT ADDR? 04167000
BNE TICSUB5 NO - BUMP BOTH ADDRESSES, KEEP @V1D0632 04168000
* LOOKING. 04169000
TICSUB8 LTR R3,R3 SUCCESS - SET CONDITION-CODE @V1D0632 04170000
* NONZERO 04171000
BR R14 AND RETURN (R3 HOLDS THE REAL @V1D0632 04172000
* ADDRESS) 04173000
DROP R2 END OF TIC SCAN ROUTINE @VA04000 04174000
EJECT 04175000
DS 0F 04179000
DASDTBL CCTBL DASD,12,18 TABLE FOR NON-DEDICATED DASD DEVICES: 04180000
AIF (NOT &ISAM).NOISAM3 04181000
ORG DASDTBL 04182000
DC AL2(DASDX0-CCWSTART) 00 OK IF HAD AN ISAM READ @VA12408 04183100
ORG 04184000
.NOISAM3 ANOP 04185000
SPACE 04186000
SPACE 04187000
DEDDTBL CCTBL DEDD,12,18 TABLE FOR DEDICATED DASD DEVICES: 04188000
AIF (NOT &ISAM).NOISAM4 04189000
ORG DEDDTBL 04190000
DC AL2(DASDX0-CCWSTART) 00 OK IF HAD AN ISAM READ @VA12408 04191100
ORG 04192000
.NOISAM4 ANOP 04193000
SPACE 04194000
TAPETBL CCTBL TAPE,12,09 TABLE FOR TAPE DEVICES: 04195000
TERMTBL CCTBL TERM,12,09 TABLE FOR TERMINAL-CLASS DEVICES: 04196000
SDLCTBL CCTBL SDLC,12,09 TABLE FOR ICA-SDLC @V67CDF1 04196500
DIALTBL CCTBL DIAL,12,09 TABLE FOR "DIALED LINE" DEVICES: 04197000
OTHRTBL CCTBL OTHR,12,09 TABLE FOR ALL OTHER DEVICES: 04198000
CONSTBL CCTBL CONS,12,09 TABLE FOR DEDICATED 3210 CONSOLES 04199000
MSCTBL CCTBL MSC,12,09 TABLE FOR PORTS ON 3851 MSS @V407466 04200000
EJECT 04204000
*. 04205000
* LOGIC FOR "CONS" = DEDICATED CPU CONSOLE 04206000
* 04207000
* CONSX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 04208000
* WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 04209000
* IF NOT 01, HANDLED AS AN INVALID CCW 04210000
* 04211000
* CONSX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 04212000
* READ (02) HANDLED AS GENERAL CASE "READ" 04213000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 04214000
* 04215000
* IF NOT 02, HANDLED AS AN INVALID CCW 04216000
* 04217000
* CONSX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 04218000
* FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 04219000
* IF NOT 03, HANDLED AS AN INVALID CCW 04220000
* 04221000
* CONSX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 04222000
* IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 04223000
* DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 04224000
* OTHERWISE, HANDLED AS GENERAL CASE "READ" 04225000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 04226000
* 04227000
* CONSX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5: 04228000
* IF NOT 05, HANDLED AS AN INVALID CCW 04229000
* 04230000
* CONSX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 04231000
* HANDLED AS AN INVALID CCW 04232000
* 04233000
* CONSX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 04234000
* HANDLED AS AN INVALID CCW 04235000
* 04236000
* CONSX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 04237000
* WRITE (09) HANDLED AS A GENERAL CASE OF DATA TRANSFER 04238000
* IF NOT 09, HANDLED AS AN INVALID CCW 04239000
* 04240000
* CONSXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 04241000
* READ (0A) HANDLED AS GENERAL CASE "READ" 04242000
* (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 04243000
* 04244000
* IF NOT 0A, HANDLED AS AN INVALID CCW 04245000
* 04246000
* CONSXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 04247000
* ALARM (0B) HANDLED AS A NO-OP (DOES NOT CLEAR ANY SENSE BYTES) 04248000
* IF NOT 0B, HANDLED AS AN INVALID CCW 04249000
* 04250000
* CONSXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 04251000
* HANDLED AS AN INVALID CCW 04252000
* 04253000
* CONSXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 04254000
* HANDLED AS AN INVALID CCW 04255000
* 04256000
* CONSXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 04257000
* HANDLED AS AN INVALID CCW 04258000
* 04259000
* CONSXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 04260000
* HANDLED AS AN INVALID CCW 04261000
*. 04262000
SPACE 2 04263000
* CODE TO HANDLE DEDICATED CPU CONSOLE COMMANDS: 04264000
SPACE 04265000
SPACE 04266000
CONSX1 EQU TERMX1 WRITE (01) @VA01331 04267000
SPACE 04268000
CONSX2 EQU TERMX2 READ (02) @VA01331 04269000
SPACE 04270000
CONSX3 CLI VIRCOMND,X'03' IS IT A NOP ?? 04271000
BE HNDLNOOP OK, DO IT 04272000
B CCWINVLD ANYTHING ELSE IS INVALID 04273000
SPACE 04274000
CONSX4 EQU DASDX4 SENSE ETC. 04275000
SPACE 04276000
CONSX5 CLI VIRCOMND,X'05' IS THE OPCODE AN X'05'? @VA03298 04277000
BNE CCWINVLD NO, IT IS INVALID 04278000
B CCWGENRL AND HANDLE AS GENERAL CASE @VA01388 04279000
SPACE 1 04280000
CONSX6 EQU CCWINVLD 04281000
SPACE 04282000
CONSX7 EQU CCWINVLD 04283000
SPACE 04284000
CONSX9 CLI VIRCOMND,X'09' IS IT A WRITE ?? 04285000
BCR 8,R2 YES, DO IT 04286000
B CCWINVLD NO, IT IS INVALID 04287000
SPACE 04288000
CONSXA CLI VIRCOMND,X'0A' IS IT A READ ?? 04289000
BCR 8,R2 YES, DO IT 04290000
B CCWINVLD NO, IT IS INVALID 04291000
SPACE 04292000
CONSXB CLI VIRCOMND,X'0B' IS IT AN ALARM ?? 04293000
BE HNDLNOOP YES, TREAT AS A NOP 04294000
B CCWINVLD NO, IT IS INVALID 04295000
SPACE 04296000
CONSXC EQU CCWINVLD 04297000
SPACE 04298000
CONSXD EQU CCWINVLD 04299000
SPACE 04300000
CONSXE EQU CCWINVLD 04301000
SPACE 04302000
CONSXF EQU CCWINVLD 04303000
SPACE 1 04304000
* VMACNT1 COUNTER IS USED TO COUNT THE NUMBER OF TIMES A SHARED 04305000
* SEGMENT WAS WRITTEN OUT OF THAT WAS SELF CONTAINED WITHIN THE 04306000
* SAME PAGE. 04307000
* VMACNT2 COUNTER IS USED TO COUNT THE NUMBER OF TIMES A FULL PAGE 04308000
* WAS COPIED FROM A SHARED PAGE TO A PAGE GOTTEN BY CALLING DMKPTRFR. 04309000
* 04310000
VMACNT1 DC F'0' STAT. COUNTER @V304735 04311000
VMACNT2 DC F'0' STAT. COUNTER @V386198 04312000
EJECT 04313000
* THE FOLLOWING LISTS MUST BE KEPT CONTIGUOUS AND IN ORDER; THEY ARE 04314000
* USED BY THE CP ASSIST INSTRUCTIONS "DECCW0", "DECCW1", AND "CCWGENRL" 04315000
SPACE 2 04316000
CCWDATA DS 0F "DECCW0" AND "DECCW1" DATA LIST @V3M4026 04317000
SPACE 04318000
DC V(DMKSYSCS) +0 SAME AS 'ACORETBL' @V386198 04319000
DC A(CCWGENRL) +4 GENERAL CASE CCW ROUTINE @V386198 04320000
SPACE 2 04321000
CCWEXITS DS 0F "DECCW0" AND "DECCW1" EXIT LIST @V3M4026 04322000
SPACE 04323000
DC A(CCWBAD) +0 VIRTUAL CCW IS INVALID @V386198 04324000
DC A(CCWNROOM) +4 RCWTASK NEEDS TO BE EXPANDED @V386198 04325000
DC A(CCWTIC1) +8 TIC FOLLOWS COMMAND WITH 'CD' @V386198 04326000
DC A(ADDRINVL) +12 VIRTUAL DATA ADDR NOT VALID @VA07223 04327000
DC A(CCWTIC) +16 THE CCW BYTE COUNT IS ZERO @V386198 04328000
DC A(NGCCW) +20 CCW NOT RES. OR PAGE SHARED @V386198 04329000
SPACE 2 04330000
GENDATA DS 0F "CCWGENRL" ASSIST DATA LIST @V386198 04331000
SPACE 04332000
DC V(DMKSYSCS) +0 SAME AS 'ACORETBL' @V386198 04333000
DC A(DIALTBL) +4 TABLE FOR DIALED LINE CCW'S @V386198 04334000
SPACE 2 04335000
GENEXITS DS 0F "CCWGENRL" ASSIST EXIT LIST @V386198 04336000
SPACE 04337000
DC A(FWDIDAL) +0 CCW HAS 'IDA' FLAG SET @V386198 04338000
DC A(CCWMANYF) +4 DATA AREA CROSSES PAGE BDY @V386198 04339000
DC A(CCWNXT9A) +8 GO CALL DMKPTRAN TO GET PAGE @V386198 04340000
DC A(SHRDPAGE) +12 CCW POINTS TO A SHARED PAGE @V386198 04341000
DC A(CCWNXT10) +16 VDEVBLOK HAS SENSE BYTES @V386198 04342000
DC A(CCWNEXT) +20 THIS CCW DONE - PROCESS NEXT @V386198 04343000
DC A(CCWNEWV2) +24 DO NEW CCW STRING @V386198 04344000
DC A(TICSCAN) +28 FINISH HANDLING A 'TIC' CCW @V386198 04345000
DC A(CCWDIAL) +32 TAKE CARE OF DIALED LINE CCW @V386198 04346000
DC A(CALLISM) +36 HAVE FOUND 'ISAM READS' @V386198 04347000
DC A(CCWEXIT) +40 "SVC 12" ASSIST CAN'T HANDLE @V386198 04348000
DC A(CCWNXT12) +44 WORKING IN A SHARED SEGMENT @V386198 04349000
DC A(ITSAREL) +48 RELEASE A VIRTUAL DEVICE @V4M0156 04350000
EJECT 04351000
LTORG 04352000
EJECT 04353000
COPY SAVE (R13) @V306638 04354000
COPY CORE @V304735 04355000
SAVEAREA DSECT WORKING STORAGE WITHIN "SAVEAREA" (R13): 04356000
SPACE 04357000
ORG SAVEWRK1 KEEP FOLLOWING IN TWO PAIRS FOR LH/STH USE 04358000
PRVCOMND DS 1X "PREVIOUS" CCW COMMAND CODE 04359000
PRVFLAG DS 1X "PREVIOUS" CCW FLAG BITS 04360000
VIRCOMND DS 1X "THIS" VIRTUAL CCW COMMAND CODE 04361000
VIRFLAG DS 1X "THIS" VIRTUAL CCW FLAG BITS 04362000
SPACE 04363000
* FLAG-BITS FOR REMEMBERING CCWS BY CATEGORIES IN VIRFLAG/PRVFLAG: 04364000
* (INVENT AS NEEDED, BUT AVOID REAL FLAG-BITS "CC" & "CD" AND ANY 04365000
* OTHERS USED FOR TESTING CCW FLAG FOR GETTING NEXT COMMAND, ETC.) 04366000
SMCOM EQU X'01' STATUS-MODIFIER TYPE OF COMMAND 04367000
SVSEN EQU X'02' SAVE (DO NOT CLEAR) SENSE BYTES 04368000
FWDTIC EQU X'04' FORWARD TIC (*+16) WAS PROCESSED 04369000
BADHEDNO EQU X'08' INVALID HEAD NUMBER (FOR SIMULATED 2311) 04370000
SPACE 04371000
ORG SAVEWRK2 ORG FOR REMAINING WORKING STORAGE: 04372000
CCWCTL DS 1X 00 OR RCW2311 (INITIALIZES RCWCTL) 04373000
SPACE 1 04374000
MEMO1 DS 1X "GLOBAL" FLAG (FOR ALL CCW STRINGS): 04375000
CCWFIRST EQU X'80' THIS = FIRST CCW-STRING BEING PROCESSED. 04376000
NEEDSEEK EQU X'40' A 'SEEK' IS NEEDED (IF NOT USER-SUPPLIED) 04377000
CHEKISAM EQU X'20' CHECK FOR POSSIBLE ISAM READ(S) 04378000
CCWSUBR EQU X'10' DMKCCWSB SUBROUTINE ENTRY POINT INVOKED 04379000
PROTCAW EQU X'08' CAW PROTECTION KEY SET @V304735 04380000
* THE FOLLOWING TWO FLAGS ARE THE SAME AS IN MEMO2 04381000
HADUTIC EQU X'02' HAD AT LEAST ONE UNPROCESSED TIC @V407438 04382000
HADISAM EQU X'01' HAD AN APPARENT ISAM READ @V407438 04383000
SPACE 1 04384000
MEMO2 DS 1X "LOCAL" FLAG (FOR "THIS" CCW STRING): 04385000
HADRCGEN EQU X'80' CP HAS GENERATED A CCW 04386000
STRTNEW EQU X'40' "START NEW CCW STRING" FORTHWITH 04387000
HADAPOLL EQU X'20' HAVE HAD AUTOPOLL FOR A 2700 BISYNC LINE 04388000
SKCECYL EQU X'10' SEEK TO CE CYLINDER @V304498 04389000
PRECCW EQU X'04' AN MSS PREFIX SEEK CCW NOT @V60B6B8 04390000
* COMPLETE 04391000
FULL EQU X'FF' MASK FOR TURNING OFF FLAGS @V60B6B8 04392000
* THE FOLLOWING TWO FLAGS ARE THE SAME AS IN MEMO1 04393000
*HADUTIC EQU X'02' HAD AT LEAST ONE UNPROCESSED TIC 04394000
*HADISAM EQU X'01' HAD AN APPARENT ISAM READ 04395000
SPACE 04396000
MEMO3 DS 1X MISCELLANEOUS FLAG BYTE @V407438 04397000
* FOR DIALED LINES: 04398000
VIRTDIAL EQU X'80' VIRTUAL DIALED LINES ARE BEING HANDLED 04399000
VIRTENAB EQU X'40' VIRTUAL ENABLE ISSUED 04400000
VIRTDISA EQU X'20' VIRTUAL DISABLE ISSUED 04401000
SKALTCYL EQU X'04' HAVE HAD SEEK TO ALTERNATE @V56BDA8 04402000
* CYLINDER 04403000
HADASKHD EQU X'08' WE HAVE MODIFIED A SEEK HEAD @V56BDA8 04404000
* FOR MINI DISKS: 04405000
XFERSENS EQU X'10' SENSE BYTES XFERED TO VIRT STG @VA07832 04406000
RESINCHA EQU X'80' THERE IS RESERVE CCW IN THE CHAIN@V407438 04407000
SPACE 1 04408000
* 'GLOBAL' WORKING STORAGE (FOR ALL CCW STRINGS): 04409000
FIRSTRCW DS 1F ADDRESS OF 1ST REAL RCWTASK CREATED 04410000
PREVRCW DS 1F ADDRESS OF "PREVIOUS" REAL RCWTASK (IF ANY) 04411000
TICBLK DS 1F LAST LIST OF CCWS SCANNED FOR UNPROCESSED TICS 04412000
DEVTABLE DS 1F ADDRESS OF DEVICE TABLE @VA04000 04413000
* S-CONSTANT 04414000
CNTUNTIC DS 1H CUMULATIVE COUNT OF UNPROCESSED TICS 04415000
SPACE 1 04416000
LOCWORK EQU * 'LOCAL' WORKING STORAGE (FOR "THIS" CCW STRING) 04417000
UNTICLST DS 1H DISPLACEMENT OF LAST UNPROCESSED TIC 04418000
THISRCW DS 1F ADDRESS OF "THIS" REAL RCWTASK 04419000
SAVREG14 DS 1F R14 SAVED HERE (SAVEWRK9) ON TRANS CALLS 04420000
ORG SAVEWRK9+4 04421000
ENDWORK DS 0F "THE END" (FOR SURE) OF WORK AREA. 04422000
SPACE 1 04423000
* FAKE 'TIC' OP-CODES (FOR INTERNAL USE BY DMKCCW): 04424000
CDTIC EQU X'18' "TIC AFTER CHAIN DATA" 04425000
* EQUATES FOR CCW OPCODES FOR 3851 MSS 04426000
DIAGWT EQU X'41' DIAGNOSTIC WRITE @V407466 04427000
PREPRD EQU X'26' PREPARE READ DATA @V407466 04428000
DIAGRD EQU X'42' DIAGNOSTIC READ @V407466 04429000
DIAGCNT EQU X'43' DIAGNOSTIC CONTROL @V407466 04430000
NOP EQU X'03' NO OPERATION @V407466 04431000
MODNOP EQU X'A3' MODIFIED NOP @V407466 04432000
RDATA EQU X'06' READ DATA @V407466 04433000
SENSE04 EQU X'04' SENSE @V407466 04434000
SENSEE4 EQU X'E4' SENSE I/O @V407466 04435000
SENSE44 EQU X'44' MSC SWITCH @V407466 04436000
EJECT 04437000
COPY IOBLOKS (R10) @V306638 04438000
RCWHSIZ EQU RCWCCW-RCWTASK LENGTH OF RCWTASK HEADER (IN BYTES) 04439000
EJECT 04440000
PSA , @V306638 04441000
COPY DEVTYPES @V306638 04442000
COPY EQU @V306638 04443000
COPY IOER @V306638 04444000
COPY RBLOKS @V306638 04445000
COPY VBLOKS @V306638 04446000
COPY VMBLOK @V306638 04447000
END 04448000