Table of Contents

DMKCCW Source

References

Source Listing

DMKCCW.ASSEMBLE.txt
  1. CCW TITLE 'DMKCCW (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKCCW 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * TO TAKE THE LIST(S) OF VIRTUAL CCWS ASSOCIATED WITH 00010000
  11. * A USER'S 'SIO', AND TRANSLATE IT INTO A REAL CCW LIST. 00011000
  12. * 00012000
  13. * ATTRIBUTES - 00013000
  14. * 00014000
  15. * REENTRANT, RESIDENT, CALLED VIA SVC 00015000
  16. * 00016000
  17. * ENTRY POINT - 00017000
  18. * 00018000
  19. * DMKCCWTR - TRANSLATE USER'S CCW-LIST 00019000
  20. * 00020000
  21. * ENTRY CONDITIONS - 00021000
  22. * 00022000
  23. * GPR 2 = USER'S CAW (WITH HIGH-ORDER BYTE INCLUDED) 00023000
  24. * GPR 8 = RELATIVE ADDRESS OF VIRTUAL DEVICE BLOCK 00024000
  25. * GPR 9 = USER'S CAW (WITH HIGH-ORDER BYTE REMOVED) 00025000
  26. * GPR 10 = ADDRESS OF IOBLOK (WITH USER'S IOBCAW FILLED IN) 00026000
  27. * GPR 11 = ADDRESS OF USER'S VMBLOK 00027000
  28. * GPR 12 = ADDRESS OF DMKCCWTR 00028000
  29. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00029000
  30. * 00030000
  31. * EXIT CONDITIONS - 00031000
  32. * 00032000
  33. * GPR 1 > 0: NORMAL EXIT. 00033000
  34. * GPR 1 = 0: DO NOT CALL DMKIOS ROUTINE 00034000
  35. * (AS FOR VIRTUAL ENABLE ISSUED FOR A DIALED LINE) 00035000
  36. * IN ANY EVENT, ALL NEEDED DATA HAS BEEN STORED IN THE IOBLOK, 00036000
  37. * INCLUDING THE POINTER TO THE LIST OF REAL CCWS. 00037000
  38. * 00038000
  39. * CALLS TO OTHER ROUTINES - 00039000
  40. * 00040000
  41. * DMKFREE - TO OBTAIN FREE STORAGE FOR LIST(S) OF REAL CCWS 00041000
  42. * DMKFRET - TO RETURN FREE STORAGE 00042000
  43. * DMKUNTRS - TO RELOCATE SENSE BYTE INFORMATION WHEN NECESSARY 00043000
  44. * DMKDIBSM - TO HANDLE CCW STRING PROCESSING FOR @V407510 00044000
  45. * DIALED LINES @V407510 00045000
  46. * DMKISMTR - TO TRANSLATE ISAM READS (IF ANY ARE FOUND) 00046000
  47. * DMKPTRLK - TO LOCK A PAGE IN STORAGE 00047000
  48. * DMKPTRAN - TO BRING IN A PAGE OF STORAGE 00048000
  49. * DMKDSBSD - TO DO REAL BUFFER UNLOAD (2305/3330/40/50/8HRC011DK 00049490
  50. * DMKRSESD - TO DO REAL BUFFER UNLOAD FOR THE 3800 PRINTER 00050000
  51. * DMKSCNRU - TO OBTAIN ADDRESS OF RDEVBLOK 00051000
  52. * DMKSCNVD - TO GET VIRTUAL DEVICE ADDRESS IN CCU FORM 00052000
  53. * DMKUNTFR - TO UNDO THE TRANSLATION PERFORMED IF NEEDED 00053000
  54. * DMKVMASH - RETURN A CHANGED SHARED PAGE TO FREE STORAGE 00054000
  55. * DMKPTRFR - GET A FREE PAGE FROM THE PAGING MANAGER 00055000
  56. * DMKPTRUL - TO UNLOCK A LOCKED PAGE 00056000
  57. * DMKTRKVA - TO VERIFY ASSIGNED ADDRESS OF AN ALTERNATE TRACK 00057000
  58. * 00058000
  59. * EXTERNAL REFERENCES - 00059000
  60. * 00060000
  61. * DMKSYSRM - REAL MACHINE STORAGE SIZE 00061000
  62. EJECT 00062000
  63. * TABLES / WORK AREAS - 00063000
  64. * 00064000
  65. * LIST OF REAL CCWS 00065000
  66. * 00066000
  67. * REGISTER USAGE - 00067000
  68. * 00068000
  69. * GPR 0 = NO. DBL WORDS FREE STORAGE / WORK REGISTER 00069000
  70. * GPR 1 = ADDRESS OF FREE STORAGE / WORK REGISTER 00070000
  71. * GPR 2 = REAL ADDRESS OF USER CCW / WORK REGISTER 00071000
  72. * GPR 3 = USER CCW COMMAND-CODE & ADDRESS (1ST HALF OF CCW) 00072000
  73. * GPR 4 = BYTE-COUNT (LESS 1) IN USER CCW 00073000
  74. * GPR 5 = SECOND BASE REGISTER FOR DMKCCW 00074000
  75. * GPR 6 = ADDRESS OF RCWCCW (REAL CCWS BEING CREATED) 00075000
  76. * GPR 7 = ADDRESS OF CONTROL WORDS 00076000
  77. * GPR 8 = ADDRESS OF VIRTUAL DEVICE BLOCK / WORK REGISTER 00077000
  78. * GPR 9 = ADDRESS OF VIRTUAL CCWS 00078000
  79. * GPR 10 = ADDRESS OF IOBLOK / LINKING REGISTER / WORK REGISTER 00079000
  80. * GPR 11 = ADDRESS OF USER'S VMBLOK 00080000
  81. * GPR 12 = BASE REGISTER 00081000
  82. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00082000
  83. * GPR 14 = WORK / LINKING REGISTER 00083000
  84. * GPR 15 = WORK REGISTER 00084000
  85. * 00085000
  86. * NOTES - 00086000
  87. * 00087000
  88. * A "STATUS MODIFIER" TYPE OF CCW AS MENTIONED HEREIN IS ONE 00088000
  89. * WHERE THE CCW STRING IS EXPECTED TO CONTINUE TWO CCWS LATER, 00089000
  90. * IRRESPECTIVE OF THE CCW WHICH IMMEDIATELY FOLLOWS (FOR 00090000
  91. * EXAMPLE A "SEARCH ID EQUAL" FOR A DASD DEVICE). 00091000
  92. * 00092000
  93. * OPERATION - 00093000
  94. * 00094000
  95. * DMKCCWTR USES THREE PHASES TO TRANSLATE THE USER'S CCW LIST(S) 00095000
  96. * TO REAL CCW LIST(S) USABLE BY CP, AS FOLLOWS: 00096000
  97. * (1) INITIALIZATION PHASE 00097000
  98. * (2) TRANSLATION PHASE 00098000
  99. * (3) TIC-SCAN PHASE 00099000
  100. * 00100000
  101. * THE OPERATION OF THESE THREE PHASES IS AS FOLLOWS: 00101000
  102. * 00102000
  103. * 1. THE INITIALIZATION PHASE CHECKS FOR GROSS ERRORS IN 00103000
  104. * THE CCW CHAIN (E.G. CAW NOT DOUBLE-WORD ALIGNED OR WITHIN 00104000
  105. * USER CORE); IF THIS IS OK, THEN FREE STORAGE IS OBTAINED FOR 00105000
  106. * A HEADER CONTAINING APPROPRIATE POINTERS AND COUNTS, AND FOR 00106000
  107. * THE REAL CCWS AND CONTROL INFORMATION (IF ANY) TO BE CREATED. 00107000
  108. * ALSO, A TABLE FOR USE BY THE TRANSLATION PHASE IS SET UP, 00108000
  109. * DEPENDING UPON THE DEVICE CLASS, TO FACILITATE QUICK 00109000
  110. * DECIPHERING AND HANDLING OF THE VARIOUS CCW COMMANDS 00110000
  111. * FOR A PARTICULAR DEVICE CLASS AND/OR TYPE. 00111000
  112. EJECT 00112000
  113. * 2. THE TRANSLATION PHASE, ENTERED NEXT, PROCESSES EACH CCW 00113000
  114. * ACCORDING TO ITS TYPE. TICS THAT CANNOT BE IMMEDIATELY 00114000
  115. * TRANSLATED ARE FLAGGED FOR LATER PROCESSING BY TICSCAN. 00115000
  116. * A READ OR WRITE COMMAND THAT SPECIFIES DATA CROSSING 4096-BYTE 00116000
  117. * PAGE BOUNDARIES IS REVISED TO INCLUDE AN IDA FLAG, POINTING 00117000
  118. * TO AN INDIRECT DATA ADDRESS LIST (IDAL), A PAIR OF WORDS 00118000
  119. * FOR EACH 4096-BYTE PAGE, IN WHICH EACH WORD HANDLES A 00119000
  120. * DATA-TRANSFER OF 2048 BYTES (OR LESS); THE REAL CCW IS FLAGGED 00120000
  121. * WITH THE IDA BIT ON, AND A "TRANS" CALL IS MADE 00121000
  122. * TO BRING IN AND LOCK EACH HALF PAGE NEEDED. 00122000
  123. * 00123000
  124. * VIRTUAL CCWS HAVING AN IDA FLAG SET, IN SIMILAR FASHION, ARE 00124000
  125. * CONVERTED TO USE TRANSLATED ADDRESSES FOR EACH IDAW (INDIRECT 00125000
  126. * DATA ADDRESS WORD) IN THE VIRTUAL IDAL, WITH ONE TRANS CALL 00126000
  127. * FOR EACH IDAW - A REAL IDAW IN THE REAL CCW LIST CORRESPONDING 00127000
  128. * TO EACH VIRTUAL IDAW. 00128000
  129. * 00129000
  130. * IF THE FREE STORAGE ALLOTTED IN THE INITIALIZATION PHASE IS 00130000
  131. * INSUFFICIENT FOR THE TRANSLATION, THEN THE CURRENT CCW CHAIN 00131000
  132. * (HEADER, CCWS, AND CONTROL WORDS) IS MOVED TO A LARGER FREE 00132000
  133. * STORAGE AREA, CCWS WHICH HAVE BEEN ALREADY PROCESSED ARE 00133000
  134. * RELOCATED TO THE NEW CONTROL AREA IF NECESSARY, THE OLD 00134000
  135. * AREA RETURNED TO FREE STORAGE, AND TRANSLATING THEN CONTINUES 00135000
  136. * USING THE NEW (LARGER) AREA. 00136000
  137. * 00137000
  138. * FURTHER DETAILS ON THE TRANSFORMATIONS PERFORMED BY DMKCCWTR 00138000
  139. * FOR CCW COMMANDS FOR VARIOUS DEVICE CLASSES ARE GIVEN IN 00139000
  140. * INDIVIDUAL SECTIONS, AS FOLLOWS: 00140000
  141. * "DASD" - NON-DEDICATED DASD DEVICES (I.E. MINI-DISKS) 00141000
  142. * "DEDD" - DEDICATED DASD DEVICES 00142000
  143. * "TAPE" - TAPE DEVICES 00143000
  144. * "TERM" - TERMINAL CLASSES 00144000
  145. * "DIAL" - "DIALED LINE" CLASSES 00145000
  146. * "CONS" - DEDICATED CPU CONSOLES 00146000
  147. * "MSC " - 3851 MSC PORT 00147000
  148. * "OTHR" - ALL OTHER DEVICE CLASSES 00148000
  149. * 00149000
  150. * 3. THE TIC-SCAN PHASE IS ENTERED WHEN THE TRANSLATE PHASE CAN 00150000
  151. * GO NO FURTHER - THAT IS, WHEN THE LIST BEING PROCESSED ENDS 00151000
  152. * WITH A NON-CHAINED COMMAND OR A TRANSLATABLE TIC. THE TIC- 00152000
  153. * SCAN PHASE SCANS FOR FLAGGED TICS, AND THEN TRANSFERS TO THE 00153000
  154. * TRANSLATION PHASE WITH THE NEW VIRTUAL CCW LIST ADDRESS. THIS 00154000
  155. * PROCESS IS REPEATED AS NECESSARY UNTIL THE USER'S CCW LIST HAS 00155000
  156. * BEEN FULLY TRANSLATED (INTO AS MANY REAL CCW LISTS AS NEEDED). 00156000
  157. * 00157000
  158. * THE TIC-SCAN PHASE IS ENTERED ONLY IF ABSOLUTELY NECESSARY; 00158000
  159. * THE TRANSLATION PHASE MAKES EVERY EFFORT TO TRANSLATE TICS 00159000
  160. * IF AT ALL POSSIBLE; ONLY IF THIS CANNOT BE DONE IS THE 00160000
  161. * TIC-SCAN PHASE ENTERED. 00161000
  162. * 00162000
  163. * FOR DASD DEVICES, IF THE VIRTUAL RESERVE RELEASE 00163000
  164. * FEATURE BIT IS ON IN THE VDEVBLOK, PERFORM THE 00164000
  165. * FOLLOWING LOGIC, OTHERWISE SKIP THIS SECTION. 00165000
  166. * IF THE DEVICE IS NOT RESERVED BY ANYONE, OR IF IT IS 00166000
  167. * RESERVED BY THIS USER CONTINUE. IF THE DEVICE IS 00167000
  168. * RESERVED BY ANOTHER USER THEN CALL DMKUNTFR TO UNDO THE 00168000
  169. * TRANSLATION WHICH HAS BEEN PERFORMED AND EXIT TO THE 00169000
  170. * CALLER, UNLESS SENSE BYTES HAVE BEEN TRANSFERRED TO THE 00170000
  171. * USERS STORAGE, IN WHICH CASE WE MUST "ENQUEUE" ON THE 00171000
  172. * MINIDISK AND WAIT UNTIL IT IS NO LONGER RESERVED 00172000
  173. * AT WHICH TIME THE I/O CAN PROCEED. 00173000
  174. * IF THE I/O IS TO CONTINUE, AND THIS CCW CHAIN CONTAINS 00174000
  175. * A RESERVE COMMAND, THEN FLAG THE VDEVBLOK AND THE RESERVE/ 00175000
  176. * RELEASE EXTENSION BLOCK AS RESERVED. IF THIS CCW CHAIN 00176000
  177. * CONTAINS A RELEASE CCW, THEN FLAG THE IOBLOK AS CONTAINING 00177000
  178. * A RELEASE CCW, SO THAT DMKUNTFR WILL "RELEASE" THE 00178000
  179. * VIRTUAL DISK. 00179000
  180. * 00180000
  181. * IF ISAM LOGIC IS SUPPORTED, AND IF ANY ISAM READS ARE FOUND, 00181000
  182. * ONE CONTROL WORD AT THE END OF EACH CCW-CHAIN IS USED TO 00182000
  183. * REMEMBER WHERE THE ISAM READS ARE, AND AT THE END OF DMKCCW, 00183000
  184. * JUST PRIOR TO EXIT, DMKISMTR IS CALLED TO PERFORM THE 00184000
  185. * NECESSARY ISAM TRANSLATIONS OF THE CCW STRING(S). 00185000
  186. *. 00186000
  187. EJECT 00187000
  188. * MACRO TO MAKE ROOM FOR A RELOCATED SEEK ARGUMENT 00188000
  189. * (OR EQUIVALENT) OF 8 BYTES (OR LESS) 00189000
  190. SPACE 00190000
  191. MACRO 00191000
  192. &LABEL XROOM &N 00192000
  193. &LABEL LA R14,&N.(,R6) - POINT BEYOND END OF CURRENT COMMAND 00193000
  194. BAL R15,CCWCHKRM - TEST FOR SUFFICIENT STORAGE 00194000
  195. MEND 00195000
  196. SPACE 2 00196000
  197. MACRO 00197000
  198. &LABEL CCTBL &NAME,&X,&Y 00198000
  199. GBLB &TRACE(25) 00199000
  200. * 00200000
  201. &LABEL DC AL2(CCWINVLD-CCWSTART) - 0 CCW CMD INVALID @VA12408 00201000
  202. DC AL2(&NAME.X1-CCWSTART) @VA12408 00202000
  203. DC AL2(&NAME.X2-CCWSTART) @VA12408 00203000
  204. DC AL2(&NAME.X3-CCWSTART) @VA12408 00204000
  205. DC AL2(&NAME.X4-CCWSTART) @VA12408 00205000
  206. DC AL2(&NAME.X5-CCWSTART) @VA12408 00206000
  207. DC AL2(&NAME.X6-CCWSTART) @VA12408 00207000
  208. DC AL2(&NAME.X7-CCWSTART) @VA12408 00208000
  209. DC AL2(CCWTIC-CCWSTART) - COMMON CODE FOR 'TIC' @VA12408 00209000
  210. DC AL2(&NAME.X9-CCWSTART) @VA12408 00210000
  211. DC AL2(&NAME.XA-CCWSTART) @VA12408 00211000
  212. DC AL2(&NAME.XB-CCWSTART) @VA12408 00212000
  213. DC AL2(&NAME.XC-CCWSTART) @VA12408 00213000
  214. DC AL2(&NAME.XD-CCWSTART) @VA12408 00214000
  215. DC AL2(&NAME.XE-CCWSTART) @VA12408 00215000
  216. DC AL2(&NAME.XF-CCWSTART) @VA12408 00216000
  217. SPACE 1 00217000
  218. DC H'&X' 32 = INITIAL NUM. OF DW'S TO GET 00218000
  219. DC H'&Y' 34 = INCREMENTAL NUM. OF DW'S 00219000
  220. * TO ADD 00220000
  221. SPACE 00221000
  222. MEND 00222000
  223. EJECT 00223000
  224. * THE FOLLOWING TWO MACROS GENERATE CALLS TO 'TRANBRNG' AND 'TRANLOCK' 00224000
  225. * AND INCLUDE INSTRUCTIONS TO INVOKE THE CP ASSIST FUNCTIONS. 00225000
  226. SPACE 00226000
  227. MACRO 00227000
  228. &LABEL TRANBRNG &ENTRYPT,&RETURN= 00228000
  229. LCLC &EXIT 00229000
  230. AIF ('&LABEL' EQ '').NOLBL 00230000
  231. &LABEL EQU * 00231000
  232. .NOLBL AIF ('&RETURN' EQ '').DFLBL 00232000
  233. &EXIT SETC '&RETURN' 00233000
  234. AGO .INSTR 00234000
  235. .DFLBL ANOP 00235000
  236. &EXIT SETC 'BRNG'.'&SYSNDX' 00236000
  237. .INSTR ENTRY &ENTRYPT 00237000
  238. DS 0H EXECUTE CP ASSIST "TRANBRNG" 00238000
  239. &ENTRYPT DC X'E608',S(ACORETBL,&EXIT) *** 00239000
  240. BAL R14,TRANBRNG 00240000
  241. AIF ('&RETURN' EQ '').EXLBL 00241000
  242. MEXIT 00242000
  243. .EXLBL ANOP 00243000
  244. &EXIT EQU * 00244000
  245. MEND 00245000
  246. SPACE 00246000
  247. MACRO 00247000
  248. &LABEL TRANLOCK &ENTRYPT,&RETURN= 00248000
  249. LCLC &EXIT 00249000
  250. AIF ('&LABEL' EQ '').NOLBL 00250000
  251. &LABEL EQU * 00251000
  252. .NOLBL AIF ('&RETURN' EQ '').DFLBL 00252000
  253. &EXIT SETC '&RETURN' 00253000
  254. AGO .INSTR 00254000
  255. .DFLBL ANOP 00255000
  256. &EXIT SETC 'LOCK'.'&SYSNDX' 00256000
  257. .INSTR ENTRY &ENTRYPT 00257000
  258. DS 0H EXECUTE CP ASSIST "TRANLOCK" 00258000
  259. &ENTRYPT DC X'E609',S(ACORETBL,&EXIT) *** 00259000
  260. BAL R14,TRANLOCK 00260000
  261. AIF ('&RETURN' EQ '').EXLBL 00261000
  262. MEXIT 00262000
  263. .EXLBL ANOP 00263000
  264. &EXIT EQU * 00264000
  265. MEND 00265000
  266. EJECT 00266000
  267. COPY OPTIONS 00267000
  268. COPY LOCAL 00268000
  269. DMKCCW CSECT MODULE NAME 00269000
  270. ENTRY DMKCCWTR MAIN ENTRY POINT 00270000
  271. ENTRY DMKCCW0,DMKCCW1,DMKCCWGN @V3M4026 00271000
  272. SPACE 00272000
  273. AIF (NOT &ISAM).CCW1 00273000
  274. EXTRN DMKISMTR TO DO ISAM TRANSLATION 00274000
  275. .CCW1 ANOP 00275000
  276. EXTRN DMKUNTRS TO RELOCATE SENSE BYTE INFO. WHEN NEEDED 00276000
  277. EXTRN DMKDIBSM SIMULATE I/O TO NOT-YET-DIALED 2702 @V407510 00277000
  278. EXTRN DMKSYSRM 00278000
  279. EXTRN DMKPTRFR,DMKPTRUL @V60BC11 00279000
  280. EXTRN DMKDSBSD BUFFER UNLOAD 2305/3330/40/50/80 HRC011DK 00280490
  281. EXTRN DMKRSESD UNIT RECORD (3800) BUFFER LOAD @V60B9BA 00281000
  282. EXTRN DMKSCNRU TO OBTAIN RDEVBLOK ADDRESS @VA03833 00282000
  283. EXTRN DMKSCNVD @V407438 00283000
  284. EXTRN DMKUNTFR @V407438 00284000
  285. EXTRN DMKVMASH @VA07351 00285000
  286. EXTRN DMKTRKVA TO VERIFY ALTERNATE TRACK SEEKS @V56BDA8 00286000
  287. EXTRN DMKSTKCP STACK CPEXBLOK @VA08631 00286100
  288. SPACE 00287000
  289. USING PSA,R0 00288000
  290. USING RCWCCW,R6 00289000
  291. USING VDEVBLOK,R8 00290000
  292. USING IOBLOK,R10 00291000
  293. USING VMBLOK,R11 00292000
  294. USING DMKCCW,R12 @VA12408 00293000
  295. USING CCWSTART+4096,R5 @VA12408 00293500
  296. USING SAVEAREA,R13 00294000
  297. SPACE 00295000
  298. DMKCCWTR ENTER ENTER "CCWTRANS": 00296000
  299. LCTL C1,C1,VMSEG USE CORRECT SEGMENT TABLE @V304635 00297000
  300. L R5,=A(CCWSTART+4096) SECOND BASE REG @VA12408 00298000
  301. SLR R0,R0 CLEAR ALL FLAGS AT 'SAVEWRK1' 00300000
  302. ST R0,SAVEWRK1 AND 00301000
  303. MVC SAVEWRK2(ENDWORK-SAVEWRK2),ZEROES CLEAR ENTIRE WORKAREA 00302000
  304. MVI MEMO1,CCWFIRST SIGNAL: FIRST CCW-STRING. 00303000
  305. AL R8,VMDVSTRT LET R8 = A(VDEVBLOK) 00304000
  306. LA R14,ADDEVTBL SET R14 TO SAVE POINTER DEVTABLE @VA04000 00305000
  307. CLI VDEVTYPC,CLASDASD IS THIS A DASD DEVICE ? 00306000
  308. BE DASDINIT YES - INITIALIZE ACCORDINGLY 00307000
  309. LA R1,TAPETBL IF NOT, ASSUME IT'S TAPE @VA04000 00308000
  310. CLI VDEVTYPC,CLASTAPE IS IT ? 00309000
  311. BER R14 '<BE> ADDEVTBL' - YES @VA04000 00310000
  312. CLI VDEVTYPC,CLASTERM "TERMINAL" CLASS ? 00311000
  313. BE TERMINIT YES 00312000
  314. LA R1,MSCTBL 3851 MSC TABLE @V407466 00313000
  315. LA R15,CLASSPEC*256+TYP3851 3851 MSC @V407466 00314000
  316. CH R15,VDEVTYPC IS IT 3851 MSC? @V407466 00315000
  317. BER R14 YES, GO PROCESS @V407466 00316000
  318. LA R1,OTHRTBL 'OTHER' IF NONE ABOVE @VA04000 00317000
  319. LA R15,CLASSPEC*256+TYPUNSUP ONE LAST CHECK @VM08862 00318000
  320. CH R15,VDEVTYPC IS THIS A DUMMY DEVICE ? @VM08862 00319000
  321. BNER R14 NO -- "OTHER" IT IS @VM08862 00320000
  322. L R15,VDEVREAL ADDRESS OF RDEVBLOK @VM08862 00321000
  323. USING RDEVBLOK,R15 @VM08862 00322000
  324. CLI RDEVFTR,X'00' ANY SUB-CLASS FOR ME ? @VM08862 00323000
  325. BER R14 NO -- LET IT GO @VM08862 00324000
  326. TM RDEVFTR,CLASURI+CLASURO+CLASGRAF SPECIAL ? @VM08862 00325000
  327. BNZR R14 NO --- @VM08862 00326000
  328. LA R1,DEDDTBL DEDICATED DUMMY DASD @VA04000 00327000
  329. CLI RDEVFTR,CLASDASD IS THAT RIGHT ? @V2A2029 00328000
  330. BER R14 YES -- @VM08862 00329000
  331. LA R1,TERMTBL DEDICATED DUMMY TERMINAL @VA04000 00330000
  332. CLI RDEVFTR,CLASTERM IS THAT RIGHT ? (1030,ETC) @VM08862 00331000
  333. BER R14 YES -- @VM08862 00332000
  334. LA R1,TAPETBL ONLY ONE LEFT IS TAPE ? @VA04000 00333000
  335. BR R14 GO PROCESS CCW STRINGS @VM08862 00334000
  336. DROP R15 @VM08862 00335000
  337. SPACE 00336000
  338. TERMINIT DS 0H INITIALIZE FOR ALL TERMINAL DEVICES: 00337000
  339. LA R1,SDLCTBL POINT TO SDLC TABLE @V67CDF1 00337200
  340. USING VDEVBLOK,R8 @V67CDF1 00337400
  341. CLI VDEVTYPE,TYPSDLC IS IT AN SDLC @V67CDF1 00337600
  342. BER R14 YES DO IT @V67CDF1 00337800
  343. LA R1,CONSTBL POINT TO CPU TABLE @VA04000 00338000
  344. CLI VDEVTYPE,TYP3210 IS IT DEDICATED CONSOLE ?? 00339000
  345. BCR 8,R14 YES, GO DO IT 00340000
  346. LA R1,TERMTBL SET FOR TERMINAL TABLE @VA04000 00341000
  347. TM VDEVSTAT,VDEVDED YES, IS LINE DEDICATED ? 00342000
  348. BZ SETDIAL IF NOT THEN IT'S A DIALED LINE. 00343000
  349. TM VDEVFLAG,VDEVDIAL IF YES, IS THE DIALED FLAGBIT ON 00344000
  350. BZR R14 '<BZ> ADDEVTBL' IF NOT @VA04000 00345000
  351. SETDIAL LA R1,DIALTBL DIALED LINE @VA04000 00346000
  352. BR R14 AND 'B CCWGTFRE' - TO GET FREE STORAGE. 00347000
  353. SPACE 00348000
  354. DASDINIT DS 0H INITIALIZE FOR ALL DASD DEVICES: 00349000
  355. AIF (NOT &ISAM).CCW2 00350000
  356. TM VMPSTAT,VMISAM DOES USER WANT ISAM CHECKING ? 00351000
  357. BZ CCWINDSD IF NOT, FORGET IT. 00352000
  358. OI MEMO1,CHEKISAM BUT IF YES, SIGNAL: CHECK FOR ISAM READS 00353000
  359. .CCW2 ANOP 00354000
  360. CCWINDSD EQU * @V60B6B8 00355000
  361. NI MEMO2,FULL-PRECCW ENSURE FLAG TURNED OFF @V60B6B8 00356000
  362. L R3,VDEVREAL ADDR OF RDEVBLOK @V60B6B8 00357000
  363. USING RDEVBLOK,R3 TELL ASSEMBLER @V60B6B8 00358000
  364. CLI RDEVTYPE,TYP3330 IS IT A 3330 @V60B6B8 00359000
  365. BNE SETTABL NO, NO CHANCE FOR 3330V @V60B6B8 00360000
  366. TM RDEVFTR,VIRTUAL+SYSVIRT IS RDEV A 3330V @V60B6B8 00361000
  367. BNZ TESTVDEV YES, CHECK OUT THE VDEV TYPE @V60B6B8 00362000
  368. SETTABL EQU * POINT TO CORRECT TRANS TABLE @V60B6B8 00363000
  369. TM VDEVSTAT,VDEVDED IS THE DEVICE DEDICATED @V60B6B8 00364000
  370. BO CCWINDED YES @V60B6B8 00365000
  371. LA R1,DASDTBL TRANS TABLE FOR MINI-DISKS @V60B6B8 00366000
  372. B NOPREFXA AND CONTINUE @V60B6B8 00367000
  373. TESTVDEV EQU * SEE IF MSS PREFIX NEEDED @V60B6B8 00368000
  374. TM VDEVSTAT,VDEVDED IS DEVICE DEDICATED @V60B6B8 00369000
  375. BO SETDEDT YES, SET TABLE PTR @V60B6B8 00370000
  376. OI MEMO2,PRECCW INDICATE MSS PREFIX NEEDED @V60B6B8 00371000
  377. LA R1,DASDTBL TRANSLATION TABLE @V60B6B8 00372000
  378. B NOPREFXA AND CONTINUE @V60B6B8 00373000
  379. SETDEDT EQU * @V60B6B8 00374000
  380. MVC VDEVPOSN(VDEVPOSL),ZEROES INIT SEEK ARG @V60B6B8 00375000
  381. LA R1,DEDDTBL TABLE OF ROUTINES TO TRANS CCWS @V60B6B8 00376000
  382. TM VDEVFLG2,VDEVVIRT VIRTUAL 3330V ? @VA09758 00377010
  383. BO NOPREFXA YES, NO MSS PREFIX @V60B6B8 00378000
  384. OI MEMO2,PRECCW INDICATE PREFIX NEEDED @V60B6B8 00379000
  385. NOPREFXA EQU * @V60B6B8 00380000
  386. DROP R3 @V60B6B8 00381000
  387. OI MEMO1,NEEDSEEK SIGNAL: SEEK NEEDED IF NOT USER-SUPPLIED 00382000
  388. LH R15,VDEVPOSN PICK UP 'VIRTUAL' CYLINDER NUMBER 00383000
  389. AH R15,VDEVRELN ADD RELOCATION FACTOR 00384000
  390. STH R15,IOBCYL STORE TENTATIVE "IOBCYL" IN IOBLOK. 00385000
  391. L R3,VDEVREAL PICK UP 'REAL DEVICE' ADDRESS @V304498 00386000
  392. TM RDEVFTR-RDEVBLOK(R3),FTREXTSN EXTENDED SENSE @V304498 00387000
  393. * BYTE FORMAT ? 00388000
  394. BZ CCW01 NO, TEST FOR PSEUDO 2311 DEVICE @V304498 00389000
  395. MVI CCWCTL,RCWHMR YES, FLAG RELOCATE CYL NO. IN SENSE BYTES 00390000
  396. CCW01 TM VDEVFLAG,VDEV231T+VDEV231B IS THIS A "FAKE" 2311 ? 00391000
  397. BCR 8,R14 "BZ CCWGTFRE" IF NOT - FORGET IT. 00392000
  398. MVI CCWCTL,RCW2311 IF YES, SET CCWCTL FOR RCWCTL USE AND 00393000
  399. BR R14 GO GET FREE STORAGE AND GET WITH IT. 00394000
  400. DROP R10 (THRU WITH IOBLOK FOR NOW) 00395000
  401. DROP R8 DON'T COUNT ON R8 ANY MORE NOW EITHER. 00396000
  402. SPACE 00397000
  403. CCWINDED LA R1,DEDDTBL DEDICATED DASD DEVICE @VA04000 00398000
  404. SPACE 1 00399000
  405. ADDEVTBL ST R1,DEVTABLE SAVE ADDRESS OF DEVICE TABLE @VA04000 00400000
  406. B CCWGTFRE GET A RCWTASK @VA04000 00401000
  407. SPACE 2 00402000
  408. CCWNEWV LH R15,VIRCOMND REMEMBER "PREVIOUS" CCW COMMAND & FLAGS 00403000
  409. STH R15,PRVCOMND ... 00404000
  410. CCWNEWVA EQU * @VA12408 00405000
  411. NI MEMO1,X'FF'-CCWFIRST SIGNAL-NOT FIRST CCW STRING@VA12408 00405500
  412. LA R9,0(,R9) STRIP HIGH-ORDER BYTE FROM R9 00406000
  413. EJECT 00407000
  414. CCWGTFRE L R1,DEVTABLE RESTORE ADDRESS OF DEVICE TABLE @VA04000 00408000
  415. LH R0,32(,R1) GET APPROPRIATE NUM. DW'S @VA04000 00409000
  416. CALL DMKFREE OF FREE STORAGE 00410000
  417. SLR R3,R3 CLEAR R3 (NOTE: R2 IS IMMATERIAL) 00411000
  418. LR R14,R1 SET R14 = ADDRESS OF THE AREA 00412000
  419. LR R15,R0 COUNT INTO R15 00413000
  420. SLL R15,3 IN BYTES, PLEASE 00414000
  421. LA R7,0(R14,R15) REMEMBER END OF AREA, FOR CONTROL WORDS 00415000
  422. MVCL R14,R2 CLEAR THE CCW-STRING. 00416000
  423. USING RCWTASK,R1 REFERENCE THE RCWTASK (BRIEFLY) 00417000
  424. ST R9,RCWVCAW STORE VIRTUAL ADDRESS OF CCW CHAIN 00418000
  425. STH R0,RCWCCNT STORE TOTAL NO. OF DBL-WORDS 00419000
  426. L R15,FFS INITIALIZE RCWHEAD 00420000
  427. STH R15,RCWHEAD TO 'FFFF' 00421000
  428. DROP R1 00422000
  429. LA R6,RCWHSIZ(,R1) POINT TO WHERE CCWS WILL BEGIN 00423000
  430. AIF (NOT &ISAM).CCW02 00424000
  431. TM MEMO1,CHEKISAM SHOULD WE CHECK FOR ISAM READS ? 00425000
  432. BZ CCW02 TRF IF NOT - R7 OK AS IS. 00426000
  433. SL R7,F4 YES, LEAVE ONE WORD IN CONTROL AREA FOR ISAM 00427000
  434. .CCW02 ANOP 00428000
  435. CCW02 EQU * CHECK FOR I/O TO A VUA @V60B6B8 00429000
  436. * 00430000
  437. * IF THE RDEVICE IS AN MSS VUA, PUT THE THREE 00431000
  438. * CCW PREFIX ON THE REAL CHANNEL PROGRAM 00432000
  439. * 00433000
  440. USING VDEVBLOK,R8 @V60B6B8 00434000
  441. TM MEMO2,PRECCW POSSIBILITY OF PREFIX @V60B6B8 00435000
  442. BZ CCW03 NO, REAL DEVICE NOT 3330V @V60B6B8 00436000
  443. TM VDEVFLG2,VDEVVIRT USER HAVE CYL FLT SUPPORT ? @VA09758 00437010
  444. BO CCW03 YES, NO SPECIAL SUPPORT FOR HIM @V60B6B8 00438000
  445. DROP R8 @V60B6B8 00439000
  446. LR R14,R1 SAVE RCWTASK ADDR OVER TRANS @VA13400 00439100
  447. TRANS 2,9,OPT=(BRING,DEFER) @VA13400 00439200
  448. LR R1,R14 RESTORE RCWTASK ADDR AFTER TRANS @VA13400 00439300
  449. CLI 0(R2),X'04' IS IT A SENSE CCW? @VA13400 00439400
  450. BNE SETPRFX NO - THEN WE DO NEED THE PREFIX @VA13400 00439500
  451. TM 4(R2),CC IS THE SENSE CMD-CHAINED? @VA13400 00439600
  452. BNO CCW03 NO - THEN WE DON'T NEED PREFIX @VA13400 00439700
  453. SETPRFX EQU * PUT SKELETON PREFIX IN RCWTASK @V60B6B8 00440000
  454. MVC 0(FAULTL,R6),FAULTCCW MOVE IN 3 CCW'S @V60B6B8 00441000
  455. LA R2,FAULTL(R6) POINT PAST THE PREFIX @V60B6B8 00442000
  456. STCM R2,7,PREOFF(R6) POINT THE 'TIC' PAST THE PREFIX @V60B6B8 00443000
  457. OI MEMO2,HADRCGEN CP GENERATED CCWS ARE PRESENT @V60B6B8 00444000
  458. LR R6,R2 POINT BASE REG PAST PREFIX @V60B6B8 00445000
  459. CCW03 EQU * CONTINUE STANDARD PROCESSING @V60B6B8 00446000
  460. TM MEMO1,CCWFIRST IS THIS FIRST CCW STRING? @V60B6B8 00447000
  461. BO CCW04 TRF IF YES. 00448000
  462. L R2,THISRCW OLD 'THIS' RCWTASK NOW BECOMES 00449000
  463. ST R2,PREVRCW THE 'PREVIOUS' RCWTASK (& KEEP IN R2) 00450000
  464. USING RCWTASK,R2 ... 00451000
  465. ST R1,RCWPNT STORE OUR ADDR IN HEADER OF PREVIOUS TASK 00452000
  466. DROP R2 00453000
  467. MVI MEMO2,00 CLEAR MEMO2 (LOCAL) FLAG BYTE, 00454000
  468. MVC LOCWORK(ENDWORK-LOCWORK),ZEROES CLEAR LOCAL WORK AREA 00455000
  469. ST R1,THISRCW NOW STORE POINTER TO CURRENT RCWTASK 00456000
  470. OUT EQU * @VA12408 00457000
  471. L R12,=A(CCWSTART) START OF PART TWO ADDRESSBLTY @VA12408 00457300
  472. B CCWNXT1-CCWSTART(R12) ENTER MAIN LOOP PROCESSING@VA12408 00457600
  473. * 00458000
  474. CCW04 ST R1,FIRSTRCW STORE POINTER TO VERY FIRST CCW TASK 00459000
  475. ST R1,THISRCW AND POINTER TO CURRENT RCWTASK 00460000
  476. TM SAVER9+3,07 WAS ORIGINAL CAW DBL-WORD ALIGNED ? 00461000
  477. BZ OUT IF YES, ENTER MAIN PROCESSNG LOOP@VA12408 00462000
  478. L R12,=A(CCWSTART) NOT, FORCE A CHANNEL PRGM CHK @VA12408 00462600
  479. B CCWBAD-CCWSTART(R12) GO THERE @VA12408 00463200
  480. DS 0D @V60B6B8 00464000
  481. FAULTCCW EQU * DEFINE THE MSS CCW PREFIX @V60B6B8 00465000
  482. * 00466000
  483. * FOLLOWING IS THE CCW PREFIX STRING FOR 3330V DEVICES 00467000
  484. * 00468000
  485. * THIS PREFIX WILL TRAP THE STATUS MODIFIER 00469000
  486. * GENERATED BY THE MSS SA ON A CYLINDER FAULT 00470000
  487. * 00471000
  488. DC X'07',AL3(0),AL1(CC),AL1(RCWGEN+RCWREL),AL2(6) @V60B6B8 00472000
  489. DC X'08',AL3(0),AL1(CC+SILI),AL1(RCWGEN+RCWREL),AL2(0) 00473000
  490. DC X'03',AL3(0),AL1(SILI),AL1(RCWGEN),AL2(1) @V60B6B8 00474000
  491. FAULTL EQU *-FAULTCCW LENGTH OF PREFIX CHAN PROG @V60B6B8 00475000
  492. PREOFF EQU 9 @V60B6B8 00476000
  493. SEEKOFF EQU 17 @V60B6B8 00477000
  494. VDEVPOSL EQU 4 @V60B6B8 00478000
  495. PREFLAG EQU 20 @VA10883 00478100
  496. PRECTL EQU 21 @VA10883 00478200
  497. EJECT 00479000
  498. * 00479010
  499. * GET A LARGER AREA FROM FREE STORAGE, MOVE HEADER, CCWS, AND 00479020
  500. * CONTROL DATA FROM THE OLD (SMALLER) AREA TO THE NEW (BIGGER) AREA, 00479030
  501. * RELOCATING CCW ADDRESSES IF NECESSARY. THEN RETURN THE OLD 00479040
  502. * BLOCK TO FREE STORAGE, REVISE ALL NEEDED POINTERS, ETC., AND 00479050
  503. * CONTINUE TRANSLATING USING THE NEW (LARGER) BLOCK: 00479060
  504. * 00479070
  505. ROOM L R8,THISRCW POINT TO BEGINNING OF THIS RCWTSK@VA12408 00479080
  506. USING RCWTASK,R8 REFERENCE SAME 00479090
  507. LH R0,RCWCCNT GET OLD TOTAL DBL-WORD COUNT 00479100
  508. L R10,DEVTABLE LOAD ADDRESS OF DEVICE TABLE @VA04000 00479110
  509. AH R0,34(,R10) ADD EXTRA WORD COUNT FROM TABLE @VA04000 00479120
  510. CALL DMKFREE GET A NEW (LARGER) FREE STORAGE AREA 00479130
  511. LR R2,R8 GET BEGINNING OF OLD AREA, 00479140
  512. LR R3,R6 HOW FAR WE GOT, 00479150
  513. SLR R3,R2 NOW WE HAVE THE COUNT IN R3 00479160
  514. LH R15,34(,R10) GET EXTRA WORD COUNT AGAIN @VA04000 00479170
  515. SLL R15,3 IN BYTES, PLEASE, 00479180
  516. LR R14,R7 GET DISPLACEMENT OF OLD CONTROL WORDS 00479190
  517. SLR R14,R8 FROM BEGINNING OF BLOCK; THIS PLUS R15 00479200
  518. ALR R15,R14 = COUNT OF NEW BLOCK UP TO CONTROL WORDS 00479210
  519. LR R14,R1 ADDRESS OF NEW AREA IN R14 00479220
  520. LA R10,0(R14,R15) BEGINNING OF NEW CONTROL WORDS INTO R10 00479230
  521. MVCL R14,R2 OLD CCWS TO NEW AREA & CLEAR EXTRA WORDS 00479240
  522. STH R0,RCWCCNT-RCWTASK(,R1) NOW STORE NEW DBL-WORD COUNT 00479250
  523. LH R3,RCWCCNT GET OLD COUNT AGAIN, 00479260
  524. SLL R3,3 INTO BYTES, 00479270
  525. ALR R3,R8 COMPUTE END OF OLD CONTROL WORD AREA 00479280
  526. SR R3,R7 NOW WE HAVE COUNT OF OLD CONTROL WORDS 00479290
  527. BNP CCWNR02 (IF THERE ARE NONE, DON'T MOVE THEM) 00479300
  528. LR R2,R7 BEGINNING OF CONTROL WORD AREA TO R2 00479310
  529. LR R15,R3 COUNT (NONZERO) INTO R15, 00479320
  530. LR R14,R10 SET R14 FOR MOVING CONTROL WORDS: 00479330
  531. MVCL R14,R2 NOW MOVE OLD CONTROL WORDS TO NEW AREA 00479340
  532. * 00479350
  533. DROP R8 00479360
  534. CCWNR02 L R2,PREVRCW REFERENCE THE "PREVIOUS" CCW STRING 00479370
  535. LTR R2,R2 (IF ANY) 00479380
  536. BP CCWNR03 PATCH POINTERS IF DOES EXIST. 00479390
  537. ST R1,FIRSTRCW IF NONEXISTENT, REVISE "FIRSTRCW" 00479400
  538. B CCWNR04 AND CONTINUE. 00479410
  539. USING RCWTASK,R2 00479420
  540. CCWNR03 ST R1,RCWPNT REVISE POINTER OF "PREVIOUS" CCW STRING 00479430
  541. DROP R2 00479440
  542. * 00479450
  543. CCWNR04 ST R1,THISRCW STORE NEW "BEGINNING OF CCWS" 00479460
  544. LR R3,R1 GET RELOCATION FACTOR IN R3 = 00479470
  545. SR R3,R8 ADDR. OF NEW CCWS - ADDR. OF OLD ONES 00479480
  546. LR R4,R10 DITTO FOR THE CONTROL WORDS 00479490
  547. SR R4,R7 ... 00479500
  548. SLR R6,R8 MAKE R6 A DISPLACEMENT, 00479510
  549. LA R14,8 R14=8 FOR BXLE USE, 00479520
  550. LA R15,0(R1,R6) POINT TO END OF AREA 00479530
  551. SLR R15,R14 LESS 8 FOR BXLE LOOP 00479540
  552. ALR R6,R1 NEW R6 FOR USE LATER 00479550
  553. LA R1,RCWHSIZ(,R1) SET R1 TO BEGINNING OF CCWS 00479560
  554. EJECT 00479570
  555. * 00479580
  556. * TIGHT LOOP TO RELOCATE CCW ADDRESSES: 00479590
  557. * 00479600
  558. * REGISTERS ARE USED AS FOLLOWS: 00479610
  559. * R1 = ADDRESS OF CCWS BEING CHECKED (INCREMENTED BY 8 ON BXLE) 00479620
  560. * R2 USED FOR WORK REGISTER, FOR RELOCATING A CCW-ADDRESS 00479630
  561. * R3 = (ADDRESS OF NEW CCWS) - (ADDRESS OF OLD CCWS) 00479640
  562. * R4 = (ADDR. OF NEW CONTROL AREA) - (ADDR. OF OLD CONTROL AREA) 00479650
  563. * R7 = ADDRESS OF OLD CONTROL WORD AREA 00479660
  564. * R14 = 8 (FOR BXLE) 00479670
  565. * R15 = ADDRESS OF LAST DBL-WORD OF CCWS. 00479680
  566. * 00479690
  567. CNOP 0,4 FULL-WORD ALIGN LOOP FOR GOOD PERFORMANCE: 00479700
  568. CCWRELLP TM 5(R1),RCWREL SHOULD ADDRESS BE RELOCATED ? 00479710
  569. BO CCWRELAD TRF IF YES. 00479720
  570. BXLE R1,R14,CCWRELLP ITERATE RELOCATING LOOP. 00479730
  571. B CCWRELFN RELOCATING IS FINISHED. 00479740
  572. * 00479750
  573. CCWRELAD L R2,0(,R1) PICK UP CCW COMMAND & ADDRESS, 00479760
  574. LA R2,0(,R2) STRIP OFF OP-CODE, 00479770
  575. CLR R2,R7 WAS COMMAND IN CONTROL AREA ? 00479780
  576. BL CCWREL2 TRF IF NOT. 00479790
  577. AR R2,R4 RELOCATE TO NEW CONTROL AREA, 00479800
  578. STCM R2,7,1(R1) STORE RELOCATED ADDRESS. 00479810
  579. BXLE R1,R14,CCWRELLP ITERATE RELOCATING LOOP. 00479820
  580. B CCWRELFN RELOCATING IS FINISHED. 00479830
  581. * 00479840
  582. CCWREL2 AR R2,R3 RELOCATE TO NEW CCW AREA, 00479850
  583. STCM R2,7,1(R1) STORE RELOCATED ADDRESS. 00479860
  584. BXLE R1,R14,CCWRELLP ITERATE RELOCATING LOOP. 00479870
  585. * 00479880
  586. CCWRELFN DS 0H RELOCATION OF CCW-ADDRESSES IS FINISHED: 00479890
  587. USING RCWTASK,R8 00479900
  588. LH R0,RCWCCNT GET SIZE OF OLD AREA, 00479910
  589. DROP R8 00479920
  590. LR R1,R8 AND ADDRESS OF SAME, 00479930
  591. CALL DMKFRET NOW 'FRET' THE OLD BLOCK, 00479940
  592. LR R7,R10 NEW R7 (AREA FOR CONTROL WORDS) 00479950
  593. B OUT NOW GO PICK UP WHERE WE LEFT OFF. 00479960
  594. SPACE 3 00479970
  595. LTORG 00479980
  596. EJECT 00479990
  597. * MAIN LOOP TO PROCESS USER CCWS: 00480000
  598. * R6 = ADDRESS OF WHERE TO PUT NEXT CCW BEING CREATED (RCWCCW) 00481000
  599. * R7 = CURRENT ADDRESS OF CONTROL-WORD AREA 00482000
  600. * R9 = VIRTUAL ADDRESS OF USER CCWS 00483000
  601. SPACE 00484000
  602. *. 00485000
  603. *********************************************************************** 00486000
  604. * 00487000
  605. * 00488000
  606. * CP ASSIST INSTRUCTION "DECCW0" - DECODE THE NEXT VIRTUAL CCW 00489000
  607. * 00490000
  608. * 00491000
  609. * OPERANDS: 00492000
  610. * 1 = ADDRESS OF 'CCWDATA' (DATA LIST) 00493000
  611. * 2 = ADDRESS OF 'CCWEXITS' (EXIT LIST) 00494000
  612. * 00495000
  613. * REGISTER INPUT: (BYTE 0 OF GPR 6, 7, AND 9 MUST BE ZERO) 00496000
  614. * GPR 6 = ADDRESS OF PREVIOUS REAL CCW 00497000
  615. * GPR 7 = ADDRESS PAST THE END OF RCWTASK'S 'RCWCCW' SPACE 00498000
  616. * GPR 9 = VIRTUAL ADDRESS OF PREVIOUS VIRTUAL CCW 00499000
  617. * GPR 11 = ADDRESS OF THE VMBLOK 00500000
  618. * GPR 13 = ADDRESS OF THE SAVEAREA 00501000
  619. * 00502000
  620. * SYSTEM DATA AREAS REFERENCED (BY MODULE WHERE APPLICABLE): 00503000
  621. * DMKCCW - DEVICE TABLE 00504000
  622. * DMKSYS - 'CORTABLE' 00505000
  623. * SAVEAREA, VMBLOK 00506000
  624. * 00507000
  625. * 00508000
  626. * EXITS TO SPECIFIED OPERAND 2 LIST ADDRESSES: 00509000
  627. * 00510000
  628. * +0 'CCWBAD' (ERROR TRYING TO DECODE VIRTUAL CCW) 00511000
  629. * REGISTER OUTPUT: 00512000
  630. * GPR 1 = GPR 9 ENTRY VALUE + 8 00513000
  631. * GPR 6 = ENTRY VALUE + 8 00514000
  632. * GPR 8 = UNPREDICTABLE 00515000
  633. * GPR 9 = ENTRY VALUE + 8 00516000
  634. * 00517000
  635. * +4 'CCWNROOM' (RCWTASK TOO SMALL - MUST GET A LARGER ONE) 00518000
  636. * REGISTER OUTPUT: 00519000
  637. * GPR 6,9 = SAME AS ABOVE (EXIT TO +0 'CCWBAD') 00520000
  638. * 00521000
  639. * +8 'CCWTIC1' (A TIC FOLLOWS A VIRTUAL CCW WITH CHAIN DATA SET) 00522000
  640. * REGISTER OUTPUT: 00523000
  641. * GPR 1 = VIRTUAL DATA ADDRESS FROM CCW (BYTE 0 = ZERO) 00524000
  642. * GPR 2 = ADDRESS OF 'CCWGENRL' FOR 'BCR R2' USE 00525000
  643. * GPR 3 = VIRTUAL CCW COMMAND CODE AND DATA ADDRESS 00526000
  644. * GPR 4 = VIRTUAL CCW FLAG BYTES AND COUNT 00527000
  645. * GPR 6,9 = SAME AS THAT FOR EXIT TO +0 'CCWBAD' 00528000
  646. * GPR 8 = ADDRESS OF THE VDEVBLOK 00529000
  647. * 00530000
  648. * +12 'ADDRINVL' (VIRTUAL CCW'S DATA ADDRESS IS NOT VALID) 00531000
  649. * REGISTER OUTPUT: 00532000
  650. * GPR 1,2,4,6,8,9 = SAME AS ABOVE (EXIT TO +8 'CCWTIC1') 00533000
  651. * GPR 3 = SAME AS ABOVE EXIT EXCEPT BYTE 0 MAY BE ALTERED 00534000
  652. * GPR 14,15 = UNPREDICTABLE 00535000
  653. * 00536000
  654. * +16 'CCWTIC' (VIRTUAL CCW HAS A BYTE COUNT OF ZERO) 00537000
  655. * REGISTER OUTPUT: 00538000
  656. * GPR 1,2,3,6,8,9 = SAME AS ABOVE (EXIT TO +12 'ADDRINVL') 00539000
  657. * GPR 4 = VIRTUAL CCW BYTE COUNT MINUS ONE 00540000
  658. * GPR 14,15 = UNPREDICTABLE 00541000
  659. * 00542000
  660. * +20 'NGCCW' (PAGE WITH VIRTUAL CCW IS NOT RESIDENT OR SHARED) 00543000
  661. * REGISTER OUTPUT: 00544000
  662. * GPR 1,6,8,9 = SAME AS THAT FOR EXIT TO +0 'CCWBAD' 00545000
  663. * GPR 2 = UNPREDICTABLE 00546000
  664. * 00547000
  665. * EXIT TO A CCW COMMAND TRANSLATION ROUTINE: (NORMAL COMPLETION) 00548000
  666. * REGISTER OUTPUT: SAME AS EXIT TO +16 'CCWTIC' 00549000
  667. * 00550000
  668. * NOTE: THE EXIT ADDRESS = GPR 12 + HALFWORD OFFSET OBTAINED 00551000
  669. * BY USING TWICE THE VALUE OF BITS 4-7 OF THE VIRTUAL CCW 00552000
  670. * AS AN INDEX INTO THE TABLE POINTED TO BY 'DEVTABLE'. 00553000
  671. * 00554000
  672. *********************************************************************** 00555000
  673. *. 00556000
  674. SPACE 00557000
  675. CCWSTART DS 0H START OF SECOND PART @VA12408 00558000
  676. USING *,R12 ADDRESSABILITY FOR SECOND PART @VA12408 00559000
  677. CCWNEXT DS 0H EXECUTE CP ASSIST "DECCW0" @VA12408 00560000
  678. DMKCCW0 DC X'E604',S(CCWDATA,CCWEXITS) ***@V3M4026 00561000
  679. SPACE 00562000
  680. LA R9,8(,R9) POINT TO NEXT USER CCW %V3M4038 00563000
  681. LH R15,VIRCOMND SAVE "PREVIOUS" CCW CMD & FLAGS %V3M4038 00564000
  682. STH R15,PRVCOMND ... %V3M4038 00565000
  683. LA R6,8(,R6) POINT TO NEXT POSITION IN CHAIN %V3M4038 00566000
  684. LA R14,8(,R6) LET R14 LOOK 8 BYTES FARTHER %V3M4038 00567000
  685. CLR R14,R7 LEAVE ROOM FOR AT LEAST ONE CMD %V3M4038 00568000
  686. BH CCWNROOM IF NO ROOM, EXPAND CCW-STRING %V3M4038 00569000
  687. EJECT 00570000
  688. *. 00571000
  689. *********************************************************************** 00572000
  690. * 00573000
  691. * 00574000
  692. * CP ASSIST INSTRUCTION "DECCW1" - DECODE THE FIRST VIRTUAL CCW 00575000
  693. * 00576000
  694. * 00577000
  695. * OPERANDS AND SYSTEM DATA AREAS REFERENCED: SAME AS "DECCW0" 00578000
  696. * 00579000
  697. * REGISTER INPUT: (BYTE 0 OF GPR 6 AND 9 MUST BE ZER0) 00580000
  698. * GPR 6 = ADDRESS OF PREVIOUS REAL CCW 00581000
  699. * GPR 9 = VIRTUAL ADDRESS OF PREVIOUS VIRTUAL CCW 00582000
  700. * GPR 11 = ADDRESS OF THE VMBLOK 00583000
  701. * GPR 13 = ADDRESS OF THE SAVEAREA 00584000
  702. * 00585000
  703. * 00586000
  704. * EXITS TO SPECIFIED OPERAND 2 LIST ADDRESSES: 00587000
  705. * 00588000
  706. * +0 'CCWBAD' (ERROR TRYING TO DECODE VIRTUAL CCW) 00589000
  707. * REGISTER OUTPUT: 00590000
  708. * GPR 1 = SAME AS GPR 9 00591000
  709. * GPR 8 = UNPREDICTABLE 00592000
  710. * 00593000
  711. * +8 'CCWTIC1' (A TIC FOLLOWS A VIRTUAL CCW WITH CHAIN DATA SET) 00594000
  712. * REGISTER OUTPUT: 00595000
  713. * GPR 1 = VIRTUAL DATA ADDRESS FROM CCW (BYTE 0 = ZERO) 00596000
  714. * GPR 2 = ADDRESS OF 'CCWGENRL' FOR 'BCR R2' USE 00597000
  715. * GPR 3 = VIRTUAL CCW COMMAND CODE AND DATA ADDRESS 00598000
  716. * GPR 4 = VIRTUAL CCW FLAG BYTES AND COUNT 00599000
  717. * GPR 8 = ADDRESS OF THE VDEVBLOK 00600000
  718. * 00601000
  719. * +12 'ADDRINVL' (VIRTUAL CCW'S DATA ADDRESS IS NOT VALID) 00602000
  720. * REGISTER OUTPUT: 00603000
  721. * GPR 1,2,4,8 = SAME AS ABOVE (EXIT TO +8 'CCWTIC1') 00604000
  722. * GPR 3 = SAME AS ABOVE EXIT EXCEPT BYTE 0 MAY BE ALTERED 00605000
  723. * GPR 14,15 = UNPREDICTABLE 00606000
  724. * 00607000
  725. * +16 'CCWTIC' (VIRTUAL CCW HAS A BYTE COUNT OF ZERO) 00608000
  726. * REGISTER OUTPUT: 00609000
  727. * GPR 1,2,3,8 = SAME AS ABOVE (EXIT TO +12 'ADDRINVL') 00610000
  728. * GPR 4 = VIRTUAL CCW BYTE COUNT MINUS ONE 00611000
  729. * GPR 14,15 = UNPREDICTABLE 00612000
  730. * 00613000
  731. * +20 'NGCCW' (PAGE WITH VIRTUAL CCW IS NOT RESIDENT OR SHARED) 00614000
  732. * REGISTER OUTPUT: 00615000
  733. * GPR 1 = SAME AS GPR 9 00616000
  734. * GPR 2,8 = UNPREDICTABLE 00617000
  735. * 00618000
  736. * EXIT TO A CCW COMMAND TRANSLATION ROUTINE: (NORMAL COMPLETION) 00619000
  737. * REGISTER OUTPUT: SAME AS EXIT TO +16 'CCWTIC' 00620000
  738. * 00621000
  739. * NOTE: EXIT = GPR 12 + HALFWORD OFFSET (SEE "DECCW0" ABOVE) 00622000
  740. * 00623000
  741. *********************************************************************** 00624000
  742. *. 00625000
  743. EJECT 00626000
  744. CCWNXT1 EQU * %V3M4038 00627000
  745. SPACE 00628000
  746. DS 0H EXECUTE CP ASSIST "DECCW1" %V3M4038 00629000
  747. DMKCCW1 DC X'E60C',S(CCWDATA,CCWEXITS) ***%V3M4038 00630000
  748. SPACE 00631000
  749. LR R1,R9 NOW GET THE USER'S NEXT CCW: %V3M4038 00632000
  750. NGCCW TRANBRNG DMKCCWB1,RETURN=BRING1 %V3M4038 00633000
  751. BNZ CCWBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 00634000
  752. BRING1 L R8,SAVER8 NOW RESTORE R8 = A(VDEVBLOK) %V3M4038 00635000
  753. AL R8,VMDVSTRT ... %V3M4038 00636000
  754. USING VDEVBLOK,R8 ... %V3M4038 00637000
  755. LM R3,R4,0(R2) GET CCW COMMAND FROM USER'S PAGE %V3M4038 00638000
  756. STM R3,R4,RCWCCW STORE IN REAL CCW CHAIN %V3M4038 00639000
  757. MVI RCWCTL,00 CLEAR CP'S CONTROL BYTE %V3M4038 00640000
  758. LA R1,0(,R3) ADDRESS BITS ONLY INTO R1 %V3M4038 00641000
  759. LA R2,CCWGENRL SET R2 FOR "BCR" USE %V3M4038 00642000
  760. TM PRVFLAG,CD "PREVIOUS" CCW HAVE CHAIN DATA ? %V3M4038 00643000
  761. BZ NOTCD NO, DON'T WORRY ABOUT TIC %V4M0198 00644000
  762. * IF PREVIOUS CCW WAS DATA-CHAINED, LOOK FOR TIC AS THIS COMMAND: 00645000
  763. IC R14,RCWCOMND GET REAL OP-CODE %V4M0156 00646000
  764. N R14,F15 ISOLATE LOW-ORDER 4 BITS %V4M0156 00647000
  765. CL R14,F8 IS IT A 'TIC' = '08' ? %V4M0156 00648000
  766. BNE CHOOSEOP IF NOT, USE OP CODE OF 00 %V4M0156 00649000
  767. MVI RCWCOMND,CDTIC IF YES, SIGNAL TIC AFTER CD %V4M0156 00650000
  768. B CCWTIC1 JOIN NORMAL TIC-PROCESSING LOGIC %V4M0156 00651000
  769. NOTCD DS 0H %V4M0198 00652000
  770. STCM R3,8,VIRCOMND IF NOT, REMEMBER OPCODE. %V3M4038 00653000
  771. CCWNXT2 STCM R4,8,VIRFLAG REMEMBER CCW+4 = FLAG BITS %V3M4038 00654000
  772. NI VIRFLAG,CC+CD VIRFLAG=CC/CD BITS OF REAL FLAG %V3M4038 00655000
  773. LRA R14,0(,R1) IS ADDR. IN CCW WITHIN USER CORE %V3M4038 00656000
  774. BC 8+2,CCWNXT3 IF SEGMENT VALID CONTINUE %V408246 00657000
  775. ADDRINVL DS 0H @V4M0156 00658000
  776. CALL DMKPTRAN,PARM=DEFER LET PTR HANDLE SEGMENT @V408246 00659000
  777. * INVALID 00660000
  778. BC 2,ADDRCHEK @V408246 00661000
  779. CCWNXT3 DS 0H %V408246 00662000
  780. LA R2,CCWGENRL RESET R2 FOR BCR USE %V408246 00663000
  781. IC R14,VIRCOMND OK. GET OP CODE IN R14 (RIGHT END%V408246 00664000
  782. N R14,F15 ISOLATE LOW-ORDER 4 BITS %V3M4038 00665000
  783. ALR R14,R14 DOUBLE IT (0, 2, ... , 30) %V3M4038 00666000
  784. L R15,DEVTABLE ADDRESS OF DEVICE TABLE %V3M4038 00667000
  785. LH R15,0(R14,R15) GET DISP. OF OP-CODE PROCESSING %V3M4038 00668000
  786. N R4,XRIGHT16 ISOLATE BYTE-COUNT IN R4; SET CC %V3M4038 00669000
  787. BCTR R4,0 BYTE-COUNT -1 INTO R4; CC INTACT %V3M4038 00670000
  788. BNZ 0(R12,R15) IF IT WAS >0, GO TO INDEXED CODE %V3M4038 00671000
  789. * 00672000
  790. * NOTE: UPON ARRIVAL AT INDEXED CODE, ENTRY CONDITIONS ARE AS FOLLOWS: 00673000
  791. * R1 HOLDS UNTRANSLATED VIRTUAL ADDRESS (HIGH BYTE STRIPPED OFF) 00674000
  792. * R2 = A(CCWGENRL) FOR "BCR" USE 00675000
  793. * R3 HOLD CCW COMMAND-CODE & UNTRANSLATED VIRTUAL ADDRESS 00676000
  794. * R4 HOLDS BYTE COUNT LESS 1 (0 OR POSITIVE) 00677000
  795. * R8 = A(VDEVBLOK) 00678000
  796. * 8-BYTE VIRTUAL CCW IS IN "RCWCCW" (R6) 00679000
  797. * TRUE CCW COMMAND CODE IS IN "RCWCOMND" 00680000
  798. * CCW COMMAND CODE TO BE ANALYZED IS IN "VIRCOMND" 00681000
  799. * OTHER REGISTERS (R6-R8 ETC. HAVE USUAL VALUE) 00682000
  800. * 00683000
  801. * IF DROPPED THRU THE ABOVE "BNZ", THE BYTE-COUNT WAS ZERO; 00684000
  802. * IN THIS CASE, THE COMMAND SHOULD BE A "TIC" (ERROR OTHERWISE): 00685000
  803. CL R14,F16 IF A TIC, R14 = 16 (08 X 2) %V3M4038 00686000
  804. BNE CCWBAD CMD INVALID DUE TO ZERO COUNT %V3M4038 00687000
  805. EJECT 00688000
  806. * PROCESS "TIC" COMMANDS AS MUCH AS POSSIBLE WHEN THEY ARE ENCOUNTERED: 00689000
  807. DROP R8 A(VDEVBLOK) NOT NEEDED BY TIC HANDLING 00690000
  808. CCWTIC MVI RCWCOMND,X'08' MAKE REAL COMMAND CODE = USUAL VALUE 00691000
  809. MVI VIRFLAG,00 CLEAR VIRTUAL FLAG 00692000
  810. CCWTIC1 SLR R0,R0 SET UP 2ND WORD OF TIC (UNUSED HALF) 00693000
  811. ICM R0,8,PRVCOMND WITH THE "PREVIOUS COMMAND" OP-CODE FIRST 00694000
  812. ST R0,RCWFLAG (NEEDED IN CASE OF CHAIN-DATA TO TIC) 00695000
  813. L R10,THISRCW ACCESS THIS RCWTASK, 00696000
  814. USING RCWTASK,R10 ... 00697000
  815. LRA R14,0(,R1) IS ADDR. WITHIN USER'S CORE @V304635 00698000
  816. BC 8+2,CCWTIC1B IF SEGMENT VALID CONTINUE @V408246 00699000
  817. CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 00700000
  818. BC 2,CCWBAD @V408246 00701000
  819. CCWTIC1B DS 0H @V408246 00702000
  820. TM RCWADDR+3,07 IS THE ADDR. DBL-WORD ALIGNED ? @V1D0632 00703000
  821. BNZ CCWCHKPV NO - PURPOSELY LEAVE "AS IS" @V1D0632 00704000
  822. * (FOR EXAMPLE "TIC 002" FOR TCAM), AND 00705000
  823. * CHECK WHETHER TO CONTINUE THIS STRING 00706000
  824. CL R1,RCWVCAW CHECK ADDRESS AGAINST THE FIRST VIRT. CCW 00707000
  825. BL CCWTIC8 IF LESS, IT'S DEFINITELY OUTSIDE OUR RANGE 00708000
  826. CLR R1,R9 IF NOT, SEE IF IT'S BELOW WHERE WE ARE NOW 00709000
  827. BNL CCWTIC6 TRF IF NOT, IT'S HIGHER INSTEAD @VA06269 00710000
  828. TM MEMO2,HADRCGEN HAVE WE HAD ANY CP-GENERATED CCWS ? 00711000
  829. BZ CCWTIC2 IF NOT, RELOCATING THE ADDRESS IS TRIVIAL 00712000
  830. LR R15,R9 COMPUTE HOW MANY BYTES BACK IT WAS 00713000
  831. SR R15,R1 ... 00714000
  832. CL R15,F8 EXACTLY 8 (TIC *-8) ? 00715000
  833. BNE CCWTIC1A IF NOT WE MUST USE THE SUBROUTINE 00716000
  834. TM PRVFLAG,SMCOM PREVIOUS COMMAND STATUS MODIFIER TYPE ? 00717000
  835. BO CCWTIC2 IF YES TO BOTH OF ABOVE RELOCATE DIRECTLY 00718000
  836. CCWTIC1A BAL R14,TICSUBI RESOLVE ADDRESS IN TIC @VA04000 00719000
  837. LR R1,R3 PUT REAL ADDR IN R1 @VA04842 00720000
  838. B CCWTIC4 AND GO SET RELOCATABLE FLAG-BIT. 00721000
  839. CCWTIC2 SR R1,R9 MAKE R1 "RELATIVE" (A NEGATIVE NUMBER) 00722000
  840. TM MEMO2,HADAPOLL HAVE WE HAD AN AUTOPOLL CCW ? 00723000
  841. BO CCWTIC12 YES -SPECIAL CHECK IS NEEDED @VA04000 00724000
  842. CCWTIC3 AR R1,R6 ADD REAL ADDRESS OF WHERE WE ARE NOW 00725000
  843. CCWTIC4 CLI RCWCOMND,CDTIC DATA CHAIN THRU A TIC? @VA04842 00726000
  844. BNE CCWTIC4B NO...GO STORE TIC-TO ADDR @VA04842 00727000
  845. CLC 0(1,R1),PRVCOMND IF CD ON, DO OP-CODES MATCH? @VA04842 00728000
  846. BE CCWTIC4B OK IF YES. @VA04842 00729000
  847. CLI 0(R1),X'00' IF NOT, TIC-TO OP-CODE = X'00'? @VA04842 00730000
  848. BNE CCWTIC8A NO...MUST MAKE ANOTHER PASS @VA04842 00731000
  849. LA R14,RCWHSIZ(,R10) POINT TO 1ST CCW IN TASK @VA04842 00732000
  850. LR R15,R1 REFERENCE TIC-TO ADDRESS @VA04842 00733000
  851. CCWTIC4A S R15,F8 BACK OFF 8 ON TIC-TO ADDRESS @VA04842 00734000
  852. CR R15,R14 DON'T RUN OFF FRONT OF TASK @VA04842 00735000
  853. BL CCWTIC8A IF WE DO, MAKE ANOTHER PASS @VA04842 00736000
  854. CLI 0(R15),X'00' IS OP-CODE STILL = X'00'? @VA04842 00737000
  855. BE CCWTIC4A YES...KEEP BACKING UP @VA04842 00738000
  856. CLC 0(1,R15),PRVCOMND NO...DO OP-CODES MATCH? @VA04842 00739000
  857. BNE CCWTIC8A NO...MUST MAKE ANOTHER PASS @VA04842 00740000
  858. CCWTIC4B EQU * CHAIN-DATA OFF, OR OP-CODES @VA04842 00741000
  859. * MATCH: 00742000
  860. STCM R1,7,RCWADDR+1 STORE INTERNALLY-RELOCATED ADDRESS 00743000
  861. CCWTIC4C OI RCWCTL,RCWREL INDICATE ADDRESS IS RELOCATED @VA05538 00744000
  862. B CCWCHKPV GO CHECK PREV CCW FOR STAT MOD OR TIC *+16 00745000
  863. * 00746000
  864. * HERE IF ADDRESS IN TIC > WHERE WE ARE NOW (R6): 00747000
  865. CCWTIC6 TM PRVFLAG,SMCOM WAS PREVIOUS COMMAND STATUS-MODIFIER TYPE? 00748000
  866. BZ CCWTIC8 IF NOT, DON'T TRY TO RELOCATE IT. 00749000
  867. SLR R1,R9 IF IT WAS, GET RELATIVE DISPLACEMENT 00750000
  868. CL R1,F16 IS IT MORE THAN 16 ? 00751000
  869. BH CCWTIC7 IF YES, DON'T TRY TO RELOCATE IT NOW. 00752000
  870. LA R14,16(R6,R1) IF 16 OR LESS, LOOK BEYOND FUTURE COMMAND 00753000
  871. CLR R14,R7 DOES THAT RUN INTO OUR CONTROL AREA ? 00754000
  872. BH CCWTIC7 IF YES, HANDLE IT AS UNPROCESSED. 00755000
  873. CL R1,F8 IS IT JUST 8 BYTES AHEAD ? 00756000
  874. BNH CCWTIC6A YES...WE'RE OK...CONTINUE @VA04842 00757000
  875. OI VIRFLAG,FWDTIC IF = 16 (> 8), REMEMBER FORWARD TIC 00758000
  876. CCWTIC6A AR R1,R6 ADD REAL ADDR OF WHERE WE ARE NOW@VA04842 00759000
  877. B CCWTIC4B AND GO STORE IT IN THE CCW @VA04842 00760000
  878. * 00761000
  879. CCWTIC7 ALR R1,R9 RESTORE R1 WHERE WE SUBTRACTED R9 BEFORE 00762000
  880. * 00763000
  881. CCWTIC8 BAL R14,TICSUBX RESOLVE TIC ADDRESS @VA04000 00764000
  882. BZ CCWTIC8A CC ZERO - COULDN'T RESOLVE IT. @V1D0632 00765000
  883. STCM R3,7,RCWADDR+1 OK, STORE REAL ADDRESS (IN R3) @V1D0632 00766000
  884. * IN THE TIC 00767000
  885. B CCWCHKPV AND CHECK WHETHER TO CONTINUE @V1D0632 00768000
  886. * THIS STRING 00769000
  887. SPACE 00770000
  888. * IF ALL OF THE ABOVE IS TO NO AVAIL, FLAG AS AN UNPROCESSED TIC: 00771000
  889. CCWTIC8A OI MEMO1,HADUTIC SIGNAL: AT LEAST ONE @V1D0632 00772000
  890. * UNPROCESSED TIC 00773000
  891. LH R15,CNTUNTIC BUMP COUNT OF HOW MANY WE'VE HAD 00774000
  892. AL R15,F1 ... 00775000
  893. STH R15,CNTUNTIC ... 00776000
  894. LR R14,R6 GET DISPLACEMENT OF THIS TIC FROM 00777000
  895. SR R14,R10 BEGINNING OF THIS RCWTASK 00778000
  896. TM MEMO2,HADUTIC HAVE WE ALREADY HAD ONE ON THIS RCWTASK ? 00779000
  897. BO CCWTIC9 IF YES, ADD TO END OF EXISTING CHAIN. 00780000
  898. STH R14,RCWHEAD IF NOT, STORE DISPLACEMENT OF 1ST ONE 00781000
  899. OI MEMO2,HADUTIC SIGNAL WE'VE HAD ONE NOW, 00782000
  900. B CCWTIC10 AND CONTINUE BELOW. 00783000
  901. * 00784000
  902. CCWTIC9 LH R15,UNTICLST GET DISPLACEMENT OF LAST UNPROCESSED TIC 00785000
  903. STH R14,6(R10,R15) STORE OUR DISPLACEMENT IN HIS COUNT FIELD 00786000
  904. * 00787000
  905. CCWTIC10 STH R14,UNTICLST STORE NEW DISPLACEMENT OF UNPROCESSED TIC 00788000
  906. TM PRVFLAG,SMCOM+FWDTIC PREV CMD STAT MODIFIER OR FWD TIC ? 00789000
  907. BNZ CCWNEXT IF YES (EITHER), GO GET NEXT COMMAND. 00790000
  908. OI MEMO2,STRTNEW IF NOT, SIGNAL "START NEW CCW CHAIN" 00791000
  909. LA R15,8(,R9) POINT TO END OF LAST VIRTUAL CCW 00792000
  910. L R9,RCWADDR AND LET R9 BE POINTER TO NEXT CCWS 00793000
  911. B CCWNXT15 AND GO TERMINATE THIS RCWTASK. 00794000
  912. SPACE 1 00795000
  913. SPACE 00796000
  914. CHOOSEOP LA R14,PRVCOMND POINT AT PREVIOUS CCW %V3M4038 00797000
  915. L R15,THISRCW POINT AT FIRST CCW... %V3M4038 00798000
  916. LA R15,RCWHSIZ(,R15) ...IN THIS RCWTASK %V3M4038 00799000
  917. CR R6,R15 IS THAT WHERE WE ARE? %V3M4038 00800000
  918. BE CHOOSE2 IF YES...USE PREVIOUS OP-CODE. %V3M4038 00801000
  919. LA R14,ZEROES IF NOT, USE OP-CODE OF X'00' %V3M4038 00802000
  920. CHOOSE2 ICM R3,8,0(R14) PICK UP PREVIOUS OP-CODE OR X'00'%V3M4038 00803000
  921. STCM R3,8,RCWCOMND STORE IT IN REAL OP-CODE %V3M4038 00804000
  922. B CCWNXT2 AND HANDLE AS ALWAYS %V3M4038 00805000
  923. DROP R10 (THRU WITH RCWTASK HERE) 00806000
  924. EJECT 00807000
  925. DASDWRIT DS 0F HANDLE "WRITE" TYPE CCW FOR NON-DED DASD: 00808000
  926. LA R14,CLASSOK RETURN ADDR INTO R14 00809000
  927. CLI VIRCOMND,X'73' IS CCW A DIAG WRITE? 00810000
  928. BE CLASSCHK YES-- 00811000
  929. CLI VIRCOMND,X'53' IS CCW A DIAG LOAD? 00812000
  930. BE CLASSCHK YES-- 00813000
  931. CLASSOK EQU * 00814000
  932. USING VDEVBLOK,R8 (MUST BE IN EFFECT AT THIS POINT) 00815000
  933. TM VDEVFLAG,VDEVRDO IS THE DASD DEVICE "READ ONLY" ? 00816000
  934. BO REJECT1 @VA14597 00817100
  935. DROP R8 00818000
  936. EJECT 00819000
  937. *. 00820000
  938. *********************************************************************** 00821000
  939. * 00822000
  940. * 00823000
  941. * CP ASSIST INSTRUCTION "CCWGENRL" - COMMON CCW PROCESSING 00824000
  942. * 00825000
  943. * 00826000
  944. * OPERANDS: 00827000
  945. * 1 = ADDRESS OF 'GENDATA' (DATA LIST) 00828000
  946. * 2 = ADDRESS OF 'GENEXITS' (EXIT LIST) 00829000
  947. * 00830000
  948. * REGISTER INPUT: 00831000
  949. * GPR 1 = VIRTUAL ADDRESS OF THE DATA AREA 00832000
  950. * GPR 4 = BYTE COUNT MINUS ONE 00833000
  951. * GPR 6 = ADDRESS OF THE REAL CCW 00834000
  952. * GPR 9 = ADDRESS OF THE VIRTUAL CCW 00835000
  953. * GPR 11 = ADDRESS OF THE VMBLOK 00836000
  954. * GPR 13 = ADDRESS OF THE SAVEAREA 00837000
  955. * 00838000
  956. * SYSTEM DATA AREAS REFERENCED: 00839000
  957. * IOBLOK, RCWTASK, SAVEAREA, VDEVBLOK, VMBLOK 00840000
  958. * 00841000
  959. * 00842000
  960. * EXITS TO SPECIFIED OPERAND 2 LIST ADDRESSES: 00843000
  961. * 00844000
  962. * +0 'FWDIDAL' (CCW HAS IDA FLAG SET) 00845000
  963. * REGISTER OUTPUT: NONE CHANGED BY THIS INSTRUCTION 00846000
  964. * 00847000
  965. * +4 'CCWMANYF' (CCW'S DATA AREA CROSSES A PAGE BOUNDARY) 00848000
  966. * REGISTER OUTPUT: NONE CHANGED BY THIS INSTRUCTION 00849000
  967. * 00850000
  968. * +8 'CCWNXT9A' (VIRTUAL DATA ADDRESS CANNOT BE TRANSLATED) 00851000
  969. * REGISTER OUTPUT: NONE CHANGED BY THIS INSTRUCTION 00852000
  970. * 00853000
  971. * +12 'SHRDPAGE' (CCW'S DATA ADDRESS POINTS TO SHARED PAGE) 00854000
  972. * REGISTER OUTPUT: 00855000
  973. * GPR 2 = REAL ADDRESS OF THE DATA AREA 00856000
  974. * 00857000
  975. * +16 'CCWNXT10' (VIRTUAL DEVICE HAS SENSE BYTES PRESENT) 00858000
  976. * REGISTER OUTPUT: 00859000
  977. * GPR 2 = REAL ADDRESS OF THE DATA AREA 00860000
  978. * GPR 8 = ADDRESS OF THE VDEVBLOK 00861000
  979. * 00862000
  980. * +20 'CCWNEXT' (NOT AT END OF CCW'S YET, GO TRANSLATE NEXT) 00863000
  981. * REGISTER OUTPUT: SAME AS THAT OF +16 'CCWNXT10' 00864000
  982. * 00865000
  983. * +24 'CCWNEWV2' (SUPPOSED TO START A NEW RCWTASK) 00866000
  984. * REGISTER OUTPUT: 00867000
  985. * GPR 2 = REAL ADDRESS OF THE DATA AREA 00868000
  986. * GPR 8 = ADDRESS OF THE VDEVBLOK 00869000
  987. * GPR 10 = ADDRESS OF THE CURRENT RCWTASK 00870000
  988. * GPR 14-15 = UNPREDICTABLE 00871000
  989. * 00872000
  990. * +28 'TICSCAN' (A TIC CCW HAS NOT BEEN PROCESSED) 00873000
  991. * REGISTER OUTPUT: SAME AS THAT OF +24 'CCWNEWV2' 00874000
  992. * 00875000
  993. * +32 'CCWDIAL' ('DEVTABLE' EQUALS THE ADDRESS OF 'DIALTBL') 00876000
  994. * REGISTER OUTPUT: 00877000
  995. * GPR 2 = REAL ADDRESS OF THE DATA AREA 00878000
  996. * GPR 8 = ADDRESS OF THE VDEVBLOK 00879000
  997. * GPR 10 = ADDRESS OF THE IOBLOK 00880000
  998. * GPR 14-15 = UNPREDICTABLE 00881000
  999. * 00882000
  1000. * +36 'CALLISM' (AN ISAM READ HAS BEEN FOUND) 00883000
  1001. * REGISTER OUTPUT: SAME AS THAT OF +32 'CCWDIAL' 00884000
  1002. * 00885000
  1003. * +40 'CCWEXIT' (MUST EXIT WITHOUT USING CP ASSIST "RETURN") 00886000
  1004. * REGISTER OUTPUT: 00887000
  1005. * GPR 0-11, 14-15 = UNPREDICTABLE 00888000
  1006. * 00889000
  1007. * +44 'CCWNXT12' (VIRTUAL MACHINE USING SHARED SEGMENTS) 00890000
  1008. * REGISTER OUTPUT: SAME AS THAT OF +16 'CCWNXT10' 00891000
  1009. * 00892000
  1010. * +48 'ITSAREL' (DASD WITH RESERVE/RELEASE) 00893000
  1011. * REGISTER OUTPUT: SAME AS THAT OF +32 'CCWDIAL' 00894000
  1012. * 00895000
  1013. * 00896000
  1014. * EXIT TO CALLER: (FULL COMPLETION EXIT VIA CP ASSIST "RETURN") 00897000
  1015. * REGISTER OUTPUT: 00898000
  1016. * GPR 0-11 = VALUES FROM THE SAVEAREA 00899000
  1017. * GPR 14-15 = UNPREDICTABLE 00900000
  1018. * 00901000
  1019. *********************************************************************** 00902000
  1020. *. 00903000
  1021. SPACE 00904000
  1022. CCWGENRL EQU * HANDLE GENERAL CASE FORWARD- @V3M4038 00905000
  1023. * DIRECTION DATA-TRANSMITTING CCW: 00906000
  1024. SPACE 00907000
  1025. DS 0H EXECUTE CP ASSIST "CCWGENRL" @V3M4038 00908000
  1026. DMKCCWGN DC X'E60F',S(GENDATA,GENEXITS) ***@V3M4038 00909000
  1027. SPACE 00910000
  1028. TM RCWFLAG,IDA IS USER'S IDA FLAG-BIT SET ? %V3M4038 00911000
  1029. BO FWDIDAL IF YES, GO HANDLE. %V3M4038 00912000
  1030. L R0,XPAGNUM SET TO ISOLATE PAGE NUMBER %V3M4038 00913000
  1031. LA R2,0(R1,R4) ADDRESS OF LAST BYTE OF DATA %V3M4038 00914000
  1032. NR R2,R0 ENDING PAGE NUMBER IN R2 %V3M4038 00915000
  1033. NR R0,R1 STARTING PAGE NUMBER IN R0 %V3M4038 00916000
  1034. CLR R0,R2 START AND END IN SAME PAGE ? %V3M4038 00917000
  1035. BNE CCWMANYF HANDLE VIA IDAL LOGIC IF NOT %V3M4038 00918000
  1036. CCWNXT9 TRANS 2,1,LCTL=NO GET THE REAL PAGE ADDRESS %V3M4038 00919000
  1037. BNZ CCWNXT9A MUST BRING PAGE INTO STORAGE %V3M4038 00920000
  1038. CALL DMKPTRLK LOCK THE PAGE FRAME %V3M4038 00921000
  1039. B CCWNXT9B PAGE LOCKED - CONTINUE... %V3M4038 00922000
  1040. CCWNXT9A CALL DMKPTRAN,PARM=BRING+DEFER+LOCK GO GET THE PAGE %V3M4038 00923000
  1041. CCWNXT9B EQU * %V3M4038 00924000
  1042. BNZ CCWBAD4 ERROR IF INVALID VIRTUAL ADDR. %V3M4038 00925000
  1043. STCM R2,7,RCWADDR+1 STORE THE REAL ADDR. IN CCW %V3M4038 00926000
  1044. OI RCWCTL,RCWIO INDICATE DATA PAGE TO BE UNLOCKED%V3M4038 00927000
  1045. BAL R14,CCWCHKSH CHECK IF THIS A SHARED PAGE %V3M4038 00928000
  1046. BZ CCWNXT11 IF NOT - PROCEED NORMALLY %V3M4038 00929000
  1047. SHRDPAGE BAL R14,CKSHRCHG WAS SHARED PAGE CHANGED ? @V386198 00930000
  1048. BZ CCWNXT9C NO, SEE IF COPY NEEDED @VA05378 00931000
  1049. CALL DMKPTRUL UNLOCK THE PAGE @VA05378 00932000
  1050. B CCWNXT9 REISSUE TRANS @VA05378 00933000
  1051. CCWNXT9C TM VIRCOMND,X'01' WRITE TYPE COMMAND ? @VA05378 00934000
  1052. BZ CCWNXT11 IF NOT - THEN DON'T COPY DATA @V304735 00935000
  1053. ST R7,SAVEWRK9 SAVE REG. OVER CALL @V304735 00936000
  1054. LA R15,1 GET INCREMENT OF 1 @V407508 00937000
  1055. AL R15,SHRLKCNT ADD ONE TO CPSHRLK COUNT @V407508 00938000
  1056. ST R15,SHRLKCNT STORE UPDATED COUNT @V407508 00939000
  1057. OI CPSTAT2,CPSHRLK LOCK SYSTEM TILL WE GET PAGE @V304735 00940000
  1058. CALL DMKPTRFR,AFFINITY GET A NEW PAGE @VA10216 00941500
  1059. L R15,SHRLKCNT GET CURRENT CPSHRLK COUNT @V407508 00942000
  1060. BCTR R15,0 DECREMENT COUNT BY 1 @V407508 00943000
  1061. ST R15,SHRLKCNT STORE UPDATED COUNT @V407508 00944000
  1062. LTR R15,R15 TEST IF THE COUNT IS NOW 0 @V407508 00945000
  1063. BNZ *+8 NO, SKIP RESET OF CPSHRLK @V407508 00946000
  1064. NI CPSTAT2,X'FF'-CPSHRLK UNLOCK SYSTEM @V304735 00947000
  1065. MVI CORFLAG-CORTABLE(R7),CORFLUSH @V408246 00948000
  1066. NI RCWCTL,X'FF'-RCWIO FLAG NOT LOCKED @V304735 00949000
  1067. OI RCWCTL,RCWSHR PAGE GOTTTEN FROM DMKPTRFR @V304735 00950000
  1068. LR R14,R7 TRANSFER ADDRESS OF CORTABLE @V304735 00951000
  1069. L R7,SAVEWRK9 RESTORE USED REGISTER @V304735 00952000
  1070. ST R3,TEMPR3 SAVE REG. @V304735 00953000
  1071. SL R14,ACORETBL LEAVE INDEX PORTION OF CORTABLE @V304735 00954000
  1072. SLL R14,8 R14 = NOW REAL PAGE ADDRESS @V304735 00955000
  1073. LH R3,RCWCNT GET USER'S CCW BYTE COUNT @V304735 00956000
  1074. LR R15,R2 GET ORIGINAL REAL ADDRESS @V304735 00957000
  1075. N R15,F4095 LEAVE THE DISPLACEMENT ONLY @V304735 00958000
  1076. OR R14,R15 'OR' DISP. TO REAL TARGET ADDR. @V304735 00959000
  1077. LR R15,R3 SET UP LENGTH OF MOVE @V304735 00960000
  1078. ST R2,TEMPR2 SAVE ORIGINAL PAGE ADDRESS @V304735 00961000
  1079. ST R14,TEMPR14 SAVE ADDRESS OF REPLACEMENT PAGE @V304735 00962000
  1080. MVCL R14,R2 MOVE ORIGINAL TO NEW @V304735 00963000
  1081. L R14,TEMPR14 RESTORE REPLACEMENT PAGE ADDRESS @V304735 00964000
  1082. L R2,TEMPR2 RESTORE ORIGINAL PAGE ADDRESS @V304735 00965000
  1083. L R3,TEMPR3 RESTORE REG. @V304735 00966000
  1084. LR R15,R2 GET ORIGINAL PAGE ADDRESS @V304735 00967000
  1085. N R15,XPAGNUM CLEAR DISPLACEMENT @V304735 00968000
  1086. SRL R15,8 INDEX INTO CORETBL @V304735 00969000
  1087. AL R15,ACORETBL FIND ACTUAL CORETBL ENTRY @V304735 00970000
  1088. L R15,CORSWPNT-CORTABLE(,R15) POINTER TO SWAP @V304735 00971000
  1089. L R15,SWPFLAG-SWPFLAG(,R15) GET KEYS. @V304735 00972000
  1090. N R15,=A(X'F8F8') CLEAR CHANGE/REFERENCE BITS @V304735 00973000
  1091. N R14,XPAGNUM CLEAR DISPLACEMENT @V304735 00974000
  1092. LA R14,2048(,R14) LAST HALF OF NEW PAGE @V304735 00975000
  1093. SSK R15,R14 SET UP THE KEY @V304735 00976000
  1094. SRL R15,8 POSITION FOR FIRST HALF PAGE @V304735 00977000
  1095. N R14,XPAGNUM BACK TO BEGINING ADDRESS @V304735 00978000
  1096. SSK R15,R14 SET THE REAL KEY @V304735 00979000
  1097. LR R10,R14 SAVE REAL PAGE ADDRESS @V304735 00980000
  1098. CALL DMKPTRUL UNLOCK THE ORIGINAL PAGE @V304735 00981000
  1099. N R2,F4095 LEAVE ONLY THE DISPLACEMENT @V304735 00982000
  1100. OR R2,R10 PUT IT IN REPLACEMENT PAGE @V304735 00983000
  1101. STCM R2,7,RCWADDR+1 SAVE THE NEW ADDRESS @V304735 00984000
  1102. L R15,VMACNT1 GET STAT. COUNTER @V304735 00985000
  1103. LA R15,1(,R15) ADD ONE TO IT @V304735 00986000
  1104. ST R15,VMACNT1 SAVE NEW TOTAL @V304735 00987000
  1105. * 00988000
  1106. CCWNXT11 DS 0H CHECK FOR COMPLETION %V3M4038 00989000
  1107. TM RCWCTL,RCWSHR ANY PAGES TAKEN FROM DMKPTRFR %V3M4038 00990000
  1108. BZ CCWNXT10 NO - CONTINUE %V3M4038 00991000
  1109. NI RCWCTL,X'FF'-RCWIO IF YES - THEN CANT BE LOCKED.%V3M4038 00992000
  1110. CCWNXT10 DS 0H %V3M4038 00993000
  1111. BAL R10,CLRSENSE CLEAR ANY SENSE BYTES PRESENT %V3M4038 00994000
  1112. CCWNXT12 EQU * CHECK FOR SHARED SEGMENT SYSTEMS %V3M4038 00995000
  1113. BAL R10,CCSHRSEG PERFORM PROTECTION CHECKING %V3M4038 00996000
  1114. CCWNXT14 EQU * NOW TEST FOR END OF CCW STRING: %V3M4038 00997000
  1115. TM VIRFLAG,CC+CD CMD- OR DATA-CHAINED ? %V3M4038 00998000
  1116. BNZ CCWNEXT IF YES, GO GET NEXT COMMAND. %V3M4038 00999000
  1117. CCWCHKPV TM PRVFLAG,SMCOM+FWDTIC PREV CMD STAT MOD./FWD TIC %V3M4038 01000000
  1118. BNZ CCWNEXT IF YES (EITHER), CONTINUE %V3M4038 01001000
  1119. SPACE 01002000
  1120. CCWNXT13 L R10,THISRCW STRING FINISHED; ACCESS RCWTASK %V3M4038 01003000
  1121. USING RCWTASK,R10 ... %V3M4038 01004000
  1122. LA R15,8(,R9) POINT TO END OF LAST VIRTUAL CCW %V3M4038 01005000
  1123. CCWNXT15 SL R15,RCWVCAW LESS THE BEGINNING, %V3M4038 01006000
  1124. SRL R15,3 DIVIDED BY 8 GIVES US %V3M4038 01007000
  1125. STH R15,RCWVCNT THE COUNT OF VIRTUAL CCWS. %V3M4038 01008000
  1126. LA R14,RCWHSIZ(,R10) POINT TO START OF REAL CCWS %V3M4038 01009000
  1127. LA R15,8(,R6) POINT TO END OF LAST REAL CCW %V3M4038 01010000
  1128. SLR R15,R14 LESS THE BEGINNING %V3M4038 01011000
  1129. SRL R15,3 DIVIDED BY 8 GIVES US %V3M4038 01012000
  1130. STH R15,RCWRCNT THE COUNT OF REAL CCWS %V3M4038 01013000
  1131. CCWNXT16 TM MEMO2,STRTNEW SUPPOSED TO START A NEW ONE NOW? %V3M4038 01014000
  1132. BO CCWNEWV2 IF YES, GO TO IT FORTHWITH. %V3M4038 01015000
  1133. TM MEMO1,HADUTIC ELSE CHECK FOR UNPROCESSED TICS %V3M4038 01016000
  1134. BO TICSCAN HAD ONE - TRANSFER TO TIC SCAN %V3M4038 01017000
  1135. CCWNXT18 L R10,SAVER10 TRANSLATION AND TICSCAN FINISHED %V3M4038 01018000
  1136. USING IOBLOK,R10 REFERENCE IOBLOK AGAIN, %V3M4038 01019000
  1137. L R15,FIRSTRCW FILL IN REAL CAW ADDRESS, %V3M4038 01020000
  1138. LA R15,RCWHSIZ(,R15) ... %V3M4038 01021000
  1139. STCM R15,7,IOBCAW+1 ... %V3M4038 01022000
  1140. L R8,SAVER8 DEVELOP VDEVBLOK ADDRESS %V3M4038 01023000
  1141. AL R8,VMDVSTRT ... %V3M4038 01024000
  1142. CLC DEVTABLE,=A(DIALTBL) PROCESSING A DIALED LINE ? %V3M4038 01025000
  1143. BE CCWDIAL IF DIAL - TAKE THE BRANCH %V3M4038 01026000
  1144. USING VDEVBLOK,R8 REFERENCE VDEVBLOK; %V3M4038 01027000
  1145. CLI VDEVTYPC,CLASGRAF GRAF DEVICE ? %V3M4038 01028000
  1146. BNE CCWNXT19 NO, CONTINUE %V3M4038 01029000
  1147. TM VDEVTYPE,TYP3277+TYP3278 3270 DEVICE @V60A6B6 01030000
  1148. BZ CCWEXIT NO, GO EXIT @V60A6B6 01031000
  1149. TM VDEVSTAT,VDEVDED IS IT DEDICATED ? %V3M4038 01032000
  1150. BZ CCWDIAL NO - I/O TO NON-DIALED 3270 %V3M4038 01033000
  1151. CCWNXT19 EQU * CONTINUE: %V3M4038 01034000
  1152. CLI VDEVTYPC,CLASDASD IS THIS A DASD DEVICE? %V407438 01035000
  1153. BNE CCWEXIT NOPE, DONE. BR. %V407438 01036000
  1154. TM VDEVFLG2,VDEVRRF MDSK WITH RES/REL FEATURE %V407438 01037000
  1155. BZ CCWNXT28 NOPE, GO CHECK ON ISAM %V407438 01038000
  1156. ITSAREL DS 0H @V4M0156 01039000
  1157. L R2,VDEVRRB GET ADDRESS OF VRRBLOK @V407438 01040000
  1158. USING VRRBLOK,R2 ADDRESS THE VRRBLOK @V407438 01041000
  1159. TM MEMO3,XFERSENS WAS SENSE DATA XFERED TO VIRT STG@V407438 01042000
  1160. BZ CCWNXT22 NOPE, GO SEE IF DEVICE IS FREE @V407438 01043000
  1161. CCWRST2 TM VDEVFLG2,VDEVRES MDISK RESERVED FOR THIS USER @V407438 01044000
  1162. BO CCWNXT28 YES, THIS GUY OWNES IT, CONTINUE @V407438 01045000
  1163. TM VRRSTAT,VRRRES IS THE MDISK RESERVED BY ANYONE? @V407438 01046000
  1164. BO CCWDEFER YES, DEFER PROCESSING @VA08631 01047100
  1165. LA R15,CCWDEFER RETURN TO THIS ADDR IF ANOTHER @VA08631 01047200
  1166. * USER HAS SENSE BYTES OUTSTANDING 01047300
  1167. * FOR THIS MINIDISK 01047400
  1168. B CCWNXT26 CONTINUE @VA08631 01047500
  1169. CCWDEFER DS 0H @VA08631 01048100
  1170. LA R0,CPEXSIZE SIZE OF CPEXBLOC 01048200
  1171. CALL DMKFREE GET THE STORAGE PLEASE @V407438 01049000
  1172. USING CPEXBLOK,R1 ADDRESS THE DSECT PLEASE @V407438 01050000
  1173. STM R0,R15,CPEXR0 SAVE THE CURRENT REGS @V407438 01051000
  1174. LR R3,R1 USE R3 FOR THE CPEXBLOK @V407438 01052000
  1175. DROP R1 NO MORE CPEXBLOK FROM R1 @V407438 01053000
  1176. USING CPEXBLOK,R3 USE R3 INSTEAD FOR THE CPEXBLOK @V407438 01054000
  1177. CALL DMKSCNVD GET DEVICE ADDRESS IN CCU FORM @V407438 01055000
  1178. ST R1,CPEXMISC SAVE THAT IN MISC FOR DMKCFPRD @V407438 01056000
  1179. LA R0,CCWRSTRT RESTART ADDRESS PLEASE @V407438 01057000
  1180. ST R0,CPEXADD THATS WHERE TO RETURN @V407438 01058000
  1181. L R0,VRRCPEX GET THE CHAIN OF WAITING TASKS @V407438 01059000
  1182. ST R0,CPEXFPNT PUT THIS ONE ON THE CHAIN @V407438 01060000
  1183. ST R3,VRRCPEX DITTO @V407438 01061000
  1184. OI VDEVFLG2,VDEVCPEX FLAG WAITING FOR "RELEASE" @V407438 01062000
  1185. OI VMRSTAT,VMIDLE DROP USER FROM QUEUE DURING WAIT @V407438 01063000
  1186. GOTO DMKDSPCH AND WAIT FOR A "RELEASE" @V407438 01064000
  1187. * DROP FROM QUEUE, LEAVE IN EXECUTION WAIT 01065000
  1188. * IF DEVICE IS RESET, CPEXADD IS SET NEGATIVE, LTR'ED BY DMKDSP 01066000
  1189. CCWRSTRT BM CCWNXT24 DEVICE RESET, BR. @V407438 01067000
  1190. NI VMRSTAT,X'FF'-VMIDLE REMOVE FROM WAIT @V407438 01068000
  1191. NI VDEVFLG2,X'FF'-VDEVCPEX CFPRR - NOT WTNG ON CPEX@V407438 01069000
  1192. B CCWRST2 AND TRY IT AGAIN @V407438 01070000
  1193. DROP R3 NO MORE CPEXBLOK @V407438 01071000
  1194. SPACE 01072000
  1195. CCWNXT22 TM VDEVFLG2,VDEVRES USER HAVE MDISK RESERVED NOW @V407438 01073000
  1196. BO CCWNXT28 YES, CONTINUE @V407438 01074000
  1197. TM VRRSTAT,VRRRES DOES ANYONE ELSE HAVE IT RESERVED@V407438 01075000
  1198. BO CCWNXT24 SOMEONE ELSE HAS IT RESERVED @VA08631 01076100
  1199. LA R15,CCWDEFER RETURN TO THIS ADDR IF ANOTHER @VA08631 01076200
  1200. * USER HAS SENSE BYTES OUTSTANDING 01076300
  1201. * FOR THIS MINIDISK 01076400
  1202. B CCWNXT26 CONTINUE @VA08631 01076500
  1203. CCWNXT24 OI IOBSPEC2,IOBCLN MARK IOB FOR CLEAN UP ONLY @V407438 01077000
  1204. CALL DMKUNTFR TOO BAD, UNDO THE CCW TRANSLATION@V407438 01078000
  1205. B CCWEXIT RETURN NOW, IOBCAW = 0 FROM UNTFR@V407438 01079000
  1206. SPACE 01080000
  1207. CCWNXT26 TM MEMO3,RESINCHA DOES CCW CHAIN HAVE A RESERVE? @VA08631 01081010
  1208. BZ CCWNXT28 NO, CONTINUE @VA08631 01081020
  1209. LR R1,R8 SAVE CURRENT VDEVBLOK ADDRESS @VA08631 01081030
  1210. CCWLINK DS 0H @VA08631 01081040
  1211. L R8,VDEVLINK GET VDEV FOR LINK TO SAME MINI @VA08631 01081050
  1212. CR R1,R8 ARE WE BACK TO WHERE WE STARTED? @VA08631 01081060
  1213. BE CCWNXT27 YES, LET USER RESERVE CONTINUE @VA08631 01081070
  1214. TM VDEVFLAG,VDEVUC UC/SENSE OUTSTANDING FOR @VA08631 01081080
  1215. * ANOTHER USER? 01081090
  1216. BZ CCWLINK NO, KEEP LOOKING @VA08631 01081100
  1217. LR R8,R1 RESTORE CURRENT VDEVBLOK @VA08631 01081110
  1218. BR R15 RETURN TO EITHER REFLECT BUSY OR @VA08631 01081120
  1219. * STACK CPEXBLOK UNTIL SENSE BYTES 01081130
  1220. * HAVE BEEN OFFLOADED 01081140
  1221. CCWNXT27 OI VDEVFLG2,VDEVRES FLAG VDEVBLOK RESERVED @VA08631 01081150
  1222. OI VRRSTAT,VRRRES ALSO, LET EVERYONE KNOW IT @V407438 01084000
  1223. ST R11,VRRUSER SAVE IN CASE OF RESET @V407438 01085000
  1224. CALL DMKSCNVD GET CCU FORM OF VIRT ADDR @V407438 01086000
  1225. STH R1,VRRADD SAVE FOR INFORMATIONAL USE ONLY @V407438 01087000
  1226. CCWNXT28 EQU * HERE WHEN DONE WITH MDISK CHECKS %V407438 01088000
  1227. AIF (NOT &ISAM).CCWEXIT %V3M4038 01089000
  1228. TM MEMO1,HADISAM DID WE HAVE ANY ISAM READS TODAY %V3M4038 01090000
  1229. BZ CCWEXIT NOPE - EXIT FORTHWITH. %V3M4038 01091000
  1230. TM VDEVSTAT,VDEVDED DEDICATED DASD DEVICE ? %V3M4038 01092000
  1231. BO CALLISM YES -- ISAM IS ALLOWED %V3M4038 01093000
  1232. ICM R15,8+4,VDEVRELN TEST FOR RELOCATION ZERO %V3M4038 01094000
  1233. BNZ CCWEXIT NOPE - ISAM IS NOT ALLOWED %V3M4038 01095000
  1234. CALLISM EQU * FIX UP ISAM CHANNEL PROGRAM @VM01021 01096000
  1235. CALL DMKISMTR YES, LET ISAM TRANSLATE PHASE DO IT. 01097000
  1236. .CCWEXIT ANOP 01098000
  1237. AIF (&ISAM).NOCPAIS @V386198 01099000
  1238. CALLISM EQU * A "CCWGENRL" ASSIST EXIT ADDR @V386198 01100000
  1239. .NOCPAIS ANOP @V386198 01101000
  1240. DROP R8,R10 (THRU WITH RCWTASK & VDEVBLOK) @V386198 01102000
  1241. CCWEXIT EXIT EXIT - CCW CHAIN(S) COMPLETED. %V3M4038 01103000
  1242. EJECT 01104000
  1243. * CHECK TO SEE IF USER IS OF PROPER CLASS TO ISSUE 01105000
  1244. * MICRO-CODE ALTERING INSTRUCTIONS TO THE 3830 01106000
  1245. CLASSCHK DS 0H 01107000
  1246. L R15,SAVER8 RESTORE R15 = A(VDEVBLOK) @VA04001 01108000
  1247. AL R15,VMDVSTRT ... @VA04001 01109000
  1248. USING VDEVBLOK,R15 @VA04001 01110000
  1249. CLI VDEVTYPC,CLASDASD DASD CLASS? 01111000
  1250. BNER R14 NOT APPLICABLE 01112000
  1251. TM VDEVTYPE,TYP3330+TYP3340+TYP3350+TYP3380 HRC011DK 01113490
  1252. DROP R15 01114000
  1253. BZR R14 NO--NORMAL PROCESSING 01115000
  1254. TM VMCLEVEL,VMCLASSF MUST BE CLASS F USER 01116000
  1255. BOR R14 NORMAL PROCESSING IF SO 01117000
  1256. B CCWFORCE OTHERWISE FORCE A CHANNEL CHECK 01118000
  1257. CCWNEWV2 EQU * SET UP ADDRESSABILITY @VA12408 01118200
  1258. L R12,=A(DMKCCW) BASE FOR PART ONE @VA12408 01118400
  1259. B CCWNEWVA-DMKCCW(R12) GO THERE @VA12408 01118600
  1260. SPACE 3 01119000
  1261. * CHECK WHETHER TO CLEAR ANY SENSE BYTES (I/O ERROR BLOCKS): 01120000
  1262. CLRSENSE L R8,SAVER8 RESTORE R8 = A (VDEVBLOK) %V3M4038 01121000
  1263. AL R8,VMDVSTRT ... %V3M4038 01122000
  1264. USING VDEVBLOK,R8 ... %V3M4038 01123000
  1265. TM VDEVFLAG,VDEVUC VIRTUAL SENSE BYTES PRESENT ? %V3M4038 01124000
  1266. BCR 8,R10 <BZ> NOPE - EXIT FORTHWITH. %V3M4038 01125000
  1267. * VIRTUAL DEVICE SENSE-BYTES PRESENT - CHECK WHETHER TO CLEAR THEM: 01126000
  1268. TM VIRFLAG,SVSEN SHOULD WE SAVE THE SENSE-BYTES ? 01127000
  1269. BCR 1,R10 <BO> IF YES, LEAVE THEM THERE (EXIT). 01128000
  1270. NI VDEVFLAG,255-VDEVUC OTHERWISE, RESET THE FLAG-BIT 01129000
  1271. LA R0,IOERSIZE SET R0 AND 01130000
  1272. L R1,VDEVIOER R1, AND 01131000
  1273. USING IOERBLOK,R1 01132000
  1274. AH R0,IOEREXT ADD EXTRA SIZE (IF ANY) TO DBL-WORD COUNT 01133000
  1275. DROP R1 01134000
  1276. CALL DMKFRET RETURN THE IO ERROR-BLOCK 01135000
  1277. SLR R0,R0 CLEAR THE 01136000
  1278. ST R0,VDEVIOER ADDRESS 01137000
  1279. TM VDEVFLG2,VDEVRRF VIRTUAL RESERVE/RELEASE FEAT? @VA08631 01138010
  1280. BZR R10 NO, RETURN @VA08631 01138020
  1281. L R15,VDEVRRB GET ADDR OF VRRBLOK @VA08631 01138030
  1282. USING VRRBLOK,R15 ESTABLISH ADDRESSABILITY @VA08631 01138040
  1283. TM VRRSTAT,VRRRES SOMEONE GOT THIS MDISK RESERVED? @VA08631 01138050
  1284. BOR R10 YES, RETURN @VA08631 01138060
  1285. NEXTCPEX L R1,VRRCPEX REQUESTS WAITING FOR SENSE DATA @VA08631 01138070
  1286. * TO BE OFFLOADED AS A 01138080
  1287. * RESULT OF A UNIT CHECK? 01138090
  1288. LTR R1,R1 ARE THERE ANY? @VA08631 01138100
  1289. BZR R10 NO, FORGET IT @VA08631 01138110
  1290. USING CPEXBLOK,R1 ESTABLISH ADDRESSABILITY @VA08631 01138120
  1291. L R0,CPEXFPNT UNCHAIN THIS CPEXBLOK @VA08631 01138130
  1292. ST R0,VRRCPEX ... @VA08631 01138140
  1293. CALL DMKSTKCP AND STACK FOR RESTART @VA08631 01138150
  1294. L R15,VDEVRRB RELOAD R15 @VA08631 01138160
  1295. B NEXTCPEX AND CONTINUE TO UNSTACK REST @VA08631 01138170
  1296. DROP R15,R1 @VA08631 01138180
  1297. SPACE 01139000
  1298. DROP R8 01140000
  1299. SPACE 01141000
  1300. * IF READ-TYPE CCW FOR SHARED SEGMENT, ADJUST CAW KEY 01142000
  1301. * (R10 = RETURN-REGISTER - TO "CCWNXT14") 01143000
  1302. CCSHRSEG TM VMOSTAT,VMSHR RUNNING WITH SHARED SEGMENTS ? %V3M4038 01144000
  1303. BCR 8,R10 <BZ> NOPE - RETURN TO CCWNXT14 %V3M4038 01145000
  1304. LTR R2,R2 DOES R2 HOLD A VALID REAL DATA-ADDRESS ? 01146000
  1305. BCR 4,R10 <BM> IF NOT, NO ADJUSTMENT, PLEASE. 01147000
  1306. TM VIRCOMND,X'01' WRITE-, CONTROL-, OR SEARCH- CCW @V202232 01148000
  1307. BO CHKFETCH YES, CHECK FOR FETCH PROTECT VIOL@V202232 01149000
  1308. TM RCWFLAG,SKIP IF A READ, IS THE SKIP FLAG SET? @V202232 01150000
  1309. BZ CHKCAWKY NO - MUST CHECK PROTECTION KEY. @V202232 01151000
  1310. BR R10 YES - NO ADJUSTMENT NECESSARY. @V202232 01152000
  1311. SPACE 01153000
  1312. CHKFETCH EQU * CHECK FOR FETCH-PROTECT VIOLATION@V202232 01154000
  1313. L R15,X2048BND GET MASK FOR BITS 8-20 @V202232 01155000
  1314. NR R15,R2 GET REAL ADDR OF STORAGE KEY BLK @V202232 01156000
  1315. ISK R15,R15 GET THE REAL STORAGE KEY @V202232 01157000
  1316. N R15,F8 ISOLATE AND CHECK THE FETCH-BIT @V202232 01158000
  1317. BCR 8,R10 <BZ> NOT SET = NO FETCH @V202232 01159000
  1318. * PROTECT WANTED 01160000
  1319. * SET - CONTINUE: 01161000
  1320. CHKCAWKY BAL R14,CCWCHKEY TEST FOR STORAGE PROTECTION VIOL @V202232 01162000
  1321. L R14,SAVER10 REFERENCE THE IOBLOK 01163000
  1322. USING IOBLOK,R14 ... 01164000
  1323. BZR R10 CC = 0 , STORAGE KEY OK @V304735 01165000
  1324. TM MEMO1,PROTCAW IS CAW ALREADY PROTECTED ? @V304735 01166000
  1325. BOR R10 YES - RETURN TO CALLER @V304735 01167000
  1326. OI MEMO1,PROTCAW IF NOT - PROTECT IT NOW @V304735 01168000
  1327. MVI IOBCAW,X'10' SET CAW KEY = 1 @V304735 01169000
  1328. CLM R15,1,IOBCAW SHARED PAGE KEY = 1 @V304735 01170000
  1329. BNER R10 NO - LEAVE (FORCE PROTECTION @V304735 01171000
  1330. * CHECK) 01172000
  1331. MVI IOBCAW,X'20' FORCE PROTECTION CHECK @V304735 01173000
  1332. BR R10 RETURN AT 'CCWNXT14' @V304735 01174000
  1333. DROP R14 @V304735 01175000
  1334. CKSHRCHG TM VMOSTAT,VMSHR USER RUNNING A SHARED SYSTEM ? @V304735 01176000
  1335. BZR R14 IF NOT - RETURN TO CALLER @V304735 01177000
  1336. LR R15,R2 REAL ADDRESS FOR 'ISK' @V304735 01178000
  1337. N R15,X2048BND CLEAN UP THE ADDRESS @V304735 01179000
  1338. ISK R15,R15 GET THE REAL STORAGE KEY @V304735 01180000
  1339. N R15,F2 WAS IT CHANGED ? @V304735 01181000
  1340. BNZ CALLVMA IF YES - RELEASE RUNUSER @V304735 01182000
  1341. LA R15,2048(,R2) CHECK SECOND HALF OF PAGE @V304735 01183000
  1342. N R15,XPAGNUM CLEAR DISPLACEMENT @V304735 01184000
  1343. CLR R15,R2 IS ADDRESS STILL WITHIN REAL PAGE@V304735 01185000
  1344. BNH NXTKEY IF YES - GET 2'ND HALF OF PAGE @V304735 01186000
  1345. CLI *+1,X'00' SET CONDITION CODE @V304735 01187000
  1346. BR R14 RETURN @V304735 01188000
  1347. SPACE 1 01189000
  1348. NXTKEY LA R15,2048(,R2) GET SECOND PART OF PAGE @V304735 01190000
  1349. N R15,X2048BND CLEAN UP ADDRESS @V304735 01191000
  1350. ISK R15,R15 GET THE REAL STORAGE KEY @V304735 01192000
  1351. N R15,F2 WAS IT CHANGED BY RUNUSER @V304735 01193000
  1352. BNZ CALLVMA IF YES - RELEASE RUNUSER @V304735 01194000
  1353. CLI *+1,X'00' SET CONDITION CODE @V304735 01195000
  1354. BR R14 RETURN TO CALLER @V304735 01196000
  1355. SPACE 1 01197000
  1356. CALLVMA ST R14,SAVEWRK4 SAVE R14 ACROSS CALL (VMA USES @VA05770 01198000
  1357. * FOR BALR) 01199000
  1358. LA R14,0(R14) ZERO HIGH ORDER FOR COMPARE @VA12785 01199100
  1359. LA R15,NOTLCK GET ADDR FOR COMPARE @VA12785 01199300
  1360. CR R14,R15 @VA12785 01199500
  1361. BE CALLVMA1 WE DIDN'T LOCK SO WON'T UNLOCK @VA12785 01199700
  1362. CALL DMKPTRUL UNLOCK PAGE @VA07988 01200000
  1363. CALLVMA1 DS 0H @VA12785 01200100
  1364. CALL DMKVMASH FLAG ALL CHANGED SHARED PAGES @VA07351 01201000
  1365. TRANS 2,1,OPT=(BRING,DEFER,LOCK) @VA07988 01202000
  1366. L R14,SAVEWRK4 RESTORE R14 (IN CASE VMA USED IT @VA05770 01203000
  1367. LCTL C1,C1,VMSEG REESTABLISH CONTROL REG 1 @VA05706 01204000
  1368. TM *+1,X'FF' SET COND. CODE 3 @V304735 01205000
  1369. BR R14 RETURN TO CALLER @V304735 01206000
  1370. EJECT 01207000
  1371. * DATA WILL CROSS AT LEAST ONE 4096-BYTE PAGE BOUNDARY: 01208000
  1372. * (OR IDA IS TO BE USED "ON PURPOSE" FOR SENSE, READ-HOME-ADDRESS, 01209000
  1373. * OR READ-RECORD-R0, WHERE CONTROL WORD INFO FOLLOWS THE ONE IDAW) 01210000
  1374. * (ENTER AT "CCWMANY2" IF IDA SET "ON PURPOSE" AS MENTIONED ABOVE) 01211000
  1375. * 01212000
  1376. CCWMANYF LRA R14,0(,R1) IS ADDR. IN CCW WITHIN USERS @V304635 01213000
  1377. * STORAGE 01214000
  1378. BC 8+2,CCWMANY2 IF SEGMENT VALID CONTINUE @V408246 01215000
  1379. CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 01216000
  1380. BC 2,CCWBAD4 @V408246 01217000
  1381. CCWMANY2 DS 0H OK - SEE HOW MUCH ROOM WE HAVE & NEED: 01218000
  1382. LR R14,R1 SET FOR "BEGINNING" ADDRESS 01219000
  1383. LA R15,0(R1,R4) ADDRESS OF LAST BYTE TO BE READ/WRITTEN 01220000
  1384. BAL R10,IDAWSUB SEE HOW MUCH ROOM WE NEED AND HAVE 01221000
  1385. LR R4,R1 GET STARTING ADDRESS IN R4, 01222000
  1386. O R4,F4095 THEN ROUND TO NEXT PAGE-START, 01223000
  1387. LA R4,1(,R4) ... 01224000
  1388. SLR R4,R1 R4 - R1 GIVES THE FIRST COUNT 01225000
  1389. LA R10,2048 SET R10 TO +2048 01226000
  1390. * 01227000
  1391. CCWIDA1 DS 0H HANDLE FORWARD OR BACKWARD PAGE CROSSOVERS VIA IDA: 01228000
  1392. LR R7,R15 NEW R7 01229000
  1393. STCM R7,7,RCWADDR+1 STORE IN ADDRESS BYTES OF COMMAND 01230000
  1394. LR R3,R1 REMEMBER ADDRESS (WITHOUT HI BYTE) IN R3 01231000
  1395. OI RCWFLAG,IDA SET REAL IDA FLAG-BIT 01232000
  1396. TRANLOCK DMKCCWL1 ... %V3M4038 01233000
  1397. ST R2,0(,R7) STORE REAL DATA ADDRESS IN IDAL 01234000
  1398. CL R4,F2048 WAS FIRST COUNT MORE THAN 2K? 01235000
  1399. BNH CCWIDA5 IF NOT, NO "2ND HALF OF PAGE" TO WORK ON. 01236000
  1400. * 01237000
  1401. S R0,F1 DECREMENT HALF-PAGE COUNT 01238000
  1402. BZ CCWIDA6A ALL DONE, GO REMEMBER ONE VALID ADDRESS 01239000
  1403. LA R7,4(,R7) BUMP CNTRLST PNTR TO NEXT WORD 01240000
  1404. O R1,F2047 GO TO END OF 2048-BYTE BLOK 01241000
  1405. LTR R10,R10 FORWARD OR BACKWARD ? 01242000
  1406. BP CCWIDA3 TRF IF FORWARD. 01243000
  1407. AR R1,R10 ADD NEGATIVE R10 FOR READ BACKWARD 01244000
  1408. B CCWIDA4 AND CONTINUE BELOW. 01245000
  1409. CCWIDA3 LA R1,1(,R1) UP TO HALF-PAGE BOUNDARY 01246000
  1410. CCWIDA4 TRANLOCK DMKCCWL2 TRANSLATE AND LOCK DATA PAGE %V3M4038 01247000
  1411. ST R2,0(,R7) AND SAVE ADDRESS IN IDAW 01248000
  1412. * 01249000
  1413. CCWIDA5 LA R7,4(,R7) BUMP R7 FOR NEXT CONTROL WORD 01250000
  1414. LTR R10,R10 FORWARD OR BACKWARD ? 01251000
  1415. BP AR34 GO ADD IF FORWARD. 01252000
  1416. SLR R3,R4 SUBTRACT IF BACKWARD 01253000
  1417. B CCWIDA6 AND GO SET UP R1 FOR TRANS CALLS. 01254000
  1418. AR34 ALR R3,R4 FWD, POINT TO START OF NEXT VPAGE 01255000
  1419. CCWIDA6 LR R1,R3 SET R1 FROM R3 FOR NEXT VPAGE(S) 01256000
  1420. CCWIDA6A LR R4,R2 REMEMBER ONE VALID REAL DATA ADDRESS 01257000
  1421. S R0,F1 DECREMENT HALF-PAGE COUNT, 01258000
  1422. BNP CCWIDA7 IF NOT PLUS, WE'RE ALL DONE. 01259000
  1423. * 01260000
  1424. CCWIDALP DS 0H LOOP TO TRANSLATE & LOCK HALF-PAGES: 01261000
  1425. TRANLOCK DMKCCWL3,RETURN=LOCK3 GET REAL ADDR. IN R2 %V3M4038 01262000
  1426. BNZ IDAWBAD BEWARE OF ADDRESS NO GOOD %V3M4038 01263000
  1427. LOCK3 ST R2,0(,R7) STORE IDAW =REAL A(PAGE IN IDAL) @V386198 01264000
  1428. LA R7,4(,R7) BUMP CONTROL-LIST POINTER BY 4, 01265000
  1429. AR R1,R10 ADJUST VIRT ADDR BY + OR - 2048 01266000
  1430. BCT R0,CCWIDALP AND ITERATE TRANSLATE-LOCK LOOP. 01267000
  1431. * 01268000
  1432. CCWIDA7 OI RCWCTL,RCWREL+RCWIO ADDRESS RELOCATABLE, PAGES LOCKED 01269000
  1433. CCWIDA8 L R7,RCWADDR NOW RE-OBTAIN R7 01270000
  1434. LA R7,0(,R7) ... 01271000
  1435. LR R2,R4 RESTORE R2 TO A (VALID) REAL DATA ADDRESS 01272000
  1436. B CCWNXT11 AND GO CHECK FOR COMPLETION. 01273000
  1437. * 01274000
  1438. IDAWBAD L R2,FFS ADDRESS N.G., SET IDAW POSITIVELY INVALID 01275000
  1439. ST R2,0(,R7) ... 01276000
  1440. CLR R4,R2 HAVE WE HAD AT LEAST ONE GOOD ADDRESS ? 01277000
  1441. BNE CCWIDA7 YES - SET RCWREL+RCWIO FLAG-BITS 01278000
  1442. IDAWBADR OI RCWCTL,RCWREL NO - JUST SET RCWREL FLAG-BIT 01279000
  1443. B CCWIDA8 AND FINISH UP. 01280000
  1444. IDAWBAD1 EQU * INVALID DATA ADDRESS @VA03162 01281000
  1445. L R15,=A(DMKSYSRM) GET REAL MACHINE @VA03162 01282000
  1446. L R15,0(,R15) SIZE @VA03162 01283000
  1447. ST R15,0(,R7) SET DATA ADDRESS INVALID @VA03162 01284000
  1448. B IDAWBADR CONTINUE... @VA03162 01285000
  1449. EJECT 01286000
  1450. * HANDLE IDA FLAG IN READ-BACKWARD USER CCW: 01287000
  1451. * (ENTERED DIRECTLY AT "HNDUSIDA" WITH R10 ALREADY = 2) 01288000
  1452. SPACE 01289000
  1453. * HANDLE INVALID COMMAND WITH IDAW SET - PERFORM VALIDITY CHECKING OF 01290000
  1454. * USER'S 1ST IDAW (AS CHANNEL WOULD DO), WITHOUT LOCKING ANY PAGES: 01291000
  1455. * NOTE - SKIP FLAG IS SET IN RCWFLAG; RCWINVL IS SET IN RCWCTL 01292000
  1456. * THE FOLLOWING CHECK ALSO TAKES PLACE ON CONTROL COMMANDS WHICH 01293000
  1457. * USE IDAL'S. IN THAT CASE, THE 'RCWREL' BIT IS SET TO AVOID 01294000
  1458. * CHECKING MORE THAN THE FIRST ENTRY IN THE IDAL. NO PAGES ARE 01295000
  1459. * INTENDED TO BE LOCKED IN THIS CASE. 01296000
  1460. * 01297000
  1461. SPACE 2 01298000
  1462. CTLCMDID OI RCWCTL,RCWREL MARK CCW RELOCATABLE TO AVOID @VA03180*01299000
  1463. CHECKING MORE THAN THE FIRST IDAL ENTRY. 01300000
  1464. INVIDAW SLR R4,R4 PRETEND BYTE-COUNT = 1 (SIC) & FWD CCW: 01301000
  1465. OI RCWFLAG,SKIP SET SKIP FLAG (TO BE SAFE FOR CP) 01302000
  1466. * AND CONTINUE TO "FWDIDAL" ... 01303000
  1467. TM RCWCTL,RCWINVL INVALID CCW ? @VA08844 01303100
  1468. BO FWDIDAL YES @VA08844 01303200
  1469. ICM R4,3,RCWCNT LOAD DATA LENGTH @VA08844 01303300
  1470. BCTR R4,R0 BYTE-COUNT-1 @VA08844 01303400
  1471. SPACE 01304000
  1472. * HANDLE IDA FLAG IN FORWARD-DIRECTION USER CCW: 01305000
  1473. FWDIDAL SLR R10,R10 R10=0 MEANS FORWARD 01306000
  1474. * 01307000
  1475. HNDUSIDA DS 0H 01308000
  1476. TM RCWADDR+3,X'03' IS THE IDAW FULL-WORD ALIGNED ? 01309000
  1477. BNZ CCWBAD INVALID CCW IF NOT 01310000
  1478. TRANBRNG DMKCCWB2,RETURN=BRING2 GET ADDR. OF IDAL %V3M4038 01311000
  1479. BNZ CCWBAD INVALID CCW IF NOT IN HIS SPACE %V3M4038 01312000
  1480. BRING2 L R14,0(,R2) GET 'STARTING ADDRESS' FROM IDAL @V386198 01313000
  1481. LR R15,R14 R15 WILL BE THE 'ENDING ADDRESS' 01314000
  1482. LR R1,R14 REMEMBER IDAW ADDRESS IN R1 01315000
  1483. EX 0,DORIGHT(R10) ADJUST R14 OR R15 - WHICHEVER IS RIGHT 01316000
  1484. BAL R10,IDAWSUB SEE HOW MUCH ROOM WE HAVE & NEED 01317000
  1485. LR R7,R15 IF OK, WE HAVE A NEW R7 01318000
  1486. STCM R7,7,RCWADDR+1 STORE IN ADDRESS BYTES OF COMMAND 01319000
  1487. L R4,FFS R4: VALID REAL DATA ADDRESS NOT FOUND YET 01320000
  1488. TM 0(R2),255 INVALID IDAW ? @VA03162 01321000
  1489. BNZ IDAWBAD YES..CONTINUE... @VA03162 01322000
  1490. CL R1,VMSIZE CHECK 1ST IDAW (HIGH ORDER BYTE - SIZE) 01323000
  1491. BNL IDAWBAD1 INVALID DATA ADDRESS @VA03162 01324000
  1492. LRA R14,0(,R1) IS IDAW WITHIN USERS STORAGE @V304635 01325000
  1493. BC 8+2,USIDAL1 IF SEGMENT VALID CONTINUE @V408246 01326000
  1494. CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 01327000
  1495. BC 2,IDAWBAD @V408246 01328000
  1496. USIDAL1 DS 0H @V408246 01329000
  1497. TM RCWCTL,RCWINVL+RCWREL INVALID CCW OR @VA03180*01330000
  1498. CONTROL COMMAND? 01331000
  1499. BZ IDAOK5 NOPE - GO BRING & LOCK 1ST PAGE. 01332000
  1500. B IDAWBADR YES - 1ST IDAW OK, JUST SET RCWREL FLAG. 01333000
  1501. * 01334000
  1502. USIDAL2 LA R3,4(,R3) ADVANCE TO NEXT USER IDAL WORD 01335000
  1503. LA R7,4(,R7) AND NEXT REAL IDAL WORD 01336000
  1504. LR R1,R3 GET IDAW FROM USER'S IDAL LIST 01337000
  1505. TRANBRNG DMKCCWB3,RETURN=BRING3 %V3M4038 01338000
  1506. BNZ IDAWBAD (BEWARE OF INVALID ADDRESS) %V3M4038 01339000
  1507. BRING3 L R1,0(0,R2) GET REAL IDAW ADDRESS @V386198 01340000
  1508. CL R1,VMSIZE VALIDATE IT (HIGH ORDER BYTE MUST BE 00) 01341000
  1509. BNL IDAWBAD TRF IF NOT VALID 01342000
  1510. LRA R14,0(,R1) IS IDAW WITHIN USER'S STORAGE @V304635 01343000
  1511. BC 8+2,IDAOK5 CONTINUE IF VALID SEGMENT @V408246 01344000
  1512. CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 01345000
  1513. BC 2,IDAWBAD @V408246 01346000
  1514. IDAOK5 TRANLOCK DMKCCWL4 OK, BRING IN DATA-PAGE FOR I/O %V3M4038 01347000
  1515. LR R4,R2 OK, REMEMBER ONE VALID REAL DATA ADDRESS 01348000
  1516. ST R2,0(,R7) AND STORE REAL ADDRESS IN REAL IDAL 01349000
  1517. BCT R0,USIDAL2 ITERATE LOOP IF THERE ARE MORE TO DO. 01350000
  1518. B CCWIDA7 WHEN THRU, SET FLAG-BITS AND FINISH UP. 01351000
  1519. * 01352000
  1520. * KEEP THE NEXT TWO IN ORDER - EXECUTED INDEXED BY R10: 01353000
  1521. DORIGHT ALR R15,R4 FWD - COMPUTE 'ENDING ADDRESS' 01354000
  1522. SLR R14,R4 BACKWARD - COMPUTE 'STARTING ADDRESS' 01355000
  1523. EJECT 01356000
  1524. * SUBROUTINE TO OBTAIN CONTROL INFORMATION OF UP TO 8 BYTES 01357000
  1525. * FROM USER CORE (E.G. FOR RELOCATING CYLINDER NUMBERS), OR 01358000
  1526. * TO PLACE INFORMATION (E.G. SENSE BYTES) IN USER CORE. 01359000
  1527. * 01360000
  1528. * ENTRY POINTS - 01361000
  1529. * 01362000
  1530. * CNTRLSUB - OBTAIN CONTROL INFORMATION FROM USER CORE 01363000
  1531. * CNTRLSBW - "WRITE" INFORMATION INTO USER CORE 01364000
  1532. * 01365000
  1533. * ENTRY CONDITIONS: 01366000
  1534. * CCW IS IN "RCWCCW" AS USUAL 01367000
  1535. * R1 = ADDRESS OF DATA 01368000
  1536. * R3 = CCW-COMMAND AND ADDRESS OF DATA 01369000
  1537. * R4 = BYTE-COUNT LESS 1 01370000
  1538. * R8 = ADDRESS OF DATA TO BE "WRITTEN" FOR CNTRLSBW ENTRY ONLY 01371000
  1539. * R10 = RETURN-REGISTER 01372000
  1540. * 01373000
  1541. * EXIT CONDITIONS: 01374000
  1542. * IF DATA-ADDRESSING ERROR OCCURRED, TRANSFERS TO CCWBAD . 01375000
  1543. * OTHERWISE, DATA HAS BEEN PLACED IN "R7" CONTROL AREA 01376000
  1544. * FOR "CNTRLSUB" ENTRY, OR "WRITTEN" TO USER-CORE FOR 01377000
  1545. * "CNTRLSBW" ENTRY. 01378000
  1546. * 01379000
  1547. * R0-R4 NOT PRESERVED AT EXIT. 01380000
  1548. * R8 = USUAL VALUE OF A(VDEVBLOK) 01381000
  1549. SPACE 01382000
  1550. CNTRLSUB SLR R8,R8 R8=0 MEANS OBTAIN DATA FROM USER-CORE 01383000
  1551. CL R4,F7 MAKE SURE BYTE-COUNT-LESS-1 NOT > 7 01384000
  1552. BNH CNTRLSB1 OK IF NOT. 01385000
  1553. LA R4,8 IF BYTE-COUNT WAS > 8, MAKE IT 8 01386000
  1554. TM RCWCTL,RCWHMR+RCW2311 DOING THIS FOR TRICKY CASES ? 01387000
  1555. BNZ *+8 YES - DON'T CHANGE BYTE COUNT IN REAL CCW 01388000
  1556. STH R4,RCWCNT ... 01389000
  1557. BCTR R4,0 AND NOW 7 IN THE REGISTER ITSELF. 01390000
  1558. CNTRLSB1 EQU * 01391000
  1559. LR R0,R1 ADDRESS OF FIRST BYTE OF DATA 01392000
  1560. ALR R0,R4 NOW ADDRESS OF LAST DATA BYTE 01393000
  1561. XROOM 16 IF OK, GET ROOM FOR CONTROL BYTES IN R7 01394000
  1562. SL R7,F8 IF ENOUGH ROOM, GET NEW R7 (OLD ONE - 8) 01395000
  1563. TM RCWFLAG,IDA IS USER'S IDA FLAG-BIT SET ? 01396000
  1564. BZ CNTRLSB3 TRF IF NOT (R1 HOLDS VIRT. ADDR. WE NEED) 01397000
  1565. CNTRLSB2 EQU * FETCH AND INTERPRET IDAW 01398000
  1566. L R0,F3 CHECK CCW ALIGNMENT 01399000
  1567. NR R0,R1 (MUST BE FULL-WORD ALIGNED) 01400000
  1568. BNZ CNTRLBAD INVALID CCW IF NOT 01401000
  1569. TRANBRNG DMKCCWB4,RETURN=BRING4 BRING IN THE IDAW %V3M4038 01402000
  1570. BNZ CNTRLBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01403000
  1571. BRING4 L R1,0(0,R2) GET ADDRESS FROM IDA WORD @V386198 01404000
  1572. CL R1,VMSIZE VALIDATE IT (HIGH-ORDER MUST BE ZERO) 01405000
  1573. BNL CNTRLBAD TOO BAD, FELLOW 01406000
  1574. LRA R14,0(,R1) VALID IDAW ADDRESS @V304635 01407000
  1575. BC 8+2,CNTRLS2A CONTINUE IF VALID SEGMENT @V408246 01408000
  1576. CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 01409000
  1577. BC 2,CNTRLBAD @V408246 01410000
  1578. CNTRLS2A DS 0H @V408246 01411000
  1579. LR R0,R1 ...ALSO INTO GR0 01412000
  1580. ALR R0,R4 NEW "ADDRESS OF LAST BYTE" INTO R0 01413000
  1581. CNTRLSB3 EQU * CHECK 2K-BOUNDARY CROSSINGS 01414000
  1582. L R2,X2048BND ...FOR PROTECTION CHECKING 01415000
  1583. NR R0,R2 ISOLATE PAGE-ENDING ADDRESS IN R0, 01416000
  1584. LR R14,R0 REMEMBER IN R14 BRIEFLY (IN CASE NEEDED) 01417000
  1585. NR R2,R1 ISOLATE PAGE-STARTING-ADDRESS IN R2 01418000
  1586. SR R0,R2 GET DIFFERENCE (IF ANY) IN R0 01419000
  1587. BZ CNTRLSB4 TRF IF THEY ARE THE SAME (NOTE R0=0) 01420000
  1588. SLR R14,R1 IF NO, GET NO. OF BYTES LEFT IN THIS PAGE 01421000
  1589. BCTR R14,0 (LESS 1 FOR EX-MVC LATER) 01422000
  1590. LR R0,R4 PUT OLD TOTAL-COUNT-LESS-1 IN R0, 01423000
  1591. SLR R0,R14 LESS R14 COUNT = RESIDUE IN NEXT VIRT PAGE 01424000
  1592. LR R4,R14 R14 COUNT NOW INTO R4 01425000
  1593. CNTRLSB4 TRANBRNG DMKCCWB5,RETURN=BRING5 GET CONTROL BYTES %V3M4038 01426000
  1594. BNZ CNTRLBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01427000
  1595. BRING5 LTR R8,R8 WHICH ENTRY DID WE COME IN ? @V386198 01428000
  1596. BNZ CNTRLSB5 TRF IF "CNTRLSBW" ENTRY. 01429000
  1597. EX R4,EXMVCR72 MOVE ALL/SOME CONTROL BYTES TO OUR R7 AREA 01430000
  1598. LTR R0,R0 IS THERE ANY RESIDUE IN NEXT VIRT PAGE ? 01431000
  1599. BNZ CNTRLSB6 IF YES, PROCEED. 01432000
  1600. CNTRLEXT L R8,SAVER8 WHEN ALL THRU, RESTORE R8 = A(VDEVBLOK), 01433000
  1601. AL R8,VMDVSTRT ... 01434000
  1602. BR R10 AND EXIT TO CALLER. 01435000
  1603. * 01436000
  1604. CNTRLSB5 BAL R14,CCWCHKEY CHECK FOR USER PROTECTION KEY SET 01437000
  1605. BC 7,SRCHID5A IF CC NOT 0, HANDLE AS GENERAL CASE 01438000
  1606. EX R4,EXMVCR28 IF OK, "WRITE" DATA TO USER CORE 01439000
  1607. LTR R0,R0 IS THERE ANY MORE DATA TO BE MOVED ? 01440000
  1608. BZ CNTRLEXT IF NOT (R0=0), GO RESTORE R8 AND EXIT. 01441000
  1609. LA R8,1(R8,R4) IF YES, BUMP R8 FOR MORE DATA TO MOVE 01442000
  1610. * 01443000
  1611. CNTRLSB6 LA R1,1(R1,R4) GET TENTATIVE NEXT VIRT. PAGE ADDRESS, 01444000
  1612. TM RCWFLAG,IDA WAS USER IDA SET ? 01445000
  1613. BZ CNTRLSB7 TRF IF NOT - GET REST OF CONTROL BYTES. 01446000
  1614. LA R1,4(,R3) IF IDA SET, POINT AT NEXT USER IDAW 01447000
  1615. TRANBRNG DMKCCWB6,RETURN=BRING6 GET 2ND IDAW %V3M4038 01448000
  1616. BNZ CNTRLBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01449000
  1617. BRING6 L R2,0(,R2) GET REAL ADDR OF REM. CNTL BYTES @V386198 01450000
  1618. LR R1,R2 NOW SAFELY INTO R1 01451000
  1619. CL R1,VMSIZE VALIDATE IT (HIGH ORDER MUST BE ZERO) 01452000
  1620. BNL CNTRLBAD SORRY ABOUT THAT 01453000
  1621. LRA R14,0(,R1) IS THIS A VALID VIRTUAL ADDRESS @V304635 01454000
  1622. BC 8+2,CNTRLS6A CONTINUE IF SEGMENT VALID @V408246 01455000
  1623. CALL DMKPTRAN,PARM=DEFER OTHERWISE LET DMKPTRAN @V408246 01456000
  1624. * HANDLE 01457000
  1625. BC 2,CNTRLBAD @V408246 01458000
  1626. CNTRLS6A DS 0H @V408246 01459000
  1627. N R2,F2047 THAT ADDRESS MUST BE 2048-BYTE ALIGNED 01460000
  1628. BNZ CNTRLBAD ERROR IF NOT (COULDN'T TRUST THE DATA) 01461000
  1629. CNTRLSB7 LA R3,1(R4,R7) GET WHERE-TO-PUT REMAINING CONTROL BYTES 01462000
  1630. * (NOTE: HARMLESS IF "CNTRLSBW" ENTRY) 01463000
  1631. LR R4,R0 AND GET REMAINING-BYTE-COUNT IN R4 01464000
  1632. BCTR R4,0 (LESS 1 FOR EX-MVC) 01465000
  1633. TRANBRNG DMKCCWB7,RETURN=BRING7 GET REM. CNTL BYTES %V3M4038 01466000
  1634. BNZ CNTRLBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01467000
  1635. BRING7 LTR R8,R8 WHICH WAY TO GO NOW ?? @V386198 01468000
  1636. BNZ CNTRLSB8 NOW I REMEMBER ... 01469000
  1637. EX R4,EXMVCR32 MOVE LAST FEW CONTROL BYTES TO OUR R7 AREA 01470000
  1638. B CNTRLEXT AND (FINALLY) EXIT TO CALLER (WHEW). 01471000
  1639. * 01472000
  1640. CNTRLSB8 BAL R14,CCWCHKEY CHECK FOR USER PROTECTION KEY SET 01473000
  1641. BC 7,SRCHID5A IF CC NOT 0, HANDLE AS GENERAL CASE 01474000
  1642. EX R4,EXMVCR28 IF OK, MOVE LAST FEW BYTES TO USER CORE 01475000
  1643. B CNTRLEXT AND GO EXIT. 01476000
  1644. * 01477000
  1645. EXMVCR72 MVC 0(*-*,R7),0(R2) OBTAINS ALL OR FIRST FEW CONTROL BYTES 01478000
  1646. EXMVCR32 MVC 0(*-*,R3),0(R2) OBTAINS LAST FEW CONTROL BYTES 01479000
  1647. EXMVCR28 MVC 0(*-*,R2),0(R8) MOVES DATA TO USER CORE 01480000
  1648. EXMVCLST MVC 8(0,R15),0(R1) MOVE OLD LIST TO NEW LIST @VW01384 01481000
  1649. * 01482000
  1650. * ENTER HERE FOR "CNTRLSBW" ENTRY: 01483000
  1651. CNTRLSBW TM RCWFLAG,IDA IS USER'S IDA FLAG-BIT SET ? 01484000
  1652. BO CNTRLSB2 IF YES, GO GET IDAW, ETC. 01485000
  1653. LR R0,R1 FIRST BYTE OF DATA... 01486000
  1654. ALR R0,R4 NOW LAST BYTE OF DATA 01487000
  1655. CL R0,VMSIZE HOPEFULLY WITHIN THE USER'S MACHINE ? 01488000
  1656. BNL CNTRLBAD IF NOT - CHK OUT BAD ADDRESS @V304635 01489000
  1657. LR R14,R0 CHK. AGAINST TRANSLATE TABLES @V304635 01490000
  1658. LRA R14,0(,R14) WITHIN USER'S VIRTUAL STORAGE @V304635 01491000
  1659. BC 8+2,CNTRLSB3 IF YES - CHK. FOR PROTECTION @V304635 01492000
  1660. CALL DMKPTRAN,PARM=DEFER HAVE PTRAN HANDLE SEGMENT @V408246 01493000
  1661. * EXCEPTIONS 01494000
  1662. BC 8+4+1,CNTRLSB3 @V408246 01495000
  1663. * ERROR 01496000
  1664. * HERE IF INVALID ADDRESS FOUND IN THE ABOVE PROCESS: 01497000
  1665. CNTRLBAD LTR R8,R8 WHICH ENTRY DID WE COME IN ? 01498000
  1666. BNZ CCWBAD IF "CNTRLSBW", LEAVE R7 ALONE. 01499000
  1667. TM MEMO1,CCWSUBR ENTERED VIA DMKCCWSB ENTRY POINT ? 01500000
  1668. BO CCWEXIT YES - EXIT TO CALLER OF DMKCCWSB (CC=3) 01501000
  1669. MVC 0(8,R7),ZEROES CLEAR THE CONTROL-WORD AREA, AND 01502000
  1670. LA R7,8(,R7) BUMP R7 UP BY 8 SO IT CAN BE REUSED 01503000
  1671. * AND HANDLE AS A 'SICK ADDRESS' COMMAND: 01504000
  1672. CCWBAD DS 0H ADDRESS SPECIFIED BY USER CCW WAS BAD: 01505000
  1673. MVI RCWFLAG,X'03' SET CCW FLAG FIELD INVALID 01506000
  1674. CCWBAD2 MVC RCWADDR(4),XRIGHT24 SET OP-CODE AND ADDRESS INVALID 01507000
  1675. MVI RCWCTL,RCWINVL REMEMBER THAT IT IS INVALID 01508000
  1676. XC VIRCOMND(2),VIRCOMND ZERO PREVIOUS COMMAND @VA05410 01509000
  1677. B CCWCHKPV AND GO CHECK THE PREVIOUS COMMAND. 01510000
  1678. * 01511000
  1679. CCWINVLD DS 0H VIRTUAL CCW IS OSTENSIBLY INVALID: 01512000
  1680. OI RCWCTL,RCWINVL WE THINK THIS IS AN INVALID CCW 01513000
  1681. TM RCWFLAG,IDA IS IDA FLAG PERCHANCE SET 01514000
  1682. BO INVIDAW IF YES, VALIDITY-CHECK USER'S IDAL 01515000
  1683. CCWBAD4 L R15,=A(DMKSYSRM) GET REAL MACHINE SIZE 01516000
  1684. L R15,0(,R15) ... 01517000
  1685. N R15,XRIGHT24 CLEAR HIGH BYTE @VA03162 01518000
  1686. BNZ *+8 NOT 16 MEG MACHINE.. @VA03162 01519000
  1687. OI RCWFLAG,3 SET CCW INVALID FOR 16 MEG @VA03162 01520000
  1688. STCM R15,7,RCWADDR+1 YES - SUBSTITUTE "REAL MACHINE SIZE" 01521000
  1689. * NOTE: IN EITHER CASE, "RCWIO" IS NOT SET; 01522000
  1690. * DMKUNTFR WON'T TRY TO UNLOCK INVALID PAGE 01523000
  1691. CCWIOCHK BAL R10,CLRSENSE CLEAR ANY SENSE BYTES MAYBE LYING AROUND, 01524000
  1692. TM RCWCTL,RCWINVL DID WE THINK THIS WAS AN INVALID CCW ? 01525000
  1693. BZ CCWNXT14 NO - TEST FOR END OF CCW STRING 01526000
  1694. B CCWCHKPV YES - GO CHECK THE PREVIOUS COMMAND 01527000
  1695. EJECT 01528000
  1696. * SUBROUTINE TO COMPUTE HOW MANY IDAWS WILL BE 01529000
  1697. * NEEDED, AND IF THERE IS ENOUGH ROOM FOR THEM: 01530000
  1698. SPACE 01531000
  1699. IDAWSUB N R14,X2048BND ENTER HERE TO ISOLATE R14 AND R15 TO 01532000
  1700. N R15,X2048BND 2048-BYTE BOUNDARIES, AND CONTINUE: 01533000
  1701. SLR R15,R14 GET END ADDR - START ADDR 01534000
  1702. LA R15,0(0,R15) ALLOW STORAGE WRAP-AROUND, PREVENT PROG. 01535000
  1703. * CHECK IF R14 > R15.... 01536000
  1704. SRL R15,9(0) IDAL LENGTH IN BYTES 01537000
  1705. LA R14,4(0,R15) PLUS 4 NEEDED, INTO R14 01538000
  1706. LR R0,R14 R0 WILL CONTAIN IDA WORD COUNT 01539000
  1707. SRL R0,2(0) ... 01540000
  1708. LR R15,R7 PREVIOUS CONTROL WORD POINTER 01541000
  1709. SLR R15,R14 BACK UP TO START OF IDAL 01542000
  1710. LA R14,8(0,R6) POINT TO END OF CURRENT CCW 01543000
  1711. TM RCWFLAG,CC+CD IF IT IS CHAINED... 01544000
  1712. BZ *+8 NO - THAT'S ENOUGH ROOM 01545000
  1713. LA R14,8(0,R14) ...ALLOW FOR AT LEAST ONE MORE CCW 01546000
  1714. CLR R14,R15 IS THERE ENOUGH ROOM FOR THE IDAL ? 01547000
  1715. BCR 13,R10 'BNH' IF OK - EXIT TO CALLER. 01548000
  1716. B CCWNROOM GO EXPAND THE RCWTASK 01549000
  1717. SPACE 01550000
  1718. CCWCHKRM EQU * TEST FOR SUFFICIENT SPACE IN RCWTASK 01551000
  1719. TM RCWFLAG,CC+CD IF CHAINING IS ON... 01552000
  1720. BZ *+8 01553000
  1721. LA R14,8(0,R14) ALLOW ONE MORE CCW 01554000
  1722. CLR R14,R7 DO WE HAVE ENOUGH ROOM ? 01555000
  1723. BCR 13,R15 (BNH) YES - RETURN TO CALLER 01556000
  1724. SPACE 01557000
  1725. CCWNROOM EQU * @VA12408 01558000
  1726. L R12,=A(DMKCCW) BASE FOR FIRST PART @VA12408 01588000
  1727. B ROOM-DMKCCW(R12) GO THERE @VA12408 01618000
  1728. SPACE 3 01654000
  1729. *--------HERE ENDETH CCWTRANS LOGIC COMMON TO ALL DEVICE CLASSES------- 01655000
  1730. * (EXCEPT FOR DMKCCWSB & TICSCAN, WHICH ARE AT THE END) 01656000
  1731. EJECT 01657000
  1732. *. 01658000
  1733. * LOGIC FOR "DASD" = NON-DEDICATED DASD DEVICE CLASS 01659000
  1734. * 01660000
  1735. * DASDX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 01661000
  1736. * INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01662000
  1737. * AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01663000
  1738. * 01664000
  1739. * WRITE SPECIAL COUNT KEY AND DATA (01) OR ERASE TRACK (11) 01665000
  1740. * ARE HANDLED AS A GENERAL CASE DASD WRITE 01666000
  1741. * (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01667000
  1742. * 01668000
  1743. * IF > 11, CHECKS THAT CCW IS AN APPARENT "SEARCH ID" 01669000
  1744. * TYPE OF CCW (31, 51, ..., D1, F1) 01670000
  1745. * IF NOT, HANDLED AS AN INVALID CCW; IF YES, HANDLED AS A 01671000
  1746. * "STATUS MODIFIER" TYPE OF DATA TRANSFER & CHECKS FURTHER: 01672000
  1747. * 01673000
  1748. * CHECKS DEVICE TYPE; IF NOT 3330/40/50/80, HANDLES HRC011DK 01674290
  1749. * NORMALLY. HRC011DK 01674580
  1750. * 01675000
  1751. * IF 3330/40/50/80, CHECKS CYLINDER RELOCATION FACTOR; HRC011DK 01676490
  1752. * IF = 0, HANDLES NORMALLY. 01677000
  1753. * 01678000
  1754. * CHECKS BYTE COUNT; IF < 5, HANDLES NORMALLY. 01679000
  1755. * 01680000
  1756. * CHECKS 5TH BYTE ('R' BYTE OF 'CCHHR' ARGUMENT); 01681000
  1757. * IF NONZERO, HANDLES NORMALLY. 01682000
  1758. * 01683000
  1759. * FOR 3330/40/50/80, CYL RELOCATION FACTOR NONZERO, 5THHRC011DK 01684490
  1760. * (THAT IS, A "SEARCH ID" TYPE OF CCW ON "RECORD R0") 01685000
  1761. * RELOCATES 'CCHHR' FIELD TO CP CONTROL WORDS, ADDING THE 01686000
  1762. * CYLINDER RELOCATION FACTOR TO THE VIRTUAL CYLINDER NUMBER. 01687000
  1763. * 01688000
  1764. * NOTE: IF THE 'R' BYTE OF 'CCHHR' = 0 AT THE TIME A VIRTUAL 01689000
  1765. * SIO IS ISSUED BUT THE 'CCHHR' FIELD IS READ IN DYNAMICALLY BY 01690000
  1766. * THE CHANNEL PROGRAM BEFORE THE SEARCH ID CCW IS EXECUTED, THE 01691000
  1767. * REAL SEARCH ID CCW WILL USE THE RELOCATED 'CCHHR' FIELD 01692000
  1768. * INSTEAD OF THE 'CCHHR' FIELD WHICH WAS DYNAMICALLY READ IN, 01693000
  1769. * CAUSING ERRONEOUS RESULTS. TO AVOID THIS PROBLEM, THE 'R' 01694000
  1770. * BYTE OF 'CCHHR' SHOULD NOT BE DEFAULTED TO BINARY ZERO BY THE 01695000
  1771. * VIRTUAL MACHINE IF THE SEARCH ARGUMENTS ARE TO BE READ IN 01696000
  1772. * DYNAMICALLY AND A SEARCH ID ON "RECORD R0" IS NOT INTENDED. 01697000
  1773. * 01698000
  1774. * DASDX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 01699000
  1775. * FOR READ IPL (02), TRANSFORMS TO THE FOLLOWING: 01700000
  1776. * 1. INSERTS A SEEK TO REAL EQUIVALENT OF VIRTUAL CYLINDER ZERO 01701000
  1777. * 2. INSERTS A READ HOME ADDRESS (1A) WITH SKIP FLAG ON 01702000
  1778. * 3. THEN PUTS IN ORIGINAL READ IPL CCW BUT WITH OP CODE 01703000
  1779. * CHANGED TO READ (06). 01704000
  1780. * 4. FINALLY, HANDLES AS GENERAL CASE "READ" 01705000
  1781. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01706000
  1782. * 01707000
  1783. * IF > 02, HANDLES AS GENERAL CASE "READ" 01708000
  1784. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01709000
  1785. * 01710000
  1786. * DASDX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 01711000
  1787. * FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 01712000
  1788. * 01713000
  1789. * FOR RECALIBRATE (13), HANDLES SAME AS RESTORE (17) 01714000
  1790. * (SEE DESCRIPTION BELOW AT "DASD1317") 01715000
  1791. * 01716000
  1792. * IF > 13, INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL 01717000
  1793. * CYLINDER AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD 01718000
  1794. * A SEEK YET. 01719000
  1795. * 01720000
  1796. * FOR DIAG WRITE (73) HANDLES AS A GENERAL CASE DASD WRITE 01721000
  1797. * (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01722000
  1798. * 01723000
  1799. * OTHERS (E.G. SET SECTOR = 23 OR DIAG LOAD = 53) 01724000
  1800. * HANDLED AS GENERAL CASE OF DATA TRANSFER 01725000
  1801. * 01726000
  1802. * DASDX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 01727000
  1803. * FOR SENSE (04) OR EQUIVALENT, STORES SENSE BYTES FROM VIRTUAL 01728000
  1804. * DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK 01729000
  1805. * (NOTE: FOR 3330/40/50/80, CYLINDER NUMBER IN SENSE HRC011DK 01730490
  1806. * BYTES IS UN-RELOCATED TO FORM VIRTUAL CYLINDER HRC011DK 01730980
  1807. * NUMBER); HRC011DK 01731470
  1808. * IF NO VIRTUAL SENSE BYTES ARE AVAILABLE, HANDLES THE SAME AS 01732000
  1809. * READ HOME ADDRESS OR READ RECORD R0 (SEE "CCWRHARZ" BELOW) 01733000
  1810. * FOR 3330/40/50/80 ONLY, WITH A NONZERO RELOCATION HRC011DK 01734590
  1811. * FACTOR. OTHERWISE, HANDLED AS GENERAL CASE "READ" HRC011DK 01735180
  1812. * FOR MINIDISKS HAVEING THE VIRTUAL RESERVE/RELEASE FEATURE, 01736000
  1813. * IF A X'B4' (RESERVE) COMMAND CODE IS ENCOUNTERED, SET A 01737000
  1814. * FLAG TO REMEMBER THAT THE CCW CHAIN CONTAINS A RESERVE. 01738000
  1815. * IF A X'94' (RELEASE) COMMAND CODE IS ENCOUNTERED, SET A 01739000
  1816. * FLAG TO REMEMBER THAT THE CCW CHAIN CONTAINS A RELEASE. 01740000
  1817. * THESE RESERVE/RELEASE FLAGS ARE INTERROGATED JUST PRIOR 01741000
  1818. * TO EXIT FROM DMKCCW. 01742000
  1819. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01743000
  1820. * 01744000
  1821. * IF NOT SENSE (04) OR EQUIVALENT, CHECKS FOR "BUFFER UNLOAD" 01745000
  1822. * (24 ON 2305 OR A4 ON 3330/40/50/80); IF FOUND,CALLS HRC011DK 01746290
  1823. * DMKDSBSD HRC011DK 01746580
  1824. * TO RECORD THE DASD ERROR COUNTS (UNLESS THE VIRTUAL MACHINE IS 01747000
  1825. * A "CLASS F" (I.E. "CE") USER). IN ANY EVENT, THE BUFFER 01748000
  1826. * UNLOAD IS THEN PROCESSED NORMALLY AS A READ TYPE CCW. 01749000
  1827. * THE ABOVE IS DONE IF THE DEVICE IS A 3800 PRINTER (CAME HERE 01750000
  1828. * VIA OTHRX4) AND THE CCW OP CODE IS 24 (BUFFER UNLOAD) 01751000
  1829. * EXCEPT THAT DMKRSESD IS CALLED TO DO THE WORK. 01752000
  1830. * 01753000
  1831. * ALL OTHER CCWS ENDING IN "4" ARE HANDLED AS GENERAL CASE READ 01754000
  1832. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01755000
  1833. * 01756000
  1834. * DASDX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 01757000
  1835. * INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01758000
  1836. * AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01759000
  1837. * 01760000
  1838. * WRITE DATA (05) HANDLED AS A GENERAL CASE DASD WRITE 01761000
  1839. * (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01762000
  1840. * 01763000
  1841. * FOR WRITE RECORD R0 (15), CHECKS DEVICE TYPE 01764000
  1842. * IF NOT 3330/3340/3350, HANDLES AS A GENERAL CASE DASD WRITE 01765000
  1843. * (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01766000
  1844. * 01767000
  1845. * FOR WRITE RECORD R0 (15) ON 3330/40/50/80, REPLACE OP HRC011DK 01768290
  1846. * CODE BY HRC011DK 01768580
  1847. * READ RECORD R0 (16) WITH THE SKIP FLAG ON, AND CHECKS TO SEE 01769000
  1848. * IF DASD DEVICE IS READ ONLY - IF YES FORCES AN INVALID CCW; 01770000
  1849. * IF OK, USES SUBSTITUTED CCW = READ RECORD R0 WITH SKIP FLAG ON 01771000
  1850. * 01772000
  1851. * IF > 15, TREATS AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 01773000
  1852. EJECT 01774000
  1853. * DASDX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 01775000
  1854. * INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01776000
  1855. * AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01777000
  1856. * 01778000
  1857. * IF SKIP FLAG IS ON, LEAVES CCW "AS IS" (NO DATA IS READ) 01779000
  1858. * 01780000
  1859. * IF OP CODE IS READ RECORD R0 (16 OR 96), HANDLES AS A GENERAL 01781000
  1860. * CASE READ IF THE DEVICE IS NOT A 3330/40/50/80; FOR HRC011DK 01782490
  1861. * THESE DEVICES ARE PROCESSED AS DESCRIBED BELOW AT HRC011DK 01782980
  1862. * "CCWRHARZ". HRC011DK 01783470
  1863. * 01784000
  1864. * IF NOT A READ RECORD R0, HANDLES AS A GENERAL CASE READ 01785000
  1865. * IF ISAM CHECKING IS NOT WANTED. BUT IF ISAM CHECKING IS 01786000
  1866. * WANTED, CHECKS TO SEE IF ALL OF THESE CONDITIONS ARE MET: 01787000
  1867. * BYTE-COUNT = 10 01788000
  1868. * COMMAND-CHAIN FLAG IS SET 01789000
  1869. * OP-CODE IS 06 01790000
  1870. * VIRTUAL ADDRESS IS 7-BYTE ALIGNED (LAST 3 BITS ARE ONES) 01791000
  1871. * IF YES (ALL CRITERIA MET), FLAGS AS AN ISAM READ, AND 01792000
  1872. * REMEMBERS THAT AN ISAM READ OCCURRED; IF NOT, TREATS AS A 01793000
  1873. * GENERAL CASE READ (WITH STORAGE PROTECTION CHECK, AS USUAL). 01794000
  1874. * 01795000
  1875. * DASDX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 01796000
  1876. * FOR SEEK (07), HANDLES AS DESCRIBED BELOW AT "DASDSEEK". 01797000
  1877. * 01798000
  1878. * IF > 17, HANDLES AS AN INVALID CCW (EXCEPT FOR POSSIBLE 01799000
  1879. * SPECIAL HANDLING OF THE LETTER 'P' = X'D7'; SEE "SPECIAL 01800000
  1880. * TRANSFORMATION FOR ISAM HANDLING" BELOW). 01801000
  1881. * 01802000
  1882. * IF = RESTORE (17) ... 01803000
  1883. * "DASD1317" - HANDLE RESTORE (17) OR RECALIBRATE (13): 01804000
  1884. * TENTATIVELY SETS "IOBCYL" FIELD (IN IOBLOK) TO VALUE OF 01805000
  1885. * CYLINDER RELOCATION FACTOR (FOR USE BY DMKIOS). 01806000
  1886. * 01807000
  1887. * CLEARS VIRTUAL CYLINDER AND HEAD POSITION AND 01808000
  1888. * SETS FLAG TO INDICATE THAT "A SEEK IS NEEDED". 01809000
  1889. * 01810000
  1890. * IF COMMAND-CHAIN AND SILI FLAG ARE BOTH SET IN THE CCW, 01811000
  1891. * TREATS AS AN IRRELEVANT-ADDRESS CCW, AND GETS THE NEXT VIRTUAL 01812000
  1892. * CCW. (A SEEK TO THE REAL EQUIVALENT OF THE VIRTUAL CYLINDER 01813000
  1893. * ZERO WILL AUTOMATICALLY BE INSERTED AT THIS POINT.) 01814000
  1894. * 01815000
  1895. * IF "CC" AND SILI ARE NOT BOTH SET (THE CHANNEL PROGRAM WILL 01816000
  1896. * TERMINATE IN THIS CASE), CLEARS "IOBCYL" FIELD (IN IOBLOK) 01817000
  1897. * FOR USE BY DMKIOS, AND TREATS AS AN IRRELEVANT-ADDRESS CCW. 01818000
  1898. * 01819000
  1899. * DASDX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 01820000
  1900. * INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01821000
  1901. * AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01822000
  1902. * 01823000
  1903. * IF < 19, HANDLES AS AN INVALID CCW. 01824000
  1904. * 01825000
  1905. * FOR WRITE HOME ADDRESS (19), FORCES AN INVALID CCW 01826000
  1906. * IF THE DASD DEVICE IS READ ONLY. IF OK, CHECKS THE DEVICE 01827000
  1907. * TYPE; IF NOT 33XX, RELOCATES THE HOME ADDRESS FIELD HRC011DK 01828490
  1908. * TO CP CONTROL WORDS, ADDING THE CYLINDER RELOCATION FACTOR TO 01829000
  1909. * THE VIRTUAL CYL. NUMBER. FOR 33XX, HOWEVER, REPLACES HRC011DK 01830490
  1910. * THE WRITE HOME ADDRESS CCW BY A READ HOME ADDRESS OP CODE (1A) 01831000
  1911. * WITH THE SKIP FLAG SET. 01832000
  1912. * 01833000
  1913. * IF > 19, TREATS AS A "STATUS MODIFIER" TYPE OF DATA TRANSFER, 01834000
  1914. * AND CHECKS FOR SEARCH HOME ADDRESS EQUAL (39 OR B9); IF NOT 01835000
  1915. * 39 OR B9, HANDLES NORMALLY. IF = 39 OR B9, HANDLES NORMALLY 01836000
  1916. * IF THE RELOCATION FACTOR = 0, BUT OTHERWISE RELOCATES THE 01837000
  1917. * SEARCH ARGUMENTS TO CP CONTROL WORDS, ADDING THE CYLINDER 01838000
  1918. * RELOCATION FACTOR TO THE VIRTUAL CYLINDER NUMBER. 01839000
  1919. * 01840000
  1920. * DASDXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 01841000
  1921. * CHECKS FOR READ HOME ADDRESS CCW (1A OR 9A); 01842000
  1922. * HANDLES AS INVALID CCW IF NOT 1A OR 9A. 01843000
  1923. * 01844000
  1924. * INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01845000
  1925. * AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01846000
  1926. * 01847000
  1927. * IF BYTE COUNT = 1, OR SKIP FLAG IS SET, HANDLES NORMALLY 01848000
  1928. * 01849000
  1929. * OTHERWISE, ... 01850000
  1930. * "CCWRHARZ" - HANDLE READ HOME ADDRESS OR READ RECORD R0: 01851000
  1931. * CHECKS CYLINDER RELOCATION FACTOR; IF = 0, HANDLES NORMALLY. 01852000
  1932. * 01853000
  1933. * IF PREVIOUS CCW WAS DATA-CHAINED, HANDLES NORMALLY. 01854000
  1934. * 01855000
  1935. * OTHERWISE, OBTAINS 8 BYTES (OR LESS) FROM THE REAL STORAGE 01856000
  1936. * CORRESPONDING TO THE VIRTUAL ADDRESS IN THE READ HOME ADDRESS 01857000
  1937. * OR READ RECORD R0 CCW, REMEMBERING THE 8 BYTES IN CP CONTROL 01858000
  1938. * WORDS; A FLAG IS SET IN THE CCW TO SIGNAL CP'S UN-TRANSLATOR 01859000
  1939. * (DMKUNTFR) TO UN-RELOCATE THE CYLINDER NUMBER WHEN THE CHANNEL 01860000
  1940. * PROGRAM HAS COMPLETED, AND AN INDIRECT DATA ADDRESS LIST 01861000
  1941. * (IDAL) IS CREATED FOR THE DATA TRANSFER, TO FACILITATE THE 01862000
  1942. * LOCATION OF THE 8 BYTES WHICH WERE SAVED IN THE CP CONTROL 01863000
  1943. * WORDS (WHICH WILL BE IMMEDIATELY AFTER THE IDAL). (DMKUNTFR 01864000
  1944. * CHECKS TO SEE IF THE DATA HAS CHANGED BEFORE UN-RELOCATING 01865000
  1945. * THE CYLINDER NUMBER, TO AVOID ERRONEOUS DATA-REVISION IN THE 01866000
  1946. * CASE WHERE THE CHANNEL PROGRAM DID NOT ACTUALLY PERFORM THE 01867000
  1947. * READ HOME ADDRESS OR READ RECORD R0 CCW.) 01868000
  1948. * 01869000
  1949. * DASDXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 01870000
  1950. * FOR SEEK CYLINDER (0B), HANDLE AS DESCRIBED BELOW 01871000
  1951. * AT "DASDSEEK". 01872000
  1952. * 01873000
  1953. * FOR SEEK HEAD (1B), INSERTS A SEEK (TO REAL EQUIVALENT OF 01874000
  1954. * CURRENT VIRTUAL CYLINDER AND HEAD POSITION) IF CHANNEL PROGRAM 01875000
  1955. * HAS NOT HAD A SEEK YET, THEN HANDLE AT "DASDSEEK". 01876000
  1956. * 01877000
  1957. * IF > 1B (E.G. ORIENT = 2B), HANDLES CCW "AS IS" 01878000
  1958. * (ADDRESS IN CCW IS IRRELEVANT). 01879000
  1959. EJECT 01880000
  1960. * "DASDSEEK" - HANDLE SEEK <CYLINDER | HEAD> CCW: 01881000
  1961. * RELOCATES THE SEEK ARGUMENTS TO CP CONTROL WORDS 01882000
  1962. * 01883000
  1963. * CHECKS IF SEEK CCW IS COMMAND- OR DATA-CHAINED; 01884000
  1964. * IF NEITHER, SETS FLAG IN VIRTUAL DEVICE BLOCK 01885000
  1965. * (FOR DMKIOS) TO SIGNAL A STAND-ALONE SEEK. 01886000
  1966. * 01887000
  1967. * RESETS "SEEK IS NEEDED" FLAG; RELOCATES CYLINDER NUMBER BY 01888000
  1968. * ADDING CYLINDER RELOCATION FACTOR, AND (IF VALID) STORES AT 01889000
  1969. * "IOBCYL" (IN IOBLOK) FOR USE BY DMKIOS. FINALLY, IF CYLINDER 01890000
  1970. * RELOCATION FACTOR = 0 (AND BBCCHH FIELD WAS VALID), DOES NOT 01891000
  1971. * USE RELOCATED SEEK ARGUMENTS (IN CP CONTROL WORDS) AFTER ALL, 01892000
  1972. * BUT HANDLES AS GENERAL CASE OF DATA TRANSFER (A NECESSARY EVIL 01893000
  1973. * FOR CORRECT HANDLING OF ISAM AND SOME OTHER CHANNEL PROGRAMS). 01894000
  1974. * 01895000
  1975. * DASDXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 01896000
  1976. * HANDLED AS AN INVALID CCW 01897000
  1977. * 01898000
  1978. * DASDXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 01899000
  1979. * INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01900000
  1980. * AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01901000
  1981. * 01902000
  1982. * WRITE KEY AND DATA (0D) OR WRITE COUNT KEY AND DATA (1D) 01903000
  1983. * ARE HANDLED AS A GENERAL CASE DASD WRITE 01904000
  1984. * (FORCES AN INVALID CCW IF DASD DEVICE IS READ ONLY) 01905000
  1985. * 01906000
  1986. * ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 01907000
  1987. * 01908000
  1988. * DASDXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 01909000
  1989. * INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01910000
  1990. * AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01911000
  1991. * 01912000
  1992. * THEN HANDLES AS GENERAL CASE "READ" 01913000
  1993. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 01914000
  1994. * 01915000
  1995. * DASDXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 01916000
  1996. * INSERTS A SEEK (TO REAL EQUIVALENT OF CURRENT VIRTUAL CYLINDER 01917000
  1997. * AND HEAD POSITION) IF CHANNEL PROGRAM HAS NOT HAD A SEEK YET. 01918000
  1998. * 01919000
  1999. * FOR SPACE COUNT (0F), LIMITS BYTE COUNT TO 3 (IF IT 01920000
  2000. * WAS > 3) AND TREATS AS GENERAL CASE OF DATA TRANSFER. 01921000
  2001. * 01922000
  2002. * FOR SET FILE MASK (1F), LIMITS BYTE COUNT TO 1 01923000
  2003. * AND TREATS AS GENERAL CASE OF DATA TRANSFER. 01924000
  2004. * 01925000
  2005. * IF > 1F, HANDLES AS AN INVALID CCW. 01926000
  2006. EJECT 01927000
  2007. * SPECIAL TRANSFORMATION FOR ISAM HANDLING: 01928000
  2008. * IF ISAM IS SUPPORTED FOR THE SYSTEM AND THE VIRTUAL MACHINE, 01929000
  2009. * AND THERE HAS BEEN AN ISAM READ IN THE CHANNEL PROGRAM, THEN 01930000
  2010. * AN OP CODE OF BINARY ZERO (X'00') OR THE LETTER 'P' (X'D7') 01931000
  2011. * (WHICH WOULD NORMALLY BE AN INVALID CCW) IS TREATED AS VALID 01932000
  2012. * WITH THE OP CODE BEING REPLACED BY A 'SEEK HEAD' (X'1B'). 01933000
  2013. * 01934000
  2014. * THIS TRANSFORMATION IS NECESSARY FOR EITHER NON-DEDICATED OR 01935000
  2015. * DEDICATED DASD DEVICES. 01936000
  2016. *. 01937000
  2017. SPACE 2 01938000
  2018. * HANDLE THE VARIOUS COMMANDS FOR NON-DEDICATED DASD DEVICES: 01939000
  2019. USING VDEVBLOK,R8 (IN EFFECT FROM MAIN CODE AT "CCWNEXT") 01940000
  2020. SPACE 01941000
  2021. DASDX1 DS 0H 01 - 11 - 31/B1 - 51/D1 - 71/F1 01942000
  2022. BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 01943000
  2023. CLI VIRCOMND,X'11' IS IT = 01, OR 11 (ERASE TRACK) ? 01944000
  2024. BNH DASDWRIT IF YES, TREAT AS GENERAL CASE WRITE 01945000
  2025. * 01946000
  2026. * HANDLE ALL "SEARCH ID COMMANDS" 01947000
  2027. TM VIRCOMND,X'10' CHECK X'10' BIT - ON FOR ALL SRCH ID'S 01948000
  2028. BZ CCWINVLD INVALID IF NOT A "1". 01949000
  2029. OI VIRFLAG,SMCOM OK, INDICATE STATUS-MODIFIER-TYPE COMMAND 01950000
  2030. TM VDEVTYPE,TYP3330+TYP3340+TYP3350+TYP3380 HRC011DK 01951590
  2031. * SPECIAL R0 RECORD PROCESSING 3330/3340/3350/3380 HRC011DK 01952180
  2032. BCR 8,R2 "BZ CCWGENRL" IF NOT, NO PROBLEM. 01953000
  2033. LH R15,VDEVRELN CHECK RELOCATION FACTOR 01954000
  2034. LTR R15,R15 IS IT ZERO ? 01955000
  2035. BCR 8,R2 <BZ> "BZ CCWGENRL" IF YES - TREAT AS GEN CASE 01956000
  2036. CL R4,F4 CHECK "BYTE-COUNT LESS 1" (STILL IN R4) 01957000
  2037. BCR 4,R2 "BL CCWGENRL" IF BYTE-COUNT WAS < 5 01958000
  2038. TM RCWFLAG,IDA HOPEFULLY IDA ISN'T SET @V2A2029 01959000
  2039. BZ SRCHID3 TRF IF NOT - CHECK THE BYTE NOW. 01960000
  2040. BAL R10,CNTRLSUB GO GET THE CONTROL INFORMATION. 01961000
  2041. CLI 4(R7),00 IS IT RECORD R0 ? 01962000
  2042. BH SRCHID5 IF NOT, DON'T RELOCATE IT. 01963000
  2043. SRCHID1 LH R15,0(,R7) RELOCATE CYLINDER NUMBER 01964000
  2044. CH R15,VDEVBND IS VIRTUAL CC ABOVE MINIDISK? @V56BDA8 01965000
  2045. BH SRCHID2 YES, INVALID OR ALTERNATE TRACK @V56BDA8 01966000
  2046. AH R15,VDEVRELN (CC OF CCHHR ONLY) 01967000
  2047. STH R15,0(,R7) ... 01968000
  2048. * 01969000
  2049. SRCHID2 STCM R7,7,RCWADDR+1 STORE R7 IN ADDRESS BYTES OF COMMAND 01970000
  2050. OI RCWCTL,RCWREL INDICATE ADDRESS CAN BE RELOCATED 01971000
  2051. NI RCWFLAG,255-IDA REAL IDA FLAG MUST NOT BE SET 01972000
  2052. B CCWNXT11 WE'RE ALL DONE HERE. 01973000
  2053. * 01974000
  2054. SRCHID3 LA R1,4(,R3) CHECK 5TH BYTE = "R" OF CCHHR 01975000
  2055. TRANBRNG DMKCCWB8,RETURN=BRING8 ... %V3M4038 01976000
  2056. BNZ CCWBAD BEWARE OF INVALID VIRTUAL ADDR. %V3M4038 01977000
  2057. BRING8 LA R1,0(,R3) RESTORE R1 TO ITS USUAL VALUE @V386198 01978000
  2058. CLI 0(R2),00 IS IT RECORD R0 ? 01979000
  2059. BH CCWGENRL IF NOT RECORD R0, HANDLE AS GENERAL CASE 01980000
  2060. BAL R10,CNTRLSUB GET THE CONTROL BYTES, 01981000
  2061. B SRCHID1 NOW GO RELOCATE THE CYLINDER NUMBER. 01982000
  2062. * 01983000
  2063. SRCHID5 MVC 0(8,R7),ZEROES CLEAR CONTROL WORD AREA WE WON'T BE USING 01984000
  2064. LA R7,8(,R7) AND BUMP R7 UP BY 8 AGAIN. 01985000
  2065. * 01986000
  2066. SRCHID5A LA R14,CCWGENRL SET R14 TO "RETURN" TO CCWGENRL 01987000
  2067. * AND ... 01988000
  2068. CCWRES14 DS 0H SUBROUTINE TO RESTORE R3-R4 & R1 TO USUAL VALUES: 01989000
  2069. LM R3,R4,RCWCCW RESTORE R3-R4 01990000
  2070. N R4,XRIGHT16 ... 01991000
  2071. BCTR R4,0 ... 01992000
  2072. LA R1,0(,R3) ALSO R1 01993000
  2073. BR R14 AND "RETURN TO CALLER". 01994000
  2074. SPACE 1 01995000
  2075. DASDX2 DS 0H 02 - 12/92 - 22 01996000
  2076. CLI VIRCOMND,X'02' IS IT 02 OR MORE ? 01997000
  2077. BH CHEKREAD IF > 02, TREAT AS GENERAL CASE DASD. 01998000
  2078. * PERFORM NECESSARY SIMULATIONS FOR 02 = READ IPL: 01999000
  2079. XROOM 32 MUST BE ROOM FOR 3 COMMANDS + SEEK ARGS 02000000
  2080. MVI RCWCOMND,X'06' MAKE THE OP-CODE AN 06 = READ, AND SAVE 02001000
  2081. MVC RCWCCW+16,RCWCCW ALTERED COMMAND TO 16 BYTES LATER 02002000
  2082. L R10,SAVER10 ACCESS IOBLOK, 02003000
  2083. USING IOBLOK,R10 ... 02004000
  2084. MVC IOBCYL(2),VDEVRELN LET IOBCYL POINT TO USER'S 1ST CYL 02005000
  2085. DROP R10 02006000
  2086. SLR R0,R0 CLEAR 02007000
  2087. ST R0,VDEVPOSN USER'S DISK POSITION 02008000
  2088. BAL R10,CCWPUTSK PUT IN A SEEK RIGHT HERE 02009000
  2089. MVC RCWCCW(8),DUMRDIPL NOW PUT IN DUMMY CCW AS NEEDED, 02010000
  2090. LA R6,8(,R6) NOW ADVANCE TO WHERE WE PUT THE READ 02011000
  2091. BAL R14,CCWRES14 RESTORE R3-R4 AND R1, AND 02012000
  2092. * NOTE: R2 IS STILL INTACT = A(CCWGENRL) 02013000
  2093. MVI VIRCOMND,X'06' SET VIRTUAL CCW = 06 IN CASE DATA-CHAINED 02014000
  2094. B READSKIP GO CHECK FOR SKIP FLAG ON, ETC. 02015000
  2095. SPACE 1 02016000
  2096. DASDX3 DS 0H 03 - 13 - 23 - 53 - 73 02017000
  2097. CLI VIRCOMND,X'13' CHECK FOR 03 OR 13 02018000
  2098. BL HNDLNOOP IF < 13 (MUST BE 03), USE 0 ADDRESS ETC. 02019000
  2099. BE DASD1317 IF = 13 (RECALIBRATE), GO HANDLE THAT. 02020000
  2100. * HANDLE 23 (SET SECTOR), 53 (DIAG LOAD) OR 73 (DIAG WRITE): 02021000
  2101. BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02022000
  2102. TM VIRCOMND,X'70' IS IT '73' = DIAG WRITE ? 02023000
  2103. BO DASDWRIT TRF IF YES. 02024000
  2104. CLI VIRCOMND,X'53' IS IT A DIAG LOAD 02025000
  2105. BE DASDWRIT YES-- 02026000
  2106. BR R2 IT MUST BE X'23'--SET SECTOR 02027000
  2107. * THEREFORE GO TO 'CCWGENRL' 02028000
  2108. SPACE 1 02029000
  2109. DASDX4 DS 0H 04 - 24 - 44 - 94 - A4 - B4 02030000
  2110. LA R14,CONT1 RETURN ADDR IN R14 02031000
  2111. TM MEMO2,PRECCW IS THERE AN MSS PREFIX @VA13204 02032000
  2112. BZ DASDX4OK NO @VA13204 02033000
  2113. LA R0,ZEROES POINT TO CCHH = 0 @VA13204 02034000
  2114. L R15,FIRSTRCW FIRST RCWTASK ADDRESS @VA13204 02035000
  2115. LA R15,RCWHSIZ(R15) BUMP OVER HEADER @VA13204 02036000
  2116. STCM R0,7,1(R15) SET SEEK ARG PTR @VA13204 02037000
  2117. NI MEMO2,FULL-PRECCW SEEK ARG NOW SET @VA13204 02038000
  2118. DASDX4OK EQU * @VA13204 02039000
  2119. CLI VIRCOMND,X'44' CHECK TO SEE OF A READ DIAGNOSE 02040000
  2120. * STATUS 1 WAS ISSUED 02041000
  2121. BE CLASSCHK 02042000
  2122. CONT1 EQU * 02043000
  2123. CLI VIRCOMND,X'04' IS IT A "SENSE" OR SOMETHING ELSE ? 02044000
  2124. BE HNDLSENS TRF IF REAL SENSE (04). 02045000
  2125. TM VDEVTYPC,CLASURO COULD THIS BE A 3800? @V60B9BA 02046000
  2126. BZ CONT1A XFER IF NOT @V60B9BA 02047000
  2127. CLI VDEVTYPE,TYP3800 IS IT REALLY A 3800? @V60B9BA 02048000
  2128. BNE READSKIP XFER IF NOT @V60B9BA 02049000
  2129. CLI VIRCOMND,X'24' IS IT THE UNLOAD ERROR LOG? @V60B9BA 02050000
  2130. BNE READSKIP XFER IF NOT @V60B9BA 02051000
  2131. B DASDCKBU GO DO THE UNLOAD ERROR LOG @V60B9BA 02052000
  2132. CONT1A TM VDEVTYPC,CLASDASD+CLASTAPE IS THIS DASD OR TAPE?@V60B9BA 02053000
  2133. BZ READSKIP NOPE, BR. @V407438 02054000
  2134. TM VIRCOMND,X'94' DASD OR TAPE RESERVE OR RELEASE? @V407438 02055000
  2135. BNO DASDCKBU NOPE, BR. @V407438 02056000
  2136. * WE NOW KNOW THAT THE DEVICE TYPE IS DASD OR TAPE, AND THAT 02057000
  2137. * THE COMMAND IS A 94, B4 (DASD REL/RES) OR D4, OR F4 (TAPE REL/RES) 02058000
  2138. MVC RCWCTL(1),CCWCTL RES/REL, MAKE SURE FLAG IS SET @V407438 02059000
  2139. TM VIRCOMND,X'20' IS IT RLSE? (CHK RLSE BIT IN CCW) 02060000
  2140. BZ CKRLSE YA, NOT AFFECTED BY ALT PATH 02061000
  2141. L R15,VDEVREAL GET ADDRESS OF THE RDEVBLOK @V407438 02062000
  2142. USING RDEVBLOK,R15 ADDRESS THE RDEVBLOK @V407438 02063000
  2143. SLR R0,R0 FOR COMPARE @V407438 02064000
  2144. CL R0,RDEVCUB ALT CU DEFINED? @V407438 02065000
  2145. BNE ALTPATH YES, ALT PATH EXISTS, BR. @V407438 02066000
  2146. L R15,RDEVCUA GET THE RCUBLOK ADDRESS @V407438 02067000
  2147. DROP R15 @V407438 02068000
  2148. USING RCUBLOK,R15 ADDRESS THE RCUBLOK @V407438 02069000
  2149. TM RCUTYPE,RCUSUB IS THIS A SUBORDINATE CTL UNIT? @V407438 02070000
  2150. BZ *+8 NOPE, BR. @V407438 02071000
  2151. L R15,RCUPRIME ADDRESS THE PRIME THEN... @V407438 02072000
  2152. CL R0,RCUCHB ANY ALTERNATE CHANNEL DEFINED? @V407438 02073000
  2153. BNE ALTPATH YES, BR. MUST CHANGE TO SENSE @V407438 02074000
  2154. DROP R15 NO MORE RCUBLOK @V407438 02075000
  2155. CKRLSE TM VDEVFLAG,VDEVRSRL WILL RES/REL WORK ON DEVICE? @V407438 02076000
  2156. BO CKDEDDEV YES, GO CHECK FOR DEDICATED @V407438 02077000
  2157. TM VDEVFLG2,VDEVRRF WONT WORK ON REAL, WANT VIRT? @V407438 02078000
  2158. BZ CKDEDDEV NOPE, BR. @V407438 02079000
  2159. SPACE 02080000
  2160. * HERE WHEN EITHER 1) THERE ARE ALTERNATE PATHS TO THE DEVICE 02081000
  2161. * (IN WHICH CASE WE CANNOT LET A REAL RESERVE OR RELEASE WORK DUE 02082000
  2162. * TO POSSABILITY OF "LOCKOUT") OR 2) THE USER WANTS VIRT RES / REL 02083000
  2163. * FOR THE MINIDISK AND THE REAL DEVICE WILL NOT ACCEPT A RES / REL 02084000
  2164. * (IN WHICH CASE WE MUST GUARANTEE THAT IT WILL WORK BY CHANGING 02085000
  2165. * IT TO A SENSE. 02086000
  2166. SPACE 02087000
  2167. ALTPATH MVI RCWCOMND,X'04' CHANGE REAL CCW TO SENSE @V407438 02088000
  2168. CKDEDDEV TM VDEVSTAT,VDEVDED IS THE DEVICE DEDICATED? @V407438 02089000
  2169. BO HNDLSENS YES, BR. @V407438 02090000
  2170. * NOT DEDICATED, THEREFORE IT MUST BE MINIDISK 02091000
  2171. TM VDEVFLG2,VDEVRRF MDISK WITH RES/REL FEATURE? @V407438 02092000
  2172. BZ HNDLSENS NOPE, NO VIRT RES/REL TODAY @V407438 02093000
  2173. CLI VIRCOMND,X'94' IS THIS A DASD RELEASE? @V407438 02094000
  2174. BE DASD94 YES, BR. @V407438 02095000
  2175. CLI VIRCOMND,X'B4' DASD RESERVE? @V407438 02096000
  2176. BNE HNDLSENS NOPE, HANDLE LIKE A SENSE, BR. @V407438 02097000
  2177. OI MEMO3,RESINCHA INDICATE THAT WE HAVE SEEN A RESV@V407438 02098000
  2178. B HNDLSENS ... AND CONTINUE @V407438 02099000
  2179. SPACE 02100000
  2180. DASD94 L R10,SAVER10 GET THE IOB POINTER @V407438 02101000
  2181. USING IOBLOK,R10 ADDRESS THE IOB @V407438 02102000
  2182. OI IOBSPEC2,IOBUNREL FLAG RELEASE FOR DMKUNTFR @V407438 02103000
  2183. SPACE 02104000
  2184. DROP R10 NO MORE IOBLOK @V407438 02105000
  2185. * 02106000
  2186. * HANDLE "SENSE" (04), "RELEASE" (94), OR "RESERVE" (B4): 02107000
  2187. HNDLSENS TM RCWFLAG,SKIP IS SKIP FLAG SET IN SENSE TYPE COMMAND ? 02108000
  2188. BO HNDLNOOP YES, USE 0 ADDR, DON'T CLEAR SENSE BYTES 02109000
  2189. IC R15,CCWCTL SET CP CONTROL BYTE (FOR HANDLING SENSE 02110000
  2190. STC R15,RCWCTL TYPE COMMAND ON 3330/40/50/80 HRC011DK 02111490
  2191. * 2305 OR PSEUDO 2311 02112000
  2192. TM VDEVFLAG,VDEVUC ARE VIRTUAL DEVICE BYTES PRESENT ? 02113000
  2193. BO HNDLXSEN IF YES, USE EXISTING SENSE DATA 02114000
  2194. CLI RCWCTL,00 NO, WILL THE SENSE BYTES NEED ADJUSTING ? 02115000
  2195. BCR 8,R2 "BZ CCWGENRL" IF NOT - REALLY DO THE SENSE 02116000
  2196. CLI RCWCTL,RCW2311 SIMULATED 2311 ? 02117000
  2197. BE CCWSENJN YES - DMKUNTFR MUST ADJUST SENSE BYTES 02118000
  2198. LH R15,VDEVRELN CHECK RELOCATION FACTOR 02119000
  2199. LTR R15,R15 IS IT ZERO ? 02120000
  2200. BNZ CCWSENJN NONZERO - SET UP FOR DMKUNTFR ETC. 02121000
  2201. * 02122000
  2202. NOUNREL NI RCWCTL,255-(RCWHMR+RCW2311) DON'T PLAY DMKUNTFR GAMES 02123000
  2203. B CCWGENRL AFTER ALL - TREAT AS GENERAL CASE INSTEAD 02124000
  2204. * 02125000
  2205. HNDLXSEN DS 0H HANDLE EXISTING SENSE BYTES: 02126000
  2206. OI MEMO3,XFERSENS SENSE DATA MOVED TO VIRT STG. @V407438 02127000
  2207. L R2,VDEVIOER POINT TO IO ERROR BLOCK 02128000
  2208. CLI CCWCTL,00 DO WE HAVE TO MANIPULATE THE SENSE BYTES? 02129000
  2209. BE PUTSENS NOPE (NOT 3330 OR FAKE 2311). 02130000
  2210. CALL DMKUNTRS YES - RELOCATE THE SENSE BYTE INFORMATION 02131000
  2211. PUTSENS DS 0H PUT AVAILABLE SENSE BYTES IN USER CORE: 02132000
  2212. USING IOERBLOK,R2 02133000
  2213. LH R14,IOERLEN GET LENGTH OF SENSE BYTES 02134000
  2214. LTR R14,R14 NO SENSE: DID NOT START @VA10398 02134010
  2215. BZ ZEROLNG @VA10398 02134020
  2216. BCTR R14,0 LESS 1 02135000
  2217. ZEROLNG DS 0H @VA10398 02135010
  2218. CLR R14,R4 SEE WHICH COUNT IS LESS 02136000
  2219. BNL SENSR4OK OK IF R4 WAS LESS OR EQUAL 02137000
  2220. LR R4,R14 USE R14 COUNT IF IT WAS LESS 02138000
  2221. DROP R8 02139000
  2222. SENSR4OK LA R8,IOERDATA NOW POINT TO THE SENSE DATA 02140000
  2223. DROP R2 02141000
  2224. TM PRVFLAG,CD PREVIOUS SENSE DATA CHAINED ? @VA03389 02142000
  2225. BZ *+8 NO..CONTINUE... @VA03389 02143000
  2226. SLR R14,R4 ADJUST SENSE BYTES @VA03389 02144000
  2227. ALR R8,R14 .... @VA03389 02145000
  2228. BAL R10,CNTRLSBW PUT THE SENSE-BYTES IN THE USER'S CORE 02146000
  2229. USING VDEVBLOK,R8 02147000
  2230. NI RCWFLAG,255-IDA ENSURE IDA FLAG NOT SET 02148000
  2231. OI RCWFLAG,SKIP AND NO TRANSMIT OF DATA, PLEASE 02149000
  2232. * LEAVE VIRT. ADDRESS (AS IS) IN THE CCW, & 02150000
  2233. * FINISH UP (NO CHECK FOR PROT. VIOL.) 02151000
  2234. L R8,SAVER8 RESTORE ADDRESS OF VDEVBLOK @VA08629 02151050
  2235. AL R8,VMDVSTRT GET TO RIGHT ONE @VA08629 02151075
  2236. CLI VDEVTYPC,CLASGRAF LOOKING FOR 2250/3250 FOR @VA08629 02151100
  2237. BNE HNDLNOOP SPECIAL PROCESSING @VA08629 02151125
  2238. TM VDEVTYPE,TYP2250 ... @VA08629 02151150
  2239. BZ HNDLNOOP NOT FOUND @VA08629 02151175
  2240. TM VIRFLAG,CC+CD LOOKING FOR STANDALONE SENSE @VA08629 02151200
  2241. BNZ HNDLNOOP NOT STANDALONE @VA08629 02151225
  2242. L R10,FIRSTRCW MAKE SURE THIS WAS FIRST @VA08629 02151250
  2243. CL R10,THISRCW COMMAND IN THE CHAIN @VA08629 02151275
  2244. BNE HNDLNOOP NO, FORGET IT @VA08629 02151300
  2245. LA R10,RCWHSIZ(,R10) POINT TO REAL SENSE @VA08629 02151325
  2246. CLR R10,R6 IS SENSE FIRST COMMAND @VA08629 02151350
  2247. BNE HNDLNOOP NO, FORGET IT @VA08629 02151375
  2248. USING IOBLOK,R10 ... @VA08629 02151400
  2249. L R10,SAVER10 GET ADDRESS OF IOBLOK @VA08629 02151425
  2250. OI IOBSPEC3,IOBSENSE TURN ON SPECIAL BIT FOR VSI @VA08629 02151450
  2251. L R1,VDEVIOER ADDRESS OF IOERBLOK @VA08629 02151475
  2252. USING IOERBLOK,R1 ADDRESSABILITY @VA08629 02151500
  2253. LH R1,IOERLEN NO. CP SENSE BYTES @VA08629 02151525
  2254. LH R14,RCWCCW+6 SENSE LENGTH SPECIFIED IN CCW @VA08629 02151550
  2255. CLR R1,R14 SEE WHICH COUNT IS LESS @VA08629 02151575
  2256. BNL *+8 USE LOWER OF TWO @VA08629 02151600
  2257. STH R1,IOBCSW+6 SAVE TO CALCULATE RESIDUAL COUNT @VA08629 02151625
  2258. DROP R1 @VA08629 02151650
  2259. B ZEROADDR CONTINUE ALONG TRANSLATION @VA08629 02151675
  2260. HNDLNOOP EQU * 02152000
  2261. TM RCWFLAG,IDA IS IDA PRESENT? 02153000
  2262. BZ ZEROADDR NO, BR @VA05221 02154000
  2263. OI VIRFLAG,SVSEN YES - SET TO SAVE SENS DATA 02155000
  2264. B CTLCMDID AND GO CHECK THE IDAL. 02156000
  2265. ZEROADDR SLR R15,R15 ZERO WORK REGISTER @VA05221 02157000
  2266. STCM R15,7,RCWADDR+1 ZERO DATA ADDRESS @VA05221 02158000
  2267. B CCWNXT10 CLEAR SENSE @VA06244 02159000
  2268. SPACE 2 02160000
  2269. DASDX5 DS 0H 05 - 15 - 25 - 35 - 45 - 55 - 65 - 75 ETC 02161000
  2270. BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02162000
  2271. CLI VIRCOMND,X'15' IS IT "WRITE RECORD R0" ? 02163000
  2272. BL DASDWRIT IF < 15, TREAT AS GENERAL CASE WRITE. 02164000
  2273. BH DASDSRCH IF > 15, TREAT AS GENERAL CASE "SEARCH". 02165000
  2274. * HANDLE "WRITE RECORD R0" 02166000
  2275. TM VDEVTYPE,TYP2311+TYP2314+TYP2305 VALID DEVICE TYPE 02167000
  2276. BNZ DASDWRIT IF YES (ANY OF THE ABOVE) GO AHEAD. 02168000
  2277. TM MEMO2,SKCECYL TEST FOR CE CYLINDER @V304498 02169000
  2278. BO DASDWRIT YES, PERMIT IT'S EXECUTION @V304498 02170000
  2279. * BUT FOR ANY OTHER (E.G. 3330/3340/3350/3380), HRC011DK 02171590
  2280. * READ ON NON-TRANSMIT, INSTEAD OF WRITING: HRC011DK 02172180
  2281. MVI RCWCOMND,X'16' SUBSTITUTE "READ RECORD R0" 02173000
  2282. OI RCWFLAG,SKIP+SILI AND DON'T TRANSMIT ANY DATA @VA06304 02174000
  2283. TM VDEVFLAG,VDEVRDO IS THE DASD DEVICE "READ ONLY" ? 02175000
  2284. BZ CLEARADD IF NOT, CLEAR ADDRESS FIELD & FINISH UP. 02176000
  2285. CCWFORCE NI RCWFLAG,SKIP+SILI WRITE ON R/O DASD - KEEP THESE 2 BITS 02177000
  2286. OI RCWFLAG,X'03' BUT STILL FORCE A CHANNEL PROGRAM CHECK 02178000
  2287. B CCWBAD2 AND USE 00FFFFFF FOR THE 1ST WORD, ETC. 02179000
  2288. SPACE 1 02180000
  2289. DASDX6 DS 0H 06/86 - 16/96 02181000
  2290. BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02182000
  2291. TM RCWFLAG,SKIP WAS SKIP-FLAG SET ? 02183000
  2292. BO CLEARADD TRF IF YES - DON'T LOCK ANY PAGES. 02184000
  2293. TM VIRCOMND,X'10' IS IT A "READ RECORD R0" (16 OR 96) ? 02185000
  2294. BO DASDRDR0 TRF IF YES - GO HANDLE. 02186000
  2295. * 02187000
  2296. * IF READ (06/86), THAT'S SIMPLE UNLESS WE HAVE ISAM CHECKING: 02188000
  2297. DASDRD06 DS 0H 06 OR 86 FOR A DASD DEVICE: 02189000
  2298. AIF (NOT &ISAM).READ06 02190000
  2299. TM MEMO1,CHEKISAM SHOULD WE CHECK FOR ISAM READS ? 02191000
  2300. BCR 8,R2 "BZ CCWGENRL" IF NOT, FORGET IT. 02192000
  2301. CL R4,F9 BYTE-COUNT-LESS-1 WILL BE 9 IF ISAM READ 02193000
  2302. BCR 7,R2 "BNE CCWGENRL" IF NOT - FORGET IT 02194000
  2303. TM RCWFLAG,CC FOR ISAM, WE MUST HAVE CC SET 02195000
  2304. BCR 8,R2 "BZ CCWGENRL" IF CC NOT SET 02196000
  2305. CLI RCWCOMND,X'06' OP-CODE MUST BE A REAL '06' 02197000
  2306. BCR 7,R2 "BNE CCWGENRL" IF '86' OR SUCH 02198000
  2307. TM RCWADDR+3,X'07' LAST 3 BITS OF VIRTUAL ADDRESS = 7 ? 02199000
  2308. BCR 14,R2 <BNO> BNO CCWGENRL IF NOT - NOT AN ISAM READ. 02200000
  2309. OI RCWCTL,RCWISAM SIGNAL: THIS IS AN ISAM READ 02201000
  2310. OI MEMO1,HADISAM AND SIGNAL WE'VE HAD AT LEAST ONE 02202000
  2311. L R14,THISRCW GET ADDRESS OF THIS RCWTASK @VA04000 02203000
  2312. USING RCWTASK,R14 @VA04000 02204000
  2313. LH R15,RCWCCNT GET SIZE OF ENTIRE RCWTASK @VA04000 02205000
  2314. SLL R15,3 MAKE IT IN BYTES @VA04000 02206000
  2315. ALR R15,R14 POINT TO THE END OF RCWTASK @VA04000 02207000
  2316. SL R15,F4 LESS 4 BYTES @VA04000 02208000
  2317. DROP R14 @VA04000 02209000
  2318. LR R14,R6 OBTAIN DISPLACEMENT OF THIS READ 02210000
  2319. SL R14,THISRCW FROM BEGINNING OF THIS RCWTASK 02211000
  2320. ST R14,0(,R15) SAVE DISP. IN LAST WORD OF @VA04000 02212000
  2321. * RCWTASK 02213000
  2322. OI MEMO2,HADISAM AND INDICATE WE'VE NOW HAD AN ISAM READ 02214000
  2323. .READ06 ANOP 02215000
  2324. BR R2 "B CCWGENRL" - GO HANDLE DASD READ OF 06 02216000
  2325. SPACE 02217000
  2326. * HANDLE "READ RECORD R0" ... 02218000
  2327. DASDRDR0 TM VDEVTYPE,TYP2311+TYP2314 IS IT 2311/2314/2319 ? 02219000
  2328. BCR 7,R2 "BNZ CCWGENRL" IF YES - GENERAL CASE 02220000
  2329. * 02221000
  2330. * READ RECORD R0 FOR 3330 (OR EQUIVALENT SITUATION), 02222000
  2331. * SET FLAG-BIT FOR "UNTRANS" TO "UNRELOCATE" THE CYLINDER NUMBER: 02223000
  2332. TM VIRCOMND,X'60' SHOULD BE EITHER 16 OR 96 02224000
  2333. BZ CCWRHARZ IT'S OK 02225000
  2334. B CCWINVLD INVALID IF 1ST HALF-BYTE NOT 1 OR 9 02226000
  2335. SPACE 1 02227000
  2336. AIF (NOT &ISAM).NOISAM2 02228000
  2337. DASDX0 DS 0H CHECK OP-CODE OF 00 (NORMALLY INVALID): 02229000
  2338. TM MEMO1,HADISAM BUT HAVE WE HAD AN ISAM READ ? 02230000
  2339. BZ CCWINVLD NO - THE CCW IS DEFINITELY INVALID. 02231000
  2340. CLI RCWCOMND,X'00' IS THE CCW SPECIFICALLY 00 ? 02232000
  2341. BE CCWSUB1B YES- SUBSTITUTE A SEEK HEAD 02233000
  2342. CLI RCWCOMND,C'P' IS THE CCW SPECIFICALLY 'P' 02234000
  2343. BNE CCWINVLD IF NOT, DON'T PLAY ANY GAMES. 02235000
  2344. CCWSUB1B MVI RCWCOMND,X'1B' FOR ISAM CCW'S 00 OR D7(P) LET'S 02236000
  2345. MVI VIRCOMND,X'1B' SUBSTITUTE A SEEK HEAD CCW. 02237000
  2346. TM VDEVSTAT,VDEVDED IS THE DASD DEVICE DEDICATED ? 02238000
  2347. BO DEDDSEEK YES. 02239000
  2348. B DASDSKHD NO - ADVANCE TO SEEK ROUTINE @V56BDA8 02240000
  2349. .NOISAM2 ANOP 02241000
  2350. SPACE 02242000
  2351. DASDX7 DS 0H 07 - 17 02243000
  2352. CLI VIRCOMND,X'17' IS IT 07 OR 17 ? 02244000
  2353. BL DASDSEEK TRF IF 07. 02245000
  2354. AIF (&ISAM).ISAMP 02246000
  2355. BH CCWINVLD INVALID COMMAND IF > 17 02247000
  2356. .ISAMP AIF (NOT &ISAM).NOISAMP 02248000
  2357. BH DASDX0 INVALID COMMAND; OR ISAM C'P' 02249000
  2358. .NOISAMP ANOP 02250000
  2359. * HANDLE "RESTORE" (17) OR "RECALIBRATE" (13) COMMAND: 02251000
  2360. DASD1317 DS 0H ... 02252000
  2361. L R10,SAVER10 REFERENCE IOBLOK 02253000
  2362. USING IOBLOK,R10 ... 02254000
  2363. MVC IOBCYL(2),VDEVRELN LET IOBCYL POINT TO USER'S 1ST CYL 02255000
  2364. SLR R0,R0 CLEAR 02256000
  2365. ST R0,VDEVPOSN USER'S VIRTUAL CCHH ARM POSITION 02257000
  2366. OI MEMO1,NEEDSEEK SIGNAL - WE MUST HAVE A SEEK ASAP 02258000
  2367. TM RCWFLAG,CC+SILI DOES IT LOOK LIKE CMD WILL SUCCEED ? 02259000
  2368. BO CLEARADD YES- IOBSYL OK, GO TEST FOR IDA @VA03179 02260000
  2369. STH R0,IOBCYL NO - STORE 0000 IN IOBCYL INSTEAD 02261000
  2370. B CLEARADD AND GO CHECK FOR IDA @VA03179 02262000
  2371. DROP R10 02263000
  2372. SPACE 1 02264000
  2373. DASDX9 DS 0H 19 - 29/A9 - 39/B9 - 49/C9 - 69/E9 02265000
  2374. BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02266000
  2375. CLI VIRCOMND,X'19' IS IT "WRITE HOME ADDRESS" ? 02267000
  2376. BH DASDSR39 IF > 19, CHECK FOR SEARCH HOME ADDRESS EQ 02268000
  2377. BL CCWINVLD (ERROR IF < 19) 02269000
  2378. * HANDLE "WRITE HOME ADDRESS" 02270000
  2379. TM VDEVFLAG,VDEVRDO IS THE DASD DEVICE "READ ONLY" ? 02271000
  2380. BO CCWFORCE IF YES, FORCE A CHANNEL PROGRAM CHECK 02272000
  2381. TM VDEVTYPE,TYP2311+TYP2314+TYP2305 VALID DEVICE TYPE 02273000
  2382. BNZ RELHOMAD IF YES, RELOCATE CYLINDER NO. & FINISH UP 02274000
  2383. TM MEMO2,SKCECYL TEST FOR CE CYLINDER @V304498 02275000
  2384. BO RELHOMAD YES, PERMIT IT'S EXECUTION @V304498 02276000
  2385. * FOR ANY OTHER DEVICE, READ NON-TRANSMIT INSTEAD OF WRITING: 02277000
  2386. MVI RCWCOMND,X'1A' SUBSTITUTE "READ HOME ADDRESS" 02278000
  2387. SETSKIP OI RCWFLAG,SKIP+SILI FORCE NON-TRANSMIT @VA06304 02279000
  2388. B CLEARADD AND GO FINISH UP. 02280000
  2389. * 02281000
  2390. * FOR ALLOWABLE "WRITE HOME ADDRESS", RELOCATE THE CC IN THE DATA: 02282000
  2391. RELHOMAD BAL R14,CHEKRELN CHECK FOR RELOCATION FACTOR = 0 ETC. 02283000
  2392. BCR 8,R2 <BZ> BZ CCWGENRL IF YES - TREAT AS GEN CASE 02284000
  2393. BAL R10,CNTRLSUB GET THE CONTROL BYTES WE NEED 02285000
  2394. LH R15,1(,R7) PICK UP CC (2ND AND 3RD BYTES) 02286000
  2395. AH R15,VDEVRELN ADD RELOCATION FACTOR 02287000
  2396. STH R15,1(,R7) AND STORE BACK AGAIN. 02288000
  2397. TM VDEVFLAG,VDEV231B BOTTOM HALF OF SIMULATED 2311 ? 02289000
  2398. BZ SRCHID2 NOPE - JUST FINISH UP. 02290000
  2399. LH R15,3(,R7) YES - GET HEAD NUMBER 02291000
  2400. AL R15,F10 ADD 10 FOR BOTTOM HALF FAKE 2311 02292000
  2401. STH R15,3(,R7) AND STORE IT BACK; 02293000
  2402. B SRCHID2 NOW GO FINISH UP. 02294000
  2403. SPACE 1 02295000
  2404. DASDSR39 DS 0H HANDLE VARIOUS STATUS-MODIFIER TYPE COMMANDS: 02296000
  2405. OI VIRFLAG,SMCOM REMEMBER STATUS-MODIFIER TYPE 02297000
  2406. TM VIRCOMND,X'39' IS IT 39/B9 (SEARCH HOME ADDRESS EQ) ? 02298000
  2407. BCR 14,R2 "BNO CCWGENRL" IF NOT, HANDLE AS USUAL CASE 02299000
  2408. BAL R14,CHEKRELN CHECK FOR RELOCATION FACTOR = 0 ETC. 02300000
  2409. BCR 8,R2 <BZ> "BZ CCWGENRL" IF YES - TREAT AS GEN CASE 02301000
  2410. BAL R10,CNTRLSUB SEARCH HOME ADDRESS EQ - GET CNTRL BYTES 02302000
  2411. TM VDEVFLAG,VDEV231B BOTTOM HALF OF SIMULATED 2311 ? 02303000
  2412. BZ SRCHID1 NOPE - JUST RELOCATE THE CYLINDER NO. 02304000
  2413. LH R15,2(,R7) YES - ADD 10 TO THE HEAD NUMBER FIRST 02305000
  2414. AL R15,F10 ... 02306000
  2415. STH R15,2(,R7) ... 02307000
  2416. B SRCHID1 NOW GO RELOCATE THE CYLINDER NUMBER. 02308000
  2417. SPACE 1 02309000
  2418. DASDXA DS 0H 1A/9A = "READ HOME ADDRESS" 02310000
  2419. CLI VIRCOMND,X'1A' CHECK FOR VALID READ HOME ADDRESS CCW 02311000
  2420. BE CCWRHA YES - GOT IT. 02312000
  2421. CLI VIRCOMND,X'9A' OR POSSIBLY 9A ... 02313000
  2422. BNE CCWINVLD NOPE - IT'S INVALID, THEN. 02314000
  2423. CCWRHA LTR R4,R4 CHECK "BYTE COUNT LESS 1" 02315000
  2424. BZ CHEKREAD IF BYTE COUNT WAS ONLY 1, JUST GEN. CASE 02316000
  2425. BAL R10,PUTSEEK PUT IN A SEEK (IF NEEDED) 02317000
  2426. TM RCWFLAG,SKIP SKIP FLAG SET ? 02318000
  2427. BO CLEARADD YES - JUST USE 0 ADDRESS ETC. AS USUAL. 02319000
  2428. * 02320000
  2429. * HANDLE READ HOME ADDRESS (1A OR 9A), READ RECORD R0 (16 OR 96), OR 02321000
  2430. * SENSE TYPE COMMANDS (04|94|B4), IN CASES WHERE IT WILL BE NECESSARY 02322000
  2431. * FOR "UNTRANS" (DMKUNTFR) TO "UN-RELOCATE" THE CYLINDER <& HEAD> 02323000
  2432. * NUMBER WHEN THE CCW STRING HAS BEEN EXECUTED, AND (HOPEFULLY) 02324000
  2433. * IF (AND ONLY IF) THE DATA WAS ACTUALLY READ IN: 02325000
  2434. * 02326000
  2435. CCWRHARZ DS 0H HANDLE READ HOME ADDRESS OR READ RECORD R0: 02327000
  2436. BAL R14,CHEKRELN CHECK FOR RELOCATION FACTOR = 0 ETC. 02328000
  2437. BCR 8,R2 <BZ> "BZ CCWGENRL" IF YES - TREAT AS GEN CASE 02329000
  2438. OI RCWCTL,RCWHMR SET FLAG FOR CNTRLSUB & DMKUNTFR USE 02330000
  2439. CCWSENJN DS 0H JOIN HERE FOR SENSE CASES - RCWCTL ALREADY SET: 02331000
  2440. TM PRVFLAG,CD WAS THE PREVIOUS CCW DATA-CHAINED ? 02332000
  2441. BO NOUNREL YES - DON'T TRY TO UN-RELOCATE ANYTHING 02333000
  2442. BAL R10,CNTRLSUB REMEMBER FIRST 8 BYTES (OR LESS) OF DATA 02334000
  2443. * IN OUR "CONTROL AREA" - SEE NOTES BELOW 02335000
  2444. BAL R14,CCWRES14 RESTORE R3-R4 & R1 TO THEIR USUAL VALUES 02336000
  2445. TM RCWFLAG,IDA IS IDA BY ANY CHANCE SET ? 02337000
  2446. BZ CCWMANY2 NO - LET "CCWMANY2" MAKE AN IDAL 02338000
  2447. B FWDIDAL YES - LET REGULAR USER-IDA LOGIC DO IT. 02339000
  2448. * 02340000
  2449. * IN EITHER CASE, WE WILL HAVE GENERATED AN IDAL IN OUR CONTROL AREA 02341000
  2450. * TO DO THE COMMAND, WITH THE FIRST 8 BYTES (OR LESS) OF THE "OLD" DATA 02342000
  2451. * SAVED IMMEDIATELY FOLLOWING THE IDAL, FOR USE BY DMKUNTFR, WHO WILL 02343000
  2452. * CHECK TO SEE IF THE DATA HAS CHANGED, BEFORE ATTEMPTING TO ADJUST THE 02344000
  2453. * INFORMATION (I.E. UN-RELOCATING THE CYLINDER <AND HEAD> DATA, 02345000
  2454. * OR ADJUSTING THE SENSE BYTES FOR A SIMULATED 2311). 02346000
  2455. SPACE 02347000
  2456. CHEKRELN TM VDEVFLAG,VDEV231B BOTTOM HALF OF SIMULATED 2311 ? 02348000
  2457. BCR 1,R14 <BO> YES - EXIT WITH CONDITION-CODE = 3 02349000
  2458. LH R15,VDEVRELN CHECK DASD CYLINDER RELOCATION FACTOR 02350000
  2459. LTR R15,R15 SET CONDITION CODE 02351000
  2460. BR R14 AND EXIT (WITH COND CODE SET) 02352000
  2461. SPACE 02353000
  2462. CHEKREAD EQU * 02354000
  2463. BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02355000
  2464. * 02356000
  2465. READSKIP TM RCWFLAG,SKIP WAS SKIP FLAG SET ? 02357000
  2466. BCR 8,R2 "BZ CCWGENRL" IF NOT - HANDLE AS USUAL. 02358000
  2467. * 02359000
  2468. CLEARADD DS 0H ADDRESS IS IRRELEVANT AND/OR SKIP FLAG IS SET: 02360000
  2469. * LEAVE VIRTUAL ADDRESS (AS IS) IN THE CCW, BUT 02361000
  2470. L R2,FFS -1 INTO R2 FOR BENEFIT OF PROTECTION-CHECKING 02362000
  2471. TM RCWFLAG,IDA IS IDA PRESENT? 02363000
  2472. BZ CCWNXT11 NO, BR. & CONTINUE 02364000
  2473. B CTLCMDID YES - GO HANDLE CONTROL CMD IDAL 02365000
  2474. SPACE 02366000
  2475. DASDXB DS 0H 0B - 1B - 2B 02367000
  2476. CLI VIRCOMND,X'1B' IS IT 0B, 1B, OR 2B ? 02368000
  2477. BL DASDSEEK TRF IF 0B (SEEK CYLINDER) 02369000
  2478. BH CLEARADD OR IF 2B (ORIENT) HANDLE THAT. 02370000
  2479. * HANDLE '1B' = SEEK HEAD: 02371000
  2480. BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02372000
  2481. SPACE 1 02373000
  2482. DASDSKHD TM MEMO3,SKALTCYL HAVE WE HAD A SEEK TO AN @V56BDA8 02374000
  2483. * ALTERNATE? 02375000
  2484. BZ DASDSEEK NO, NOTHING SPECIAL @V56BDA8 02376000
  2485. MVI RCWCOMND,X'FF' FORCE COMMAND REJECT @V56BDA8 02377000
  2486. L R10,SAVER10 GET IOB POINTER @V56BDA8 02378000
  2487. OI IOBSTAT-IOBLOK(R10),IOBALTSK FLAGGED SEEK HEAD @V56BDA8 02379000
  2488. SPACE 1 02380000
  2489. DASDSEEK DS 0H HANDLE VARIOUS "SEEK" COMMANDS: 02381000
  2490. TM RCWFLAG,CD DATA CHAINED SEEK ? @VA03619 02382000
  2491. BZ DASCTL NO..LEAVE COUNT AS IS.. @VA03619 02383000
  2492. CL R4,F3 COUNT LESS THAN 4 ? @VA03619 02384000
  2493. BNL DASCTL NO..LET IT GO.. @VA03619 02385000
  2494. B CCWINVLD TOO BAD @VA07271 02386000
  2495. DASCTL EQU * @VA03619 02387000
  2496. BAL R10,CNTRLSUB COUNT OK, GET THE SEEK ARGUMENTS 02388000
  2497. TM RCWFLAG,CC+CD COMMAND-CHAIN OR CHAIN-DATA ON ? 02389000
  2498. BNZ *+8 IF YES, ANOTHER CCW MUST FOLLOW. 02390000
  2499. OI VDEVFLAG,VDEVSAS IF NOT, SIGNAL STAND ALONE SEEK 02391000
  2500. BAL R10,CCWRELCH RELOCATE CYLINDER NUMBER 02392000
  2501. TM MEMO2,PRECCW IS THERE A PREFIX SEEK CCW @V60B6B8 02393000
  2502. BZ NORESET NO, CONTINUE @V60B6B8 02394000
  2503. L R1,FIRSTRCW PROCEED TO GET PREFIX CCW @V60B6B8 02395000
  2504. STCM R7,7,SEEKOFF(R1) POINT TO SEEK ARGUMENT @V60B6B8 02396000
  2505. NI MEMO2,FULL-PRECCW TURN OFF FLAG @V60B6B8 02397000
  2506. OI PRECTL(R1),RCWREL ADDRESS CAN BE RELOCATED @VA10883 02397100
  2507. NI PREFLAG(R1),255-IDA TURN IDA OFF @VA10883 02397200
  2508. B SRCHID2 LEAVE ARGUMENT IN RCWTASK @VA10883 02397300
  2509. NORESET EQU * @V60B6B8 02398000
  2510. CL R14,F4095 BEWARE ILLEGAL CYLINDER NUMBER 02399000
  2511. BE SRCHID2 LEAVE WELL ENOUGH ALONE IN THAT CASE. 02400000
  2512. BAL R14,CHEKRELN CHECK FOR RELOCATION FACTOR = 0 ETC. 02401000
  2513. BNZ SRCHID2 NOT 0, USE RELOCATED DATA IN CONTROL AREA 02402000
  2514. TM VIRFLAG,BADHEDNO ZERO - BEWARE INVALID HEAD NUMBER 02403000
  2515. BO SRCHID2 BAD - USE RELOCATED DATA AS ABOVE 02404000
  2516. B SRCHID5 OK - DON'T RELOCATE SEEK ARGS AFTER ALL. 02405000
  2517. SPACE 1 02406000
  2518. DASDXC EQU CCWINVLD READ BACKWARD INVALID FOR DASD DEVICES. 02407000
  2519. SPACE 1 02408000
  2520. DASDXD DS 0H 0D - 1D - 2D - 4D - 6D 02409000
  2521. BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02410000
  2522. CLI VIRCOMND,X'1D' IS IT WRITE (COUNT) KEY & DATA ? 02411000
  2523. BNH DASDWRIT TRF IF YES - EITHER 0D OR 1D. 02412000
  2524. * HANDLE GENERAL CASE OF "SEARCH" COMMANDS: 02413000
  2525. DASDSRCH DS 0H HANDLE VARIOUS "SEARCH" COMMANDS: 02414000
  2526. OI VIRFLAG,SMCOM SIGNAL: STATUS-MODIFIER TYPE COMMAND 02415000
  2527. BR R2 "B CCWGENRL" - HANDLE AS USUAL CASE. 02416000
  2528. SPACE 1 02417000
  2529. DASDXE EQU CHEKREAD 0E/8E - 1E/9E = GENERAL CASE OF DASD READ 02418000
  2530. SPACE 1 02419000
  2531. DASDXF DS 0H 0F - 1F 02420000
  2532. BAL R10,PUTSEEK PUT IN SEEK IF NEEDED 02421000
  2533. CLI VIRCOMND,X'1F' IS IT SET FILE-MASK OR SPACE COUNT ? 02422000
  2534. BL DASDX0F =0F = SPACE COUNT 02423000
  2535. BH CCWINVLD >1F - JUST SET THE SKIP FLAGBIT 02424000
  2536. * =1F = SET FILE MASK: 02425000
  2537. LA R4,1 IF SET FILE-MASK, MAKE SURE COUNT = 1 02426000
  2538. DASDXFJN STH R4,RCWCNT ... 02427000
  2539. BCTR R4,0 AND BYTE-COUNT LESS 1 IN R4, 02428000
  2540. BR R2 "B CCWGENRL" - HANDLE AS USUAL CASE. 02429000
  2541. * 02430000
  2542. DASDX0F CL R4,F2 SPACE COUNT: BYTE-COUNT SHOULD BE 3 OR LESS 02431000
  2543. BCR 13,R2 "BNH CCWGENRL" IF BYTE-COUNT NOT > 3 02432000
  2544. LA R4,3 IF > 3, MAKE IT 3 02433000
  2545. B DASDXFJN AND JOIN CODE ABOVE TO USE COUNT OF 3. 02434000
  2546. REJECT1 EQU * @VA14597 02434100
  2547. MVI RCWCOMND,INVCCW1 FORCE CMND REJECT @VA14597 02434300
  2548. B CCWINVLD INVALID CCW @VA14597 02434500
  2549. INVCCW1 EQU X'FE' FORCE CMND REJ. WITH FE CMMD CODE@VA14597 02434700
  2550. EJECT 02435000
  2551. * SUBROUTINE TO PUT IN A SEEK COMMAND WHEN NEEDED: 02436000
  2552. * R10 = RETURN-REGISTER 02437000
  2553. * ENTER AT "PUTSEEK" TO CHECK FOR ENOUGH ROOM FIRST 02438000
  2554. * 02439000
  2555. PUTSEEK EQU * CHECK IF SEEK NEEDED, PUT ONE IN IF YES 02440000
  2556. TM MEMO1,NEEDSEEK DO WE NEED ONE ? 02441000
  2557. BCR 8,R10 NO - RETURN IMMEDIATELY 02442000
  2558. XROOM 24 NEED TWO CCW'S + SEEK ARGS 02443000
  2559. * 02444000
  2560. * SUBROUTINE TO PUT IN A SEEK (WHERE NEEDED): 02445000
  2561. * 02446000
  2562. CCWPUTSK EQU * @VA01964 02447000
  2563. LM R14,R15,RCWCCW SAVE CCW UNDER CONSTRUCTION 02448000
  2564. MVC RCWCCW(8),DUMSEEK PUT IN DUMMY SEEK 02449000
  2565. SL R7,F8 DECREMENT CONTROL POINTER, 02450000
  2566. STCM R7,7,RCWADDR+1 STORE ADDRESS IN SEEK COMMAND. 02451000
  2567. TM MEMO2,PRECCW DO WE HAVE A PREFIX CCW @V60B6B8 02452000
  2568. BZ NORESETA NO, CONTINUE @V60B6B8 02453000
  2569. L R1,FIRSTRCW CURRENT RCW PTR @V60B6B8 02454000
  2570. STCM R7,7,SEEKOFF(R1) POINT PREFIX TO CORRECT ARG @V60B6B8 02455000
  2571. NI MEMO2,FULL-PRECCW TURN OFF FLAG @V60B6B8 02456000
  2572. NORESETA EQU * @V60B6B8 02457000
  2573. OI MEMO2,HADRCGEN SIGNAL CP GENERATED A CCW 02458000
  2574. LA R6,8(,R6) NOW BUMP R6 UP FOR NEXT CCW, 02459000
  2575. STM R14,R15,RCWCCW AND RESTORE THE CCW BEING BUILT 02460000
  2576. SLR R15,R15 R15 CLEAR PLEASE 02461000
  2577. L R14,VDEVPOSN GET CCHH VIRTUAL DASD POSITION, 02462000
  2578. SRDL R14,16 SHIFT R14-15 02463000
  2579. STM R14,R15,0(R7) STORE SEEK ARGUMENTS IN 00CCHH00 FORM AND 02464000
  2580. B CCWRELJN JOIN COMMON CODE IN "CCWRELCH" SURBOUTINE 02465000
  2581. EJECT 02466000
  2582. * 02467000
  2583. * SUBROUTINE TO RELOCATE CYLINDER/HEAD NUMBER: 02468000
  2584. * 02469000
  2585. CCWRELCH EQU * @VA01964 02470000
  2586. L R14,0(,R7) GET SEEK ADDRESS (BBCC FORM) 02471000
  2587. CLI VIRCOMND,X'1B' IS THIS A SEEK HEAD CCW ? @VA01964 02472000
  2588. BE CCWRELJN YES - DON'T CHECK CYLINDER @VA01964 02473000
  2589. NI MEMO2,255-SKCECYL CLEAR CE CYL FLAG @V304498 02474000
  2590. LH R15,VDEVBND NUMBER OF CYLS IN THIS MDISK @VA01964 02475000
  2591. CLR R14,R15 COMPARE WITH LIMIT (SHOULD BE LESS) 02476000
  2592. BNL CCWRLC3 IF TOO BIG, SUBSTITUTE A BIG NUMBER 02477000
  2593. CCWRELCE EQU * INITIALIZE SEEK ARGUMENT V304498 02478000
  2594. MVC VDEVPOSN(4),2(R7) NEW VIRTUAL CCHH FOR SEEK OR SEEK CYL 02479000
  2595. CCWRELJN AH R14,VDEVRELN IF OK, ADD RELOCATION FACTOR. 02480000
  2596. CCWRELAL EQU * DO NOT RELOCATE ALTERNATE @V56BDA8 02481000
  2597. * CYLINDERS 02482000
  2598. TM MEMO1,NEEDSEEK IS THIS THE FIRST SEEK ? @VA01964 02483000
  2599. BZ CCWRLC1 NO -- FORGET ABOUT 'IOBCYL' @VA01964 02484000
  2600. L R15,SAVER10 IOBLOK ADDRESS TO GR15 @VA01964 02485000
  2601. STH R14,IOBCYL-IOBLOK(,R15) SET VALID IOBCYL @VA01964 02486000
  2602. NI MEMO1,255-NEEDSEEK WE'VE HAD A SEEK ALREADY @VA01964 02487000
  2603. CCWRLC1 ST R14,0(,R7) STORE RELOCATED CYLINDER NUMBER. 02488000
  2604. TM VDEVFLAG,VDEV231T+VDEV231B IS THIS A "FAKE" 2311 ? 02489000
  2605. BCR 8,R10 EXIT IT NOT (R14 HOLDS RELOC. SEEK ARGS) 02490000
  2606. LH R15,4(,R7) IF FAKE 2311, PICK UP HH - HEAD NUMBER 02491000
  2607. CL R15,F9 CHECK FOR HIGHEST LEGITIMATE VALUE 02492000
  2608. BH CCWRLC4 BAD SHOW IF > 9. 02493000
  2609. TM VDEVFLAG,VDEV231B IS IT THE BOTTOM HALF ? 02494000
  2610. BCR 8,R10 IF NOT, EXIT FORTHWITH. 02495000
  2611. AL R15,F10 IF YES, ADD HEAD RELOCATION FACTOR OF 10 02496000
  2612. CCWRLC2 STH R15,4(,R7) STORE RELOCATED HEAD NUMBER 02497000
  2613. BR R10 AND EXIT. 02498000
  2614. * 02499000
  2615. CCWRLC3 TM VDEVTYPE,TYP3330+TYP3350 IS CE CYL AVAIL ? @V304498 02500000
  2616. BM CCWRLC6 YES, TEST FOR CE CYL SEEK ARG @V304498 02501000
  2617. TM VDEVTYPE,TYP3340 IS CE CYL AVAIL ? @V304498 02502000
  2618. BO CCWRLC10 YES, TEST FOR CE CYL SEEK ARG @V304498 02503000
  2619. CCWRLC3M L R14,F4095 SET "VERY LARGE" CYLINDER NO @V304498 02504000
  2620. NI MEMO1,255-NEEDSEEK WON'T GET PAST THIS CCW @VA01964 02505000
  2621. B CCWRLC1 AND GO STORE. 02506000
  2622. * 02507000
  2623. CCWRLC4 LA R15,255 SET "LARGE" HEAD NUMBER 02508000
  2624. OI VIRFLAG,BADHEDNO REMEMBER BAD HEAD NUMBER IN USE 02509000
  2625. B CCWRLC2 AND GO STORE. 02510000
  2626. SPACE 1 02511000
  2627. CCWRLC6 L R15,=F'1024' 3350 & 3330 (EMUL MODE) CE CYL @V304498 02512000
  2628. CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02513000
  2629. BE CCWRLC20 YES, SET CE CYL FLAG @V304498 02514000
  2630. B CCWRLC3M NO, PROCESS AS "VERY LARGE" CYL @V304498 02515000
  2631. CCWRLC10 L R15,VDEVREAL INITIALIZE "REAL DEVICE" ADDRESS @V304498 02516000
  2632. TM RDEVFTR-RDEVBLOK(R15),FTR35MB 3340 35MB VOL ? @V304498 02517000
  2633. BO CCWRLC30 YES, TEST FOR CE CYL ARG @V304498 02518000
  2634. * NO, TEST 3340 70MB VOLUME 02519000
  2635. L R15,=F'698' 3340 70MB CE CYL ADDR @V304498 02520000
  2636. CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02521000
  2637. BE CCWRLC20 YES, SET THE CE CYL FLAG @V304498 02522000
  2638. L R15,=F'699' 3340 70MB CE CYL ADDR @V304498 02523000
  2639. CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02524000
  2640. BE CCWRLC20 YES, SET THE CE FLAG @V304498 02525000
  2641. LA R15,2804 3344 CE CYL ADDR - HIGH @VA12810 02525200
  2642. CLR R14,R15 IS THE SEEK TO THE CE CYL ? @VA12810 02525400
  2643. BH CCWRLC3M NO, PROCESS AS "VERY LARGE" CYL @VA12810 02525600
  2644. L R15,=F'2800' 3344 CE CYL ADDRESS - LOW @V304498 02526000
  2645. CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02527000
  2646. BNL CCWRLC20 YES, GO SET CE CYL FLAG @VA12810 02528100
  2647. LA R15,696 IS IT A 3340-70 ALTERNATE CYL @VA12810 02528400
  2648. CLR R14,R15 ... @VA12810 02528700
  2649. BL CCWRLC3M NO, THEN GIVE SEEK REJECT @VA12810 02529000
  2650. LA R15,697 TRY THIS ALTERNATE CYL @VA12810 02529300
  2651. CLR R14,R15 IS IT THIS ONE ? @VA12810 02529600
  2652. BH CCWRLC3M NOT HERE EITHER, GIVE SEEK REJECT@VA12810 02529900
  2653. LA R15,696 IS IT A FULL-PACK MINI @VA12810 02530200
  2654. CH R15,VDEVBND ..... @VA12810 02530500
  2655. BH MAYBALTC NO, GO CHECK THE PRIMARY CYL ADDR@VA12810 02530800
  2656. B CCWRELAL OTHERWISE, NO NEED TO CHECK @VA12810 02531100
  2657. CCWRLC20 OI MEMO2,SKCECYL SET CE CYL FLAG @V304498 02532000
  2658. B CCWRELCE INITIALIZE SEEK ARGUMENT @V304498 02533000
  2659. CCWRLC30 L R15,=F'349' 3340 35MB CE CYL ADDR @V304498 02534000
  2660. CLR R14,R15 IS THE SEEK TO THE CE CYL ? @V304498 02535000
  2661. BE CCWRLC20 YES, SET CE CYL FLAG @V304498 02536000
  2662. LA R15,348 3340 35MB ALT CYL ADDR ? @VA12810 02536100
  2663. CLR R14,R15 IS THE SEEK TO THE ALT CYL ? @VA12810 02536200
  2664. BNE CCWRLC3M NO, GO GIVE A SEEK REJECT @VA12810 02536300
  2665. LA R15,348 NO. OF 3340-35 PRIMARY CYLS @VA12810 02536400
  2666. CH R15,VDEVBND IS THIS A FULL PACK MINI ? @VA12810 02536500
  2667. BNH CCWRELAL YES, NO NEED TO CHECK PRIMARY CYL@VA12810 02536600
  2668. MAYBALTC CALL DMKTRKVA CHECK ALTERNATE CYLINDER ADDRESS @V56BDA8 02537000
  2669. LCTL C1,C1,VMSEG REESTABLISH CONTROL REG 1 @V56BDA8 02538000
  2670. LTR R1,R1 ERRORS? @V56BDA8 02539000
  2671. BM CCWRLC3M YES, DO NOT ALLOW @V56BDA8 02540000
  2672. SH R1,VDEVRELN CONVERT REAL TO VIRTUAL ADDRESS @V56BDA8 02541000
  2673. BM CCWRLC3M BELOW HIS MINI-DISK @V56BDA8 02542000
  2674. CLM R1,3,VDEVBND IS DEFECTIVE TRACK IN THIS @V56BDA8 02543000
  2675. * MINIDISK? 02544000
  2676. BNL CCWRLC3M NO, DO NOT ALLOW @V56BDA8 02545000
  2677. TM MEMO3,SKALTCYL HAVE WE ALREADY DONE ONE? @V56BDA8 02546000
  2678. BZ FIXSKHDS NO, CHECK OUT SEEK HEADS @V56BDA8 02547000
  2679. SKHDSFXD LH R14,2(,R7) REAL CYLINDER ADDRESS @V56BDA8 02548000
  2680. SH R14,VDEVRELN LESS RELOCATION FACTOR @V56BDA8 02549000
  2681. STH R14,VDEVPOSN REMEMBER CYLINDER POSITION @V56BDA8 02550000
  2682. MVC VDEVPOSN+2(2),4(R7) SAVE HEAD ADDRESS @V56BDA8 02551000
  2683. L R14,0(,R7) GET BACK 00CC @V56BDA8 02552000
  2684. B CCWRELAL REJOIN MAINLINE @V56BDA8 02553000
  2685. SPACE 1 02554000
  2686. FIXSKHDS OI MEMO3,SKALTCYL FLAG SEEK TO ALTERNATE CYLINDER @V56BDA8 02555000
  2687. L R15,FIRSTRCW ->FIRST RCWTASK @V56BDA8 02556000
  2688. DROP R6 @V56BDA8 02557000
  2689. USING RCWTASK,R15 @V56BDA8 02558000
  2690. SKHDSRCH LA R14,RCWCCW ->FIRST CCW IN RCWTASK @V56BDA8 02559000
  2691. USING RCWCCW,R14 @V56BDA8 02560000
  2692. LH R2,RCWRCNT NUMBER OF REAL CCWS @V56BDA8 02561000
  2693. LTR R2,R2 GOT ANY YET? @V56BDA8 02562000
  2694. BZ SKHDSFXD NO, ALL FINISHED @V56BDA8 02563000
  2695. SKHDLOOP CLI RCWCOMND,X'1B' SEEK HEAD? @V56BDA8 02564000
  2696. BNE NOTASKHD NO, CHECK NEXT CCW @V56BDA8 02565000
  2697. MVI RCWCOMND,X'FF' FORCE COMMAND REJECT @V56BDA8 02566000
  2698. L R1,SAVER10 GET IOB @V56BDA8 02567000
  2699. OI IOBSTAT-IOBLOK(R1),IOBALTSK FLAG A FLAGGED SEEK @V56BDA8 02568000
  2700. NOTASKHD LA R14,8(,R14) ->NEXT CCW @V56BDA8 02569000
  2701. BCT R2,SKHDLOOP CHECK IT OUT @V56BDA8 02570000
  2702. ICM R15,15,RCWPNT -->NEXT RCWTASK @V56BDA8 02571000
  2703. BNZ SKHDSRCH AND KEEP LOOKING @V56BDA8 02572000
  2704. B SKHDSFXD ALL FINISHED @V56BDA8 02573000
  2705. DROP R14,R15 @V56BDA8 02574000
  2706. USING RCWCCW,R6 @V56BDA8 02575000
  2707. EJECT 02576000
  2708. *. 02577000
  2709. * LOGIC FOR "DEDD" = DEDICATED DASD DEVICE CLASS 02578000
  2710. * 02579000
  2711. * DEDDX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 02580000
  2712. * WRITE SPECIAL COUNT KEY AND DATA (01) OR ERASE TRACK (11) 02581000
  2713. * ARE HANDLED AS GENERAL CASE OF DATA TRANSFER 02582000
  2714. * 02583000
  2715. * ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 02584000
  2716. * 02585000
  2717. * DEDDX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 02586000
  2718. * HANDLED AS GENERAL CASE "READ" 02587000
  2719. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02588000
  2720. * 02589000
  2721. * DEDDX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 02590000
  2722. * FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 02591000
  2723. * IF NOT 03, HANDLES AS GENERAL CASE OF DATA TRANSFER 02592000
  2724. * 02593000
  2725. * DEDDX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 02594000
  2726. * IF SENSE (04) OR EQUIVALENT, STORES SENSE BYTES FROM VIRTUAL 02595000
  2727. * DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 02596000
  2728. * OTHERWISE, HANDLED AS GENERAL CASE "READ" 02597000
  2729. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02598000
  2730. * 02599000
  2731. * DEDDX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 02600000
  2732. * WRITE DATA (05) AND WRITE RECORD R0 (15) 02601000
  2733. * ARE HANDLED AS GENERAL CASE OF DATA TRANSFER 02602000
  2734. * 02603000
  2735. * ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 02604000
  2736. * 02605000
  2737. * DEDDX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 02606000
  2738. * FOR READ DATA (06), DOES ISAM CHECKING (SEE "DASDX6" LOGIC) 02607000
  2739. * 02608000
  2740. * IF NOT 06, HANDLED AS GENERAL CASE "READ" 02609000
  2741. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02610000
  2742. * 02611000
  2743. * DEDDX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 02612000
  2744. * FOR SEEK (07), CHECKS IF CCW IS COMMAND- OR DATA-CHAINED; 02613000
  2745. * IF NOT, SETS FLAG IN VIRTUAL DEVICE BLOCK (FOR DMKIOS) 02614000
  2746. * TO SIGNAL A STAND-ALONE SEEK. 02615000
  2747. * 02616000
  2748. * OTHERWISE, HANDLED AS GENERAL CASE OF DATA TRANSFER 02617000
  2749. * 02618000
  2750. * DEDDX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 02619000
  2751. * WRITE HOME ADDRESS (19) HANDLED 02620000
  2752. * AS GENERAL CASE OF DATA TRANSFER 02621000
  2753. * 02622000
  2754. * ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 02623000
  2755. * 02624000
  2756. * DEDDXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 02625000
  2757. * HANDLED AS GENERAL CASE "READ" 02626000
  2758. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02627000
  2759. EJECT 02628000
  2760. * DEDDXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 02629000
  2761. * FOR SEEK CYLINDER (0B) OR SEEK HEAD (1B) CHECKS FOR POSSIBLE 02630000
  2762. * STAND-ALONE SEEK AS FOR 07 SEEK (SEE "DEDDX7" LOGIC ABOVE) 02631000
  2763. * 02632000
  2764. * OTHERWISE, HANDLED AS GENERAL CASE OF DATA TRANSFER 02633000
  2765. * 02634000
  2766. * DEDDXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 02635000
  2767. * HANDLED AS AN INVALID CCW 02636000
  2768. * 02637000
  2769. * DEDDXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 02638000
  2770. * WRITE KEY AND DATA (0D) OR WRITE COUNT KEY AND DATA (1D) 02639000
  2771. * ARE HANDLED AS GENERAL CASE OF DATA TRANSFER 02640000
  2772. * 02641000
  2773. * ALL OTHERS TREATED AS "STATUS MODIFIER" TYPE OF DATA TRANSFER 02642000
  2774. * 02643000
  2775. * DEDDXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 02644000
  2776. * HANDLED AS GENERAL CASE "READ" 02645000
  2777. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02646000
  2778. * 02647000
  2779. * DEDDXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 02648000
  2780. * HANDLED AS GENERAL CASE OF DATA TRANSFER 02649000
  2781. *. 02650000
  2782. SPACE 2 02651000
  2783. * HANDLE COMMANDS FOR DEDICATED DASD DEVICES ONLY: 02652000
  2784. SPACE 1 02653000
  2785. * DEDDX1 THRU DEDDX6 CODE "AT THE END" TO SOLVE ADDRESSABILITY SQUEEZE 02654000
  2786. SPACE 1 02655000
  2787. DEDDX7 DS 0H 07 - 17 02656000
  2788. CLI RCWCOMND,X'07' IS IT A SEEK (07) ? 02657000
  2789. BNE DEDDMON IF NOT X'07' JUST EXTRACT CYL-LOC@VA03670 02658000
  2790. * NOTE: ISAM CCW OF X'D7'(P) WILL WORK OK 02659000
  2791. DEDDSEEK TM RCWFLAG,CC+CD COMMAND-CHAIN OR CHAIN-DATA ON ? 02660000
  2792. BNZ DEDDMON IF SO, GO EXTRACT THE CYL-LOC @VA03670 02661000
  2793. OI VDEVFLAG,VDEVSAS IF NOT, SIGNAL STAND ALONE SEEK 02662000
  2794. SPACE 1 02663000
  2795. * SAVE CYLINDER NUMBER IN IOBCYL IN CASE MONITOR CLASS "SEEKS" ENABLED 02664000
  2796. DEDDMON BAL R10,CNTRLSUB GO DECIPHER THE CYLINDER NUMBER @VA03670 02665000
  2797. TM MEMO2,PRECCW IS THERE AN MSS PREFIX @V60B6B8 02666000
  2798. BZ NORESETC NOPE.... @VA11732 02667010
  2799. NI MEMO2,FULL-PRECCW TURN OFF THE FLAG @V60B6B8 02668000
  2800. L R1,FIRSTRCW PTR TO FIRST RCWTASK @V60B6B8 02669000
  2801. STCM R2,7,17(R1) POINT PREFIX TO SEEK ARG. @V60B6B8 02670000
  2802. NI PRECTL(R1),FULL-RCWREL DO NOT RELOCATE SEEK @VA13113 02670005
  2803. NORESETC DS 0H NO PREFIX ENTRY @VA11732 02670010
  2804. L R10,VDEVREAL GET THE RDEVBLOK @VA11732 02670020
  2805. TM RDEVFTR-RDEVBLOK(R10),VIRTUAL+SYSVIRT MSS TYPE @VA11732 02670030
  2806. BZ NORESETB NO .... CONTINUE @VA11732 02670040
  2807. TM VDEVFLG2,VDEVVIRT WAS IT VDEV AS VIRT @VA11732 02670050
  2808. BNO NORESETB NO ..... CONTINUE @VA11732 02670060
  2809. OI VIRFLAG,SMCOM ALLOW FOR STATUS MODIFIERABLE@VA11732 02670070
  2810. NORESETB EQU * SAVE SEEK CYL NUMBER @V60B6B8 02671000
  2811. L R10,SAVER10 RESTORE ADDRESS OF IOBLOK @VA03670 02672000
  2812. USING IOBLOK,R10 @VA03670 02673000
  2813. MVC IOBCYL(2),2(R7) MOVE CYLINDER NUMBER TO IOBLOK @VA03670 02674000
  2814. MVC VDEVPOSN(2),2(R7) SAVE CURRENT SEEK ARG @V60B6B8 02675000
  2815. DROP R10 @VA03670 02676000
  2816. B SRCHID5 RESTORE REGS AND GOTO CCWGENRL @VA03670 02677000
  2817. SPACE 1 02678000
  2818. * DEDDX9 THRU DEDDXF CODE "AT THE END" TO SOLVE ADDRESSABILITY SQUEEZE 02679000
  2819. EJECT 02680000
  2820. *. 02681000
  2821. * LOGIC FOR "TAPE" = TAPE DEVICE CLASS 02682000
  2822. * 02683000
  2823. * TAPEX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 02684000
  2824. * WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 02685000
  2825. * 02686000
  2826. * TAPEX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 02687000
  2827. * READ (02) HANDLED AS GENERAL CASE "READ" 02688000
  2828. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02689000
  2829. * 02690000
  2830. * 02691000
  2831. * TAPEX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 02692000
  2832. * FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 02693000
  2833. * IF NOT 03, ADDRESS IN CCW IRRELEVANT - NO DATA TRANSFER OCCURS 02694000
  2834. * (BUT ANY EXISTING SENSE BYTES ARE CLEARED) 02695000
  2835. * 02696000
  2836. * TAPEX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 02697000
  2837. * IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 02698000
  2838. * DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 02699000
  2839. * OTHERWISE, HANDLED AS GENERAL CASE "READ" 02700000
  2840. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02701000
  2841. * 02702000
  2842. * TAPEX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 02703000
  2843. * HANDLED AS AN INVALID CCW 02704000
  2844. * 02705000
  2845. * TAPEX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 02706000
  2846. * HANDLED AS AN INVALID CCW 02707000
  2847. * 02708000
  2848. * TAPEX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 02709000
  2849. * ADDRESS IN CCW IRRELEVANT - NO DATA TRANSFER OCCURS 02710000
  2850. * (BUT ANY EXISTING SENSE BYTES ARE CLEARED) 02711000
  2851. * 02712000
  2852. * TAPEX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 02713000
  2853. * HANDLED AS AN INVALID CCW 02714000
  2854. * 02715000
  2855. * TAPEXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 02716000
  2856. * HANDLED AS AN INVALID CCW 02717000
  2857. * 02718000
  2858. * TAPEXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 02719000
  2859. * FOR DIAGNOSTIC WRITE MODE SET (0B), HANDLES AS 02720000
  2860. * NO-OP (DOES NOT CLEAR SENSE BYTES IF ANY EXIST) 02721000
  2861. * 02722000
  2862. * FOR "TIE" (1B), HANDLES AS GENERAL CASE OF DATA TRANSFER, 02723000
  2863. * BUT FLAG IS SET TO SAVE SENSE BYTES (IF ANY EXIST) 02724000
  2864. * 02725000
  2865. * CHECKS FOR SET DIAGNOSE (4B) OR LOOP WRITE-TO-READ (8B); IF 02726000
  2866. * NEITHER, ADDRESS IN CCW IRRELEVANT - NO DATA TRANSFER OCCURS 02727000
  2867. * (BUT ANY EXISTING SENSE BYTES ARE CLEARED) 02728000
  2868. EJECT 02729000
  2869. * TAPEXB COMMANDS (CONTINUED): 02730000
  2870. * IF 4B OR 8B, CHECKS FOR DEVICE TYPE OF 3420 OR 3410: 02731000
  2871. * IF 3410 OR 3420, HANDLE AS GENERAL CASE OF DATA TRANSFER, 02732000
  2872. * BUT FLAG IS SET TO SAVE SENSE BYTES (IF ANY EXIST) 02733000
  2873. * 02734000
  2874. * IF 4B OR 8B (NOT 3410 OR 3420), ADDRESS IN CCW IRRELEVANT - NO 02735000
  2875. * DATA TRANSFER OCCURS (ANY EXISTING SENSE BYTES ARE CLEARED) 02736000
  2876. * 02737000
  2877. * TAPEXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 02738000
  2878. * IF = 0C, HANDLED AS A GENERAL CASE "READ BACKWARD" COMMAND 02739000
  2879. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02740000
  2880. * (AND WITH APPROPRIATE HANDLING OF IDA IF DATA CROSSES A PAGE 02741000
  2881. * BOUNDARY OR IF IDA IS SET IN THE VIRTUAL READ BACKWARD CCW) 02742000
  2882. * 02743000
  2883. * IF NOT 0C, HANDLED AS AN INVALID CCW 02744000
  2884. * 02745000
  2885. * TAPEXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 02746000
  2886. * HANDLED AS AN INVALID CCW 02747000
  2887. * 02748000
  2888. * TAPEXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 02749000
  2889. * HANDLED AS AN INVALID CCW 02750000
  2890. * 02751000
  2891. * TAPEXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 02752000
  2892. * ADDRESS IN CCW IRRELEVANT - NO DATA TRANSFER OCCURS 02753000
  2893. * (BUT ANY EXISTING SENSE BYTES ARE CLEARED) 02754000
  2894. *. 02755000
  2895. SPACE 2 02756000
  2896. * HANDLE THE VARIOUS TAPE COMMANDS: 02757000
  2897. SPACE 1 02758000
  2898. * TAPEX1 THRU TAPEXA CODE "AT THE END" TO SOLVE ADDRESSABILITY SQUEEZE 02759000
  2899. SPACE 1 02760000
  2900. TAPEXB DS 0H VARIOUS CONTROL COMMANDS: 02761000
  2901. CLI VIRCOMND,X'1B' 0B OR 1B ? 02762000
  2902. BL HNDLNOOP IF 0B, USE 0 ADDRESS & DON'T CLEAR SENSE 02763000
  2903. BE TAPEXB2 IF 1B ("TIE") SAVE SENSE BYTES ETC. 02764000
  2904. TM VIRCOMND,X'C0' IS IT EITHER 4B OR 8B ? 02765000
  2905. BNM CLEARADD IF NOT, ADDRESS IS IRRELEVANT. 02766000
  2906. TM VDEVTYPE,TYP3420+TYP3410 IS IT A 3420 OR 3410? @VA04093 02767000
  2907. BZ CLEARADD IF NOT, ADDRESS IS IRRELEVANT. @VA04093 02768000
  2908. TAPEXB2 OI VIRFLAG,SVSEN SIGNAL: SAVE THE SENSE BYTES 02769000
  2909. BR R2 "B CCWGENRL" - HANDLE AS USUAL CASE. 02770000
  2910. SPACE 1 02771000
  2911. * TAPEXC THRU TAPEXF CODE "AT THE END" TO SOLVE ADDRESSABILITY SQUEEZE 02772000
  2912. EJECT 02773000
  2913. *. 02774000
  2914. * LOGIC FOR "TERM" = TERMINAL DEVICE CLASS 02775000
  2915. * 02776000
  2916. * TERMX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 02777000
  2917. * WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 02778000
  2918. * IF NOT 01, HANDLED AS AN INVALID CCW 02779000
  2919. * 02780000
  2920. * TERMX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 02781000
  2921. * READ (02) HANDLED AS GENERAL CASE "READ" 02782000
  2922. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02783000
  2923. * 02784000
  2924. * IF NOT 02, 12 (FOR 2955), OR 42 (FOR 370X EMULATION LINE), 02785000
  2925. * HANDLED AS AN INVALID CCW 02786000
  2926. * 02787000
  2927. * TERMX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 02788000
  2928. * FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 02789000
  2929. * 02790000
  2930. * FOR SADZER (13), HANDLES AS DESCRIBED AT "TERMSAD" (BELOW) 02791000
  2931. * 02792000
  2932. * FOR MODE-SET (23), HANDLES AS GENERAL CASE OF DATA TRANSFER 02793000
  2933. * 02794000
  2934. * IF > 23, HANDLED AS AN INVALID CCW. 02795000
  2935. * 02796000
  2936. * TERMX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 02797000
  2937. * IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 02798000
  2938. * DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 02799000
  2939. * OTHERWISE, HANDLED AS GENERAL CASE "READ" 02800000
  2940. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02801000
  2941. * 02802000
  2942. * IF RESERVE (F4) OR RELEASE (D4), CHANGES 02803000
  2943. * OP CODE TO 04, SETS SKIP & SILI FLAGBITS 02804000
  2944. * IN REAL CCW, AND HANDLES AS A NO-OP (DOES NOT CLEAR ANY 02805000
  2945. * EXISTING SENSE BYTES) 02806000
  2946. * 02807000
  2947. * IF NOT 04, F4, OR D4, HANDLED AS INVALID CCW 02808000
  2948. * 02809000
  2949. * TERMX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 02810000
  2950. * WRAP (05) HANDLED AS GENERAL CASE OF DATA TRANSFER 02811000
  2951. * IF NOT 05, HANDLED AS AN INVALID CCW 02812000
  2952. * 02813000
  2953. * TERMX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 02814000
  2954. * PREPARE (06) HANDLED AS GENERAL CASE "READ" 02815000
  2955. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02816000
  2956. * 02817000
  2957. * IF NOT 06, HANDLED AS AN INVALID CCW 02818000
  2958. * 02819000
  2959. * TERMX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 02820000
  2960. * FOR SADONE (17), HANDLES AS DESCRIBED AT "TERMSAD" (BELOW) 02821000
  2961. * 02822000
  2962. * IF ENABLE (27), HANDLES AS GENERAL CASE OF DATA TRANSFER 02823000
  2963. * 02824000
  2964. * IF = 07 OR > 27, HANDLES AS AN INVALID CCW 02825000
  2965. EJECT 02826000
  2966. * TERMX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 02827000
  2967. * WRITE AUTO-POLL (09) TREATED AS A "STATUS MODIFIER" TYPE OF 02828000
  2968. * DATA TRANSFER; ALSO SETS FLAG TO REMEMBER THAT AN AUTO-POLL 02829000
  2969. * WAS PROCESSED (FOR SPECIAL HANDLING OF AUTO-POLL WRAP LIST). 02830000
  2970. * 02831000
  2971. * DIAL (29) HANDLED AS GENERAL CASE OF DATA TRANSFER 02832000
  2972. * 02833000
  2973. * IF NOT 09 OR 29, HANDLED AS AN INVALID CCW 02834000
  2974. * 02835000
  2975. * TERMXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 02836000
  2976. * INHIBIT (0A) HANDLED AS GENERAL CASE "READ" 02837000
  2977. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02838000
  2978. * 02839000
  2979. * IF NOT 0A, HANDLED AS AN INVALID CCW 02840000
  2980. * 02841000
  2981. * TERMXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 02842000
  2982. * CHECKS THAT BITS FOR "SAD" CCW (X'13' BITS) ARE SET; 02843000
  2983. * INVALID CCW IF NOT; IF OK, HANDLE SADTWO (1B) AS FOLLOWS: 02844000
  2984. * "TERMSAD" - HANDLE TERMINAL "SAD" CCWS: 02845000
  2985. * GET "SAD" NUMBER FROM REAL DEVICE BLOCK; 02846000
  2986. * IF = 04, TREAT AS A NO-OP (WITH SKIP & SILI FLAGS SET) 02847000
  2987. * IF NOT = 04, THE "SAD" NUMBER IS ADDED TO THE "SAD" CCW 02848000
  2988. * TO PRODUCE THE APPROPRIATE OP CODE, AND THE SILI FLAG IS SET. 02849000
  2989. * 02850000
  2990. * TERMXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 02851000
  2991. * HANDLED AS AN INVALID CCW 02852000
  2992. * 02853000
  2993. * TERMXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 02854000
  2994. * BREAK (0D) HANDLED AS GENERAL CASE OF DATA TRANSFER 02855000
  2995. * IF NOT 0D, HANDLED AS AN INVALID CCW 02856000
  2996. * 02857000
  2997. * TERMXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 02858000
  2998. * SEARCH (0E) HANDLED AS GENERAL CASE "READ" 02859000
  2999. * ADDRESS PREPARE (1E) PSEUDO READ. SAME AS SEARCH (0E) 02860000
  3000. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 02861000
  3001. * 02862000
  3002. * IF NOT 0E OR 1E, HANDLE AS AN INVALID CCW 02863000
  3003. * 02864000
  3004. * TERMXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 02865000
  3005. * FOR SADTHREE (1F), HANDLES AS DESCRIBED ABOVE AT "TERMSAD" 02866000
  3006. * 02867000
  3007. * IF DISABLE (2F), HANDLES AS GENERAL CASE OF DATA TRANSFER 02868000
  3008. * 02869000
  3009. * IF > 2F, HANDLES AS AN INVALID CCW 02870000
  3010. *. 02871000
  3011. SPACE 2 02872000
  3012. * HANDLE VARIOUS COMMANDS FOR TERMINAL CLASS: 02873000
  3013. SPACE 02874000
  3014. TERMX1 DS 0H "WRITE" @VA01331 02875000
  3015. CLI VIRCOMND,01 SHOULD BE '01' @VA01331 02876000
  3016. BCR 8,R2 BE CCWGENRL IF YES. @VA01331 02877000
  3017. B CCWINVLD INVALID IF NOT 01. @VA01331 02878000
  3018. SPACE 2 02879000
  3019. TERMX2 DS 0H "READ" @VA01331 02880000
  3020. CLI VIRCOMND,02 SHOULD BE '02' @VA01331 02881000
  3021. BE READSKIP IF YES, GO CHECK SKIP FLAG @VA01331 02882000
  3022. CLI VIRCOMND,X'12' IS IT DIAG READ FOR 2955? @VA02607 02883000
  3023. BNE CKFOR42 NO,SEE IF X'42' CCW @VA03833 02884000
  3024. CLI VDEVTYPE,TYP2955 2955 COMMUNICATION LINE? @VA02607 02885000
  3025. BE READSKIP YES-GO CHECK SKIP FLAG @VA02607 02886000
  3026. B CCWINVLD INVALID CCW IF NOT THESE @VA02607 02887000
  3027. CKFOR42 CLI VIRCOMND,X'42' READ ON 370X EMUL. LINE? @VA03833 02888000
  3028. BNE CCWINVLD NO @VA03833 02889000
  3029. STM R0,R8,TEMPSAVE SAVE REGS TEMPORARILY @VA03833 02890000
  3030. L R8,VDEVREAL ADDRESS RDEVBLOK @VA03833 02891000
  3031. USING RDEVBLOK,R8 @VA03833 02892000
  3032. CLI RDEVTYPC,CLASTERM IS IT TERMINAL CLASS? @VA03833 02893000
  3033. BNE INVLD42 NO - BUT IT SHOULD BE @VA03833 02894000
  3034. CLC RDEVBASE,ZEROES IS THERE A BASE ADDRESS? @VA03833 02895000
  3035. BE INVLD42 NO - BUT THERE SHOULD BE @VA03833 02896000
  3036. LH R1,RDEVBASE BASE ADDRESS IN CCU FORM IN R1 @VA03833 02897000
  3037. CALL DMKSCNRU ADDRESS OF CCU'S RDEVBLOK IN R8 @VA03833 02898000
  3038. BC 7,INVLD42 RDEVBLOK NOT FOUND @VA03833 02899000
  3039. LA R1,CLASSPEC*256+TYP3704 DEV CLASS AND TYPE @VA03833 02900000
  3040. CH R1,RDEVTYPC IS IT REALLY A 370X? @VA03833 02901000
  3041. BNE INVLD42 NO - IT SHOULD BE @VA03833 02902000
  3042. CL R11,RDEVUSER IS 370X DEDICATED TO USER? @VA03833 02903000
  3043. BE OK42 YES - NO SECURITY PROBLEM THEN @VA03833 02904000
  3044. TM VMCLEVEL,X'FC' USER WITH JUST CLASS G OR H @VA03833 02905000
  3045. BZ INVLD42 NOT ALLOWED IF NOT DEDICATED @VA03833 02906000
  3046. USING VDEVBLOK,R8 @VA03833 02907000
  3047. OK42 LM R0,R8,TEMPSAVE RESTORE REGS @VA03833 02908000
  3048. B READSKIP GO CHECK SKIP FLAG @VA03833 02909000
  3049. INVLD42 LM R0,R8,TEMPSAVE RESTORE REGS @VA03833 02910000
  3050. B CCWINVLD INVALID CCW @VA03833 02911000
  3051. SPACE 02912000
  3052. TERMX3 DS 0H NOOP (03), SADZER (13), MODE-SET (23) 02913000
  3053. CLI VIRCOMND,X'13' IS IT 03 OR 13 ? 02914000
  3054. BL HNDLNOOP TRF IF 03 (NOOP). 02915000
  3055. BE TERMSAD TRF IF 13 (SADZER). 02916000
  3056. CLI VIRCOMND,X'23' IS IT MODE-SET ? 02917000
  3057. BCR 8,R2 "BE CCWGENRL" IF YES (GENERAL CASE) 02918000
  3058. B CCWINVLD INVALID COMMAND IF > 23. 02919000
  3059. SPACE 02920000
  3060. TERMX4 DS 0H SENSE (04), RELEASE (D4), OR RESERVE (F4) 02921000
  3061. CLI VIRCOMND,X'04' IS IT A REAL SENSE (04) ? 02922000
  3062. BE DASDX4 YES - CHECK WHETHER SKIP FLAG IS SET 02923000
  3063. * (NOTE: CCWCTL = 0) 02924000
  3064. CLI VIRCOMND,X'F4' RESERVE? @VA03178 02925000
  3065. BE TERMSENS YES @VA03178 02926000
  3066. CLI VIRCOMND,X'D4' RELEASE? @VA03178 02927000
  3067. BE TERMSENS YES @VA03178 02928000
  3068. B CCWINVLD INVALID CCW @VA03178 02929000
  3069. * 02930000
  3070. TERMSENS LA R15,04 FORCE AN OP-CODE OF "SENSE" 02931000
  3071. TERMSKIP OI RCWFLAG,SKIP SET SKIP (NON-TRANSMIT) FLAG 02932000
  3072. B TERMST15 GO STORE OP-CODE AND FINISH UP. 02933000
  3073. SPACE 02934000
  3074. TERMX5 DS 0H WRAP (05) 02935000
  3075. CLI VIRCOMND,X'05' SHOULD BE '05' 02936000
  3076. BCR 8,R2 "BE CCWGENRL" IF YES. 02937000
  3077. B CCWINVLD INVALID IF NOT 05. 02938000
  3078. SPACE 02939000
  3079. TERMX6 DS 0H PREPARE (06) 02940000
  3080. CLI VIRCOMND,X'06' SHOULD BE '06' 02941000
  3081. BE READSKIP IF YES, GO CHECK IF SKIP FLAG IS SET. 02942000
  3082. B CCWINVLD INVALID IF NOT 06. 02943000
  3083. SPACE 02944000
  3084. TERMX7 DS 0H SADONE (17) OR ENABLE (27) 02945000
  3085. CLI VIRCOMND,X'27' IS IT 17 OR 27 ? 02946000
  3086. BL CHEKSAD TRF IF 17 (SADONE). 02947000
  3087. BCR 8,R2 "BE CCWGENRL" IF 27 (ENABLE). 02948000
  3088. B CCWINVLD INVALID COMMAND IF > 27. 02949000
  3089. SPACE 02950000
  3090. TERMX9 DS 0H POLL (09) OR DIAL (29) 02951000
  3091. CLI VIRCOMND,X'09' IS IT 09 (AUTO-POLL) ? 02952000
  3092. BE STATMODC YES, SIGNAL STATUS-MODIFIER TYPE COMMAND 02953000
  3093. CLI VIRCOMND,X'29' NO, THEN IT BETTER BE DIAL (29) 02954000
  3094. BCR 8,R2 "BE CCWGENRL" IF YES 02955000
  3095. B CCWINVLD INVALID CCW IF NOT 09 OR 29. 02956000
  3096. SPACE 02957000
  3097. STATMODC OI VIRFLAG,SMCOM AUTOPOLL = STATUS-MODIFIER TYPE COMMAND 02958000
  3098. TM VMFSTAT,VMFAUTO VM USING AUTOPOLL HANDSHAKE ? @V386298 02959000
  3099. BOR R2 YES, FORGET ABOUT AUTOPOLL CCW. @V386298 02960000
  3100. OI MEMO2,HADAPOLL ELSE REMEMBER THAT THIS OCCURRED @V386298 02961000
  3101. BR R2 AND TREAT AS GENERAL CASE. 02962000
  3102. SPACE 02963000
  3103. TERMXA DS 0H INHIBIT (0A) 02964000
  3104. CLI VIRCOMND,X'0A' SHOULD BE '0A' 02965000
  3105. BE READSKIP IF YES, GO CHECK IF SKIP FLAG IS SET. 02966000
  3106. B CCWINVLD INVALID IF NOT 0A. 02967000
  3107. SPACE 02968000
  3108. TERMXB DS 0H SADTWO (1B) 02969000
  3109. CHEKSAD EQU * @VA03262 02970000
  3110. TM VIRCOMND,X'E0' POSSIBLE SAD ? @VA03262 02971000
  3111. BNZ CCWINVLD NO..INVALID CCW @VA03262 02972000
  3112. TM VIRCOMND,X'13' IS IT A SAD ? @VA03262 02973000
  3113. BNO CCWINVLD NO..INVALID CCW @VA03262 02974000
  3114. TERMSAD L R14,VDEVREAL POINT TO REAL DEVICE BLOCK 02975000
  3115. LTR R14,R14 (IF ANY) 02976000
  3116. BZ TERMSILI IF NOT THERE, LEAVE OP-CODE "AS IS" 02977000
  3117. USING RDEVBLOK,R14 02978000
  3118. SLR R15,R15 OBTAIN "SAD" NUMBER 02979000
  3119. IC R15,RDEVSADN ... 02980000
  3120. DROP R14 02981000
  3121. ALR R15,R15 IF 0, 1, 2, 3, MULTIPLY BY 4 02982000
  3122. ALR R15,R15 ... 02983000
  3123. C R15,F16 WAS IT RDEVSADN=4? (= NO-OP) @VA04021 02984000
  3124. LA R15,X'13'(,R15) PLUS X'13' = CORRECT "SAD" CCW COMMAND 02985000
  3125. BL TERMST15 NO -- STORE CORRECT SAD CMD @VA04021 02986000
  3126. LA R15,03 REPLACE SAD WITH NO-OP @VA04021 02987000
  3127. TERMST15 STC R15,RCWCOMND AND STORE CORRECT OP-CODE 02988000
  3128. TERMSILI OI RCWFLAG,SILI ENSURE SILI BIT IS SET 02989000
  3129. B HNDLNOOP AND GO FINISH UP. 02990000
  3130. SPACE 02991000
  3131. TERMXC EQU CCWINVLD "READ BACKWARD" IS INVALID. 02992000
  3132. SPACE 02993000
  3133. TERMXD DS 0H BREAK (0D) 02994000
  3134. CLI VIRCOMND,X'0D' SHOULD BE '0D' 02995000
  3135. BCR 8,R2 "BE CCWGENRL" IF YES. 02996000
  3136. B CCWINVLD INVALID IF NOT 0D. 02997000
  3137. SPACE 02998000
  3138. TERMXE DS 0H SEARCH (0E), ADPREP (1E) @VA05750 02999000
  3139. CLI VIRCOMND,X'0E' SHOULD BE '0E' 03000000
  3140. BE READSKIP IF YES, GO CHECK IF SKIP FLAG IS SET. 03001000
  3141. CLI VIRCOMND,X'1E' OR 'ADDRESS PREPARE' COMMAND @VA05750 03002000
  3142. BNE CCWINVLD INVALID IF NOT (0E) OR (1E) @VA07025 03003000
  3143. OI VIRFLAG,SMCOM STATUS MODIFIER COMMAND @VA07025 03004000
  3144. B READSKIP GO TO CHECK SKIP FLAG @VA07025 03005000
  3145. SPACE 03006000
  3146. TERMXF DS 0H SADTHREE (1F) OR DISABLE (2F) 03007000
  3147. CLI VIRCOMND,X'2F' IS IT 1F OR 2F ? 03008000
  3148. BL CHEKSAD TRF IF 1F (SADTHREE). 03009000
  3149. BCR 8,R2 "BE CCWGENRL" IF 2F (DISABLE). 03010000
  3150. B CCWINVLD INVALID COMMAND IF > 2F. 03011000
  3151. EJECT 03012000
  3152. *. 03012008
  3153. * LOGIC FOR "SDLC" = TERMINAL DEVICE CLASS-ICA SDLC TYPE 03012016
  3154. * 03012024
  3155. * SDLCX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 03012032
  3156. * WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 03012040
  3157. * OTHERWISE HANDLED AS AN INVALID CCW 03012048
  3158. * 03012056
  3159. * SDLCX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 03012064
  3160. * READ (02) HANDLED AS GENERAL CASE OF READ 03012072
  3161. * (CHECK FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03012080
  3162. * OTHERWISE HANDLED AS AN INVALID CCW 03012088
  3163. * 03012096
  3164. * SDLCX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 03012104
  3165. * NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 03012112
  3166. * SET-MODE (23), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012120
  3167. * OTHERWISE HANDLED AS AN INVALID CCW 03012128
  3168. * 03012136
  3169. * SDLCX4 = "SENSE" COMMANDS WITH THE LAST 4 BITS = 4: 03012144
  3170. * SENSE (04), STORES SENSE BYTES FROM VIRTUAL DEVICE BLOCK 03012152
  3171. * IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 03012160
  3172. * OTHERWISE, HANDLED AS GENERAL CASE OF READ 03012168
  3173. * (CHECK FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03012176
  3174. * SENSE SCB (14), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012184
  3175. * SENSE I/O (E4), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012192
  3176. * OTHERWISE HANDLED AS AN INVALID CCW 03012200
  3177. * 03012208
  3178. * SDLCX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5: 03012216
  3179. * WRITE PIU (05), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012224
  3180. * OTHERWISE HANDLED AS AN INVALID CCW 03012232
  3181. * 03012240
  3182. * SDLCX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 03012248
  3183. * READ PIU (06), HANDLED AS GENERAL CASE OR READ 03012256
  3184. * (CHECK FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03012264
  3185. * OTHERWISE HANDLED AS AN INVALID CCW 03012272
  3186. * 03012280
  3187. * SDLCX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 03012288
  3188. * ENABLE (27), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012296
  3189. * OTHERWISE HANDLED AS AN INVALID CCW 03012304
  3190. * 03012312
  3191. * SDLCX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 03012320
  3192. * AUTOPOLL (09), TREATED AS A "STATUS MODIFIER" TYPE OF DATA 03012328
  3193. * TRANSFER; ALSO SET FLAG TO REMEMBER THAT AN AUTOPOLL WAS 03012336
  3194. * PROCESSED (FOR SPECIAL HANDLING OF AUTO-POLL WRAP LIST) 03012344
  3195. * DIAL (29), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012352
  3196. * OTHERWISE HANDLED AS AN INVALID CCW 03012360
  3197. * 03012368
  3198. * SDLCXA = COMMANDS WITH THE LAST 4 BITS = A: 03012376
  3199. * HANDLED AS AN INVALID CCW 03012384
  3200. * 03012392
  3201. * SDLCXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 03012400
  3202. * CONTROL SCB (0B), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012408
  3203. * OTHERWISE HANDLED AS AN INVALID CCW 03012416
  3204. * 03012424
  3205. * SDLCXC = COMMANDS WITH THE LAST 4 BITS = C: 03012432
  3206. * HANDLED AS AN INVALID CCW 03012440
  3207. * 03012448
  3208. * SDLCXD = COMMANDS WITH THE LAST 4 BITS = D: 03012456
  3209. * HANDLED AS AN INVALID CCW 03012464
  3210. * 03012472
  3211. * SDLCXE = COMMANDS WITH THE LAST 4 BITS = E: 03012480
  3212. * HANDLED AS AN INVALID CCW 03012488
  3213. * 03012496
  3214. * SDLCXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 03012504
  3215. * POLL (0F), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012512
  3216. * DISABLE (2F), HANDLED AS GENERAL CASE OF DATA TRANSFER 03012520
  3217. * OTHERWISE HANDLED AS AN INVALID CCW 03012528
  3218. *. 03012536
  3219. SPACE 2 03012544
  3220. SDLCX1 EQU TERMX1 GENERAL CASE DATA TRANSFER @V67CDF1 03012552
  3221. SDLCX2 DS 0H @V67CDF1 03012560
  3222. CLI VIRCOMND,X'02' READ COMMAND? @V67CDF1 03012568
  3223. BE READSKIP YES - GENERAL CASE READ @V67CDF1 03012576
  3224. B CCWINVLD NO - INVALID CCW @V67CDF1 03012584
  3225. SDLCX3 DS 0H @V67CDF1 03012592
  3226. CLI VIRCOMND,X'03' NO-OP COMMAND? @V67CDF1 03012600
  3227. BE HNDLNOOP YES - GENERAL CASE NO-OP @V67CDF1 03012608
  3228. CLI VIRCOMND,X'23' SET MODE COMMAND? @V67CDF1 03012616
  3229. BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012624
  3230. B CCWINVLD NO - INVALID CCW @V67CDF1 03012632
  3231. SDLCX4 CLI VIRCOMND,X'04' SENSE COMMAND? @V67CDF1 03012640
  3232. BE DASDX4 YES - GENERAL CASE OF READ @V67CDF1 03012648
  3233. CLI VIRCOMND,X'14' SENSE SCB? @V67CDF1 03012656
  3234. BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012664
  3235. CLI VIRCOMND,X'E4' SENSE I/O? @V67CDF1 03012672
  3236. BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012680
  3237. B CCWINVLD NO - INVALID CCW @V67CDF1 03012688
  3238. SDLCX5 EQU TERMX5 GENERAL CASE DATA TRANSFER @V67CDF1 03012696
  3239. SDLCX6 EQU TERMX6 GENERAL CASE OF READ @V67CDF1 03012704
  3240. SDLCX7 DS 0H @V67CDF1 03012712
  3241. CLI VIRCOMND,X'27' ENABLE? @V67CDF1 03012720
  3242. BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012728
  3243. B CCWINVLD NO - INVALID CCW @V67CDF1 03012736
  3244. SDLCX9 DS 0H @V67CDF1 03012744
  3245. CLI VIRCOMND,X'29' DIAL? @V67CDF1 03012752
  3246. BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012760
  3247. CLI VIRCOMND,X'09' AUTOPOLL? @V67CDF1 03012768
  3248. BNE CCWINVLD NO - INVALID CCW @V67CDF1 03012776
  3249. OI VIRFLAG,SMCOM TURN ON STATUS MODIFER @V67CDF1 03012784
  3250. BR R2 NOW GENERAL CASE DATA TRANSFER @V67CDF1 03012792
  3251. SDLCXA EQU CCWINVLD INVALID CCW @V67CDF1 03012800
  3252. SDLCXB DS 0H @V67CDF1 03012808
  3253. CLI VIRCOMND,X'0B' CONTROL SCB? @V67CDF1 03012816
  3254. BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012824
  3255. B CCWINVLD NO - INVALID CCW @V67CDF1 03012832
  3256. SDLCXC EQU CCWINVLD INVALID CCW @V67CDF1 03012840
  3257. SDLCXD EQU CCWINVLD INVALID CCW @V67CDF1 03012848
  3258. SDLCXE EQU CCWINVLD INVALID CCW @V67CDF1 03012856
  3259. SDLCXF CLI VIRCOMND,X'0F' POLL? @V67CDF1 03012864
  3260. BER R2 YES - GENERAL CASE DATA TRANSFER @V67CDF1 03012872
  3261. CLI VIRCOMND,X'2F' DISABLE? @V67CDF1 03012880
  3262. BER R2 YES - GENERAL CASE DATA TRANSER @V67CDF1 03012888
  3263. B CCWINVLD NO - INVALID CCW @V67CDF1 03012896
  3264. EJECT 03012904
  3265. *. 03013000
  3266. * LOGIC FOR "DIAL" = "DIALED LINE" DEVICE CLASS 03014000
  3267. * 03015000
  3268. * DIALX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 03016000
  3269. * WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 03017000
  3270. * IF NOT 01, HANDLED AS AN INVALID CCW 03018000
  3271. * 03019000
  3272. * DIALX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 03020000
  3273. * READ (02) HANDLED AS GENERAL CASE "READ" 03021000
  3274. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03022000
  3275. * 03023000
  3276. * IF NOT 02, 12 (FOR 2955), OR 42 (FOR 370X EMULATION LINE), 03024000
  3277. * HANDLED AS AN INVALID CCW 03025000
  3278. * 03026000
  3279. * DIALX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 03027000
  3280. * FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 03028000
  3281. * 03029000
  3282. * FOR EITHER SADZER (13) OR MODE-SET (23), REPLACES OP CODE 03030000
  3283. * BY NO-OP (03), AND SETS SKIP & SILI FLAGS. 03031000
  3284. * 03032000
  3285. * IF > 23, HANDLES AS AN INVALID CCW. 03033000
  3286. * 03034000
  3287. * DIALX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 03035000
  3288. * IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 03036000
  3289. * DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 03037000
  3290. * OTHERWISE, HANDLED AS GENERAL CASE "READ" 03038000
  3291. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03039000
  3292. * 03040000
  3293. * IF RESERVE (F4) OR RELEASE (D4), CHANGES 03041000
  3294. * OP CODE TO 04, SETS SKIP & SILI FLAGBITS 03042000
  3295. * IN REAL CCW, AND HANDLES AS A NO-OP (DOES NOT CLEAR ANY 03043000
  3296. * EXISTING SENSE BYTES) 03044000
  3297. * 03045000
  3298. * IF NOT 04, F4 OR D4, HANDLED AS INVALID CCW 03046000
  3299. * 03047000
  3300. * DIALX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 03048000
  3301. * WRAP (05) HANDLED AS GENERAL CASE OF DATA TRANSFER 03049000
  3302. * IF NOT 05, HANDLED AS AN INVALID CCW 03050000
  3303. * 03051000
  3304. * DIALX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 03052000
  3305. * PREPARE (06) HANDLED AS GENERAL CASE "READ" 03053000
  3306. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03054000
  3307. * 03055000
  3308. * IF NOT 06, HANDLED AS AN INVALID CCW 03056000
  3309. * 03057000
  3310. * DIALX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 03058000
  3311. * FOR SADONE (17), REPLACES OP CODE BY NO-OP (03), 03059000
  3312. * AND SETS SKIP & SILI FLAGS. 03060000
  3313. * 03061000
  3314. * FOR ENABLE (27), CHECKS FLAG IN VIRTUAL DEVICE BLOCK TO SEE 03062000
  3315. * IF THE LINE IS ALREADY ENABLED; IF YES, SETS SKIP FLAG. 03063000
  3316. * IF NOT, REMEMBERS THAT A VIRTUAL ENABLE OCCURRED, AND REVISES 03064000
  3317. * THE CCW TO USE A DATA ARGUMENT OF A "CIRCLE C" (X'1F'). 03065000
  3318. * 03066000
  3319. * IF = 07 OR > 27, HANDLES AS AN INVALID CCW 03067000
  3320. EJECT 03068000
  3321. * DIALX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 03069000
  3322. * WRITE AUTO-POLL (09) TREATED AS A "STATUS MODIFIER" TYPE OF 03070000
  3323. * DATA TRANSFER; ALSO SETS FLAG TO REMEMBER THAT AN AUTO-POLL 03071000
  3324. * WAS PROCESSED (FOR SPECIAL HANDLING OF AUTO-POLL WRAP LIST). 03072000
  3325. * 03073000
  3326. * DIAL (29) HANDLED AS GENERAL CASE OF DATA TRANSFER 03074000
  3327. * 03075000
  3328. * IF NOT 09 OR 29, HANDLED AS AN INVALID CCW 03076000
  3329. * 03077000
  3330. * DIALXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 03078000
  3331. * INHIBIT (0A) HANDLED AS GENERAL CASE "READ" 03079000
  3332. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03080000
  3333. * 03081000
  3334. * IF NOT 0A, HANDLED AS AN INVALID CCW 03082000
  3335. * 03083000
  3336. * DIALXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 03084000
  3337. * CHECKS THAT BITS FOR "SAD" CCW (X'13' BITS) ARE SET; 03085000
  3338. * INVALID CCW IF NOT; FOR SADTWO (1B), REPLACES OP CODE 03086000
  3339. * BY NO-OP (03), AND SETS SKIP & SILI FLAGS. 03087000
  3340. * 03088000
  3341. * DIALXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 03089000
  3342. * HANDLED AS AN INVALID CCW 03090000
  3343. * 03091000
  3344. * DIALXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 03092000
  3345. * BREAK (0D) HANDLED AS GENERAL CASE OF DATA TRANSFER 03093000
  3346. * IF NOT 0D, HANDLED AS AN INVALID CCW 03094000
  3347. * 03095000
  3348. * DIALXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 03096000
  3349. * SEARCH (0E) HANDLED AS GENERAL CASE "READ" 03097000
  3350. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03098000
  3351. * 03099000
  3352. * IF NOT 0E, HANDLED AS AN INVALID CCW 03100000
  3353. * 03101000
  3354. * DIALXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 03102000
  3355. * FOR SADTHREE (1F), REPLACES OP CODE BY NO-OP (03), 03103000
  3356. * AND SETS SKIP & SILI FLAGS. 03104000
  3357. * 03105000
  3358. * FOR DISABLE (2F), RESETS FLAG IN VIRTUAL DEVICE BLOCK, 03106000
  3359. * REMEMBERS THAT A VIRTUAL DISABLE OCCURRED, AND 03107000
  3360. * SETS SKIP FLAG IN THE CCW. 03108000
  3361. * 03109000
  3362. * IF > 2F, HANDLES AS AN INVALID CCW 03110000
  3363. *. 03111000
  3364. SPACE 2 03112000
  3365. * HANDLE VARIOUS COMMANDS FOR "DIALED LINE" CLASS: 03113000
  3366. SPACE 03114000
  3367. *DIALX1 EQU TAPEX1 WRITE (01) 03115000
  3368. SPACE 03116000
  3369. *DIALX2 EQU TAPEX2 READ (02) 03117000
  3370. SPACE 03118000
  3371. DIALX3 DS 0H NOOP (03), SADZER (13), MODE-SET (23) 03119000
  3372. CLI VIRCOMND,X'03' IS IT 03 (NOOP) ? 03120000
  3373. BE HNDLNOOP YES. 03121000
  3374. CLI VIRCOMND,X'23' IS IT 13 OR 23, THEN ? 03122000
  3375. BNH DIALNOOP IF YES, REPLACE BY NO-OP, ETC. 03123000
  3376. B CCWINVLD INVALID COMMAND IF > 23. 03124000
  3377. SPACE 03125000
  3378. DIALX4 EQU TERMX4 SENSE (04), RELEASE (D4), OR RESERVE (F4) 03126000
  3379. SPACE 03127000
  3380. DIALX5 EQU TERMX5 WRAP (05) 03128000
  3381. SPACE 03129000
  3382. DIALX6 EQU TERMX6 PREPARE (06) 03130000
  3383. SPACE 03131000
  3384. DIALX7 DS 0H SADONE (17) OR ENABLE (27) 03132000
  3385. CLI VIRCOMND,X'27' IS IT 17 OR 27 ? 03133000
  3386. BL DIALSAD TRF IF 17 (SADONE). 03134000
  3387. BH CCWINVLD INVALID CCW IF > 27. 03135000
  3388. TM VDEVFLAG,VDEVENAB IF 27 (ENABLE), ALREADY ENABLED ? 03136000
  3389. BO SETSKIP YES - KEEP OP CODE BUT SET SKIP FLAG ETC. 03137000
  3390. XROOM 12 NEED ROOM FOR COMMAND + 1 CONTROL WORD 03138000
  3391. OI MEMO3,VIRTENAB AND REMEMBER WE DID THIS 03139000
  3392. S R7,F4 BACK OFF 4 BYTES ON CONTROL-WORD REGISTER 03140000
  3393. MVI 0(R7),CIRCLEC PUT NEEDED DATA-BYTE THEREIN, AND 03141000
  3394. CLI VDEVTYPE,TYPTTY IS THIS A TELETYPE? @VA11932 03141100
  3395. BNE SRCHID2 NO, CIRCLE C IS OKAY @VA11932 03141200
  3396. MVI 0(R7),X'DF' YES SEND A QUIET IDLE @VA11932 03141300
  3397. B SRCHID2 GO STORE R7 IN ADDRESS FIELD OF CCW, ETC. 03142000
  3398. SPACE 03143000
  3399. DIALX9 EQU TERMX9 POLL (09) OR DIAL (29) 03144000
  3400. SPACE 03145000
  3401. DIALXA EQU TERMXA INHIBIT (0A) 03146000
  3402. SPACE 03147000
  3403. DIALXB DS 0H SADTWO (1B) 03148000
  3404. DIALSAD TM VIRCOMND,X'13' ALL "SAD" COMMANDS MUST HAVE '13' BITS ON 03149000
  3405. BO DIALNOOP IF OK, REPLACE BY NO-OP, ETC. 03150000
  3406. B CCWINVLD INVALID COMMAND IF NOT 1B. 03151000
  3407. SPACE 03152000
  3408. DIALXC EQU CCWINVLD "READ BACKWARD" IS INVALID. 03153000
  3409. SPACE 03154000
  3410. DIALXD EQU TERMXD BREAK (0D) 03155000
  3411. SPACE 03156000
  3412. DIALXE EQU TERMXE SEARCH (0E) 03157000
  3413. SPACE 03158000
  3414. DIALXF DS 0F SADTHREE (1F) OR DISABLE (2F) 03159000
  3415. CLI VIRCOMND,X'2F' IS IT 1F OR 2F ? 03160000
  3416. BL DIALSAD TRF IF 1F (SADTHREE). 03161000
  3417. BH CCWINVLD INVALID CCW IF > 2F. 03162000
  3418. OI MEMO3,VIRTDISA SIGNAL VIRTUAL DISABLE OCCURRED, 03163000
  3419. NI VDEVFLAG,255-VDEVENAB SIGNAL NOW DISABLED 03164000
  3420. B SETSKIP SET SKIP FLAG, CLEAR ADDRESS 03165000
  3421. DIALNOOP LA R15,03 MAKE THE DISABLE (OR WHATEVER) A NO-OP, 03166000
  3422. B TERMSKIP SET SKIP FLAG, STORE OP-CODE, & CLR ADDR 03167000
  3423. EJECT 03168000
  3424. *. 03169000
  3425. * LOGIC FOR "OTHR" = "ALL OTHER" DEVICE CLASSES 03170000
  3426. * (EXCEPT FOR DEDICATED CPU CONSOLES) 03171000
  3427. * 03172000
  3428. * OTHRX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 03173000
  3429. * HANDLED AS GENERAL CASE OF DATA TRANSFER 03174000
  3430. * 03175000
  3431. * OTHRX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 03176000
  3432. * HANDLED AS GENERAL CASE "READ" 03177000
  3433. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03178000
  3434. * 03179000
  3435. * OTHRX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 03180000
  3436. * FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 03181000
  3437. * IF NOT 03, HANDLED AS GENERAL CASE OF DATA TRANSFER 03182000
  3438. * 03183000
  3439. * OTHRX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 03184000
  3440. * IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 03185000
  3441. * DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 03186000
  3442. * OTHERWISE, HANDLED AS GENERAL CASE "READ" 03187000
  3443. * FOR A 3800 PRINTER, DO THE BUFFER UNLOAD FOR X'24' @V60B9BA 03188000
  3444. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03189000
  3445. * 03190000
  3446. * OTHRX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5 03191000
  3447. * HANDLED AS GENERAL CASE OF DATA TRANSFER 03192000
  3448. * 03193000
  3449. * OTHRX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 03194000
  3450. * HANDLED AS GENERAL CASE "READ" 03195000
  3451. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03196000
  3452. * 03197000
  3453. * OTHRX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 03198000
  3454. * HANDLED AS GENERAL CASE OF DATA TRANSFER 03199000
  3455. * 03200000
  3456. * OTHRX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 03201000
  3457. * HANDLED AS GENERAL CASE OF DATA TRANSFER 03202000
  3458. * 03203000
  3459. * OTHRXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 03204000
  3460. * HANDLED AS GENERAL CASE "READ" 03205000
  3461. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03206000
  3462. * 03207000
  3463. * OTHRXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 03208000
  3464. * HANDLED AS GENERAL CASE OF DATA TRANSFER 03209000
  3465. * 03210000
  3466. * OTHRXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 03211000
  3467. * HANDLED AS GENERAL CASE "READ BACKWARD" 03212000
  3468. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03213000
  3469. * 03214000
  3470. * OTHRXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 03215000
  3471. * HANDLED AS GENERAL CASE OF DATA TRANSFER 03216000
  3472. * 03217000
  3473. * OTHRXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 03218000
  3474. * HANDLED AS GENERAL CASE "READ" 03219000
  3475. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 03220000
  3476. * 03221000
  3477. * OTHRXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 03222000
  3478. * HANDLED AS GENERAL CASE OF DATA TRANSFER 03223000
  3479. *. 03224000
  3480. SPACE 2 03225000
  3481. * HANDLE VARIOUS COMMANDS FOR ALL OTHER CLASSES: 03226000
  3482. SPACE 03227000
  3483. OTHRX1 EQU CCWGENRL GENERAL CASE "WRITE" 03228000
  3484. SPACE 03229000
  3485. OTHRX2 EQU READSKIP GENERAL CASE "READ" 03230000
  3486. SPACE 03231000
  3487. *OTHRX3 EQU DEDDX3 SORT OUT NO-OP FROM POSSIBLE DATA XFERS 03232000
  3488. SPACE 03233000
  3489. OTHRX4 EQU DASDX4 "SENSE" (04) OR OTHER 03234000
  3490. * (NOTE: CCWCTL = 0) 03235000
  3491. SPACE 03236000
  3492. OTHRX5 EQU CCWGENRL GENERAL CASE "WRITE" 03237000
  3493. SPACE 03238000
  3494. OTHRX6 EQU READSKIP GENERAL CASE "READ" 03239000
  3495. SPACE 03240000
  3496. OTHRX7 EQU CCWGENRL ASSUME POSSIBLE DATA TRANSFER 03241000
  3497. SPACE 03242000
  3498. OTHRX9 EQU * @V240820 03243000
  3499. LA R0,CLASSPEC*256+TYP3705 CHECK FOR 3704/5 NCP @V240820 03244000
  3500. CH R0,VDEVTYPC IS THIS A 3704 OR 3705 ? @V240820 03245000
  3501. BNER R2 NO -- GENERAL CASE WRITE @V240820 03246000
  3502. CLI VIRCOMND,X'09' 370X WRITE BREAK COMMAND ? @V240820 03247000
  3503. BNER R2 NO -- @V240820 03248000
  3504. TM VIRFLAG,CC IS COMMAND CHAIN ON? @VA05860 03249000
  3505. BNOR R2 NO - GENERAL CASE WRITE @VA05860 03250000
  3506. OI VIRFLAG,SMCOM MAY BE A STATUS MODIFIER CCW @V240820 03251000
  3507. BR R2 TREAT AS GENERAL CASE WRITE @V240820 03252000
  3508. SPACE 03253000
  3509. OTHRXA EQU READSKIP GENERAL CASE "READ" 03254000
  3510. SPACE 03255000
  3511. *OTHRXC EQU DRAWKCAB ASSUME "READ BACKWARD" POSSIBLY VALID. 03256000
  3512. SPACE 03257000
  3513. OTHRXD EQU CCWGENRL GENERAL CASE "WRITE" 03258000
  3514. SPACE 03259000
  3515. OTHRXE EQU READSKIP GENERAL CASE "READ" 03260000
  3516. SPACE 03261000
  3517. OTHRXF EQU CCWGENRL ASSUME POSSIBLE DATA TRANSFER 03262000
  3518. SPACE 2 03263000
  3519. OTHRXB CLI VIRCOMND,X'5B' SPECIAL 1287 READER CCW ? @VM08862 03264000
  3520. BNER R2 NO -- CCWGENRL CAN HANDLE IT @VM08862 03265000
  3521. CK1287 TM VDEVTYPC,CLASURI+CLASSPEC URI OR DUMMY ? @VM08862 03266000
  3522. BZR R2 NEITHER - CCWGENRL @VM08862 03267000
  3523. CLI VDEVTYPE,TYP1442R GENNED AS A 1442 ? @VM08862 03268000
  3524. BE CCW1287 YES - STATUS MODIFIER CMD @VM08862 03269000
  3525. CLI VDEVTYPE,TYPUNSUP GENNED AS A DUMMY ? @VM08862 03270000
  3526. BNER R2 NO -- GO TO CCWGENRL @VM08862 03271000
  3527. L R15,VDEVREAL GET THE RDEVBLOK ADDRESS @VM08862 03272000
  3528. CLI RDEVFTR-RDEVBLOK(R15),CLASURI SUB-CLASS URI ? @VM08862 03273000
  3529. BNER R2 NO -- CCWGENRL @VM08862 03274000
  3530. CCW1287 OI VIRFLAG,SMCOM STATUS MODIFIER TYPE COMMAND @VM08862 03275000
  3531. BR R2 . . . @VM08862 03276000
  3532. EJECT 03277000
  3533. * HANDLE VARIOUS COMMANDS FOR MSC PORT ADDRESSES ON 3851 MSS 03278000
  3534. SPACE 03279000
  3535. *. 03280000
  3536. * LOGIC FOR 3851 MSC PORT ADDRESS 03281000
  3537. * 03282000
  3538. * ALL HOST-TO-MSC COMMAND CODES WILL BE ALLOWED TO PASS THROUGH. 03283000
  3539. * THE 3851 WILL BE TREATED AS 'CLASSPEC'; A NEW TABLE WILL BE CREATED 03284000
  3540. * IN DMKCCW (MSCTBL) TO IDENTIFY THE ROUTINE WHICH WILL HANDLE 03285000
  3541. * EACH COMMAND CODE. THE MSC COMMAND CODES WILL BE HANDLED IN THE 03286000
  3542. * FOLLOWING MANNER: 03287000
  3543. * 03288000
  3544. * MSCX1 = ALL MSC COMMAND CODES WITH THE LAST 4 BITS EQUAL 1. 03289000
  3545. * 03290000
  3546. * DIAGNOSTIC WRITE (X'41') 03291000
  3547. * 03292000
  3548. * 1. THE DIAGNOSTIC WRITE COMMAND WILL BE HANDLED AS A NORMAL CASE 03293000
  3549. * WRITE CCW (CCWGENRL). 03294000
  3550. * 03295000
  3551. * 2. ALL OTHER COMMAND CODES IDENTIFIED BY A ONE IN THE LAST FOUR 03296000
  3552. * BITS OF THE OPCODE WILL BE TREATED AS INVALID (CCWINVLD). 03297000
  3553. * 03298000
  3554. * MSCX2 - 3851 COMMAND CODES WITH LAST 4 BITS EQUAL 2. 03299000
  3555. * 03300000
  3556. * DIAGNOSTIC READ (X'42') 03301000
  3557. * 03302000
  3558. * 1. THE DIAGNOSTIC READ CCW WILL BE HANDLED AS NORMAL CASE READ CCW 03303000
  3559. * (READSKIP). 03304000
  3560. * 03305000
  3561. * 2. OTHER CCWS WITH THE LAST FOUR BITS OF THE OPCODE EQUAL TWO WILL 03306000
  3562. * BE HANDLED AS INVALID FOR THE 3851 (CCWINVLD). 03307000
  3563. * 03308000
  3564. * MSCX3 - 3851 COMMAND CODES WITH THE LAST 4 BITS EQUAL 3 03309000
  3565. * 03310000
  3566. * DIAGNOSTIC CONTROL (X'43') 03311000
  3567. * 03312000
  3568. * 1. THE DIAGNOSTIC CONTROL CCW WILL BE HANDLED THE SAME AS A 03313000
  3569. * DIAGNOSTIC WRITE. 03314000
  3570. * 03315000
  3571. * NO OPERATION/MODIFIED NO OPERATION (X'03', X'A3') 03316000
  3572. * 03317000
  3573. * 1. BOTH OF THESE COMMAND CODES WILL BE HANDLED AS A NORMAL 03318000
  3574. * NO OPERATION. 03319000
  3575. * 03320000
  3576. * ALL OTHER COMMAND CODES WITH THE LAST FOUR BITS OF OPCODE EQUAL TO 03321000
  3577. * THREE WILL BE TREATED AS INVALID CCWS. 03322000
  3578. * 03323000
  3579. * SENSE (X'04') 03324000
  3580. * 03325000
  3581. * 1. THE X'04' CCW WILL BE TREATED AS A NORMAL SENSE (HNDLSENS). 03326000
  3582. * 03327000
  3583. * SENSE I/O (X'E4') 03328000
  3584. * 03329000
  3585. * 1. THIS CCW WILL BE TREATED AS A GENERAL CASE READ; SEVEN BYTES 03330000
  3586. * OF DATA ARE RETURNED TO THE HOST. PREVIOUS SENSE DATA IS LOST. 03331000
  3587. * 03332000
  3588. * READ BUFFERED LOG (X'A4') 03333000
  3589. * 03334000
  3590. * 1. THIS CCW WILL EFFECTIVELY BE TREATED AS A READ CCW WITH THE 03335000
  3591. * SENSE DATA SAVED. 03336000
  3592. * 03337000
  3593. * SWITCH (X'44') 03338000
  3594. * 03339000
  3595. * 1. THE SWITCH CCW WILL BE HANDLED AS A NO OPERATION. 03340000
  3596. * 03341000
  3597. * ALL OTHER COMMAND OPCODES WITH THE LAST 4 BITS EQUAL 4 WILL 03342000
  3598. * BE TREATED AS INVALID CCWS. 03343000
  3599. * 03344000
  3600. * MSCX6 - 3851 MSC COMMAND CODES WITH LAST 4 BITS OF OPCODE EQUAL 6 03345000
  3601. * 03346000
  3602. * PREPARED READ DATA (X'26') 03347000
  3603. * 03348000
  3604. * 1. THE ADDRESS PORTION OF THIS CCW IS NOT USED. THE PREPARE READ 03349000
  3605. * DATA CCW WILL BE TREATED AS A NO OPERATION EXCEPT THAT THE SVSEN FLAG 03350000
  3606. * IN VIRFLAG WILL NOT BE SET TO SAVE THE SENSE DATA. 03351000
  3607. * 03352000
  3608. * 2. IF THE VIRTUAL ADDRESS IN THE CCW IS INVALID, IT IS NOT A 03353000
  3609. * FATAL CONDITION FOR THE PREPARE READ DATA CCW. 03354000
  3610. * 03355000
  3611. * READ DATA (X'06') 03356000
  3612. * 03357000
  3613. * 1. THIS CCW WILL BE HANDLED AS A GENERAL CASE READ. 03358000
  3614. * 03359000
  3615. * ALL OTHER COMMAND CODES WITH THE LAST 4 BITS OF THE OPCODE 03360000
  3616. * EQUAL 6 WILL BE TREATED AS INVALID CCWS. 03361000
  3617. * 03362000
  3618. * MSCX7 - 3851 MSC COMMAND CODES WITH LAST 4 BITS EQUAL 7. 03363000
  3619. * 03364000
  3620. * INTERROGATE SYSTEM (X'27') 03365000
  3621. * 03366000
  3622. * 1. ALL INTERROGATE SYSTEM CCWS WILL BE TREATED AS GENERAL CASE WRITE 03367000
  3623. * CCWS. 03368000
  3624. * 03369000
  3625. * EXECUTE (X'87') 03370000
  3626. * 03371000
  3627. * 1. THE EXECUTE CCW WILL BE TREATED AS A GENERAL CASE WRITE. 03372000
  3628. * 03373000
  3629. * ALL OTHER COMMAND OPCODES WITH THE LAST 4 BITS OF THE OPCODE 03374000
  3630. * EQUAL 7 WILL BE TREATED AS INVALID CCWS. 03375000
  3631. *. 03376000
  3632. EJECT 03377000
  3633. MSCX1 EQU CCWGENRL DIAGNOSTIC WRITE @V407466 03378000
  3634. SPACE 03379000
  3635. MSCX2 EQU READSKIP DIAGNOSTIC READ @V407466 03380000
  3636. SPACE 03381000
  3637. MSCX3 EQU * @V407466 03382000
  3638. CLI VIRCOMND,DIAGCNT DIAG. CONTROL X'43' @V407466 03383000
  3639. BE CCWGENRL HANDLE SAME AS DIAG WRITE @V407466 03384000
  3640. CLI VIRCOMND,NOP NO-OPERATION (X'03') @V407466 03385000
  3641. BE HNDLNOOP YES @V407466 03386000
  3642. CLI VIRCOMND,MODNOP MODIFIED NOP (X'A3') @V407466 03387000
  3643. BE HNDLNOOP YES @V407466 03388000
  3644. B CCWINVLD ALL OTHERS INVALID FOR 3851 @V407466 03389000
  3645. SPACE 03390000
  3646. MSCX4 EQU * @V407466 03391000
  3647. CLI VIRCOMND,SENSE04 SENSE CCW (X'04') @V407466 03392000
  3648. BE HNDLSENS TREAT AS NORMAL SENSE @V407466 03393000
  3649. CLI VIRCOMND,SENSEE4 SENSE I/O (X'E4') @V407466 03394000
  3650. BE E4 TREAT AS GEN CASE READ @V407466 03395000
  3651. CLI VIRCOMND,SENSE44 SWITCH (X'44') @V407466 03396000
  3652. BNE CCWINVLD INVALID FOR 3851 @V407466 03397000
  3653. TM RCWFLAG,IDA IDA PRESENT? @V407466 03398000
  3654. BZ CCWNXT14 NO, BRANCH @V407466 03399000
  3655. B CTLCMDID @V407466 03400000
  3656. E4 TM RCWFLAG,SKIP SKIP FLAG SET ? @V407466 03401000
  3657. BO E4B YES, SAVE SENSE DATA @V407466 03402000
  3658. OI VIRFLAG,SVSEN SAVE SENSE DATA @V407466 03403000
  3659. BR R2 GO TO CCWGENRL @V407466 03404000
  3660. E4B OI VIRFLAG,SVSEN SAVE SENSE DATA @V407466 03405000
  3661. B CLEARADD PROCESS AS NORMAL READ @V407466 03406000
  3662. SPACE 03407000
  3663. MSCX5 EQU CCWINVLD INVALID FOR 3851 @V407466 03408000
  3664. SPACE 03409000
  3665. MSCX6 EQU * @V407466 03410000
  3666. CLI VIRCOMND,RDATA READ DATA (X'06') @V407466 03411000
  3667. BER R2 YES, GO TO CCWGENRL @V407466 03412000
  3668. CLI VIRCOMND,PREPRD PREPARE READ DATA (X'26') @V407466 03413000
  3669. BNE CCWINVLD ALL OTHERS INVALID @V407466 03414000
  3670. TM RCWFLAG,IDA IS IDA PRESENT? @V407466 03415000
  3671. BZ CCWNXT14 NO, BRANCH @V407466 03416000
  3672. B CTLCMDID GO CHECK THE IDAL @V407466 03417000
  3673. SPACE 03418000
  3674. MSCX7 EQU CCWGENRL @V407466 03419000
  3675. SPACE 03420000
  3676. MSCX8 EQU CCWINVLD @V407466 03421000
  3677. MSCX9 EQU CCWINVLD @V407466 03422000
  3678. MSCXA EQU CCWINVLD @V407466 03423000
  3679. MSCXB EQU CCWINVLD @V407466 03424000
  3680. MSCXC EQU CCWINVLD @V407466 03425000
  3681. MSCXD EQU CCWINVLD @V407466 03426000
  3682. MSCXE EQU CCWINVLD @V407466 03427000
  3683. MSCXF EQU CCWINVLD @V407466 03428000
  3684. EJECT 03429000
  3685. * SUBROUTINES TO PERFORM A "TRANS - BRING/DEFER" OR 03430000
  3686. * A "TRANS - BRING/DEFER/LOCK" - TO SAVE SPACE: 03431000
  3687. * 03432000
  3688. * AT ENTRY: 03433000
  3689. * R1 = VIRTUAL ADDRESS TO BE TRANSLATED 03434000
  3690. * R14 = RETURN REGISTER 03435000
  3691. * 03436000
  3692. * AT EXIT: 03437000
  3693. * R1 = VIRTUAL ADDRESS 03438000
  3694. * R2 = REAL ADDRESS 03439000
  3695. * CONDITION-CODE SET FROM LRA, DMKPTRLK, OR DMKPTRAN 03440000
  3696. * (CC = 0 IF VIRTUAL ADDRESS WAS LEGITIMATE, AND PAGE IS 03441000
  3697. * IN CORE, OR HAS BEEN BROUGHT INTO CORE WITHOUT ERROR) 03442000
  3698. * 03443000
  3699. * ENTER AT "TRANBRNG" TO PERFORM "TRANS - BRING/DEFER" 03444000
  3700. * OR 03445000
  3701. * ENTER AT "TRANLOCK" TO PERFORM "TRANS - BRING/DEFER/LOCK" 03446000
  3702. SPACE 03447000
  3703. *. 03448000
  3704. *********************************************************************** 03449000
  3705. * 03450000
  3706. * 03451000
  3707. * CP ASSIST INSTRUCTION "TRANBRNG" - TEST PAGE STATUS 03452000
  3708. * 03453000
  3709. * 03454000
  3710. * OPERANDS: 03455000
  3711. * 1 = ADDRESS OF 'ACORETBL' (ADDR OF THE ADDR OF 'CORTABLE') 03456000
  3712. * 2 = EXIT ADDRESS 03457000
  3713. * 03458000
  3714. * REGISTER INPUT: 03459000
  3715. * GPR 1 = VIRTUAL ADDRESS WITHIN THE PAGE 03460000
  3716. * 03461000
  3717. * SYSTEM DATA AREAS REFERENCED (BY MODULE): 03462000
  3718. * DMKSYS - 'CORTABLE' 03463000
  3719. * 03464000
  3720. * 03465000
  3721. * EXITS: 03466000
  3722. * 03467000
  3723. * 1. OPERAND 2 ADDRESS (NORMAL COMPLETION) 03468000
  3724. * 03469000
  3725. * REGISTER OUTPUT: 03470000
  3726. * GPR 2 = REAL ADDRESS THAT MAPS TO GPR 1 VIRTUAL ADDRESS 03471000
  3727. * 03472000
  3728. * 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL COMPLETION) 03473000
  3729. * 03474000
  3730. * NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT TO A NO-OP. 03475000
  3731. * 03476000
  3732. *********************************************************************** 03477000
  3733. *. 03478000
  3734. SPACE 03479000
  3735. TRANBRNG DS 0F 'TRANS' IN USER PAGE %V3M4038 03480000
  3736. ST R14,SAVREG14 SAVE CALLERS'S R14 %V3M4038 03481000
  3737. TRANBRG1 LRA R2,0(,R1) ATTEMPT TO GET REAL PAGE ADDRESS %V3M4038 03482000
  3738. BNZ TRANBRG2 NOT IN STORAGE - BRING IT IN %V3M4038 03483000
  3739. BAL R14,CCWCHKSH CHECK IT FOR SHARED PAGE %V3M4038 03484000
  3740. BZ TRANRETN NOT SHARED - RETURN TO CALLER %V3M4038 03485000
  3741. BAL R14,CKSHRCHG SEE IF PAGE WAS CHANGED @V304735 03486000
  3742. NOTLCK BNZ TRANBRG1 @VA12785 03487100
  3743. B TRANRETN RETURN TO CALLER @V304735 03488000
  3744. SPACE 1 03489000
  3745. TRANBRG2 LA R2,(BRING+DEFER) OPT. TO BRING IT IN @V304735 03490000
  3746. CALL DMKPTRAN BRING IN USERS PAGE @V304735 03491000
  3747. B TRANRETN RETURN TO CALLER @V304735 03492000
  3748. SPACE 03493000
  3749. *. 03494000
  3750. *********************************************************************** 03495000
  3751. * 03496000
  3752. * 03497000
  3753. * CP ASSIST INSTRUCTION "TRANLOCK" - TEST PAGE STATUS AND LOCK 03498000
  3754. * 03499000
  3755. * 03500000
  3756. * OPERANDS: 03501000
  3757. * 1 = ADDRESS OF 'ACORETBL' (ADDR OF THE ADDR OF 'CORTABLE') 03502000
  3758. * 2 = EXIT ADDRESS 03503000
  3759. * 03504000
  3760. * REGISTER INPUT: 03505000
  3761. * GPR 1 = VIRTUAL ADDRESS WITHIN THE PAGE 03506000
  3762. * 03507000
  3763. * SYSTEM DATA AREAS REFERENCED (BY MODULE): 03508000
  3764. * DMKSYS - 'CORTABLE' 03509000
  3765. * 03510000
  3766. * 03511000
  3767. * EXITS: 03512000
  3768. * 03513000
  3769. * 1. OPERAND 2 ADDRESS (NORMAL COMPLETION) 03514000
  3770. * 03515000
  3771. * REGISTER OUTPUT: 03516000
  3772. * GPR 2 = REAL ADDRESS THAT MAPS TO GPR 1 VIRTUAL ADDRESS 03517000
  3773. * 03518000
  3774. * 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL COMPLETION) 03519000
  3775. * 03520000
  3776. * NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT TO A NO-OP. 03521000
  3777. * 03522000
  3778. *********************************************************************** 03523000
  3779. *. 03524000
  3780. SPACE 03525000
  3781. TRANLOCK DS 0F 'TRANS' IN USER PAGE AND LOCK IT %V3M4038 03526000
  3782. ST R14,SAVREG14 SAVE CALLER'S R14 %V3M4038 03527000
  3783. TRANLCK1 LRA R2,0(,R1) ATTEMPT TO GET REAL ADDRESS %V3M4038 03528000
  3784. BNZ TRANCALL NOT RESIDENT - BRING IN AND LOCK %V3M4038 03529000
  3785. L R15,APTRLK A(DMKPTRLK) LOCK ROUTINE %V3M4038 03530000
  3786. BALR R14,R15 LOCK THIS PAGE %V3M4038 03531000
  3787. BAL R14,CCWCHKSH CHECK IF SHARED PAGE %V3M4038 03532000
  3788. BZ TRANRETN IF NOT - RETURN TO USER %V3M4038 03533000
  3789. BAL R14,CKSHRCHG TEST IF PAGE WAS CHANGED @V304735 03534000
  3790. BZ COPYPAGE NOT CHANGED, GO COPY IT @VA05378 03535000
  3791. CALL DMKPTRUL UNLOCK THE PAGE @VA05378 03536000
  3792. B TRANLCK1 REISSUE 'TRANS' @VA05378 03537000
  3793. SPACE 1 03538000
  3794. TRANCALL LA R2,(BRING+DEFER+LOCK) BRING/LOCK @V304735 03539000
  3795. CALL DMKPTRAN CALL PAGING MANAGER @V304735 03540000
  3796. BNZ TRANRETN ON ADDRESSING ERROR RETURN @V304735 03541000
  3797. BAL R14,CCWCHKSH IS THIS A SHARED PAGE ? @V304735 03542000
  3798. BZ TRANRETN NO - RETURN TO CALLER @V304735 03543000
  3799. SPACE 1 03544000
  3800. COPYPAGE TM VIRCOMND,X'01' WRITE TYPE COMMAND ? @V304735 03545000
  3801. BO GETPAGE YES - GET A NEW PAGE @V304735 03546000
  3802. ST R10,TEMPR10 SAVE REGISTER @V304735 03547000
  3803. BAL R10,CHKCAWKY CHECK CAW FOR PROTECTION @V304735 03548000
  3804. L R10,TEMPR10 RESTORE REGISTER @V304735 03549000
  3805. B TRANSCC0 RETURN TO LINE CODE @V304735 03550000
  3806. GETPAGE TM RCWFLAG,IDA MIGHT BE SHR+NONSHR PAGES @V304735 03551000
  3807. BO TRANSCC0 DON'T ALLOW IDA FOR SHARED PAGES @V304735 03552000
  3808. SVC 20 GET A PLACE TO SAVE REGISTERS @V304735 03553000
  3809. STM R0,R11,SAVEREGS SAVE THESE @V304735 03554000
  3810. XC SAVER12,SAVER12 SET UP FOR RELEASE (SVC-16) @V304735 03555000
  3811. LA R15,1 GET INCREMENT OF 1 @V407508 03556000
  3812. AL R15,SHRLKCNT ADD ONE TO CPSHRLK COUNT @V407508 03557000
  3813. ST R15,SHRLKCNT STORE UPDATED COUNT @V407508 03558000
  3814. OI CPSTAT2,CPSHRLK FREEZE THE SYSTEM @V304735 03559000
  3815. CALL DMKPTRFR,AFFINITY GET A NEW PAGE @VA10216 03560500
  3816. L R15,SHRLKCNT GET CURRENT CPSHRLK COUNT @V407508 03561000
  3817. BCTR R15,0 DECREMENT COUNT BY 1 @V407508 03562000
  3818. ST R15,SHRLKCNT STORE UPDATED COUNT @V407508 03563000
  3819. LTR R15,R15 TEST IF THE COUNT IS NOW 0 @V407508 03564000
  3820. BNZ *+8 NO, SKIP RESET OF CPSHRLK @V407508 03565000
  3821. NI CPSTAT2,X'FF'-CPSHRLK NOW CAN RUN USERS @V304735 03566000
  3822. MVI CORFLAG-CORTABLE(R7),CORFLUSH @V408246 03567000
  3823. OI RCWCTL,RCWSHR FLAG GOTTEN FROM DMKPTRFR @V304735 03568000
  3824. LR R14,R7 CORTABLE ADDRESS OF THIS PAGE @V304735 03569000
  3825. SL R14,ACORETBL LEAVE INDEX PORTION OF CORTABLE @V304735 03570000
  3826. SLL R14,8 R14 = NOW REAL PAGE ADDRESS @V304735 03571000
  3827. L R3,F4096 4096 BYTES TO MOVE @V304735 03572000
  3828. LR R15,R3 ALSO FOR 'R1+1' REGISTER @V304735 03573000
  3829. N R2,XPAGNUM DROP OFF DISPLACEMENT @V304735 03574000
  3830. MVCL R14,R2 MOVE ORIGINAL TO NEW @V304735 03575000
  3831. SL R14,F4096 'MVCL' CLOBBERED R14 @V304735 03576000
  3832. L R2,SAVER2 RESTORE ORIGINAL PAGE ADDRESS @V304735 03577000
  3833. LR R15,R2 GET ORIGINAL PAGE ADDRESS @V304735 03578000
  3834. N R15,XPAGNUM CLEAR DISPLACEMENT @V304735 03579000
  3835. SRL R15,8 INDEX INTO CORETBL @V304735 03580000
  3836. AL R15,ACORETBL FIND ACTUAL CORETBL ENTRY @V304735 03581000
  3837. L R15,CORSWPNT-CORTABLE(,R15) POINTER TO SWAP @V304735 03582000
  3838. L R15,SWPFLAG-SWPFLAG(,R15) GET KEYS. @V304735 03583000
  3839. N R15,=A(X'F8F8') CLEAR CHANGE/REFERENCE BITS @V304735 03584000
  3840. LA R14,2048(,R14) LAST HALF OF NEW PAGE @V304735 03585000
  3841. SSK R15,R14 SET UP THE KEY @V304735 03586000
  3842. SRL R15,8 POSITION FOR FIRST HALF PAGE @V304735 03587000
  3843. N R14,XPAGNUM BACK TO BEGINING ADDRESS @V304735 03588000
  3844. SSK R15,R14 SET THE REAL KEY @V304735 03589000
  3845. L R1,SAVER2 GET ADDRESS OF ORIGINAL PAGE @V304735 03590000
  3846. N R1,F4095 LEAVE JUST THE DISPLACEMENT @V304735 03591000
  3847. OR R1,R14 PUT IN REPLACEMENT PAGE NUMBER @V304735 03592000
  3848. ST R1,SAVER2 THIS BECOMES NEW PAGE ADDRESS @V304735 03593000
  3849. CALL DMKPTRUL UNLOCK THE ORIGINAL PAGE @V304735 03594000
  3850. L R15,VMACNT2 GET STAT. COUNTER @V304735 03595000
  3851. LA R15,1(,R15) ADD ONE TO IT @V304735 03596000
  3852. ST R15,VMACNT2 SAVE NEW TOTAL @V304735 03597000
  3853. LM R0,R11,SAVEREGS RESTORE ALL THE REMAINING @V304735 03598000
  3854. SVC 16 NOW RELEASE THIS SAVE AREA. @V304735 03599000
  3855. TRANSCC0 CLI *+1,X'00' SET CONDITION CODE FOR CALLER @V304735 03600000
  3856. TRANRETN L R14,SAVREG14 RESTORE CALLERS REGISTER %V3M4038 03601000
  3857. BR R14 RETURN TO CALLER %V3M4038 03602000
  3858. SPACE 1 03603000
  3859. EJECT 03604000
  3860. * VARIOUS CONSTANTS: 03605000
  3861. F2047 DC F'2047' 03606000
  3862. F2048 DC F'2048' 03607000
  3863. CIRCLEC EQU X'1F' ... 03608000
  3864. SPACE 03609000
  3865. * DUMMY SEEK CCW, AND DUMMY CCW FOR "READ IPL" (02): 03610000
  3866. DUMSEEK DC X'07',AL3(*-*),AL1(CC),AL1(RCWGEN+RCWREL),AL2(06) 03611000
  3867. DUMRDIPL DC X'1A',AL3(000),AL1(CC+SKIP),AL1(RCWGEN),AL2(05) 03612000
  3868. SPACE 03613000
  3869. SPACE 03614000
  3870. * "CCWCHKEY" = SUBROUTINE TO DETERMINE IF SENSE-BYTES CAN 03615000
  3871. * BE STORED IN USER'S MEMORY (GIVEN BY R2 AFTER A "TRANS") 03616000
  3872. * AT ENTRY: 03617000
  3873. * GPR 2 = REAL DATA ADDRESS 03618000
  3874. * GPR 14 = RETURN ADDRESS 03619000
  3875. * OTHER REGISTERS AS "IN USE" BY "CNTRLSBW" SUBROUTINE. 03620000
  3876. * AT EXIT: 03621000
  3877. * CONDITION CODE 0 = OK TO STORE DATA IN USER'S MEMORY. 03622000
  3878. * CONDITION CODE NONZERO = DO NOT STORE DATA THEREIN. 03623000
  3879. * 03624000
  3880. * NOTES: 03625000
  3881. * SAVER2 HOLDS THE ORIGINAL CAW (INCLUDING HIGH-ORDER BYTE) 03626000
  3882. * 03627000
  3883. CCWCHKEY EQU * CHECK FOR PROTECTION VIOLATIONS 03628000
  3884. L R15,X2048BND MASK FOR ALIGNMENT 03629000
  3885. NR R15,R2 R15 = REAL ADDR OF STORAGE KEY BLOCK 03630000
  3886. ISK R15,R15 GET THE REAL STORAGE KEY 03631000
  3887. N R15,F240 FOUR BITS ONLY 03632000
  3888. TM SAVER2,X'F0' CHECK USER'S CAW KEY = 0 @V304735 03633000
  3889. BZ CCWCHKSH IF = 00 , CHECK FOR SHARED PAGE @V304735 03634000
  3890. CLM R15,1,SAVER2 DOES REAL = VIRTUAL KEY @V304735 03635000
  3891. BNER R14 NO MIS-MATCHED, RETURN TO CALLER @V304735 03636000
  3892. CCWCHKSH TM VMOSTAT,VMSHR USER RUNNING A SHARED SYSTEM %V3M4038 03637000
  3893. BZR R14 NO - SET CC = 0 %V3M4038 03638000
  3894. ST R15,TEMPR15 SAVE REAL KEY %V3M4038 03639000
  3895. LR R15,R2 LOAD REAL STORAGE ADDRESS %V3M4038 03640000
  3896. N R15,XPAGNUM DROP DISPLACEMENT %V3M4038 03641000
  3897. SRL R15,8 INDEX VALUE INTO CORTABLE %V3M4038 03642000
  3898. AL R15,ACORETBL ADDRESS OF CORTABLE ENTRY %V3M4038 03643000
  3899. TM CORFLAG-CORTABLE(R15),CORSHARE SET CC = %V3M4038 03644000
  3900. L R15,TEMPR15 RESTORE REAL STORAGE KEY %V3M4038 03645000
  3901. BR R14 LEAVE WITH CC INTACK %V3M4038 03646000
  3902. SPACE 2 03647000
  3903. * VIRTUAL ADDRESS IN A CCW IS INVALID - CHECK WHETHER FATAL OR NOT: 03648000
  3904. * 03649000
  3905. ADDRCHEK TM VIRCOMND,X'03' "CONTROL" COMMAND - 03/07/0B/0F ? 03650000
  3906. BO CCWNXT3 YES - THAT'S GOOD. 03651000
  3907. TM VIRCOMND,X'01' "WRITE" - 01/05/09/0D ? 03652000
  3908. BO CCWBAD4 INVALID ADDRESS @VA03162 03653000
  3909. TM VIRCOMND,X'07' 00 (MAYBE OK FOR ISAM) OR 08 (TIC) ? 03654000
  3910. BZ CCWNXT3 YES - REGULAR CODE CAN HANDLE. 03655000
  3911. CLI VIRCOMND,PREPRD ADDR PORTION OF CCW NOT USED @V407466 03656000
  3912. BE CCWNXT3 CONSIDER PREP. READ DATA VALID @V407466 03657000
  3913. TM RCWFLAG,SKIP MUST BE READ OR SENSE - 02/04/06/0A/0C/0E 03658000
  3914. BO CCWNXT3 OK FOR THESE IF SKIP FLAG IS SET, 03659000
  3915. B CCWBAD4 INVALID ADDRESS @VA03162 03660000
  3916. EJECT 03661000
  3917. USING VDEVBLOK,R8 IN EFFECT WHEN WE GET HERE @VA04000 03662000
  3918. SPACE 03663000
  3919. * TAPEX- CODE NOT REQUIRING INTERNAL TRANSFERS: 03664000
  3920. SPACE 03665000
  3921. TAPEX1 EQU CCWGENRL "WRITE" (X1) @VA01331 03666000
  3922. SPACE 1 03667000
  3923. TAPEX2 EQU READSKIP "READ" (X2) @VA01331 03668000
  3924. SPACE 1 03669000
  3925. TAPEX3 DS 0H CONTROL @V202232 03670000
  3926. CLI VIRCOMND,03 03 = NO-OP @V202232 03671000
  3927. BE HNDLNOOP YES (DON'T CLEAR SENSE BYTES, @V202232 03672000
  3928. * IF ANY). 03673000
  3929. B CLEARADD NO. @V202232 03674000
  3930. SPACE 1 03675000
  3931. TAPEX4 EQU DASDX4 "SENSE" (04) OR OTHER. @V202232 03676000
  3932. * (NOTE: CCWCTL = 0) 03677000
  3933. SPACE 1 03678000
  3934. TAPEX5 EQU CCWGENRL @VA03331 03679000
  3935. SPACE 1 03680000
  3936. TAPEX6 EQU READSKIP @VA03331 03681000
  3937. SPACE 1 03682000
  3938. TAPEX7 EQU CLEARADD CONTROL - ADDRESS IS IRRELEVANT @V202232 03683000
  3939. SPACE 1 03684000
  3940. TAPEX9 EQU CCWGENRL @VA03331 03685000
  3941. SPACE 1 03686000
  3942. TAPEXA EQU READSKIP @VA03331 03687000
  3943. SPACE 1 03688000
  3944. TAPEXC DS 0H "READ BACKWARD" MAG TAPE COMMAND:@V202232 03689000
  3945. * HANDLE "BACKWARD" COMMANDS ... 03690000
  3946. DRAWKCAB OI RCWCOMND,X'0C' ENSURE READ-BACKWARD BITS SET @V202232 03691000
  3947. * IN REAL CCW 03692000
  3948. NI RCWCOMND,X'FC' (BUT MAKE SURE LOW-ORDER 2 BITS @V202232 03693000
  3949. * ARE 0) 03694000
  3950. * (FOR BENEFIT OF DMKUNTFR OR ANOTHER) 03695000
  3951. TM RCWFLAG,SKIP IS SKIP FLAG ON ? @V202232 03696000
  3952. BO CLEARADD IF YES, NO DATA TRANSMISSION AT @V202232 03697000
  3953. * ALL. 03698000
  3954. TM RCWFLAG,IDA IS USER'S IDA FLAG-BIT SET ? @V202232 03699000
  3955. LA R10,2 (SET R10 = 2 IN CASE NEEDED) @V202232 03700000
  3956. BO HNDUSIDA IF YES (IDA SET), GO HANDLE. @V202232 03701000
  3957. L R0,XPAGNUM SET R0 TO ISOLATE PAGE NUMBER @V202232 03702000
  3958. LR R2,R1 CALCULATE "BEGINNING ADDRESS" @V202232 03703000
  3959. SLR R2,R4 ... @V202232 03704000
  3960. LR R14,R2 REMEMBER IN R14 IN CASE NEEDED @V202232 03705000
  3961. * LATER 03706000
  3962. NR R2,R0 ISOLATE "PAGE-STARTING ADDRESS" @V202232 03707000
  3963. * IN R2, 03708000
  3964. NR R0,R1 AND "PAGE-ENDING" ADDRESS IN R0, @V202232 03709000
  3965. CLR R0,R2 ARE THEY THE SAME PAGE ? @V202232 03710000
  3966. BE CCWNXT9 TRF IF YES - GO TO IT. @V202232 03711000
  3967. LR R15,R1 "ENDING ADDRESS" @V202232 03712000
  3968. BAL R10,IDAWSUB SEE HOW MUCH ROOM WE HAVE AND @V202232 03713000
  3969. * NEED 03714000
  3970. LR R4,R1 COMPUTE BYTE-COUNT OF 1ST CHUNK @V202232 03715000
  3971. N R4,F4095 ... @V202232 03716000
  3972. LA R4,1(,R4) ... @V202232 03717000
  3973. LA R10,2048 -2048 INTO R10 @V202232 03718000
  3974. LNR R10,R10 ... @V202232 03719000
  3975. B CCWIDA1 AND GO JOIN "FORWARD" DIRECTION @V202232 03720000
  3976. * PATH. 03721000
  3977. SPACE 1 03722000
  3978. TAPEXD EQU CCWGENRL @VA03331 03723000
  3979. SPACE 1 03724000
  3980. TAPEXE EQU READSKIP @VA03331 03725000
  3981. SPACE 1 03726000
  3982. TAPEXF DS 0H CONTROL COMMAND FOR MAG TAPE @VA01700 03727000
  3983. CLI VIRCOMND,X'2F' BACKSPACE FILE @VA01700 03728000
  3984. BE NORELCU YES .. DO NOT RELEASE CU @VA01700 03729000
  3985. CLI VIRCOMND,X'3F' FORWARD SPACE FILE? @VA01700 03730000
  3986. BNE CLEARADD NO .. RELEASE CU @VA01700 03731000
  3987. NORELCU EQU * @VA01700 03732000
  3988. L R10,SAVER10 @VA01700 03733000
  3989. USING IOBLOK,R10 @VA01700 03734000
  3990. NI IOBFLAG,X'FF'-IOBRELCU RESET RELCU FLAG @VA01700 03735000
  3991. DROP R10 @VA04000 03736000
  3992. B CLEARADD AND CONTINUE .. @VA01700 03737000
  3993. SPACE 03738000
  3994. DIALX1 EQU TERMX1 WRITE (01) @VA01331 03739000
  3995. DIALX2 EQU TERMX2 READ (02) @VA01331 03740000
  3996. OTHRXC EQU * READ BACKWARD (-C) @VA01344 03741000
  3997. LA R2,DRAWKCAB SET FOR BACKWARD PROCESSING @VA01344 03742000
  3998. CLI VIRCOMND,X'1C' READ BACKWARD STATUS MODIFIER @VA01344 03743000
  3999. BCR 7,R2 IF NOT, PROCESS AS READ BACKWARD @VA01344 03744000
  4000. B CK1287 CHECK FOR 1287 @VA01344 03745000
  4001. EJECT 03746000
  4002. * DEDDX- CODE NOT REQUIRING INTERNAL TRANSFERS: 03747000
  4003. SPACE 03748000
  4004. DEDDX1 DS 0H 01 - 11 - 31/B1 - 51/D1 - 71/F1 @VA04000 03749000
  4005. TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03750000
  4006. BZ DEDDX1A NO @V60B6B8 03751000
  4007. BAL R14,ENDPRE SET SEEK ARG IN PREFIX @V60B6B8 03752000
  4008. DEDDX1A EQU * @V60B6B8 03753000
  4009. CLI VIRCOMND,X'11' IS IT 01 OR 11 = ERASE TRACK ? @VA04000 03754000
  4010. BNH CLASSOK IF YES - GENERAL WRITE CASE @VA04000 03755000
  4011. OI VIRFLAG,SMCOM IF > 11, TREAT AS STATUS MODIFIER@VA04000 03756000
  4012. BR R2 "B CCWGENRL" - HANDLE AS USUAL @VA04000 03757000
  4013. * CASE. 03758000
  4014. SPACE 1 03759000
  4015. DEDDX2 EQU * CCW OP 02,12,22,OR 92 TO DED DASD@V60B6B8 03760000
  4016. TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03761000
  4017. BZ READSKIP NO @V60B6B8 03762000
  4018. BAL R14,ENDPRE SET SEEK ARG IN PREFIX @V60B6B8 03763000
  4019. B READSKIP AND PROCESS @V60B6B8 03764000
  4020. SPACE 1 03765000
  4021. DEDDX3 DS 0H 03 - 13 - 23 - 53 - 73 @VA04000 03766000
  4022. TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03767000
  4023. BZ DEDDX3A NO, PROCESS THE NO - OP @V60B6B8 03768000
  4024. BAL R14,ENDPRE SET PREFIX SEEK ARGUMENT @V60B6B8 03769000
  4025. DEDDX3A EQU * @V60B6B8 03770000
  4026. CLI VIRCOMND,03 IS IT A NO-OP ? @VA04000 03771000
  4027. BE HNDLNOOP TRF IF YES. @VA04000 03772000
  4028. CLI VIRCOMND,X'53' DIAGNOSTIC LOAD ??? @VA04000 03773000
  4029. BE DASDWRIT YES, GO CHECK IT OUT ... @VA04000 03774000
  4030. CLI VIRCOMND,X'73' DIAGNOSTIC LOAD ??? @VA04000 03775000
  4031. BE DASDWRIT YES, HANDLE AS WRITE ... @VA04000 03776000
  4032. BR R2 IF NOT, "B CCWGENRL" - GENERAL @VA04000 03777000
  4033. * CASE. 03778000
  4034. SPACE 1 03779000
  4035. DEDDX4 EQU * PROCESS 04 - 24 ETC @VMI2005 03780000
  4036. TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03781000
  4037. BZ DASDX4 NO, STANDARD DASD PROCESS @V60B6B8 03782000
  4038. BAL R14,ENDPRE SET PREFIX SEEK ARGUMENT @V60B6B8 03783000
  4039. B DASDX4 NOW FINISH @V60B6B8 03784000
  4040. * (NOTE: CCWCTL = 0) 03785000
  4041. SPACE 1 03786000
  4042. DEDDX5 DS 0H 05 - 15 - 25 - 35 - 45 - 55 - @VA04000 03787000
  4043. * 65 - 75 ETC 03788000
  4044. TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03789000
  4045. BZ DEDDX5A NO @V60B6B8 03790000
  4046. BAL R14,ENDPRE SET SEEK ARG IN PREFIX @V60B6B8 03791000
  4047. DEDDX5A EQU * @V60B6B8 03792000
  4048. CLI VIRCOMND,X'15' IS IT 05 OR 15 ? @VA04000 03793000
  4049. BNH CLASSOK IF YES - GENERAL WRITE CASE @VA04000 03794000
  4050. OI VIRFLAG,SMCOM IF > 15, TREAT AS STATUS MODIFIER@VA04000 03795000
  4051. BR R2 "B CCWGENRL" - HANDLE AS USUAL @VA04000 03796000
  4052. * CASE. 03797000
  4053. SPACE 1 03798000
  4054. DEDDX6 DS 0H 08/86 - 16/96 @VA04000 03799000
  4055. TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03800000
  4056. BZ DEDDX6A NO @V60B6B8 03801000
  4057. BAL R14,ENDPRE SET THE PREFIX SEEK ARG @V60B6B8 03802000
  4058. DEDDX6A EQU * @V60B6B8 03803000
  4059. TM RCWFLAG,SKIP WAS SKIP-FLAG SET ? @VA04000 03804000
  4060. BO CLEARADD TRF IF YES - USE 0 ADDRESS, ETC. @VA04000 03805000
  4061. AIF (NOT &ISAM).READ06A 03806000
  4062. CLI RCWCOMND,X'06' IS IT A REAL '06' READ ? @VA04000 03807000
  4063. BE DASDRD06 TRF IF YES - CHECK FOR ISAM READ.@VA04000 03808000
  4064. .READ06A ANOP 03809000
  4065. BR R2 "B CCWGENRL" - HANDLE GENERAL @VA04000 03810000
  4066. * CASE. 03811000
  4067. SPACE 1 03812000
  4068. DEDDX9 DS 0H 19 - 29/A9 - 39/B9 - 69/E9 @VA04000 03813000
  4069. TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03814000
  4070. BZ DEDDX9A NO @V60B6B8 03815000
  4071. BAL R14,ENDPRE SET THE PREFIX SEEK ARG @V60B6B8 03816000
  4072. DEDDX9A EQU * @V60B6B8 03817000
  4073. CLI VIRCOMND,X'19' IS IT "WRITE HOME ADDRESS" @VA04000 03818000
  4074. BE CLASSOK IF YES - IT'S LEGAL @VA04000 03819000
  4075. OI VIRFLAG,SMCOM IF NOT, TREAT AS STATUS MODIFIER @VA04000 03820000
  4076. BR R2 "B CCWGENRL" - HANDLE AS USUAL @VA04000 03821000
  4077. * CASE. 03822000
  4078. SPACE 1 03823000
  4079. DEDDXA EQU DEDDX2 @V60B6B8 03824000
  4080. SPACE 1 03825000
  4081. DEDDXB DS 0H 0B - 1B - 2B @VA04000 03826000
  4082. CLI VIRCOMND,X'2B' EITHER 0B (SEEK CYL) OR 1B @VA04000 03827000
  4083. * (SEEK HEAD) ? 03828000
  4084. BL DEDDSEEK YES - CHECK FOR STAND ALONE @VA04000 03829000
  4085. * SEEK CASE 03830000
  4086. BR R2 NO - 'B CCWGENRL' @VA04000 03831000
  4087. SPACE 1 03832000
  4088. DEDDXC EQU CCWINVLD READ BACKWARD INVALID FOR DASD @VA04000 03833000
  4089. * DEVICES 03834000
  4090. SPACE 1 03835000
  4091. DEDDXD DS 0H 0D - 1D - 2D - 4D - 6D @VA04000 03836000
  4092. TM MEMO2,PRECCW PREFIX SEEK TO BE RESOLVED @V60B6B8 03837000
  4093. BZ DEDDXDA NO @V60B6B8 03838000
  4094. BAL R14,ENDPRE SET THE PREFIX SEEK ARG @V60B6B8 03839000
  4095. DEDDXDA EQU * @V60B6B8 03840000
  4096. CLI VIRCOMND,X'1D' IS IT WRITE (COUNT) KEY & DATA ? @VA04000 03841000
  4097. BNH CLASSOK IF YES (0D OR 1D) - IT'S OK @VA04000 03842000
  4098. OI VIRFLAG,SMCOM IF > 1D, TREAT AS STATUS MODIFIER@VA04000 03843000
  4099. BR R2 "B CCWGENRL" - HANDLE AS USUAL @VA04000 03844000
  4100. * CASE. 03845000
  4101. SPACE 1 03846000
  4102. DEDDXE EQU DEDDX2 @V60B6B8 03847000
  4103. SPACE 1 03848000
  4104. DEDDXF EQU CCWGENRL 0F - 1F @VA04000 03849000
  4105. SPACE 1 03850000
  4106. OTHRX3 EQU DEDDX3 (NECESSARY HERE) @VA04000 03851000
  4107. EJECT 03852000
  4108. * HERE FOR TIC TO A PREVIOUS CCW IN THE SAME RCWTASK, WHERE 03853000
  4109. * WE HAVE HAD AN AUTOPOLL CCW EARLIER IN THE SAME RCWTASK: 03854000
  4110. * 03855000
  4111. CCWTIC12 AR R1,R6 ADD REAL ADDRESS OF WHERE WE ARE NOW 03856000
  4112. STCM R1,7,RCWADDR+1 AND STORE NEEDED ADDRESS IN THE CCW 03857000
  4113. CLI 0(R1),X'09' NOW - DOES IT POINT TO AN AUTOPOLL CCW ? 03858000
  4114. BNE CCWTIC4C NOPE...FORGET IT. @VA05538 03859000
  4115. * (NOTE - R10 POINTS TO THIS RCWTASK) ... 03862000
  4116. LA R15,RCWHSIZ(,R10) REMEMBER ADDR OF 1ST CCW IN THIS TASK 03863000
  4117. L R10,SAVER10 NOW REFERENCE ORIGINAL IOBLOK 03864000
  4118. USING IOBLOK,R10 ... 03865000
  4119. OI IOBSPEC2,IOBWRAP WELL, WE'VE HAD ONE NOW. @V407438 03866000
  4120. OI 4(R1),PCIF SET PCI FLAGBIT IN THE AUTOPOLL CCW 03867000
  4121. LR R0,R6 COMPUTE DISPL. FROM 1ST CCW IN @VW01384 03868000
  4122. SR R0,R15 THIS CHAIN (R15=1ST CCW) @VW01384 03869000
  4123. LR R1,R9 GET ADDRESS OF VIRTUAL TIC 03870000
  4124. TRANLOCK DMKCCWL5 %V3M4038 03871000
  4125. * (NOTE - R2 HAS ADDRESS OF REAL VIRTUAL TIC) 03872000
  4126. ST R0,SAVEWRK9 SAVE DISPL. FOR LATER @VW01384 03873000
  4127. LA R0,1 SIZE OF POLL LIST AREA @VW01384 03874000
  4128. A R0,IOBMISC2 SIZE OF CURRENT LIST @VW01384 03875000
  4129. CALL DMKFREE GET STORAGE @VW01384 03876000
  4130. LR R15,R1 SAVE ADDRESS OF NEW LIST @VW01384 03877000
  4131. MVC 4(4,R15),SAVEWRK9 STORE DISPL. ADDRESS IN LIST @VW01384 03878000
  4132. ST R2,0(R15) STORE ADDRESS OF VIRTUAL TIC @VW01384 03879000
  4133. ST R0,IOBMISC2 STORE SIZE OF NEW POLL LIST @VW01384 03880000
  4134. L R1,IOBMISC GET ADDRESS OF OLD POLL LIST @VW01384 03881000
  4135. ST R15,IOBMISC STORE ADDRESS OF NEW POLL LIST @VW01384 03882000
  4136. BCTR R0,0 GET OLD LIST COUNT @VW01384 03883000
  4137. LTR R14,R0 SET UP FOR DATA MOVE @VW01384 03884000
  4138. BZ CCWTIC4C BRANCH IF NO OLD LIST @VA05538 03885000
  4139. SLL R14,3 TIMES 8 (NUMBER OF BYTES) @VW01384 03886000
  4140. BCTR R14,0 MINUS ONE FOR EX MOVE @VW01384 03887000
  4141. EX R14,EXMVCLST MOVE OLD LIST TO NEW LIST @VW01384 03888000
  4142. CALL DMKFRET RELEASE OLD LIST @VW01384 03889000
  4143. B CCWTIC4C GO SET NEEDED RELOC BIT IN CCW @VA05538 03890000
  4144. * CCW. 03891000
  4145. SPACE 03892000
  4146. DROP R10 (THRU WITH IOBLOK) @VA00924 03893000
  4147. EJECT 03894000
  4148. CCWDIAL DS 0H SPECIAL HANDLING OF "DIALED @VA00924 03895000
  4149. * LINES" PRIOR TO EXIT: 03896000
  4150. USING IOBLOK,R10 (IN EFFECT) @VA00924 03897000
  4151. USING VDEVBLOK,R8 (ALSO IN EFFECT AT ENTRY) @V200730 03898000
  4152. TM VDEVFLAG,VDEVDIAL DIALED FLAG-BIT ON ? @VA00924 03899000
  4153. BZ CCWDIAL1 NOPE. @VA00924 03900000
  4154. TM VDEVSTAT,VDEVDED IS THE DEVICE DEDICATED? @VA02971 03901000
  4155. BZ CCWDIAL1 IF NOT, DEVICE IS NOT YET @VA02971 03902000
  4156. * CONNECTED 03903000
  4157. TM MEMO3,VIRTDISA IF YES, WAS A DISABLE ISSUED ? @VA00924 03904000
  4158. BZ CCWEXIT IF NOT, NOTHING TO DO HERE. @VA00924 03905000
  4159. * R8 = A (VDEVBLOK), R10 = A(IOBLOK): 03906000
  4160. CCWDIAL1 EQU * HERE FOR SPECIAL LINE HANDLING: @VA00924 03907000
  4161. SLR R2,R2 CLEAR "R1" FOR BENEFIT OF CALLER @V200730 03908000
  4162. ST R2,SAVER1 ... @V200730 03909000
  4163. LH R2,VDEVTYPC GET CLAS AND TYPE FOR DMKDIASM @V200730 03910000
  4164. L R8,SAVER8 GET DISPLACEMENT OF VDEVBLOK @V200730 03911000
  4165. CALL DMKDIBSM SPECIAL CCW STRING PROCESSING @V407510 03912000
  4166. B CCWEXIT GO EXIT. @VA00924 03913000
  4167. SPACE 03914000
  4168. DROP R8,R10 (THRU WITH VDEVBLOK & IOBLOK) @VA00924 03915000
  4169. EJECT 03916000
  4170. * THE FOLLOWING ROUTINE IS ENTERED WHEN PROCESSING A 03917000
  4171. * CHANNEL PROGRAM TO A DEDICATED DASD DEVICE AND THE 03918000
  4172. * REAL DEVICE IS A 3330V. THE CP-GENERATED SEEK 03919000
  4173. * ARGUMENT HAS NOT YET BEEN SET, SO IT IS SET TO 03920000
  4174. * THE LAST-REFERENCED CYLINDER ON THE DEVICE, WHICH IS 03921000
  4175. * MAINTAINED IN FIELD VDEVPOSN. 03922000
  4176. ENDPRE EQU * @V60B6B8 03923000
  4177. LA R0,ZEROES @VMI2005 03924000
  4178. L R15,FIRSTRCW FIRST RCWTASK @V60B6B8 03925000
  4179. LA R15,RCWHSIZ(R15) BUMP OVER HEADER @V60B6B8 03926000
  4180. STCM R0,7,1(R15) INTO THE SEEK CCW @V60B6B8 03927000
  4181. NI MEMO2,FULL-PRECCW INDICATE SEEK RESOLVED @V60B6B8 03928000
  4182. BR R14 AND RETURN @V60B6B8 03929000
  4183. EJECT 03930000
  4184. * CHECK FOR 'BUFFER UNLOAD' ON 33XX (X'A4') OR 2305 (X'24'): HRC011DK 03931490
  4185. * IF YES, CALL DMKDSBSD TO RECORD THE HARDWARE STATISTICAL COUNTS, 03932000
  4186. * WITH THE SINGLE EXCEPTION OF A CLASS F USER ON A DEDICATED PACK. 03933000
  4187. SPACE 03934000
  4188. SPACE 03935000
  4189. USING VDEVBLOK,R8 03936000
  4190. SPACE 03937000
  4191. SPACE 1 03938000
  4192. DASDCKBU CLI CCWCTL,RCWHMR NON-DEDICATED 33XX/2305 HRC011DK 03939490
  4193. BE DASDCTYP YES - CHECK WHICH ONE. 03940000
  4194. CLI VDEVTYPC,CLASURO IS IT A 3800? @V60B9BA 03941000
  4195. BNE DASDCKB2 XFER IF NOT @V60B9BA 03942000
  4196. CLI VDEVTYPE,TYP3800 IS IS REALLY A 3800 ? @V60B9BA 03943000
  4197. BNE DASDCKB2 XFER IF NOT @V60B9BA 03944000
  4198. TM VMCLEVEL,VMCLASSF DED CLASS F (CE) USER? @V60B9BA 03945000
  4199. BO READSKIP YES - LET HIM HAVE THE REAL INFO @V60B9BA 03946000
  4200. LA R14,X'24' BUFFER UNLOAD FOR THE 3800 @V60B9BA 03947000
  4201. B CHEKA424 CONTINUE PROCESSING @V60B9BA 03948000
  4202. DASDCKB2 CLI VDEVTYPC,CLASDASD DEDICATED DASD DEVICE CLASS ?@V60B9BA 03949000
  4203. BNE READSKIP NOPE - JUST LET IT GO. 03950000
  4204. TM VMCLEVEL,VMCLASSF DEDICATED DASD CLASS F (CE) USER ? 03951000
  4205. BO READSKIP YES - LET HIM HAVE THE REAL INFO 03952000
  4206. DASDCTYP LA R14,X'A4' 33XX BUFFER UNLOAD CMD HRC011DK 03953590
  4207. TM VDEVTYPE,TYP3330+TYP3340+TYP3350+TYP3380 HRC011DK 03954180
  4208. BNZ CHEKA424 YES (WE GUESSED RIGHT) @V2A2029 03955000
  4209. CLI VDEVTYPE,TYP2305 MUST BE A 2305, THEN ? 03956000
  4210. BNE READSKIP "WRONG" SAID THE OLD MAN, ETC. ... 03957000
  4211. LA R14,X'24' X'24' = BUFFER UNLOAD FOR 2305 03958000
  4212. CHEKA424 CLM R14,1,VIRCOMND IS IT THE RIGHT CCW OP-CODE ? 03959000
  4213. BNE READSKIP NOPE - JUST LET IT GO. 03960000
  4214. L R8,VDEVREAL R8 MUST POINT TO REAL DEVICE BLOCK 03961000
  4215. DROP R8 NEEDED BY DMKDSBSD @VA08187 03962000
  4216. LA R0,IOBSIZE GET A DUMMY IOBLOK 03963000
  4217. CALL DMKFREE ... 03964000
  4218. XC 0(IOBSIZE*8,R1),0(R1) CLEAR HIM PLEASE 03965000
  4219. LR R10,R1 AND A(IOBLOK) INTO R10 @V60B9BA 03966000
  4220. USING RDEVBLOK,R8 TEMPORARY ADDRESSIBILITY @V60B9BA 03967000
  4221. CLI RDEVTYPC,CLASURO IS IT UNIT RECORD (3800) ? @V60B9BA 03968000
  4222. BNE CHEKA425 XFER IF NOT @V60B9BA 03969000
  4223. CALL DMKRSESD CALL UR BUFFER UNLOAD @V60B9BA 03970000
  4224. B CHEKA426 CONTINUE INLINE @V60B9BA 03971000
  4225. DROP R8 NO LONGER NEEDED @V60B9BA 03972000
  4226. CHEKA425 CALL DMKDSBSD CALL DASD BUFFER UNLOAD @V60B9BA 03973000
  4227. CHEKA426 LCTL C1,C1,VMSEG REESTABLISH CONTROL REG 1 @V60B9BA 03974000
  4228. CALL DMKFRET GIVE BACK THE DUMMY IOBLOK 03975000
  4229. LA R1,0(,R3) RESTORE R1 TO ITS USUAL VALUE, 03976000
  4230. B READSKIP THEN GO AHEAD & HANDLE THE CCW NORMALLY 03977000
  4231. * NOTE: R8 NO LONGER = A(VDEVBLOK). 03978000
  4232. SPACE 03979000
  4233. EJECT 03980000
  4234. * DMKCCWSB = EXTERNAL ENTRY POINT TO INVOKE "CNTRLSUB" INTERNAL 03981000
  4235. * SUBROUTINE, FOR OBTAINING CONTROL BYTES (E.G. SEEK DATA) 03982000
  4236. * 03983000
  4237. * USED (FOR EXAMPLE) BY "TRACE" (TO AVOID DUPLICATE CODE THEREIN) 03984000
  4238. * 03985000
  4239. * ENTRY CONDITIONS: 03986000
  4240. * R0 = NO. OF BYTES (LESS 1) TO BE MOVED (E.G. 6) 03987000
  4241. * R1 = ADDRESS OF VIRTUAL CCW (IN SAVE-AREA OF CALLER) 03988000
  4242. * R2 = ADDRESS INTO WHICH CONTROL INFO IS TO BE STORED 03989000
  4243. * 03990000
  4244. * EXIT CONDITIONS: 03991000
  4245. * CC = 0: CONTROL INFO STORED IN AREA GIVEN BY R2 AT ENTRY 03992000
  4246. * CC = 3: ADDRESS ERROR ENCOUNTERED OBTAINING USER DATA 03993000
  4247. SPACE 03994000
  4248. ENTRY DMKCCWSB 03995000
  4249. USING DMKCCWSB,R12 (VERY BRIEFLY) 03996000
  4250. DMKCCWSB ENTER SAVE REGS 0-11, 03997000
  4251. L R12,=A(CCWSTART) BASE FOR PART TWO @VA12408 03998000
  4252. USING CCWSTART,R12 ADDRESSABILITY NEEDED MAIN CODE @VA12408 03999000
  4253. LR R5,R12 BASE ADDRESS FOR DMKCCW @VA04000 04000000
  4254. AL R5,F4096 ADDRESSABILITY FOR 2'ND BASE @VA04000 04001000
  4255. LCTL C1,C1,VMSEG USER'S ADDRESS SPACE @VA04436 04002000
  4256. MVI MEMO1,CCWSUBR SIGNAL DMKCCWSB ENTRY POINT INVOKED 04003000
  4257. LR R6,R1 SET R6 = ADDRESS OF THE CCW 04004000
  4258. LR R7,R2 AND R7 = ADDRESS OF USER'S WORK AREA 04005000
  4259. BAL R14,CCWRES14 SET R1, R3, & R4 TO THEIR USUAL VALUES 04006000
  4260. LR R4,R0 BUT LET R4 = BYTE-COUNT-LESS-1 FROM R0 04007000
  4261. SLR R8,R8 R8=0 TO LOOK LIKE "CNTRLSUB" ENTRY POINT 04008000
  4262. BAL R10,CNTRLSBW ENTER AT CNTRLSBW TO CHECK IDA BIT ETC. 04009000
  4263. SR R15,R15 OK - RETURNS HERE - CLEAR CONDITION CODE 04010000
  4264. EXIT AND EXIT (E.G. TO "TRACE") WHEN ALL THRU. 04011000
  4265. SPACE 04012000
  4266. EJECT 04013000
  4267. TICSCAN DS 0F "TICSCAN" PHASE: @V1D0632 04050000
  4268. LH R9,CNTUNTIC COUNT OF UNPROCESSED TICS INTO R9 04051000
  4269. SLR R10,R10 R10=0 TO SEARCH ALL CCW CHAINS 04052000
  4270. L R7,TICBLK ADDRESS OF CURRENT BLOCK INTO R7 04053000
  4271. LTR R7,R7 (IF ANY) 04054000
  4272. BNZ TICSCAN2 IF IT EXISTS, GO AHEAD. 04055000
  4273. L R7,FIRSTRCW IF NOTHING THERE, START WITH "FIRSTRCW". 04056000
  4274. TICSCAN1 ST R7,TICBLK AND STORE ADDRESS OF FIRST/NEXT BLOCK 04057000
  4275. USING RCWTASK,R7 04058000
  4276. TICSCAN2 LH R15,RCWHEAD CHECK DISPLACEMENT OF 1ST UNPROCESSED TIC 04059000
  4277. LTR R15,R15 (IF ANY) 04060000
  4278. BNP TICSCAN4 TRF IF NOTHING THERE TO DO. 04061000
  4279. * 04062000
  4280. TICSCAN3 LA R6,0(R7,R15) GET ADDRESS OF "NEXT" UNPROCESSED TIC 04063000
  4281. L R1,RCWADDR GET ADDRESS IN R1 04064000
  4282. LA R1,0(,R1) (WITHOUT HIGH-ORDER BYTE, PLEASE) 04065000
  4283. BAL R14,TICSUBX ATTEMPT TO RESOLVE IT 04066000
  4284. BZ TICSCAN5 CONDITION-CODE 0 = WE FAILED (REALLY). 04067000
  4285. STCM R3,7,RCWADDR+1 OK, STORE REAL ADDRESS (IN R3) @V1D0632 04068000
  4286. * IN THE TIC 04069000
  4287. BCTR R9,0 IF WE SUCCEEDED, DECREMENT COUNT OF 04070000
  4288. STH R9,CNTUNTIC UNPROCESSED TICS AND STORE 04071000
  4289. LH R15,RCWCNT GET DISPLACEMENT OF NEXT UNPROCESSED TIC 04072000
  4290. STH R15,RCWHEAD STORE IN RCWHEAD FOR NEXT TIME AROUND 04073000
  4291. LTR R15,R15 IS THERE ANOTHER ONE TO BE DONE ? 04074000
  4292. BP TICSCAN3 IF YES, GO BUMP R6 AND DO THE NEXT ONE. 04075000
  4293. * 04076000
  4294. TICSCAN4 L R15,FFS MAKE SURE "RCWHEAD" = X'FFFF' 04077000
  4295. STH R15,RCWHEAD (FOR USE LATER BY "UNTRANS") 04078000
  4296. L R7,RCWPNT GET POINTER TO NEXT CCW STRING (IF ANY) 04079000
  4297. LTR R9,R9 CHECK IF ANY UNPROCESSED TICS ARE LEFT 04080000
  4298. BP TICSCAN1 IF YES, GO DO SOME MORE. 04081000
  4299. B CCWNXT18 IF NOT, GO FINISH UP AND EXIT. 04082000
  4300. DROP R7 04083000
  4301. * 04084000
  4302. * UNPROCESSED TIC IS STILL UNPROCESSED - START A NEW CHAIN: 04085000
  4303. TICSCAN5 L R9,RCWADDR SET R9 TO ADDRESS IN CCW 04086000
  4304. MVI VIRFLAG,00 CLEAR VIRTUAL FLAG 04087000
  4305. IC R15,RCWFLAG PICK UP "PREVIOUS OP-CODE" 04088000
  4306. STC R15,VIRCOMND STORE WHERE NEEDED 04089000
  4307. TM RCWCOMND,CDTIC WAS THIS "CHAIN DATA TO TIC" ? 04090000
  4308. BNO TICSCAN6 IF NOT, GET GOING. @VA12408 04091000
  4309. OI VIRFLAG,CD IF YES, SET "CHAIN DATA" FLAG AS NEEDED 04092000
  4310. TICSCAN6 EQU * @VA12408 04093000
  4311. L R12,=A(DMKCCW) FIRST PART ADDRESSABILTIY @VA12408 04093300
  4312. B CCWNEWV-DMKCCW(R12) CREATE A NEW CCW CHAIN @VA12408 04093600
  4313. EJECT 04094000
  4314. * SUBROUTINE TO SEARCH PREVIOUS OR ALL CHAINS AND IF FOUND TO 04095000
  4315. * PLACE IN R3 THE REAL ADDRESS FOR A TIC POINTING THERETO: 04096000
  4316. * 04097000
  4317. * ENTER AT "TICSUBX" TO SEARCH PREVIOUS (EXTERNAL) CHAINS 04098000
  4318. * AND TO RESOLVE THE ADDRESS IF FOUND: 04099000
  4319. DS 0D 04100000
  4320. TICSUBX LA R2,FIRSTRCW POINT AT POINTER TO FIRST RCW CHAIN 04101000
  4321. TICSUBX3 LA R3,TICSUB1 SET R3 FOR BCR INSTRUCTIONS @VA04842 04102000
  4322. USING RCWTASK,R2 04103000
  4323. TICSUB1 L R2,RCWPNT GET POINTER TO FIRST/NEXT RCWTASK 04104000
  4324. CLR R2,R10 DOES IT MATCH TERMINATING VALUE IN R10 ? 04105000
  4325. BCR 8,R14 EXIT IF YES (NOT FOUND) CONDITION-CODE 0 04106000
  4326. TICSUB2 CL R1,RCWVCAW CHECK ADDRESS IN TIC AGAINST @V1D0632 04107000
  4327. * VIRTUAL CAW 04108000
  4328. BCR 4,R3 "BL TICSUB1" IF TOO SMALL - TRY ANOTHER. 04109000
  4329. LH R0,RCWVCNT COMPUTE IN R0 04110000
  4330. SLL R0,3 THE VIRTUAL END 04111000
  4331. AL R0,RCWVCAW OF THE CCW STRING 04112000
  4332. CLR R1,R0 CHECK ADDRESS IN TIC AGAINST THIS VALUE 04113000
  4333. BCR 11,R3 "BNL TICSUB1" IF TOO BIG - TRY ANOTHER. 04114000
  4334. * THE CORRECT RCWTASK HAS BEEN FOUND: 04115000
  4335. LA R3,RCWHSIZ(,R2) SET R3 TO FIRST REAL ADDRESS, 04116000
  4336. L R4,RCWVCAW AND R4 TO 1ST VIRTUAL ADDRESS 04117000
  4337. LH R0,RCWVCNT CHECK THE VIRTUAL CCW 04118000
  4338. CH R0,RCWRCNT VERSUS THE REAL CCW COUNT 04119000
  4339. BE TICSUB2A IF THE SAME, DO IT THE EASY WAY @VA04842 04120000
  4340. ST R14,TEMPR14 DO IT THE HARD WAY @VA04842 04121000
  4341. BAL R14,TICSUB4 FIND THE CCW @VA04842 04122000
  4342. L R14,TEMPR14 RESTORE RETURN ADDR @VA04842 04123000
  4343. B TICSUB2B @VA04842 04124000
  4344. TICSUB2A SR R1,R4 MAKE R1 A DISPLACEMENT @VA04842 04125000
  4345. AR R3,R1 ADD TO BEGINNING REAL ADDR @VA04842 04126000
  4346. AR R1,R4 RESTORE R1 @VA04842 04127000
  4347. TICSUB2B CLI RCWCOMND,CDTIC DATA CHAIN THRU A TIC? @VA04842 04128000
  4348. BNER R14 NO...RETURN REPORTING SUCCESS @VA04842 04129000
  4349. * NOTE THAT OP-CODE OF 'PREVIOUS CCW' IS IN RCWFLAG OF THE TIC CCW: 04130000
  4350. CLC 0(1,R3),RCWFLAG DO OP-CODES MATCH? @VA04842 04131000
  4351. BE TICSUB8 YES...GO REPORT SUCCESS @VA04842 04132000
  4352. CLI 0(R3),CDTIC CDTIC TO A CDTIC? @VA04842 04133000
  4353. BE TICSUB8 WEIRD...(TIC TO A TIC) BUT DON'T @VA04842 04134000
  4354. * LOOP TRYING TO HANDLE...LET THE CHANNEL PROGRAM CHECK ON IT 04135000
  4355. CLI 0(R3),X'00' NO...IS TIC-TO OP-CODE = X'00'? @VA04842 04136000
  4356. BNE TICSUBX3 NO...MUST MAKE ANOTHER PASS @VA04842 04137000
  4357. TM 4(R3),X'03' TIC TO INVALID CCW ?? @VA05921 04138000
  4358. BNZ TICSUB8 YES,DON'T LOOP TRYING TO RESOLVE @VA05921 04139000
  4359. LA R0,RCWHSIZ(,R2) POINT AT 1ST CCW IN TASK @VA04842 04140000
  4360. LR R15,R3 REFERENCE TIC-TO ADDRESS @VA04842 04141000
  4361. TICSUB2C S R15,F8 BACK OFF 8 ON TIC-TO ADDRESS @VA04842 04142000
  4362. CR R15,R0 DON'T RUN OFF FRONT OF TASK @VA04842 04143000
  4363. BL TICSUBX3 IF WE DO...MAKE ANOTHER PASS @VA04842 04144000
  4364. CLI 0(R15),X'00' IS OP-CODE STILL = X'00'? @VA04842 04145000
  4365. BE TICSUB2C YES...KEEP BACKING UP @VA04842 04146000
  4366. CLC 0(1,R15),RCWFLAG NO...DO OP-CODES MATCH? @VA04842 04147000
  4367. BE TICSUB8 YES...GO REPORT SUCCESS @VA04842 04148000
  4368. B TICSUBX3 NO...KEEP ON LOOKING FOR CCW @VA04842 04149000
  4369. * 04150000
  4370. * ENTER AT "TICSUBI" TO RESOLVE AN ADDRESS IN THIS RCWTASK: 04151000
  4371. USING RCWTASK,R10 04152000
  4372. TICSUBI LA R3,RCWHSIZ(,R10) SET R3 TO FIRST REAL ADDRESS 04153000
  4373. L R4,RCWVCAW AND R4 TO 1ST VIRTUAL ADDRESS 04154000
  4374. DROP R10 04155000
  4375. TICSUB4 CLR R1,R4 DOES R1 MATCH THE VERY BEGINNING ? 04156000
  4376. BE TICSUB8 IF YES, START AT THE "REAL" BEGINNING. 04157000
  4377. LA R0,8 IF NOT, SET R0=8 (FOR 'ALR' USE), 04158000
  4378. LA R15,TICSUB6 SET R15 FOR "BCR" USE @V1D0632 04159000
  4379. B TICSUB7 START CHECKING AT JUST THE RIGHT PLACE. 04160000
  4380. * 04161000
  4381. DS 0D TIGHT LOOP TO FIND "CORRECT" REAL ADDRESS: 04162000
  4382. TICSUB5 ALR R4,R0 BUMP VIRTUAL ADDRESS BY 8, 04163000
  4383. TICSUB6 ALR R3,R0 BUMP REAL ADDRESS BY 8, 04164000
  4384. TICSUB7 TM 5(R3),RCWGEN IS THIS CCW CP-GENERATED ? 04165000
  4385. BCR 1,R15 "BO TICSUB6" IF YES - BUMP REAL ADDRESS. 04166000
  4386. CLR R1,R4 IF NOT, DOES ADDR IN CCW MATCH VIRT ADDR? 04167000
  4387. BNE TICSUB5 NO - BUMP BOTH ADDRESSES, KEEP @V1D0632 04168000
  4388. * LOOKING. 04169000
  4389. TICSUB8 LTR R3,R3 SUCCESS - SET CONDITION-CODE @V1D0632 04170000
  4390. * NONZERO 04171000
  4391. BR R14 AND RETURN (R3 HOLDS THE REAL @V1D0632 04172000
  4392. * ADDRESS) 04173000
  4393. DROP R2 END OF TIC SCAN ROUTINE @VA04000 04174000
  4394. EJECT 04175000
  4395. DS 0F 04179000
  4396. DASDTBL CCTBL DASD,12,18 TABLE FOR NON-DEDICATED DASD DEVICES: 04180000
  4397. AIF (NOT &ISAM).NOISAM3 04181000
  4398. ORG DASDTBL 04182000
  4399. DC AL2(DASDX0-CCWSTART) 00 OK IF HAD AN ISAM READ @VA12408 04183100
  4400. ORG 04184000
  4401. .NOISAM3 ANOP 04185000
  4402. SPACE 04186000
  4403. SPACE 04187000
  4404. DEDDTBL CCTBL DEDD,12,18 TABLE FOR DEDICATED DASD DEVICES: 04188000
  4405. AIF (NOT &ISAM).NOISAM4 04189000
  4406. ORG DEDDTBL 04190000
  4407. DC AL2(DASDX0-CCWSTART) 00 OK IF HAD AN ISAM READ @VA12408 04191100
  4408. ORG 04192000
  4409. .NOISAM4 ANOP 04193000
  4410. SPACE 04194000
  4411. TAPETBL CCTBL TAPE,12,09 TABLE FOR TAPE DEVICES: 04195000
  4412. TERMTBL CCTBL TERM,12,09 TABLE FOR TERMINAL-CLASS DEVICES: 04196000
  4413. SDLCTBL CCTBL SDLC,12,09 TABLE FOR ICA-SDLC @V67CDF1 04196500
  4414. DIALTBL CCTBL DIAL,12,09 TABLE FOR "DIALED LINE" DEVICES: 04197000
  4415. OTHRTBL CCTBL OTHR,12,09 TABLE FOR ALL OTHER DEVICES: 04198000
  4416. CONSTBL CCTBL CONS,12,09 TABLE FOR DEDICATED 3210 CONSOLES 04199000
  4417. MSCTBL CCTBL MSC,12,09 TABLE FOR PORTS ON 3851 MSS @V407466 04200000
  4418. EJECT 04204000
  4419. *. 04205000
  4420. * LOGIC FOR "CONS" = DEDICATED CPU CONSOLE 04206000
  4421. * 04207000
  4422. * CONSX1 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 1: 04208000
  4423. * WRITE (01) HANDLED AS GENERAL CASE OF DATA TRANSFER 04209000
  4424. * IF NOT 01, HANDLED AS AN INVALID CCW 04210000
  4425. * 04211000
  4426. * CONSX2 = "READ" COMMANDS WITH THE LAST 4 BITS = 2: 04212000
  4427. * READ (02) HANDLED AS GENERAL CASE "READ" 04213000
  4428. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 04214000
  4429. * 04215000
  4430. * IF NOT 02, HANDLED AS AN INVALID CCW 04216000
  4431. * 04217000
  4432. * CONSX3 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 3: 04218000
  4433. * FOR NO-OP (03), DOES NOT CLEAR SENSE BYTES (IF ANY EXIST) 04219000
  4434. * IF NOT 03, HANDLED AS AN INVALID CCW 04220000
  4435. * 04221000
  4436. * CONSX4 = "SENSE" COMMANDS - LAST 4 BITS = 4: 04222000
  4437. * IF SENSE (04), STORES SENSE BYTES FROM VIRTUAL 04223000
  4438. * DEVICE BLOCK IF ANY EXIST FROM A PREVIOUS UNIT CHECK; 04224000
  4439. * OTHERWISE, HANDLED AS GENERAL CASE "READ" 04225000
  4440. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 04226000
  4441. * 04227000
  4442. * CONSX5 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 5: 04228000
  4443. * IF NOT 05, HANDLED AS AN INVALID CCW 04229000
  4444. * 04230000
  4445. * CONSX6 = "READ" COMMANDS WITH THE LAST 4 BITS = 6: 04231000
  4446. * HANDLED AS AN INVALID CCW 04232000
  4447. * 04233000
  4448. * CONSX7 = "CONTROL" COMMANDS WITH THE LAST 4 BITS = 7: 04234000
  4449. * HANDLED AS AN INVALID CCW 04235000
  4450. * 04236000
  4451. * CONSX9 = "WRITE" COMMANDS WITH THE LAST 4 BITS = 9: 04237000
  4452. * WRITE (09) HANDLED AS A GENERAL CASE OF DATA TRANSFER 04238000
  4453. * IF NOT 09, HANDLED AS AN INVALID CCW 04239000
  4454. * 04240000
  4455. * CONSXA = "READ" COMMANDS WITH THE LAST 4 BITS = A: 04241000
  4456. * READ (0A) HANDLED AS GENERAL CASE "READ" 04242000
  4457. * (CHECKS FOR SKIP FLAG SET | STORAGE PROTECTION VIOLATION) 04243000
  4458. * 04244000
  4459. * IF NOT 0A, HANDLED AS AN INVALID CCW 04245000
  4460. * 04246000
  4461. * CONSXB = "CONTROL" COMMANDS WITH THE LAST 4 BITS = B: 04247000
  4462. * ALARM (0B) HANDLED AS A NO-OP (DOES NOT CLEAR ANY SENSE BYTES) 04248000
  4463. * IF NOT 0B, HANDLED AS AN INVALID CCW 04249000
  4464. * 04250000
  4465. * CONSXC = "READ BACKWARD" COMMANDS - LAST 4 BITS = C: 04251000
  4466. * HANDLED AS AN INVALID CCW 04252000
  4467. * 04253000
  4468. * CONSXD = "WRITE" COMMANDS WITH THE LAST 4 BITS = D: 04254000
  4469. * HANDLED AS AN INVALID CCW 04255000
  4470. * 04256000
  4471. * CONSXE = "READ" COMMANDS WITH THE LAST 4 BITS = E: 04257000
  4472. * HANDLED AS AN INVALID CCW 04258000
  4473. * 04259000
  4474. * CONSXF = "CONTROL" COMMANDS WITH THE LAST 4 BITS = F: 04260000
  4475. * HANDLED AS AN INVALID CCW 04261000
  4476. *. 04262000
  4477. SPACE 2 04263000
  4478. * CODE TO HANDLE DEDICATED CPU CONSOLE COMMANDS: 04264000
  4479. SPACE 04265000
  4480. SPACE 04266000
  4481. CONSX1 EQU TERMX1 WRITE (01) @VA01331 04267000
  4482. SPACE 04268000
  4483. CONSX2 EQU TERMX2 READ (02) @VA01331 04269000
  4484. SPACE 04270000
  4485. CONSX3 CLI VIRCOMND,X'03' IS IT A NOP ?? 04271000
  4486. BE HNDLNOOP OK, DO IT 04272000
  4487. B CCWINVLD ANYTHING ELSE IS INVALID 04273000
  4488. SPACE 04274000
  4489. CONSX4 EQU DASDX4 SENSE ETC. 04275000
  4490. SPACE 04276000
  4491. CONSX5 CLI VIRCOMND,X'05' IS THE OPCODE AN X'05'? @VA03298 04277000
  4492. BNE CCWINVLD NO, IT IS INVALID 04278000
  4493. B CCWGENRL AND HANDLE AS GENERAL CASE @VA01388 04279000
  4494. SPACE 1 04280000
  4495. CONSX6 EQU CCWINVLD 04281000
  4496. SPACE 04282000
  4497. CONSX7 EQU CCWINVLD 04283000
  4498. SPACE 04284000
  4499. CONSX9 CLI VIRCOMND,X'09' IS IT A WRITE ?? 04285000
  4500. BCR 8,R2 YES, DO IT 04286000
  4501. B CCWINVLD NO, IT IS INVALID 04287000
  4502. SPACE 04288000
  4503. CONSXA CLI VIRCOMND,X'0A' IS IT A READ ?? 04289000
  4504. BCR 8,R2 YES, DO IT 04290000
  4505. B CCWINVLD NO, IT IS INVALID 04291000
  4506. SPACE 04292000
  4507. CONSXB CLI VIRCOMND,X'0B' IS IT AN ALARM ?? 04293000
  4508. BE HNDLNOOP YES, TREAT AS A NOP 04294000
  4509. B CCWINVLD NO, IT IS INVALID 04295000
  4510. SPACE 04296000
  4511. CONSXC EQU CCWINVLD 04297000
  4512. SPACE 04298000
  4513. CONSXD EQU CCWINVLD 04299000
  4514. SPACE 04300000
  4515. CONSXE EQU CCWINVLD 04301000
  4516. SPACE 04302000
  4517. CONSXF EQU CCWINVLD 04303000
  4518. SPACE 1 04304000
  4519. * VMACNT1 COUNTER IS USED TO COUNT THE NUMBER OF TIMES A SHARED 04305000
  4520. * SEGMENT WAS WRITTEN OUT OF THAT WAS SELF CONTAINED WITHIN THE 04306000
  4521. * SAME PAGE. 04307000
  4522. * VMACNT2 COUNTER IS USED TO COUNT THE NUMBER OF TIMES A FULL PAGE 04308000
  4523. * WAS COPIED FROM A SHARED PAGE TO A PAGE GOTTEN BY CALLING DMKPTRFR. 04309000
  4524. * 04310000
  4525. VMACNT1 DC F'0' STAT. COUNTER @V304735 04311000
  4526. VMACNT2 DC F'0' STAT. COUNTER @V386198 04312000
  4527. EJECT 04313000
  4528. * THE FOLLOWING LISTS MUST BE KEPT CONTIGUOUS AND IN ORDER; THEY ARE 04314000
  4529. * USED BY THE CP ASSIST INSTRUCTIONS "DECCW0", "DECCW1", AND "CCWGENRL" 04315000
  4530. SPACE 2 04316000
  4531. CCWDATA DS 0F "DECCW0" AND "DECCW1" DATA LIST @V3M4026 04317000
  4532. SPACE 04318000
  4533. DC V(DMKSYSCS) +0 SAME AS 'ACORETBL' @V386198 04319000
  4534. DC A(CCWGENRL) +4 GENERAL CASE CCW ROUTINE @V386198 04320000
  4535. SPACE 2 04321000
  4536. CCWEXITS DS 0F "DECCW0" AND "DECCW1" EXIT LIST @V3M4026 04322000
  4537. SPACE 04323000
  4538. DC A(CCWBAD) +0 VIRTUAL CCW IS INVALID @V386198 04324000
  4539. DC A(CCWNROOM) +4 RCWTASK NEEDS TO BE EXPANDED @V386198 04325000
  4540. DC A(CCWTIC1) +8 TIC FOLLOWS COMMAND WITH 'CD' @V386198 04326000
  4541. DC A(ADDRINVL) +12 VIRTUAL DATA ADDR NOT VALID @VA07223 04327000
  4542. DC A(CCWTIC) +16 THE CCW BYTE COUNT IS ZERO @V386198 04328000
  4543. DC A(NGCCW) +20 CCW NOT RES. OR PAGE SHARED @V386198 04329000
  4544. SPACE 2 04330000
  4545. GENDATA DS 0F "CCWGENRL" ASSIST DATA LIST @V386198 04331000
  4546. SPACE 04332000
  4547. DC V(DMKSYSCS) +0 SAME AS 'ACORETBL' @V386198 04333000
  4548. DC A(DIALTBL) +4 TABLE FOR DIALED LINE CCW'S @V386198 04334000
  4549. SPACE 2 04335000
  4550. GENEXITS DS 0F "CCWGENRL" ASSIST EXIT LIST @V386198 04336000
  4551. SPACE 04337000
  4552. DC A(FWDIDAL) +0 CCW HAS 'IDA' FLAG SET @V386198 04338000
  4553. DC A(CCWMANYF) +4 DATA AREA CROSSES PAGE BDY @V386198 04339000
  4554. DC A(CCWNXT9A) +8 GO CALL DMKPTRAN TO GET PAGE @V386198 04340000
  4555. DC A(SHRDPAGE) +12 CCW POINTS TO A SHARED PAGE @V386198 04341000
  4556. DC A(CCWNXT10) +16 VDEVBLOK HAS SENSE BYTES @V386198 04342000
  4557. DC A(CCWNEXT) +20 THIS CCW DONE - PROCESS NEXT @V386198 04343000
  4558. DC A(CCWNEWV2) +24 DO NEW CCW STRING @V386198 04344000
  4559. DC A(TICSCAN) +28 FINISH HANDLING A 'TIC' CCW @V386198 04345000
  4560. DC A(CCWDIAL) +32 TAKE CARE OF DIALED LINE CCW @V386198 04346000
  4561. DC A(CALLISM) +36 HAVE FOUND 'ISAM READS' @V386198 04347000
  4562. DC A(CCWEXIT) +40 "SVC 12" ASSIST CAN'T HANDLE @V386198 04348000
  4563. DC A(CCWNXT12) +44 WORKING IN A SHARED SEGMENT @V386198 04349000
  4564. DC A(ITSAREL) +48 RELEASE A VIRTUAL DEVICE @V4M0156 04350000
  4565. EJECT 04351000
  4566. LTORG 04352000
  4567. EJECT 04353000
  4568. COPY SAVE (R13) @V306638 04354000
  4569. COPY CORE @V304735 04355000
  4570. SAVEAREA DSECT WORKING STORAGE WITHIN "SAVEAREA" (R13): 04356000
  4571. SPACE 04357000
  4572. ORG SAVEWRK1 KEEP FOLLOWING IN TWO PAIRS FOR LH/STH USE 04358000
  4573. PRVCOMND DS 1X "PREVIOUS" CCW COMMAND CODE 04359000
  4574. PRVFLAG DS 1X "PREVIOUS" CCW FLAG BITS 04360000
  4575. VIRCOMND DS 1X "THIS" VIRTUAL CCW COMMAND CODE 04361000
  4576. VIRFLAG DS 1X "THIS" VIRTUAL CCW FLAG BITS 04362000
  4577. SPACE 04363000
  4578. * FLAG-BITS FOR REMEMBERING CCWS BY CATEGORIES IN VIRFLAG/PRVFLAG: 04364000
  4579. * (INVENT AS NEEDED, BUT AVOID REAL FLAG-BITS "CC" & "CD" AND ANY 04365000
  4580. * OTHERS USED FOR TESTING CCW FLAG FOR GETTING NEXT COMMAND, ETC.) 04366000
  4581. SMCOM EQU X'01' STATUS-MODIFIER TYPE OF COMMAND 04367000
  4582. SVSEN EQU X'02' SAVE (DO NOT CLEAR) SENSE BYTES 04368000
  4583. FWDTIC EQU X'04' FORWARD TIC (*+16) WAS PROCESSED 04369000
  4584. BADHEDNO EQU X'08' INVALID HEAD NUMBER (FOR SIMULATED 2311) 04370000
  4585. SPACE 04371000
  4586. ORG SAVEWRK2 ORG FOR REMAINING WORKING STORAGE: 04372000
  4587. CCWCTL DS 1X 00 OR RCW2311 (INITIALIZES RCWCTL) 04373000
  4588. SPACE 1 04374000
  4589. MEMO1 DS 1X "GLOBAL" FLAG (FOR ALL CCW STRINGS): 04375000
  4590. CCWFIRST EQU X'80' THIS = FIRST CCW-STRING BEING PROCESSED. 04376000
  4591. NEEDSEEK EQU X'40' A 'SEEK' IS NEEDED (IF NOT USER-SUPPLIED) 04377000
  4592. CHEKISAM EQU X'20' CHECK FOR POSSIBLE ISAM READ(S) 04378000
  4593. CCWSUBR EQU X'10' DMKCCWSB SUBROUTINE ENTRY POINT INVOKED 04379000
  4594. PROTCAW EQU X'08' CAW PROTECTION KEY SET @V304735 04380000
  4595. * THE FOLLOWING TWO FLAGS ARE THE SAME AS IN MEMO2 04381000
  4596. HADUTIC EQU X'02' HAD AT LEAST ONE UNPROCESSED TIC @V407438 04382000
  4597. HADISAM EQU X'01' HAD AN APPARENT ISAM READ @V407438 04383000
  4598. SPACE 1 04384000
  4599. MEMO2 DS 1X "LOCAL" FLAG (FOR "THIS" CCW STRING): 04385000
  4600. HADRCGEN EQU X'80' CP HAS GENERATED A CCW 04386000
  4601. STRTNEW EQU X'40' "START NEW CCW STRING" FORTHWITH 04387000
  4602. HADAPOLL EQU X'20' HAVE HAD AUTOPOLL FOR A 2700 BISYNC LINE 04388000
  4603. SKCECYL EQU X'10' SEEK TO CE CYLINDER @V304498 04389000
  4604. PRECCW EQU X'04' AN MSS PREFIX SEEK CCW NOT @V60B6B8 04390000
  4605. * COMPLETE 04391000
  4606. FULL EQU X'FF' MASK FOR TURNING OFF FLAGS @V60B6B8 04392000
  4607. * THE FOLLOWING TWO FLAGS ARE THE SAME AS IN MEMO1 04393000
  4608. *HADUTIC EQU X'02' HAD AT LEAST ONE UNPROCESSED TIC 04394000
  4609. *HADISAM EQU X'01' HAD AN APPARENT ISAM READ 04395000
  4610. SPACE 04396000
  4611. MEMO3 DS 1X MISCELLANEOUS FLAG BYTE @V407438 04397000
  4612. * FOR DIALED LINES: 04398000
  4613. VIRTDIAL EQU X'80' VIRTUAL DIALED LINES ARE BEING HANDLED 04399000
  4614. VIRTENAB EQU X'40' VIRTUAL ENABLE ISSUED 04400000
  4615. VIRTDISA EQU X'20' VIRTUAL DISABLE ISSUED 04401000
  4616. SKALTCYL EQU X'04' HAVE HAD SEEK TO ALTERNATE @V56BDA8 04402000
  4617. * CYLINDER 04403000
  4618. HADASKHD EQU X'08' WE HAVE MODIFIED A SEEK HEAD @V56BDA8 04404000
  4619. * FOR MINI DISKS: 04405000
  4620. XFERSENS EQU X'10' SENSE BYTES XFERED TO VIRT STG @VA07832 04406000
  4621. RESINCHA EQU X'80' THERE IS RESERVE CCW IN THE CHAIN@V407438 04407000
  4622. SPACE 1 04408000
  4623. * 'GLOBAL' WORKING STORAGE (FOR ALL CCW STRINGS): 04409000
  4624. FIRSTRCW DS 1F ADDRESS OF 1ST REAL RCWTASK CREATED 04410000
  4625. PREVRCW DS 1F ADDRESS OF "PREVIOUS" REAL RCWTASK (IF ANY) 04411000
  4626. TICBLK DS 1F LAST LIST OF CCWS SCANNED FOR UNPROCESSED TICS 04412000
  4627. DEVTABLE DS 1F ADDRESS OF DEVICE TABLE @VA04000 04413000
  4628. * S-CONSTANT 04414000
  4629. CNTUNTIC DS 1H CUMULATIVE COUNT OF UNPROCESSED TICS 04415000
  4630. SPACE 1 04416000
  4631. LOCWORK EQU * 'LOCAL' WORKING STORAGE (FOR "THIS" CCW STRING) 04417000
  4632. UNTICLST DS 1H DISPLACEMENT OF LAST UNPROCESSED TIC 04418000
  4633. THISRCW DS 1F ADDRESS OF "THIS" REAL RCWTASK 04419000
  4634. SAVREG14 DS 1F R14 SAVED HERE (SAVEWRK9) ON TRANS CALLS 04420000
  4635. ORG SAVEWRK9+4 04421000
  4636. ENDWORK DS 0F "THE END" (FOR SURE) OF WORK AREA. 04422000
  4637. SPACE 1 04423000
  4638. * FAKE 'TIC' OP-CODES (FOR INTERNAL USE BY DMKCCW): 04424000
  4639. CDTIC EQU X'18' "TIC AFTER CHAIN DATA" 04425000
  4640. * EQUATES FOR CCW OPCODES FOR 3851 MSS 04426000
  4641. DIAGWT EQU X'41' DIAGNOSTIC WRITE @V407466 04427000
  4642. PREPRD EQU X'26' PREPARE READ DATA @V407466 04428000
  4643. DIAGRD EQU X'42' DIAGNOSTIC READ @V407466 04429000
  4644. DIAGCNT EQU X'43' DIAGNOSTIC CONTROL @V407466 04430000
  4645. NOP EQU X'03' NO OPERATION @V407466 04431000
  4646. MODNOP EQU X'A3' MODIFIED NOP @V407466 04432000
  4647. RDATA EQU X'06' READ DATA @V407466 04433000
  4648. SENSE04 EQU X'04' SENSE @V407466 04434000
  4649. SENSEE4 EQU X'E4' SENSE I/O @V407466 04435000
  4650. SENSE44 EQU X'44' MSC SWITCH @V407466 04436000
  4651. EJECT 04437000
  4652. COPY IOBLOKS (R10) @V306638 04438000
  4653. RCWHSIZ EQU RCWCCW-RCWTASK LENGTH OF RCWTASK HEADER (IN BYTES) 04439000
  4654. EJECT 04440000
  4655. PSA , @V306638 04441000
  4656. COPY DEVTYPES @V306638 04442000
  4657. COPY EQU @V306638 04443000
  4658. COPY IOER @V306638 04444000
  4659. COPY RBLOKS @V306638 04445000
  4660. COPY VBLOKS @V306638 04446000
  4661. COPY VMBLOK @V306638 04447000
  4662. END 04448000