User Tools

Site Tools


ibm:vm370-lib:cms:dmslad.assemble_src

DMSLAD Source

References

Source Listing

DMSLAD.ASSEMBLE.txt
  1. LAD TITLE 'DMSLAD (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * MODULE NAME: 00004000
  5. * 00005000
  6. * DMSLAD 00006000
  7. * 00007000
  8. * CONTENTS: 00008000
  9. * 00009000
  10. * DMSLADP 00010000
  11. * DMSLADN 00011000
  12. * DMSLADW 00012000
  13. * 00013000
  14. * SUBROUTINE NAME: 00014000
  15. * 00015000
  16. * DMSLADP (ADTLKP) 00016000
  17. * 00017000
  18. * FUNCTION: 00018000
  19. * 00019000
  20. * FIND THE ACTIVE DISK TABLE BLOCK WHOSE MODE MATCHES 00020000
  21. * THE ONE SUPPLIED BY THE CALLER. 00021000
  22. * 00022000
  23. * ATTRIBUTES: 00023000
  24. * 00024000
  25. * NUCLEUS RESIDENT, REENTRANT 00025000
  26. * 00026000
  27. * ENTRY POINTS: 00027000
  28. * 00028000
  29. * DMSLAD 00029000
  30. * 00030000
  31. * L R15,AADTLKP WHERE AADTLKP=V(DMSLAD) 00031000
  32. * BALR R14,15 00032000
  33. * 00033000
  34. * R1 MUST POINT TO PARAMETER LIST AS USUAL: 00034000
  35. * DS OF 00035000
  36. * PLIST DC CL24' ' IMMATERIAL 00036000
  37. * DC CL2' ' MODE LETTER 00037000
  38. * 00038000
  39. * EXIT CONDITIONS: 00039000
  40. * 00040000
  41. * ______ ____ _____ _____ _____ 00041000
  42. * ACTIVE_DISK_TABLE_BLOCK_FOUND 00042000
  43. * R1 =ADDRESS OF MATCHIN ACTIVE DISK TABLE BLOCK 00043000
  44. * R15=0 (AND CONDITION-CODE = 0) 00044000
  45. * ______ ____ _____ _____ ___ _____ 00045000
  46. * ACTIVE_DISK_TABLE_BLOCK_NOT_FOUND 00046000
  47. * R1 SAME AS AT ENTRY 00047000
  48. * R15=1 (AND CONDITION-CODE =2) 00048000
  49. * 00049000
  50. * CALLS TO OTHER ROUTINES: 00050000
  51. * 00051000
  52. * NONE 00052000
  53. * 00053000
  54. * EXTERNAL REFERENCES: 00054000
  55. * 00055000
  56. * ADTSECT 00056000
  57. * 00057000
  58. * TABLES/WORKAREAS 00058000
  59. * 00059000
  60. * ADTFVS WORK STORAGE 00060000
  61. * ADTSECT 00061000
  62. * 00062000
  63. * REGISTER USAGE: 00063000
  64. * 00064000
  65. * R15 ADTFVS AREA 00065000
  66. * R9 BASE 00066000
  67. * R10 ADTSECT 00067000
  68. * R1,14 WORK 00068000
  69. * 00069000
  70. * OPERATION: 00070000
  71. * 00071000
  72. * DMSLAD SEARCHES THROUGH THE ACTIVE DISK TABLE 00072000
  73. * STARTING AT IADT TO FIND 00073000
  74. * AN ADT BLOCK WHOSE MODE-LETTER, IS GIVEN BY ADTM, 00074000
  75. * MATCHES THAT OF THE CALLER. IF A MATCHING ADT BLOCK 00075000
  76. * IS FOUND, ITS ADDRESS IS RETURNED IN R1 AS INDICATED 00076000
  77. * ABOVE. IF NOT, AN ERROR-RETURN IS GIVEN. IN EITHER 00077000
  78. * EVENT, THE CONDITION-CODE IS SET PER R15, FOR 00078000
  79. * CONVENIENCE OF THE CALLER (WHO CAN OMIT THE USUAL LTR 00079000
  80. * INSTRUCTION BEFORE CHECKING THE RETURN-CODE). 00080000
  81. * 00081000
  82. * DMSLAD IS CALLED BY MANY PROGRAMS AND FUNCTIONS TO 00082000
  83. * DETERMINE THE 00083000
  84. * ADDRESS OF THE ACTIVE DISK TABLE PERTAINING TO A 00084000
  85. * GIVEN DISK. 00085000
  86. * 00086000
  87. * SUBROUTINE NAME: 00087000
  88. * 00088000
  89. * DMSLADNX (ADTNXT) 00089000
  90. * 00090000
  91. * FUNCTION: 00091000
  92. * 00092000
  93. * FIND THE NEXT (OR FIRST) ADT BLOCK IN THE ACTIVE DISK 00093000
  94. * TABLE. 00094000
  95. * 00095000
  96. * ATTRIBUTES: 00096000
  97. * 00097000
  98. * NUCLEUS RESIDENT, REENTRANT 00098000
  99. * 00099000
  100. * ENTRY POINTS: 00100000
  101. * 00101000
  102. * DMSLADN 00102000
  103. * 00103000
  104. * ENTRY CONDITIONS: 00104000
  105. * 00105000
  106. * L R15,AADTNXT WHERE AADTNXT = V(ADTNXT) 00106000
  107. * BALR R14,R15 00107000
  108. * 00108000
  109. * R1=0: FIND FIRST ACTIVE DISK TABLE BLOCK 00109000
  110. * OR 00110000
  111. * R1=NONZERO: GIVEN PRESENT ACTIVE DISK TABLE BLOCK, 00111000
  112. * FIND NEXT ADT BLOCK (IF ANY) 00112000
  113. * 00113000
  114. * EXIT CONDITIONS: 00114000
  115. * 00115000
  116. * ______ ____ _____ _____ _____ 00116000
  117. * ACTIVE_DISK_TABLE_BLOCK_FOUND 00117000
  118. * R1 =ADDRESS OF MATCHING ACTIVE DISK TABLE BLOCK 00118000
  119. * R15=0 (AND CONDITION-CODE=0) 00119000
  120. * 00120000
  121. * ______ ____ _____ _____ ___ _____ (____ ____) 00121000
  122. * ACTIVE DISK TABLE BLOCK NOT FOUND _NONE_LEFT_ 00122000
  123. * R1 =0 00123000
  124. * R15=1 (AND CONDITION-CODE=2) 00124000
  125. * 00125000
  126. * CALLS TO OTHER ROUTINES: 00126000
  127. * 00127000
  128. * NONE 00128000
  129. * 00129000
  130. * EXTERNAL REFERENCES: 00130000
  131. * 00131000
  132. * ADTSECT, FVSECT 00132000
  133. * 00133000
  134. * TABLES/WORKAREAS 00134000
  135. * 00135000
  136. * NONE 00136000
  137. * 00137000
  138. * REGISTER USAGE: 00138000
  139. * 00139000
  140. * R12 BASE 00140000
  141. * R13 FVSECT 00141000
  142. * R1 ADTSECT 00142000
  143. * REST WORK 00143000
  144. * 00144000
  145. * OPERATION: 00145000
  146. * 00146000
  147. * IF R1=0 AT ENTRY, THE ADDRESS OF THE FIRST ACTIVE 00147000
  148. * DISK TABLE BLOCK AT IADT IS RETURNED. 00148000
  149. * 00149000
  150. * IF R1=NONZERO AT ENTRY, THE GIVEN VALUE IN R1 IS 00150000
  151. * TAKEN AS THE ADDRESS OF THE PRESENT ADT BLOCK, AND 00151000
  152. * THE POINTER TO THE NEXT ADT BLOCK (IF ANY) IS LOADED 00152000
  153. * INTO R1. IF THERE IS NO ADT BLOCK LEFT, ERROR CODE 1 00153000
  154. * IS GIVEN IN R15 AS SHOWN UNDER EXIT CONDTIONS ABOVE. 00154000
  155. * 00155000
  156. * IN ANY EVENT, NO CHECK IS MADE WHETHER ANY DISK IS 00156000
  157. * CURRENTLY LOGGED IN FOR THE DISK TABLE RETURNED 00157000
  158. * (THESE CHECKS BEING PERFORMED BY THE CALLER). 00158000
  159. * 00159000
  160. * DMSLADN IS USED BY VARIOUS ROUTINES AND COMMANDS FOR 00160000
  161. * SCANNING THROUGH 00161000
  162. * THE CHAIN OF ACTIVE DISKS FOR CONDITIONS TO BE 00162000
  163. * SATISFIED, FOR EXAMPLE 00163000
  164. * DMSLST AND DMSSTT. DMSLADN IS ALSO USED BY DMSLFS TO 00164000
  165. * CHECK FOR A DISK 00165000
  166. * WHICH MAY B EREAD-ONLY EXTENSION OF ANOTHER. 00166000
  167. * 00167000
  168. * ____: DMSLADN IS AN ENTRY-POINT IN THE DMSLAD 00168000
  169. * NOTE 00169000
  170. * ROUTINE. 00170000
  171. * 00171000
  172. * SUBROUTINE NAME: 00172000
  173. * 00173000
  174. * DMSLADW (ADTLKW) 00174000
  175. * 00175000
  176. * FUNCTION: 00176000
  177. * 00177000
  178. * FIND READ/WRITE DISK ACCORDING TO INPUT PARAMETER. 00178000
  179. * 00179000
  180. * ENTRY POINT: 00180000
  181. * 00181000
  182. * DMSLADW (ADTLKW) 00182000
  183. * 00183000
  184. * ENTRY CONDITIONS: 00184000
  185. * 00185000
  186. * 24(GPR1) = MODE LETTER 00186000
  187. * 00187000
  188. * 24(GPR1) = X 00188000
  189. * GPR0 = 0: START SEARCH A FIRST R/W DISK (A(ADT): 00189000
  190. * RESUME SEARCH AT NEXT ADT BLOCK 00190000
  191. * 00191000
  192. * 24(GPR1) = ? 00192000
  193. * GPR0 = NUMBER OF 800 BYTE DATA BLOCKS TO BE WRITTEN 00193000
  194. * 00194000
  195. * 24(GPR1) = ??: SEARCH FOR R/W DISK WITH THE MOST ROOM 00195000
  196. * 00196000
  197. * EXIT CONDITIONS: 00197000
  198. * 00198000
  199. * NORMAL - 00199000
  200. * GPR15 = 0 00200000
  201. * GPR0 = NUMBER OF 800 BYTE RECORDS LEFT ON DISK 00201000
  202. * GPR1 = A(ADT BLOCK FOR THIS DISK) 00202000
  203. * 00203000
  204. * ERROR - 00204000
  205. * GPR15 = 1 AND CONDITION CODE = 2: 00205000
  206. * ENTRY CONDITIONS NOT MET 00206000
  207. * 00207000
  208. * CALLS TO OTHER ROUTINES: 00208000
  209. * 00209000
  210. * NONE 00210000
  211. * 00211000
  212. * EXTERNAL REFERENCES: 00212000
  213. * 00213000
  214. * ADTSECT 00214000
  215. * FVSECT 00215000
  216. * 00216000
  217. * TABLES/WORKAREAS: 00217000
  218. * 00218000
  219. * SEE EXTERNAL REFERENCES 00219000
  220. * 00220000
  221. * REGISTER USAGE: 00221000
  222. * 00222000
  223. * GPR12 = BASE REGISTER 00223000
  224. * GPR13 = A(FVS) 00224000
  225. * GPR1 = A(ADT BLOCK FOUND) 00225000
  226. * 00226000
  227. * NOTES: 00227000
  228. * 00228000
  229. * NONE 00229000
  230. * 00230000
  231. * OPERATION: 00231000
  232. * 00232000
  233. * 1. CHECK TO MAKE SURE THE MODE LETTER IS VALID, I.E. 00233000
  234. * A-Z, *, ?, ?? 00234000
  235. * 00235000
  236. * 2. IF THE MODE LETTER = *, GO TO 10. IF IT EQUALS ?, 00236000
  237. * GO TO 20. IF IT'S ??, GO TO 30. 00237000
  238. * 00238000
  239. * 3. BRANCH TO DMSLAD TO FIND THE DESIRED DISK. 00239000
  240. * 00240000
  241. * 4. UPON RETURN, IF CONDITION CODE = 7, EXIT WITH 00241000
  242. * RETURN CODE = 1 AND CONDITION CODE = 2. 00242000
  243. * 00243000
  244. * 5. ELSE REFERENCE THE ADT BLOCK FOUND AND CHECK 00244000
  245. * ADTFLG1 FOR THE WRITE BIT ON. 00245000
  246. * 00246000
  247. * 00247000
  248. * 00248000
  249. * 00249000
  250. * 00250000
  251. * 00251000
  252. * 00252000
  253. * 00253000
  254. * 00254000
  255. * 00255000
  256. * 00256000
  257. * 00257000
  258. * 00258000
  259. * 6. IF IT'S NOT ON, EXIT AS IN #3. 00259000
  260. * 00260000
  261. * 7. ELSE COMPUTE THE NUMBER OF 800 BYTE RECORDS LEFT 00261000
  262. * AND PUT IT IN GPR0. 00262000
  263. * 00263000
  264. * 8. RESTORE THE REGISTERS, SET THE RETURN CODE TO 0, 00264000
  265. * AND EXIT. 00265000
  266. * 00266000
  267. * 10. CALL DMSLADNX AND CHECK THE R/W FLAG. IF IT'S ON, 00267000
  268. * GO TO 7. IF NOT, CONTINUE WITH 10. 00268000
  269. * 00269000
  270. * 20. CALL DMSLADNX AND COMPUTE THE NUMBER OF 800 BYTE 00270000
  271. * RECORDS AVAILABLE. IF THERE ARE ENOUGH, SAVE THE 00271000
  272. * VALUE IN GPR) AND GO TO 8. IF NOT, CONTINUE WITH 00272000
  273. * 20. 00273000
  274. * 00274000
  275. * 30. CALL DMSLADNX AND COMPUTE THE NUMBER OF 800 BYTE 00275000
  276. * RECORDS AVAILABLE. COMPARE THIS VALUE AGAINST 00276000
  277. * THAT COMPUTED THE LAST TIME THROUGH. IF IT IS 00277000
  278. * GREATER, SAVE IT, AND THE DISK IT BELONGED TO. 00278000
  279. * CONTINE WITH 30 UNTIL CHECKED EVER DSIK IN THE ADT 00279000
  280. * CHAIN. WHEN FINISHED, CHECK THE SAVED VALUES, IF 00280000
  281. * NOTHING EXIT AS IN #3. ELSE LOAD GPR0, GPR1 WITH 00281000
  282. * THE SAVED VALUES AND GO TO 8. 00282000
  283. * 00283000
  284. * SUBROUTINE NAME: V0742 00284000
  285. * V0742 00285000
  286. * DMSLADAD V0742 00286000
  287. * V0742 00287000
  288. * FUNCTION: V0742 00288000
  289. * V0742 00289000
  290. * TO MODIFY THE FILE STATUS TABLE CHAIN TO INCLUDE AN V0742 00290000
  291. * AUXILIARY DIRECTORY, OR TO CLEAR THE AUXILIARY DIRECTORY V0742 00291000
  292. * FROM THE CHAIN. V0742 00292000
  293. * V0742 00293000
  294. * ATTRIBUTES: V0742 00294000
  295. * V0742 00295000
  296. * NUCLEUS RESIDENT, REENTRANT V0742 00296000
  297. * V0742 00297000
  298. * ENTRY POINT: V0742 00298000
  299. * V0742 00299000
  300. * DMSLADAD V0742 00300000
  301. * V0742 00301000
  302. * ENTRY CONDITIONS: V0742 00302000
  303. * V0742 00303000
  304. * L R1,PLIST SET PLIST ADDRESS V0742 00304000
  305. * SVC 202 V0742 00305000
  306. * V0742 00306000
  307. * R1 POINTS TO A PARAMETER LIST OF THE FOLLOWING FORMAT: V0742 00307000
  308. * V0742 00308000
  309. * DS 0F V0742 00309000
  310. * PLIST DC CL8'DMSLADAD' V0742 00310000
  311. * AUXDIRT DC A(AUXILIARY DIRECTORY) V0742 00311000
  312. * DC F'0' V0742 00312000
  313. * OR V0742 00313000
  314. * DC X'80',AL3(AUX. DIRT. NUCLEUS COPY ADDR.) V0742 00314000
  315. * V0742 00315000
  316. * EXIT CONDITIONS: V0742 00316000
  317. * V0742 00317000
  318. * R15 = 0 ADT FOR DISK CONTAINING THE AUXILIARY DIRECTORY V0742 00318000
  319. * AS SPECIFIED AT DIRECTORY GENERATION TIME VIA V0742 00319000
  320. * GENDIRT, WAS FOUND AND THE FILE STATUS TABLE V0742 00320000
  321. * CHAIN WAS MODIFIED TO INCLUDE THE AUXILIARY V0742 00321000
  322. * DIRECTORY; OR THE FILE STATUS TABLE CHAIN V0742 00322000
  323. * PREVIOUSLY MODIFIED HAS BEEN RESTORED BY V0742 00323000
  324. * REMOVING THE AUXILIARY DIRECTORY. V0742 00324000
  325. * V0742 00325000
  326. * R15 = 1 AUXILIARY DIRECTORY ADDRESS NOT SPECIFIED IN V0742 00326000
  327. * THE PLIST, OR NO DISK HAS BEEN ACCESSED AS THE V0742 00327000
  328. * MODE SPECIFIED AT DIRECTORY GENERATION TIME. V0742 00328000
  329. * CONDITION CODE = 2. V0742 00329000
  330. * V0742 00330000
  331. * R15 = 2 CALL TO RESET THE FILE STATUS TABLE CHAIN (LAST V0742 00331000
  332. * WORD OF PLIST HAS HIGH ORDER BYTE = X'80') DID V0742 00332000
  333. * NOT SPECIFY THE ADDRESS OF THE NUCLEUS COPY OF V0742 00333000
  334. * THE AUXILIARY DIRECTORY. THE HIGH ORDER BYTE V0742 00334000
  335. * IS SET TO X'80' AND THE ADDRESS OF THE NUCLEUS V0742 00335000
  336. * COPY ARE STORED INTO THE LAST WORD OF THE PLIST V0742 00336000
  337. * WHEN DMSLADAD IS CALLED TO SET THE AUXILIARY V0742 00337000
  338. * DIRECTORY INTO THE FILE STATUS TABLE CHAIN. V0742 00338000
  339. * CONDITION CODE = 2. V0742 00339000
  340. * V0742 00340000
  341. * CALLS TO OTHER ROUTINES: V0742 00341000
  342. * V0742 00342000
  343. * DMSFREE, DMSFRET V0742 00343000
  344. * V0742 00344000
  345. * EXTERNAL REFERENCES: V0742 00345000
  346. * V0742 00346000
  347. * FSTD, ADTSECT, NUCON V0742 00347000
  348. * V0742 00348000
  349. * TABLES/WORKARES: V0742 00349000
  350. * V0742 00350000
  351. * NONE V0742 00351000
  352. * V0742 00352000
  353. * REGISTER USAGE: V0742 00353000
  354. * V0742 00354000
  355. * R0 NUCON BASE V0742 00355000
  356. * R1 INPUT PLIST AND ADTSECT BASE V0742 00356000
  357. * R2 INPUT PLIST V0742 00357000
  358. * R3 FSTD BASE V0742 00358000
  359. * R4-R9 WORK REGISTERS V0742 00359000
  360. * R10 LINKAGE V0742 00360000
  361. * R11 WORK REGISTERS V0742 00361000
  362. * R12 BASE V0742 00362000
  363. * R13 WORK REGISTERS V0742 00363000
  364. * R14 LINKAGE V0742 00364000
  365. * R15 RETURN CODE V0742 00365000
  366. * V0742 00366000
  367. * OPERATION: V0742 00367000
  368. * V0742 00368000
  369. * TO SET AUXILIARY DIRECTORY INTO FILE STATUES CHAIN, V0742 00369000
  370. * (LAST WORD OF PLIST ZERO): V0742 00370000
  371. * V0742 00371000
  372. * THE PLIST IS CHECKED TO VERIFY THAT AN AUX. DIRT. ADDR. V0742 00372000
  373. * WAS SPECIFIED, IF NOT, RETURN WITH R15 = 1 AND CONDITION V0742 00373000
  374. * CODE = 2. V0742 00374000
  375. * V0742 00375000
  376. * THE SIZE OF THE AUX. DIRT. IS DETERMAINED AND DMSFREE IS V0742 00376000
  377. * CALLED TO GET THAT AMOUNT OF NUCLEUS FREE STORAGE. V0742 00377000
  378. * V0742 00378000
  379. * THE AUX. DIRT. IS THEN COPIED TO THE GOTTON STORAGE. V0742 00379000
  380. * V0742 00380000
  381. * THE INPUT PLIST IS THEN MODIFIED BY SETTING THE HIGH V0742 00381000
  382. * ORDER BYTE TO X'80', AND STORING THE ADDRESS OF THE V0742 00382000
  383. * NUCLEUS COPY INTO THE LOW ORDER THREE BYTES. V0742 00383000
  384. * V0742 00384000
  385. * ADTLKP IS THEN CALLED TO CHECK IF THE DISK MODE V0742 00385000
  386. * SPECIFIED AT DIRECTORY GENERATION TIME IS ACCESSED. V0742 00386000
  387. * IF NOT RETURN WITH REGISTER 15 = 1 AND CONDITION V0742 00387000
  388. * CODE = 2. V0742 00388000
  389. * V0742 00389000
  390. * THE FILE STATUS TABLE CHAIN IS THEN MODIFIED SO THAT V0742 00390000
  391. * THE AUXILIARY DIRECTORY IS SEARCHED BEFORE THE MAIN V0742 00391000
  392. * DIRECTORY FOR THE DISK. V0742 00392000
  393. * V0742 00393000
  394. * V0742 00394000
  395. * TO RESET THE FILE STATUS TABLE CHAIN, V0742 00395000
  396. * (LAST WORD OF THE PLIST HIGH ORDER BYTE = X'80' V0742 00396000
  397. * AND THE LOW ORDER THREE BYTES = ADDR. NUCLEUS COPY): V0742 00397000
  398. * V0742 00398000
  399. * IF THE LAST WORD OF THE PLIST DOES NOT CONTAIN AN ADDRESSV0742 00399000
  400. * RETURN WITH REGISTER 15 = 2 AND CONDITION CODE = 2. V0742 00400000
  401. * V0742 00401000
  402. * ADTLKP IS CALLED TO CHECK THAT A DISK IS ACCESSED AS THE V0742 00402000
  403. * MODE SPECIFIED IN THE AUX. DIRT. V0742 00403000
  404. * IF NOT, CALL DMSFRET TO FREE THE NUCLEUS COPY AND RETURN V0742 00404000
  405. * WITH REGISTER 15 = 1 AND CONDITION CODE = 2. V0742 00405000
  406. * V0742 00406000
  407. * A CHECK IS MADE TO SEE IF THE FILE STATUS TABLE HAS BEEN V0742 00407000
  408. * MODIFIED, IF NOT, RETURN WITH REGISTER 15 = 2 AND V0742 00408000
  409. * CONDITION CODE = 2. V0742 00409000
  410. * V0742 00410000
  411. * THE FILE STATUS TABLE CHAIN IS THEN RESTORED BY REMOVING V0742 00411000
  412. * FROM THE CHAIN THE AUX. DIRT. V0742 00412000
  413. * V0742 00413000
  414. * DMSFRET IS THEN CALLED TO FREE THE NUCLEUS COPY OF THE V0742 00414000
  415. * AUX. DIRT. V0742 00415000
  416. * V0742 00416000
  417. * AND CONTROL IS RETURNED TO THE CALLING ROUTINE WITH V0742 00417000
  418. * REGISTER 15 = 0 V0742 00418000
  419. * V0742 00419000
  420. * V0742 00420000
  421. *. 00421000
  422. EJECT 00422000
  423. * 00423000
  424. * 00424000
  425. * SEARCH ADT FOR BLOCK WITH MATCHING MODE 00425000
  426. * 00426000
  427. * R1 PLM(R1) IS ADDRESS OF FILE MODE CHARACTER 00427000
  428. * R14 RETURN ADDRESS 00428000
  429. * 00429000
  430. * R1 POINTS TO ADT BLOCK IF FOUND, IS UNCHANGED OTHERWISE 00430000
  431. * R15 = 0 (AND C.C. = 0) IF ADT BLOCK WAS FOUND 00431000
  432. * R15 = 1 (AND C.C. = 2) IF ADT BLOCK WAS NOT FOUND 00432000
  433. * 00433000
  434. DMSLAD CSECT 00434000
  435. ENTRY ADTLKP,ADTLKW,ADTNXT ***** REMOVE ***** 00435000
  436. ENTRY DMSLADN,DMSLADW,DMSLADAD V0742 00436000
  437. USING *,R15 00437000
  438. B LKP 00438000
  439. SPACE 3 00439000
  440. DMSLADO EQU * 00440000
  441. ADTLKP EQU * 00441000
  442. SVCENT LKP,SVLAD 00442000
  443. SPACE 3 00443000
  444. DMSLADON EQU * 00444000
  445. ADTNXT EQU * 00445000
  446. SVCENT DMSLADN,SVLAD 00446000
  447. SPACE 3 00447000
  448. DMSLADOW EQU * 00448000
  449. ADTLKW EQU * 00449000
  450. SVCENT DMSLADW,SVLADW 00450000
  451. SPACE 00451000
  452. LKP EQU * 00452000
  453. BALR R15,0 00453000
  454. * 00454000
  455. * ENTER 'ADTLKP' HERE ... 00455000
  456. USING *,R15 00456000
  457. L R15,AADTFVS LOAD POINTER TO FIXED VARIABLE STORAGE 00457000
  458. USING ADLSECT,R15 00458000
  459. STM R9,R10,ADLREGS SAVE REGISTERS 00459000
  460. BALR R9,0 LOAD R9 FOR ADDRESSABILITY 00460000
  461. USING *,R9 00461000
  462. L R10,ADLPTR LOAD POINTER TO THE ACTIVE DISK TABLE 00462000
  463. L R10,0(,R10) NOW LET R10 POINT TO FIRST ADT-BLOCK JS 00463000
  464. USING ADTSECT,R10 00464000
  465. * 00465000
  466. * LOOP TO FIND ADT BLOCK WITH MATCHING MODE LETTER 00466000
  467. * 00467000
  468. ADTLKP1 EQU * 00468000
  469. CLC ADTM,PLM(R1) BRANCH IF MATCHING MODE 00469000
  470. BE ADTLKP2 ... 00470000
  471. L R10,ADTPTR ADVANCE POINTER TO NEXT BLOCK IN CHAIN 00471000
  472. LTR R10,R10 TEST FOR END OF CHAIN 00472000
  473. BNZ ADTLKP1 BRANCH IF NOT END OF CHAIN 00473000
  474. * 00474000
  475. * ERROR 1 MEANS NO ADT BLOCK FOUND FOR GIVEN MODE LETTER 00475000
  476. * 00476000
  477. B ERROR1 ... 00477000
  478. * 00478000
  479. * MATCHING MODE FOUND 00479000
  480. * 00480000
  481. ADTLKP2 EQU * 00481000
  482. LR R1,R10 ADDRESS OF ADT BLOCK INTO R1 00482000
  483. LM R9,R10,ADLREGS RESTORE NECESSARY REGISTERS 00483000
  484. SR R15,R15 CLEAR GPR 15 FOR STANDARD RETURN 00484000
  485. BR R14 00485000
  486. DROP R9 00486000
  487. DROP R10 00487000
  488. EJECT 00488000
  489. * 00489000
  490. * FIND NEXT ACTIVE DISK TABLE BLOCK IN CHAIN 00490000
  491. * 00491000
  492. * R1 NONZERO - POINTS TO ACTIVE DISK TABLE BLOCK 00492000
  493. * R1 ZERO - POINTER TO FIRST ADT BLOCK IN CHAIN RETURNED 00493000
  494. * 00494000
  495. DMSLADN EQU * 00495000
  496. * 00496000
  497. USING *,R15 00497000
  498. LTR R1,R1 TEST FOR ZERO ADT POINTER 00498000
  499. BNZ ADTNXT1 BRANCH IF POINTER NONZERO 00499000
  500. L R1,ADLPTR LOAD POINTER TO FIRST ADT BLOCK IN CHAIN 00500000
  501. L R1,0(,R1) NOW LET R1 POINT TO FIRST ADT-BLOCK JS 00501000
  502. SR R15,R15 SUCCESSFUL RETURN CODE 00502000
  503. BR R14 AND RETURN TO CALLER. 00503000
  504. * 00504000
  505. * LOAD POINTER TO NEXT ACTIVE DISK TABLE BLOCK IN CHAIN 00505000
  506. * 00506000
  507. USING ADTSECT,R1 00507000
  508. ADTNXT1 L R1,ADTPTR LOAD POINTER TO NEXT ADT BLOCK IN CHAIN 00508000
  509. LTR R1,R1 CHECK TO MAKE SURE TABLE EXISTS 00509000
  510. BZ ADTNXT2 ERROR IF NO TABLE(S) ARE LEFT 00510000
  511. SR R15,R15 SUCCESSFUL RETURN CODE 00511000
  512. BR R14 AND RETURN TO CALLER. 00512000
  513. * 00513000
  514. DROP R1 00514000
  515. USING ADLSECT,R15 ... 00515000
  516. ERROR1 LM R9,R10,ADLREGS RESTORE REGISTERS (FOR ADTLKP ONLY) 00516000
  517. * 00517000
  518. ADTNXT2 LA R15,1 ERROR 1 = NOT FOUND OR TABLES EXHAUSTED 00518000
  519. LTR R15,R15 SET CONDITION-CODE FOR CONVENIENCE OF CALLER 00519000
  520. BR R14 AND RETURN TO CALLER. 00520000
  521. * 00521000
  522. DROP R15 00522000
  523. EJECT 00523000
  524. DMSLADAD EQU * V0742 00524000
  525. BALR R15,0 V0742 00525000
  526. USING *,R15 V0742 00526000
  527. STM R0,R15,0(R13) SAVE REGS. V0742 00527000
  528. L R12,ALAD SET BASE V0742 00528000
  529. USING DMSLAD,R12 V0742 00529000
  530. DROP R15 V0742 00530000
  531. LR R2,R1 SAVE PLIST ADDR. V0742 00531000
  532. L R5,8(,R1) GET AUX. DIRECTORY ADDR. V0742 00532000
  533. LTR R5,R5 AUX. DIRECTORY SPECIFIED? V0742 00533000
  534. BZ ADERR1 NO, ERROR V0742 00534000
  535. BM ABNCLR IF NEGATIVE, CALLED FROM ABN @VA00985 00535000
  536. CLI 12(R2),X'80' IS THIS A CLEAR REQUEST? V0742 00536000
  537. BE LADADCLR YES, GO TO CLEAR CODE V0742 00537000
  538. LA R1,8(,R5) FIRST FST IN AUX. @VM03224 00538000
  539. BAL R14,LKP GO GET ADT @VM03224 00539000
  540. BC 2,ADERR1 ERROR RETURN @VM03224 00540000
  541. LR R7,R1 @VM03224 00541000
  542. USING ADTSECT,R7 @VM03224 00542000
  543. TM ADTFLG1,ADTFRO+ADTFRW IS DISK ACCESSED? @VM03224 00543000
  544. BZ ADERR1 NO, ERROR @VM03224 00544000
  545. TM ADTFLG2,ADTFROS SHOLUD NOT BE ACC. AS SUCH @VM03224 00545000
  546. BO ADERR1 ERROR IF SO @VM03224 00546000
  547. TM ADTFLG1,ADTFFSTV IS THIS A VAR. FST @VM03224 00547000
  548. BO SETVAR YES @VM03224 00548000
  549. LA R0,101 DMSFREE SIZE @VM03224 00549000
  550. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR V0742 00550000
  551. ST R1,12(,R2) MODIFY USER PLIST FOR CLEAR @VM03224 00551000
  552. MVI 12(R2),X'80' @VM03224 00552000
  553. L R6,4(,R5) GET AUX. LENGTH @VM03224 00553000
  554. S R6,=F'08' SUBSTRACT HEADER @VM03224 00554000
  555. LA R5,8(R5) GET PAST AUX HEADER @VM03224 00555000
  556. MOVE EQU * @VM03224 00556000
  557. LR R3,R1 GOTTON CORE IN R3 @VM03224 00557000
  558. LA R4,20 NO. OF FST PER BLOCK @VM03224 00558000
  559. MOVELOOP EQU * @VM03224 00559000
  560. LTR R6,R6 END OF AUX.? @VM03224 00560000
  561. BZ PADZERO YES, GO PAD REST @VM03224 00561000
  562. MVC 0(40,R1),0(R5) MOVE FIRST/NEXT FST @VM03224 00562000
  563. LA R1,40(R1) INCREMENT COPY ADDR. @VM03224 00563000
  564. LA R5,40(R5) AND AUX ADDR. @VM03224 00564000
  565. S R6,=F'40' DECREMENT AUX LENGTH @VM03224 00565000
  566. BCT R4,MOVELOOP LOOP @VM03224 00566000
  567. B CHAIN DONE WITH BLOCK @VM03224 00567000
  568. PADZERO EQU * @VM03224 00568000
  569. MVI 0(R1),X'00' PAD REST OF BLOCK WITH 0 @VM03224 00569000
  570. MVC 1(39,R1),0(R1) @VM03224 00570000
  571. LA R1,40(R1) INCREMENT COPY ADDR @VM03224 00571000
  572. BCT R4,PADZERO @VM03224 00572000
  573. CHAIN EQU * @VM03224 00573000
  574. L R8,ADTFDA GET FIRST FST BLOCK ADDR @VM03224 00574000
  575. LA R8,8(R8) PLUS HEADER @VM03224 00575000
  576. CKNEXT EQU * @VM03224 00576000
  577. LR R10,R8 PUT ADDR IN R10 @VM03224 00577000
  578. LA R8,800(R8) DOWN TO NEXT POINTER @VM03224 00578000
  579. L R9,0(,R8) LOAD NEXT POINTER @VM03224 00579000
  580. LTR R9,R9 IS THERE ONE @VM03224 00580000
  581. BZ ENDOFCH NO, END OF CHAIN @VM03224 00581000
  582. LR R8,R9 YES, NEXT IN R8 @VM03224 00582000
  583. B CKNEXT @VM03224 00583000
  584. ENDOFCH EQU * @VM03224 00584000
  585. ST R3,0(,R8) SET NEXT POINTER @VM03224 00585000
  586. ST R10,4(,R1) SET PREVIOUS POINTER IN COPY @VM03224 00586000
  587. SR R10,R10 ZERO R10 @VM03224 00587000
  588. ST R10,0(,R1) ZERO NEXT POINTER IN COPY @VM03224 00588000
  589. LTR R6,R6 AUX DONE? @VM03224 00589000
  590. BZ FINI YES @VM03224 00590000
  591. LA R0,101 NEXT DMSFREE LENGTH @VM03224 00591000
  592. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR @VM03224 00592000
  593. B MOVE GO MOVE NEXT BLOCK @VM03224 00593000
  594. SETVAR EQU * @VM03224 00594000
  595. L R3,4(,R5) GET AUX LENGTH @VM03224 00595000
  596. LA R3,8(R3) PLUS HEADER @VM03224 00596000
  597. LR R4,R3 SAVE REAL LENGTH IN R4 @VM03224 00597000
  598. LA R3,7(R3) ROUND TO DOUBLE WORD @VM03224 00598000
  599. SRL R3,3 MAKE DOUBLE WORDS @VM03224 00599000
  600. LR R0,R3 @VM03224 00600000
  601. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR @VM03224 00601000
  602. ST R1,12(,R2) @VM03224 00602000
  603. MVI 12(R2),X'80' INDICATE NEXT CALL CLEAR @VM03224 00603000
  604. LR R3,R1 GOTTON CORE IN R3 @VM03224 00604000
  605. LA R6,255 MOVE LENGTH @VM03224 00605000
  606. ADLOOP EQU * @VM03224 00606000
  607. CR R4,R6 AUX < 255 @VM03224 00607000
  608. BH ADLOOP2 NO @VM03224 00608000
  609. LR R6,R4 YES, REAL LENGTH IN R6 @VM03224 00609000
  610. BCTR R6,0 @VM03224 00610000
  611. ADLOOP2 EQU * @VM03224 00611000
  612. EX R6,DIRTMOVE @VM03224 00612000
  613. LA R3,1(R6,R3) INCREMENT COPY ADDR. @VM03224 00613000
  614. LA R5,1(R6,R5) AND COPY ADDR. @VM03224 00614000
  615. SR R4,R6 DECREMENT LENGTH @VM03224 00615000
  616. BCTR R4,0 @VM03224 00616000
  617. LTR R4,R4 ANY LEFT? @VM03224 00617000
  618. BNZ ADLOOP @VM03224 00618000
  619. ST R1,12(,R2) SET COPY ADDR IN USER PLIST @VM03224 00619000
  620. MVI 12(R2),X'80' @VM03224 00620000
  621. L R8,ADTFDA GET FST BLOCK ADDR @VM03224 00621000
  622. L R9,4(,R8) GET LENGTH @VM03224 00622000
  623. LA R9,0(R9) ZERO HIGH ORDER BYTE @VM03224 00623000
  624. LA R8,8(R8) SKIP HEADER @VM03224 00624000
  625. AR R8,R9 POINT TO EXT. POINTER @VM03224 00625000
  626. ST R1,0(,R8) SET EXT. POINTER @VM03224 00626000
  627. FINI EQU * @VM03224 00627000
  628. OI ADTFLG2,ADTPSTM SET PSTAT CHAIN MODIFIED @VM03224 00628000
  629. DROP R7 @VM03224 00629000
  630. LADADRET EQU * V0742 00630000
  631. SR R15,R15 V0742 00631000
  632. LADADERT EQU * V0742 00632000
  633. LM R0,R14,0(R13) RESTORE REGS. V0742 00633000
  634. BR R14 RETURN V0742 00634000
  635. SPACE 2 V0742 00635000
  636. LADADCLR EQU * @VM03224 00636000
  637. ABNCLR EQU * @VM03224 00637000
  638. SR R1,R1 @VM03224 00638000
  639. CLEAR2 EQU * @VM03224 00639000
  640. LA R15,DMSLADN GET FIRST OR NEXT ADT @VM03224 00640000
  641. BALR R14,R15 @VM03224 00641000
  642. BC 2,LADADRET @VM03224 00642000
  643. USING ADTSECT,R1 @VM03224 00643000
  644. TM ADTFLG2,ADTPSTM HAS FST CHAIN BEEN MODIFIED? @VM03224 00644000
  645. BNO CLEAR2 NOT THIS ONE, CHECK NEXT @VM03224 00645000
  646. DROP R1 @VM03224 00646000
  647. LR R7,R1 MAKE R7 ADT BASE @VM03224 00647000
  648. USING ADTSECT,R7 @VM03224 00648000
  649. TM ADTFLG1,ADTFFSTV IS THIS VAR. FST @VM03224 00649000
  650. BO CLEARVAR YES @VM03224 00650000
  651. SR R4,R4 @VM03224 00651000
  652. L R5,ADTHBCT GET HYPER BLOCK COUNT @VM03224 00652000
  653. L R3,ADTFDA LOAD FIRST FST ADDR @VM03224 00653000
  654. LA R3,8(R3) PLUS HEADER @VM03224 00654000
  655. CLOOP EQU * @VM03224 00655000
  656. BCT R5,CLOOP2 LOOP THROUGH MAIN FSTS @VM03224 00656000
  657. L R4,800(,R3) LOAD ADDR FIRST AUX FST @VM03224 00657000
  658. LTR R4,R4 IS THERE ONE? @VM03224 00658000
  659. BZ ADERR2 NO, ERROR NO AUX FST @VM03224 00659000
  660. B FNDAUX FOUND AUX, GO FRET IT @VM03224 00660000
  661. CLOOP2 EQU * @VM03224 00661000
  662. L R4,800(,R3) LOAD NEXT FST ADDR @VM03224 00662000
  663. LR R3,R4 PUT IT IN R3 @VM03224 00663000
  664. B CLOOP AND LOOP @VM03224 00664000
  665. FNDAUX EQU * @VM03224 00665000
  666. LA R5,800(,R3) SAVE ADDR. LAST NON-AUX FST @VM03224 00666000
  667. FNDAUX2 EQU * @VM03224 00667000
  668. L R3,800(,R4) LOAD NEXT AUX POINTER @VM03224 00668000
  669. LR R1,R4 FRET ADDR IN R1 @VM03224 00669000
  670. LA R0,101 LENGTH IN R0 @VM03224 00670000
  671. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR @VM03224 00671000
  672. LTR R3,R3 ANY MORE AUX FSTS? @VM03224 00672000
  673. BZ AUXFREED NO @VM03224 00673000
  674. LR R4,R3 NEXT FST ADDR IN R4 @VM03224 00674000
  675. B FNDAUX2 YES, FRET NEXT @VM03224 00675000
  676. AUXFREED EQU * @VM03224 00676000
  677. ST R3,0(,R5) ZERO NEXT POINTER IN LAST @VM03224 00677000
  678. NI ADTFLG2,255-ADTPSTM TURN OFF FST MOD. BIT @VM03224 00678000
  679. B LADADRET RETURN @VM03224 00679000
  680. CLEARVAR EQU * @VM03224 00680000
  681. L R3,ADTFDA LOAD FST POINTER @VM03224 00681000
  682. L R4,4(,R3) LOAD LENGTH @VM03224 00682000
  683. LA R4,0(R4) CLEAR HIGH ORDER BYTE @VM03224 00683000
  684. LA R5,8(R4,R3) SAVE NEXT POINTER IN MAIN FST@VM03224 00684000
  685. L R3,8(R4,R3) LOAD NEXT POINTER @VM03224 00685000
  686. LTR R3,R3 THIS SHOULD BE AUX FST @VM03224 00686000
  687. BZ ADERR2 IF ZERO, AUX NOT SET @VM03224 00687000
  688. L R1,4(,R3) LOAD AUX FST LENGTH @VA02287 00688300
  689. LA R0,15(R1) PLUS HEADER & ROUND TO DBLWD. @VA02287 00688600
  690. SRL R0,3 DOWN TO DOUBLE WORDS @VM03224 00689000
  691. LR R1,R3 ADDR IN R1 @VM03224 00690000
  692. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR @VM03224 00691000
  693. SR R3,R3 ZERO R3 @VM03224 00692000
  694. ST R3,0(,R5) ZERO NEXT POINTER IN FST @VM03224 00693000
  695. NI ADTFLG2,255-ADTPSTM TURN OFF FST MOD. BIT @VM03224 00694000
  696. B LADADRET RETURN @VM03224 00695000
  697. DROP R7 @VM03224 00696000
  698. SPACE 2 @VA00985 00697000
  699. ADERR1 EQU * @VA00985 00698000
  700. LA R15,1 SET RETURN CODE V0742 00699000
  701. LTR R15,R15 SET CONDITION CODE V0742 00700000
  702. B LADADERT GO TO RETURN V0742 00701000
  703. SPACE 1 V0742 00702000
  704. ADERR2 EQU * V0742 00703000
  705. LA R15,2 SET RETURN CODE V0742 00704000
  706. LTR R15,R15 SET CONDITION CODE V0742 00705000
  707. B LADADERT RETURN V0742 00706000
  708. SPACE 3 V0742 00707000
  709. DIRTMOVE MVC 0(0,R3),0(R5) USED TO COPY AUX. DIRT. V0742 00708000
  710. EJECT V0742 00709000
  711. *********************************************************************** 00710000
  712. * 00711000
  713. * "ADTLKW" 00712000
  714. * 00713000
  715. * 24(R1) MUST IN EACH ENTRY CASE POINT TO DISK MODE LETTER(S) 00714000
  716. * 00715000
  717. * ENTRY OPTIONS ARE AS FOLLOWS: 00716000
  718. * 00717000
  719. * 1. 24(R1) ALPHABETIC (A TO Z): 00718000
  720. * 00719000
  721. * SEARCHES FOR LOGGED-IN READ-WRITE DISK 00720000
  722. * CORRESPONDING TO GIVEN MODE-LETTER. 00721000
  723. * 00722000
  724. * ENTRY CONDITIONS: 00723000
  725. * R0 IMMATERIAL 00724000
  726. * R1 SUCH THAT 24(R1) IS MODE LETTER (A TO Z) 00725000
  727. * 00726000
  728. * CALLING SEQUENCE: 00727000
  729. * L R15,AADTLKW WHERE AADTLKW = V(ADTLKW) 00728000
  730. * BALR R14,R15 ... 00729000
  731. * 00730000
  732. * COMMON EXIT CONDITIONS (FOR ALL ENTRY OPTIONS): 00731000
  733. * 00732000
  734. * DESIRED CONDITION(S) MET = "NORMAL RETURN": 00733000
  735. * 00734000
  736. * R15 = 0 (AND CONDITION-CODE = 0) 00735000
  737. * R0 = NUMBER OF 800-BYTE RECORDS LEFT ON DISK 00736000
  738. * ("ADTLEFT" LESS "ADTRES" RESERVE-COUNT) 00737000
  739. * R1 = POINTER TO (ADDRESS OF) ADT BLOCK FOR THIS DISK. 00738000
  740. * R2-R14 SAME AS AT ENTRY. 00739000
  741. * 00740000
  742. * DESIRED CONDITION(S) NOT MET (OR INVALID CALL): 00741000
  743. * 00742000
  744. * R15 = 1 (AND CONDTION-CODE = 2) 00743000
  745. * R0-R14 SAME AS AT ENTRY. 00744000
  746. * 00745000
  747. * 00746000
  748. * 2. 24(R1) = '*' 00747000
  749. * 00748000
  750. * SEARCHES FOR "FIRST" OR "NEXT" LOGGED-IN READ/WRITE DISK 00749000
  751. * 00750000
  752. * ENTRY CONDITIONS: 00751000
  753. * R0 = 0 TO START SEARCH AT "FIRST" R/W DISK. 00752000
  754. * R0 = NONZERO ADDRESS - RESUME SEARCH AT "NEXT" ADT BLOCK 00753000
  755. * R1 SUCH THAT 24(R1) = '*' 00754000
  756. * 00755000
  757. * (USING CALLING SEQUENCE & RETURN CODES, AS ABOVE). 00756000
  758. * 00757000
  759. * 00758000
  760. EJECT 00759000
  761. * 00760000
  762. * 00761000
  763. * 3. 24(R1) = '?' 00762000
  764. * 00763000
  765. * SEARCHES FOR FIRST READ-WRITE DISK WITH "ENOUGH ROOM" 00764000
  766. * TO WRITE A FILE CONSISTING OF NUMBER OF DATA-BLOCKS 00765000
  767. * SPECIFIED BY CALLER. 00766000
  768. * 00767000
  769. * ENTRY CONDITIONS: 00768000
  770. * R0 = NUMBER OF 800-BYTE DATA BLOCKS 00769000
  771. * DESIRED TO BE WRITTEN. 00770000
  772. * R1 SUCH THAT 24(R1) = '?' 00771000
  773. * 00772000
  774. * (USING CALLING SEQUENCE & RETURN CODES, AS ABOVE). 00773000
  775. * 00774000
  776. * 4. 24-25(R1) = '??' 00775000
  777. * 00776000
  778. * SEARCHES FOR READ-WRITE DISK WITH THE MOST ROOM 00777000
  779. * 00778000
  780. * ENTRY CONDITIONS: 00779000
  781. * R0 IMMATERIAL 00780000
  782. * R1 SUCH THAT 24-25(R1) = '??' 00781000
  783. * 00782000
  784. * (USING CALLING SEQUENCE & RETURN CODES, AS ABOVE). 00783000
  785. * 00784000
  786. *********************************************************************** 00785000
  787. * 00786000
  788. * 00787000
  789. DMSLADW FSENTR REGSAV0 "ADTLKW" -- USE LOW-LEVEL SAVE AREA 00788000
  790. LA R4,ADTW04 SET FOR MANY BCR'S - TO SAVE SPACE 00789000
  791. LA R5,ADTW06 SET R5-SWITCH TO TRF TO ADTW06. 00790000
  792. LA R6,ADTW02 SET R6-SWITCH TO TRF TO ADTW02 00791000
  793. CLI 24(R1),C'A' IS IT A-Z ? 00792000
  794. BL ADTW03 TRF IF LESS THAN A. 00793000
  795. CLI 24(R1),C'Z' ... 00794000
  796. BCR 2,R6 "BH ADTW02" (ERROR) IF GREATER THAN Z. 00795000
  797. L R15,=A(DMSLAD) CALL 'ADTLKP' 00796000
  798. BALR R14,R15 LET HIM FIND THE DISK 00797000
  799. BCR 7,R6 "BNZ ADTW02" (ERROR) IF NOT FOUND. 00798000
  800. USING ADTSECT,R1 REFERENCE ADT-BLOCK FOUND 00799000
  801. TM ADTFLG1,ADTFRW LOGGED IN R/W DISK THERE ? 00800000
  802. BO ADTW05 TRF IF YES (GOOD SHOW). 00801000
  803. DROP R1 00802000
  804. ADTW02 LA R15,1 ERROR 1 FOR CONDITION(S) NOT MET. 00803000
  805. LM R0,R14,REGSAV0 RESTORE R0 THRU R14, 00804000
  806. LTR R15,R15 SET CONDITION-CODE FOR CONVENIENCE OF CALLER 00805000
  807. BR R14 AND EXIT. 00806000
  808. * 00807000
  809. ADTW03 CLI 24(R1),C'*' IS IT AN ASTERISK ? 00808000
  810. BNE ADTW07 IF NOT, TRY QUESTION-MARK. 00809000
  811. LR R1,R0 SET UP R1 FOR USE BY ADTNXT, 00810000
  812. * 00811000
  813. ADTW04 L R15,=A(DMSLADN) CALL 'ADTNXT' TO FIND NEXT ADT 00812000
  814. BALR R14,R15 ... 00813000
  815. BCR 7,R6 "BNZ" IF NO ADT BLOCK(S) ARE LEFT. 00814000
  816. USING ADTSECT,R1 REFERENCE BLOCK FOUND 00815000
  817. TM ADTFLG1,ADTFRW LOGGED-IN R/W DISK THERE ? 00816000
  818. BCR 8,R4 "BZ ADTW04" IF NOT, KEEP LOOKING. 00817000
  819. ADTW05 L R0,ADTLEFT GET NUMBER OF 800-BYTE BLOCKS LEFT 00818000
  820. SH R0,ADTRES LESS THE RESERVE-COUNT 00819000
  821. DROP R1 00820000
  822. BR R5 BRANCH TO ADTW06, ADTW08, OR ADTW10. 00821000
  823. * 00822000
  824. ADTW08 CR R0,R3 FOR '?' ENTRY, ARE THERE ENOUGH RECORDS ? 00823000
  825. BCR 4,R4 "BL ADTW04" IF NOT; IF YES, DROP THRU. 00824000
  826. * 00825000
  827. ADTW06 LM R2,R14,REGSAV0+8 RESTORE R2 THRU R14 00826000
  828. SR R15,R15 CLEAR R15 (AND C.C. = 0) 00827000
  829. BR R14 RETURN TO CALLER 00828000
  830. * 00829000
  831. ADTW07 CLI 24(R1),C'?' MUST BE A QUESTION-MARK, THEN. 00830000
  832. BCR 7,R6 "BNE" IF IT ISN'T (AN ERROR). 00831000
  833. SR R2,R2 CLEAR R2, 00832000
  834. CLI 25(R1),C'?' IS IT DOUBLE QUESTION-MARK ?? 00833000
  835. BE ADTW09 TRF IF YES. 00834000
  836. LTR R3,R0 GET NO. OF RECORDS WANTED, 00835000
  837. BCR 13,R6 "BNP ADTW02" (AN ERROR) IF NOT > 0. 00836000
  838. LA R3,739(,R3) ADD SPECIAL ADJUSTER ("JUST RIGHT") JS 00837000
  839. D R2,F400 COMPUTE HOW MANY CHAIN-LINKS NEEDED 00838000
  840. AR R3,R0 ADD ORIGINAL BLOCK COUNT 00839000
  841. LA R5,ADTW08 SET R5-SWITCH FOR '?' HANDLING 00840000
  842. SR R1,R1 SET TO START WITH FIRST BLOCK 00841000
  843. BR R4 "B ADTW04" TO CHECK AVAILABLE ADT-BLOCKS 00842000
  844. * 00843000
  845. ADTW09 LA R5,ADTW10 SET R5-SWITCH AND 00844000
  846. LA R6,ADTW11 R6-SWITCH 00845000
  847. SR R1,R1 SET TO START WITH FIRST BLOCK, 00846000
  848. BR R4 "B ADTW04" TO SEARCH ADT BLOCKS. 00847000
  849. * 00848000
  850. ADTW10 CR R0,R2 BIGGER THAN PREVIOUS BIGGEST ONE ? 00849000
  851. BCR 13,R4 "BNH ADTW04" IF NOT, KEEP LOOKING. 00850000
  852. LR R2,R0 REMEMBER NEW SIZE, 00851000
  853. LR R3,R1 REMEMBER DISK IT BELONGS TO, 00852000
  854. BR R4 KEEP LOOKING FOR A BIGGER ONE AT ADTW04. 00853000
  855. ADTW11 LTR R0,R2 DID WE HAVE ANYTHING AT ALL ? 00854000
  856. BNP ADTW02 ERROR IF NOT (BAD NEWS). 00855000
  857. LR R1,R3 SIZE & DISK IN R0-R1, 00856000
  858. B ADTW06 AND GO EXIT (WE'VE GOT IT). 00857000
  859. EJECT 00858000
  860. * 00859000
  861. * CONSTANTS: 00860000
  862. * 00861000
  863. AADTFVS DC V(ADTFVS) POINTER TO ADTLKP FIXED VARIABLE STORAGE 00862000
  864. ADLPTR DC V(IADT) POINTS TO ACTIVE DISK TABLE 00863000
  865. F400 DC F'400' 00864000
  866. ALAD DC A(DMSLAD) V0742 00865000
  867. * 00866000
  868. * 00867000
  869. * PARAMETER LIST DEFINITION 00868000
  870. * 00869000
  871. PLM EQU 24 FILE MODE 00870000
  872. * 00871000
  873. * FIXED VARIABLE STORAGE 00872000
  874. * 00873000
  875. ADLSECT DSECT 00874000
  876. ADLREGS DS 2F SAVE AREA FOR TWO REGISTERS 00875000
  877. EJECT 00876000
  878. FSTD V0742 00877000
  879. ADT 00878000
  880. EJECT 00879000
  881. FVS 00880000
  882. NUCON 00881000
  883. SVCSECT 00882000
  884. * 00883000
  885. REGEQU 00884000
  886. * 00885000
  887. END 00886000
ibm/vm370-lib/cms/dmslad.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator