User Tools

Site Tools


ibm:vm370-lib:cms:dmsacf.assemble_src

DMSACF Source

References

Source Listing

DMSACF.ASSEMBLE.txt
  1. ACF TITLE 'DMSACF (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * MODULE NAME: 00007000
  5. * 00008000
  6. * DMSACF (READFST) 00009000
  7. * 00010000
  8. * FUNCTION: 00011000
  9. * 00012000
  10. * FOR A READ-WRITE DISK, TO READ ALL OF THE USER FILE 00013000
  11. * DIRECTORY INTO STORAGE; FOR A READ-ONLY DISK, TO READ 00014000
  12. * IN ALL OR PART OF THE USER FILE DIRECTORY, AT THE 00015000
  13. * CALLER'S OPTION; FOR AN O/S DISK, CONTROL IS RETURNED 00016100
  14. * TO THE CALLER AFTER SUCCESSFUL RETURN FROM DMSACM. 00016200
  15. * 00017000
  16. * ATTRIBUTES: 00018000
  17. * 00019000
  18. * TRANSIENT, REENTRANT 00020000
  19. * 00021000
  20. * ENTRY POINTS: 00022000
  21. * 00023000
  22. * READFST 00024000
  23. * 00025000
  24. * ENTRY CONDITIONS: 00026000
  25. * 00027000
  26. * L R15,AREADFST WHERE AREADFST=V(DMSACF) 00028000
  27. * BALR R14,R15 00029000
  28. * 00030000
  29. * R0 MUST POINT TO ACTIVE DISK TABLE 00031000
  30. * R1 MUST POINT TO PARAMETER-LIST AS USUAL: 00032000
  31. * 00033000
  32. * DS 0F 00034000
  33. * PLIST DC CL8' ' IMMATERIAL 00035000
  34. * DC CL8' ' FILENAME (OR'*') 00036000
  35. * DC CL8' ' FILETYPE (OR'*') 00037000
  36. * DC CL2' ' FILEMODE 00038000
  37. * 00039000
  38. * EXIT CONDITIONS: 00040000
  39. * 00041000
  40. * NORMAL RETURN 00042000
  41. * 00043000
  42. * R15 = 0 00044000
  43. * 00045000
  44. * ERROR RETURNS 00046000
  45. * 00047000
  46. * R15=4 DISK IS READ-ONLY(NONFATAL) 00048000
  47. * R15=1,2,3,OR5: SAME ERROR CONDITIONS AS READMFD 00049000
  48. * (ERROR FROM READMFD PASSED ALONG AS IS) 00050000
  49. * 00051000
  50. * CALLS TO OTHER ROUTINES: 00052000
  51. * 00053000
  52. * DMSFREE, DMSFRET, DMSDIOR, DMSACM (READMFD), 00054100
  53. * | AND SORTFST (WITHIN DMSALU MODULE). 00054200
  54. * 00055000
  55. * EXTERNAL REFERENCES: 00056000
  56. * 00057000
  57. * ADT, FVS, DMSNUC 00058000
  58. * 00059000
  59. * TABLES/WORKAREAS: 00060000
  60. * 00061000
  61. * 816 BYTE BUFFERS 00062000
  62. * 800 BYTE WORK AREA 00063000
  63. * 00064000
  64. * REGISTER USAGE: 00065000
  65. * 00066000
  66. * R13 FVSECT 00067000
  67. * R12 BASE 00068000
  68. * R11 ADTSECT 00069000
  69. * REST WORK 00070000
  70. * 00071000
  71. * OPERATION: 00072000
  72. * 00073000
  73. * DMSACF, TOGETHER WITH DMSACM, BRINGS INTO STORAGE 00074000
  74. * ALL OR PART OF THE USER FILE DIRECTORY FOR THE GIVEN 00075000
  75. * DISK. IF THE DISK IS READ-WRITE, ALL OF THE UFD IS 00076000
  76. * MADE RESIDENT; IF READ-ONLY, THE QMSK AND QQMSK 00077000
  77. * TABLES ARE NOT BROUGHT IN BY 00078000
  78. * DMSACM, AND DMSACF CAN BRING IN SELECTED PORTIONS OF 00079000
  79. * THE FST 00080000
  80. * ENTRIES, IF SPECIFIED. 00081000
  81. * 00082000
  82. * DMSACF DOES THE FOLLOWING: 00083000
  83. * 00084000
  84. * FIRST DMSACM IS CALLED TO READ IN ITS PART OF THE 00085000
  85. * UFD. IF AN ERROR OTHER THAN 4 IS RETURNED BY READMFD, 00086000
  86. * DMSACF PASSES BACK THIS ERROR CODE TO THE CALLER AND 00087000
  87. * EXITS IMMEDIATELY. IF DMSACM WAS SUCCESSFUL, OR 00088000
  88. * RETURNED AN ERROR-4 INDICATING THE DISK WAS 00089000
  89. * READ-ONLY, DMSACF CONTINUES. IF THE DISK IS AN O/S 00090100
  90. * DISK, DMSACF EXITS IMMEDIATELY. AN 816 - BYTE 00090200
  91. * BUFFER FOR THE FIRST FST HYPERBLOCK IS OBTAINED FROM 00091000
  92. * FREE STORAGE IF NEEDED, AND AN 800-BYTE WORK AREA IS 00092000
  93. * OBTAINED. 00093000
  94. * 00094000
  95. * THE FST HYPERBLOCKS ON DISK ARE NOW READ INTO THE 00095000
  96. * WORK AREA, ONE AT A TIME. ALL NULL FST ENTRIES ARE 00096000
  97. * IGNORED; OTHER ENTRIES ARE MOVED FROM THE WORK AREA 00097000
  98. * TO THE RESIDENT FST HYPERBLOCKS IF THE DISK IS 00098000
  99. * READ-WRITE, THUS RESULTING IN COMPACTED DIRECTORY IN 00099000
  100. * STORAGE OF ALL FILES. IF THE DISK IS READ-ONLY, EACH 00100000
  101. * FST ENTRY IN THE WORK AREA IS CHECKED AGAINST THE 00101000
  102. * PARAMETER LIST PROVIDED 00102000
  103. * TO DMSACF. (IF ANY FIELD IN THE PARAMETER LIST IS 00103000
  104. * '*' OR X'FF', 00104000
  105. * THE FILENAME, FILETYPE, OR MODE NUMBER IS ACCEPTED 00105000
  106. * WITHOUT CHECKING.) 00106000
  107. * THUS, FOR A READ-ONLY DISK DMSACF CAN READ IN ALL 00107000
  108. * FILES, OR ALL '2' FILES, 00108000
  109. * (AS IT DOES FOR THE S-DISK WHEN CALLED BY INITSYS) OR 00109000
  110. * ANY CONDITIONS THAT SATISFY THE PARAMETER LIST. 00110000
  111. * 00111000
  112. * DMSACF GETS MORE HYPERBLOCKS FROM FREE STORAGE WHEN 00112000
  113. * NEEDED AND REFILLS THE WORK BUFFER FROM DISK WHEN 00113000
  114. * NEEDED, UNTIL ALL FST ENTRIES HAVE BEEN CHECKED AND 00114000
  115. * MOVED INTO THE FST HYPERBLOCKS IF ACCEPTABLE. 00115000
  116. * 00116000
  117. * ALL APPROPRIATE COUNTS IN THE ACTIVE DISK TABLE 00117000
  118. * (NUMBER OF FILES, POINTER TO LAST FST ENTRY, ETC.) 00118000
  119. * ARE INITIALIZED AS NEEDED. 00119000
  120. * 00120000
  121. * | FOR CMS DISKS, "SORTFST" IS THEN CALLED TO SORT 00120100
  122. * | ALL THE FST ENTRIES (BY FILENAME/FILETYPE). FOR READ-ONLY 00120200
  123. * | DISKS (EXCEPT THE S-DISK), THE "ADTFSORT" FLAG IN ADTFLG3 00120300
  124. * | IS THEN SET TO INDICATE A "FAST SEARCH TECHNIQUE" CAN 00120400
  125. * | BE USED (BY DMSLFS). 00120500
  126. * 00120600
  127. * WHEN THROUGH, DMSACF RETURNS THE RESIDENT MFD TO FREE 00121000
  128. * STORAGE 00122000
  129. * IF THE DISK WAS READ-ONLY, AS IT IS NOT NEEDED ANY 00123000
  130. * MORE. FOR A READ-WRITE DISK, HOWEVER, THE MFD IS 00124000
  131. * PURPOSELY LEFT RESIDENT FOR USE BY THE 00125000
  132. * DMSAUD ROUTINE THE NEXT TIME THE UFD IS UPDATED. 00126000
  133. * 00127000
  134. * THE WORK-BUFFER IS RETURNED TO FREE STORAGE, AND 00128000
  135. * DMSACF RETURNS 00129000
  136. * TO THE CALLER, RETURNING AN ERROR-CODE 0 OR 4 (IF THE 00130000
  137. * DISK WAS 00131000
  138. * FOUND TO BE READ-ONLY BY DMSACM). 00132000
  139. * 00133000
  140. *. 00134000
  141. * 00135000
  142. EJECT 00138000
  143. READFST START 0 NOTE: NOW DISK-RESIDENT 00139000
  144. * (INCLUDE TEXT OF "READFST" WITH 00140000
  145. * MODULE OF CALLING PROGRAM) 00141000
  146. * 00142000
  147. * (ALSO IN CMS NUCLEUS AS AN 00143000
  148. * "IPL-PROCEDURE" PROGRAM 00144000
  149. * FOR USE BY "INITSYS") 00145000
  150. * 00146000
  151. EXTRN READMFD (NEEDED) 00147000
  152. EXTRN RELUFD ... 00148000
  153. * 00149000
  154. * ENTER HERE ... 00150000
  155. USING *,R15 00151000
  156. USING NUCON,R0 00152000
  157. L R15,AFVS 00153000
  158. USING FVSECT,R15 00154000
  159. STM R0,R14,REGSAV1 SAVE R0 THRU 14 00155000
  160. DROP R15 00156000
  161. LR R13,R15 REFERENCE 'FVS' INFO 00157000
  162. USING FVSECT,R13 00158000
  163. BALR R12,0 OUR OWN ADDRESSABILITY 00159000
  164. USING *,R12 00160000
  165. OI UFDBUSY,ERBIT SET 'OUR' BIT IN 'UFDBUSY' FLAG 00161000
  166. LR R11,R0 REFERENCE ACTIVE-DISK-TABLE 00162000
  167. USING ADTSECT,R11 ... 00163000
  168. LR R2,R1 POINTER TO PARAMETER-LIST INTO R2 00164000
  169. * 00165000
  170. RFST01 DS 0H IF RUNNING ON 'CP', WARN CP WE'RE READING UFD 00166000
  171. * 00167000
  172. * (TO BE CODED - VIA DIAGNOSE, ETC.) 00168000
  173. * 00169000
  174. RFST02 L R15,AREADMFD READ IN MFD, 00170000
  175. BALR R14,R15 VIA 'READMFD', 00171000
  176. STC R15,ERRCOD1 STORE ERROR-CODE AS OUR ERROR-CODE, 00172000
  177. BZ RFST04 BZ IF NO PROBLEMS, MFD IN FINE. 00173000
  178. CLI ERRCOD1,X'04' WAS DISK R/O? THAT'S OK @VA04381 00174100
  179. BNE RFST16 BUT NO OTHER ERROR. 00175000
  180. RFST04 TM ADTFLG2,ADTFROS IS IT O/S DISK ? @V201101 00176100
  181. BO RFST16 YES..JUST GET OUT @V201101 00176200
  182. TM ADTFLG1,ADTFRW IS IT R/W DISK ? @V201101 00176300
  183. LA R15,ADTFALUF SET FLAG-BITS FOR ALL UFD 00177000
  184. BO STFLG21 IF YES. HRC010DS 00178490
  185. CLI PLNAM(R2),X'FF' IF READ-ONLY, WAS FILENAME OMITTED ? 00179000
  186. LA R15,ADTFALNM+ADTFALTY+ADTFMDRO IF YES, SET FLAG-BITS 00180000
  187. BE STFLG2 FOR ALL NAMES & TYPES, &MODES 1-5. @V305032 00181000
  188. SR R15,R15 IF NOT, CLEAR FLAG, 00182000
  189. CLI PLNAM(R2),C'*' ASTERISK FOR NAME (ALL NAMES) ? 00183000
  190. BE RFST05 TRF IF YES. 00184000
  191. LA R1,PLNAM+1(R2) IF NOT, POINT R1 TO THE FILENAME+1 AND 00185000
  192. LA R6,REGSAV0 R6 TO WHERE-TO-PUT THE CLC COUNT (LESS 1) 00186000
  193. BAL R14,CHEKSTAR CHECK FOR * IN FILENAME, RETURN TO RFST06 00187000
  194. RFST05 LA R15,ADTFALNM SET FLAG-BIT IF ALL FILENAMES WANTED. 00188000
  195. RFST06 CLI PLTYP(R2),X'FF' FILETYPE OMITTED ? 00189000
  196. BE RFST10 BE IF YES, OR IN PROPER BITS. 00190000
  197. CLI PLTYP(R2),C'*' ALL FILES-TYPES SPECIFIED VIA ASTERISK ? 00191000
  198. BE RFST07 TRF IF YES. 00192000
  199. LA R1,PLTYP+1(R2) IF NOT, POINT R1 TO THE FILETYPE+1 AND 00193000
  200. LA R6,REGSAV0+4 R6 TO WHERE-TO-PUT THE CLC COUNT (LESS 1) 00194000
  201. BAL R14,CHEKSTAR CHECK FOR * IN FILETYPE, RETURN TO RFST08 00195000
  202. RFST07 LA R15,ADTFALTY(,R15) OR IN BIT IF ALL FILETYPES WANTED. 00196000
  203. RFST08 LA R5,RFST11 'BCR 8,R5' = 'BE RFST11' (TO SAVE SPACE) 00197000
  204. CLI PLMOD(R2),X'FF' FILE MODE OMITTED ? 00198000
  205. BCR 8,R5 IF YES, SET FLAG BITS FOR MODES 1-5 @V305032 00199000
  206. CLI PLMOD(R2),C'*' ALL MODES SPECIFIED VIA ASTERISK ? 00200000
  207. BCR 8,R5 IF YES, SET FLAG BITS AS FOR X'FF'. 00201000
  208. CLI PLMOD+1(R2),C' ' IS MODE-NUMBER GIVEN ? 00202000
  209. BCR 8,R5 BNE IF NOT (A 'BLANK' THERE) 00203000
  210. B STFLG2 GO STORE FLAG-BITS IF SPECIFIC MODE THERE 00204000
  211. * 00205000
  212. DUMOI OI ADTFLG2,*-* TO OR IN APPROPRIATE FLAG-BITS 00206000
  213. * 00207000
  214. RFST10 LA R15,ADTFALTY(,R15) OR IN BITS FOR ALL TYPES IF NEEDED 00208000
  215. RFST11 LA R15,ADTFMDRO(,R15) OR IN BITS FOR MODES 1-5 @V305032 00209000
  216. * 00210000
  217. STFLG2 EQU * HRC010DS 00211090
  218. TM ADTFLG3,ADTFZERO WAS MODE ZERO REQUESTED HRC010DS 00211180
  219. BNO STFLG21 HRC010DS 00211270
  220. LA R15,X'08'(,R15) OR IN BITS FOR MODE 0 HRC010DS 00211360
  221. STFLG21 EQU * HRC010DS 00211450
  222. EX R15,DUMOI OR IN APPROPRIATE BITS INTO ADTFLHRC010DS 00211540
  223. * 00212000
  224. SR R9,R9 HYPERBLOCK COUNT IS ZERO AS YET @VA04381 00212100
  225. ST R9,JSR0 LENGTH OF BUFFER IS ZERO AS YET @VA04381 00212200
  226. LA R5,800 800 = SIZE FOR READING FROM DISK 00213000
  227. ST R5,RWCNT SET BYTE-COUNT = 800 WHERE NEEDED 00214000
  228. L R1,ADTFDA GET A(PSTAT) OR EQUIVALENT 00215000
  229. LTR R1,R1 DO WE HAVE ONE ? 00216000
  230. BP RFST12 BP IF YES (WE'RE ALL SET) 00217000
  231. LA R0,102 INDICATE SIZE OF BLOCK NEEDED @VA04381 00218100
  232. BAL R14,GETSTORE GET FREE STORAGE @VA04381 00218200
  233. LA R4,40 40 = ITEM SIZE (R5 ALREADY = 800), 00219000
  234. STM R4,R5,0(R1) STORE 40 & 800 IN FIRST TWO WORDS 00220000
  235. ST R1,ADTFDA STORE ADDRESS WHERE NEEDED 00221000
  236. OI ADTFLG1,ADTFFSTF MAKE SURE FLAG-BIT SET 00222000
  237. RFST12 LA R1,8(,R1) SPACE OVER PRELIMINARY WORDS 00223000
  238. BAL R14,CLEARFRE CLEAR OUT FIRST 808-BYTE BLOCK. 00224000
  239. LR R3,R1 SET UP R3 FOR BXLE, 00225000
  240. LA R0,100 INDICATE SIZE OF BLOCK NEEDED @VA04381 00226400
  241. BAL R14,GETSTORE GET FREE STORAGE @VA04381 00226800
  242. LA R4,20 20 40-BYTE ENTRIES/800-BYTES @VA04381 00227200
  243. STM R0,R1,JSR0 SAVE FOR LATER FRET-CALL, 00228000
  244. ST R1,DSKLOC SAVE CORE-LOCATION FOR DISK READING, 00229000
  245. ST R11,ADTADD ADDRESS OF ACTIVE-DISK TABLE, 00230000
  246. L R10,ADTHBCT NUMBER OF HYPERBLOCKS THERE INTO R10. 00231000
  247. LA R9,1 SET NUMBER OF HYPERBLOCKS WE WILL HAVE = 1 00232000
  248. ST R3,ADTCHBA STORE POINTER TO CURRENT FST HYPERBLOCK 00233000
  249. ST R3,ADTCFST ALSO STORE POINTER TO 'CURRENT' FST-ENTRY 00234000
  250. LA R5,MOV40 SET R5 TO 'MOV40' 00235000
  251. SR R6,R6 CLEAR NUMBER OF FILES MOVED, 00236000
  252. L R14,ADTMFDA GET CORE-ADDRESS OF FIRST DISK-ADDRESS 00237000
  253. * 00238000
  254. REFILL ST R14,DSKADR STORE CORE-ADDRESS OF NEW DISK-ADDRESS 00239000
  255. LA R1,DSKLST PARAMETER-LIST FOR RDTK, 00240000
  256. L R15,ARDTK CALL RDTK TO GET ANOTHER FST HYPERBLOCK 00241000
  257. BALR R14,R15 ... 00242000
  258. BNZ RFST18 UH-OH IF ERROR READING DISK 00243000
  259. L R7,DSKLOC SET R7 FOR SEARCH-LOOP 00244000
  260. LA R8,20 TWENTY 40-BYTE ITEMS PER 800-BYTE BLOCK 00245000
  261. SR R0,R0 R0 = 0, 00246000
  262. LM R14,R15,REGSAV0 EX-CLC COUNTS INTO R14 AND R15. 00247000
  263. * 00248000
  264. * 00249000
  265. SRCHLP C R0,0(,R7) IS THIS ENTRY = 0 (NONEXISTENT) ? 00250000
  266. BE LAR7 TRF IF YES - GO CHECK THE NEXT ONE. 00251000
  267. TM ADTFLG2,ADTFALUF ARE 'ALL FILES' WANTED ? 00252000
  268. BCR 1,R5 'BO MOV40' IF YES. 00253000
  269. TM ADTFLG2,ADTFALNM ARE ALL NAMES WANTED ? 00254000
  270. BO CHKTYP BO IF YES. 00255000
  271. EX R14,CHEKNAME DOES FILENAME (UP TO *) MATCH ? 00256000
  272. BNE LAR7 TRF IF NOT - GO CHECK THE NEXT ONE. 00257000
  273. CHKTYP TM ADTFLG2,ADTFALTY ARE ALL TYPES WANTED ? 00258000
  274. BO CHKMOD BO IF YES. 00259000
  275. EX R15,CHEKTYPE DOES FILETYPE (UP TO *) MATCH ? 00260000
  276. BNE LAR7 TRF IF NOT - GO CHECK THE NEXT ONE. 00261000
  277. * 00262000
  278. CHKMOD TM ADTFLG3,ADTFZERO WAS MODE0 REQUESTED HRC010DS 00263190
  279. BO CHKMOD1 YES, NOTHING PRIVATE ANYMORE HRC010DS 00263380
  280. CLI 25(R7),C'0' FOR A READ-ONLY DISK, P0 = PRIVATHRC010DS 00263570
  281. BE LAR7 TRF IF IT'S P0 (DON'T BRING IT IN) 00264000
  282. CHKMOD1 EQU * HRC010DS 00264500
  283. TM ADTFLG2,ADTFMDRO ALL MODES 1-5 WANTED ? @V305032 00265000
  284. BCR 1,R5 'BO' IF YES, ACCEPT THE FILE. 00266000
  285. CLC PLMOD+1(1,R2),25(R7) IF NOT, MODE MUST MATCH EXACTLY 00267000
  286. BNE LAR7 TRF IF NO MATCH. 00268000
  287. BR R5 'MOVE 40 BYTES' IF MODE IS OK 00269000
  288. * 00270000
  289. RFST13 STM R14,R0,REGSAV0 SAVE R14-R15-R0 IN LOWER SAVE-AREA, 00271000
  290. LA R0,101 INDICATE SIZE OF BLOCK NEEDED @VA04381 00272100
  291. BAL R14,GETSTORE GET FREE STORAGE @VA04381 00272200
  292. ST R1,0(,R3) STORE POINTER AT END OF PREVIOUS ONE 00273000
  293. BAL R14,CLEARFRE CLEAR NEW 808-BYTE BLOCK 00274000
  294. LR R3,R1 LET R3 POINT TO OUR NEW 808-BYTE BLOCK 00275000
  295. MVC 804(4,R3),ADTCHBA PUT IN BACK-POINTER TO PREVIOUS BLOCK 00276000
  296. LA R4,20 SET R4 AGAIN TO 20 00277000
  297. LA R5,MOV40 SET SWITCH BACK TO MOV40 FOR NEXT TIME 00278000
  298. LA R9,1(,R9) INCREMENT COUNT OF FST HYPERBLOCKS 00279000
  299. ST R3,ADTCHBA NEW POINTER TO CURRENT FST HYPERBLOCK 00280000
  300. LM R14,R0,REGSAV0 RESTORE R14-R15-R0 00281000
  301. * 00282000
  302. MOV40 MVC 0(40,R3),0(R7) MOVE ENTRY TO FST HYPERBLOCK 00283000
  303. * 00284000
  304. STM R14,R0,REGSAV0 SAVE R14-R15-R0 IN LOWER SAVE-AREA, 00285000
  305. USING FSTSECT,R3 00286000
  306. LM R0,R1,FSTT FILETYPE INTO R0-R1, 00287000
  307. L R15,ATYPSRCH CALL 'TYPSRCH' TO SEARCH FOR 00288000
  308. BALR R14,R15 OFTEN-USED FILTYPE 00289000
  309. O R15,ADTFTYP-3 'OR' END OF R15 INTO ADTFTYP FLAG-BYTE 00290000
  310. ST R15,ADTFTYP-3 (LEFTMOST 3 BYTES STILL INTACT) 00291000
  311. LA R0,1 R0 = 1 TEMPORARILY, 00292000
  312. STH R0,FSTRP ENSURE THAT READ-POINTER = 1 00293000
  313. CH R0,FSTWP IS WRITE-POINTER PERCHANCE = 1 ? 00294000
  314. BE RESTR0 TRF IF YES (LEAVE WELL ENOUGH ALONE). 00295000
  315. LH R14,FSTIC BUT OTHERWISE ALSO ENSURE 00296000
  316. N R14,F65535 THAT WRITE-POINTER 00297000
  317. AR R14,R0 = NUMBER OF ITEMS PLUS 1. 00298000
  318. STH R14,FSTWP ... 00299000
  319. RESTR0 LM R14,R0,REGSAV0 RESTORE R14-R15-R0 00300000
  320. DROP R3 00301000
  321. LA R6,1(,R6) BUMP NUMBER OF FILES MOVED 00302000
  322. ST R3,ADTCFST SAVE ADDRESS OF LAST ITEM FILLED IN 00303000
  323. LA R3,40(,R3) SET UP FOR NEXT 40-BYTE ENTRY 00304000
  324. BCT R4,LAR7 ITERATE THRU BOTH BLOCKS. 00305000
  325. * 00306000
  326. LA R5,RFST13 SET SWITCH TO GET ANOTHER BLOCK IF NEEDED 00307000
  327. * 00308000
  328. LAR7 LA R7,40(,R7) ITERATE THRU 800-BYTE INPUT BLOCK. 00309000
  329. BCT R8,SRCHLP ... 00310000
  330. L R14,DSKADR GET CORE-ADDRESS OF OLD DISK-ADDRESS, 00311000
  331. LA R14,2(,R14) ADD 2 FOR NEW DISK-ADDRESS, 00312000
  332. BCT R10,REFILL REFILL INPUT BUFFER IF ANY LEFT. 00313000
  333. * 00314000
  334. ST R9,ADTHBCT STORE HYPERBLOCK COUNT, 00315000
  335. ST R6,ADTFSTC AND NUMBER OF FILES (40-BYTE ENTRIES) 00316000
  336. CLI ADTM,S IS IT THE SYSTEM DISK ? @V305066 00317100
  337. BE RFST14 YES - OMIT NEXT SEVERAL INSTR. @V305032 00318100
  338. * 00319000
  339. LM R1,R2,ADTCHBA CURRENT HYPERBLOCK & FST BLOCK, 00320000
  340. SR R2,R1 MAKE LATTER A 'DISPLACEMENT', 00321000
  341. STM R1,R2,ADTLHBA STORE INFO. ON VERY LAST 40-BYTE ENTRY 00322000
  342. TM ADTFLG1,ADTFRO IS THE DISK READ-ONLY ? @V305032 00322100
  343. BO RFST14 YES - OMIT NEXT FEW INSTRUCTIONS @V305032 00322200
  344. A R9,ADTPQM2 COMPUTE ACCURATE RESERVE-COUNT 00323000
  345. AH R9,ADTRES ADD POSS. ADTRES SET UP BY READMFD 00324000
  346. LA R9,1(,R9) ADD 1 FOR POSSIBLE ADDED HYPERBLOCK 00325000
  347. STH R9,ADTRES AND STORE 'RESERVE-COUNT'. 00326000
  348. * 00327000
  349. RFST14 SR R1,R1 CLEAR R1 @V305032 00328100
  350. SR R0,R0 (AND R0), @V305032 00328200
  351. STM R0,R1,ADTCHBA CLEAR CURRENT HYPERBLOCK ADDRESS & DISPL. 00329000
  352. CLI ADTM,S IS IT THE SYSTEM DISK ? @V305066 00329075
  353. BE RFST15 YES - DON'T SORT IT NOW @V305032 00329150
  354. * (DONE LATER VIA CALL FROM DMSINS) 00329225
  355. LR R0,R11 NO - POINT TO ACTIVE DISK TABLE, @V305032 00329300
  356. L R15,=V(SORTFST) SORT ALL THE FST ENTRIES @V305032 00329375
  357. BALR R14,R15 (VIA SUBROUTINE IN DMSALU) @V305032 00329450
  358. TM ADTFLG1,ADTFRW IS IT A READ-WRITE DISK ? @V305032 00329525
  359. BO RFST15 YES - DON'T SET FLAG-BIT @V305032 00329600
  360. OI ADTFLG3,ADTFSORT SET "SORT" FLAG FOR R/O DISKS @V305032 00329675
  361. RFST15 EQU * CONTINUE ... @V305032 00329750
  362. LM R0,R1,JSR0 LOAD STORAGE DESCRIPTORS FOR FRET@VA04381 00330100
  363. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR @VA04381 00330200
  364. TM ADTFLG1,ADTFRW READ-WRITE DISK ? 00332000
  365. BO RFST16 BO IF YES, LEAVE MFD IN CORE. 00333000
  366. LM R0,R1,ADTMFDN BUT IF READ-WRITE, GIVE IT 00334000
  367. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR GIVE IT BACK @VM03083 00335100
  368. XC ADTMFDN(8),ADTMFDN CLEAR THE MFD COUNT & POINTER. 00336000
  369. * (BUT LEAVE ADTFMFD FLAG-BIT SET, FOR NOW) 00337000
  370. * 00338000
  371. * SIGNAL 'CP' (IF RUNNING THEREON) WE'RE THRU READING UFD 00339000
  372. RFST16 DS 0H (TO BE CODED - VIA 'DIAGNOSE' ETC.) 00340000
  373. NI ADTFLG3,255-ADTFORCE CLEAR "ADTFORCE" FLAG, @V305032 00341100
  374. NI UFDBUSY,255-ERBIT TURN OFF OUR UFDBUSY FLAG-BIT, 00342000
  375. LM R0,R15,REGSAV1 RESTORE R0-R14, RETURN-CODE TO R15 00343000
  376. LTR R15,R15 SET CONDITION-CODE FOR CONVENIENCE OF CALLER 00344000
  377. BR R14 AND RETURN TO CALLER. 00345000
  378. * 00346000
  379. * 00347000
  380. * 00348000
  381. RFST18 EQU * ERROR READING DISK ... 00349000
  382. MVI ERRCOD1,01 MAKE IT ERROR 1 (DEVICE ERROR) FOR LOGIN 00350000
  383. RFST19 LM R0,R1,JSR0 LOAD STORAGE DESCRIPTORS FOR FRET@VA04381 00351100
  384. LTR R0,R0 WAS THERE A BUFFER? @VA04381 00351200
  385. BZ RFST20 NO BUFFER IF LENGTH IS ZERO @VA04381 00351300
  386. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR @VA04381 00351400
  387. RFST20 EQU * @VA04381 00351500
  388. ST R9,ADTHBCT STORE HYPERBLOCK-COUNT 00353000
  389. LR R0,R11 POINT TO ACTIVE-DISK-TABLE 00354000
  390. L R15,ARELUFD RELEASE WHATEVER WE'VE GOT 00355000
  391. BALR R14,R15 VIA RELUFD 00356000
  392. B RFST16 GIVE UP (I GUESS). 00357000
  393. * 00358000
  394. CHEKNAME CLC PLNAM(*-*,R2),0(R7) CHECKS FILENAME FOR MATCH (VIA R14) 00359000
  395. CHEKTYPE CLC PLTYP(*-*,R2),8(R7) CHECKS FILETYPE FOR MATCH (VIA R15) 00360000
  396. * 00361000
  397. * 00362000
  398. CHEKSTAR LR R3,R1 SET UP TO CHECK FOR '*' 00363000
  399. LA R4,1 ... 00364000
  400. LA R5,6(,R3) ... 00365000
  401. LOOPSTAR CLI 0(R3),C'*' ASTERISK THERE ? 00366000
  402. BE STARFND TRF IF YES. 00367000
  403. BXLE R3,R4,LOOPSTAR ITERATE THRU FILENAME OR FILETYPE 00368000
  404. STARFND SR R3,R1 SUBTRACT STARTING-POINT (HAVE 0 TO 7 NOW) 00369000
  405. ST R3,0(,R6) STORE "COUNT-1" WHERE WE'RE SUPPOSED TO 00370000
  406. B 4(,R14) AND GO TO 4 BYTES BEYOND USUAL RETURN. 00371000
  407. * 00372000
  408. GETSTORE EQU * @VA04381 00372100
  409. LR R4,R14 SAVE RETURN REGISTER @VA04381 00372200
  410. DMSFREE DWORDS=(0),TYPE=NUCLEUS,ERR=*,TYPCALL=BALR @VA04381 00372300
  411. LTR R15,R15 TEST RETCODE FOR ERROR @VA04381 00372400
  412. BZR R4 RETURN TO CALLER IF NO ERROR @VA04381 00372500
  413. MVI ERRCOD1,5 SIGNAL FREE STORAGE EXHAUSTED @VA04381 00372600
  414. B RFST19 EXIT, SOONEST @VA04381 00372700
  415. * 00373000
  416. CLEARFRE XC 0(208,R1),0(R1) CLEAR FIRST 208 BYTES, 00374000
  417. MVC 208(200,R1),0(R1) NEXT 200 BYTES, 00375000
  418. MVC 408(200,R1),0(R1) THE NEXT 200 BYTES, 00376000
  419. MVC 608(200,R1),0(R1) AND LAST 200 BYTES INCLUDING POINTERS 00377000
  420. BR R14 AND EXIT (VIA R14). 00378000
  421. SPACE 3 00379000
  422. * CONSTANTS ... 00380000
  423. * 00381000
  424. AREADMFD DC A(READMFD) 00382000
  425. ARELUFD DC A(RELUFD) 00383000
  426. * 00384000
  427. S EQU C'S' @V305032 00384100
  428. LTORG 00384200
  429. EJECT 00385000
  430. NUCON 00386000
  431. ADT 00387000
  432. EJECT 00388000
  433. FVS 00389000
  434. SPACE 3 00390000
  435. FSTB 00391000
  436. EJECT 00392000
  437. * DEFINITIONS... 00393000
  438. * 00394000
  439. * PARAMETER-LIST (R2) DISPLACEMENTS... 00395000
  440. PLNAM EQU 8 FILE NAME 00396000
  441. PLTYP EQU 16 FILE TYPE 00397000
  442. PLMOD EQU 24 FILE MODE 00398000
  443. * 00399000
  444. REGEQU 00400000
  445. END 00401000
ibm/vm370-lib/cms/dmsacf.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator