User Tools

Site Tools


ibm:vm370-lib:cp:dmkudr.assemble_src

DMKUDR Source

References

Source Listing

DMKUDR.ASSEMBLE.txt
  1. UDR TITLE 'DMKUDR (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
  3. *. 00003000
  4. * 00004000
  5. * MODULE NAME 00005000
  6. * 00006000
  7. * DMKUDR USER DIRECTORY MODULE 00007000
  8. * 00008000
  9. * FUNCTION 00009000
  10. * 00010000
  11. * THE USER DIRECTORY IS WRITTEN USING A PAGEABLE ACCESS 00011000
  12. * METHOD. TO MINIMIZE THE PAGEING ACTIVITY SEVERAL 00012000
  13. * CONCIDERATIONS SHOULD BE NOTED. FIRST THE USER 00013000
  14. * DIRECTORY BLOCKS ARE IN A SEPERATE PAGE OR PAGES AND 00014000
  15. * THE PAGES ARE ASSIGNED A VIRTUAL ADDRESS AT IPL 00015000
  16. * TIME. SO NO SPECIAL CONCIDERATIONS ARE NECESSARY 00016000
  17. * WHEN CALLING DMKUDRFU. THE USER MACHINE AND DEVICE 00017000
  18. * BLOCKS, ON THE OTHER HAND, ARE NOT ASSIGNED 00018000
  19. * PERMANENT VIRTUAL ADDRESSES. THE VIRTUAL ADDRESS IS 00019000
  20. * ASSIGNED THE FIRST TIME A PAGE IS REFERENCED AND 00020000
  21. * MUST BE REMEMBERED UNTIL THE CALLER IS FINISHED 00021000
  22. * WITH THAT USER. TO FACILITATE THIS THE USER MUST 00022000
  23. * PROVIDE A BUFFER, SEVEN DOUBLE WORDS LONG, WITH 00023000
  24. * THE LAST DOUBLE WORD RESERVED FOR THE DMKUDRRD, 00024000
  25. * DMKUDRFD AND DMKUDRRV ROUTINES. THE SAME BUFFER 00025000
  26. * MUST BE PROVIDED FOR EACH SUBSEQUENT RETRIEVAL. 00026000
  27. * A SECOND BUFFER MUST BE PROVIDED IF INNESTED LINKS 00027000
  28. * ARE INCOUNTERED. A MAXIMUM OF TWO BUFFERS ARE TO 00028000
  29. * BE USED AND THE BUFFER MUST HAVE THE LAST DOUBLE 00029000
  30. * WORD ZERO'S, AT ENTRY TO ANY ROUTINE FOR THE FIRST 00030000
  31. * TIME. ALL SUBSEQUENT ENTRIES TO ANY ROUTINE MUST 00031000
  32. * NOT CHANGE THIS DOUBLE WORD. AFTER A BUFFER HAS 00032000
  33. * BEEN USED FOR THE LAST TIME THE USER MUST CALL 00033000
  34. * DMKUDRRV TO RETURN THE VIRTUAL PAGE AND THEN THE 00034000
  35. * USER CAN FRET HIS BUFFER. 00035000
  36. * 00036000
  37. * CONTENTS 00037000
  38. * 00038000
  39. * DMKUDRFU USER DIRECTORY FIND USER 00039000
  40. * 00040000
  41. * DMKUDRFD USER DIRECTORY FIND DEVICE 00041000
  42. * 00042000
  43. * DMKUDRRD USER DIRECTORY READ 00043000
  44. * 00044000
  45. * DMKUDRRV USER DIRECTORY RETURN VIRTUAL PAGE 00045000
  46. * 00046000
  47. * DMKUDRBV USER DIRECTORY BUILD VIRTUAL LIST 00047000
  48. * 00048000
  49. * DMKUDRDS USER DIRECTORY DYNAMIC SWAP 00049000
  50. * 00050000
  51. *. 00051000
  52. SPACE 5 00052000
  53. DMKUDR CSECT 00053000
  54. USING PSA,R0 00054000
  55. USING SYSLOCS,R10 00055000
  56. USING SAVEAREA,R13 00056000
  57. USING DMKUDR,R12 @VA02644 00057000
  58. USING VMBLOK,R11 00058000
  59. SPACE 3 00059000
  60. EXTRN DMKPGTVG,DMKPGTVR,DMKRPAGT @V200820 00060000
  61. EXTRN DMKIOSQR,DMKSYSOW,DMKSYSOC 00061000
  62. EXTRN DMKLOCKQ,DMKLOCKD 00062000
  63. EXTRN DMKPTRFT @VA02644 00063000
  64. SPACE 2 00064000
  65. DC CL8'DMKUDR' 00065000
  66. EJECT 00066000
  67. *. 00067000
  68. * 00068000
  69. * SUBROUTINE NAME 00069000
  70. * 00070000
  71. * DMKUDRFU USER DIRECTORY FIND USER 00071000
  72. * 00072000
  73. * FUNCTION 00073000
  74. * 00074000
  75. * TO FIND A GIVEN USER ID,IN THE USER DIRECTORY, 00075000
  76. * AND MOVE THE USERS DIRECTORY ENTRY INTO THE 00076000
  77. * CALLERS BUFFER. 00077000
  78. * 00078000
  79. * ATTRIBUTES 00079000
  80. * 00080000
  81. * REENTRANT,PAGEABLE 00081000
  82. * 00082000
  83. * ENTRY POINT 00083000
  84. * 00084000
  85. * DMKUDRFU USER DIRECTORY FIND USER 00085000
  86. * 00086000
  87. * ENTRY CONDITIONS 00087000
  88. * 00088000
  89. * R0 IS THE LENGTH OF THE USER ID 00089000
  90. * 00090000
  91. * R1 POINTS TO THE USER ID WHOSE ENTRY IS TO BE FOUND. 00091000
  92. * 00092000
  93. * R2 POINTS TO A BUFFER TO RECEIVE THE USER 00093000
  94. * DIRECTORY BLOCK,OR IF R2 = 0 ONLY THE 00094000
  95. * CC IS SET. 00095000
  96. * 00096000
  97. * EXIT CONDITIONS 00097000
  98. * 00098000
  99. * CC = 0 USER ID FOUND 00099000
  100. * 00100000
  101. * CC = 1 USER ID NOT FOUND 00101000
  102. * 00102000
  103. * CC = 3 FATAL IO ERROR TRYING TO READ DIRECTORY 00103000
  104. * 00104000
  105. * CALLS TO OTHER ROUTINES 00105000
  106. * 00106000
  107. * DMKLOCKQ - TO LOCK (QUEQE) THE USER DIRECTORY 00107000
  108. * DMKPTRAN - TO BRING A PAGE INTO STORAGE 00108000
  109. * DMKLOCKD - TO DEQUEUE THE USER DIRECTORY 00109000
  110. * DMKPTRFT - TO RELEASE A REAL STORAGE PAGE FRAME 00110000
  111. * 00111000
  112. * EXTERNAL REFERENCES 00112000
  113. * 00113000
  114. * DMKSYSPL = POINTER TO THE START OF THE 00114000
  115. * USER DIRECTORY ON THE SYSRES VOLUME 00115000
  116. * 00116000
  117. * TABLES / WORK AREAS 00117000
  118. * 00118000
  119. * 00119000
  120. EJECT 00120000
  121. * REGISTER USAGE 00121000
  122. * 00122000
  123. * R0 - R2 = INPUT POINTERS 00123000
  124. * R3 = POINTER TO LIST OF DIRECTORY PAGES 00124000
  125. * R4 = POINTER TO THE LAST UDIRBLOK IN PAGE 00125000
  126. * R5 = WORK REGISTER 00126000
  127. * R6 = REAL ADDRESS OF BUFFER PAGE 00127000
  128. * R7 - R8 WORK REGISTERS 00128000
  129. * R9 = INTERNAL LINKAGE 00129000
  130. * R10 = POINTER TO SYSLOCS 00130000
  131. * R11 = VMBLOK 00131000
  132. * R12 = BASE 00132000
  133. * R13 = SAVE 00133000
  134. * R14 - R15 = SYSTEM USE 00134000
  135. * 00135000
  136. * OPERATION 00136000
  137. * 00137000
  138. * 1. CALL DMKLOCKQ TO LOCK THE NAME ' DIRCT '. 00138000
  139. * 00139000
  140. * 2. MASK THE USERID, FROM THE CALLER, OFF AND 00140000
  141. * SET UP TO SCAN THE UDIRBLOK'S. 00141000
  142. * 00142000
  143. * 3. TRANS TO BRING IN EACH PAGE FROM THE 00143000
  144. * PAGE LIST (DMKSYSPL) UNTIL THE USERID IS 00144000
  145. * FOUND. 00145000
  146. * 00146000
  147. * 4. IF THE USERID IS NOT FOUND CALL DMKLOCKD TO UNLOCK 00147000
  148. * C' DIRCT ' AND EXIT CC = 1. 00148000
  149. * 00149000
  150. * 5. WHEN FOUND TEST IF THE USER PROVIDED 00150000
  151. * A BUFFER. IF NOT GO TO STEP 7. 00151000
  152. * 00152000
  153. * 6. MOVE THE UDIRBLOK INTO THE USERS BUFFER AND 00153000
  154. * UNMASK THE BLOCK. 00154000
  155. * 00155000
  156. * 7. CALL DMKLOCKD TO UNLOCK C' DIRECT ' AND EXIT CC = 0. 00156000
  157. * 00157000
  158. * MESSAGES 00158000
  159. * 00159000
  160. * DMKUDR475I FATAL IO ERROR TRYING TO READ DIRECTORY 00160000
  161. * DMKUDR476I SYSTEM DIRECTORY LOADED FROM VOLUME XXXXXX HRC028DK 00160500
  162. *. 00161000
  163. SPACE 3 00162000
  164. DMKUDRFU RELOC 00163000
  165. USING UDBFBLOK,R3 00164000
  166. USING UDIRBLOK,R2 00165000
  167. EJECT 00166000
  168. L R10,ASYSLC POINT TO SYSLOCS 00167000
  169. LTR R2,R0 IS LENGTH EQ ZERO 00168000
  170. BZ EXITCC1 YES- ERROR RETURN CC = 1 (USER NOT FOUND) 00169000
  171. CL R2,F8 IS IT OVER 8 00170000
  172. BH EXITCC1 YES- ERROR RETURN CC = 1 (USER NOT FOUND) 00171000
  173. BCTR R2,0 -1 00172000
  174. MVC SAVEWRK2(8),BLANKS BLANK OUT SAVEWRK2 AND 3 00173000
  175. EX R2,MOVEUID MOVE IN USER ID 00174000
  176. XC SAVEWRK2(8),MASK MASK OFF THE USER ID 00175000
  177. LA R1,=CL8' DIRCT' POINT AT NAME TO LOCK 00176000
  178. CALL DMKLOCKQ LOCK SO DMKUDRBV CAN'T CHANGE DMKSYSPL 00177000
  179. L R3,DMKSYSPL PICK UP POINTER TO DIRECTORY 00178000
  180. B NXTPAGE START SEARCH OF DIRECTORY PAGES @VA02644 00179000
  181. SPACE 00180000
  182. FREPAGE EQU * CLEAR AND RELEASE LAST PAGE @VA02644 00181000
  183. LA R3,4(0,R3) NEXT ENTRY IN BUFFER LIST @VA02644 00183000
  184. NXTPAGE EQU * GET NEXT DIRECTORY BUFFER PAGE @VA02644 00184000
  185. ICM R1,15,0(R3) LOAD AND TEST FOR LAST ENTRY @VA02644 00185000
  186. BM UNLOCK END OF LIST -- USERID NOT FOUND @VA02644 00186000
  187. BZ UNLKCC3 SEE IF THERE WAS EVER AN I/O @VA09628 00186100
  188. * ERROR AND INFORM THE USER 00186200
  189. TRANS 2,1,OPT=(BRING,DEFER,SYSTEM),IOER=UNLKCC3 @VA04993 00187000
  190. LH R4,UDIRDISP PICK UP DISPLACEMENT TO END OF DIR PAGE 00188000
  191. AR R4,R2 SET R4 EQ TO THE REAL ADD OF DIR PAGE 00189000
  192. LR R6,R2 SAVE REAL ADDR OF BUFFER START @VA02644 00190000
  193. FINDUSER LA R2,UDIRSIZE*8(,R2) POINT TO NEXT BLOCK 00191000
  194. CLR R2,R4 HAVE WE REACHED THE END ? @VA02644 00192000
  195. BH FREPAGE YES -- GET THE NEXT BUFFER @VA02644 00193000
  196. CLC SAVEWRK2(8),UDIRUSER IS THIS THE USERID ? @VA02644 00194000
  197. BNE FINDUSER 00195000
  198. EJECT 00196000
  199. L R3,SAVER2 POINT TO USER BUFFER 00197000
  200. LTR R3,R3 DO I HAVE A BUFFER 00198000
  201. BZ CLREXIT NO -- CLEAR THE PAGE AND EXIT @VA02644 00199000
  202. MVC UDBFWORK(UDIRSIZE*8),UDIRBLOK MOVE BLOCK TO CALLER 00200000
  203. XC UDBFWORK+8,MASK MASK ON THE BUFFER (USERID) 00201000
  204. XC UDBFWORK+16,MASK MASK ON THE BUFFER (PASSWORD) 00202000
  205. CLREXIT EQU * CLEAR PAGE, UNLOCK DIRECTORY @VA02644 00203000
  206. LA R1,=CL8' DIRCT' DIRECTORY LOCK NAME @VA02644 00205000
  207. CALL DMKLOCKD UNLOCK THE DIRECTORY @VA02644 00206000
  208. B EXITCC0 SET CC EQ 0 00207000
  209. UNLKCC3 DS 0H @VA04993 00207200
  210. SR R1,R1 CLEAR R1,TO INDICATE I/O ERROR @VA09628 00207300
  211. ST R1,0(,R3) AND STORE IN THE UDBFBLOK @VA09628 00207350
  212. LA R1,=CL8' DIRCT' POINT TO NAME @VA04993 00207400
  213. CALL DMKLOCKD UNLOCK THE DIRECTORY @VA04993 00207600
  214. B EXITCC3 RETURN WITH CC=3 @VA04993 00207800
  215. SPACE 2 00208000
  216. UNLOCK LA R1,=CL8' DIRCT' POINT TO NAME 00209000
  217. CALL DMKLOCKD UNLOCK THE DIRECTORY 00210000
  218. B EXITCC1 RETURN TO CALLER CC=1 00211000
  219. DROP R2,R3 @VA02644 00212000
  220. SPACE 00213000
  221. MOVEUID MVC SAVEWRK2(0),0(R1) SET UP USER ID 00214000
  222. ABEND 2 VMPAGES TO GO NEGATIVE - TERM CP @VA07224 00232100
  223. EJECT 00233000
  224. *. 00234000
  225. * 00235000
  226. * SUBROUTINE NAME 00236000
  227. * 00237000
  228. * DMKUDRFD USER DIRECTORY FIND DEVICE 00238000
  229. * 00239000
  230. * FUNCTION 00240000
  231. * 00241000
  232. * TO ALLOW THE USER TO READ A SPECIFIC DEVICE 00242000
  233. * BLOCK INTO THE CALLER'S BUFFER 00243000
  234. * 00244000
  235. * ATTRIBUTES 00245000
  236. * 00246000
  237. * REENTRANT,PAGEABLE 00247000
  238. * 00248000
  239. * ENTRY POINTS 00249000
  240. * 00250000
  241. * DMKUDRFD USER DIRECTORY FIND DEVICE 00251000
  242. * 00252000
  243. * ENTRY CONDITIONS 00253000
  244. * 00254000
  245. * R0 IS THE DEVICE ADD 00255000
  246. * 00256000
  247. * R1 POINTS TO THE DISPLACEMENT FOLLOWED BY THE DASD 00257000
  248. * ADD OF THE USER'S ''USER MACHINE BLOCK'' . 00258000
  249. * THE DASD ADD IS ON A WORD BOUNDRY. 00259000
  250. * 00260000
  251. * R2 POINTS TO THE BUFFER TO RECEIVE THE USER DEVICE 00261000
  252. * BLOCK. THE BUFFER MUST BE AS DESCRIBED IN THE DSECT 00262000
  253. * UDBFWORK. (SEVEN DOUBLE WORDS LONG WITH THE 00263000
  254. * LAST DOUBLE WORD USED BY THIS ROUTINE ) 00264000
  255. * 00265000
  256. * EXIT CONDITIONS 00266000
  257. * 00267000
  258. * CC = 0 DEVICE FOUND 00268000
  259. * 00269000
  260. * CC = 1 DEVICE NOT FOUND 00270000
  261. * 00271000
  262. * CC = 3 FATAL IO ERROR TRYING TO READ DIRECTORY 00272000
  263. * 00273000
  264. * CALLS TO OTHER ROUTINES 00274000
  265. * 00275000
  266. * DMKPGTVG - TO GET A VIRTUAL PAGE BUFFER 00276000
  267. * DMKRPAGT - TO POINT TO A PAGE ON DASD DEVICE 00277000
  268. * DMKPTRAN - TO BRING A PAGE INTO STORAGE 00278000
  269. * DMKQCNWT - WRITE ERROR MSG 00279000
  270. * 00280000
  271. * EXTERNAL REFERENCES 00281000
  272. * 00282000
  273. * NONE 00283000
  274. * 00284000
  275. * TABLES / WORK AREAS 00285000
  276. * 00286000
  277. * UDBFBLOK - TO POINT TO PROPER PAGE 00287000
  278. * 00288000
  279. EJECT 00289000
  280. * REGISTER USAGE 00290000
  281. * 00291000
  282. * R0 - R2 INPUT POINTERS 00292000
  283. * R3 = DISPLACEMENT OF UDEVBLOK 00293000
  284. * R4 = REALADD = REAL ADDRESS OF THE PAGE BUFFER 00294000
  285. * R5 = LINK TO GETBUFF SUBROUTINE 00295000
  286. * R6 = DATA FROM UDEVBLOK 00296000
  287. * 00297000
  288. * OPERATION 00298000
  289. * 00299000
  290. * 1. GET THE POINTER TO THE UMACBLOK FROM THE CALLER. 00300000
  291. * 00301000
  292. * 2. BRING THE PAGE INTO CORE CALLING DMKPGTVG,DMKRPAGT 00302000
  293. * AND/OR DMKPTRAN AS NEEDED. 00303000
  294. * 00304000
  295. * 3. SCAN THE UDEVBLOK'S UNTIL THE DEVICE IS FOUND, 00305000
  296. * IF NOT FOUND RETURN CC = 1. 00306000
  297. * 00307000
  298. * 4. MOVE THE UDEVBLOK INTO THE USERS BUFFER 00308000
  299. * AND UNMASK IT. 00309000
  300. * 00310000
  301. * 5. EXIT CC = 0. 00311000
  302. * 00312000
  303. * MESSAGES 00313000
  304. * 00314000
  305. * DMKUDR475I FATAL IO ERROR TRYING TO READ DIRECTORY 00315000
  306. *. 00316000
  307. EJECT 00317000
  308. DMKUDRFD RELOC 00318000
  309. USING USERDISP,R1 00319000
  310. USING UDBFBLOK,R2 00320000
  311. L R10,ASYSLC POINT TO SYSLOCS 00321000
  312. LH R3,USERDISP GET DISPLACEMENT FROM USER 00322000
  313. L R0,USERDASD GET DASD ADD FROM USER 00323000
  314. BAL R5,GETBUFF GET PAGE IN CORE AND RETURN WITH REAL ADD 00324000
  315. USING UMACBLOK,R3 @VA03188 00325000
  316. LH R6,UMACDVCT(R4) GET USER DEVICE COUNT @VA07491 00325100
  317. LTR R6,R6 CHECK FOR ZERO @VA07491 00325200
  318. BZ EXITCC1 IF ZERO, RETURN TO CALLER @VA07491 00325300
  319. L R6,UMACDASD(R4) GET DASD ADDR OF 1ST DEVBLOK @VA03188 00326000
  320. LTR R6,R6 ANY DEVICES? @VA03188 00327000
  321. BZ EXITCC1 NO, CONDITIONAL RETURN @VA03188 00328000
  322. LH R3,UMACDISP(R4) GET OFFSET TO NEXT BLOCK @VA03188 00329000
  323. DROP R3 @VA03188 00330000
  324. LA R5,FINDDEV SET GETBUFF RETURN REGISTER @VA03188 00331000
  325. CL R6,UDBFDASD IS PAGE IN BUFFER? @VA03188 00332000
  326. BER R5 YES, GO FIND UDEVBLOK @VA03188 00333000
  327. LR R0,R6 POINT TO NEW DASD ADDRESS @VA03188 00334000
  328. B GETBUFF BRING NEW PAGE IN (RETURN VIA R5)@VA03188 00335000
  329. SPACE 1 00336000
  330. FINDDEV EQU * (GETBUFF RETURNS HER ON R5) @VA03188 00337000
  331. USING UDEVBLOK,R3 @VA03188 00338000
  332. CH R0,UDEVADD(R4) IS THIS THE DEVICE? @VA03188 00339000
  333. BE DEVFOUND YES GET OUT 00340000
  334. L R6,UDEVDASD(R4) DASD ADDRESS @VA02644 00341000
  335. LTR R6,R6 IS THIS THE END OF THE LIST 00342000
  336. BZ EXITCC1 YES- RETURN TO CALLER 00343000
  337. CL R6,UDBFDASD IS PAGE IN BUFFER 00344000
  338. LH R3,UDEVDISP(R4) POINTER TO NEXT BLOCK @VA02644 00345000
  339. BE FINDDEV YES- GO FIND DEVICE 00346000
  340. LR R0,R6 POINT TO NEW DASD ADDRESS 00347000
  341. B GETBUFF BRING NEW PAGE IN (RETURN ON REG 5) 00348000
  342. DEVFOUND EQU * @VA02644 00349000
  343. AR R3,R4 GR3 = REAL ADDRESS OF UDEVBLOK @VA02644 00350000
  344. TM UDEVSTAT,UDEVLONG IS IT A LONG UDEVBLOK? @VA11292 00350150
  345. BZ LONGDEV YES, BRANCH @VA11292 00350300
  346. MVC UDBFWORK(UDEVSIZE*8/2),UDEVBLOK SHORT @VA11292 00350450
  347. B MASKON GO MASK THE BUFFER ON @VA11292 00350600
  348. LONGDEV DS 0H @VA11292 00350750
  349. MVC UDBFWORK(UDEVSIZE*8),UDEVBLOK MOVE BLOCK TO CALLER 00351000
  350. B MASKON GO MASK THE BUFFER ON 00352000
  351. DROP R1,R2,R3 @VA02644 00353000
  352. EJECT 00354000
  353. *. 00355000
  354. * 00356000
  355. * SUBROUTINE NAME 00357000
  356. * 00358000
  357. * DMKUDRRD USER DIRECTORY READ 00359000
  358. * 00360000
  359. * FUNCTION 00361000
  360. * 00362000
  361. * TO ALLOW THE USER TO READ THE NEXT USER DIRECTORY 00363000
  362. * BLOCK INTO THE CALLERS BUFFER. 00364000
  363. * 00365000
  364. * ATTRIBUTES 00366000
  365. * 00367000
  366. * REENTRANT,PAGEABLE 00368000
  367. * 00369000
  368. * ENTRY POINTS 00370000
  369. * 00371000
  370. * DMKUDRRD USER DIRECTORY READ 00372000
  371. * 00373000
  372. * ENTRY CONDITIONS 00374000
  373. * 00375000
  374. * R1 POINTS TO THE DISPLACEMENT FOLLOWED BY THE ADD 00376000
  375. * OF THE NEXT BLOCK TO BE READ. 00377000
  376. * THE DASD ADD IS ON A WORD BOUNDARY. 00378000
  377. * 00379000
  378. * R2 POINTS TO A BUFFER TO RECEIVE THE MACHINE OR DEVICE 00380000
  379. * BLOCK. THE BUFFER MUST BE AS DESCRIBED IN THE DSECT 00381000
  380. * UDBFWORK. ( SEVEN DOUBLE WORDS LONG WITH THE 00382000
  381. * LAST DOUBLE WORD USED BY THIS ROUTINE ) 00383000
  382. * 00384000
  383. * EXIT CONDITIONS 00385000
  384. * 00386000
  385. * CC = 0 BLOCK READ INTO BUFFER 00387000
  386. * 00388000
  387. * CC = 1 INVALID DISPLACEMENT OR DASD ADD 00389000
  388. * 00390000
  389. * CC = 3 FATAL IO ERROR TRYING TO READ DIRECTORY 00391000
  390. * 00392000
  391. * CALLS TO OTHER ROUTINES 00393000
  392. * 00394000
  393. * DMKPGTVG - TO GET A VIRTUAL PAGE BUFFER 00395000
  394. * DMKRPAGT - TO POINT TO A PAGE ON DASD DEVICE 00396000
  395. * DMKPTRAN - TO BRING A PAGE INTO STORAGE 00397000
  396. * DMKQCNWT - TO WRITE ERROR MSG 00398000
  397. * 00399000
  398. * EXTERNAL REFERENCES 00400000
  399. * 00401000
  400. * NONE 00402000
  401. * 00403000
  402. * TABLES / WORK AREAS 00404000
  403. * 00405000
  404. * UDBFBLOK - POINT TO PROPER PAGE 00406000
  405. * 00407000
  406. EJECT 00408000
  407. * REGISTER USAGE 00409000
  408. * 00410000
  409. * R0 = DASD ADDRESS OF UDEVBLOK 00411000
  410. * R1 - R2 = INPUT POINTERS 00412000
  411. * R3 = DISPLACEMENT OF UDEVBLOK 00413000
  412. * R4 = REALADD = REAL ADDRESS OF PAGE BUFFER 00414000
  413. * R5 = LINK TO GETBUFF SUBROUTINE 00415000
  414. * 00416000
  415. * OPERATION 00417000
  416. * 00418000
  417. * 1. GET THE POINTER TO THE UDEVBLOK FROM THE CALLER. 00419000
  418. * 00420000
  419. * 2. IF THE POINTER IS INVALED EXIT CC = 1. 00421000
  420. * (EOF LAST DEVICE FOUND) 00422000
  421. * 00423000
  422. * 3. BRING THE PAGE INTO CORE CALLING DMKPGTVG, DMKRPAGT 00424000
  423. * AND/OR DMKPTRAN AS NEEDED. 00425000
  424. * 00426000
  425. * 4. MOVE THE UDEVBLOK INTO THE CALLERS BUFFER AND 00427000
  426. * EXIT CC = 0. 00428000
  427. * 00429000
  428. * MESSAGES 00430000
  429. * 00431000
  430. * DMKUDR475I FATAL IO ERROR TRYING TO READ DIRECTORY 00432000
  431. *. 00433000
  432. SPACE 3 00434000
  433. DMKUDRRD RELOC 00435000
  434. USING UDBFBLOK,R2 00436000
  435. USING UDEVBLOK,R3 00437000
  436. USING USERDISP,R1 00438000
  437. L R10,ASYSLC POINT TO SYSLOCS 00439000
  438. LH R3,USERDISP GET DISPLACEMENT FROM USER 00440000
  439. L R0,USERDASD GET DASD ADD FROM USER 00441000
  440. LTR R0,R0 IS IT 0 (LAST DASD ADD) 00442000
  441. BE EXITCC1 00443000
  442. LA R6,4095 SET TO 4K - 1 00444000
  443. CLR R3,R6 IS IT 4K UP 00445000
  444. BH EXITCC1 YES- GET OUT SET CC EQ 1 00446000
  445. BAL R5,GETBUFF GET PAGE IN CORE AND RETURN WITH REAL ADD 00447000
  446. AR R3,R4 GR3 = REAL ADDRESS OF DIR PAGE @VA02644 00448000
  447. TM UDEVSTAT,UDEVLONG IS IT A LONG UDEVBLOK? @VA10088 00448150
  448. BZ DEVLONG YES, BRANCH @VA10088 00448300
  449. MVC UDBFWORK(UDEVSIZE*8/2),UDEVBLOK SHORT @VA10088 00448450
  450. B MASKON GO MASK THE BUFFER ON @VA10088 00448600
  451. DEVLONG DS 0H @VA10088 00448750
  452. MVC UDBFWORK(UDEVSIZE*8),UDEVBLOK GIVE BLOCK TO USER 00449000
  453. B MASKON GO MASK THE BUFFER ON 00450000
  454. EJECT 00450020
  455. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00450040
  456. * DMKUDRMD PERFORMS THE SAME FUNCTION AS DMKUDRRD EXCEPT THAT THE * 00450060
  457. * UMACBLOK IS READ IN INSTEAD OF THE UDEVBLOK. * 00450080
  458. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00450100
  459. SPACE 2 00450120
  460. DMKUDRMD RELOC @V407466 00450140
  461. USING UDBFBLOK,R2 @V407466 00450160
  462. USING UMACBLOK,R3 @V407466 00450180
  463. USING USERDISP,R1 @V407466 00450200
  464. L R10,ASYSLC POINT TO SYSLOCS @V407466 00450220
  465. LH R3,USERDISP GET DISPLACEMENT FROM USER @V407466 00450240
  466. L R0,USERDASD GET DASD ADD FROM USER @V407466 00450260
  467. LTR R0,R0 IS IT 0? (LAST DASD ADD) @V407466 00450280
  468. BE EXITCC1 YES @V407466 00450300
  469. LA R6,4095 SET TO 4K-1 @V407466 00450320
  470. CLR R3,R6 IS IT 4K UP @V407466 00450340
  471. BH EXITCC1 YES, GET OUT SET CC EQ 1 @V407466 00450360
  472. BAL R5,GETBUFF GET PAGE IN & RETURN W/ REAL ADD @V407466 00450380
  473. AR R3,R4 GR3 = REAL ADDR OF DIR PAGE @V407466 00450400
  474. MVC UDBFWORK(UMACSIZE*8),UMACBLOK GIVE BLOCK TO USER@V407466 00450420
  475. B MASKON GO MASK THE BUFFER ON @V407466 00450440
  476. EJECT 00451000
  477. ************************************************** 00452000
  478. * 00453000
  479. * GET BUFFER SUBROUTINE 00454000
  480. * 00455000
  481. ************************************************** 00456000
  482. SPACE 2 00457000
  483. GETBUFF L R1,UDBFVADD GET VIRTUAL ADD 00458000
  484. LTR R1,R1 DO I HAVE A BUFFER 00459000
  485. BNZ GETPAGE YES- BRANCH 00460000
  486. CALL DMKPGTVG 00461000
  487. ST R1,UDBFVADD SAVE BUFFER ADD 00462000
  488. GETPAGE CL R0,UDBFDASD IS PAGE IN STORAGE 00463000
  489. BE GETRADD YES- BRANCH 00464000
  490. ST R0,UDBFDASD POINT TO THE NEW DASD PAGE ADDRESS 00465000
  491. IC R0,DMKSYSUD+3 POINT TO PROPER DEVICE IN OWNED LIST 00466000
  492. LA R2,SYSTEM SET SYSTEM OPTION ON 00467000
  493. CALL DMKRPAGT 00468000
  494. GETRADD TRANS 2,1,OPT=(BRING,DEFER,SYSTEM),IOER=EXITCC3 00469000
  495. LR R4,R2 RETURN PAGE ADDRESS IN GR4 @VA02644 00470000
  496. LM R0,R2,SAVER0 RETURN REGS 00471000
  497. BR R5 RETURN TO CALLER 00472000
  498. DROP R1,R2,R3 @VA02644 00473000
  499. EJECT 00474000
  500. *. 00475000
  501. * SUBROUTINE NAME 00476000
  502. * 00477000
  503. * DMKUDRRV USER DIRECTORY RETURN VIRTUAL PAGE 00478000
  504. * 00479000
  505. * FUNCTION 00480000
  506. * 00481000
  507. * TO ALLOW THE USER TO RETURN A VIRTUAL PAGE USED 00482000
  508. * BY THE DIRECTORY PROGRAMS AS A BUFFER. 00483000
  509. * 00484000
  510. * ATTRIBUTES 00485000
  511. * 00486000
  512. * REENTRANT , PAGEABLE 00487000
  513. * 00488000
  514. * ENTRY POINTS 00489000
  515. * 00490000
  516. * DMKUDRRV USER DIRECTORY RETURN VIRTUAL PAGE 00491000
  517. * 00492000
  518. * ENTRY CONDITIONS 00493000
  519. * 00494000
  520. * R2 POINTS TO THE BUFFER AS DESCRIBED IN THE DSECT 00495000
  521. * UDBFWORK. (SEVEN DOUBLE WORDS LONG WITH THE 00496000
  522. * LAST DOUBLE WORD USED BY THIS ROUTINE ) 00497000
  523. * 00498000
  524. * EXIT CONDITIONS 00499000
  525. * 00500000
  526. * NONE 00501000
  527. * 00502000
  528. * CALLS TO OTHER ROUTINES 00503000
  529. * 00504000
  530. * DMKPGTVR - TO RETURN A VIRTUAL PAGE BUFFER 00505000
  531. * 00506000
  532. * EXTERNAL REFERENCES 00507000
  533. * 00508000
  534. * NONE 00509000
  535. * 00510000
  536. * TABLES / WORK AREAS 00511000
  537. * 00512000
  538. * UDBFBLOK - POINT TO VIRTUAL PAGE BUFFER 00513000
  539. * 00514000
  540. * REGISTER USAGE 00515000
  541. * 00516000
  542. * R2 = POINTER TO BUFFER 00517000
  543. * 00518000
  544. * OPERATION 00519000
  545. * 00520000
  546. * 1. TEST IF A VIRTUAL PAGE WAS USED. 00521000
  547. * 00522000
  548. * 2. IF NOT USED EXIT CC = 0. 00523000
  549. * 00524000
  550. * 3. CALL DMKRPAGT AND DMKPGTVR TO RETURN PAGE. 00525000
  551. * 00526000
  552. * 4. EXIT CC = 0 00527000
  553. *. 00528000
  554. EJECT 00529000
  555. DMKUDRRV RELOC 00530000
  556. USING UDBFBLOK,R2 00531000
  557. L R1,UDBFVADD GET ADD OF PAGE BUFFER 00532000
  558. LTR R1,R1 DO I HAVE A BUFFER 00533000
  559. BZ EXITCC1 NO- GET OUT 00534000
  560. SR R0,R0 SET UP TO ZERO DASD PAGE ADD 00541000
  561. CALL DMKRPAGT,PARM=SYSTEM RELEASE THE PAGE @VA02644 00542000
  562. CALL DMKPGTVR RETURN VIRTUAL PAGE 00543000
  563. B EXITCC0 RETURN TO THE CALLER 00544000
  564. EJECT 00545000
  565. ****************************************************************** 00546000
  566. * 00547000
  567. * EXIT SUBROUTINE 00548000
  568. * 00549000
  569. ****************************************************************** 00550000
  570. SPACE 2 00551000
  571. MASKON XC UDBFBLOK+8(8),MASK * MASK THE BUFFER ON 00552000
  572. XC UDBFBLOK+16(8),MASK * 00553000
  573. XC UDBFBLOK+24(8),MASK * 00554000
  574. XC UDBFBLOK+32(8),MASK * 00555000
  575. XC UDBFBLOK+40(8),MASK * 00556000
  576. B EXITCC0 EXIT WITH CONDITION CODE 0 HRC028DK 00556060
  577. SPACE 2 , HRC028DK 00556120
  578. DRCTOK EQU * HRC028DK 00556180
  579. L R10,ASYSLC POINTER TO SYSLOCS TABLE HRC028DK 00556240
  580. USING SYSLOCS,R10 HRC028DK 00556300
  581. SR R1,R1 CLEAR R1 HRC028DK 00556360
  582. IC R1,DMKSYSUD+3 DISPLACEMENT IN SYSOWN LIST HRC028DK 00556420
  583. DROP R10 HRC028DK 00556480
  584. SLL R1,3 MULTIPLE BY 8 HRC028DK 00556540
  585. A R1,=A(DMKSYSOW) HRC028DK 00556600
  586. MVC DIRVOL,0(R1) HRC028DK 00556660
  587. LA R0,DIROKL HRC028DK 00556720
  588. LA R1,DIROK HRC028DK 00556780
  589. CALL DMKQCNWT,PARM=NORET+NOTIME HRC028DK 00556840
  590. SPACE 2 , HRC028DK 00556900
  591. EXITCC0 SR R0,R0 SET CC = 0 00557000
  592. B EXIT RETURN TO CALLER CC EQ 0 00558000
  593. EXITCC1 TM *,X'FF' SET CC EQ 1 00559000
  594. B EXIT RETURN TO CALLER CC = 1 00560000
  595. EXITCC2 CLI *,X'00' SET CC = 2 00561000
  596. B EXIT RETURN TO CALLER CC EQ 2 00562000
  597. EXITCC3 EQU * SET CONDITION CODE THREE, EXIT @V200820 00563000
  598. LA R1,FATALIO DMKUDR475I MESSAGE FOR OPERATOR @V200820 00564000
  599. LA R0,L'FATALIO ...LENGTH @V200820 00565000
  600. CALL DMKQCNWT,PARM=NORET+OPERATOR+ALARM @V200820 00566000
  601. TM *+1,X'FF' SET CC = 3 @V200820 00567000
  602. EXIT EXIT RETURN TO CALLER 00568000
  603. DROP R2 @VA02644 00569000
  604. SPACE 2 00570000
  605. FATALIO DC C'DMKUDR475I FATAL I/O ERROR TRYING TO READ DIRECTORY' 00571000
  606. DIROK DC C'DMKUDR476I System Directory loaded from ' HRC028DK 00572090
  607. DC C'volume ' HRC028DK 00572180
  608. DIRVOL DC C' ' HRC028DK 00572270
  609. DC X'15' HRC028DK 00572360
  610. DIROKL EQU *-DIROK HRC028DK 00572450
  611. DS 0H HRC028DK 00572540
  612. EJECT 00573000
  613. *. 00574000
  614. * 00575000
  615. * SUBROUTINE NAME 00576000
  616. * 00577000
  617. * DMKUDRBV USER DIRECTORY BUILD VIRTUAL LIST 00578000
  618. * 00579000
  619. * FUNCTION 00580000
  620. * 00581000
  621. * TO ALLOW THE DMKDIRCT PROGRAM OR DMKCPINT PROGRAM TO 00582000
  622. * BUILD A LIST OF VIRTUAL PAGE BUFFERS. ONE FOR EACH 00583000
  623. * UDIRBLOK PAGE ON DISK. 00584000
  624. * 00585000
  625. * ATTRIBUTES 00586000
  626. * 00587000
  627. * REENTRANT , PAGEABLE 00588000
  628. * 00589000
  629. * ENTRY POINTS 00590000
  630. * 00591000
  631. * DMKUDRBV USER DIRECTORY BUILD VIRTUAL LIST 00592000
  632. * 00593000
  633. * ENTRY CONDITIONS 00594000
  634. * R0 CONTAINS THE DASD ADDRESS OF THE START OF THE 00595000
  635. * USER DIRECTORY FROM THE VOL1 LABEL ON THE 00596000
  636. * DIRECTORY DEVICE. THE DASD ADDRESS MUST POINT 00597000
  637. * TO THE PROPER DEVICE IN THE OWNED LIST. 00598000
  638. * ON THE DIRECTORY DEVICE. 00599000
  639. * 00600000
  640. * EXIT CONDITIONS 00601000
  641. * 00602000
  642. * CC = 0 LIST BUILT 00603000
  643. * 00604000
  644. * CC = 3 FATAL IO ERROR TRYING TO READ DIRECTORY 00605000
  645. * 00606000
  646. * CALLS TO OTHER ROUTINES 00607000
  647. * 00608000
  648. * DMKFREE - TO GET FREE STORAGE 00609000
  649. * DMKFRET - TO RETURN THE STORAGE 00610000
  650. * DMKRPAGT - GET A PAGE INTO STORAGE 00611000
  651. * DMKPGTVG - GET A VIRTUAL BUFFER 00612000
  652. * DMKLOCKQ - LOCK THE DIRECTORY C' DIRCT ' TO SWAP 00613000
  653. * DMKLOCKD - UNLOCK THE DIRECTORY 00614000
  654. * DMKPGTVR - TO RETURN A VIRTUAL PAGE BUFFER 00615000
  655. * 00616000
  656. * EXTERNAL REFERENCES 00617000
  657. * 00618000
  658. * DMKSYSPL - USER DIRECTORY PAGE LIST 00619000
  659. * DMKSYSUD - POINTER TO THE USER DIRECTORY 00620000
  660. * 00621000
  661. * TABLES / WORK AREAS 00622000
  662. * 00623000
  663. * USER DIRECTORY LIST 00624000
  664. * 00625000
  665. EJECT 00626000
  666. * REGISTER USAGE 00627000
  667. * 00628000
  668. * R4 = POINTER TO OLD LIST 00629000
  669. * R5 = DASD ADD 00630000
  670. * R6 = DISPLACEMENT OF END OF LIST - 4 00631000
  671. * R7 = POINTER TO LIST 00632000
  672. * R8 = DISPLACEMENT INTO LIST 00633000
  673. * R9 = LENGTH OF LIST ( IN DUBBLE WORDS ) 00634000
  674. * R10 = POINTER TO SYSLOCS 00635000
  675. * 00636000
  676. * OPERATION 00637000
  677. * 00638000
  678. * 1. CALL DMKFREE TO GET A PAGE LIST BUFFER. 00639000
  679. * 00640000
  680. * 2. CALL DMKPGTVR TO GET A VIRTUAL PAGE, AND SAVE 00641000
  681. * ITS ADDRESS IN THE LIST. 00642000
  682. * 00643000
  683. * 3. CALL DMKRPAGT TO BRING IN THE PAGE. 00644000
  684. * 00645000
  685. * 4. IF THIS IS THE LAST PAGE CONT. ELSE GO TO STEP 2. 00646000
  686. * 00647000
  687. * 5. CALL DMKLOCKQ TO QUEQE UNTIL THE DIRECTORY IS FREE 00648000
  688. * THEN SWAP PAGE LIST AND CALL DMKLOCKD TO UNLOCK 00649000
  689. * THE USER DIRECTORY. 00650000
  690. * 00651000
  691. * 6. POINT TO OLD LIST. IF NO OLD LIST EXIT CC = 0. 00652000
  692. * 00653000
  693. * 7. CALL DMKRPAGE AND DMKPGTVR TO RETURN PAGES IN LIST. 00654000
  694. * 00655000
  695. * 8. CALL DMKFRET TO RETURN THE LIST. 00656000
  696. * 00657000
  697. * 9. IF THE NEW LIST WAS RETURNED THEN EXIT CC = 1 . 00658000
  698. * 00659000
  699. * 10. POINT TO THE NEW LIST (DMKSYSPL) AND EXIT CC = 0. 00660000
  700. * 00661000
  701. * MESSAGES 00662000
  702. * 00663000
  703. * DMKUDR475I FATAL IO ERROR TRYING TO READ DIRECTORY 00664000
  704. *. 00665000
  705. EJECT 00666000
  706. DMKUDRBV RELOC 00667000
  707. USING UDIRBLOK,R2 00668000
  708. USING SYSLOCS,R10 00669000
  709. L R10,ASYSLC POINT TO SYSLOCS 00670000
  710. LM R6,R9,ZEROES ZERO OUT REGS 00671000
  711. LR R5,R0 SAVE DASD ADD FROM USER 00672000
  712. LA R6,4(,R6) POINT TO END OF LIST - 4 00673000
  713. LOOP1 LA R9,1(,R9) POINT TO LENGTH OF LIST IN DUBBLE WORDS 00674000
  714. LR R0,R9 SET UP TO GET STORAGE 00675000
  715. CALL DMKFREE 00676000
  716. XR R1,R7 * REVERSE POINTERS TO OLD AND 00677000
  717. XR R7,R1 * NEW LIST 00678000
  718. XR R1,R7 * 00679000
  719. LTR R8,R8 IS THIS THE FIRST TIME 00680000
  720. BZ GETVPAGE YES- BRANCH 00681000
  721. CL R8,F256 IS THE BLOCK TO BIG TO MOVE? 00682000
  722. BNH MOVEIT NO- GO DO IT 00683000
  723. ABEND 1 LOOPING (DATA ON DISK BAD OR THE *00684000
  724. DIRECTORY CONTANES OVER 10,816 USERS) 00685000
  725. MOVEIT EX R8,MOVE MOVE THE OLD BLOCK+1 INTO THE NEW BLOCK 00686000
  726. SL R0,F1 SUBTRACT 1 FROM LENGTH COUNT 00687000
  727. CALL DMKFRET 00688000
  728. GETVPAGE CALL DMKPGTVG GET A VIRTUAL BUFFER 00689000
  729. LR R0,R5 POINT TO DASD PAGE 00690000
  730. ST R1,0(R7,R8) SAVE VIRTUAL ADD IN LIST 00691000
  731. O R9,NOADD SET UP END OF LISTING, @VA02223 00692000
  732. * X'FF000000' + SIZE 00693000
  733. ST R9,4(R7,R8) SAVE FLAG AND SIZE @VA02223 00694000
  734. LA R2,BRING+SYSTEM SET UP PARM. 00695000
  735. CALL DMKRPAGT BRING PAGE IN 00696000
  736. BNZ FRETLIST FATAL IO ERROR GO FRET THE BUFFER 00697000
  737. ICM R5,14,UDIRDASD GET THE DASD ADD OF THE NEXT PAGE 'CCR' *00698000
  738. SAVING THE POINTER TO THE PROPER DEVICE *00699000
  739. IN THE OWNED LIST. 00700000
  740. BZ ENDLIST BRANCH IF ZERO ( LAST UDIR PAGE ) 00701000
  741. LA R8,4(,R8) POINT TO NEXT ENTRY IN LIST 00702000
  742. CLR R8,R6 DO I NEED ADDITIONAL STORAGE 00703000
  743. BL GETVPAGE NO- GO BRING PAGE IN 00704000
  744. LA R6,8(,R6) UPDATE POINTER TO END OF LIST 00705000
  745. B LOOP1 YES- GO GET STORAGE FIRST 00706000
  746. ENDLIST LA R1,=CL8' DIRCT' POINT TO USER, @VA02223 00707000
  747. * DIRECTORY LOCK VALUE 00708000
  748. L R4,DMKSYSPL POINT TO OLD LIST 00709000
  749. CALL DMKLOCKQ WAIT FOR THE DIRECTORY TO FREE UP 00710000
  750. ST R7,DMKSYSPL POINT TO THE NEW DIRECTORY 00711000
  751. CALL DMKLOCKD UNLOCK THE USER DIRECTORY 00712000
  752. LTR R7,R4 SET UP TO FRET OLD LIST 00713000
  753. BZ DRCTOK RETURN IF NO OLD LIST HRC028DK 00714490
  754. FRETLIST SR R8,R8 SET DISPLACEMINT TO ZERO 00715000
  755. LOOP2 L R1,0(R8,R7) GET VIRTUAL ADD FROM LIST 00716000
  756. LTR R1,R1 IS IT THE END OF THE LIST 00717000
  757. BM RETLIST YES- GO RETURN STORAGE 00718000
  758. SR R0,R0 SET UP TO ZERO DASD PAGE ADDRESS 00719000
  759. LA R2,SYSTEM SET UP PARM 00720000
  760. CALL DMKRPAGT RETURN REAL PAGE TO THE SYSTEM 00721000
  761. CALL DMKPGTVR RETURN VIRTUAL PAGE ADD 00722000
  762. LA R8,4(,R8) POINT TO NEXT VIRTUAL ADD IN LIST 00723000
  763. B LOOP2 DO IT AGAIN 00724000
  764. RETLIST LH R0,2(R8,R7) GET LENGTH FROM LIST 00725000
  765. LR R1,R7 POINT TO STORAGE TO FRET 00726000
  766. CALL DMKFRET 00727000
  767. CLR R4,R7 DID THE DIRECTORY SWAP 00728000
  768. BNE EXITCC3 NO- RETURN CC = 3 (FATAL IO ERROR) 00729000
  769. MVC DMKSYSUD,SAVER0 SAVE THE POINTER TO THE START X00730000
  770. OF THE USER DIRECTORY 00731000
  771. B DRCTOK YES, NEW DIRECTORY IS ONLINE HRC028DK 00732490
  772. MOVE MVC 0(0,R7),0(R1) MOVE OLD LIST TO NEW LIST 00733000
  773. EJECT 00734000
  774. *. 00735000
  775. * 00736000
  776. * SUBROUTINE NAME 00737000
  777. * 00738000
  778. * DMKUDRDS USER DIRECTORY DYNAMIC SWAP 00739000
  779. * 00740000
  780. * FUNCTION 00741000
  781. * 00742000
  782. * TO ALLOW THE DMKDIRCT PROGRAM TO DYNAMICALLY SWAP 00743000
  783. * THE ACTIVE DIRECTORY TO THE NEWLY CREATED DIRECTORY. 00744000
  784. * 00745000
  785. * ENTRY POINTS 00746000
  786. * 00747000
  787. * DMKUDRDS USER DIRECTORY DYNAMIC SWAP 00748000
  788. * 00749000
  789. * ENTRY CONDITIONS 00750000
  790. * 00751000
  791. * CALLED BY SVC FROM DMKHVC ( X'83XY003C' ) 00752000
  792. * 00753000
  793. * R5 WILL POINT TO THE CALLERS VIRTUAL GP REGISTER 'X' 00754000
  794. * X = GPR CONTAINING THE FIRST 4 BYTES OF THE VOLUME 00755000
  795. * SERIAL NUMBER OF THE USER DIRECTORY VOLUME. 00756000
  796. * 00757000
  797. * R6 WILL POINT TO THE CALLERS VIRTUAL GP REGISTER 'Y' 00758000
  798. * Y = GPR CONTAINING THE LAST 2 BYTES OF THE SAME 00759000
  799. * VOLUME SERIAL NUMBER. 00760000
  800. * 00761000
  801. * 00762000
  802. * EXIT CONDITIONS 00763000
  803. * 00764000
  804. * CC = 0 LIST BUILT 00765000
  805. * 00766000
  806. * CC = 2 INVALID VOLUME SPECIFIED BY THE CALLER 00767000
  807. * 00768000
  808. * CC = 3 FATAL IO ERROR TRYING TO READ DIRECTORY 00769000
  809. * 00770000
  810. * CALLS TO OTHER ROUTINES 00771000
  811. * 00772000
  812. * DMKFREE - GET FREE STORAGE 00773000
  813. * DMKFRET - TO RETURN FREE STORAGE 00774000
  814. * DMKIOSQR - TO READ THE DIRECTORY VOLUME 00775000
  815. * DMKDSPCH - TO WAIT 00776000
  816. * DMKUDRBV - TO BUILD A VIRTUAL PAGE LIST 00777000
  817. * DMKQCNWT - TO WRITE ERROR MSG 00778000
  818. * 00779000
  819. * EXTERNAL REFERENCES 00780000
  820. * 00781000
  821. * DMKSYSOW - OWNED LIST 00782000
  822. * DMKSYSOC - OWNED LIST COUNT 00783000
  823. * DMKSYSUD - POINTER TO THE USER DIRECTORY 00784000
  824. * 00785000
  825. * TABLES / WORK AREAS 00786000
  826. * 00787000
  827. * USER DIRECTORY LIST 00788000
  828. * OWND LIST 00789000
  829. * 00790000
  830. * REGISTER USAGE 00791000
  831. * 00792000
  832. * R0 - R4 = WORK 00793000
  833. * R5 = THE VOLUME SERIAL NUMBER FROM THE CALLER (4 BYTES) 00794000
  834. * R6 = THE VOLUME SERIAL NUMBER FROM THE CALLER (2 BYTES) 00795000
  835. * R8 = POINTER TO THE RDEVBLOK OF THE DIRECTORY VOL 00796000
  836. * R9 = DISPLACEMENT INTO THE OWNDLIST OF THE DIRECTORY VOL 00797000
  837. * R10 = POINTER TO OWNDLIST AND IOBLOK 00798000
  838. * R14 - R15 = WORK 00799000
  839. * 00800000
  840. * OPERATION 00801000
  841. * 00802000
  842. * 1. SET CALLERS VMPSW CC TO 0 AND ZERO DMKHVC'S REG2. 00803000
  843. * 00804000
  844. * 2. SCAN THE OWNDLIST FOR THE VOLUME PASSED BY THE 00805000
  845. * CALLER. IF NOT FOUND OR MOUNTED RETURN CC = 2. 00806000
  846. * 00807000
  847. * 3. CALL DMKFREE TO GET A BUFFER FOR THE 00808000
  848. * IOB+CCW'S+DATA AND FILL IT IN. 00809000
  849. * 00810000
  850. * 4. CALL DMKIOSRQ TO READ THE VOL1 AND ALLOCATION 00811000
  851. * RECORDS (R3 AND R4) AND GO TO DMKDSPCH. 00812000
  852. * 00813000
  853. * 5. CHECK TO SEE IF THIS IS A VALID DIRECTORY VOLUME. 00814000
  854. * IF NOT EXIT CC = 2. 00815000
  855. * 00816000
  856. * 6. CALL DMKUDRBV TO BUILD A VIRTUAL LIST OF UDIRBLOK'S. 00817000
  857. * 00818000
  858. * 7. SET CC RETURNED BY DMKUDRBV INTO CALLERS VMPSW 00819000
  859. * AND EXIT USING THE SAME CC. 00820000
  860. * 00821000
  861. * MESSAGES 00822000
  862. * 00823000
  863. * DMKUDR475I FATAL IO ERROR TRYING TO READ DIRECTORY 00824000
  864. *. 00825000
  865. EJECT 00826000
  866. DMKUDRDS RELOC 00827000
  867. USING OWNDLIST,R10 00828000
  868. MVC SAVER2,ZEROES ZERO OUT THE RETURN REG TO DMKHVC 00829000
  869. NI VMPSW+4,X'CF' SET THE VIRTUAL MACHINE STANDARD PSW'S *00830000
  870. CONDITION CODE TO ZERO 00831000
  871. NI VMPSW+2,X'CF' CLEAR EC-MODE CC AS WELL. @VA03299 00832000
  872. L R5,0(,R5) * GET THE VOL SER NO FROM THE REG'S 00833000
  873. L R6,0(,R6) * PROVIDED BY THE USER. 00834000
  874. L R10,=A(DMKSYSOW) GET THE POINT TO THE OWNED LIST 00835000
  875. L R9,=A(DMKSYSOC) GET POINTER TO THE OWNDLIST COUNT 00836000
  876. L R9,0(,R9) AND PICK UP THE COUNT 00837000
  877. LR R8,R9 SAVE THE COUNT 00838000
  878. NEXT CL R5,OWNDVSER IS THIS THE VSN THE DIRECTORY IS ON 00839000
  879. BE TESTR6 YES- GO TEST THE NEXT REG 00840000
  880. POINTOL LA R10,8(,R10) POINT TO THE NEXT BLOCK 00841000
  881. BCT R8,NEXT GO TEST THE NEXT BLOCK 00842000
  882. B SETCC2 NOT FOUND SET CC = 2 AND RETURN TO CALLER 00843000
  883. TESTR6 CLM R6,12,OWNDVSER+4 IS THIS THE VOL 00844000
  884. BNE POINTOL NO- GO POINT TO THE NEXT BLOCK 00845000
  885. SR R9,R8 GET THE DISP IN THE OWNDLIST OF THIS X00846000
  886. BLOCK (NUMBER OF BLOCKS INTO THE LIST) 00847000
  887. LH R8,OWNDRDEV GET THE POINTER TO THE REAL DEV 00848000
  888. LTR R8,R8 IS IT MOUNTED 00849000
  889. BM SETCC2 NO- RETURN TO THE CALLER CC = 2 00850000
  890. SLL R8,3(0) CONVERT TO BYTE INDEX @V200820 00851000
  891. A R8,ARIODV POINT TO THE REAL DEV BLOCK 00852000
  892. LA R0,IOBSIZE+6+10+128 GET A BUFFER FOR THE IOB+CCW'S+DATA 00853000
  893. CALL DMKFREE 00854000
  894. LR R10,R1 POINT TO THE IOB IN FREE ST. 00855000
  895. DROP R10 00856000
  896. USING IOBLOK,R10 00857000
  897. XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR THE BLOCK 00858000
  898. MVI IOBFLAG,IOBCP SET UP THE CP IO FLAG 00859000
  899. LA R1,(IOBSIZE+1)*8(,R10) POINT TO THE FIRST CCW 00860000
  900. ST R1,IOBCAW AND SAVE THE ADD IN THE IOB 00861000
  901. LA R1,IORETURN SET UP THE RETURN ADD 00862000
  902. ST R1,IOBIRA AND SAVE IT 00863000
  903. ST R11,IOBUSER POINT TO THE USER 00864000
  904. ST R13,IOBMISC SAVE THE SAVE AREA ADD 00865000
  905. ST R9,IOBMISC2 SAVE THE POINTER TO THE OWNED LIST ALSO 00866000
  906. MVC IOBSIZE*8(8,R10),CHANPROG MOVE IN THE BB CC HH RR 00867000
  907. LM R14,R7,CCW1 * RELOCATE THE CCW STRING 00868000
  908. ALR R14,R10 * AND SAVE IT IN THE FREE 00869000
  909. ALR R0,R10 * ST. BLOCK AFTER THE IOB 00870000
  910. ALR R2,R10 * 00871000
  911. ALR R4,R10 * 00872000
  912. ALR R6,R10 * 00873000
  913. STM R14,R7,(IOBSIZE+1)*8(R10) 00874000
  914. CALL DMKIOSQR 00875000
  915. GOTO DMKDSPCH WAIT FOR IO TO COMPLETE 00876000
  916. IORETURN EQU * RETURN POINT FROM IOS 00877000
  917. USING *,R12 TEMP ADDRESSABILITY 00878000
  918. S R12,=A(IORETURN-DMKUDR) RESTORE BASE ADDRESS 00879000
  919. USING DMKUDR,R12 00880000
  920. L R13,IOBMISC RESTORE ADD OF SAVE AREA 00881000
  921. L R9,IOBMISC2 GET THE POINTER TO THE OWNED LIST 00882000
  922. L R11,IOBUSER POINT TO THE USER 00883000
  923. TM IOBSTAT,IOBFATAL DID I HAVE AN ERROR 00884000
  924. BO FRETCC3 YES- FRET IOB AND RETURN CC 3 TO CALLER 00885000
  925. ICM R9,14,((IOBSIZE+6)*8)+52(R10) INSERT THE DASD ADD (CCR-) 00886000
  926. BNP FRETCC2 RETURN TO THE CALLER IF THE POINTER TO X00887000
  927. DIRECTORY IS ZERO OR MINUS X00888000
  928. (THE USER DIRECTORY POINTER IS NOT VALID) 00889000
  929. LH R2,((IOBSIZE+6)*8)+52(,R10) GET THE CYLINDER NUMBER 00890000
  930. CH R2,=H'1024' IS IT LARGER THAN THE ALLOCATION TABLE 00891000
  931. BH FRETCC2 NO- FRET THE IOB AND RETURN CC = 2 00892000
  932. LA R1,(IOBSIZE+6+10)*8(R2,R10) ADD THE LOCATION OF *00893000
  933. THE ALLOCATION TABLE TO THE *00894000
  934. CYLINDER LOCATION 00895000
  935. CLI 0(R1),X'0C' IS THIS AN ALLOCATED DIRECTORY CYLINDER 00896000
  936. BNE FRETCC2 NO- RETURN TO THE CALLER CC = 2 00897000
  937. BAL R5,FRETIOB RETURN THE IOBLOK TO SYSTEM 00898000
  938. DROP R10 00899000
  939. USING SYSLOCS,R10 00900000
  940. L R10,ASYSLC POINT TO THE SYSLOCS TABLE 00901000
  941. CL R9,DMKSYSUD IS THIS DIRECTORY IN USE BY THE SYSTEM? 00902000
  942. BE SETCC2 YES- RETURN TO THE CALLER CC = 2. THIS *00903000
  943. USER IS UPDATING A VIRTUAL DIRECTORY. 00904000
  944. LR R0,R9 POINT TO THE PAGE ON DISK (CCRD) 00905000
  945. CALL DMKUDRBV GO BUILD A LIST OF PAGE BUFFERS X00906000
  946. FOR THE NEW USER DIRECTORY 00907000
  947. BC 1,SETCC3 SET CC = 3 AND RETURN TO THE CALLER 00908000
  948. SETCC0 B EXITCC0 RETURN CC = 0 TO CALLER 00909000
  949. SETCC1 LA R2,X'10' INDICATE COND CODE = 1. @VA03299 00910000
  950. BAL R5,SETALLCC USE CODE INDICATOR TO SET THE CC.@VA03299 00911000
  951. B EXITCC1 RETURN TO CALLER 00912000
  952. FRETCC2 BAL R5,FRETIOB RETURN THE IOBLOK TO SYSTEM 00913000
  953. SETCC2 LA R2,X'20' INDICATE COND CODE = 2. @VA03299 00914000
  954. BAL R5,SETALLCC USE CODE INDICATOR TO SET THE CC.@VA03299 00915000
  955. B EXITCC2 RETURN TO CALLER 00916000
  956. FRETCC3 BAL R5,FRETIOB RETURN THE IOBLOK TO SYSTEM 00917000
  957. SETCC3 LA R2,X'30' INDICATE COND CODE = 3. @VA03299 00918000
  958. BAL R5,SETALLCC USE CODE INDICATOR TO SET THE CC.@VA03299 00919000
  959. B EXITCC3 RETURN TO CALLER @VA03299 00920000
  960. SPACE 1 00921000
  961. SETALLCC LA R1,VMPSW+4 ASSUME A BC MODE PSW IS CORRECT @VA03299 00922000
  962. TM VMESTAT,VMEXTCM IS THIS AN ECMODE MACHINE? @VA03299 00923000
  963. BZ SET12OR3 NO, PSW INDEX IS ALREADY CORRECT @VA03299 00924000
  964. LA R1,VMPSW+2 GET PROPER OFFSET FOR EC-MODE PSW@VA03299 00925000
  965. SET12OR3 EX R2,CCSETTER SET CONDITION CODE IN VMPSW @VA03299 00926000
  966. BR R5 RETURN TO CALLER @VA03299 00927000
  967. SPACE 1 00928000
  968. CCSETTER OI 0(R1),*-* EXECUTED CONDITION CODE SETTER @VA03299 00929000
  969. SPACE 00930000
  970. FRETIOB LA R0,IOBSIZE+6+10+128 SET UP SIZE OF IOB+CCW'S+DATA 00931000
  971. LR R1,R10 POINT AT ST TO FRET 00932000
  972. CALL DMKFRET 00933000
  973. BR R5 RETURN TO THE CALLER 00934000
  974. SPACE 2 00935000
  975. DS 0D 00936000
  976. CHANPROG DC X'0000000000000300' 00937000
  977. CCW1 CCW 07,IOBSIZE*8,CC+SILI,6 SEEK TO REC 3 (THE CP VOL1 REC) 00938000
  978. CCW2 CCW 49,(IOBSIZE*8)+2,CC+SILI,5 SEARCH FOR REC NO 3 00939000
  979. CCW3 CCW 08,(IOBSIZE+2)*8,0,0 TIC - 8 00940000
  980. CCW4 CCW 06,(IOBSIZE+6)*8,CC+SILI,80 READ IN THE VOL1 REC 00941000
  981. CCW5 CCW 06,(IOBSIZE+6+10)*8,SILI,1024 READ IN THE ALLOCATION REC 00942000
  982. SPACE 2 00943000
  983. MASK DC XL8'AAAAAAAAAAAAAAAA' THE MASK FOR THE USER DIRECTORY 00944000
  984. SPACE 2 00945000
  985. LTORG 00946000
  986. SPACE 2 00947000
  987. USER DSECT 00948000
  988. CNOP 2,4 00949000
  989. USERDISP DS 1H 00950000
  990. USERDASD DS 1F 00951000
  991. EJECT 00952000
  992. COPY EQU 00954000
  993. COPY SAVE 00955000
  994. COPY VMBLOK 00956000
  995. COPY UDIRECT 00957000
  996. SYSLOCS 00958000
  997. PSA 00959000
  998. COPY ALLOC @V306638 00960000
  999. COPY IOBLOKS 00961000
  1000. END DMKUDR 00962000
ibm/vm370-lib/cp/dmkudr.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator