User Tools

Site Tools


ibm:vm370-lib:cp:dmkvch.assemble_src

DMKVCH Source

References

Source Listing

DMKVCH.ASSEMBLE.txt
  1. VCH TITLE 'DMKVCH (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT @V200820 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKVCH 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * TO 'ATTACH' OR 'DETACH' A REAL CHANNEL AND ALL DEVICES 00010000
  11. * ON IT TO A SPECIFIED USER. 00011000
  12. * 00012000
  13. * +--------+----------------------------+ 00013000
  14. * | ATTACH | CHANNEL X <TO> USERID | 00014000
  15. * |--------+----------------------------+ 00015000
  16. * | DETACH | CHANNEL X <FROM> <USERID> | 00016000
  17. * +--------+----------------------------+ 00017000
  18. * 00018000
  19. * THE ACTUAL COMMAND LINE IS DECODED BY DMKVDC. 00019000
  20. * 00020000
  21. * ATTRIBUTES - 00021000
  22. * 00022000
  23. * RE-ENTRANT, PAGEABLE, CALLED VIA SVC 00023000
  24. * 00024000
  25. * ENTRY POINT - 00025000
  26. * 00026000
  27. * DMKVCHDC 00027000
  28. * 00028000
  29. * ENTRY CONDITIONS - 00029000
  30. * 00030000
  31. * GPR 1 = FLAGS BUILT BY DMKVDA/DMKVDD 00031000
  32. * GPR 2 = CHANNEL NUMBER IN BYTE 3 00032000
  33. * GPR 3 = FIRST HALF OF USERID 00033000
  34. * GPR 4 = SECOND HALF OF USERID 00034000
  35. * GPR 10 = ADDRESS OF VMBLOK FOR ATTACH TO; DETACH FROM USERID 00035000
  36. * 00036000
  37. * EXIT CONDITION - 00037000
  38. * 00038000
  39. * NORMAL 00039000
  40. * 00040000
  41. * CALLS TO OTHER ROUTINES - 00041000
  42. * 00042000
  43. * DMKERMSG- TO WRITE MESSAGES 00043000
  44. * DMKSCNRA - TO OBTAIN THE HEX REAL DEVICE ADDRESS 00044000
  45. * DMKSCNVU- TO LOCATE VIRTUAL CONTROL BLOKS 00045000
  46. * DMKSCNRU- TO LOCATE REAL DEVICE CONTROL BLOKS 00046000
  47. * DMKSCNRD - TO OBTAIN THE HEX REAL DEVICE ADDRESS 00047000
  48. * DMKVDSAT - TO BUILD VIRTUAL DEVICE BLOCKS FOR ATTACH 00048000
  49. * DMKVDREL - TO RELEASE VIRTUAL BLOCKS FOR DETACH 00049000
  50. * DMKFREE - TO OBTAIN STORAGE 00050000
  51. * DMKFRET - TO RELEASE STORAGE 00051000
  52. * DMKQCNWT - SEND MESSAGES TO THE TERMINAL 00052000
  53. * 00053000
  54. * EXTERNAL REFERENCES - 00054000
  55. * 00055000
  56. * NONE 00056000
  57. * 00057000
  58. * TABLES / WORK AREAS 00058000
  59. * 00059000
  60. * SAVEVCH - AREA USED TO SAVE DEVICE ADDRESS AND TYPE 00060000
  61. * 00061000
  62. * REGISTER USAGE - 00062000
  63. * 00063000
  64. * GPR 0 = SCRATCH 00064000
  65. * GPR 1 = CONTAINS CHANNEL OR DEVICE ADDRESS 00065000
  66. * GPR 2 = WORK REGISTER 00066000
  67. * GPR 3 = WORK REGISTER 00067000
  68. * GPR 4 = WORK REGISTER 00068000
  69. * GPR 5 = WORK REGISTER 00069000
  70. * GPR 6 = ADDRESS OF RCHBLOK/VCHBLOK 00070000
  71. * GPR 7 = ADDRESS OF RCUBLOK/VCUBLOK 00071000
  72. * GPR 8 = ADDRESS OF RDEVBLOK/VDEVBLOK 00072000
  73. * GPR 9 = ADDRESS OF SAVEVCH 00073000
  74. * GPR 10 = ADDRESS OF VMBLOK FOR THE ATTACH TO USER 00074000
  75. * GPR 11 = ADDRESS OF THE VMBLOK DOING THE ATTACHING/DETACHING 00075000
  76. * GPR 12 = BASE REGISTER 00076000
  77. * GPR 13 = ADDRESS OF A STANDARD SAVE AREA 00077000
  78. * 00078000
  79. * NOTES - 00079000
  80. * 00080000
  81. * NONE 00081000
  82. * 00082000
  83. * OPERATION - 00083000
  84. * 00084000
  85. * DMKVCHDC IS CALLED BY DMKVDA (ATTACH) OR DMKVDD (DETACH) A 00085000
  86. * REAL DEVICE AND ALL DEVICES ON THE CHANNEL TO A SPECIFIED 00086000
  87. * USERID. THE ATTACH/DETACH COMMAND HAS BEEN PROCESSED BY 00087000
  88. * DMKVDA/DMKVDD AND FLAGS SET IN GPR1, REPRESENTING THE FUNCTION 00088000
  89. * REQUESTED. THE FOLLOWING CONDITIONS ARE TESTED BEFORE 00089000
  90. * A CHANNEL CAN BE DEDICATED. 00090000
  91. * 00091000
  92. * 1. MUST NOT BE CHANNEL 0 00092000
  93. * 2. VIRTUAL CHANNEL CANNOT ALREADY EXIST. 00093000
  94. * 3. REAL CHANNEL MUST BE ON THE SYSTEM 00094000
  95. * 4. CHANNEL MUST NOT BE DEDICATED TO ANOTHER USER 00095000
  96. * 5. THERE MUST BE NO CP-VOLUMES ON THE CHANNEL 00096000
  97. * 6. SPOOLING DEVICES MUST BE IN A DRAINED CONDITION 00097000
  98. * 7. DEVICES ON THE CHANNEL CANNOT BE ALREADY ATTACHED 00098000
  99. * TO ANY USER'S. 00099000
  100. * 00100000
  101. * IF ALL OF THE ABOVE CONDITIONS ARE SATISFIED; VIRTUAL 00101000
  102. * CHANNEL, CONTROL UNITS, AND DEVICE BLOKS ARE BUILT. THEY ARE 00102000
  103. * MAPPED 1 FOR 1 AGAINST THE REAL CHANNEL, CONTROL UNITS, AND 00103000
  104. * DEVICES. THE DEDICATE BITS ARE TURNED ON. A RESPONSE IS 00104000
  105. * ISSUED TO THE USER THAT THE CHANNEL HAS BEEN ATTACHED. 00105000
  106. * 00106000
  107. * TO DETACH A CHANNEL THE FOLLOWING CONDITIONS MUST BE MET; 00107000
  108. * 00108000
  109. * 1. MUST NOT BE CHANNEL 0 00109000
  110. * 2. THE REAL CHANNEL MUST EXIST 00110000
  111. * 3. THE CHANNEL MUST HAVE ALREADY BEEN DEDICATED TO 00111000
  112. * THIS USER. 00112000
  113. * 00113000
  114. * IF THE ABOVE CONDITIONS ARE MET; VIRTUAL CHANNEL, CONTROL 00114000
  115. * UNITS, AND DEVICE BLOKS ARE MARKED UNAVAILABLE. THE DEDICATE 00115000
  116. * BITS ARE RESET IN THE REAL CONTROL BLOKS. CONTROL REGISTER 2 00116000
  117. * IS CHANGED IF NECCESSARY TO ALLOW THE CHANNEL TO 00117000
  118. * BECOME ACTIVE. 00118000
  119. * 00119000
  120. * RESPONSES - 00120000
  121. * 00121000
  122. * CHAN X ATTACH TO USERID X 00122000
  123. * CHAN X DETACHED USERID X 00123000
  124. * 00124000
  125. * ERROR MESSAGES - 00125000
  126. * 00126000
  127. * DMKVCH034E CHANNEL MISSING OR INVALID 00127000
  128. * DMKVCH040E DEV ADDR DOES NOT EXIST @VA13060 00127500
  129. * DMKVCH048E CHANNEL X DOES NOT EXIST 00128000
  130. * DMKVCH129E CHANNEL X DEVICES IN USE 00129000
  131. * DMKVCH130E CHANNEL X <PROC NN> NOT ATTACHED TO USERID @VA13060 00129500
  132. * DMKVCH132E CHANNEL X ALREADY DEFINED BY USERID 00130000
  133. * DMKVCH138E CHANNEL X NOT ATTACHED; INSUFFICIENT FREE STORAGE 00131000
  134. * DMKVCH153E DEVICE VADDR EXCEEDS MAX NO. OF VIRTUAL DEVICES 00131500
  135. *. 00132000
  136. COPY OPTIONS @V407510 00133000
  137. EJECT 00134000
  138. SPACE 2 00135000
  139. DMKVCH CSECT 00136000
  140. EXTRN DMKSCNVU 00137000
  141. EXTRN DMKSCNRU 00138000
  142. EXTRN DMKVDSAT @VA01382 00139000
  143. EXTRN DMKVDREL @V200820 00140000
  144. EXTRN DMKERMSG 00141000
  145. EXTRN DMKCVTBH 00142000
  146. EXTRN DMKSCNAU @V407466 00143000
  147. EXTRN DMKFRERC @V407466 00144000
  148. EXTRN DMKLOCKQ @V407466 00145000
  149. EXTRN DMKLOCKD @V407466 00146000
  150. EXTRN DMKSCNRA @V407466 00147000
  151. SPACE 00148000
  152. USING PSA,R0 00149000
  153. USING RCHBLOK,R6 00150000
  154. USING RCUBLOK,R7 00151000
  155. USING RDEVBLOK,R8 00152000
  156. USING VMBLOK,R11 00153000
  157. USING SAVEAREA,R13 00154000
  158. SPACE 00155000
  159. * EYE CATCHER FOR STORAGE DUMPS 00156000
  160. MODID DC CL8'DMKVCH' 00157000
  161. EJECT 00158000
  162. DMKVCHDC RELOC 00159000
  163. * 00160000
  164. ST R1,VDBITS FLAGS PASSED FROM DMKVDA/DMKVDD 00161000
  165. MVI DEDBITS,X'00' CLEAR BIT SWITCHES 00162000
  166. LA R0,9 Get 9 doublewords of storage HRC040DK 00163100
  167. CALL DMKFREE 00164000
  168. LR R9,R1 00165000
  169. USING SAVEVCH,R9 00166000
  170. BAL R5,YOURVMBK GET ATTACHEE'S VMBLOK @V407510 00167000
  171. XC SAVEVCH(64),SAVEVCH CLEAR THE ENTIRE AREA 00168000
  172. MVC CHANUSER(8),VMUSER USERID WANTING THE CHANNEL 00169000
  173. ST R2,CHANADDR AND SAVE ALSO, THE CHANNEL NUMBER 00170000
  174. SPACE 00172000
  175. SLA R2,8(0) SHIFT AND TEST CHANNEL ADDRESS @VA01382 00173000
  176. BZ VCH034 CHANNEL ZERO IS NOT VALID @VA01382 00174000
  177. STH R2,DEVADDR CHANNEL NUMBER - HIGH ORDER BYTE @VA07711 00174100
  178. LR R1,R2 PUT CHANNEL INTO GPR-1. 00175000
  179. CALL DMKSCNRU DOES REAL CHANNEL EXIST ? 00176000
  180. BC 4,VCH048 ERROR IF CHANNEL BLOCK NOT FOUND 00177000
  181. ST R6,SAVERCH SAVE THE RCHBLOK ADDRESS @VA13280 00178000
  182. TM VDBITS+1,DETACH DETACH COMMAND ISSUED ? @VA01382 00179000
  183. BO CHANDET YES - CHECK VIRTUAL CHANNEL @VA01382 00180000
  184. STM R1,R2,SAVEWRK2 SAVE REGS ACROSS 'TRANS' @VA01382 00181000
  185. L R1,=A(DMKVDSAT) MAKE SURE DMKVDS IS IN CORE @VA01382 00182000
  186. TRANS 2,1,OPT=(BRING,DEFER,SYSTEM) . . .FOR THE SCAN @VA01382 00183000
  187. SPACE 00184000
  188. LM R1,R2,SAVEWRK2 RESTORE CHANNEL ADDR REGS @VA01382 00185000
  189. CALL DMKSCNVU DOES VIRTUAL CHANNEL EXISTS 00186000
  190. BC 11,VCH132 YES - ERROR IF CHANNEL BLOK FOUND 00187000
  191. L R6,SAVERCH RESTORE RCHBLOK ADDRESS @VA13280 00188000
  192. SLR R10,R10 CLEAR R10 @V407466 00189000
  193. SPACE 00190000
  194. STRTSCAN B PASS1 FIRST PASS FOR 'ATTACH CHANNEL' @V407466 00191000
  195. B PASS2 SEC. PASS FOR 'ATTACH CHANNEL' @V407466 00192000
  196. B PASS3 THIRD PASS FOR 'ATTACH CHANNEL' @V407466 00193000
  197. B PASS4 4TH PASS FOR 'ATTACH CHANNEL' @V407466 00194000
  198. B PASS5 5TH PASS FOR 'ATTACH CHANNEL' @V407466 00195000
  199. EJECT 00196000
  200. CHANDET EQU * CHECK FOR CHANNEL ATTACHED @VA01382 00197000
  201. CALL DMKSCNVU SCAN FOR VIRTUAL BLOCKS @VA01382 00198000
  202. BC 4,VCH130 CHANNEL NOT ATTACHED @VA02709 00199000
  203. TM VCHSTAT-VCHBLOK(R6),VCHDED DEDICATED CHAN ? @VA01382 00200000
  204. BZ VCH130 NO -- ERROR @VA01382 00201000
  205. L R6,SAVERCH BACK TO THE RCHBLOK FOR SCAN @VA13280 00202000
  206. SPACE 2 00203000
  207. EJECT 00204000
  208. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00205000
  209. * PASS1 COUNTS THE NUMBER OF VCUBLOKS FOR WHICH STORAGE * 00206000
  210. * SHOULD BE ACQUIRED IN ADVANCE; THIS ROUTINE ALSO * 00207000
  211. * VERIFIES THAT EACH DEVICE ON THE CHANNEL CAN BE ATTACHED. * 00208000
  212. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00209000
  213. SPACE 2 00210000
  214. PASS1 LA R4,2 INCREMENT FACTOR FOR SCAN @V407466 00211000
  215. SLR R2,R2 INDEX FOR CONTROL UNIT SEARCH. 00212000
  216. SLR R14,R14 CLEAR R14 @V407466 00213000
  217. SPACE 00214000
  218. CHKCU EQU * SCAN ALL REAL CONTROL UNITS @VA01382 00215000
  219. LH R7,RCHCUTBL(R2) CONTROL UNIT DISPLACEMENT @VA01382 00216000
  220. LTR R7,R7 IS CONTROL UNIT ON THE SYSTEM ? 00217000
  221. BM INCRCU NO, GET NEXT C.U. TABLE ENTRY 00218000
  222. A R7,ARIOCU LOAD ABSOLUTE ADDRESS OF RCUBLOK. 00219000
  223. SLR R3,R3 INDEX REG. FOR DEVICE TABLE SEARCH 00220000
  224. SPACE 00221000
  225. CHKDEV EQU * SCAN ALL REAL DEVICE BLOCKS @VA01382 00222000
  226. LH R8,RCUDVTBL(R3) REAL DEVICE DISPLACEMENT @VA01382 00223000
  227. LTR R8,R8 DOES DEVICE EXIST ? 00224000
  228. BM INCRDEV NO, GET NEXT DEVICE ENTRY 00225000
  229. OI DEDBITS,DEVIND RDEVICE INDEX FOUND IN RCUBLOK @V407466 00226000
  230. SLL R8,3(0) CONVERT TO BYTE INDEX @V200820 00227000
  231. A R8,ARIODV YES, GET ABSOLUTE ADDR. OF RDEVBLOK. 00228000
  232. SPACE 00229000
  233. TM VDBITS+1,DETACH DETACHING THE CHANNEL 00230000
  234. BO DETCHAN YES -- RELEASE EACH DEVICE @VA01382 00231000
  235. SPACE 00232000
  236. DEVCHEK EQU * CHECK FOR DEVICES IN USE @V407466 00233000
  237. SWITCH SWITCH TO MAIN PROCESSOR @V407510 00234000
  238. TM RDEVSTAT,RDEVBUSY+RDEVSCED+RDEVDED IN USE ? @V407466 00235000
  239. BNZ VCH129 YES, CAN'T DO CHANNEL ATTACH THEN@V407466 00236000
  240. TM RDEVTYPC,CLASDASD+CLASTAPE TAPE OR DASD? @V407466 00237000
  241. BZ NODASTAP NOPE @V407466 00238000
  242. TM RDEVFLAG,RDEVSYS+RDEVOWN SYSTEM OR OWNED? @V407466 00239000
  243. BNZ VCH129 YES, CAN'T HAVE IT THEN @V407466 00240000
  244. B INCRDEV THIS DEVICE IS O.K. @V407466 00241000
  245. SPACE 00242000
  246. NODASTAP TM RDEVTYPC,CLASURI+CLASURO UNIT RECORD IN OR OUT? @V407466 00243000
  247. BZ NOTUR NOPE @V407466 00244000
  248. TM RDEVFLAG,RDEVDRAN YES, IS IT DRAINED? @V407466 00245000
  249. BZ VCH129 NOPE, THEN CAN'T HAVE IT. @V407466 00246000
  250. ICM R15,B'0111',RDEVSPL IS THERE AN ACTIVE SPOOL @V407466 00247000
  251. * FILE? 00248000
  252. BNZ VCH129 YES, CAN'T HAVE IT THEN. @V407466 00249000
  253. B INCRDEV THIS DEVICE IS O.K. @V407466 00250000
  254. SPACE 00251000
  255. NOTUR TM RDEVTYPC,CLASTERM+CLASGRAF GRAPHIC OR TERMINAL? @V407466 00252000
  256. BZ NOTERM NOPE @V407466 00253000
  257. TM RDEVFLAG,RDEVENAB CP ENABLED? @V407466 00254000
  258. BO VCH129 YES, CAN'T HAVE IT THEN. @V407466 00255000
  259. B INCRDEV THIS DEVICE IS O.K. @V407466 00256000
  260. SPACE 00257000
  261. NOTERM CLI RDEVTYPC,CLASSPEC SPECIAL TYPE? @V407466 00258000
  262. BNE INCRDEV NOPE - THIS DEVICE IS O.K. @V407466 00259000
  263. CLI RDEVTYPE,TYP3705 IS IT A 3705 TYPE? @V407466 00260000
  264. BNE INCRDEV NOPE - THIS DEVICE IS O.K. @V407466 00261000
  265. TM RDEVSTAT,RDEVRSVD SYSTEM RESERVED? @V407466 00262000
  266. BO VCH129 YES, CAN'T HAVE IT THEN @V407466 00263000
  267. TM RDEVFLAG,RDEVRCVY IN RECOVERY PROCESS NOW ? @V407466 00264000
  268. BO VCH129 YES - IT'S REALLY IN USE @V407466 00265000
  269. SPACE 00266000
  270. INCRDEV EQU * ADVANCE TO NEXT RDEVBLOK SLOT @V407466 00267000
  271. LA R5,30(0) SIXTEEN DEVICE SLOTS PER RCUBLOK @V407466 00268000
  272. BXLE R3,R4,CHKDEV GET THE NEXT DEVICE @V407466 00269000
  273. SPACE 00270000
  274. TM DEDBITS,DEVIND RDEVICE FOUND ON RCUBLOK @V407466 00271000
  275. BZ INCRCU ADVANCE TO NEXT RCUBLOK SLOT @V407466 00272000
  276. LA R14,1(,R14) ADD 1 TO NO. VCUBLOKS TO BE ACQ. @V407466 00273000
  277. NI DEDBITS,X'FF'-DEVIND RESET DEVICE FOUND BIT @V407466 00274000
  278. INCRCU EQU * ADVANCE TO NEXT RCUBLOK SLOT @V407466 00275000
  279. LA R5,62(0) 32 RCUBLOK SLOTS PER RCHBLOK @V407466 00276000
  280. BXLE R2,R4,CHKCU GET THE NEXT CONTROL UNIT @V407466 00277000
  281. SPACE 00278000
  282. TM VDBITS+1,DETACH DETACHING THE CHANNEL @V407466 00279000
  283. BO ALLDET YES, ALL DEVICES DETACHED @VA07711 00280000
  284. STH R14,CUNUM NO. VCUBLOKS TO BE ACQUIRED @V407466 00281000
  285. LOOP LA R10,4(,R10) INCREM FOR SECOND PASS @V407466 00282000
  286. B STRTSCAN(R10) 2ND PASS RTN FOR 'ATTACH CHANNEL'@V407466 00283000
  287. EJECT 00284000
  288. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00285000
  289. * PASS2 COUNTS THE NUMBER OF VDEVBLOKS FOR WHICH STORAGE MUST BE * 00286000
  290. * ACQUIRED IN ADVANCE; EACH RDEVBLOK IS ONLY COUNTED ONCE. * 00287000
  291. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00288000
  292. SPACE 2 00289000
  293. PASS2 EQU * SECOND PASS FOR 'ATTACH CHANNEL' @V407466 00290000
  294. LA R4,2 INCREM FACTOR FOR SCAN @V407466 00291000
  295. SLR R14,R14 ZERO R14 @V407466 00292000
  296. SLR R2,R2 ... @V407466 00293000
  297. CHKCU2 LH R7,RCHCUTBL(R2) CONTROL UNIT DISPLACEMENT @V407466 00294000
  298. LTR R7,R7 IS CONTROL UNIT ON THE SYSTEM? @V407466 00295000
  299. BM INCRCU2 NO, GET NEXT C.U. TABLE ENTRY @V407466 00296000
  300. A R7,ARIOCU ABSOLUTE ENTRY ADDRESS OF RCUBLOK@V407466 00297000
  301. SLR R3,R3 INDEX REG. FOR DEV. TABLE SEARCH @V407466 00298000
  302. CHKDEV2 EQU * SCAN ALL REAL DEVICE BLOKS @V407466 00299000
  303. LH R8,RCUDVTBL(R3) REAL DEVICE DISPLACEMENT @V407466 00300000
  304. LTR R8,R8 DOES DEVICE EXIST? @V407466 00301000
  305. BM INCRDEV2 NO, GET NEXT DEVICE ENTRY @V407466 00302000
  306. SLL R8,3(0) CONVERT TO BYTE INDEX @V407466 00303000
  307. A R8,ARIODV YES, GET ABSOLUTE RDEVBLOK ADDR @V407466 00304000
  308. TM RDEVADD,DEVCOUNT RDEVBLOK COUNTED PREVIOUSLY? @V407466 00305000
  309. BO INCRDEV2 YES, PROCEED TO NEXT DEVICE @V407466 00306000
  310. OI RDEVADD,DEVCOUNT IND. RDEVBLOK COUNTED @V407466 00307000
  311. LA R14,1(,R14) UP COUNT OF NO. UNIQUE RDEVBLOKS @V407466 00308000
  312. * MUST RESET MY 'DEVCOUNT' MARK IN 'RDEVADD' (OF A 2305) FOR ALL 00308100
  313. * THE RDEVBLOKS EXCEPT THE FIRST ONE. DMKVDS ATTACHES ALL 8 OF THEM 00308200
  314. * WITH ONE CALL. (FIRST ONE IS RESET WHEN I CALL DMKVDS). 00308300
  315. CLC RDEVTYPC(2),=AL1(CLASDASD,TYP2305) @VA12940 00308400
  316. BNE INCRDEV2 NOT A 2305; WE'RE OK @VA12940 00308500
  317. TM RDEVADD+1,7 IS THE ADDRESS 1-7 OR 9-F? @VA12940 00308600
  318. BZ INCRDEV2 ADDRESS IS 0 OR 8: MARK IS OK @VA12940 00308700
  319. NI RDEVADD,X'FF'-DEVCOUNT RESET 'MARK' @VA12940 00308800
  320. INCRDEV2 LA R5,30(0) 16 DEVICE SLOTS PER RCUBLOK @V407466 00309000
  321. BXLE R3,R4,CHKDEV2 GET NEXT DEVICE @V407466 00310000
  322. INCRCU2 LA R5,62(0) 32 CONTROL UNIT SLOTS PER RCHBLOK@V407466 00311000
  323. BXLE R2,R4,CHKCU2 GET NEXT CONTROL UNIT @V407466 00312000
  324. STH R14,DEVNUM NUMBER OF VDEVBLOKS TO ACQUIRE @V407466 00313000
  325. B LOOP PREP FOR PASS3 OF 'ATT CHANNEL' @V407466 00314000
  326. EJECT 00315000
  327. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00316000
  328. * PASS3 SCANS THE RDEVBLOKS RESETTING THE BIT IN THE HIGH ORDER * 00317000
  329. * BYTE WHICH WAS SET AS A PART OF PASS2 PROCESSING. * 00318000
  330. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00319000
  331. SPACE 2 00320000
  332. PASS3 EQU * @V407466 00321000
  333. LA R4,2 INCREM FACTOR FOR SCAN @V407466 00322000
  334. SLR R2,R2 ... @V407466 00323000
  335. CHKCU3 LH R7,RCHCUTBL(R2) CONTROL UNIT DISPLACEMENT @V407466 00324000
  336. LTR R7,R7 IS CONTROL UNIT ON THE SYSTEM? @V407466 00325000
  337. BM INCRCU3 NO, GET NEXT C.U. TABLE ENTRY @V407466 00326000
  338. A R7,ARIOCU ABSOLUTE ENTRY ADDRESS OF RCUBLOK@V407466 00327000
  339. SLR R3,R3 INDEX FOR RCUBLOK DEV. TABLE SRCH@V407466 00328000
  340. CHKDEV3 EQU * SCAN ALL REAL DEVICE BLOKS @V407466 00329000
  341. LH R8,RCUDVTBL(R3) REAL DEVICE DISPLACEMENT @V407466 00330000
  342. LTR R8,R8 DOES DEVICE EXIST? @V407466 00331000
  343. BM INCRDEV3 NO, GET NEXT DEVICE ENTRY @V407466 00332000
  344. SLL R8,3(0) CONVERT TO BYTE INDEX @V407466 00333000
  345. A R8,ARIODV YES, GET ABSOLUTE RDEVBLOK ADDR @V407466 00334000
  346. NI RDEVADD,X'FF'-DEVCOUNT RESET INDICATOR @V407466 00335000
  347. INCRDEV3 LA R5,30(0) 16 DEVICE SLOTS PER RCUBLOK @V407466 00336000
  348. BXLE R3,R4,CHKDEV3 GET NEXT DEVICE @V407466 00337000
  349. INCRCU3 LA R5,62(0) 32 CONTROL UNIT SLOTS PER RCHBLOK@V407466 00338000
  350. BXLE R2,R4,CHKCU3 GET NEXT CONTROL UNIT @VA07240 00339000
  351. B LOOP PREP FOR PASS3 OF 'ATT CHANNEL' @V407466 00340000
  352. EJECT 00341000
  353. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00342000
  354. * PASS4 ACQUIRES ONE VCHBLOK IN ADVANCE IF NECESSARY, AS MANY * 00343000
  355. * VCUBLOKS AS NECESSARY AFTER NUMBER OF EMPTY SLOTS IN EXISTING * 00344000
  356. * TABLE OF VCUBLOKS ARE SUBTRACTED FROM NUMBER REQUIRED AND AS MANY * 00345000
  357. * VDEVBLOKS AS ARE NECESSARY AFTER A SIMILAR CALCULATION IS PERFORMED.* 00346000
  358. * ALL BLOCKS ACQUIRED ARE MADE TO LOOK LIKE EMPTY SLOTS. * 00347000
  359. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00348000
  360. SPACE 2 00349000
  361. PASS4 EQU * @V407466 00350000
  362. STM R6,R9,SAVEWRK6 SAVE REGS FOR LATER @V407466 00351000
  363. BAL R5,LOKUSER THROW A LOCK ON DEVICE BLOCKS @V407466 00352000
  364. SLR R7,R7 CLEAR R7 FOR NEXT COUNTER @VA13217 00352050
  365. LA R0,VDEVSIZE SIZE OF VDEVBLOK @VA13217 00352100
  366. L R1,VMDVSTRT POINT TO VDEVBLOK TABLE @VA13217 00352150
  367. LH R2,VMDVCNT NUMBER OF VDEVBLOKS IN TABLE @VA13217 00352200
  368. BAL R5,EMPSLOT FIND EMPTY SLOTS IN VDEVBLOKS @VA13217 00352250
  369. STH R7,SAVEWRK2 REMEMBER THIS FOR LATER @VA13217 00352300
  370. LH R1,DEVNUM WILL THE REQ'D NO. OF VDEVBLOKS @VA13217 00352350
  371. AH R1,VMDVCNT FIT IN THE HALFWORD OFFSET @VA13217 00352400
  372. SLR R1,R7 ALLOWED? @VA13217 00352450
  373. MH R1,=Y(VDEVSIZE*8) @VA13217 00352500
  374. CL R1,=A(X'8000') @VA13217 00352550
  375. BH ERR153 .. NO, VIRT DEV MAX EXCEEDED @VA13217 00352600
  376. LA R0,VCHSIZE SIZE OF VCHBLOK @V407466 00353000
  377. SLR R2,R2 MAKE SURE R2 ZERO TO START @V407466 00354000
  378. L R1,VMCHSTRT VCHBLOK TABLE POINTER @V407466 00355000
  379. LH R2,VMCHCNT NUMBER BLOCKS IN TABLE @V407466 00356000
  380. SLR R7,R7 CLEAR R7 @V407466 00357000
  381. OI DEDBITS,CHBLD BUILDING VCHBLOK @VA07711 00357100
  382. BAL R5,EMPSLOT SEE IF EMPTY SLOTS @V407466 00358000
  383. LTR R7,R7 ANY EMPTY SLOTS - ONLY NEED ONE @V407466 00359000
  384. BZ ACQVCH ACQUIRE ONE VCHBLOK @V407466 00360000
  385. LR R1,R8 PTR TO EMPTY VCHBLOK @VA07711 00360100
  386. SLR R6,R6 IN. NO FREE STORAGE ACQUIRED @VA07711 00360200
  387. * FOR BLK 00360300
  388. B FORMVCH CONSTRUCT VCHBLOK @VA07711 00360400
  389. EMPVCU SLR R7,R7 CLEAR R7 FOR NEXT COUNTER @V407466 00361000
  390. LA R0,VCUSIZE SIZE OF VCUBLOK @V407466 00362000
  391. L R1,VMCUSTRT VCUBLOK TABLE POINTER @V407466 00363000
  392. LH R2,VMCUCNT NUMBER OF VCUBLOKS @V407466 00364000
  393. BAL R5,EMPSLOT FIND EMPTY SLOTS IN VCUBLOKS @V407466 00365000
  394. LH R6,CUNUM NO. OF VCUBLOKS REQUIRED @V407466 00366000
  395. SR R6,R7 SUBT NO. EMPTY FROM NO. REQUIRED @V407466 00367000
  396. BC 12,EMPVDEV < OR = 0; ACQUIRE NO VCUBLOKS @V407466 00368000
  397. SLR R3,R3 ... @V407466 00369000
  398. LH R2,VMCUCNT NO. EXISTING VCUBLOKS @V407466 00370000
  399. LA R9,VCUSIZE VCUBLOK SIZE IN DBL. WORDS @V407466 00371000
  400. LA R1,VCUSIZE VCUBLOK SIZE IN DBL. WORDS @V407466 00372000
  401. L R8,VMCUSTRT PTR. TO TABLE OF VCUBLOKS @V407466 00373000
  402. OI DEDBITS,CUBLD BUILDING CU BLOCKS @VA07711 00373100
  403. BAL R5,BLDBLOK CREATE TAB. OF VCUBLOKS (OLD+NEW)@V407466 00374000
  404. NI DEDBITS,X'FF'-CUBLD RESET VCUBLOK INDICATOR @VA11369 00374100
  405. SLR R8,R8 CLEAR R8 FOR 'LH' @V407466 00375000
  406. LA R7,VCUSIZE SIZE OF VCUBLOK IN DBL. WDS. @V407466 00376000
  407. LH R8,VMCUCNT NUMBER VCUBLOKS IN OLD TABLE @V407466 00377000
  408. MR R6,R8 NUMBER DBL. WDS. IN OLD TABLE @V407466 00378000
  409. LR R5,R1 SAVE NEW TABLE POINTER @V407466 00379000
  410. L R1,VMCUSTRT POINTER TO OLD TABLE @V407466 00380000
  411. LR R0,R7 TABLE LENGTH TO R0 FOR FRET @V407466 00381000
  412. CALL DMKFRET RETURN THE STORAGE @V407466 00382000
  413. ST R5,VMCUSTRT STORE POINTER TO NEW TABLE @V407466 00383000
  414. STH R3,VMCUCNT STORE NO. OF VCUBLOKS IN TABLE @V407466 00384000
  415. EMPVDEV DS 0H @VA13217 00385100
  416. LH R6,DEVNUM GET NO. OF REQUIRED VDEVBLOKS @VA07240 00390000
  417. SH R6,SAVEWRK2 ACTUAL NO. VDEVBLOKS TO ACQUIRE @VA13217 00391100
  418. BNP ENDPASS4 IF .LE. 0, THIS PASS DONE @VA13217 00392100
  419. SLR R3,R3 R3 ZERO TO START @V407466 00393000
  420. LH R2,VMDVCNT NO. EXISTING VDEVBLOKS @V407466 00394000
  421. LA R9,VDEVSIZE VDEVBLOK SIZE IN DBL. WORDS @V407466 00395000
  422. LA R1,VDEVSIZE ...SAME @V407466 00396000
  423. L R8,VMDVSTRT PTR. TO EXISTING VDEVBLOK TABLE @V407466 00397000
  424. OI DEDBITS,DEVBLD BUILDING VDEVBLOKS @VA07711 00397100
  425. BAL R5,BLDBLOK CREATE NEW VDEVBLOK TAB (OLD+NEW)@V407466 00398000
  426. NI DEDBITS,X'FF'-DEVBLD RESET VDEVBLOK INDICATOR @VA11369 00398100
  427. SLR R8,R8 CLEAR R8 @V407466 00399000
  428. LA R7,VDEVSIZE SIZE OF VDEVBLOK IN DBL.WDS. @V407466 00400000
  429. LH R8,VMDVCNT NUMBER VDEVBLOKS IN OLD TABLE @V407466 00401000
  430. MR R6,R8 NO. DBL. WDS. IN OLD TABLE @V407466 00402000
  431. LR R0,R7 INTO R0 FOR FRET @V407466 00403000
  432. LR R5,R1 SAVE NEW TABLE PTR TEMP. @V407466 00404000
  433. L R1,VMDVSTRT OLD TABLE PTR @V407466 00405000
  434. CALL DMKFRET RELEASE OLD TABLE @V407466 00406000
  435. ST R5,VMDVSTRT STORE NEW TABLE POINTER @V407466 00407000
  436. STH R3,VMDVCNT TOT. NO. VDEVBLOKS IN NEW TABLE @V407466 00408000
  437. ENDPASS4 LM R6,R9,SAVEWRK6 RESTORE REGISTERS @V407466 00409000
  438. OI VCHMODE,VCHW SET 'W' MODE IN DUMMY UDEVBLOK @V407466 00410000
  439. B LOOP GO TO PASS5 OF 'ATTACH CHANNEL' @V407466 00411000
  440. SPACE 00412000
  441. ACQVCH LA R6,1 SINGLE VCHBLOK TO BE ACQUIRED @V407466 00413000
  442. SLR R3,R3 ... @V407466 00414000
  443. LH R2,VMCHCNT NO. OF EXISTING VCHBLOKS @V407466 00415000
  444. LA R9,VCHSIZE VCHBLOK SIZE IN DBL. WORDS @V407466 00416000
  445. LR R1,R9 VCHBLOK SIZE IN DBL. WORDS @VA07711 00417000
  446. L R8,VMCHSTRT PTR TO EXISTING VCHBLOK TABLE @V407466 00418000
  447. BAL R5,BLDBLOK CREATE NEW VCHBLOK TAB. (OLD+NEW)@V407466 00419000
  448. SLR R8,R8 CLEAR R8 FOR 'LH' @V407466 00420000
  449. LA R7,VCHSIZE SIZE OF VCHBLOK IN DBL. WDS. @V407466 00421000
  450. LH R8,VMCHCNT NO. OF VCHBLOKS IN OLD TABLE @V407466 00422000
  451. MR R6,R8 R7 - NO. DBL. WDS. IN OLD TABLE @V407466 00423000
  452. LR R0,R7 ...TO R0 FOR FRET @V407466 00424000
  453. LR R5,R1 SAVE PTR TO NEW TABLE TEMP. @V407466 00425000
  454. L R1,VMCHSTRT BEGINNING OF OLD TABLE @V407466 00426000
  455. CALL DMKFRET RELEASE STORAGE @V407466 00427000
  456. ST R5,VMCHSTRT STORE NEW TABLE PTR IN VMBLOK @V407466 00428000
  457. STH R3,VMCHCNT NO. OF VCHBLOKS IN NEW TABLE @V407466 00429000
  458. B EMPVCU DETERMINE NO. VCUBLOKS TO ACQUIRE@V407466 00430000
  459. SPACE 00431000
  460. EMPSLOT SLL R0,3 CONVERT BLOCK SIZE TO BYTES @VA07711 00432000
  461. LTR R8,R1 ANY ENTRIES IN TABLE? @VA07711 00432100
  462. BCR 13,R5 NO TAB. ENTRIED; ZERO EMPTY SLOTS@V407466 00433000
  463. USING VDEVBLOK,R8 VDEVBLOK ADDRESSABILITY @V407466 00435000
  464. TSTEMP TM VDEVADD,X'80' EMPTY SLOT? @V407466 00436000
  465. BC 1,UPDSLOT YES, UPDATE EMPTY SLOTS @V407466 00437000
  466. NEXTSLOT AR R8,R0 NEXT BLOCK @V407466 00438000
  467. BCT R2,TSTEMP CONTINUE TO LOOK FOR EMPTY SLOTS @V407466 00439000
  468. BR R5 RETURN TO MAINLINE @V407466 00440000
  469. UPDSLOT AH R7,F1+2 ADD ONE MORE EMPTY SLOTWS @V407466 00441000
  470. TM DEDBITS,CHBLD ARE WE BUILDING VCHBLOK @VA07711 00441100
  471. BCR 1,R5 YES, PT TO EMPTY SLOT @VA07711 00441200
  472. B NEXTSLOT CONTINUE SEARCH FOR EMPTY SLOTS @V407466 00442000
  473. DROP R8 @VA07711 00442100
  474. SPACE 00443000
  475. BLDBLOK AR R3,R2 R3=NO. OF EXISTING BLOCKS @V407466 00444000
  476. AR R3,R6 PLUS NUMBER OF NEW BLOCKS 00445000
  477. SRL R0,3 CONVERT TO DLB. WDS. @VA07711 00445100
  478. MR R0,R3 NO. DLB. WDS. (R3*R1 INTO R0-R1) @V407466 00446000
  479. LR R0,R1 NO. OF DOUBLEWORDS TO ACCUIRE 00447000
  480. CALL DMKFRERC ACQUIRE STORAGE @V407466 00448000
  481. BNZ VCH138 INSUFFICIENT FREE STORAGE @V407466 00449000
  482. ST R1,SAVEWRK5 SAVE PTR TO NEW STORAGE TEMP. @V407466 00450000
  483. SLL R9,3 SIZE OF BLOCK TO BYTES @V407466 00451000
  484. BCTR R9,0 SUBTRACE ONE FOR EXECUTED MVC @V407466 00452000
  485. NEXTMVC EX R9,BLDMVC MOVE OLD BLOCK TO NEW @V407466 00453000
  486. TM DEDBITS,DEVBLD ARE WE BUILDING VDEVBLOKS? 00454000
  487. BO VLNK YES, TAKE CARE OF VDEVLINK FIELD 00455000
  488. BLDNEXT LA R1,1(R9,R1) POINT TO NEXT BLOCK IN EACH TAB. 00456000
  489. LA R8,1(R9,R8) ADDING 1 TO MAKE UP FOR SUBTRACT @V407466 00457000
  490. BCT R2,NEXTMVC MOVE NEXT BLOCK @V407466 00458000
  491. LH R8,FFS R8=FFFF @V407466 00459000
  492. NEXTSTOR STH R8,0(R1) STORE FFS IN EMPTY SLOTS @V407466 00460000
  493. TM DEDBITS,DEVBLD ARE WE BUILDING VDEVBLOKS 00461000
  494. BO CLRDEV YES, CLEAR EMPTY VDEVBLOK 00462000
  495. TM DEDBITS,CUBLD BUILDING VCUBLOKS?? 00463000
  496. BO CLRCU YES, CLEAR EMPTY VCUBLOKS 00464000
  497. *OTHERWISE MUST BE BUILDING VCHBLOKS 00465000
  498. USING VCHBLOK,R1 ADDRESSABILITY 00466000
  499. FORMVCH MVC VCHBLOK(VCHCUTBL-VCHBLOK),ZEROES CLEAR @VA07711 00467000
  500. MVC VCHCUTBL(8),FFS ... 00468000
  501. MVC VCHCUTBL+8(24),VCHCUTBL ... 00469000
  502. TM DEDBITS,CHBLD ARE WE BUILDING VCHBLOK? @VA07711 00469050
  503. BZ NEXTBLK NO, GO TO NEXT BLOCK @VA07711 00469075
  504. NI DEDBITS,X'FF'-CHBLD CLEAR VCHBLOK FLAG @VA07711 00469100
  505. L R9,SAVEWRK9 CHANNEL ADDR X'C00' @VA07711 00469125
  506. LH R2,DEVADDR GET CHANNEL ADDRESS @VA07711 00469150
  507. STH R2,VCHADD STORE IN VCHBLOK @VA07711 00469175
  508. OI VCHTYPE,VCHSEL FLAG CHANNELS 1-6 AS SELECTOR @VA07711 00469200
  509. TM VMFSTAT,VMFBMX USER WANT BMX CHANNEL? @VA07711 00469225
  510. BZ *+8 NO, LEAVE THEM AS SELECTOR @VA07711 00469250
  511. MVI VCHTYPE,VCHBMX YES,CHANGE THEM TO BMX @VA07711 00469275
  512. SRL R2,7 MULTIPLY CH ADDR BY 2 @VA07711 00469300
  513. L R7,VMCHSTRT GET OLD TABLE ADDRESS @VA07711 00469325
  514. LTR R6,R6 DID WE ACQUIRE NEW TABLE @VA07711 00469350
  515. BZ VCHORIG YES, GO GET ADDRESS @VA07711 00469375
  516. L R7,SAVEWRK5 GET NEWLY ACQUIRED TABLE @VA07711 00469400
  517. VCHORIG LR R0,R1 ADDR OF BLK JUST CREATED TO R0 @VA07711 00469425
  518. SR R0,R7 DISP OF NEW VCHBLOK IN TABLE @VA07711 00469450
  519. STH R0,VMCHTBL(2) STORE DISP IN VMBLOK @VA07711 00469475
  520. LTR R6,R6 WAS VCH STORAGE ACQ THIS RUN? @VA07711 00469500
  521. BZ EMPVCU NO, GO SEE ABOUT CONTROL UNIT @VA07711 00469525
  522. * BLKS 00469550
  523. NEXTBLK LA R1,1(R9,R1) POINT TO NEXT EMPTY BLOCK 00470000
  524. BCT R6,NEXTSTOR STOR FFS IN NEXT BLOCK @V407466 00471000
  525. L R1,SAVEWRK5 RESTORE PTR TO BEGINNING OF TAB. @V407466 00472000
  526. BR R5 RETURN TO MAINLINE @V407466 00473000
  527. SPACE 00474000
  528. BLDMVC MVC 0(0,R1),0(R8) MOVE OLD BLOCK TO NEW STORAGE @V407466 00475000
  529. SPACE 00476000
  530. USING VDEVBLOK,R1 ADDRESSABILITY 00477000
  531. VLNK CLC VDEVADD(2),FFS EMPTY SLOT?? @V407466 00478000
  532. BE BLDNEXT YES, DON'T WORRY ABOUT VDEVLINK @V407466 00479000
  533. CLI VDEVTYPC,CLASDASD DASD DEVICE?? @V407466 00480000
  534. BNE BLDNEXT NO, MOVE & BUILD NEXT BLOK @V407466 00481000
  535. TM VDEVFLAG,VDEVTDSK T-DISK?? @V407466 00482000
  536. BO BLDNEXT .... @V407466 00483000
  537. L R14,VDEVLINK PTR TO VDEVBLOK FOR SAME MINIDISK@V407466 00484000
  538. * SAME MINIDISK LINKED BY SAME OR DIFFERENT USER 00485000
  539. LTR R14,R14 SAME MINIDISK LINKED BY SOMEONE ELSE @V407466 00486000
  540. BZ BLDNEXT NO, MOVE & BUILD NEXT BLOCK @V407466 00487000
  541. LR R15,R1 R15 POINTS TO NEW BLOCK @V407466 00488000
  542. B BLDCHCK SEE IF VDEVBLOK POINTS TO OLD BLOK @V407466 00489000
  543. BLDLOOP LR R15,R14 SAVE PREVIOUS VDEVBLOK ADDRESS @V407466 00490000
  544. L R14,VDEVLINK-VDEVBLOK(,R14) NEXT VDEVBLOK ADDR @V407466 00491000
  545. BLDCHCK CR R8,R14 DOES IT PT TO OLD BLOK?? @V407466 00492000
  546. BNE BLDLOOP NO, KEEP LOOKING @V407466 00493000
  547. ST R1,VDEVLINK-VDEVBLOK(,R15) POINT IT TO NEW ONE @V407466 00494000
  548. B BLDNEXT MOVE & BUILD NEXT BLOCK @V407466 00495000
  549. SPACE 00496000
  550. CLRDEV DS 0H @VA11369 00498100
  551. XC VDEVADD+2(VDEVSIZE*8-2),VDEVADD+2 CLEAR VDEVBLOK@V407466 00499000
  552. B NEXTBLK CLEAR NEXT EMPTY SLOT @V407466 00500000
  553. SPACE 00501000
  554. USING VCUBLOK,R1 ADDRESSABILITY 00502000
  555. CLRCU DS 0H @VA11369 00503100
  556. MVC VCUBLOK+2(6),ZEROES CLEAR VCUBLOK @V407466 00504000
  557. MVC VCUDVTBL(8),FFS FFS @V407466 00505000
  558. MVC VCUDVTBL+8(24),VCUDVTBL FFS ... @V407466 00506000
  559. B NEXTBLK CLEAR NEXT EMPTY BLOCK @V407466 00507000
  560. DROP R1 00508000
  561. EJECT 00512000
  562. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00513000
  563. * PASS5 PERFORMS THE ACTUAL 'ATTACH CHANNEL' FUNCTION BY CALLING * 00514000
  564. * DMKVDSAT TO ATTACH EACH DEVICE ON THE THE CHANNEL. * 00515000
  565. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00516000
  566. SPACE 2 00517000
  567. PASS5 EQU * @V407466 00518000
  568. USING RDEVBLOK,R8 ADDRESSABILITY @V407466 00519000
  569. LA R4,2 INCREMENT FACTOR FOR SCAN @V407466 00520000
  570. SLR R2,R2 INDEX FOR CONTROL UNIT SEARCH @V407466 00521000
  571. CHKCU5 EQU * SCAN ALL REAL CONTROL UNITS @V407466 00522000
  572. LH R7,RCHCUTBL(R2) CONTROL UNIT DISPLACEMENT @V407466 00523000
  573. LTR R7,R7 IS CONTROL UNIT ON THE SYSTEM? @V407466 00524000
  574. BM INCRCU5 NO, GET NEXT C.U. TABLE ENTRY @V407466 00525000
  575. A R7,ARIOCU LOAD ABSOLUTE ADDRESS OF RCUBLOK @V407466 00526000
  576. SLR R3,R3 INDEX FOR DEVICE TABLE SEARCH @V407466 00527000
  577. CHKDEV5 EQU * SCAN ALL REAL DEVICE BLOCKS @V407466 00528000
  578. LH R8,RCUDVTBL(R3) REAL DEVICE DISPLACEMENT @V407466 00529000
  579. LTR R8,R8 DOES DEVICE EXIST? @V407466 00530000
  580. BM INCRDEV5 NO, GET NEXT DEVICE ENTRY @V407466 00531000
  581. SLL R8,3(0) CONVERT TO BYTE INDEX @V407466 00532000
  582. A R8,ARIODV YES, GET ADDRESS OF RDEVBLOK @V407466 00533000
  583. ATTCHAN EQU * DEDICATE EACH REAL DEVICE @V407466 00534000
  584. STM R2,R8,SAVEWRK2 SAVE CURRENT REGISTERS @V407466 00535000
  585. LA R1,RCUCHA ADDRESS OF THE FIRST CHANNEL @V407438 00536000
  586. LA R2,4 INCREMENT @V407438 00537000
  587. LA R3,RCUCHD ADDRESS OF THE LAST CHANNEL @V407438 00538000
  588. NEXTCH CL R6,0(R1) R6 REPRESENT THIS CU -> CH PATH? @V407438 00539000
  589. BE *+8 YES, PATH FOUND, BR. @V407438 00540000
  590. BXLE R1,R2,NEXTCH NOPE, LOOK AT ALL CHANNEL PATHS @V407438 00541000
  591. LA R2,RCUCHA ADDRESS OF THE BEGINNING AGAIN @V407438 00542000
  592. SLR R1,R2 FIND HOW FAR DOWN WE FOUND IT @V407438 00543000
  593. SRL R1,2 CONVERT TO INDEX FROM 0 TO 3 @V407438 00544000
  594. IC R3,ENABTBL(R1) GET PTH BIT, PUT CU->CH PTH ONLIN@V407438 00545000
  595. EX R3,CUCHENAB (NI RCUSTAT,X'FF'-RCUCHXOF) @V407438 00546000
  596. NI RCUSTAT,X'FF'-RCUDISA PUT THE CONTROL UNIT ONLIN@V407438 00547000
  597. NI RDEVSTAT,X'FF'-RDEVDISA PUT THE DEVICE ON LINE @V407438 00548000
  598. CALL DMKSCNRA REAL DEVICE ADDRESS VIA THIS PATH@V407438 00549000
  599. STH R1,DEVADDR PASS IT ON TO DMKVDS @V407466 00550000
  600. LH R0,RDEVTYPC REAL DEVICE TYPE, CLASS @V407466 00551000
  601. STH R0,VDSTYPC PASS IT ALONG, ALSO @V407466 00552000
  602. LA R2,DEVADDR POINT TO 'UDEVBLOK' FOR VDS @V407466 00553000
  603. LR R1,R8 RDEVBLOK ADDRESS TO GR1 FOR VDS @V407466 00554000
  604. CALL DMKVDSAT,AFFINITY ATTACH THIS DEVICE @V407510 00555000
  605. CH R2,=H'124' EXCEEDED MAX VIRTUAL DEVICES? @VA13217 00555300
  606. BE ERR153 YES, WE MUST'VE GOOFED--ABEND @VA13217 00555600
  607. LM R2,R8,SAVEWRK2 RESTORE SCAN REGISTERS @V407466 00556000
  608. SPACE 00557000
  609. INCRDEV5 EQU * ADVANCE TO NEXT RDEVBLOK SLOT @V407466 00558000
  610. LA R5,30(0) SIXTEEN DEVICE SLOTS PER RCUBLOK @V407466 00559000
  611. BXLE R3,R4,CHKDEV5 GET THE NEXT DEVICE @V407466 00560000
  612. SPACE 00561000
  613. INCRCU5 EQU * ADVANCE TO NEXT RCUBLOK SLOT @V407466 00562000
  614. LA R5,62(0) 32 RCUBLOK SLOTS PER RCHBLOK @V407466 00563000
  615. BXLE R2,R4,CHKCU5 GET THE NEXT CONTROL UNIT @V407466 00564000
  616. SPACE 00565000
  617. ATCHCOMP EQU * CHANNEL HAS BEEN DEDICATED @V407466 00566000
  618. LH R1,DEVADDR PICK UP DEVICE NUMBER @V407466 00567000
  619. CALL DMKSCNVU NOW GET THE VIRTUAL BLOCKS @V407466 00568000
  620. USING VCHBLOK,R6 @V407466 00569000
  621. OI VCHSTAT,VCHDED INDICATE VIRTUAL CHANNEL ALSO DED@V407466 00570000
  622. MVC VCHRCHAD,SAVERCH SAVE RCHBLOK ADDRESS @VA13280 00570500
  623. USING RCHBLOK,R6 BACK TO STANDARD ABBRESSABILITRY @V407466 00571000
  624. CALL DMKSCNRU GET REAL DEVICE ADDRESS BACK @V407466 00572000
  625. BAL R5,FREUSER UNLOCK USER'S BLOCKS @V407466 00573000
  626. B CMDCOMP SEND MSG TO USER @V407438 00574000
  627. SPACE 00575000
  628. * RCU TO RCH BLOCK PATH AVAILABLE BITS IN RCUSTAT 00576000
  629. ENABTBL DC AL1(X'FF'-RCUCHAOF,X'FF'-RCUCHBOF) @V407438 00577000
  630. DC AL1(X'FF'-RCUCHCOF,X'FF'-RCUCHDOF) @V407438 00578000
  631. CUCHENAB NI RCUSTAT,0 ENABLE RCU -> RCH PATH @V407438 00579000
  632. EJECT 00580000
  633. DETCHAN EQU * DETACH DEDICATED CHANNEL DEVICES @VA01382 00581000
  634. STM R2,R8,SAVEWRK2 SAVE REGISTERS 00582000
  635. LH R1,RDEVATT LOAD VIRTUAL DEVICE ADDRESS. 00583000
  636. CALL DMKSCNVU GET VIRTUAL CONTROL BLOCKS 00584000
  637. BC 7,VCH040 BRANCH IF CC=1, 2, OR 3 @VA13060 00584150
  638. SPACE 00585000
  639. USING VCHBLOK,R6 @VA01382 00586000
  640. USING VCUBLOK,R7 ADDRESS THE VIRTUAL BLOCKS @VA01382 00587000
  641. USING VDEVBLOK,R8 @VA01382 00588000
  642. SPACE 00589000
  643. CALL DMKVDREL RELEASE THE VIRTUAL DEVICE @VA01382 00590000
  644. SPACE 00591000
  645. L R2,FFS MASK FIELD 00592000
  646. SLR R3,R3 CLEAR INDEX REGISTER 00593000
  647. LA R4,4 LOAD INCREMENT REGISTER 00594000
  648. LA R5,28 LOAD COMPARAND REGISTER 00595000
  649. LH R1,VDEVADD LOAD VIRTUAL DEVICE ADDRESS 00596000
  650. AR R1,R1 MULTIPLY IT BY 2 00597000
  651. STH R2,VDEVADD INDICATE DEVICE NO LONGER PRESENT 00598000
  652. STH R2,VCUDVTBL(R1) REMOVE DEVICE FROM C.U. TABLE 00599000
  653. SPACE 00600000
  654. DETCULP CL R2,VCUDVTBL(R3) ANY MORE DEVICES ON THIS C.U. 00601000
  655. BNE DETDONE BRANCH IF YES. 00602000
  656. BXLE R3,R4,DETCULP BRANCH IF MORE TABLE ENTRIES. 00603000
  657. LH R1,VCUADD LOAD VIRTUAL C.U. ADDRESS 00604000
  658. SRL R1,3 MULTIPLY IT BY 2 00605000
  659. STH R2,VCUADD INDICATE C.U. NO LONGER EXISTS 00606000
  660. STH R2,VCHCUTBL(R1) REMOVE VCUBLOK FROM TABLE 00607000
  661. SLR R3,R3 ZERO INDEX REGISTER 00608000
  662. SPACE 00609000
  663. DETCHLP CL R2,VCHCUTBL(R3) ANY MORE C.U. ON THIS CHANNEL ? 00610000
  664. BNE DETDONE BRANCH IF YES. 00611000
  665. BXLE R3,R4,DETCHLP BRANCH IF MORE TABLE ENTRIES. 00612000
  666. LH R1,VCHADD LOAD VIRTUAL CHANNEL ADDRESS 00613000
  667. SRL R1,7 MULTIPLY IT BY 2 00614000
  668. STH R2,VCHADD INDICATE CHANNEL NO LONGER EXISTS 00615000
  669. STH R2,VMCHTBL(R1) REMOVE VCHBLOK INDEX FROM TABLE 00616000
  670. SPACE 00617000
  671. DETDONE LM R2,R8,SAVEWRK2 RESTORE REGISTERS 00618000
  672. USING RCHBLOK,R6 00619000
  673. USING RCUBLOK,R7 00620000
  674. USING RDEVBLOK,R8 00621000
  675. B INCRDEV GET NEXT REAL DEVICE TO DETACH. 00622000
  676. EJECT 00623000
  677. ALLDET EQU * @VA07711 00624000
  678. USING VCHBLOK,R6 ADDRESSABILITY @VA07711 00624100
  679. LTR R14,R14 ANY DEVICES DETACHED? @VA07711 00624200
  680. BNZ CMDCOMP YES, USE REGULAR LOGIC @VA07711 00624300
  681. LR R0,R6 SAVE RCHBLOK ADDRESS @VA07711 00624400
  682. LH R1,DEVADDR GET CHANNEL X'C00' @VA07711 00624500
  683. CALL DMKSCNVU GET VIRTUAL BLOCKS @VA07711 00624600
  684. LR R6,R0 RESTORE RCHBLOK ADDRESS @VA07711 00624700
  685. L R0,FFS ... @VA07711 00624800
  686. LH R1,VCHADD CHANNEL ADDRESS @VA07711 00624900
  687. SRL R1,7 TIMES 2 @VA07711 00625000
  688. STH R0,VCHADD CLEAR VCHADD @VA07711 00625100
  689. STH R0,VMCHTBL(R1) AND VMBLOK INDEX @VA07711 00625200
  690. USING RCHBLOK,R6 ADDRESSABILITY @VA07711 00625300
  691. CMDCOMP EQU * CHANNEL IS ATTACHED/DETACHED @VA01382 00626000
  692. OI RCHSTAT,RCHDED MARK CHANNEL DEDICATED @V508690 00626100
  693. TM VDBITS+1,DETACH IS THIS A DETACH ?? @V508690 00626200
  694. BNO CMDCOMP1 NO, LEAVE CHANNEL BLOK ALONE @V508690 00626300
  695. NI RCHSTAT,X'FF'-RCHDED BETTER CLEAR DEDICATE BIT @V508690 00626400
  696. CMDCOMP1 EQU * @V508690 00626500
  697. MVC SAVEVCH(26),=C'CHAN X DETACHED USERIDXX' 00627000
  698. MVC SAVEVCH+18(8),CHANUSER STORE USERID 00628000
  699. LH R1,CHANADDR+2 GET CHANNEL ADDRESS 00629000
  700. CALL DMKCVTBH AND CONVERT TO HEX 00630000
  701. STC R1,SAVEVCH+5 SAVE CONVERTED ADDRESS 00631000
  702. LA R1,SAVEVCH LOAD ADDRESS OF FREE STORAGE 00632000
  703. LA R0,26 SIZE IN BYTES OF THE RESPONSE 00633000
  704. TM VDBITS+1,DETACH IS THE USER DETACHING THE CHANNEL 00634000
  705. BO *+10 YES - MESSAGE ALL SET 00635000
  706. MVC SAVEVCH+8(9),=C'ATTACH TO' CHANGE IT TO ATTACH 00636000
  707. CALL DMKQCNWT,PARM=NORET SEND RESPONSE TO ATTACHEE 00637000
  708. BAL R5,MINEVMBK GET ATTACHER'S VMBLOK @V407510 00638000
  709. SR R3,R3 CLEAR R3 FOR RETURNING THE "RETURN CODE" 00639000
  710. L R2,ASYSOP GET VMBLOK OF SYSTEM OPERATOR 00640000
  711. CL R2,SAVER10 IS SYSTEM OPERATOR SAME AS ATTACHEE ? 00641000
  712. BE OPERATEE YES - 00642000
  713. CALL DMKQCNWT,PARM=NORET+OPERATOR NO - TELL HIM ALSO 00643000
  714. SPACE 00644000
  715. OPERATEE CL R11,SAVER10 IS ATTACHER ALSO THE ATTACHEE ? 00645000
  716. BE FRETMSG YES - NO NEED TO TELL HIM AGAIN 00646000
  717. CL R11,ASYSOP IS ATTACHER THE SYSTEM'S OPERATOR ? 00647000
  718. BE FRETMSG YES - NO NEED TO TELL HIM AGAIN 00648000
  719. B SENDMSG ISSUE THE RESPONSE 00649000
  720. SPACE 00650000
  721. LOKUSER EQU * THROW A LOCK ON DEVICE BLOCKS @V407466 00651000
  722. LA R1,VMUSER POINT TO USERID @V407466 00652000
  723. CALL DMKLOCKQ ... AND LOCK IT @V407466 00653000
  724. LA R0,8 LENGTH OF USERID IN R0 @V407466 00654000
  725. CALL DMKSCNAU USER STILL LOGGED ON @V407466 00655000
  726. BNZ NOTLOGD NO, ERROR @V407466 00656000
  727. BR R5 RETURN TO MAINLINE @V407466 00657000
  728. SPACE 00658000
  729. NOTLOGD EQU * USERID NOT LOGGED ON @V407466 00659000
  730. LA R1,VMUSER USERID @V407466 00660000
  731. LA R0,8 LENGTH @V407466 00661000
  732. LA R2,045(,0) DMKVCH045E @V407466 00662000
  733. B NODATA ISSUE MESSAGE @V407466 00663000
  734. SPACE 00664000
  735. EJECT 00665000
  736. VCH034 SLR R0,R0 NO PARM'S BEING PASSED 00666000
  737. SLR R1,R1 ... 00667000
  738. LA R2,34 MESSAGE NUMBER DMKVCH034 00668000
  739. B NODATA 00669000
  740. VCH040 DS 0H @VA09651 00669100
  741. LA R2,40 MESSAGE NUMBER DMKVCH040E @VA09651 00669500
  742. CALL DMKCVTBH @VA09651 00669600
  743. SR R0,R0 R0, BYTE 3 = 0 => DATA IN R1 @VA13217 00669610
  744. B NODATA @VA09651 00669700
  745. SPACE 00670000
  746. VCH048 LA R2,48 MESSAGE NUMBER DMKVCH048 00671000
  747. B CALLERM 00672000
  748. SPACE 1 00672100
  749. ERR153 LA R2,EMSG153 MSG ID @VA13217 00672200
  750. L R1,CHANADDR GET CHANNEL NUMBER @VA13217 00672300
  751. CALL DMKCVTBH CONVERT TO EBCDIC @VA13217 00672400
  752. ICM R1,B'1110',=C'CH ' DATA IS "CH N" @VA13217 00672500
  753. SR R0,R0 R0 LOW ORDER=0:DATA IN R1 @VA13217 00672600
  754. B NODATA GO SET UP OTHER THINGS @VA13217 00672700
  755. SPACE 00673000
  756. VCH129 LA R2,129 MESSAGE NUMBER DMKVCH129 00674000
  757. B CALLERM 00675000
  758. SPACE 00676000
  759. VCH130 LA R2,130 MESSAGE NUMBER DMKVCH130 00677000
  760. B CALLERM 00678000
  761. SPACE 00679000
  762. VCH132 LA R2,132 MESSAGE NUMBER DMKVCH132 00680000
  763. B CALLERM 00681000
  764. SPACE 00682000
  765. VCH138 LA R2,MSG138 MESSAGE NUMBER DMKVCH138 @V407466 00683000
  766. B CALLERM ... @V407466 00684000
  767. SPACE 00685000
  768. CALLERM LH R1,CHANADDR+2 GET CHANNEL NUMBER AND 00686000
  769. CALL DMKCVTBH CONVERT IT TO HEX 00687000
  770. STC R1,CHANADDR+3 STORE THE RESULT 00688000
  771. LA R1,CHANADDR ADDRESS OF THE DATA TO PASS 00689000
  772. LA R0,16 LENGTH OF THE DATA TO PASS 00690000
  773. SPACE 00691000
  774. NODATA ICM R0,B'1110',MODID+3 MODULE IDENTIFICATION 00692000
  775. ICM R2,B'1000',=X'40' FLAG AREA TO BE FRETTED 00693000
  776. LR R3,R9 ADDRESS OF THE AREA TO BE FRETTED 00694000
  777. ICM R3,B'1000',=X'09' Size of area to be fretted HRC040DK 00695100
  778. LR R4,R1 SAVE REG 1 ACROSS CALL 00696000
  779. BAL R5,FREUSER RELEASE USER'S BLOCKS @V407466 00697000
  780. LR R1,R4 RESTORE REG 1 TO POINT CORRECTLY 00698000
  781. BAL R5,MINEVMBK GET ATTACHER'S VMBLOK @V407510 00699000
  782. CALL DMKERMSG OUTPUT THE MESSAGE 00700000
  783. * RETURN WILL BE MADE DIRECTLY TO DMKVDA FROM DMKERM 00701000
  784. EJECT 00702000
  785. SENDMSG CALL DMKQCNWT,PARM=NORET 00703000
  786. FRETMSG LA R0,9 Size in double words HRC040DK 00704100
  787. LR R1,R9 RETURN "SAVEVCH" STORAGE 00705000
  788. CALL DMKFRET 00706000
  789. ST R3,SAVER2 RETURN THE "RETURN CODE" TO THE CALLER 00707000
  790. EXIT 00708000
  791. SPACE 00709000
  792. YOURVMBK DS 0H @V407510 00710000
  793. L R1,SAVER10 GET ATTACHEE'S VMBLOK @V407510 00711000
  794. SWTCHVM SWITCH TO ATTACHEE'S @V407510 00712000
  795. BR R5 RETURN TO CALLER @V407510 00713000
  796. FREUSER LA R1,VMUSER USERID @V407466 00714000
  797. CALL DMKLOCKD UNLOCK USER'S BLOCKS @V407466 00715000
  798. BR R5 RETURN TO MAINLINE @V407466 00716000
  799. SPACE 00717000
  800. MINEVMBK DS 0H @V407510 00718000
  801. STM R0,R1,SAVEWRK8 DO NOT DESTROY NEEDED REGS @VA07769 00719500
  802. L R1,SAVER11 GET CALLER'S VMBLOK @V407510 00720000
  803. SWTCHVM SWITCH TO ATTACHER @V407510 00721000
  804. LM R0,R1,SAVEWRK8 RESTORE SWITCHVM WORK REGS @VA07769 00722500
  805. BR R5 RETURN TO CALLER @V407510 00723000
  806. SPACE 00724000
  807. * 00725000
  808. * FLAGS DEFINED IN VDBITS 00726000
  809. * 00727000
  810. CHANNEL EQU X'80' DEDICATED CHANNEL OPTION SPECIFIED 00728000
  811. NSYSOP EQU X'40' CALLER IS NOT SYSTEM OPERATOR 00729000
  812. VDETACH EQU X'20' DETACH VIRTUAL DEVICE 00730000
  813. ATTSYST EQU X'10' ATTACH/DETACH TO/FROM "SYSTEM" 00731000
  814. ATTREAD EQU X'08' ATTACH "R/O" 00732000
  815. NOTREDY EQU X'04' DASD DEVICE NOT READY 00733000
  816. SPACE 2 00734000
  817. * 00735000
  818. * FLAGS DEFINED IN VDBITS + 1 00736000
  819. * 00737000
  820. NSLABEL EQU X'80' NON-STANDARD LABEL FORMAT 00738000
  821. BADLABL EQU X'40' READ FAILED FOR DASD LABEL 00739000
  822. CPOWND EQU X'20' ALLOCATION DATA PRESENT ON VOLUME 00740000
  823. ALLOCN EQU X'10' READING ALLOCATION DATA 00741000
  824. DETACH EQU X'08' 'DETACH REAL' IN PROGRESS 00742000
  825. DASENSE EQU X'04' SENSE IN PROGRESS 00743000
  826. SPACE 00744000
  827. SPACE 00745000
  828. * 00746000
  829. * FLAGS DEFINED IN DEDBITS 00747000
  830. * 00748000
  831. DEVIND EQU X'80' RDEVICE FOUND ON RCUBLOK @V407466 00749000
  832. DEVBLD EQU X'40' BUILDING VDEVBLOKS @VA07711 00749100
  833. CUBLD EQU X'20' BUILDING VCUBLOKS @VA07711 00749200
  834. CHBLD EQU X'10' BUILDING VCHBLOK @VA07711 00749300
  835. SPACE 00750000
  836. * MISCELLANEOUS EQUATES 00751000
  837. DEVCOUNT EQU X'80' RDEVBLOK COUNTED PREVIOUSLY IND. @V407466 00752000
  838. EMSG153 EQU 153 EXCEEDED MAX VIRTUAL DEVICES @VA13217 00752500
  839. MSG138 EQU 138 DMKVCH138E @V407466 00753000
  840. SPACE 2 00754000
  841. LTORG 00755000
  842. SPACE 2 00756000
  843. SAVEVCH DSECT 00757000
  844. DS 0CL68 @VA13280 00758000
  845. DEVADDR DS 1H 00759000
  846. ORG SAVEVCH+9 @VA03957 00760000
  847. VCHMODE DS 1X DUMMY UDEVMODE FIELD @VA03957 00761000
  848. VCHW EQU X'08' DEVICE IS TO BE IN 'W' MODE @VA03957 00762000
  849. ORG SAVEVCH+10 00763000
  850. VDSTYPC DS 1H 00764000
  851. ORG SAVEVCH+48 00765000
  852. CHANADDR DS 1F CHANNEL ADDRESS - LOW BYTE 00766000
  853. DS 1F BINARY ZEROES 00767000
  854. CHANUSER DS 1D USERID WANTING THIS CHANNEL (DET/ATT) 00768000
  855. SAVERCH DS 1F RCHBLOK ADDRESS @VA13280 00768500
  856. SPACE 2 00769000
  857. COPY SAVE 00770000
  858. VDBITS EQU SAVEWRK1 00771000
  859. DEDBITS EQU SAVEWRK1+2 00772000
  860. CUNUM EQU SAVEWRK4 NO. VCUBLOKS TO BE ACQUIRED @V407466 00773000
  861. DEVNUM EQU SAVEWRK4+2 NO. VDEVBLOKS TO BE ACQUIRED @V407466 00774000
  862. COPY EQU 00775000
  863. COPY DEVTYPES 00776000
  864. COPY NETWORK @VA01656 00777000
  865. PSA 00778000
  866. COPY VMBLOK 00779000
  867. COPY RBLOKS 00780000
  868. COPY VBLOKS 00781000
  869. END 00782000
ibm/vm370-lib/cp/dmkvch.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator