Table of Contents

DMKVSC Source

References

Source Listing

DMKVSC.ASSEMBLE.txt
  1. VSC TITLE 'DMKVSC (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SERIALIZATION OF INPUT 00002000
  3. *. 00003000
  4. *********************************************************************** 00004000
  5. * * 00005000
  6. *MODULE NAME = DMKVSC * 00006000
  7. * * 00007000
  8. *DESCRIPTIVE NAME = V=R NOTRANS VERIFICATION * 00008000
  9. * * 00009000
  10. *COPYRIGHT = NONE * 00010000
  11. * * 00011000
  12. *STATUS = VM/370 RELEASE 6 * 00012000
  13. * * 00013000
  14. *FUNCTION = DETERMINE THE POSSIBILITY OF AVOIDING TRANSLATING * 00014000
  15. * THE USERS CHANNEL PROGRAM. * 00015000
  16. * * 00016000
  17. *NOTES = THIS MODULE CAN BE DELETED FROM THE LOAD LIST WHEN CP IS * 00017000
  18. * GENNED WITHOUT THE V=R OPTION. * 00018000
  19. * * 00019000
  20. * DEPENDENCIES = NONE * 00020000
  21. * * 00021000
  22. * RESTRICTIONS = NONE * 00022000
  23. * * 00023000
  24. * REGISTER CONVENTIONS = GPR0 CONTAINS ADDRESS OF THE PSA * 00024000
  25. * GPR2 = VIRTUAL CAW * 00025000
  26. * GPR3 = WORK REGISTER * 00026000
  27. * GPR4 = WORK REGISTER * 00027000
  28. * GPR5 = WORK REGISTER * 00028000
  29. * GPR6 = VIRTUAL CHANNEL BLOCK (VCHBLOK) * 00029000
  30. * GPR7 = VIRTUAL CONTROL UNIT BLOCK (VCUBLOK) * 00030000
  31. * GPR8 = VIRTUAL DEVICE BLOCK (VDEVBLOK) * 00031000
  32. * GPR9 = WORK REGISTER * 00032000
  33. * GPR10 = IOBLOK BASE * 00033000
  34. * GPR11 = VMBLOK BASE * 00034000
  35. * GPR12 = DMKVSC BASE * 00035000
  36. * GPR13 = SAVEAREA BASE * 00036000
  37. * GPR14 = EXTERNAL LINKAGE * 00037000
  38. * GPR15 = EXTERNAL LINKAGE * 00038000
  39. * * 00039000
  40. * PATCH LABEL = N/A * 00040000
  41. * * 00041000
  42. *MODULE TYPE = CSECT * 00042000
  43. * * 00043000
  44. * PROCESSOR = ASSEMBLER XF * 00044000
  45. * * 00045000
  46. * MODULE SIZE = SEE ASSEMBLED LISTING * 00046000
  47. * * 00047000
  48. * ATTRIBUTES = SERIALLY REUSABLE, RESIDENT * 00048000
  49. * * 00049000
  50. *ENTRY POINT = DMKVSCVR * 00050000
  51. * * 00051000
  52. * PURPOSE = SCAN CONDITIONS TO SEE IF NOTRANS IS PROPER * 00052000
  53. * * 00053000
  54. * LINKAGE = DMKVSI VIA SVC * 00054000
  55. * * 00055000
  56. *INPUT = * 00056000
  57. * DMKVSCVR * 00057000
  58. * GPR0 = THE ADDRESS OF THE PSA * 00058000
  59. * GPR2 = VIRTUAL CAW * 00059000
  60. * GPR6 = ADDRESS OF VCHBLOK * 00060000
  61. * GPR7 = ADDRESS OF VCUBLOK * 00061000
  62. * GPR8 = ADDRESS OF VDEVBLOK * 00062000
  63. * GPR10 = ADDRESS OF IOBLOK * 00063000
  64. * GPR11 = ADDRESS OF VMBLOK * 00064000
  65. * GPR12 = ADDRESS OF DMKVSC * 00065000
  66. * GPR13 = ADDRESS OF SAVEAREA * 00066000
  67. * * 00067000
  68. *OUTPUT = * 00068000
  69. * * 00069000
  70. * DMKVSCVR * 00070000
  71. * * 00071000
  72. *EXIT-NORMAL = * 00072000
  73. * DMKVSCVR * 00073000
  74. * GPR15 = 0 IMPLYING THAT CHANNEL PROGRAM TRANSLATION CAN * 00074000
  75. * BE BYPASSED. * 00075000
  76. * * 00076000
  77. *EXIT-ERROR = * 00077000
  78. * DMKVSCVR * 00078000
  79. * GPR15 = 4 IMPLYING THAT CHANNEL PROGRAM TRANSLATION CAN * 00079000
  80. * NOT BE BYPASSED. * 00080000
  81. * * 00081000
  82. *EXTERNAL REFERENCES = SEE BELOW * 00082000
  83. * * 00083000
  84. * ROUTINES = DMKFRET - TO RETURN FREE STORAGE * 00084000
  85. * * 00085000
  86. * DATA AREAS = DMKSLC - END OF V=R AREA * 00086000
  87. * PSA - CP CONTROL DATA AREA * 00087000
  88. * * 00088000
  89. * CONTROL BLOCKS = VCHBLOK * 00089000
  90. * VCUBLOK * 00090000
  91. * VDEVBLOK * 00091000
  92. * RCHBLOK * 00092000
  93. * RCUBLOK * 00093000
  94. * RDEVBLOK * 00094000
  95. * VMBLOK * 00095000
  96. * IOBLOK * 00096000
  97. * IOERBLOK * 00097000
  98. * * 00098000
  99. * * 00099000
  100. * * 00100000
  101. *TABLES = NONE * 00101000
  102. * * 00102000
  103. *MACROS = ENTER, EXIT, CALL * 00103000
  104. * * 00104000
  105. *CHANGE ACTIVITY = AS FOLLOWS: * 00105000
  106. * * 00106000
  107. *********************************************************************** 00107000
  108. *. 00108000
  109. EJECT 00109000
  110. COPY OPTIONS @VA09586 00110000
  111. SPACE 00111000
  112. DMKVSC CSECT 00112000
  113. ENTRY DMKVSCVR @VA09586 00113000
  114. USING PSA,R0 @VA09586 00114000
  115. USING VCHBLOK,R6 @VA09586 00115000
  116. USING VCUBLOK,R7 @VA09586 00116000
  117. USING VDEVBLOK,R8 @VA09586 00117000
  118. USING IOBLOK,R10 @VA09586 00118000
  119. USING VMBLOK,R11 @VA09586 00119000
  120. USING DMKVSCVR,R12 ADDRESSABILITY @VA09586 00120000
  121. USING SAVEAREA,R13 @VA09586 00121000
  122. DMKVSCVR DS 0D @VA09849 00122100
  123. STM R0,R14,BALRSAVE SAVE REGS (R0-R14) @VA09849 00122200
  124. LR R12,R15 USE R12 AS BASE @VA09849 00122300
  125. * 00123000
  126. * TEST TO SEE IF THE MSS IS PRESENT IN THIS SYSTEM. 00124000
  127. * IF IT IS, AND THE REAL DEVICE IS A 3330V AND 00125000
  128. * THE VIRTUAL DEVICE IS NOT A 3330V, THEN DMKCCW 00126000
  129. * MUST BE CALLED IN ORDER TO INSERT THE PREFIX 00127000
  130. * CCW'S IN ORDER TO TRAP MSS CYLINDER FAULTS. 00128000
  131. * 00129000
  132. TM VDEVFLG2,VDEVVIRT IS VDEV A 3330V ? @VA09758 00130010
  133. BO TSTRAC NO NEED TO CALL DMKCCW FOR THAT @V60B6B8 00131000
  134. * REASON 00132000
  135. L R15,VDEVREAL GET REAL DEV BLOK @V60B6B8 00133000
  136. CLI RDEVTYPC-RDEVBLOK(R15),CLASDASD IS RDEV A DASD @V60B6B8 00134000
  137. BNE TSTRAC CAN'T BE A VUA @V60B6B8 00135000
  138. TM RDEVFTR-RDEVBLOK(R15),VIRTUAL+SYSVIRT IS IT A @V60B6B8 00136000
  139. * VUA 00137000
  140. BNZ CCWTR2 YES, MUST TRANS THE CHAN PROG @V60B6B8 00138000
  141. TSTRAC EQU * @V60B6B8 00139000
  142. TM VMTRCTL,VMTRSIO SIO TRACING ACTIVE ? @VA01818 00140000
  143. BO CCWTR2 YES, TRANSLATE CCW. @VA01818 00141000
  144. LA R9,0(0,R2) STRIP PROTECTION KEY FROM CAW @VA02481 00142000
  145. CLI VDEVTYPC,CLASTERM TERMINAL TYPE ?? @V200730 00143000
  146. BNE TSTDED NO, SEE IF DEDICATED @V200730 00144000
  147. TM VDEVFLAG,VDEVDIAL IS IT DIALED ?? @V200730 00145000
  148. BO CCWTR2 YES - MUST TRANSLATE CCWS @VA02481 00146000
  149. TSTDED L R15,VDEVREAL SETUP PTR TO RDEVBLOK @VA07835 00147000
  150. USING RDEVBLOK,R15 ADDRESSABILITY @VA07835 00148000
  151. TM RDEVSTA2,RDEVALT ALT PATH DEVICE @VA07835 00149000
  152. BO CCWTR2 MUST GO THRU CCWTRANS @VA07835 00150000
  153. TM VDEVSTAT,VDEVDED DEDICATE DEVICE @VA07835 00151000
  154. BNO TSTNDED NOT DEDICATED CONTINUE @VA05399 00152000
  155. TM VDEVFLAG,VDEVRDO READ/ONLY DEVICE? @VA05399 00153000
  156. BO CCWTR2 YES, DO CCW TRANS @VA05399 00154000
  157. B TSTSENSE NO, CK FOR VIRT SENSE BYTES @VA05399 00155000
  158. TSTNDED CLI VDEVTYPC,CLASDASD DASD DEVICE @VA07835 00156000
  159. BNE CCWTR2 NO, DO CCW TRANS @VA03813 00157000
  160. TM VDEVFLAG,VDEVRDO READ ONLY DEVICE? @VA03813 00158000
  161. BO CCWTR2 YES, DO CCW TRANS @VA03813 00159000
  162. TM VDEVFLG2,VDEVRRF MDISK WITH RES/REL FEATURE? @V407438 00160000
  163. BO CCWTR2 YUP, MUST TRANSLATE CCWS, BR. @V407438 00161000
  164. CLI VDEVTYPE,TYP3330 3330? @VA03813 00162000
  165. BNE DASD3340 NO, TRY 3340 @VA03813 00163000
  166. CLI RDEVMDL,X'0B' MOD 11? @VA03813 00164000
  167. BNE MOD1OR2 NO, TRY MOD 1 OR 2 @VA03813 00165000
  168. CLC VDEVBND(2),=H'808' ALL CYLS USED? @VA03813 00166000
  169. BNL TSTSENSE YES, HOPEFULLY BYPASS CCWTRANS @VA06150 00167000
  170. B CCWTR2 NO, DO CCW TRANS @VA03813 00168000
  171. MOD1OR2 CLC VDEVBND(2),=H'404' ALL CYLS USED? @VA03813 00169000
  172. BNL TSTSENSE YES, HOPEFULLY BYPASS CCWTRANS @VA06150 00170000
  173. B CCWTR2 NO, DO CCW TRANS @VA03813 00171000
  174. DASD3340 CLI VDEVTYPE,TYP3340 3340? @VA03813 00172000
  175. BNE DASD3350 NO, TRY 3350 @VA05091 00173000
  176. CLI RDEVFTR,FTR70MB 70 MB FEATURE? @VA03813 00174000
  177. BNE FEATUR35 NO, TRY FEATURE 35 MB @VA03813 00175000
  178. CLC VDEVBND(2),=H'698' ALL CYLS USED @VA03813 00176000
  179. BNL TSTSENSE YES, HOPEFULLY BYPASS CCWTRANS @VA06150 00177000
  180. B CCWTR2 NO, DO CCW TRANS @VA03813 00178000
  181. FEATUR35 CLI RDEVFTR,FTR35MB 35 MB FEATURE? @VA03813 00179000
  182. BNE CCWTR2 NO, DO CCW TRANS @VA03813 00180000
  183. CLC VDEVBND(2),=H'349' ALL CYLS USED? @VA03813 00181000
  184. BNL TSTSENSE YES, HOPEFULLY BYPASS CCWTRANS @VA06150 00182000
  185. B CCWTR2 NO, DO CCW TRANS @VA03813 00183000
  186. DASD3350 CLI VDEVTYPE,TYP3350 3350? @VA05091 00184000
  187. BNE DASD3380 NO, TRY 3380 HRC011DK 00185490
  188. CLC VDEVBND(2),=H'555' ALL CYLS USED? @VA05091 00186000
  189. BNL TSTSENSE YES, HOPEFULLY BYPASS CCWTRANS @VA06150 00187000
  190. B CCWTR2 NO, DO CCW TRANS @VA05091 00188000
  191. DASD3380 CLI VDEVTYPE,TYP3380 3380? HRC011DK 00188050
  192. BNE DASD2314 NO, TRY 2314 HRC011DK 00188100
  193. TM RDEVMDL,RDEVMD83 IS THIS A -3 HRC011DK 00188150
  194. BNO DASD3382 TRY -2 HRC011DK 00188200
  195. CLC VDEVBND(2),=H'2655' ALL CYLS USED ? HRC011DK 00188250
  196. BNL TSTSENSE YES, HOPEFULLY BYPASS CCWTRANS HRC011DK 00188300
  197. B CCWTR2 NO, DO CCW TRANS HRC011DK 00188350
  198. DASD3382 DS 0H HRC011DK 00188400
  199. TM RDEVMDL,RDEVMD82 IS THIS A -2 HRC011DK 00188450
  200. BNO DASD3381 ASSUME - 1 HRC011DK 00188500
  201. CLC VDEVBND(2),=H'1770' ALL CYLS USED ? HRC011DK 00188550
  202. BNL TSTSENSE YES, HOPEFULLY BYPASS CCWTRANS HRC011DK 00188600
  203. B CCWTR2 NO, DO CCW TRANS HRC011DK 00188650
  204. DASD3381 DS 0H HRC011DK 00188700
  205. CLC VDEVBND(2),=H'0885' ALL CYLS USED ? HRC011DK 00188750
  206. BNL TSTSENSE YES, HOPEFULLY BYPASS CCWTRANS HRC011DK 00188800
  207. B CCWTR2 NO, DO CCW TRANS HRC011DK 00188850
  208. DASD2314 CLI VDEVTYPE,TYP2314 2314 OR 2319? @VA03813 00189000
  209. BNE CCWTR2 NO, DO CCW TRANS @VA03813 00190000
  210. CLC VDEVBND(2),=H'203' ALL CYLS USED? @VA03813 00191000
  211. BL CCWTR2 NO, MUST DO CCWTRANS @VA06150 00192000
  212. DROP R15 @VA04320 00193000
  213. * OSTENSIBLY OK TO OMIT CCW-TRANSLATION: 00194000
  214. * NOTE: R9 STILL POINTS TO THE CHANNEL PROGRAM 00195000
  215. TSTSENSE LA R15,DMKVSCAN CALL SUBROUTINE TO "SCAN" @VA09586 00196000
  216. BALR R14,R15 CHANNEL PROGRAM @VA04320 00197000
  217. CL R15,F10 CHECK FOR HIGH SEVERITY R.C. @VA04320 00198000
  218. BH CCWTR2 MUST CALL DMKCCW IF R.C. = 12 @VA04320 00199000
  219. * RETURN-CODE = 0, 4, OR 8: 00200000
  220. TM VDEVFLAG,VDEVUC ANY VIRTUAL SENSE BYTES ? @VA04320 00201000
  221. BZ NOCCWTR2 IF NONE, NO TRANSLATION NEEDED. @VA04320 00202000
  222. CL R15,F4 YES - SEE IF R.C. = 0, 4, OR 8 @VA04320 00203000
  223. BE CCWTR2 IF = 4, MUST CALL CCW TRANS @VA04320 00204000
  224. BH NOCCWTR2 IF = 8, NO CCW TRANS NEEDED @VA04320 00205000
  225. * FOR R.C. = 0, GET RID OF SENSE BYTES: 00206000
  226. LR R3,R1 PRESERVE R1, @VA04320 00207000
  227. L R1,VDEVIOER POINT TO IOERBLOK, @VA04320 00208000
  228. BAL R2,IOERFRET GIVE BACK SENSE BYTES, @VA04320 00209000
  229. LR R1,R3 RESTORE R1, @VA04320 00210000
  230. B NOCCWTR2 AND BYPASS CCW-TRANSLATION @VA04320 00211000
  231. CCWTR2 EQU * @VA09586 00212000
  232. LA R15,TRANCDE SET NONZERO RETURN CODE @VA09586 00213000
  233. LM R0,R14,BALRSAVE RESTORE REGS (R0-R14) @VA09849 00214100
  234. BR R14 @VA09849 00214200
  235. NOCCWTR2 EQU * @VA09586 00215000
  236. SR R15,R15 SET ZERO RETURN CODE @VA09586 00216000
  237. LM R0,R14,BALRSAVE RESTORE REGS (R0-R14) @VA09849 00217100
  238. BR R14 @VA09849 00217200
  239. SPACE 4 00218000
  240. USING IOERBLOK,R1 @VA03443 00219000
  241. IOERFRET LA R0,IOERSIZE GET SIZE OF IOERBLOK @VA03443 00220000
  242. AH R0,IOEREXT AND THE EXTRA (IF ANY) @VA03443 00221000
  243. CALL DMKFRET AND RELEASE IT @VA03443 00222000
  244. SR R1,R1 AND CLEAR @VA04320 00223000
  245. ST R1,VDEVIOER POINTER TO IOERBLOK @VA04320 00224000
  246. NI VDEVFLAG,255-VDEVUC RESET UNIT CHECK FLAG @VA03443 00225000
  247. UNSTKIO ICM R1,7,VDEVIO ANY I/O PENDING? @VA08629 00225050
  248. BZR R2 NO, NOTHING TO UNSTACK @VA08629 00225100
  249. VIORUNQ L R10,IOBFPNT-IOBLOK(R1) GET POINTER TO NEXT @VA08629 00225150
  250. * PRIOR 00225200
  251. LA R0,IOBSIZE SIZE TO RETURN IN DBLWORDS. @VA08629 00225250
  252. CALL DMKFREE RELEASE PENDING INTERRUPTS @VA08629 00225300
  253. LTR R10,R10 ANYMORE ON CHAIN? @VA08629 00225350
  254. BZR R2 NO, RETURN @VA08629 00225400
  255. LR R1,R10 CONTINUE TO STACK @VA08629 00225450
  256. B VIORUNQ ... @VA08629 00225500
  257. BR R2 AND RETURN @VA03443 00226000
  258. DROP R1 NO MORE IOERBLOK 00227000
  259. SPACE 4 00228000
  260. TRANCDE EQU 4 RETURN CODE INDICATING TRANS. @VA09586 00229000
  261. EJECT 00230000
  262. *. 00231000
  263. * SUBROUTINE NAME - 00232000
  264. * 00233000
  265. * DMKVSCAN 00234000
  266. * 00235000
  267. * FUNCTION - 00236000
  268. * 00237000
  269. * TO SCAN A V=R CHANNEL PROGRAM FOR EXCEPTIONAL CONDITIONS, 00238000
  270. * SUCH AS SENSE COMMANDS, NO-OP'S, I/O TO/FROM PAGE 0, ETC., 00239000
  271. * WITHOUT ACTUALLY TRANSLATING THE PROGRAM. 00240000
  272. * 00241000
  273. * ATTRIBUTES - 00242000
  274. * 00243000
  275. * RESIDENT; SERIALLY REUSABLE; CALLED VIA BALR. 00244000
  276. * 00245000
  277. * ENTRY POINT - 00246000
  278. * 00247000
  279. * DMKVSCAN 00248000
  280. * 00249000
  281. * ENTRY CONDITIONS - 00250000
  282. * 00251000
  283. * R8 = ADDRESS OF VDEVBLOK 00252000
  284. * R9 = ADDRESS OF CHANNEL PROGRAM (HIGH-ORDER BYTE = 0 00253000
  285. * R10 = ADDRESS OF IOBLOK 00254000
  286. * R14 = RETURN REGISTER 00255000
  287. * R15 = A(DMKVSCAN) 00256000
  288. * 00257000
  289. * EXIT CONDITIONS - 00258000
  290. * 00259000
  291. * R0-R14 PRESERVED 00260000
  292. * R15 = 0 (AND CONDITION-CODE = 0): 00261000
  293. * CHANNEL PROGRAM IS OSTENSIBLY LEGITIMATE, 00262000
  294. * AND WILL CLEAR ANY OLD SENSE BYTES. 00263000
  295. * R15 = 4 (AND CONDITION-CODE = 2): 00264000
  296. * CHANNEL PROGRAM CONTAINS A SENSE COMMAND 00265000
  297. * BEFORE ANY CCW'S WHICH WOULD CLEAR SENSE BYTES 00266000
  298. * R15 = 8 (AND CONDITION-CODE = 2): 00267000
  299. * CHANNEL PROGRAM CONTAINS ONLY NO-OP AND/OR TIC CCW'S 00268000
  300. * (ANY EXISTING SENSE BYTES WOULD NOT BE CLEARED) 00269000
  301. * R15 = 12 (AND CONDITION-CODE = 2): 00270000
  302. * CHANNEL PROGRAM STARTS IN PAGE 0, BRANCHES OUT OF 00271000
  303. * THE V=R AREA, OR READS INTO OR WRITES FROM PAGE 0 00272000
  304. * (OR OUT OF THE V=R AREA). 00273000
  305. * 00274000
  306. * CALLS TO OTHER ROUTINES - 00275000
  307. * 00276000
  308. * NONE 00277000
  309. * 00278000
  310. * EXTERNAL REFERENCES 00279000
  311. * 00280000
  312. * DMKSLC = END OF V=R AREA 00281000
  313. * 00282000
  314. * TABLES / WORKAREAS - 00283000
  315. * 00284000
  316. * NONE 00285000
  317. * 00286000
  318. * REGISTER USAGE - 00287000
  319. * 00288000
  320. * GPR R0-R9 WORK REGISTERS 00289000
  321. * GPR 14 = RETURN REGISTER 00290000
  322. * GPR 15 = ADDRESSABILITY; RETURN-CODE AT EXIT 00291000
  323. * 00292000
  324. * NOTES - 00293000
  325. * 00294000
  326. * USED TO DETERMINE WHETHER EXISTING SENSE BYTES (IF ANY) 00295000
  327. * NEED TO BE CLEARED, AND WHETHER IT APPEARS SAFE NOT TO 00296000
  328. * TRANSLATE THE CHANNEL PROGRAM, OR IF DMKCCW MUST BE CALLED. 00297000
  329. * 00298000
  330. * OPERATION - 00299000
  331. * 00300000
  332. * 1. CHECKS TO ENSURE THAT THE CHANNEL PROGRAM DOES NOT START 00301000
  333. * IN PAGE 0, OR ABOVE THE V=R AREA (ERROR 12 IF IT DOES). 00302000
  334. * 00303000
  335. * 1A. IF CHANNEL PROGRAM IS FOR TAPE, THEN CHECK FOR 00304000
  336. * BACKSPACE FILE OR FORWARD SPACE FILE CCWS. IF SO 00305000
  337. * THE CONTROL UNIT MUST NOT BE RELEASED AT INITATION. 00306000
  338. * 00307000
  339. * 2. DETERMINES THE TYPE OF CCW FROM THE LAST 4 BITS OF THE OP 00308000
  340. * CODE (USING THE OP CODE OF THE PREVIOUS CCW IF THE PREVIOUS 00309000
  341. * CCW HAD CHAIN-DATA FLAG SET). 00310000
  342. * 00311000
  343. * 3. FOR "WRITE" CCW'S (OP CODE ENDING IN 01, 05, 09, OR 0D), 00312000
  344. * CHECKS THAT THE DATA ADDRESS IS NOT IN PAGE 0, AND THAT THE 00313000
  345. * ENDING ADDRESS IS NOT ABOVE THE V=R AREA (ERROR 12 IF IT IS). 00314000
  346. * IF OK, INCREMENTS INTERNAL COUNT OF "REGULAR" CCW'S. 00315000
  347. * 00316000
  348. * 4. FOR "READ" CCW'S (OP CODE ENDING IN 02, 06, 0A, OR 0E), 00317000
  349. * IF SKIP FLAG IS SET, JUST INCREMENTS THE INTERNAL COUNT OF 00318000
  350. * "REGULAR" CCW'S. IF NOT, CHECKS DATA ADDRESS AS IN STEP 3. 00319000
  351. * 00320000
  352. * 5. FOR "READ BACKWARD" CCW (OP CODE OF 0C), COMPUTES THE 00321000
  353. * "ENDING ADDRESS" (DATA ADDRESS LESS BYTE COUNT), AND THEN 00322000
  354. * HANDLES AS OTHER READ CCW'S IN STEP 4. 00323000
  355. * 00324000
  356. * 6. FOR A "SENSE" TYPE COMMAND (OP CODE OF 04, 94, OR B4), 00325000
  357. * SETS RETURN-CODE INDICATING SENSE WAS FOUND; THEN CHECKS FOR 00326000
  358. * THE SKIP FLAG SET AND VALID DATA ADDRESS AS IN STEP 4, EXCEPT 00327000
  359. * THAT THE COUNT OF "REGULAR" CCW'S IS NOT INCREMENTED. 00328000
  360. * 00329000
  361. * OTHER CCW OP CODES ENDING IN 04 ARE HANDLED AS READ-TYPE 00330000
  362. * CCW'S (STEP 4). 00331000
  363. * 00332000
  364. * 7. FOR A "NO-OP" CCW (OP CODE OF 03), NO ERROR CHECKING IS 00333000
  365. * DONE, AND NO COUNTS ARE INCREMENTED. (IF NO "REGULAR" CCW'S 00334000
  366. * ARE ENCOUNTERED, RETURN-CODE 8 IS GIVEN UPON EXIT.) 00335000
  367. * 00336000
  368. * OTHER CCW OP CODES ENDING IN 03 ARE HANDLED AS CONTROL-TYPE 00337000
  369. * CCW'S (STEP 8). 00338000
  370. * 00339000
  371. * 8. FOR CONTROL CCW'S (OP CODES ENDING IN 03, 07, 0B, OR 0F, 00340000
  372. * EXCEPT FOR NO-OP = 03), THE COUNT OF "REGULAR" CCW'S IS 00341000
  373. * INCREMENTED, BUT NO OTHER ERROR-CHECKING IS DONE. 00342000
  374. * 00343000
  375. * 9. FOR A CCW ENDING IN 00, THE CCW-SCANNING IS TERMINATED, 00344000
  376. * IN STEP 12. 00345000
  377. * 00346000
  378. * 10. FOR A TIC CCW (OP CODE ENDING IN 08), THE ADDRESS IN 00347000
  379. * THE TIC IS CHECKED TO SEE IF IT FALLS WITHIN THE PORTION OF 00348000
  380. * THE CHANNEL PROGRAM CURRENTLY BEING CHECKED. IF SO, THE 00349000
  381. * PREVIOUS CCW IS CHECKED FOR COMMAND-CHAIN OR DATA-CHAIN SET; 00350000
  382. * IF YES, GOES TO HANDLE "NEXT" CCW AS IN STEP 11; IF NOT, 00351000
  383. * TERMINATES CCW-SCANNING IN STEP 12. 00352000
  384. * 00353000
  385. * IF THE TIC POINTS TO A NEW AREA, CHECKS IF IT IS THE FIRST 00354000
  386. * SUCH TIC; IF NOT, TERMINATES CCW-SCANNING IN STEP 12; IF 00355000
  387. * IT IS THE FIRST, POINTS TO NEW SECTION OF CHANNEL PROGRAM 00356000
  388. * AND STARTS CHECKING IT AT STEP 1. 00357000
  389. * 00358000
  390. * 11. UPON COMPLETION OF CHECKING THE CCW (IN STEPS 3-8), 00359000
  391. * CHECKS IF THE CURRENT CCW HAS COMMAND-CHAIN OR DATA-CHAIN 00360000
  392. * SET; IF YES, ADVANCES 8 BYTES TO NEXT CCW AND CONTINUES 00361000
  393. * SCANNING AT STEP 2; IF NOT, TERMINATES SCANNING AT STEP 12. 00362000
  394. * 00363000
  395. * 12. WHEN SCANNING IS COMPLETE (FROM ERROR 12 OR FROM STEP 10 00364000
  396. * OR 11), DETERMINES FROM TENTATIVE RETURN CODE AND THE COUNT 00365000
  397. * OF THE REGULAR CCW'S WHICH RETURN-CODE SHOULD BE GIVEN. 00366000
  398. * SETS RETURN CODE (0, 4, 8, OR 12), SETS CONDITION CODE, 00367000
  399. * RESTORES NECESSARY REGISTERS, AND RETURNS TO CALLER. 00368000
  400. *. 00369000
  401. SPACE 00370000
  402. AIF (NOT &VIRREAL).NOVR12 @VA04320 00371000
  403. SPACE 00372000
  404. ENTRY DMKVSCAN @VA09586 00373000
  405. USING DMKVSCAN,R15 ADDRESSABILITY @VA09586 00374000
  406. DMKVSCAN STM R0,R9,TEMPSAVE SAVE REGS (R0-R9) @VA09849 00375100
  407. SLR R0,R0 CLEAR RETURN-CODE @VA04320 00376000
  408. ST R0,PRVCOMND CLEAR TEMPORARY STORAGE BYTES @VA04320 00377000
  409. SLR R6,R6 CLEAR COUNT OF TIC CCW'S @VA04320 00378000
  410. SLR R7,R7 CLEAR COUNT OF "REGULAR" CCWS @VA04320 00379000
  411. CCWNXT1 LR R2,R9 GET ADDRESS OF CHANNEL PROGRAM @VA04320 00380000
  412. C R2,F4096 IS IT IN PAGE 0 ? @VA04320 00381000
  413. BNL CCWNXT3 IF NOT, OK - START SCANNING. @VA04320 00382000
  414. * ERROR - CHANNEL PROGRAM STARTS IN PAGE 0, EXCEEDS V=R AREA, 00383000
  415. * OR REFERENCES DATA WHICH DOES THE SAME: 00384000
  416. VIOSCERX LA R0,12 ERROR-CODE INTO R0, @VA04320 00385000
  417. B CCWNXT12 GO EXIT. @VA04320 00386000
  418. SPACE 00387000
  419. * MAIN LOOP TO SCAN THE CHANNEL PROGRAM: 00388000
  420. CCWNXT2 LA R2,8(,R2) POINT TO NEXT USER CCW @VA04320 00389000
  421. CCWNXT3 C R2,=V(DMKSLC) CCW OUT OF V=R RANGE ? @VA04320 00390000
  422. BNL VIOSCERX THAT'S A NO-NO. @VA04320 00391000
  423. LH R3,VIRCOMND REMEMBER "PREVIOUS" CCW COMMAND @VA04320 00392000
  424. * & FLAGS 00393000
  425. STH R3,PRVCOMND ... @VA04320 00394000
  426. LM R3,R4,0(R2) GET CCW COMMAND FROM USER'S PAGE,@VA04320 00395000
  427. LA R1,0(,R3) ADDRESS BITS ONLY INTO R1 @VA04320 00396000
  428. IC R5,0(,R2) PICK UP CCW OP-CODE @VA04320 00397000
  429. CLI 0(R2),X'2F' BACKSPACE FILE ? @VA08687 00398000
  430. BE CHTAPE YES, SEE IF FOR TAPE DEVICE @VA08687 00399000
  431. CLI 0(R2),X'3F' FORWARDSPACE FILE ? @VA08687 00400000
  432. BNE CCWOK NO, CCW IS OK @VA08687 00401000
  433. CHTAPE EQU * @VA08687 00402000
  434. L R8,BALR8 ADDRESS OF VDEVBLOK @VA08687 00403000
  435. TM VDEVTYPC,CLASTAPE TAPE DEVICE ? @VA08687 00404000
  436. BZ CCWOK NO, CCW IS OK @VA08890 00405000
  437. NI IOBFLAG,255-IOBRELCU DO NOT RELEASE CU AT INIT @VA08687 00406000
  438. CCWOK EQU * @VA08687 00407000
  439. N R5,F15 ISOLATE LAST 4 BITS PLEASE @VA04320 00408000
  440. TM PRVFLAG,CD DID "PREVIOUS" CCW HAVE @VA04320 00409000
  441. * CHAIN-DATA SET ? 00410000
  442. BO CCWNXT5 TRF IF YES - BEWARE OF POSSIBLE @VA04320 00411000
  443. * TIC 00412000
  444. STCM R3,8,VIRCOMND IF NOT, REMEMBER OPCODE. @VA04320 00413000
  445. CCWNXT4 STCM R4,8,VIRFLAG REMEMBER CCW+4 = FLAG BITS @VA04320 00414000
  446. IC R5,VIOSCJMP(R5) GET INDEXER FROM THE JUMP TABLE @VA04320 00415000
  447. ALR R5,R5 MUST DOUBLE IT, @VA04320 00416000
  448. B VIOJMP(R5) AND GO "TO THE RIGHT PLACE", @VA04320 00417000
  449. * PER THE LAST 4 BITS OF THE CCW OP-CODE. 00418000
  450. SPACE 00419000
  451. * IF PREVIOUS CCW WAS DATA-CHAINED, LOOK FOR TIC AS THIS COMMAND: 00420000
  452. CCWNXT5 CL R5,F8 IS IT A 'TIC' = '08' ? @VA04320 00421000
  453. BE VIOSC08T BRANCH IF YES. @VA04320 00422000
  454. * OTHERWISE: 00423000
  455. IC R5,VIRCOMND PICK UP OLD CCW OP-CODE @VA04320 00424000
  456. N R5,F15 ISOLATE LAST 4 BITS PLEASE @VA04320 00425000
  457. B CCWNXT4 AND PROCEED USING OLD OP-CODE. @VA04320 00426000
  458. SPACE 00427000
  459. VIOJMP DS 0H "BASE" FOR CODE TO BE "JUMPED TO"@VA04320 00428000
  460. SPACE 00429000
  461. * TIC COMMAND CODE: 00430000
  462. VIOSC08 MVI VIRFLAG,X'00' CLEAR FLAG-BYTE, @VA04320 00431000
  463. VIOSC08T CR R1,R9 TIC TO SOME NEW PLACE ? @VA04320 00432000
  464. BL VIOSC08A YES - BRANCH. @VA04320 00433000
  465. CR R1,R2 IN PRECEDING SECTION OF CODE ? @VA04320 00434000
  466. BNL VIOSC08A NO - BRANCH. @VA04320 00435000
  467. LA R1,8(,R1) 8 BYTES BEYOND TIC-TO ADDRESS @VA04320 00436000
  468. CR R1,R2 IS THIS A TIC TO *-8 ? @VA04320 00437000
  469. BNE CCWNXT11 NO - TIME TO EXIT @VA04320 00438000
  470. CLI VDEVTYPC,CLASTERM TERMINAL ? @VA09352 00438100
  471. BNE CCWNXT2 NO @VA14146 00438210
  472. CLI PRVCOMND,X'09' AUTOPOLL CCW ? @VA09352 00438300
  473. BE CCWNXT2 YES, IT SETS STATUS @VA14146 00438410
  474. CLI PRVCOMND,X'1E' PREPARE CCW ? @VA09352 00438500
  475. BNE CCWNXT11 NO, THIS IS END OF CCWS @VA09352 00438600
  476. B CCWNXT2 LOOK AT NEXT CCW IN STRING @VA14146 00438710
  477. SPACE 00441000
  478. * TIC TO "SOME NEW PLACE": 00442000
  479. VIOSC08A LA R6,1(,R6) BUMP COUNT OF NEW TIC'S @VA04320 00443000
  480. C R6,F1 MORE THAN 1 ? @VA04320 00444000
  481. BH CCWNXT11 YES - THAT'S ENOUGH. @VA04320 00445000
  482. TM 3(R2),07 IS ADDRESS DBL-WORD ALIGNED? @VA05709 00446000
  483. BZ TICOK YES, CONTINUE @VA05709 00447000
  484. S R1,F1 NO, REALIGN FOR DYNAMIC BUFFERING@VA05709 00448000
  485. TICOK LR R9,R1 FIRST ONE - POINT TO NEW STRING @VA05709 00449000
  486. B CCWNXT1 AND START CHECKING IT. @VA04320 00450000
  487. SPACE 00451000
  488. * POSSIBLE NO-OP CCW: 00452000
  489. VIOSC03 CLI VIRCOMND,X'03' IS IT A NO-OP ? @VA04320 00453000
  490. BE CCWNXT9 YES - JUST CHECK CC+CD FLAG. @VA04320 00454000
  491. B VIOSC07 NO - TREAT AS OTHER "CONTROL" CCW@VA04320 00455000
  492. SPACE 00456000
  493. * POSSIBLE SENSE-TYPE CCW: 00457000
  494. VIOSC04 CLI VIRCOMND,X'04' USUAL "SENSE" OP-CODE ? @VA04320 00458000
  495. BE VIOSC04A YES. @VA04320 00459000
  496. CLI VIRCOMND,X'94' OR RESERVE/RELEASE ? @VA04320 00460000
  497. BE VIOSC04A YES. @VA04320 00461000
  498. CLI VIRCOMND,X'B4' ONE MORE CHECK ... @VA04320 00462000
  499. BNE VIOSC02 BR. IF NOT SENSE/RESERVE/RELEASE @VA04320 00463000
  500. * SENSE, RESERVE, OR RELEASE: 00464000
  501. VIOSC04A S R7,F1 HAVE WE HAD ANY OTHER CCW'S YET? @VA04320 00465000
  502. * (DECR TO COMPENSATE FOR ADD BELOW) 00466000
  503. BNM VIOSC02 YES - KEEP OLD RETURN CODE. @VA04320 00467000
  504. LA R0,4 NO - INDICATE SENSE FOUND @VA04320 00468000
  505. B VIOSC02 GO CHECK SKIP FLAG & ADDRESS @VA04320 00469000
  506. SPACE 00470000
  507. * READ BACKWARD CCW: 00471000
  508. VIOSC0C TM VIRFLAG,IDA IDA SET ONCE IN A MILLION YEARS? @VA04320 00472000
  509. BZ CCWNXT7 NOT TODAY @VA04320 00473000
  510. C R1,=V(DMKSLC) IS IDAL TO HIGH ? @VA09352 00473200
  511. BNL VIOSCERX YES, BAD @VA09352 00473400
  512. C R1,F4096 IS IDAL IN PAGE 0 ? @VA09352 00473600
  513. BL VIOSCERX YES, BAD @VA09352 00473800
  514. L R1,0(,R1) YES - GET THE "REAL" ADDRESS @VA04320 00474000
  515. C R1,=V(DMKSLC) IS IDAL ADDRESS TOO BIG? @VA05892 00475000
  516. BNL VIOSCERX TOO BAD @VA05892 00476000
  517. C R1,F4096 IS HIS PAGE 0? @VA05892 00477000
  518. BL VIOSCERX YES, HANDS OFF OURS @VA05892 00478000
  519. NI VIRFLAG,X'FF'-IDA TURN OFF THE FLAG (FOR BELOW) @VA04320 00479000
  520. CCWNXT7 N R4,XRIGHT16 ISOLATE BYTE COUNT, @VA04320 00480000
  521. BCTR R4,0 (LESS 1), AND COMPUTE @VA04320 00481000
  522. SR R1,R4 ADDRESS OF "LAST" BYTE OF DATA @VA04320 00482000
  523. * CONTINUE: 00483000
  524. * READ (FORWARD) CCW: 00484000
  525. VIOSC02 TM VIRFLAG,SKIP SKIP FLAG ON ? @VA04320 00485000
  526. BO VIOSC07 YES - ADDRESS IS IRRELEVANT. @VA04320 00486000
  527. * NO - CONTINUE: 00487000
  528. * "WRITE" CCW: 00488000
  529. VIOSC01 TM VIRFLAG,IDA IDA SET ONCE IN A GREAT WHILE ? @VA04320 00489000
  530. BZ CCWNXT8 NOT THIS TIME @VA09352 00490100
  531. C R1,=V(DMKSLC) IS IDAL TO HIGH ? @VA09352 00490700
  532. BNL VIOSCERX YES, BAD @VA09352 00491300
  533. C R1,F4096 IS IDAL IN PAGE 0 ? @VA09352 00491900
  534. BL VIOSCERX YES, BAD @VA09352 00492500
  535. L R1,0(,R1) GET REAL ADDRESS @VA09352 00493100
  536. CCWNXT8 C R1,F4096 DOES ADDRESS REFERENCE PAGE 0 ? @VA04320 00494000
  537. BL VIOSCERX THAT'S A NO-NO. @VA04320 00495000
  538. N R4,XRIGHT16 ISOLATE BYTE COUNT, @VA04320 00496000
  539. AR R1,R4 COMPUTE END OF DATA AREA, @VA04320 00497000
  540. C R1,=V(DMKSLC) EXCEEDS V=R AREA ? @VA04320 00498000
  541. BH VIOSCERX THAT'S NO GOOD, EITHER. @VA04320 00499000
  542. * OK - CONTINUE: 00500000
  543. * "CONTROL" CCW (OTHER THAN NO-OP): 00501000
  544. VIOSC07 A R7,F1 BUMP COUNT OF "REGULAR" CCW'S @VA04320 00502000
  545. * CONTINUE: 00503000
  546. CCWNXT9 TM VIRFLAG,CC+CD COMMAND OR DATA-CHAINED ? @VA04320 00504000
  547. CCWNXT10 BNZ CCWNXT2 YES - GO GET "NEXT" CCW. @VA04320 00505000
  548. SPACE 00506000
  549. * WHEN ALL THRU, EXIT: 00507000
  550. CCWNXT11 LTR R7,R7 ANY "REGULAR" CCW'S ? @VA04320 00508000
  551. BP CCWNXT12 YES - GO EXIT (R0 IS OK). @VA04320 00509000
  552. LTR R0,R0 IS R0 > 0 ? @VA04320 00510000
  553. BP CCWNXT12 YES (= 4) - LEAVE IT AS IS @VA04320 00511000
  554. LA R0,8 IF NOT, SET RETURN-CODE = 8 @VA04320 00512000
  555. CCWNXT12 LTR R15,R0 RETURN-CODE INTO R15 (& SET CC) @VA04320 00513000
  556. LM R0,R9,TEMPSAVE RESTORE REGS (R0-R9) @VA09849 00514100
  557. BR R14 AND RETURN TO CALLER. @VA04320 00515000
  558. SPACE 00516000
  559. * "INVALID" COMMAND-CODE (LAST 4 BITS OF OP-CODE = 0) 00517000
  560. VIOSC00 EQU CCWNXT11 (TREAT AS "OK", BUT TERMINATE @VA04320 00518000
  561. * SCAN) 00519000
  562. SPACE 00520000
  563. LTORG @VA04320 00521000
  564. SPACE 00522000
  565. * JUMP TABLE DEPENDING ON LAST 4 BITS OF OP-CODE: 00523000
  566. * WHERE TO GO: OP-CODE: 00524000
  567. VIOSCJMP DC AL1((VIOSC00-VIOJMP)/2) 00 ENDS STRING @VA04320 00525000
  568. DC AL1((VIOSC01-VIOJMP)/2) 01 WRITE @VA04320 00526000
  569. DC AL1((VIOSC02-VIOJMP)/2) 02 READ @VA04320 00527000
  570. DC AL1((VIOSC03-VIOJMP)/2) 03 NO-OP OR CONTROL @VA04320 00528000
  571. DC AL1((VIOSC04-VIOJMP)/2) 04 SENSE OR READ @VA04320 00529000
  572. DC AL1((VIOSC01-VIOJMP)/2) 05 WRITE @VA04320 00530000
  573. DC AL1((VIOSC02-VIOJMP)/2) 06 READ @VA04320 00531000
  574. DC AL1((VIOSC07-VIOJMP)/2) 07 CONTROL @VA04320 00532000
  575. DC AL1((VIOSC08-VIOJMP)/2) 08 TIC @VA04320 00533000
  576. DC AL1((VIOSC01-VIOJMP)/2) 09 WRITE @VA04320 00534000
  577. DC AL1((VIOSC02-VIOJMP)/2) 0A READ @VA04320 00535000
  578. DC AL1((VIOSC07-VIOJMP)/2) 0B CONTROL @VA04320 00536000
  579. DC AL1((VIOSC0C-VIOJMP)/2) 0C READ BACKWARD @VA04320 00537000
  580. DC AL1((VIOSC01-VIOJMP)/2) 0D WRITE @VA04320 00538000
  581. DC AL1((VIOSC02-VIOJMP)/2) 0E READ @VA04320 00539000
  582. DC AL1((VIOSC07-VIOJMP)/2) 0F CONTROL @VA04320 00540000
  583. SPACE 00541000
  584. * TEMPORARY STORAGE: 00542000
  585. DS 0F KEEP THE FOLLOWING FOUR IN ORDER:@VA04320 00543000
  586. PRVCOMND DC 1X'00' "PREVIOUS" CCW COMMAND CODE @VA04320 00544000
  587. PRVFLAG DC 1X'00' "PREVIOUS" CCW FLAG BITS @VA04320 00545000
  588. VIRCOMND DC 1X'00' "THIS" VIRTUAL CCW COMMAND CODE @VA04320 00546000
  589. VIRFLAG DC 1X'00' "THIS" VIRTUAL CCW FLAG BITS @VA04320 00547000
  590. SPACE 00548000
  591. .NOVR12 ANOP @VA04320 00549000
  592. EJECT 00550000
  593. COPY VBLOKS @VA04320 00551000
  594. OSVSCOM MSSCOM @V60B6B8 00552000
  595. COPY VCTCA @VA04320 00553000
  596. COPY RBLOKS @VA04320 00554000
  597. COPY VMBLOK @VA04320 00555000
  598. COPY TREXT @VA04320 00556000
  599. COPY IOBLOKS @VA04320 00557000
  600. COPY IOER @VA04320 00558000
  601. PSA @VA04320 00559000
  602. COPY DEVTYPES @VA04320 00560000
  603. COPY EQU @VA04320 00561000
  604. COPY SAVE @VA08305 00562000
  605. END DMKVSC @VA09586 00563000