Table of Contents

DMKSCN Source

References

Source Listing

DMKSCN.ASSEMBLE.txt
  1. SCN TITLE 'DMKSCN (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT @V200820 00002000
  3. DMKSCN CSECT 00003000
  4. SPACE 00004000
  5. USING PSA,R0 00005000
  6. SPACE 1 00006000
  7. *. 00007000
  8. * MODULE NAME - 00008000
  9. * 00009000
  10. * DMKSCN 00010000
  11. * 00011000
  12. * CONTENTS - 00012000
  13. * 00013000
  14. * DMKSCNRU - FIND THE BLOCKS FOR A GIVEN REAL DEVICE ADDRESS 00014000
  15. * DMKSCNVU - FIND THE BLOCKS FOR A GIVEN VIRTUAL DEVICE ADDRESS 00015000
  16. * DMKSCNVS - SEARCH FOR A DEVICE WITH A GIVEN SERIAL NUMBER 00016000
  17. * DMKSCNRD - COMPUTE FULL REAL DEVICE ADDRESS (IN CCU FORM) 00017000
  18. * DMKSCNVD - COMPUTE VIRTUAL DEVICE ADDRESS ETC. FROM VDEVBLOK 00018000
  19. * DMKSCNAU - FIND THE VMBLOK WITH A GIVEN USERID 00019000
  20. * DMKSCNFD - FIND THE NEXT FIELD IN THE INPUT BUFFER 00020000
  21. * DMKSCNLI - SEARCH VIRTUAL MACHINES FOR LINKS TO GIVEN MINIDISK 00021000
  22. * DMKSCNRN - FIND DEVICE NAME FOR GIVEN REAL DEV ADDRESS 00022000
  23. * DMKSCNVN - FIND DEVICE NAME FOR GIVEN VIRT DEV ADDRESS 00023000
  24. EJECT 00024000
  25. * SUBROUTINE NAME - 00025000
  26. * 00026000
  27. * DMKSCNRU - FIND THE BLOCKS FOR A GIVEN REAL DEVICE ADDRESS 00027000
  28. * 00028000
  29. * FUNCTION - 00029000
  30. * 00030000
  31. * TO RETURN TO THE CALLER THE ADDRESSES OF THE REAL CHANNEL, 00031000
  32. * CONTROL UNIT, AND DEVICE BLOCKS FOR A GIVEN REAL DEVICE. 00032000
  33. * 00033000
  34. * ATTRIBUTES - 00034000
  35. * 00035000
  36. * REENTRANT, RESIDENT, CALLED VIA BALR 00036000
  37. * 00037000
  38. * ENTRY POINT - 00038000
  39. * 00039000
  40. * DMKSCNRU 00040000
  41. * 00041000
  42. * ENTRY CONDITIONS - 00042000
  43. * 00043000
  44. * GPR 1 CONTAINS THE REAL DEVICE ADDRESS 00044000
  45. * GPR 14 = RETURN ADDRESS 00045000
  46. * GPR 15 = ADDRESS OF DMKSCNRU 00046000
  47. * 00047000
  48. * EXIT CONDITIONS - 00048000
  49. * 00049000
  50. * CC = 0 IF ALL BLOCKS ARE FOUND (GPR 6, 7, & 8 ARE VALID) 00050000
  51. * CC = 1 IF CHANNEL BLOCK NOT FOUND (NO REGISTERS VALID) 00051000
  52. * CC = 2 IF CONTROL UNIT BLOCK NOT FOUND (GPR 6 IS VALID) 00052000
  53. * CC = 3 IF DEVICE BLOCK NOT FOUND (GPR 6 AND 7 ARE VALID) 00053000
  54. * NOTE: IF GPR 6, 7 OR 8 ARE NOT VALID THEY WILL BE SET TO -1 00054000
  55. * 00055000
  56. * GPR 1 STILL CONTAINS THE REAL DEVICE ADDRESS 00056000
  57. * GPR 6 POINTS TO THE REAL CHANNEL BLOCK (RCHBLOK) 00057000
  58. * GPR 7 POINTS TO THE REAL CONTROL UNIT BLOCK (RCUBLOK) 00058000
  59. * GPR 8 POINTS TO THE REAL DEVICE BLOCK (RDEVBLOK) 00059000
  60. * 00060000
  61. * CALLS TO OTHER ROUTINES - 00061000
  62. * 00062000
  63. * NONE 00063000
  64. * 00064000
  65. * EXTERNAL REFERENCES - 00065000
  66. * 00066000
  67. * DMKRIOCT - REAL CHANNEL TABLE (INDEX TO REAL CHANNEL BLOCKS) 00067000
  68. * DMKRIOCH - START OF REAL CHANNEL BLOCKS 00068000
  69. * DMKRIOCU - START OF REAL CONTROL UNIT BLOCKS 00069000
  70. * DMKRIODV - START OF REAL DEVICE BLOCKS 00070000
  71. * 00071000
  72. * TABLES / WORK AREAS - 00072000
  73. * 00073000
  74. * NONE 00074000
  75. EJECT 00075000
  76. * REGISTER USAGE - 00076000
  77. * 00077000
  78. * GPR 1 = DEVICE ADDRESS 00078000
  79. * GPR 6 = CHANNEL BLOCK ADDRESS 00079000
  80. * GPR 7 = CONTROL UNIT BLOCK ADDRESS 00080000
  81. * GPR 8 = DEVICE BLOCK ADDRESS 00081000
  82. * GPR 14 = RETURN ADDRESS 00082000
  83. * GPR 15 = BASE ADDRESS 00083000
  84. * 00084000
  85. * GPR 0, 2-5, & 9-13 ARE NOT USED. 00085000
  86. * 00086000
  87. * NOTES - 00087000
  88. * 00088000
  89. * THE CHANNEL, CONTROL UNIT, AND DEVICE TABLES CONTAIN HALFWORD 00089000
  90. * INDICES INTO THE STRINGS OF CHANNEL, CONTROL UNIT, AND DEVICE 00090000
  91. * BLOCKS RESPECTIVELY. A NEGATIVE INDEX VALUE INDICATES THAT 00091000
  92. * THE UNIT DOES NOT EXIST. 00092000
  93. * 00093000
  94. * SINCE DMKSCNRU DOES NOT USE TEMPSAVE OR BALRSAVE, IT CAN BE 00094000
  95. * CALLED BY A ROUTINE WHICH IS ITSELF CALLED VIA BALR, AS LONG 00095000
  96. * AS THAT ROUTINE PRESERVES GPR 14 AND 15 WHEN CALLING DMKSCNRU. 00096000
  97. * 00097000
  98. * OPERATION - 00098000
  99. * 00099000
  100. * 1. THE CHANNEL BITS OF THE REAL DEVICE ARE INDEXED BY 00100000
  101. * DMKRIOCT AND DMKRIOCH TO PRODUCE THE ADDRESS OF THE REAL 00101000
  102. * CHANNEL BLOCK (RCHBLOK) IN GPR 6 (IF IT EXISTS). 00102000
  103. * 00103000
  104. * 2. THE CONTROL UNIT BITS OF THE REAL DEVICE ARE INDEXED BY THE 00104000
  105. * RCHBLOK (FROM STEP 1) AND DMKRIOCU TO PRODUCE THE ADDRESS OF 00105000
  106. * THE REAL CONTROL UNIT BLOCK (RCUBLOK) IN GPR 7 (IF IT EXISTS). 00106000
  107. * 00107000
  108. * 3. THE DEVICE BITS OF THE REAL DEVICE ARE INDEXED BY THE 00108000
  109. * RCUBLOK (FROM STEP 2) AND DMKRIODV TO PRODUCE THE ADDRESS OF 00109000
  110. * THE REAL DEVICE BLOCK (RDEVBLOK) IN GPR 8 (IF IT EXISTS). 00110000
  111. *. 00111000
  112. EJECT 00112000
  113. *********************************************************************** 00113000
  114. * * 00114000
  115. * FIND THE REAL CHANNEL, CONTROL UNIT, AND DEVICE BLOCKS * 00115000
  116. * * 00116000
  117. *********************************************************************** 00117000
  118. SPACE 00118000
  119. *. 00119000
  120. *********************************************************************** 00120000
  121. * 00121000
  122. * 00122000
  123. * CP ASSIST INSTRUCTION "SCNRU" - GET REAL I/O CONTROL BLOCKS 00123000
  124. * 00124000
  125. * 00125000
  126. * OPERANDS: 00126000
  127. * 1 = REAL DEVICE ADDRESS (RIGHT JUSTIFIED) 00127000
  128. * 2 = ADDRESS OF 'ARIOCT' (START OF 16-BYTE DATA LIST) 00128000
  129. * 00129000
  130. * REGISTER INPUT: 00130000
  131. * GPR 14 = EXIT ADDRESS 00131000
  132. * 00132000
  133. * SYSTEM DATA AREAS REFERENCED (BY MODULE): 00133000
  134. * DMKPSA - 'ARIOCT', 'ARIOCH', 'ARIOCU', AND 'ARIODV' 00134000
  135. * DMKRIO - 'DMKRIOCT', RCHBLOK, RCUBLOK 00135000
  136. * 00136000
  137. * 00137000
  138. * EXITS: 00138000
  139. * 00139000
  140. * 1. ADDRESS IN GPR 14 (NORMAL COMPLETION) 00140000
  141. * 00141000
  142. * REGISTER OUTPUT: 00142000
  143. * GPR 6 = ADDRESS OF RCHBLOK (OR -1 IF NO RCHBLOK) 00143000
  144. * GPR 7 = ADDRESS OF RCUBLOK (OR -1 IF NO RCUBLOK) 00144000
  145. * GPR 8 = ADDRESS OF RDEVBLOK (OR -1 IF NO RDEVBLOK) 00145000
  146. * NOTE: THE CONDITION CODE IS SET TO 0, 1, 2, OR 3. 00146000
  147. * 00147000
  148. * 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL COMPLETION) 00148000
  149. * 00149000
  150. * NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT TO A NO-OP. 00150000
  151. * 00151000
  152. *********************************************************************** 00152000
  153. *. 00153000
  154. SPACE 00154000
  155. ENTRY DMKSCNRU 00155000
  156. DMKSCNRU DS 0D (DBL-WORD-ALIGNED FOR BEST PERF) %V3M4038 00156000
  157. USING *,R15 %V3M4038 00157000
  158. SPACE 00158000
  159. DS 0H EXECUTE CP ASSIST "SCNRU" @V3M4026 00159000
  160. DC X'E60E',S(0(R1),ARIOCT) ***@V386198 00160000
  161. SPACE 00161000
  162. LA R6,X'F00' ISOLATE THE CHANNEL BITS %V3M4038 00162000
  163. NR R6,R1 FROM THE DEVICE-ADDRESS %V3M4038 00163000
  164. SRL R6,7 CHANNEL ADDRESS * 2 %V3M4038 00164000
  165. A R6,ARIOCT ADD CHANNEL TABLE ADDRESS %V3M4038 00165000
  166. LH R6,0(,R6) LOAD RCHBLOK INDEX %V3M4038 00166000
  167. LTR R7,R6 DOES CHANNEL EXIST ? %V3M4038 00167000
  168. BM FFR8 RETURN CC = 1 AND REG 6,7,8 = -1 %V3M4038 00168000
  169. A R6,ARIOCH COMPUTE RCHBLOK ADDRESS %V3M4038 00169000
  170. USING RCHBLOK,R6 %V3M4038 00170000
  171. LA R7,X'0F8' ISOLATE THE CONTROL-UNIT BITS %V3M4038 00171000
  172. NR R7,R1 FROM THE DEVICE-ADDRESS %V3M4038 00172000
  173. SRL R7,2 CU ADDRESS * 2 %V3M4038 00173000
  174. LH R7,RCHCUTBL(R7) LOAD CONTROL UNIT INDEX %V3M4038 00174000
  175. LTR R7,R7 DOES CONTROL UNIT EXIST ? %V3M4038 00175000
  176. BNM COMPRCUB YES %V3M4038 00176000
  177. LA R7,X'0F0' ISOLATE THE CONTROL-UNIT BITS %V3M4038 00177000
  178. NR R7,R1 FROM THE DEVICE-ADDRESS %V3M4038 00178000
  179. SRL R7,2 ALTERNATE CU ADDRESS * 2 %V3M4038 00179000
  180. LH R7,RCHCUTBL(R7) LOAD CONTROL UNIT INDEX %V3M4038 00180000
  181. LTR R8,R7 DOES CONTROL UNIT EXIST ? %V3M4038 00181000
  182. BM SETCC2 BRANCH IF NO %V3M4038 00182000
  183. COMPRCUB A R7,ARIOCU COMPUTE RCUBLOK ADDRESS %V3M4038 00183000
  184. USING RCUBLOK,R7 %V3M4038 00184000
  185. LA R8,X'00F' ISOLATE THE DEVICE BITS %V3M4038 00185000
  186. NR R8,R1 FROM THE DEVICE-ADDRESS %V3M4038 00186000
  187. AR R8,R8 DEVICE ADDRESS * 2 %V3M4038 00187000
  188. LH R8,RCUDVTBL(R8) LOAD RDEVBLOK INDEX %V3M4038 00188000
  189. TM RCUTYPE,RCUSUB IS THIS A SUBORDINATE CU %V3M4038 00189000
  190. BZ *+8 NO- BRANCH %V3M4038 00190000
  191. L R7,RCUPRIME YES- POINT TO THE PRIME CU %V3M4038 00191000
  192. LTR R8,R8 DOES DEVICE EXIST ? %V3M4038 00192000
  193. BM SETCC3 BRANCH IF NO %V3M4038 00193000
  194. SLL R8,3(0) CONVERT TO BYTE INDEX %V3M4038 00194000
  195. A R8,ARIODV COMPUTE RDEVBLOK ADDRESS %V3M4038 00195000
  196. SR R15,R15 SET CC = 0 (AND CLEAR R15) %V3M4038 00196000
  197. BR R14 AND RETURN TO CALLER. %V3M4038 00197000
  198. DROP R6,R7 00198000
  199. EJECT 00199000
  200. *. 00200000
  201. * SUBROUTINE NAME - 00201000
  202. * 00202000
  203. * DMKSCNVU - FIND THE BLOCKS FOR A GIVEN VIRTUAL DEVICE ADDRESS 00203000
  204. * 00204000
  205. * FUNCTION - 00205000
  206. * 00206000
  207. * TO RETURN TO THE CALLER THE ADDRESSES OF THE VIRTUAL CHANNEL, 00207000
  208. * CONTROL UNIT, AND DEVICE BLOCKS FOR A GIVEN VIRTUAL DEVICE. 00208000
  209. * 00209000
  210. * ATTRIBUTES - 00210000
  211. * 00211000
  212. * REENTRANT, RESIDENT, CALLED VIA BALR 00212000
  213. * 00213000
  214. * ENTRY POINT - 00214000
  215. * 00215000
  216. * DMKSCNVU 00216000
  217. * 00217000
  218. * ENTRY CONDITIONS - 00218000
  219. * 00219000
  220. * GPR 1 CONTAINS THE VIRTUAL DEVICE ADDRESS 00220000
  221. * GPR 11 CONTAINS THE VMBLOK ADDRESS 00221000
  222. * GPR 14 = RETURN ADDRESS 00222000
  223. * GPR 15 = ADDRESS OF DMKSCNVU 00223000
  224. * 00224000
  225. * EXIT CONDITIONS - 00225000
  226. * 00226000
  227. * CC = 0 IF ALL BLOCKS ARE FOUND (GPR 6, 7, & 8 ARE VALID) 00227000
  228. * CC = 1 IF CHANNEL BLOCK NOT FOUND (NO REGISTERS VALID) 00228000
  229. * CC = 2 IF CONTROL UNIT BLOCK NOT FOUND (GPR 6 IS VALID) 00229000
  230. * CC = 3 IF DEVICE BLOCK NOT FOUND (GPR 6 AND 7 ARE VALID) 00230000
  231. * NOTE: IF GPR 6, 7 OR 8 ARE NOT VALID THEY WILL BE SET TO -1 00231000
  232. * 00232000
  233. * GPR 1 STILL CONTAINS THE VIRTUAL DEVICE ADDRESS 00233000
  234. * GPR 6 POINTS TO THE VIRTUAL CHANNEL BLOCK (VCHBLOK) 00234000
  235. * GPR 7 POINTS TO THE VIRTUAL CONTROL UNIT BLOCK (VCUBLOK) 00235000
  236. * GPR 8 POINTS TO THE VIRTUAL DEVICE BLOCK (VDEVBLOK) 00236000
  237. * 00237000
  238. * CALLS TO OTHER ROUTINES - 00238000
  239. * 00239000
  240. * NONE 00240000
  241. * 00241000
  242. * EXTERNAL REFERENCES - 00242000
  243. * 00243000
  244. * NONE 00244000
  245. EJECT 00245000
  246. * TABLES / WORK AREAS - 00246000
  247. * 00247000
  248. * NONE 00248000
  249. * THE UNIT DOES NOT EXIST. 00249000
  250. * 00250000
  251. * SINCE DMKSCNVU DOES NOT USE TEMPSAVE OR BALRSAVE, IT CAN BE 00251000
  252. * CALLED BY A ROUTINE WHICH IS ITSELF CALLED VIA BALR, AS LONG 00252000
  253. * AS THAT ROUTINE PRESERVES GPR 14 AND 15 WHEN CALLING DMKSCNVU. 00253000
  254. * 00254000
  255. * OPERATION - 00255000
  256. * 00256000
  257. * 1. THE CHANNEL BITS OF THE VIRTUAL DEVICE ARE INDEXED BY 00257000
  258. * THE CHANNEL TABLE (VMCHTBL) AND VMCHSTRT (BOTH IN THE USER'S 00258000
  259. * VMBLOK) TO PRODUCE THE ADDRESS OF THE VIRTUAL CHANNEL BLOCK 00259000
  260. * (VCHBLOK) IN GPR 6 (IF IT EXISTS). 00260000
  261. * 00261000
  262. * 2. THE CONTROL UNIT BITS OF THE VIRTUAL DEVICE ARE INDEXED BY 00262000
  263. * THE VCHBLOK (FROM STEP 1) AND VMCUSTRT (IN THE VMBLOK) TO 00263000
  264. * PRODUCE THE ADDRESS OF THE VIRTUAL CONTROL UNIT BLOCK 00264000
  265. * (VCUBLOK) IN GPR 7 (IF IT EXISTS). 00265000
  266. * 00266000
  267. * 3. THE DEVICE BITS OF THE VIRTUAL DEVICE ARE INDEXED BY THE 00267000
  268. * VCUBLOK (FROM STEP 2) AND VMDVSTRT (IN THE VMBLOK) TO 00268000
  269. * PRODUCE THE ADDRESS OF THE VIRTUAL DEVICE BLOCK 00269000
  270. * (VDEVBLOK) IN GPR 8 (IF IT EXISTS). 00270000
  271. *. 00271000
  272. EJECT 00272000
  273. *********************************************************************** 00273000
  274. * * 00274000
  275. * FIND THE VIRTUAL CHANNEL, CONTROL UNIT, AND DEVICE BLOCKS * 00275000
  276. * * 00276000
  277. *********************************************************************** 00277000
  278. SPACE 00278000
  279. *. 00279000
  280. *********************************************************************** 00280000
  281. * 00281000
  282. * 00282000
  283. * CP ASSIST INSTRUCTION "SCNVU" - GET VIRTUAL I/O CONTROL BLOCKS 00283000
  284. * 00284000
  285. * 00285000
  286. * OPERANDS: 00286000
  287. * 1 = ADDRESS OF 'VMCHTBL' FROM USER'S VMBLOK 00287000
  288. * 2 = ADDRESS OF 'VMCHSTRT' (START OF 12-BYTE DATA LIST) 00288000
  289. * 00289000
  290. * REGISTER INPUT: 00290000
  291. * GPR 1 = VIRTUAL DEVICE ADDRESS (RIGHT JUSTIFIED) 00291000
  292. * GPR 14 = EXIT ADDRESS 00292000
  293. * 00293000
  294. * SYSTEM DATA AREAS REFERENCED: 00294000
  295. * VCHBLOK, VCUBLOK, VDEVBLOK, VMBLOK 00295000
  296. * 00296000
  297. * 00297000
  298. * EXITS: 00298000
  299. * 00299000
  300. * 1. ADDRESS IN GPR 14 (NORMAL COMPLETION) 00300000
  301. * 00301000
  302. * REGISTER OUTPUT: 00302000
  303. * GPR 6 = ADDRESS OF VCHBLOK (OR -1 IF NO VCHBLOK) 00303000
  304. * GPR 7 = ADDRESS OF VCUBLOK (OR -1 IF NO VCUBLOK) 00304000
  305. * GPR 8 = ADDRESS OF VDEVBLOK (OR -1 IF NO VDEVBLOK) 00305000
  306. * NOTE: THE CONDITION CODE IS SET TO 0, 1, 2, OR 3. 00306000
  307. * 00307000
  308. * 2. NEXT SEQUENTIAL INSTRUCTION (ABNORMAL COMPLETION) 00308000
  309. * 00309000
  310. * NOTE: THIS EXIT IS FUNCTIONALLY EQUIVALENT TO A NO-OP. 00310000
  311. * 00311000
  312. *********************************************************************** 00312000
  313. *. 00313000
  314. SPACE 00314000
  315. ENTRY DMKSCNVU 00315000
  316. DMKSCNVU DS 0D (DBL-WORD-ALIGNED FOR BEST PERF) %V3M4038 00316000
  317. USING *,R15 %V3M4038 00317000
  318. USING VMBLOK,R11 %V3M4038 00318000
  319. SPACE 00319000
  320. DS 0H EXECUTE CP ASSIST "SCNVU" %V3M4038 00320000
  321. DC X'E606',S(VMCHTBL,VMCHSTRT) ***%V3M4038 00321000
  322. SPACE 00322000
  323. LA R6,X'F00' ISOLATE THE CHANNEL BITS %V3M4038 00323000
  324. NR R6,R1 FROM THE DEVICE-ADDRESS %V3M4038 00324000
  325. SRL R6,7 CHANNEL ADDRESS * 2 %V3M4038 00325000
  326. LH R6,VMCHTBL(R6) LOAD VCHBLOK INDEX %V3M4038 00326000
  327. LTR R7,R6 DOES CHANNEL EXIST ? %V3M4038 00327000
  328. BM FFR8 RETURN CC = 1 AND REG 6,7,8 = -1 %V3M4038 00328000
  329. A R6,VMCHSTRT COMPUTE VCHBLOK ADDRESS %V3M4038 00329000
  330. USING VCHBLOK,R6 %V3M4038 00330000
  331. LA R7,X'0F0' ISOLATE THE CONTROL-UNIT BITS %V3M4038 00331000
  332. NR R7,R1 FROM THE DEVICE-ADDRESS %V3M4038 00332000
  333. SRL R7,3 CU ADDRESS * 2 %V3M4038 00333000
  334. LH R7,VCHCUTBL(R7) LOAD CONTROL UNIT INDEX %V3M4038 00334000
  335. LTR R8,R7 DOES CONTROL UNIT EXIST ? %V3M4038 00335000
  336. BM SETCC2 BRANCH IF NO %V3M4038 00336000
  337. A R7,VMCUSTRT COMPUTE VCUBLOK ADDRESS %V3M4038 00337000
  338. USING VCUBLOK,R7 %V3M4038 00338000
  339. LA R8,X'00F' ISOLATE THE DEVICE BITS %V3M4038 00339000
  340. NR R8,R1 FROM THE DEVICE-ADDRESS %V3M4038 00340000
  341. AR R8,R8 DEVICE ADDRESS * 2 %V3M4038 00341000
  342. LH R8,VCUDVTBL(R8) LOAD VDEVBLOK INDEX %V3M4038 00342000
  343. LTR R8,R8 DOES DEVICE EXIST ? %V3M4038 00343000
  344. BM SETCC3 BRANCH IF NO %V3M4038 00344000
  345. A R8,VMDVSTRT COMPUTE VDEVBLOK ADDRESS %V3M4038 00345000
  346. USING VDEVBLOK,R8 %V3M4038 00346000
  347. TM VDEVFLAG,VDEVDET IS VIR DEV BEING DETACHED? %V3M4038 00347000
  348. BO SETCC3A YES - CC3 DEV DOES NOT EXIST %VA05925 00348000
  349. SR R15,R15 SET CC = 0 (AND CLEAR R15) %V3M4038 00349000
  350. BR R14 AND RETURN TO CALLER. %V3M4038 00350000
  351. DROP R6,R7,R8,R11 %V3M4038 00351000
  352. SPACE 00352000
  353. FFR8 LR R8,R7 SET R8 TO -1 %V3M4038 00353000
  354. BR R14 RETURN TO CALLER (CC = 1) %V3M4038 00354000
  355. EJECT 00355000
  356. *. 00356000
  357. * SUBROUTINE NAME - 00357000
  358. * 00358000
  359. * DMKSCNVS - SEARCH FOR A DEVICE WITH A GIVEN SERIAL NUMBER 00359000
  360. * 00360000
  361. * FUNCTION - 00361000
  362. * 00362000
  363. * TO SEARCH ALL THE REAL DEVICE BLOCKS FOR A DEVICE WHOSE VOLUME 00363000
  364. * SERIAL NUMBER MATCHES THE ONE POINTED TO BY REGISTER 1. 00364000
  365. * 00365000
  366. * ATTRIBUTES - 00366000
  367. * 00367000
  368. * REENTRANT, RESIDENT, CALLED VIA BALR 00368000
  369. * 00369000
  370. * ENTRY POINT - 00370000
  371. * 00371000
  372. * DMKSCNVS 00372000
  373. * 00373000
  374. * ENTRY CONDITIONS - 00374000
  375. * 00375000
  376. * GPR 0 CONTAINS THE LENGTH OF THE SERIAL NUMBER 00376000
  377. * GPR 1 POINTS TO THE VOLUME SERIAL NUMBER TO BE SEARCHED FOR 00377000
  378. * GPR 14 = RETURN ADDRESS 00378000
  379. * GPR 15 = ADDRESS OF DMKSCNVS 00379000
  380. * 00380000
  381. * EXIT CONDITIONS - 00381000
  382. * 00382000
  383. * CC = 0 IF A MATCH IS FOUND (GPR 1 IS VALID) 00383000
  384. * CC = 1 IF NO MATCH IS FOUND (GPR 1 IS ZERO) 00384000
  385. * CC = 2 IF LENGTH OF SERIAL NUMBER < 1 OR > 6 (CALLING ERROR) 00385000
  386. * (GPR 1 IS UNCHANGED) 00386000
  387. * 00387000
  388. * GPR 1 POINTS TO THE RDEVBLOK WITH THE SPECIFIED SERIAL NUMBER 00388000
  389. * 00389000
  390. * CALLS TO OTHER ROUTINES - 00390000
  391. * 00391000
  392. * NONE 00392000
  393. * 00393000
  394. * EXTERNAL REFERENCES - 00394000
  395. * 00395000
  396. * DMKRIODV - START OF REAL DEVICE BLOCKS 00396000
  397. * DMKRIODC - COUNT OF REAL DEVICE BLOCKS 00397000
  398. * 00398000
  399. * TABLES / WORK AREAS - 00399000
  400. * 00400000
  401. * THE FIRST 6 BYTES OF BALRSAVE ARE USED TO STORE THE VOLUME 00401000
  402. * SERIAL NUMBER TO BE SEARCHED FOR. 00402000
  403. * 00403000
  404. * BALR2 (WITHIN BALRSAVE) IS USED TO SAVE REGISTER 2 00404000
  405. EJECT 00405000
  406. * REGISTER USAGE - 00406000
  407. * 00407000
  408. * GPR 1 = POINTER TO REAL DEVICE BLOCK 00408000
  409. * GPR 2 = COUNT OF REAL DEVICE BLOCKS 00409000
  410. * GPR 14 = RETURN ADDRESS 00410000
  411. * GPR 15 = BASE REGISTER 00411000
  412. * 00412000
  413. * GPRS 3-13 ARE NOT USED. 00413000
  414. * 00414000
  415. * NOTES - 00415000
  416. * 00416000
  417. * NONE 00417000
  418. * 00418000
  419. * OPERATION - 00419000
  420. * 00420000
  421. * 1. CHECKS NUMBER OF BYTES IN VOLUME SERIAL NUMBER 00421000
  422. * (ERROR IF NOT 1 TO 6 - CONDITION-CODE 2 RETURNED). 00422000
  423. * 00423000
  424. * 2. CHECKS ALL REAL DEVICE BLOCKS FOR AN RDEVBLOK WHOSE 00424000
  425. * VOLUME SERIAL NUMBER MATCHES THAT SPECIFIED; IF THE 00425000
  426. * DEVICE IS OFFLINE, HOWEVER, IT IS NOT CHECKED. 00426000
  427. * 00427000
  428. * 3. RETURNS TO CALLER WITH ADDRESS OF MATCHING RDEVBLOK 00428000
  429. * (IF FOUND), OR ERROR RETURN (CONDITION-CODE 1) IF NOT FOUND. 00429000
  430. *. 00430000
  431. EJECT 00431000
  432. *********************************************************************** 00432000
  433. * * 00433000
  434. * FIND A DEVICE WITH A MATCHING SERIAL NUMBER * 00434000
  435. * * 00435000
  436. *********************************************************************** 00436000
  437. SPACE 00437000
  438. ENTRY DMKSCNVS 00438000
  439. DMKSCNVS DS 0D (DBL-WORD-ALIGNED FOR BEST PERFORMANCE) 00439000
  440. USING *,R15 00440000
  441. ST R2,BALR2 SAVE REGISTER 2 00441000
  442. MVC BALRSAVE(6),BLANKS BLANK OUT FIELD BEFORE MOVE 00442000
  443. LR R2,R0 LOAD LENGTH OF SERIAL NUMBER 00443000
  444. BCTR R2,0 SUBTRACT 1 FOR MVC INSTRUCTION 00444000
  445. CL R2,F5 LENGTH-1 MUST NOT EXCEED 5 00445000
  446. BH VSEREXIT ERROR (CONDITION-CODE 2) IF IT DOES. 00446000
  447. EX R2,BALRMVC MOVE SERIAL NUMBER TO BALRSAVE 00447000
  448. L R1,ARIODV LOAD 1ST RDEVBLOK ADDRESS 00448000
  449. L R2,ARIODC LOAD RDEVBLOK COUNT ADDRESS 00449000
  450. LH R2,0(,R2) LOAD COUNT OF REAL DEVICE BLOCKS 00450000
  451. USING RDEVBLOK,R1 00451000
  452. VSERLOOP TM RDEVSTAT,RDEVDISA+RDEVDED OFFLINE OR DEDICATED ? 00452000
  453. BNZ VSERNEXT YES - DO NOT CHECK IT 00453000
  454. TM RDEVFLAG,RDEVMOUT VOLUME MOUNTED AND NOT ATTACHED ?? 00454000
  455. BO VSERNEXT YES -- CHECK NEXT 00455000
  456. CLC RDEVSER,BALRSAVE DO THE SERIAL NUMBERS MATCH ? 00456000
  457. BE VSEREXIT YES, CC = 0, RETURN TO CALLER 00457000
  458. VSERNEXT LA R1,RDEVSIZE*8(,R1) POINT TO NEXT REAL DEVICE BLOCK 00458000
  459. BCT R2,VSERLOOP LOOP IF MORE BLOCKS 00459000
  460. LR R1,R2 ZERO REGISTER 1 00460000
  461. CLI F0,X'FF' SET CC = 1 00461000
  462. VSEREXIT L R2,BALR2 RESTORE REGISTER 2 00462000
  463. BR R14 RETURN TO CALLER 00463000
  464. DROP R1 00464000
  465. EJECT 00465000
  466. *. 00466000
  467. * SUBROUTINE NAME - 00467000
  468. * 00468000
  469. * DMKSCNRD 00469000
  470. * 00470000
  471. * FUNCTION - 00471000
  472. * 00472000
  473. * TO COMPUTE A FULL REAL DEVICE ADDRESS (IN CCU FORM) FROM THE 00473000
  474. * RDEVADD, RCUADD, AND RCHADD ENTRIES IN THE REAL DEVICE, 00474000
  475. * CONTROL UNIT, AND CHANNEL BLOCKS. 00475000
  476. * 00476000
  477. * ATTRIBUTES - 00477000
  478. * 00478000
  479. * REENTRANT, RESIDENT, CALLED VIA BALR 00479000
  480. * 00480000
  481. * ENTRY POINT - 00481000
  482. * 00482000
  483. * DMKSCNRD 00483000
  484. * 00484000
  485. * ENTRY CONDITIONS - 00485000
  486. * 00486000
  487. * GPR 8 = ADDRESS OF REAL DEVICE BLOCK 00487000
  488. * GPR 14 = RETURN REGISTER 00488000
  489. * GPR 15 = ADDRESS OF DMKSCNRD 00489000
  490. * 00490000
  491. * EXIT CONDITIONS - 00491000
  492. * 00492000
  493. * GPR 1 HOLDS REAL DEVICE ADDRESS IN CCU FORM (IN BITS 16-31) 00493000
  494. * 00494000
  495. * CALLS TO OTHER ROUTINES - 00495000
  496. * 00496000
  497. * NONE 00497000
  498. * 00498000
  499. * EXTERNAL REFERENCES - 00499000
  500. * 00500000
  501. * NONE 00501000
  502. * 00502000
  503. * TABLES / WORK AREAS 00503000
  504. * 00504000
  505. * 00505000
  506. * BALR2-BALR3 OF BALRSAVE USED TO SAVE GPR2 & GPR 3 00506000
  507. * 00507000
  508. * REGISTER USAGE - 00508000
  509. * 00509000
  510. * GPR 1 = COMPUTED CCU DEVICE ADDRESS 00510000
  511. * GPR 2 = CONTROL UNIT BITS / CHANNEL BITS 00511000
  512. * GPR 3 = ADDRESS OF CONTROL UNIT BLOCK / CHANNEL BLOCK 00512000
  513. * GPR 14 = RETURN REGISTER 00513000
  514. * 00514000
  515. * GPRS 0, 4-13, AND 15 ARE NOT USED. 00515000
  516. EJECT 00516000
  517. * NOTES - 00517000
  518. * 00518000
  519. * IF IF IS DESIRED TO HAVE THE REAL DEVICE ADDRESS IN 00519000
  520. * PRINTABLE HEX FORM, THE CALL TO DMKSCNRD MAY BE FOLLOWED 00520000
  521. * IMMEDIATELY BY A CALL TO DMKCVTBH. 00521000
  522. * 00522000
  523. * OPERATION - 00523000
  524. * 00524000
  525. * THE RDEVADD BITS ARE OBTAINED FROM RDEVBLOK; THE RCUADD BITS 00525000
  526. * FROM RCUBLOK (POINTED TO BY RDEVCUA) ARE OR'D WITH RCHADD; 00526000
  527. * FINALLY, THE RCHADD BITS FROM RCHBLOK (POINTED TO BY RCUCHA) 00527000
  528. * ARE OR'D WITH RDEVADD/RCUADD TO FORM THE COMPLETE CCU DEVICE 00528000
  529. * ADDRESS. 00529000
  530. *. 00530000
  531. EJECT 00531000
  532. *********************************************************************** 00532000
  533. * 00533000
  534. * COMPUTE REAL DEVICE ADDRESS IN CCU FORM 00534000
  535. * 00535000
  536. *********************************************************************** 00536000
  537. SPACE 2 00537000
  538. USING RDEVBLOK,R8 00538000
  539. USING DMKSCNRD,R15 @VA01081 00539000
  540. SPACE 00540000
  541. ENTRY DMKSCNRD 00541000
  542. DMKSCNRD STM R2,R3,BALR2 SAVE R2-R3 IN BALRSAVE AREA 00542000
  543. LH R1,RDEVADD GET DEVICE BITS FROM RDEVBLOK 00543000
  544. L R3,RDEVCUA POINT TO CONTROL UNIT BLOCK 00544000
  545. USING RCUBLOK,R3 ... 00545000
  546. LH R2,RCUADD GET CONTROL UNIT BITS FROM RCUBLOK 00546000
  547. OR R1,R2 ADD CONTROL UNIT BITS TO DEVICE BITS 00547000
  548. TM RCUTYPE,RCUSUB IS THIS A SUBORDINATE CU @VA01081 00548000
  549. BZ *+8 NO- BRANCH @VA01081 00549000
  550. L R3,RCUPRIME YES- POINT TO THE PRIME CU @VA01081 00550000
  551. L R3,RCUCHA POINT TO CHANNEL BLOCK 00551000
  552. USING RCHBLOK,R3 ... 00552000
  553. LH R2,RCHADD GET CHANNEL BITS FROM RCHBLOK 00553000
  554. OR R1,R2 ADD TO DEVICE/CONTROL UNIT BITS 00554000
  555. LM R2,R3,BALR2 RESTORE R2-R3 AND 00555000
  556. BR R14 RETURN TO CALLER (THAT'S ALL, FOLKS). 00556000
  557. SPACE 00557000
  558. DROP R3,R8 00558000
  559. EJECT 00559000
  560. *. 00560000
  561. * SUBROUTINE NAME - 00561000
  562. * 00562000
  563. * DMKSCNRA 00563000
  564. * 00564000
  565. * FUNCTION - 00565000
  566. * TO COMPUTE A FULL REAL DEVICE ADDRESS (IN CUU FORM) FROM THE 00566000
  567. * RDEVADD, RCUADD, AND RCHADD ENTRIES IN THE REAL DEVICE, 00567000
  568. * CONTROL UNIT, AND CHANNEL BLOCKS. 00568000
  569. * 00569000
  570. * ATTRIBUTES - 00570000
  571. * 00571000
  572. * REENTRANT, RESIDENT, CALLED VIA BALR 00572000
  573. * 00573000
  574. * ENTRY POINT - 00574000
  575. * 00575000
  576. * DMKSCNRA 00576000
  577. * 00577000
  578. * ENTRY CONDITIONS - 00578000
  579. * 00579000
  580. * GPR 6 = ADDRESS OF THE REAL CHANNEL BLOCK 00580000
  581. * GPR 7 = ADDRESS OF THE PRIME OR ALTERNATE CONTROL UNIT BLOCK 00581000
  582. * GPR 8 = ADDRESS OF REAL DEVICE BLOCK 00582000
  583. * GPR 14 = RETURN REGISTER 00583000
  584. * GPR 15 = ADDRESS OF DMKSCNRA 00584000
  585. * 00585000
  586. * EXIT CONDITIONS - 00586000
  587. * 00587000
  588. * CC = 0 00588000
  589. * GPR 1 HOLDS REAL DEVICE ADDRESS IN CCU FORM (IN BITS 16-31) 00589000
  590. * 00590000
  591. * CC = 1 00591000
  592. * CONTROL UNIT BLOCK COULD NOT BE FOUND 00592000
  593. * ALL REGISTERS ARE UNMODIFIED 00593000
  594. * 00594000
  595. * CALLS TO OTHER ROUTINES - 00595000
  596. * 00596000
  597. * NONE 00597000
  598. * 00598000
  599. * EXTERNAL REFERENCES - 00599000
  600. * 00600000
  601. * NONE 00601000
  602. * 00602000
  603. * TABLES / WORK AREAS 00603000
  604. * 00604000
  605. * BALR2 OF BALRSAVE USED TO SAVE GPR2 00605000
  606. * 00606000
  607. EJECT 00607000
  608. * REGISTER USAGE - 00608000
  609. * 00609000
  610. * GPR 1 = COMPUTED CCU DEVICE ADDRESS 00610000
  611. * GPR 2 = CONTROL UNIT BLOCK ADDRESS / CONTROL UNIT ADDRESS 00611000
  612. * GPR 6 = RCHBLOK ADDRESS 00612000
  613. * GPR 7 = RCUBLOK ADDRESS 00613000
  614. * GPR 8 = RDEVBLOK ADDRESS 00614000
  615. * GPR 14 = RETURN REGISTER 00615000
  616. * 00616000
  617. * GPRS 0, 3-5, 9-13, AND 15 ARE NOT USED. 00617000
  618. * NOTES - 00618000
  619. * 00619000
  620. * IF IT IS DESIRED TO HAVE THE REAL DEVICE ADDRESS IN 00620000
  621. * PRINTABLE HEX FORM, THE CALL TO DMKSCNRA MAY BE FOLLOWED 00621000
  622. * IMMEDIATELY BY A CALL TO DMKCVTBH. 00622000
  623. * 00623000
  624. * OPERATION - 00624000
  625. * 00625000
  626. * THE RDEVADD BITS ARE OBTAINED FROM THE RDEVBLOK (R8). 00626000
  627. * THE RCHADD BITS ARE OBTAINED FROM THE RCHBLOK (R6). 00627000
  628. * THE RCUADD BITS ARE OBTAINED FROM THE RCUBLOK WHICH 00628000
  629. * REPRESENTS THE PATH TO THE R7 RCUBLOK. IF THE RDEVBLOK 00629000
  630. * POINTS TO A SUBORDINATE CONTROL UNIT, THEN THE SUBORDINATE 00630000
  631. * CONTROL UNIT BLOCK RDEVADD BITS WILL BE USED TO CONSTRUCT 00631000
  632. * THE ADDRESS. 00632000
  633. * THE RDEVADD BITS ARE OR'D WITH THE RCUADD BITS WHICH ARE 00633000
  634. * OR'D WITH THE RCHADD BITS TO FORM THE CCU ADDRESS RETURNED 00634000
  635. * IN R1. 00635000
  636. * 00636000
  637. *. 00637000
  638. EJECT 00638000
  639. *********************************************************************** 00639000
  640. * 00640000
  641. * COMPUTE REAL DEVICE ADDRESS IN CCU FORM 00641000
  642. * 00642000
  643. *********************************************************************** 00643000
  644. SPACE 2 00644000
  645. USING RCHBLOK,R6 @V407438 00645000
  646. USING RCUBLOK,R7 @V407438 00646000
  647. USING RDEVBLOK,R8 @V407438 00647000
  648. USING DMKSCNRA,R15 @V407438 00648000
  649. SPACE 00649000
  650. ENTRY DMKSCNRA @V407438 00650000
  651. DMKSCNRA ST R2,BALR2 SAVE R2 IN BALRSAVE AREA @V407438 00651000
  652. CL R7,RDEVCUA IS R7 FROM THE 'A' PATH? @V407438 00652000
  653. BNE RACKCUAS NOT PRIME, GO CHECK SUBORDINATE @V407438 00653000
  654. LH R2,RCUADD GET CONTROL UNIT ADDRESS @V407438 00654000
  655. B SETADDR AND CONTINUE. @V407438 00655000
  656. RACKCUAS L R2,RDEVCUA GET ADDRESS OF CONTROL UNIT @V407438 00656000
  657. CL R7,RCUPRIME-RCUBLOK(R2) IS THIS THE R7 CUBLOK? @V407438 00657000
  658. BNE RACKCUB NOPE, GO TRY THE 'B' PATH(S) @V407438 00658000
  659. LH R2,RCUADD-RCUBLOK(R2) YES, GET ADDR OF CU @V407438 00659000
  660. B SETADDR AND CONTINUE @V407438 00660000
  661. RACKCUB CL R7,RDEVCUB IS R7 FROM THE 'B' PATH? @V407438 00661000
  662. BNE RACKCUBS NOPE, GO CKECK FOR SUBORDINATE @V407438 00662000
  663. LH R2,RCUADD YES, GET CONTROL UNIT ADDRESS @V407438 00663000
  664. B SETADDR AND CONTINUE @V407438 00664000
  665. RACKCUBS L R2,RDEVCUB GET ADDR OF CONTROL UNIT @V407438 00665000
  666. LTR R2,R2 DOES IT EXIST? @V407438 00666000
  667. BZ RACC1 NOPE, BAD BLOCKS, NO ADDR TODAY @V407438 00667000
  668. CL R7,RCUPRIME-RCUBLOK(R2) IS THIS THE R7 CUBLOK? @V407438 00668000
  669. BNE RACC1 NOPE, BAD BLOCKS, NO ADDR TODAY @V407438 00669000
  670. LH R2,RCUADD-RCUBLOK(R2) YES, GET ADDR OF CU @V407438 00670000
  671. SETADDR LH R1,RDEVADD GET DEVICE ADDRESS @V407438 00671000
  672. OR R1,R2 ADD IN THE CONTROL UNIT @V407438 00672000
  673. LH R2,RCHADD GET CHANNEL ADDRESS @V407438 00673000
  674. OR R1,R2 ADD IN THE CHANNEL ADDRESS @V407438 00674000
  675. CLR R1,R1 SET CONDITION CODE 0 @V407438 00675000
  676. B RAXIT DONE, BR. @V407438 00676000
  677. SPACE 00677000
  678. RACC1 TM *,X'FF' SET CONDITION CODE 1 @V407438 00678000
  679. RAXIT L R2,BALR2 RESTORE REGISTER @V407438 00679000
  680. BR R14 AND RETURN @V407438 00680000
  681. DROP R6,R7,R8 NO MORE RBLOKS @V407438 00681000
  682. EJECT 00682000
  683. *. 00683000
  684. * SUBROUTINE NAME - 00684000
  685. * 00685000
  686. * DMKSCNNP 00686000
  687. * 00687000
  688. * FUNCTION - 00688000
  689. * 00689000
  690. * FIND THE RCHBLOK AND RCUBLOK WHICH REPRESENTS THE NEXT 00690000
  691. * LOGICAL PATH TO THE DEVICE 00691000
  692. * 00692000
  693. * ATTRIBUTES - 00693000
  694. * 00694000
  695. * REENTRANT, RESIDENT, CALLED VIA BALR 00695000
  696. * 00696000
  697. * ENTRY POINT - 00697000
  698. * 00698000
  699. * DMKSCNNP 00699000
  700. * 00700000
  701. * ENTRY CONDITIONS - 00701000
  702. * 00702000
  703. * GPR 6 = ADDRESS OF THE REAL CHANNEL BLOCK 00703000
  704. * GPR 7 = ADDRESS OF THE PRIME OR ALTERNATE CONTROL UNIT BLOCK 00704000
  705. * GPR 8 = ADDRESS OF REAL DEVICE BLOCK 00705000
  706. * GPR 14 = RETURN REGISTER 00706000
  707. * GPR 15 = ADDRESS OF DMKSCNNP 00707000
  708. * 00708000
  709. * EXIT CONDITIONS - 00709000
  710. * 00710000
  711. * CC = 0 00711000
  712. * GPR 6 HOLDS THE RCHBLOK ADDRESS OF THE NEXT PATH 00712000
  713. * GPR 7 HOLDS THE RCUBLOK ADDRESS FOR THE NEXT PATH 00713000
  714. * 00714000
  715. * CC = 1 00715000
  716. * THERE ARE NO MORE PATHS FOR THIS DEVICE 00716000
  717. * 00717000
  718. * CALLS TO OTHER ROUTINES - 00718000
  719. * 00719000
  720. * NONE 00720000
  721. * 00721000
  722. * EXTERNAL REFERENCES - 00722000
  723. * 00723000
  724. * NONE 00724000
  725. * 00725000
  726. * TABLES / WORK AREAS 00726000
  727. * 00727000
  728. * BALR3-BALR7 OF BALRSAVE USED TO SAVE GPR3-GPR7 00728000
  729. * 00729000
  730. * REGISTER USAGE - 00730000
  731. * 00731000
  732. * GPR 3 = BEGINNING OF CHANNEL SEARCH ADDRESS 00732000
  733. * GPR 4 = INCREMENT 00733000
  734. * GPR 5 = ENDING OF CHANNEL SEARCH ADDRESS 00734000
  735. * GPR 6 = RCHBLOK ADDRESS 00735000
  736. * GPR 7 = RCUBLOK ADDRESS 00736000
  737. * GPR 8 = RDEVBLOK ADDRESS 00737000
  738. * GPR 14 = RETURN REGISTER 00738000
  739. * 00739000
  740. * GPRS 0-2, 9-13 AND 15 ARE NOT USED. 00740000
  741. EJECT 00741000
  742. * 00742000
  743. * OPERATION - 00743000
  744. * 00744000
  745. * THE R7 RCUBLOK IS SEARCHED TO FIND THE CURRENT R6 RCHBLOK. 00745000
  746. * IF IT IS FOUND, THE NEXT RCUCHX FIELD IS EXAMINED FOR A 00746000
  747. * POSSIBLE PATH. IF THERE IS A PATH, EXIT WITH CONDITION 00747000
  748. * CODE 0. IF THERE IS NO RCUCHX (VALUE = 0) OR ALL RCUCHX 00748000
  749. * FIELDS ARE EXAMINED AND THE CURRENT R6 IS NOT FOUND (MEANING 00749000
  750. * EITHER R6 REPRESENTS RCUCHD OR IT DOES NOT APPEAR IN THE 00750000
  751. * R7 RCUBLOK) THEN THE RDEVBLOK IS SEARCHED TO FIND WHICH 00751000
  752. * RCUBLOK THE CURRENT R7 POINTS TO. IF R7 REPRESENTS THE 00752000
  753. * RDEVCUA PATH AND THERE IS NO RDEVCUB, EXIT WITH CONDITION 00753000
  754. * CODE 1. IF R7 REPRESENTS THE RDEVCUB ALREADY, EXIT WITH 00754000
  755. * CONDITON CODE 1. IF R7 REPRESENTS THE RDEVCUA PATH AND 00755000
  756. * THERE EXISTS AN RDEVCUB PATH, RETURN WITH THE FIRST CHANNEL 00756000
  757. * PATH ON THE NEW CONTROL UNIT. 00757000
  758. * 00758000
  759. *. 00759000
  760. EJECT 00760000
  761. *********************************************************************** 00761000
  762. * 00762000
  763. * FIND THE NEXT LOGICAL PATH TO THE DEVICE 00763000
  764. * 00764000
  765. *********************************************************************** 00765000
  766. SPACE 2 00766000
  767. USING RCHBLOK,R6 @V407438 00767000
  768. USING RCUBLOK,R7 @V407438 00768000
  769. USING RDEVBLOK,R8 @V407438 00769000
  770. USING DMKSCNNP,R15 @V407438 00770000
  771. SPACE 00771000
  772. ENTRY DMKSCNNP @V407438 00772000
  773. DMKSCNNP STM R3,R7,BALR3 SAVE REGS IN BALRSAVE AREA @V407438 00773000
  774. LA R3,RCUCHA ADDRESS OF FIRST EXAMINED CHAN @V407438 00774000
  775. LA R4,4 INCREMENT @V407438 00775000
  776. LA R5,RCUCHC ADDRESS OF THE LAST EXAMINED CHAN@V407438 00776000
  777. CL R6,0(R3) IS THIS THE CURRENT CHANNEL? @V407438 00777000
  778. BE NXTCH YES, BR @V407438 00778000
  779. BXLE R3,R4,*-8 KEEP LOOKING @V407438 00779000
  780. CHKNXTCU CL R7,RDEVCUA DOES R7 REPRESENT 1ST CTL UNIT? @V407438 00780000
  781. BE NXTCU YES, GO GET NEXT CTL UNIT @V407438 00781000
  782. L R3,RDEVCUA MAKE SURE PLEASE... @V407438 00782000
  783. CL R7,RCUPRIME-RCUBLOK(R3) ... @V407438 00783000
  784. BE NXTCU FOUND IT, GO GET NEXT CTL UNIT @V407438 00784000
  785. NPCC1 TM *,X'FF' NO MORE PATHS, BR. @V407438 00785000
  786. LM R3,R7,BALR3 RESTORE REGS @V407438 00786000
  787. BR R14 RETURN TO CALLER @V407438 00787000
  788. SPACE 00788000
  789. NXTCU L R7,RDEVCUB GET NEXT CTL UNIT @V407438 00789000
  790. LTR R7,R7 IS IT REALLY THERE? @V407438 00790000
  791. BZ NPCC1 NOPE, NO MORE PATHS, BR. @V407438 00791000
  792. TM RCUTYPE,RCUSUB IS THIS A SUBORDINATE? @V407438 00792000
  793. BZ *+8 NOPE, BR. @V407438 00793000
  794. L R7,RCUPRIME ADDRESS THE PRIME CTL UNIT @V407438 00794000
  795. L R6,RCUCHA GET THE NEXT PATH CHANNEL BLOCK @V407438 00795000
  796. NPCC0 LM R3,R5,BALR3 RESTORE CLOBBERED REGS @V407438 00796000
  797. TM *+1,X'00' SET CC0 @V407438 00797000
  798. BR R14 RETURN TO CALLER @V407438 00798000
  799. SPACE 00799000
  800. NXTCH L R6,4(R3) GET THE NEXT CHANNEL @V407438 00800000
  801. LTR R6,R6 DOES THIS CHANNEL EXIST? @V407438 00801000
  802. BZ CHKNXTCU NOPE, TRY FOR NEXT CU @V407438 00802000
  803. B NPCC0 YES, EXIT WITH CC0 (R7 UNCHANGED)@V407438 00803000
  804. DROP R6,R7,R8 NO MORE RBLOKS @V407438 00804000
  805. EJECT 00805000
  806. *. 00806000
  807. * SUBROUTINE NAME - 00807000
  808. * 00808000
  809. * DMKSCNVD 00809000
  810. * 00810000
  811. * FUNCTION - 00811000
  812. * 00812000
  813. * TO COMPUTE A FULL VIRTUAL DEVICE ADDRESS (IN CCU FORM), PLUS 00813000
  814. * THE ADDRESSES OF THE VIRTUAL CHANNEL AND CONTROL UNIT BLOCKS, 00814000
  815. * FROM A SPECIFIED VIRTUAL DEVICE BLOCK. 00815000
  816. * 00816000
  817. * ATTRIBUTES - 00817000
  818. * 00818000
  819. * REENTRANT, RESIDENT, CALL VIA BALR 00819000
  820. * 00820000
  821. * ENTRY POINT - 00821000
  822. * 00822000
  823. * DMKSCNVD 00823000
  824. * 00824000
  825. * ENTRY CONDITIONS - 00825000
  826. * 00826000
  827. * GPR 8 = ADDRESS OF VIRTUAL DEVICE BLOCK 00827000
  828. * GPR 11 = ADDRESS OF USER'S VMBLOK 00828000
  829. * GPR 14 = RETURN REGISTER 00829000
  830. * GPR 15 = ADDRESS OF DMKSCNVD 00830000
  831. * 00831000
  832. * EXIT CONDITIONS - 00832000
  833. * 00833000
  834. * IF SUCCESSFUL: 00834000
  835. * 00835000
  836. * CC = 0 00836000
  837. * 00837000
  838. * GPR 1 HOLDS VIRTUAL DEVICE ADDRESS IN CCU FORM (BITS 16-31) 00838000
  839. * GPR 6 = ADDRESS OF VIRTUAL CHANNEL BLOCK 00839000
  840. * GPR 7 = ADDRESS OF VIRTUAL CONTROL UNIT BLOCK 00840000
  841. * GPR 8 = ADDRESS OF VIRTUAL DEVICE BLOCK (SAME AS AT ENTRY) 00841000
  842. * GPR 15 = 0 00842000
  843. * 00843000
  844. * IF NOT FOUND: 00844000
  845. * 00845000
  846. * CC = 1, AND ALL REGISTERS SAME AS AT ENTRY. 00846000
  847. * 00847000
  848. * CALLS TO OTHER ROUTINES - 00848000
  849. * 00849000
  850. * NONE 00850000
  851. * 00851000
  852. * EXTERNAL REFERENCES - 00852000
  853. * 00853000
  854. * NONE 00854000
  855. EJECT 00855000
  856. * TABLES / WORK AREAS 00856000
  857. * 00857000
  858. * 00858000
  859. * BALR1-BALR8 OF BALRSAVE USED TO SAVE GPR 1 - 8 00859000
  860. * 00860000
  861. * REGISTER USAGE - 00861000
  862. * 00862000
  863. * GPR 1 = WORK REGISTER, & FINALLY COMPUTED CCU DEVICE ADDRESS 00863000
  864. * GPRS 2-5 = INDEXING REGISTERS FOR BXLE LOOPS 00864000
  865. * GPR 6 = ADDRESS OF VCHBLOK 00865000
  866. * GPR 7 = ADDRESS OF VCUBLOK 00866000
  867. * GPR 8 = ADDRESS OF VDEVBLOK 00867000
  868. * GPR 11 = ADDRESS OF USER'S VMBLOK 00868000
  869. * GPR 14 = RETURN REGISTER 00869000
  870. * GPR 15 = BASE REGISTER 00870000
  871. * 00871000
  872. * GPRS 0, 9-10, AND 12-13 ARE NOT USED. 00872000
  873. * 00873000
  874. * NOTES - 00874000
  875. * 00875000
  876. * NONE 00876000
  877. * 00877000
  878. * OPERATION - 00878000
  879. * 00879000
  880. * INDEXES THRU THE VIRTUAL CHANNEL AND CONTROL UNIT BLOCKS 00880000
  881. * LOOKING FOR AN INDEX WHICH MATCHES THE GIVEN DEVICE ADDRESS; 00881000
  882. * IF FOUND, COMPUTES VIRTUAL DEVICE BLOCK FOR THAT COMBINATION; 00882000
  883. * IF IT MATCHES GPR 8 AT INPUT, THE DESIRED CCU DEVICE ADDRESS 00883000
  884. * IS COMPUTED, AND EXIT MADE. IF NOT, THE REMAINING 00884000
  885. * VIRTUAL BLOCKS ARE SEARCHED UNTIL A MATCH IS FOUND, OR UNTIL 00885000
  886. * ALL BLOCKS HAVE BEEN EXHAUSTED (AN ERROR CONDITION). 00886000
  887. *. 00887000
  888. EJECT 00888000
  889. *********************************************************************** 00889000
  890. * 00890000
  891. * COMPUTE VIRTUAL DEVICE ADDRESS IN CCU FORM, ETC. 00891000
  892. * 00892000
  893. *********************************************************************** 00893000
  894. SPACE 3 00894000
  895. USING VDEVBLOK,R8 00895000
  896. USING VMBLOK,R11 00896000
  897. USING DMKSCNVD,R15 00897000
  898. ENTRY DMKSCNVD 00898000
  899. DMKSCNVD STM R1,R8,BALR1 ENTER, SAVE NEEDED REGISTERS 00899000
  900. LH R3,VDEVADD VIRTUAL DEVICE ADDRESS BITS INTO R3, 00900000
  901. ALR R3,R3 DOUBLE IT TO FORM CU/DEV INDEX HALFWORD 00901000
  902. LA R4,2 LOAD INDEX INCREMENT 00902000
  903. LA R5,30 LOAD INDEX COMPARAND 00903000
  904. SR R1,R1 ZERO VMCHTBL INDEX 00904000
  905. SCNNCH LH R6,VMCHTBL(R1) LOAD NEXT CHANNEL BLOK INDEX 00905000
  906. LTR R6,R6 DOES CHANNEL EXIST ? 00906000
  907. BM SCNXCH NO, INDEX TO NEXT ONE 00907000
  908. A R6,VMCHSTRT POINT TO VCHBLOK 00908000
  909. USING VCHBLOK,R6 00909000
  910. SR R2,R2 ZERO VCHCUTBL INDEX 00910000
  911. SCNNCU LH R7,VCHCUTBL(R2) LOAD NEXT CU BLOK INDEX 00911000
  912. LTR R7,R7 DOES CONTROL UNIT EXIST 00912000
  913. BM SCNXCU NO, INDEX TO NEXT ONE 00913000
  914. A R7,VMCUSTRT POINT TO VCUBLOK 00914000
  915. USING VCUBLOK,R7 00915000
  916. LH R8,VCUDVTBL(R3) LOAD DEVICE BLOK INDEX 00916000
  917. LTR R8,R8 DOES DEVICE EXIST ? 00917000
  918. BM SCNXCU NO, INDEX TO NEXT CONTROL UNIT 00918000
  919. A R8,VMDVSTRT POINT TO VDEVBLOK 00919000
  920. C R8,BALR8 IS IT THE ONE WE WERE LOOKING FOR? 00920000
  921. BE SCNFOUND YES - GOOD SHOW. 00921000
  922. SCNXCU BXLE R2,R4,SCNNCU BRANCH IF MORE CONTROL UNITS ON THIS CHAN 00922000
  923. SCNXCH BXLE R1,R4,SCNNCH BRANCH IF MORE CHANNELS ON THIS MACHINE 00923000
  924. LM R1,R8,BALR1 NOT FOUND - SOMEBODY GOOFED; RESTORE REGS 00924000
  925. B SETCC1 GO SET CONDITION-CODE 1 AND EXIT. 00925000
  926. SPACE 00926000
  927. * WE HAVE FOUND ALL THREE BLOCKS ASSOCIATED WITH THE DEVICE: 00927000
  928. SCNFOUND LH R1,VCHADD GET CHANNEL BITS, 00928000
  929. AH R1,VCUADD 'OR' IN CONTROL UNIT BITS, 00929000
  930. AH R1,VDEVADD AND DEVICE BITS 00930000
  931. LM R2,R5,BALR2 RESTORE R2 THRU R5, 00931000
  932. SR R15,R15 CLEAR CONDITION-CODE, 00932000
  933. BR R14 AND RETURN TO CALLER. 00933000
  934. * 00934000
  935. DROP R6,R7,R8,R11 00935000
  936. EJECT 00936000
  937. *. 00937000
  938. * SUBROUTINE NAME - 00938000
  939. * 00939000
  940. * DMKSCNAU - FIND THE VMBLOK WITH A GIVEN USERID 00940000
  941. * 00941000
  942. * FUNCTION - 00942000
  943. * 00943000
  944. * TO SEARCH THE CHAIN OF VMBLOKS FOR ONE WHOSE USERID MATCHES 00944000
  945. * THE ONE POINTED TO BY REGISTER 1. 00945000
  946. * 00946000
  947. * ATTRIBUTES - 00947000
  948. * 00948000
  949. * REENTRANT, RESIDENT, CALLED VIA BALR 00949000
  950. * 00950000
  951. * ENTRY POINT - 00951000
  952. * 00952000
  953. * DMKSCNAU 00953000
  954. * 00954000
  955. * ENTRY CONDITIONS - 00955000
  956. * 00956000
  957. * GPR 0 CONTAINS THE LENGTH OF THE USERID 00957000
  958. * GPR 1 POINTS TO A USERID WHOSE VMBLOK IS TO BE FOUND 00958000
  959. * GPR 14 = RETURN ADDRESS 00959000
  960. * GPR 15 = ADDRESS OF DMKSCNAU 00960000
  961. * 00961000
  962. * EXIT CONDITIONS - 00962000
  963. * 00963000
  964. * CC = 0 IF A MATCHING VMBLOK IS FOUND (GPR 1 IS VALID) 00964000
  965. * CC = 1 IF NO MATCH IS FOUND (GPR 1 NOT VALID) 00965000
  966. * CC = 2 IF LENGTH OF USERID < 1 OR > 8 (CALLING ERROR) 00966000
  967. * CC = 3 IF VMBLOK FOUND BUT IN LOGON OR LOGOFF, 00967000
  968. * (GPR1 IS VALID). 00968000
  969. * 00969000
  970. * GPR 1 POINTS TO THE VMBLOK WITH THE SPECIFIED USERID 00970000
  971. * 00971000
  972. * CALLS TO OTHER ROUTINES - 00972000
  973. * 00973000
  974. * NONE 00974000
  975. * 00975000
  976. * EXTERNAL REFERENCES - 00976000
  977. * 00977000
  978. * ASYSVM - ADDRESS OF SYSTEM VMBLOK 00978000
  979. * 00979000
  980. * TABLES / WORK AREAS - 00980000
  981. * 00981000
  982. * THE FIRST 8 BYTES OF BALRSAVE ARE USED TO SAVE THE USERID 00982000
  983. * TO BE SEARCHED FOR. 00983000
  984. * 00984000
  985. * BALR2 - BALR4 (WITHIN BALRSAVE) ARE USED 00985000
  986. * TO SAVE REGISTERS 2 THRU 4. 00986000
  987. EJECT 00987000
  988. * REGISTER USAGE - 00988000
  989. * 00989000
  990. * GPR 1 = VMBLOK BASE REGISTER 00990000
  991. * GPR 2 = ADDRESS OF SYSTEM VMBLOK (STARTING/ENDING POINT) 00991000
  992. * GPR 3-4 USERID WHILE SEARCH IS BEING MADE 00992000
  993. * GPR 14 = RETURN ADDRESS 00993000
  994. * GPR 15 = BASE REGISTER 00994000
  995. * 00995000
  996. * GPRS 5-13 ARE NOT USED. 00996000
  997. * 00997000
  998. * NOTES - 00998000
  999. * 00999000
  1000. * NONE 01000000
  1001. * 01001000
  1002. * OPERATION - 01002000
  1003. * 01003000
  1004. * 1. CHECKS NUMBER OF BYTES IN USERID 01004000
  1005. * (ERROR IF NOT 1 TO 8 - CONDITION-CODE 2 RETURNED). 01005000
  1006. * 01006000
  1007. * 2. STARTING FROM THE SYSTEM VMBLOK, CHECKS ALL ACTIVE VMBLOKS 01007000
  1008. * FOR A USERID WHICH MATCHES THAT SPECIFIED. RETURNS ADDRESS 01008000
  1009. * OF MATCHING VMBLOK IF FOUND, BUT SETS CONDITION-CODE 3 01009000
  1010. * IF THE USER IS IN LOGOFF STATUS (CONDITION-CODE 0 IF NOT). 01010000
  1011. * 01011000
  1012. * 3. RETURNS CONDITION-CODE 1 IF USERID WAS NOT FOUND. 01012000
  1013. *. 01013000
  1014. EJECT 01014000
  1015. *********************************************************************** 01015000
  1016. * * 01016000
  1017. * FIND THE VMBLOK WITH A GIVEN USERID * 01017000
  1018. * * 01018000
  1019. *********************************************************************** 01019000
  1020. SPACE 01020000
  1021. ENTRY DMKSCNAU 01021000
  1022. DMKSCNAU DS 0D (DBL-WORD-ALIGNED FOR BEST PERFORMANCE) 01022000
  1023. USING *,R15 01023000
  1024. STM R2,R4,BALR2 SAVE REGISTERS 2 THRU 4 01024000
  1025. MVC BALRSAVE(8),BLANKS BLANK OUT FIELD BEFORE MOVE 01025000
  1026. LR R2,R0 LOAD LENGTH OF USERID 01026000
  1027. BCTR R2,0 SUBTRACT 1 FOR MVC INSTRUCTION 01027000
  1028. CL R2,F7 LENGTH-1 MUST NOT EXCEED 7 01028000
  1029. BH FINDEXIT ERROR (CONDITION-CODE 2) IF IT DOES. 01029000
  1030. EX R2,BALRMVC MOVE USERID TO BALRSAVE 01030000
  1031. L R1,ASYSVM START FROM SYSTEM VMBLOK 01031000
  1032. USING VMBLOK,R1 01032000
  1033. L R1,VMPNT START WITH 1ST USER POINTED TO BY SYSVM, 01033000
  1034. LTR R2,R1 SAVE (& CHECK) STARTING VMBLOK ADDRESS 01034000
  1035. BZ FINDREST IF NOBODY HOME AT ALL, EXIT WITH CC = 1. 01035000
  1036. LM R3,R4,BALRSAVE USERID WE WANT TO MATCH INTO R3-R4 01036000
  1037. FINDLOOP CL R3,VMUSER DOES 1ST HALF OF USERID MATCH ? 01037000
  1038. BE FIND2ND YES, CHECK 2ND HALF (PROBABLY OK). 01038000
  1039. FINDNEXT L R1,VMPNT LOAD NEXT VMBLOK ADDRESS 01039000
  1040. CR R1,R2 ARE WE BACK AT THE BEGINNING ? 01040000
  1041. BNE FINDLOOP NO, CONTINUE SEARCH 01041000
  1042. FINDREST LM R2,R4,BALR2 IF NOT FOUND, RESTORE REGISTERS 2 THRU 4 01042000
  1043. B SETCC1 SET CC = 1 AND RETURN TO CALLER 01043000
  1044. SPACE 01044000
  1045. FIND2ND CL R4,VMUSER+4 DOES 2ND HALF OF USERID MATCH ? 01045000
  1046. BNE FINDNEXT IF NOT, GO CHECK NEXT VMBLOK. 01046000
  1047. TM VMRSTAT,VMLOGOFF USER IN LOGOFF STATUS ? 01047000
  1048. * NO, CC = 0 - YES, CC = 3 01048000
  1049. BO FINDEXIT YES, GOOD ENOUGH. 01049000
  1050. TM VMRSTAT,VMLOGON NOPE, THEN TRY LOGON TOO. 01050000
  1051. FINDEXIT LM R2,R4,BALR2 RESTORE REGISTERS 2 THRU 4 01051000
  1052. BR R14 RETURN TO CALLER 01052000
  1053. DROP R1 01053000
  1054. EJECT 01054000
  1055. *. 01055000
  1056. * SUBROUTINE NAME - 01056000
  1057. * 01057000
  1058. * DMKSCNFD - FIND THE NEXT FIELD IN THE INPUT BUFFER 01058000
  1059. * 01059000
  1060. * FUNCTION - 01060000
  1061. * 01061000
  1062. * TO FIND THE NEXT FIELD IN AN INPUT MESSAGE BUFFER. 01062000
  1063. * 01063000
  1064. * ATTRIBUTES - 01064000
  1065. * 01065000
  1066. * REENTRANT, RESIDENT, CALLED VIA BALR 01066000
  1067. * 01067000
  1068. * ENTRY POINT - 01068000
  1069. * 01069000
  1070. * DMKSCNFD 01070000
  1071. * 01071000
  1072. * ENTRY CONDITIONS - 01072000
  1073. * 01073000
  1074. * GPR 9 POINTS TO AN 18 DOUBLE WORD INPUT BUFFER. 01074000
  1075. * GPR 11 CONTAINS THE USER'S VMBLOK ADDRESS 01075000
  1076. * GPR 14 = RETURN ADDRESS 01076000
  1077. * GPR 15 = ADDRESS OF DMKSCNFD 01077000
  1078. * 01078000
  1079. * THE LAST DOUBLE WORD OF THE INPUT BUFFER MUST CONTAIN THE 01079000
  1080. * ADDRESS OF THE NEXT BYTE TO BE LOOKED AT AND A COUNT OF THE 01080000
  1081. * REMAINING BYTES IN THE BUFFER. 01081000
  1082. * 01082000
  1083. * EXIT CONDITIONS - 01083000
  1084. * 01084000
  1085. * CC = 0 IF A FIELD IS FOUND 01085000
  1086. * CC = 1 IF A LOGICAL CARRIAGE RETURN IF FOUND 01086000
  1087. * CC = 2 IF THE END OF THE BUFFER IS REACHED 01087000
  1088. * 01088000
  1089. * GPR 0 CONTAINS THE NUMBER OF BYTES IN THE FIELD 01089000
  1090. * GPR 1 POINTS TO THE FIRST BYTE OF THE FIELD 01090000
  1091. * 01091000
  1092. * THE LAST DOUBLE WORD OF THE INPUT BUFFER CONTAINS 01092000
  1093. * THE UPDATED LOCATION POINTER AND COUNT. 01093000
  1094. * 01094000
  1095. * CALLS TO OTHER ROUTINES - 01095000
  1096. * 01096000
  1097. * NONE 01097000
  1098. * 01098000
  1099. * EXTERNAL REFERENCES - 01099000
  1100. * 01100000
  1101. * NONE 01101000
  1102. * 01102000
  1103. * TABLES / WORK AREAS - 01103000
  1104. * 01104000
  1105. * BALR2 - BALR5 (WITHIN BALRSAVE) ARE USED 01105000
  1106. * TO SAVE REGISTERS 2 THRU 5. 01106000
  1107. EJECT 01107000
  1108. * REGISTER USAGE - 01108000
  1109. * 01109000
  1110. * GPR 0 = FIELD LENGTH 01110000
  1111. * GPR 1 = START OF FIELD 01111000
  1112. * GPR 2 = NEXT BYTE LOCATION 01112000
  1113. * GPR 3 = BUFFER BYTE COUNT 01113000
  1114. * GPR 4 = RDEVBLOK BASE REGISTER 01114000
  1115. * GPR 5 = 1 01115000
  1116. * GPR 9 = ADDRESS OF INPUT BUFFER 01116000
  1117. * GPR 11 = ADDRESS OF VMBLOK 01117000
  1118. * GPR 14 = RETURN ADDRESS 01118000
  1119. * GPR 15 = BASE REGISTER 01119000
  1120. * 01120000
  1121. * GPRS 6-8, 10, & 12-13 ARE NOT USED. 01121000
  1122. * 01122000
  1123. * NOTES - 01123000
  1124. * 01124000
  1125. * NONE 01125000
  1126. * 01126000
  1127. * OPERATION 01127000
  1128. * 01128000
  1129. * 1. CHECKS TO SEE IF ANY BYTES AT ALL ARE LEFT IN INPUT BUFFER 01129000
  1130. * (ERROR IF NOT - CONDITION-CODE 2 IS RETURNED). 01130000
  1131. * 01131000
  1132. * 2. SCANS REMAINING BYTES IN INPUT BUFFER FOR A NON-BLANK 01132000
  1133. * CHARACTER. (CONDITION-CODE 2 IS RETURNED IF NO NON-BLANK 01133000
  1134. * FIELD IS FOUND). 01134000
  1135. * 01135000
  1136. * 3. SCANS FIELD WHERE NON-BLANK CHARACTER WAS FOUND FOR A 01136000
  1137. * LOGICAL CARRIAGE RETURN (DEFINED IN TERMINAL VDEVBLOK) 01137000
  1138. * OR UNTIL NUMBER OF BYTES IS EXHAUSTED (WHICHEVER OCCURS 01138000
  1139. * FIRST). 01139000
  1140. * 01140000
  1141. * 4. CHECKS NUMBER OF BYTES FOUND IN NON-BLANK FIELD. 01141000
  1142. * (IF ZERO - ONLY POSSIBLE IF A LOGICAL CARRIAGE RETURN 01142000
  1143. * WAS THE ONLY CHARACTER - RETURNS A CONDITION-CODE 1). 01143000
  1144. * 01144000
  1145. * 5. OTHERWISE, RETURNS ADDRESS OF NON-BLANK FIELD (IN GPR 1) 01145000
  1146. * AND NUMBER OF BYTES IN FIELD (IN GPR 0) TO CALLER 01146000
  1147. * (WITH CONDITION-CODE = 0). 01147000
  1148. *. 01148000
  1149. EJECT 01149000
  1150. *********************************************************************** 01150000
  1151. * * 01151000
  1152. * SCAN FOR THE NEXT FIELD IN THE INPUT BUFFER * 01152000
  1153. * * 01153000
  1154. *********************************************************************** 01154000
  1155. SPACE 01155000
  1156. ENTRY DMKSCNFD 01156000
  1157. DMKSCNFD DS 0D (DBL-WORD-ALIGNED FOR BEST PERFORMANCE) 01157000
  1158. USING *,R15 01158000
  1159. USING BUFFER,R9 01159000
  1160. USING VMBLOK,R11 01160000
  1161. STM R2,R5,BALR2 SAVE REGISTERS 2 THRU 5 01161000
  1162. LM R2,R3,BUFNXT LOAD BUFFER POINTER AND COUNT 01162000
  1163. LTR R3,R3 IS THE COUNT ZERO ? 01163000
  1164. BNP SCANZERO YES, INDICATE END OF BUFFER 01164000
  1165. LA R5,1 SET R5 = 1 FOR INCREMENTING USE 01165000
  1166. LA R2,0(,R2) CLEAR HIGH ORDER BYTE 01166000
  1167. SCANFRST CLI 0(R2),C' ' IS THIS THE START OF A FIELD ? 01167000
  1168. BNE SCANSTRT BRANCH IF YES 01168000
  1169. AR R2,R5 POINT TO NEXT BYTE 01169000
  1170. BCT R3,SCANFRST SUBTRACT 1 FROM COUNT - BRANCH IF MORE 01170000
  1171. STM R2,R3,BUFNXT SAVE NEW BUFFER POINTER AND COUNT 01171000
  1172. SCANZERO LM R2,R5,BALR2 RESTORE REGISTERS 2 THRU 5 01172000
  1173. B SETCC2 GO SET CC = 2 AND RETURN TO CALLER. 01173000
  1174. CNOP 2,8 DBL-WORD-ALIGN 'SCANLAST' LOOP BELOW 01174000
  1175. SCANSTRT LR R1,R2 SAVE POINTER TO START OF FIELD 01175000
  1176. SCANLAST CLI 0(R2),C' ' IS THIS THE END OF THE FIELD ? 01176000
  1177. BE SCANLEND BRANCH IF YES 01177000
  1178. CLI 0(R2),X'15' IS THIS THE END OF THE LOGICAL LINE ? 01178000
  1179. BE SCANLEND BRANCH IF YES 01179000
  1180. AR R2,R5 POINT TO NEXT BYTE 01180000
  1181. BCT R3,SCANLAST SUBTRACT 1 FROM COUNT - BRANCH IF MORE 01181000
  1182. SCANLEND STM R2,R3,BUFNXT SAVE NEW BUFFER POINTER AND COUNT 01182000
  1183. SR R2,R1 COMPUTE THE LENGTH OF THE FIELD 01183000
  1184. LR R0,R2 SAVE IN GPR 0 01184000
  1185. LM R2,R5,BALR2 RESTORE REGISTERS 2 THRU 5 01185000
  1186. BZ SETCC1 BRANCH IF ZERO LENGTH 01186000
  1187. SR R15,R15 SET CC = 0 (AND CLEAR R15) 01187000
  1188. BR R14 AND RETURN TO CALLER. 01188000
  1189. SPACE 01189000
  1190. DROP R9,R11 01190000
  1191. EJECT 01191000
  1192. *. 01192000
  1193. * SUBROUTINE NAME - 01193000
  1194. * 01194000
  1195. * DMKSCNLI - SEARCH VIRTUAL MACHINES FOR LINKS TO GIVEN MINIDISK 01195000
  1196. * 01196000
  1197. * FUNCTION - 01197000
  1198. * 01198000
  1199. * TO SEARCH THE LOGGED ON VIRTUAL MACHINES FOR ANY LINKS TO 01199000
  1200. * A SPECIFIED MINIDISK. A LINK IS ANY VIRTUAL DEVICE WHOSE 01200000
  1201. * RDEVBLOK POINTER & RELOCATION FACTOR MATCH THOSE SPECIFIED. 01201000
  1202. * 01202000
  1203. * ATTRIBUTES - 01203000
  1204. * 01204000
  1205. * REENTRANT, RESIDENT, CALLED VIA BALR 01205000
  1206. * 01206000
  1207. * ENTRY POINT - 01207000
  1208. * 01208000
  1209. * DMKSCNLI 01209000
  1210. * 01210000
  1211. * ENTRY CONDITIONS - 01211000
  1212. * 01212000
  1213. * GPR 1 CONTAINS THE ADDRESS OF THE RDEVBLOK 01213000
  1214. * GPR 2 CONTAINS ADDRESS OF UDEVBLOK FOR DEVICE 01214000
  1215. * GPR 11 CONTAINS THE VMBLOK ADDRESS OF CURRENT USER 01215000
  1216. * GPR 14 = RETURN ADDRESS 01216000
  1217. * GPR 15 = ADDRESS OF DMKSCNLI 01217000
  1218. * 01218000
  1219. * EXIT CONDITIONS - 01219000
  1220. * 01220000
  1221. * CC = 0 IF NO LINKS ARE FOUND. 01221000
  1222. * CC = 1 IF ANY READ/ONLY LINKS ARE FOUND BUT NO WRITE LINKS. 01222000
  1223. * CC = 2 IF ANY WRITE LINKS ARE FOUND. 01223000
  1224. * 01224000
  1225. * GPR 0 = NUMBER OF READ/ONLY LINKS. 01225000
  1226. * GPR 1 = NUMBER OF WRITE LINKS. 01226000
  1227. * GPR 2 = ADDRESS OF VDEVBLOK FOR A WRITE LINK, OR IF NONE, 01227000
  1228. * ADDRESS OF VDEVBLOK FOR A READ/ONLY LINK, IF ANY. 01228000
  1229. * GPR 3 = ADDRESS OF VMBLOK OF A R/O USER (IF ANY), OR ZERO 01229000
  1230. * 01230000
  1231. * CALLS TO OTHER ROUTINES - 01231000
  1232. * 01232000
  1233. * NONE 01233000
  1234. * 01234000
  1235. * EXTERNAL REFERENCES - 01235000
  1236. * 01236000
  1237. * NONE 01237000
  1238. * 01238000
  1239. * TABLES / WORK AREAS - 01239000
  1240. * 01240000
  1241. * BALR3 - BALR10 (WITHIN BALRSAVE) ARE USED 01241000
  1242. * TO SAVE REGISTERS 3 THRU 10. 01242000
  1243. EJECT 01243000
  1244. * REGISTER USAGE - 01244000
  1245. * 01245000
  1246. * GPR 2 = POINTER TO VDEVBLOK FOR WRITE LINK 01246000
  1247. * GPR 3 = NUMBER OF READ/ONLY LINKS FOUND 01247000
  1248. * GPR 4 = NUMBER OF WRITE LINKS FOUND 01248000
  1249. * GPR 5 = POINTER TO VDEVBLOK FOR 1ST LINK FOUND 01249000
  1250. * GPR 6 = RELOCATION FACTOR OF VDEVBLOK BEING CHECKED 01250000
  1251. * GPR 7 = SIZE IN BYTES OF ONE VDEVBLOK 01251000
  1252. * GPR 8 = VIRTUAL DEVICE BLOCK ADDRESS 01252000
  1253. * GPR 9 = SCRATCH 01253000
  1254. * GPR 10 = VMBLOK ADDRESSES OF OTHER USERS BEING CHECKED 01254000
  1255. * GPR 11 = VMBLOK ADDRESS OF CURRENT USER 01255000
  1256. * GPR 14 = RETURN ADDRESS 01256000
  1257. * GPR 15 = BASE REGISTER 01257000
  1258. * 01258000
  1259. * GPR 12-13 ARE NOT USED. 01259000
  1260. * 01260000
  1261. * NOTES - 01261000
  1262. * 01262000
  1263. * NONE 01263000
  1264. * 01264000
  1265. * OPERATION - 01265000
  1266. * 01266000
  1267. * 1. STARTS WITH VMBLOK SPECIFIED BY CALLER - GO TO STEP 2. 01267000
  1268. * 01268000
  1269. * 2. FOR EACH VMBLOK, SEARCHES ALL VIRTUAL DEVICE BLOCKS 01269000
  1270. * FOR A VDEVREAL POINTER AND VDEVRELN RELOCATION FACTOR 01270000
  1271. * MATCHING THAT SUPPLIED BY THE CALLER (IGNORING ANY DEDICATED 01271000
  1272. * DASD DEVICES). IF FOUND, GO TO STEP 4. 01272000
  1273. * 01273000
  1274. * 3. IF NOT FOUND, REPEATS STEP 2 FOR ALL VMBLOKS UNTIL 01274000
  1275. * THE CHAIN OF VMBLOKS IS EXHAUSTED. RETURNS CONDITION CODE 0 01275000
  1276. * AND A ZERO VALUE IN GPR'S 0 THRU 3 IF NO LINKS WERE FOUND. 01276000
  1277. * 01277000
  1278. * 4. IF A LINK WAS FOUND (FROM STEP 2), REMEMBERS THE 01278000
  1279. * VDEVBLOK CURRENTLY POINTED TO AS THE ANCHOR FOR THE CHAIN 01279000
  1280. * OF LINKS, AND GO TO STEP 5. 01280000
  1281. * 01281000
  1282. * 5. CHECKS ALL LINKS IN THE CHAIN, COUNTING WRITE LINKS AND 01282000
  1283. * READ LINKS. REMEMBERS WHERE ANY READ OR WRITE LINK WAS FOUND 01283000
  1284. * (MOST RECENT ONE TAKING PRIORITY). 01284000
  1285. * 01285000
  1286. * 6. REPEATS STEP 5 UNTIL CHAIN HAS BEEN COMPLETELY SEARCHED. 01286000
  1287. * IF THE CHAIN ANCHOR IS NOT FOUND, I.E., THE ANCHOR POINTS 01287000
  1288. * INTO THE CHAIN BUT IS NOT PART OF IT, AN ABEND 1 IS ISSUED. 01288000
  1289. * IF ANY WRITE LINKS WERE FOUND IN STEP 5, RETURNS THE ADDRESS 01289000
  1290. * OF THE VDEVBLOK FOR THE MOST RECENT ONE FOUND, IN GPR 2. IF 01290000
  1291. * NOT, RETURNS THE ADDRESS OF THE VDEVBLOK FOR THE FIRST READ 01291000
  1292. * LINK FOUND, IN GPR 2 (ALSO RETURNING THE OWNER'S VMBLOK 01292000
  1293. * ADDRESS IN GPR 3). IN ANY EVENT, RETURNS THE COUNT OF READ 01293000
  1294. * LINKS IN GPR 0, AND WRITE LINKS IN GPR 1, AND THE CONDITION- 01294000
  1295. * CODE 1 OR 2 AS APPROPRIATE (SEE EXIT CONDITIONS). 01295000
  1296. *. 01296000
  1297. EJECT 01297000
  1298. *********************************************************************** 01298000
  1299. * * 01299000
  1300. * FIND ALL THE LINKS TO A GIVEN MINIDISK * 01300000
  1301. * * 01301000
  1302. *********************************************************************** 01302000
  1303. SPACE 01303000
  1304. ENTRY DMKSCNLI 01304000
  1305. DMKSCNLI DS 0D (DBL-WORD-ALIGNED FOR BEST PERFORMANCE) 01305000
  1306. USING *,R15 01306000
  1307. STM R3,R10,BALR3 SAVE REGISTERS 3 THRU 10 01307000
  1308. LR R6,R2 ACCESS UDEVBLOK VIA GPR 6 01308000
  1309. USING UDEVBLOK,R6 01309000
  1310. LM R2,R5,ZEROES CLEAR R2 THRU R5 01310000
  1311. ST R3,BALR3 CLEAR R3 TO BE RETURNED TO CALLER 01311000
  1312. LA R7,VDEVSIZE*8 R7 = SIZE IN BYTES OF ONE VDEVBLOK 01312000
  1313. LR R10,R11 START WITH OURSELVES 01313000
  1314. USING VMBLOK,R10 ... 01314000
  1315. LINKLCNT LH R9,VMDVCNT COUNT OF HOW MANY VDEVBLOKS 01315000
  1316. LTR R9,R9 (IF ANY) 01316000
  1317. BNP LINKNUSR TRF IF NONE AT ALL - TRY NEXT USER. 01317000
  1318. L R8,VMDVSTRT POINT TO BLOCK OF VIRTUAL DEVICE(S) 01318000
  1319. USING VDEVBLOK,R8 ... 01319000
  1320. LINKCKAD TM VDEVADD,X'80' BEWARE OF NULL BLOCK (MINUS SIGN THERE) 01320000
  1321. BO LINKNVDV TRF IF YES - LOOK AT NEXT ONE. 01321000
  1322. TM VDEVTYPC,CLASDASD IT IT A DASD DEVICE @VA01026 01322000
  1323. BZ LINKNVDV NO, SKIP THIS ONE @VA01026 01323000
  1324. CL R1,VDEVREAL DOES CALLER'S R1 MATCH REAL DEV. BLOCK ? 01324000
  1325. BE LINKFIND TRF IF YES - CHECK IT. 01325000
  1326. LINKNVDV AR R8,R7 ADVANCE TO NEXT BLOCK IN THE GROUP 01326000
  1327. BCT R9,LINKCKAD ITERATE THRU BLOCKS IN THE GROUP. 01327000
  1328. LINKNUSR L R10,VMPNT GET NEXT USER IN CHAIN OF VMBLOKS 01328000
  1329. CR R10,R11 END? 01329000
  1330. BNE LINKLCNT NO 01330000
  1331. LINKRETN LR R0,R3 COUNT OF R/O LINK(S) INTO R0, 01331000
  1332. LTR R1,R4 COUNT OF WRITE LINK(S) INTO R1 01332000
  1333. BP LINKEXIT IF PLUS, EXIT WITH COND. CODE = 2 01333000
  1334. LR R2,R5 POINTER TO VDEVBLOK (IF ANY) INTO R2, 01334000
  1335. LCR R3,R0 IF 0, SET COND. CODE 0 OR 1 PER R0 01335000
  1336. LINKEXIT LM R3,R10,BALR3 RESTORE NECESSARY REGISTERS 01336000
  1337. BR R14 AND EXIT TO CALLER. 01337000
  1338. SPACE 01338000
  1339. LINKFIND LH R0,VDEVRELN RELOCATION FACTOR INTO R0 01339000
  1340. CH R0,UDEVRELN DOES IT MATCH CALLER'S ? 01340000
  1341. BNE LINKNVDV TRF IT NOT - FORGET IT. 01341000
  1342. TM VDEVSTAT,VDEVDED IS THIS A DEDICATED DEVICE ? 01342000
  1343. BO LINKNVDV IF YES, FORGET IT. 01343000
  1344. TM VDEVFLAG,VDEVTDSK @VA11217 01343300
  1345. BO LINKNVDV @VA11217 01343600
  1346. CLI VDEVTYPE,TYP2311 MIGHT THIS BE A PSEUDO-2311 ? 01344000
  1347. BNE LINKFUND NO - FOUND A LINK 01345000
  1348. IC R0,UDEVFTR GET 'FTR2311T,FTR2311B' BITS, IF ANY 01346000
  1349. N R0,=A(FTR2311T+FTR2311B) ...AND ONLY THOSE BITS 01347000
  1350. BZ LINKFUND IT'S A REAL 2311 01348000
  1351. N R0,VDEVFLAG-3 SAME DEVICE IF FLAGS MATCH... 01349000
  1352. BZ LINKNVDV NO MATCH - DIFFERENT DEVICE 01350000
  1353. LINKFUND EQU * FOUND A LINK TO SAME MDISK 01351000
  1354. USING RDEVBLOK,R1 @VA03170 01352000
  1355. LH R1,RDEVLNKS SET UPPER LIMIT ON LOOP @VA03170 01353000
  1356. DROP R1 @VA03170 01354000
  1357. LR R5,R8 REMEMBER WHERE WE FOUND THE FIRST ONE 01355000
  1358. LA R9,1 1 INTO R9 FOR BUMPING COUNTS 01356000
  1359. ALR R1,R9 BUMP LIMIT FOR EXTRA MEASURE @VA03170 01357000
  1360. LINKNEXT TM VDEVFLAG,VDEVRDO IS IT READ-ONLY? 01358000
  1361. BO LINKREAD TRF IF YES. 01359000
  1362. LR R2,R8 REMEMBER WHERE WRITE DISK WAS 01360000
  1363. AR R4,R9 BUMP COUNT OF WRITE LINK(S) FOUND 01361000
  1364. B LINKCONT GO LOOK FOR NEXT VDEVBLOK. 01362000
  1365. SPACE 01363000
  1366. LINKREAD AR R3,R9 BUMP COUNT OF READ LINK(S) FOUND 01364000
  1367. MVC BALR3(4),VDEVUSER RETURN VMBLOK ADDR OF R/O USER IN R3 01365000
  1368. LINKCONT L R8,VDEVLINK POINT TO NEXT VDEVBLOK 01366000
  1369. CR R8,R5 ARE WE BACK WHERE WE STARTED ? 01367000
  1370. BE LINKRETN FOUND THE START OF THE CHAIN @VA03170 01368000
  1371. BCT R1,LINKNEXT CHECK THE NEXT LINK @VA03170 01369000
  1372. ABEND 1 @VA03170 01370000
  1373. DROP R8,R10 01371000
  1374. EJECT 01372000
  1375. * COMMON CODE TO SET THE CONDITION-CODE TO 1, 2, OR 3 01373000
  1376. * AND RETURN TO THE CALLER VIA R14: 01374000
  1377. SPACE 01375000
  1378. DROP R15 (ADDRESSABILITY DOES NOT MATTER) 01376000
  1379. SPACE 2 01377000
  1380. SETCC1 CLI F0,X'FF' SET CC = 1 01378000
  1381. BR R14 RETURN TO CALLER 01379000
  1382. SPACE 3 01380000
  1383. SETCC2 CLI FFS,X'00' SET CC = 2 %V3M4038 01381000
  1384. BR R14 RETURN TO CALLER %V3M4038 01382000
  1385. SPACE 3 01383000
  1386. SETCC3A L R8,FFS MAKE REG 8 NEG. %VA05925 01384000
  1387. SETCC3 TM FFS,X'FF' SET CC = 3 %V3M4038 01385000
  1388. BR R14 RETURN TO CALLER %V3M4038 01386000
  1389. SPACE 3 01387000
  1390. BALRMVC MVC BALRSAVE(0),0(R1) EXECUTED TO MOVE STUFF TO BALRSAVE 01388000
  1391. SPACE 3 01389000
  1392. LTORG - IF ANY - 01390000
  1393. EJECT 01391000
  1394. *. SUBROUTINE NAME - 01392000
  1395. * 01393000
  1396. * DMKSCNRN 01394000
  1397. * 01395000
  1398. * FUNCTION - 01396000
  1399. * 01397000
  1400. * RETURN TO THE CALLER THE NAME OF THE DEVICE IN GPR 1 01398000
  1401. * 01399000
  1402. * ENTRY POINT - 01400000
  1403. * 01401000
  1404. * DMKSCNRN - DEVICE NAME FOR A GIVEN REAL DEVICE 01402000
  1405. * DMKSCNVN - DEVICE NAME FOR A GIVEN VIRTUAL DEVICE 01403000
  1406. * 01404000
  1407. * ENTRY CONDITIONS - 01405000
  1408. * 01406000
  1409. * GPR 8 ADDRESS OF THE RDEVBLOK (DMKSCNRN) 01407000
  1410. * GPR 8 ADDRESS OF THE VDEVBLOK (DMKSCNVN) 01408000
  1411. * GPR 14 RETURN ADDRESS 01409000
  1412. * GPR 15 ADDRESS OF DMKSCNRN 01410000
  1413. * 01411000
  1414. * EXIT CONDITION 01412000
  1415. * 01413000
  1416. * GPR 8 UNCHANGED 01414000
  1417. * GPR 14 UNCHANGED 01415000
  1418. * GPR 1 CONTAINS THE NAME OF THE DEVICE 01416000
  1419. * 01417000
  1420. * CALLS TO OTHER ROUTINES - 01418000
  1421. * 01419000
  1422. * NONE 01420000
  1423. * 01421000
  1424. * EXTERNAL REFERENCES - 01422000
  1425. * 01423000
  1426. * NONE 01424000
  1427. * 01425000
  1428. * TABLES / WORK AREAS 01426000
  1429. * 01427000
  1430. * BALR2-BALR4 OF BALRSAVE USED FOR GPRS 2 - 4 01428000
  1431. * 01429000
  1432. * REGISTER USAGE - 01430000
  1433. * 01431000
  1434. * GPR 2 = INDEX REG 01432000
  1435. * GPR 3 = INDEX REG 01433000
  1436. * GPR 8 = ADDRESS OF RDEVBLOK OR VDEVBLOK 01434000
  1437. * GPR 14 = RETURN ADDRESS 01435000
  1438. * GPR 15 = BASE REG. 01436000
  1439. * 01437000
  1440. * 01438000
  1441. * NOTES - 01439000
  1442. * 01440000
  1443. * NONE 01441000
  1444. EJECT 01442000
  1445. * 01443000
  1446. * OPERATION - 01444000
  1447. * 01445000
  1448. * USES THE DEVICE CLASS AND TYPE FIELDS IN THE DEVICE BLOCK 01446000
  1449. * TO LOCATE THE CORRESPONDING DEVICE NAME. REGISTER 1 01447000
  1450. * IS THEN LOADED WITH THIS NAME AND EXITS TO THE CALLER. 01448000
  1451. *. 01449000
  1452. SPACE 2 01450000
  1453. ENTRY DMKSCNRN,DMKSCNVN 01451000
  1454. SPACE 01452000
  1455. USING DMKSCNRN,R15 COMMON BASE FOR SCNVN, SCNRN 01453000
  1456. USING VDEVBLOK,R8 01454000
  1457. SPACE 01455000
  1458. DMKSCNVN STM R2,R4,BALR2 SAVE VOLATILE REGISTERS 01456000
  1459. LA R4,VDEVTYPC POINT TO DEVICE CLASS, TYPE FIELDS 01457000
  1460. LA R15,DMKSCNRN-DMKSCNVN(0,R15) ADJUST ADDRESSABILITY 01458000
  1461. B SCNRNINT JOIN COMMON LOGIC 01459000
  1462. SPACE 01460000
  1463. USING RDEVBLOK,R8 SWITCH TO REAL DEVICE BLOCK 01461000
  1464. DMKSCNRN STM R2,R4,BALR2 SAVE VOLATILE REGISTERS 01462000
  1465. LA R4,RDEVTYPC POINT TO DEVICE CLASS, TYPE FIELDS 01463000
  1466. DROP R8 01464000
  1467. SCNRNINT SR R2,R2 CLEAR WORK REGISTER 01465000
  1468. SR R3,R3 ZERO 01466000
  1469. ICM R2,B'1000',0(R4) INSERT DEVICE CLASS 01467000
  1470. SRL R2,1 CORRECTION FACTOR 01468000
  1471. SCNRNDEV BXLE R2,R2,SCNRNFND BRANCH WHEN BIT IS SHIFTED OUT . 01469000
  1472. LA R3,1(0,R3) COUNT NUMBER OF SHIFTS 01470000
  1473. B SCNRNDEV LOOP THRU ALL POSSIBILITIES 01471000
  1474. SCNRNFND TM 0(R4),CLASTERM LINE OR CONSOLE DEVICE ? 01472000
  1475. BO SCNRNTRM IF LINE OR CONS BRANCH 01473000
  1476. CLI 0(R4),CLASSPEC SPECIAL DEVICE CLASS ? 01474000
  1477. BE SCNRNSPC YES - CHECK FOR CTCA 01475000
  1478. TM 0(R4),CLASURO+CLASURI SPECIAL CASE FOR RDR/PRT/PUN 01476000
  1479. BZ SCNRNEXT IF NOT UNIT RECORD, EXIT 01477000
  1480. TM 0(R4),CLASURO CHECK FOR OUTPUT SPOOL DEVICE 01478000
  1481. BNZ SCNRNURO BRANCH IF EITHER. 01479000
  1482. TM 1(R4),TYPRDR IS DEVICE A CARD READER ? 01480000
  1483. BO SCNRNEXT IF YES, BRANCH 01481000
  1484. LA R3,4(0,R3) RE-ADJUST, UNSUPPORTED DEVICE 01482000
  1485. B SCNRNEXT EXIT 01483000
  1486. EJECT 01484000
  1487. SCNRNTRM TM 1(R4),TYP2700+TYPTELE2+TYPIBM1+TYPSDLC @V67CDF1 01485000
  1488. * IS IT A TP USAGE LINE ? 01485500
  1489. BNZ SCNRNEXT YES, EXIT .INDEX POINTER IS CORRECT. 01486000
  1490. CLI 1(R4),TYP3210 VIRTUAL MACHINE CONSOLE ? 01487000
  1491. BNE SCNRNEXT BRANCH ON UNDEFINED TERMINALS. 01488000
  1492. LA R3,8(0,R3) ADJUST INDEX FOR CONSOLE 01489000
  1493. B SCNRNEXT EXIT. 01490000
  1494. SCNRNURO TM 1(R4),TYPPUN TEST FOR PUNCH 01491000
  1495. BO SCNRNEXT IF ITS A PUNCH, EXIT 01492000
  1496. LA R3,3(0,R3) RE-ADJUST FOR 'DEV' UNSUPPORTED 01493000
  1497. TM 1(R4),TYPPRT IS IT A PRINTER ? 01494000
  1498. BZ SCNRNEXT NO - INDEX IS CORRECT 01495000
  1499. LA R3,1(0,R3) ADJUST FOR SPOOL PRINTER 01496000
  1500. B SCNRNEXT 01497000
  1501. SCNRNSPC TM 1(R4),TYPCTCA+TYP3705+TYP3851 SUPPORTED DEVICE @V407466 01498000
  1502. BZ SCNRNEXT NO -- R3 IS SET ALREADY@V200820 01499000
  1503. LA R3,3(0,R3) POINT TO 'CTCA' @V200820 01500000
  1504. CLI 1(R4),TYPCTCA IS THAT RIGHT ? @V200820 01501000
  1505. BE SCNRNEXT YES - LET IT BE SO @V200820 01502000
  1506. LA R3,1(0,R3) MUST BE A 3705 'CTLR' @V200820 01503000
  1507. CLI 1(R4),TYP3705 3705 'CTLR' @V407466 01504000
  1508. BE SCNRNEXT YES, LET IT BE SO @V407466 01505000
  1509. LA R3,1(0,R3) POINT TO 'MSC ' @V407466 01506000
  1510. SCNRNEXT SLL R3,2 MULTI INDEX VALUE BY 4 01507000
  1511. L R1,SCNRNTBL(R3) LOAD DEVICE NAME INTO R 1 01508000
  1512. LM R2,R4,BALR2 RESTORE REGS 2 - 4 01509000
  1513. BR R14 RETURN TO CALLER. 01510000
  1514. SPACE 2 01511000
  1515. * THE FOLLOWING TABLE IS POSITIONAL AND SHOULD NOT BE CHANGED 01512000
  1516. * 01513000
  1517. SCNRNTBL DS 0F ALIGN 01514000
  1518. DC CL4'LINE' CONSTANT 01515000
  1519. DC CL4'GRAF' CONSTANT 01516000
  1520. DC CL4'RDR ' CONSTANT 01517000
  1521. DC CL4'PUN ' CONSTANT 01518000
  1522. DC CL4'TAPE' CONSTANT 01519000
  1523. DC CL4'DASD' CONSTANT 01520000
  1524. DC CL4'DEV ' CONSTANT 01521000
  1525. DC CL4'PRT ' CONSTANT 01522000
  1526. DC CL4'CONS' CONSTANT 01523000
  1527. DC CL4'CTCA' CONSTANT 01524000
  1528. DC CL4'CTLR' CONSTANT @V200820 01525000
  1529. DC CL4'MSC ' CONSTANT @V407466 01526000
  1530. EJECT 01527000
  1531. COPY DEVTYPES 01528000
  1532. PSA 01529000
  1533. COPY CONBUF 01530000
  1534. COPY EQU 01531000
  1535. COPY VMBLOK 01532000
  1536. COPY RBLOKS 01533000
  1537. COPY VBLOKS 01534000
  1538. COPY UDIRECT 01535000
  1539. END 01536000