Table of Contents

DMSLAF Source

References

Source Listing

DMSLAF.ASSEMBLE.txt
  1. LAF TITLE 'DMSLAF (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * MODULE NAME: 00005000
  5. * 00006000
  6. * DMSLAF 00007000
  7. * 00008000
  8. * CONTENTS: 00009000
  9. * 00010000
  10. * DMSLAFP 00011000
  11. * DMSLAFNX 00012000
  12. * DMSLAFFE 00013000
  13. * DMSLAFFT 00014000
  14. * 00015000
  15. * SUBROUTINE: 00016000
  16. * 00017000
  17. * DMSLAFP (ACTLKP) 00018000
  18. * 00019000
  19. * FUNCTION: 00020000
  20. * 00021000
  21. * FIND THE ACTIVE FILE TABLE BLOCK WHOSE FILENAME, 00022000
  22. * FILETYPE, AND MODE MATCH THE ONE SUPPLIED BY THE 00023000
  23. * CALLER. 00024000
  24. * 00025000
  25. * ATTRIBUTES: 00026000
  26. * 00027000
  27. * NUCLEUS RESIDENT, RE-ENTRANT 00028000
  28. * 00029000
  29. * ENTRY POINTS: 00030000
  30. * 00031000
  31. * DMSLAFP 00032000
  32. * 00033000
  33. * ENTRY CONDITIONS: 00034000
  34. * 00035000
  35. * L R15, AACTLKP WHERE AACTLKP=V(DMSLAF) 00036000
  36. * BALR R14, R15 00037000
  37. * 00038000
  38. * 00039000
  39. * R0=0: START SEARCH AT BEGINNING OF ACTIVE FILE TABLE. 00040000
  40. * 00041000
  41. * OR 00042000
  42. * 00043000
  43. * R0=NONZERO: GIVEN PRESENT ACTIVE FILE TABLE BLOCK, RESUME 00044000
  44. * SEARCHING AT NEXT AFT BLOCK (IF ANY). 00045000
  45. * 00046000
  46. * R1 MUST POINT TO PARAMETER LIST AS USUAL: 00047000
  47. * 00048000
  48. * DS OF 00049000
  49. * PLIST DC CL8' ' IMMATERIAL 00050000
  50. * DC CL8' ' FILENAME 00051000
  51. * DC CL8' ' FILETYPE 00052000
  52. * DC CL2' ' MODE 00053000
  53. * 00054000
  54. * R13 MUST POINT TO A SAVE-AREA OF AT LEAST TEN WORDS 00055000
  55. * (NORMALLY WOULD POINT TO FVS=DISK$SEG AREA). 00056000
  56. * 00057000
  57. * EXIT CONDITIONS: 00058000
  58. * 00059000
  59. * MATCH FOUND 00060000
  60. * 00061000
  61. * R1=ADDRESS OF MATCHING ACTIVE FILE TABLE BLOCK 00062000
  62. * R15=0 (AND CONDITION-CODE=0) 00063000
  63. * 00064000
  64. * MATCH NOT FOUND 00065000
  65. * 00066000
  66. * R1 SAME AS AT ENTRY 00067000
  67. * R15=1 (AND CONDITION-CODE=2) 00068000
  68. * 00069000
  69. * CALLS TO OTHER ROUTINES: 00070000
  70. * 00071000
  71. * NONE 00072000
  72. * EXTERNAL REFERENCES: 00073000
  73. * 00074000
  74. * AFTSECT 00075000
  75. * 00076000
  76. * TABLES / WORKAREAS: 00077000
  77. * 00078000
  78. * NONE 00079000
  79. * 00080000
  80. * REGISTER USAGE: 00081000
  81. * 00082000
  82. * R15 - BASE 00083000
  83. * R3 - PLIST 00084000
  84. * R13 - ACTSECT 00085000
  85. * R1 - AFTSECT 00086000
  86. * REST- WORK 00087000
  87. * 00088000
  88. * OPERATION: 00089000
  89. * 00090000
  90. * IF R0=0 AT ENTRY, DMSLAF STARTS SEARCHING THE ACTIVE 00091000
  91. * FILE TABLE AT THE FIRST BLOCK (AT FVSAFT). IF 00092000
  92. * R0=NONZERO AT ENTRY, THE GIVEN VALUE IN R0 IS TAKEN 00093000
  93. * AS THE ADDRESS OF THE PRESENT AFT BLOCK, AND 00094000
  94. * SEARCHING COMMENCES WITH THE NEXT BLOCK (IF ANY). 00095000
  95. * (THIS FEATURE FACILITATES SEARCHING FOR MORE THAN ONE 00096000
  96. * MATCHING FILE BY THE CALLING FUNCTION.) 00097000
  97. * 00098000
  98. * DMSLAF EXAMINES EACH BLOCK IN THE ACTIVE FILE TABLE 00099000
  99. * FOR A FILENAME, FILETYPE, AND FILEMODE 00100000
  100. * MATCHING THOSE IN THE PARAMETER LIST. IF THE GIVEN 00101000
  101. * FILENAME AND/OR FILETYPE WAS SPECIFIED AS '*' IN THE 00102000
  102. * PARAMETER LIST, A MATCHING FILENAME OR FILETYPE, 00103000
  103. * RESPECTIVELY, IS ASSUMED. IF THE MODE WAS SPECIFIED 00104000
  104. * AS EITHER '*', BINARY 0, BLANK (X'40'), OR X'FF', THE 00105000
  105. * MODE IS ASSUMED CORRECT. IF NOT, THE GIVEN MODE 00106000
  106. * LETTER MUST EQUAL THE MODE IN THE ACTIVE FILE TABLE 00107000
  107. * BLOCK FOR A MATCH. (IT IS NOT NECESSARY TO CHECK THE 00108000
  108. * MODE NUMBER.) 00109000
  109. * 00110000
  110. * EXIT CONDITIONS ARE RETURNED AS SPECIFIED ABOVE, WITH 00111000
  111. * THE ADDRESS OF THE MATCHING BLOCK (IF ANY) RETURNED 00112000
  112. * IN R1. THE CONDITION-CODE IS SET PER R15, FOR 00113000
  113. * CONVENIENCE OF THE CALLER. 00114000
  114. * 00115000
  115. * SUBROUTINE NAME: 00116000
  116. * 00117000
  117. * DMSLAFNX 00118000
  118. * 00119000
  119. * FUNCTION: 00120000
  120. * 00121000
  121. * FIND THE NEXT (OR FIRST) AFT BLOCK IN THE ACTIVE FILE 00122000
  122. * TABLE. 00123000
  123. * 00124000
  124. * ATTRIBUTES: 00125000
  125. * 00126000
  126. * NUCLEUS RESIDENT, RE-ENTRANT 00127000
  127. * 00128000
  128. * ENTRY POINTS: 00129000
  129. * 00130000
  130. * DMSLAFNX (ACTNXT) 00131000
  131. * 00132000
  132. * ENTRY CONDITIONS: 00133000
  133. * 00134000
  134. * L R15, AACTNXT WHERE AACTNXT=V(DMSLAFNX) 00135000
  135. * BALR R14,R15 00136000
  136. * 00137000
  137. * 00138000
  138. * R1=0: FIND FIRST ACTIVE FILE TABLE BLOCK. 00139000
  139. * OR 00140000
  140. * R1=NONZERO: GIVEN PRESENT ACTIVE FILE TABLE BLOCK, FIND 00141000
  141. * NEXT AFT BLOCK (IF ANY). 00142000
  142. * 00143000
  143. * EXIT CONDITIONS: 00144000
  144. * 00145000
  145. * R1=0: NO MORE BLOCKS IN ACTIVE FILE TABLE. 00146000
  146. * R1=NONZERO: R1 HOLDS ADDRESS OF NEXT (OR FIRST) AFT BLOCK. 00147000
  147. * R15=0 (IN ANY EVENT) (AND CONDITION-CODE=0) 00148000
  148. * 00149000
  149. * CALLS TO OTHER ROUTINES: 00150000
  150. * 00151000
  151. * NONE 00152000
  152. * 00153000
  153. * EXTERNAL REFERENCES: 00154000
  154. * 00155000
  155. * AFTSECT 00156000
  156. * 00157000
  157. * TABLES / WORKAREAS: 00158000
  158. * 00159000
  159. * NONE 00160000
  160. * 00161000
  161. * REGISTER USAGE: 00162000
  162. * 00163000
  163. * R15 - BASE 00164000
  164. * R1 - AFTSECT 00165000
  165. * R14 - RETURN 00166000
  166. * 00167000
  167. * OPERATION: 00168000
  168. * 00169000
  169. * IF R1 =0 AT ENTRY, THE ADDRESS OF THE FIRST ACTIVE 00170000
  170. * FILE TABLE BLOCK (FVSAFT) IS RETURNED. 00171000
  171. * 00172000
  172. * IF R1=NONZERO AT ENTRY, THE GIVEN VALUE IN R1 IS 00173000
  173. * TAKEN AS THE ADDRESS OF THE PRESENT AFT BLOCK, AND 00174000
  174. * THE POINTER TO THE NEXT AFT BLOCK (IF ANY) IS LOADED 00175000
  175. * INTO R1 (WITH THE HIGH-ORDER BYTE STRIPPED OFF). 00176000
  176. * 00177000
  177. * IN EITHER EVENT, NO CHECK IS MADE AS TO WHETHER THE 00178000
  178. * AFT BLOCK WHOSE ADDRESS IS RETURNED CONTAINS AN 00179000
  179. * ACTIVE FILE (THIS BEING DONE BY THE CALLER). 00180000
  180. * 00181000
  181. * DMSLAFNX CAN BE USED (FOR EXAMPLE, BY DMSERS) FOR 00182000
  182. * SCANNING THROUGH THE ACTIVE FILE TABLE FOR PARTICULAR 00183000
  183. * CONDITIONS OTHER THAN MIGHT BE FOUND BY CALLING 00184000
  184. * DMSLAF. 00185000
  185. * 00186000
  186. * NOTE: DMSLAFNX IS AN ENTRY-POINT IN THE ACTLKP 00187000
  187. * ROUTINE. 00188000
  188. * 00189000
  189. * 00190000
  190. * SUBROUTINE NAME: 00191000
  191. * 00192000
  192. * DMSLAFFE (ACTFREE) 00193000
  193. * 00194000
  194. * FUNCTION: 00195000
  195. * 00196000
  196. * FIND AN EMPTY BLOCK IN THE ACTIVE FILE TABLE, OR ADD 00197000
  197. * A NEW BLOCK FROM FREE STROAGE TO THE ACTIVE FILE 00198000
  198. * TABLE, IF NECESSARY, AND PLACE A FILE STATUS TABLE 00199000
  199. * ENTRY (IF GIVEN) INTO THE AFT BLOCK. 00200000
  200. * 00201000
  201. * ATTRIBUTES: 00202000
  202. * 00203000
  203. * NUCLEUS RESIDENT - RE-ENTRANT 00204000
  204. * 00205000
  205. * ENTRY CONDITIONS: 00206000
  206. * 00207000
  207. * 00208000
  208. * R0 MUST POINT TO ACTIVE DISK TABLE. 00209000
  209. * 00210000
  210. * R1 POINTS TO FST ENTRY (OR = 0). 00211000
  211. * 00212000
  212. * R11 MUST POINT TO PARAMETER LIST BELONGING TO CALLER 00213000
  213. * (P-LIST 00214000
  214. * PROVIDED TO DMSBRD, DMSBWR, OR DMSPNT, ETC.). 00215000
  215. * 00216000
  216. * R13 MUST POINT TO A SAVE-AREA OR AT LEAST TEN WORDS 00217000
  217. * (NORMALLY WOULD POINT TO FVS=DISK$SEG AREA). 00218000
  218. * 00219000
  219. * EXIT CONDITIONS: 00220000
  220. * 00221000
  221. * R1 = ADDRESS OF ACTIVE FILE TABLE BLOCK USED OR 00222000
  222. * NEWLY CREATED. 00223000
  223. * 00224000
  224. * R15 =0 (AND CONDITION-CODE = 0). 00225000
  225. * 00226000
  226. * CALLS TO OTHER ROUTINES: 00227000
  227. * 00228000
  228. * DMSFREE 00229000
  229. * 00230000
  230. * EXTERNAL REFERENCES: 00231000
  231. * 00232000
  232. * AFTSECT, ADTSECT, FSTSECT 00233000
  233. * 00234000
  234. * TABLES / WORKAREAS: 00235000
  235. * 00236000
  236. * GETS AN AFT AREA IF NECESSARY. 00237000
  237. * 00238000
  238. * REGISTER USAGE: 00239000
  239. * 00240000
  240. * B12 - BASE 00241000
  241. * B13 - ACTSECT 00242000
  242. * R1 - AFTSECT 00243000
  243. * REST- WORK 00244000
  244. * 00245000
  245. * OPERATION: 00246000
  246. * 00247000
  247. * DMSLAFFE IS CALLED BY DMSBRD, DMSBWR, OR DMSPNT FOR 00248000
  248. * PLACING A 40-BYTE FILE STATUS TABLE ENTRY IN THE 00249000
  249. * ACTIVE FILE TABLE, 00250000
  250. * AFTER A CALL TO DMSLFS OR DMSLFSW TO DETERMINE THE 00251000
  251. * LOCATION OF THE FST ENTRY. (FOR A NEW FILE BEING 00252000
  252. * CREATED BY DMSBWR, R1=0 AT 00253000
  253. * ENTRY INDICATING A NEW FST ENTRY IS ABOUT TO BE 00254000
  254. * CREATED.) 00255000
  255. * 00256000
  256. * DMSLAFFE SCANS THROUGH THE ACTIVE FILE TABLE LOOKING 00257000
  257. * FOR AN EMPTY 00258000
  258. * SLOT, DETERMINED BY THE AFTUSED BIT OF AFTFLG FOR A 00259000
  259. * GIVEN BLOCK BEING 0. IF AN EMPTY BLOCK IS NOT FOUND, 00260000
  260. * A NEW BLOCK IS 00261000
  261. * OBTAINED FROM FREE STORAGE VIA DMSFREE AND CHAINED 00262000
  262. * ONTO THE END 00263000
  263. * OF THE ACTIVE FILE TABLE; AND A BIT (AFTFSF) IS SET 00264000
  264. * TO INDICATE THAT THE BLOCK IS IN FREE STORAGE. 00265000
  265. * 00266000
  266. * AFTER THE EMPTY BLOCK IS FOUND OR CREATED, DMSLAFFE 00267000
  267. * CLEARS THE FIRST 00268000
  268. * 104 BYTES, STORES NECESSARY POINTERS, AND MOVES THE 00269000
  269. * 40-BYTE FST ENTRY (IF PROVIDED) INTO THE SPACE 00270000
  270. * PROVIDED AT AFTFST. 00271000
  271. * 00272000
  272. * THE MODE-LETTER STORED AT AFTM IN THE ACTIVE FILE 00273000
  273. * TABLE IS CAREFULLY CHOSEN FROM THAT OF THE CALLER'S 00274000
  274. * PARAMETER LIST (GIVEN BY R11 AT ENTRY), OR THE ADTM 00275000
  275. * OR ADTMX MODE GIVEN BY THE ACTIVE DISK TABLE. THE 00276000
  276. * STATE FUNCTIONE USES THE SAME ALGORITHM FOR CHOOSING 00277000
  277. * THIS MODE-LETTER. 00278000
  278. * 00279000
  279. * THE RESULT OF THE CHOICE OF MODE-LETTER FACILITATES 00280000
  280. * THE FEATURE OF A READ-ONLY EXTENSION OF A GIVEN DISK. 00281000
  281. * FOR EXAMPLE, IF A C-DISK IS A READ-ONLY EXTENSION OF 00282000
  282. * AN A-DISK AND THE CALLER'S PARAMETER LIST SPECIFIED 00283000
  283. * THE C-MODE, THE MODE STORED WILL BE C; BUT IF THE 00284000
  284. * CALLER SPECIFIED A OR '*', THE MODE STORED WILL BE A. 00285000
  285. * 00286000
  286. * NOTE: DMSLAFFE IS AN ENTRY-POINT IN THE DMSLAF 00287000
  287. * ROUTINE. 00288000
  288. * 00289000
  289. * 00290000
  290. * SUBROUTINE NAME: 00291000
  291. * 00292000
  292. * DMSLAFFT (ACTFRET) 00293000
  293. * 00294000
  294. * FUNCTION: 00295000
  295. * 00296000
  296. * REMOVE AN AFT BLOCK FROM THE ACTIVE FILE TABLE, 00297000
  297. * RETURNING IT TO FREE STORAGE IF APPROPRIATE. 00298000
  298. * 00299000
  299. * ENTRY CONDITIONS: 00300000
  300. * 00301000
  301. * L R15,AACTFRET WHERE AACTFRET=V(DMSLAFFT) 00302000
  302. * BALR R14, R15 00303000
  303. * 00304000
  304. * 00305000
  305. * R1 MUST HOLD THE ADDRESS OF THE AFT BLOCK BEING 00306000
  306. * RETURNED. 00307000
  307. * 00308000
  308. * R13 MUST POINT TO A SAVE-AREA OF AT LEAST TEN WORDS 00309000
  309. * (NORMALLY WOULD POINT TO FVS = DISK$SEG AREA). 00310000
  310. * 00311000
  311. * EXIT CONDITIONS: 00312000
  312. * 00313000
  313. * RETURNED BLOCK WAS IN AFT TABLE 00314000
  314. * 00315000
  315. * R15=0 (AND CONDITION-CODE=0) 00316000
  316. * 00317000
  317. * RETURNED BLOCK WAS NOT IN AFT TABLE 00318000
  318. * 00319000
  319. * R15=1 (AND CONDITION-CODE=2) 00320000
  320. * 00321000
  321. * CALLS TO OTHER ROUTINES: 00322000
  322. * 00323000
  323. * DMSFRET 00324000
  324. * 00325000
  325. * EXTERNAL REFERENCES: 00326000
  326. * 00327000
  327. * AFTSECT 00328000
  328. * 00329000
  329. * TABLES / WORKAREAS: 00330000
  330. * 00331000
  331. * NONE 00332000
  332. * 00333000
  333. * REGISTER USAGE: 00334000
  334. * 00335000
  335. * R12 - BASE 00336000
  336. * R13 - ACTSECT 00337000
  337. * R1 - AFTSECT 00338000
  338. * REST- WORK 00339000
  339. * 00340000
  340. * OPERATION: 00341000
  341. * 00342000
  342. * THE ACTIVE FILE TABLE IS SEARCHED TO FIND THE AFT 00343000
  343. * BLOCK MATCHING THE ADDRESS PROVIDED BY THE CALLER. 00344000
  344. * WHEN IT IS FOUND, THE AFTGLG FLAG-BYTE AND AFTPFST 00345000
  345. * POINTER ARE CLEARED (IT IS NOT NECESSARY TO CLEAR ALL 00346000
  346. * THE OTHER INFORMATION). IF THE AFT 00347000
  347. * BLOCK WAS IN FREE STORAGE, IT IS GIVEN BACK VIA 00348000
  348. * DMSFRET, AND THE CHAIN PATCHED ACCORDINGLY. 00349000
  349. * 00350000
  350. * IF THE AFT BLOCK ADDRESS PROVIDED IN R1 AT ENTRY TIME 00351000
  351. * IS NOT FOUND IN THE ACTIVE FILE TABLE, THIS INDICATES 00352000
  352. * A PROGRAMMING BUG ON THE PART OF THE CALLER. AS A 00353000
  353. * DEBUGGING AID, AN ERROR CODE 1 IS RETURNED. 00354000
  354. * 00355000
  355. * NOTE: DMSLAFFT IS AN ENTRY-POINT IN THE DMSLAF 00356000
  356. * ROUTINE. 00357000
  357. * 00358000
  358. *. 00359000
  359. EJECT 00360000
  360. DMSLAF START 0 00361000
  361. SPACE 00362000
  362. ENTRY ACTLKP P3035 00363000
  363. ACTLKP EQU DMSLAF P3035 00364000
  364. SPACE 00365000
  365. USING *,R15 P3035 00366000
  366. USING ACTSECT,R13 P3035 00367000
  367. STM R12,R5,ACTREGS P3035 00368000
  368. LR R3,R1 COPY POINTER TO PARAMETER LIST 00369000
  369. USING PLSECT,R3 00370000
  370. LA R4,ACTLKP4 (FOR BCR'S) 00371000
  371. LA R5,ACTRET (FOR BCR'S) 00372000
  372. LR R2,R5 DEFAULT R2 TO GO TO "ACTRET" @VA01535 00372100
  373. LTR R1,R0 WAS 'PRESENT' ACTIVE-FILE-TABLE-ENTRY GIVEN? 00373000
  374. BCR 7,R4 BNZ IF YES, GET NEXT ENTRY (IF ANY) AT ACTLKP4 00374000
  375. L R1,ACTAFT LOAD POINTER TO ACTIVE FILE TABLE 00375000
  376. USING AFTSECT,R1 00376000
  377. ACTLKP1 EQU * 00377000
  378. TM AFTFLG,AFTUSED IS ANYTHING THERE AT ALL ? 00378000
  379. BCR 8,R4 'BZ' IF NOT, TRY NEXT ONE. 00379000
  380. CLI PLN,C'*' TEST FOR ASTERISK IN PARAMETER LIST 00380000
  381. BE SETUP1 IF FILENAME = ASTERISK GO SET R2 @VA01535 00381100
  382. CLC PLN(8),AFTN TEST FOR MATCHING FILE NAME 00382000
  383. BCR 7,R4 MOVE TO NEXT AFT BLOCK IF NO MATCH 00383000
  384. CLI PLT,C'*' TEST FOR ASTERISK IN PLACE OF FILE TYPE 00385000
  385. BE SETUP2 IF FILETYPE = ASTERISK GO SET R2 @VA01535 00386100
  386. ACTLKP2 EQU * FILENAME OK; FILETYPE NOT '*' .. @VA03768 00386200
  387. CLC PLT(8),AFTT TEST FOR MATCHING FILE TYPE 00387000
  388. BCR 7,R4 MOVE TO NEXT AFT BLOCK IF NO MATCH 00388000
  389. ACTLKP3 EQU * 00389000
  390. CLI PLM,C'*' TEST FOR ASTERISK IN PLACE OF FILE MODE 00390000
  391. BCR 8,R5 RETURN WITH AFT POINTER IN R1 IF ASTERISK 00391000
  392. CLC PLM(1),AFTM TEST FOR MATCHING FILE MODE 00392000
  393. BCR 8,R2 "BE ACTRET" IF FILENAME AND @VA01535 00393100
  394. * FILETYPE WERE EXPLICITLY SPECIFIED 00393200
  395. * (RETURN WITH AFT POINTER IN R1). 00393300
  396. * OR: "BE CHECKNUM" IF FILENAME AND/OR 00393400
  397. * FILETYPE WAS ASTERISK, TO CHECK THAT 00393500
  398. * MODE NUMBER (IF SPECIFED) IS CORRECT. 00393600
  399. CLI PLM,X'FF' BRANCH IF FILE MODE NOT SPECIFIED 00394000
  400. BCR 8,R5 ... 00395000
  401. CLI PLM,C' ' TEST FOR BLANK IN PLACE OF FILE MODE 00396000
  402. BCR 8,R5 RETURN IF BLANK FILE MODE 00397000
  403. CLI PLM,X'00' TEST FOR ZERO IN PLACE OF FILE MODE 00398000
  404. BCR 8,R5 RETURN WITH AFT POINTER IF ZERO MODE 00399000
  405. CLI PLM,C'(' TEST FOR LEFT PAREN FOR MODE 00400000
  406. BCR 8,R5 RETURN WITH AFT POINTER IF '(' 00401000
  407. ACTLKP4 EQU * 00402000
  408. L R1,AFTPTR LOAD POINTER TO NEXT AFT BLOCK IN CHAIN 00403000
  409. N R1,ADDONLY CHECK ADDRESS OF NEW AFT BLOCK 00404000
  410. BNZ ACTLKP1 KEEP LOOKING IF MORE AFT BLOCK(S). 00405000
  411. B ACTRET1 ERROR 1 IF NOT FOUND. 00406000
  412. SPACE 00406015
  413. SETUP1 LA R2,CHECKNUM FOR FILENAME = ASTERISK, SET R2; @VA03768 00406030
  414. CLI PLT,C'*' FILETYPE ALSO ASTERISK ? @VA03768 00406045
  415. BNE ACTLKP2 NO - HANDLE NORMALLY. @VA03768 00406060
  416. CLI PLM,C'A' WAS THE MODE FROM A TO Z ? @VA03768 00406075
  417. BL ACTLKP3 NO - HANDLE NORMALLY. @VA03768 00406090
  418. CLI PLM,C'Z' CHECK FURTHER ... @VA03768 00406105
  419. BH ACTLKP3 NO - HANDLE NORMALLY. @VA03768 00406120
  420. * FILENAME/FILETYPE BOTH ASTERISK, MODE-LETTER A TO Z: 00406135
  421. L R14,AFTADT REFERENCE THE REAL DISK @VA03768 00406150
  422. USING ADTSECT,R14 ... @VA03768 00406165
  423. CLC PLM(1),ADTM CHECK THE "REAL" DISK MODE @VA03768 00406180
  424. BCR 8,R2 "BE CHECKNUM" IF A "MATCH". @VA03768 00406195
  425. DROP R14 IF NO MATCH, @VA03768 00406210
  426. BR R4 GO DIRECTLY TO ACTLKP4. @VA03768 00406225
  427. SPACE 00406240
  428. SETUP2 LA R2,CHECKNUM FOR FILETYPE = ASTERISK, SET R2 @VA01535 00406250
  429. B ACTLKP3 TO CHECK THE MODE NUMBER LATER. @VA01535 00406300
  430. SPACE 00406350
  431. CHECKNUM EQU * NECESSARY TO CHECK MODE NUMBER: @VA01535 00406400
  432. CLI PLM+1,C' ' TEST FOR BLANK FILE MODE NUMBER @VA01535 00406450
  433. BCR 8,R5 RETURN WITH AFT POINTER IF BLANK @VA01535 00406500
  434. CLC PLM+1(1),AFTM+1 TEST FOR MATCHING FILE MODE NO. @VA01535 00406550
  435. BCR 8,R5 IF MATCH RETURN WITH AFT POINTER @VA01535 00406600
  436. BR R4 NO MATCH - TRY NEXT AFT BLOCK. @VA01535 00406650
  437. SPACE 00406700
  438. DROP R1,R3,R13,R15 00407000
  439. EJECT 00408000
  440. DMSLAFFT DS 0H P3035 00409000
  441. SPACE 00410000
  442. ENTRY DMSLAFFT P3035 00411000
  443. ENTRY ACTFRET P3035 00412000
  444. ACTFRET EQU DMSLAFFT P3035 00413000
  445. SPACE 00414000
  446. USING *,R15 P3035 00415000
  447. USING ACTSECT,R13 P3035 00416000
  448. STM R12,R5,ACTREGS P3035 00417000
  449. DROP R15 00418000
  450. LR R12,R15 ADDRESSABILITY INTO R12 00419000
  451. USING DMSLAFFT,R12 P3035 00420000
  452. LA R2,0(,R1) COPY ADDRESS OF AFT BLOCK 00421000
  453. L R1,ACTAFT START WITH FIRST AFT BLOCK 00422000
  454. USING AFTSECT,R1 00423000
  455. ACTFRT1 EQU * 00424000
  456. CR R2,R1 IS THIS THE BLOCK BEING RETURNED ? 00425000
  457. BE ACTFRT2 BE IF YES. 00426000
  458. LR R3,R1 REMEMBER ADDRESS OF OLD BLOCK 00427000
  459. L R1,AFTPTR POINT TO NEXT AFT BLOCK 00428000
  460. N R1,ADDONLY (ADDRESS BITS ONLY & SET C.C.) 00429000
  461. BNZ ACTFRT1 KEEP CHECKING 00430000
  462. ACTRET1 LM R12,R5,ACTREGS RESTORE REGISTERS 00431000
  463. LA R15,1 ERROR CODE 1 00432000
  464. LTR R15,R15 SET CONDITION-CODE FOR CONVENIENCE OF CALLER 00433000
  465. BR R14 RETURN TO CALLER. 00434000
  466. SPACE 00435000
  467. ACTFRT2 XC AFTFLG(4),AFTFLG CLEAR FLAG & POINTER 00436000
  468. TM AFTPTR,AFTFSF IS THIS SLOT IN FREE STORAGE ? 00437000
  469. BZ ACTRET0 BZ IF NOT (WE'RE ALL DONE). 00438000
  470. MVC AFTPTR+1-AFTSECT(3,R3),AFTPTR+1 PATCH CHAIN 00439000
  471. LA R0,AFTLD LOAD LENGTH OF AFT BLOCK IN DOUBLE WORDS 00440000
  472. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR 00441000
  473. B ACTRET0 00442000
  474. DROP R1,R12,R13 00443000
  475. EJECT 00444000
  476. DMSLAFNX DS 0H P3035 00445000
  477. SPACE 00446000
  478. ENTRY DMSLAFNX P3035 00447000
  479. ENTRY ACTNXT P3035 00448000
  480. ACTNXT EQU DMSLAFNX P3035 00449000
  481. SPACE 00450000
  482. USING *,R15 ADDRESSABILITY 00451000
  483. LTR R1,R1 TEST FOR POINTER 00452000
  484. BZ ACTNXT1 IF NO POINTER FIND FIRST AFT BLOCK 00453000
  485. USING AFTSECT,R1 00454000
  486. L R1,AFTPTR LOAD POINTER TO NEXT AFT BLOCK 00455000
  487. LA R1,0(,R1) (ADDRESS BITS ONLY, FOR CALLER) 00456000
  488. SR R15,R15 SUCCESSFUL 00457000
  489. BR R14 RETURN. 00458000
  490. SPACE 00459000
  491. ACTNXT1 EQU * 00460000
  492. L R1,ACTAFT LOAD POINTER TO FIRST ACTIVE FILE 00461000
  493. SR R15,R15 SUCCESSFUL 00462000
  494. BR R14 RETURN. 00463000
  495. DROP R1,R15 00464000
  496. EJECT 00465000
  497. DMSLAFFE DS 0H P3035 00466000
  498. SPACE 00467000
  499. ENTRY DMSLAFFE P3035 00468000
  500. ENTRY ACTFREE P3035 00469000
  501. ACTFREE EQU DMSLAFFE P3035 00470000
  502. SPACE 00471000
  503. USING *,R15 P3035 00472000
  504. USING ACTSECT,R13 P3035 00473000
  505. STM R12,R5,ACTREGS P3035 00474000
  506. DROP R15 00475000
  507. LR R12,R15 ADDRESSABILITY INTO R12 00476000
  508. USING DMSLAFFE,R12 P3035 00477000
  509. LR R2,R0 COPY ADT POINTER 00478000
  510. LR R3,R1 COPY FST POINTER 00479000
  511. L R1,ACTAFT START WITH CORE-RESIDENT AFT 00480000
  512. USING AFTSECT,R1 ... 00481000
  513. ACTFREE1 TM AFTFLG,AFTUSED IS THERE AN EMPTY SLOT ? 00482000
  514. BZ ACTFREE2 BZ IF YES, USE IT. 00483000
  515. LR R4,R1 REMEMBER OLD AFT BLOCK, 00484000
  516. L R1,AFTPTR POINT TO NEXT AFT BLOCK (IF ANY) 00485000
  517. N R1,ADDONLY ... 00486000
  518. BNZ ACTFREE1 KEEP LOOKING IF THERE IS ONE. 00487000
  519. LA R0,AFTLD LENGTH OF AN AFT-BLOCK IN DOUBLE WORDS 00488000
  520. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR 00489000
  521. DROP R1 (BRIEFLY) 00490000
  522. USING AFTSECT,R4 ... 00491000
  523. IC R5,AFTPTR SAVE OLD FLAG BYTE, 00492000
  524. ST R1,AFTPTR PATCH THE CHAIN - POINT TO NEW BLOCK 00493000
  525. STC R5,AFTPTR PUT BACK OLD FLAG BYTE 00494000
  526. DROP R4 NOW BACK TO NORMAL 00495000
  527. USING AFTSECT,R1 ... 00496000
  528. SR R5,R5 CLEAR POINTER TO NEXT ONE 00497000
  529. ST R5,AFTPTR ... 00498000
  530. MVI AFTPTR,AFTFSF AND INDICATE THIS ONE IS IN FREE STORAGE. 00499000
  531. ACTFREE2 XC AFTSECT(AFTFST-AFTSECT),AFTSECT CLEAR FIRST 104 BYTES, 00500000
  532. ST R3,AFTPFST-1 STORE ADDRESS OF 40-BYTE FST ENTRY 00501000
  533. MVI AFTFLG,AFTUSED AND INIDCATE AFT-ENTRY IN USE 00502000
  534. ST R2,AFTADT STORE ADT POINTER IN AFT 00503000
  535. LTR R3,R3 TEST FOR NO FST BLOCK 00504000
  536. BZ ACTRET BRANCH IF NO FST BLOCK 00505000
  537. MVC AFTFST(FSTL),0(R3) COPY FST-ENTRY TO ACTIVE TABLE 00506000
  538. MVI AFTFB,00 CLEAR FLAG-BYTE IN AFT-BLOCK. 00507000
  539. USING ADTSECT,R2 (REFERENCE ACTIVE-DISK-TABLE) 00508000
  540. USING FSTSECT,R3 (AND FST-TABLE) 00509000
  541. USING PLSECT,R11 REFER TO P-LIST GIVEN TO CALLER 00510000
  542. IC R14,PLM TENTATIVELY CHOOSE MODE IN P-LIST 00511000
  543. CLI PLM,C'A' DID PARAMETER-LIST SPECIFY MODE ? 00512000
  544. BL NOTAZ BL IF NOT. 00513000
  545. CLI PLM,C'Z' (KEEP CHECKING) 00514000
  546. BNH STCR14 BNH IF P-LIST SPECIFIED MODE FROM A TO Z. 00515000
  547. NOTAZ IC R14,ADTM IF NOT, CHOOSE PRIMARY MODE LETTER 00516000
  548. CLI ADTMX,C'A' DOES 'EXTENSION-MODE-LETTER' EXIST ? 00517000
  549. BL STCR14 BL IF NOT (WE'RE ALL SET). 00518000
  550. TM ADTFLG1,ADTFRW IF YES, READ-ONLY OR READ-WRITE ? 00519000
  551. BO STCR14 BO IF READ-WRITE, STAY WITH PRIMARY MODE 00520000
  552. IC R14,ADTMX BUT USE EXTENSION-LETTER IF READ-ONLY DISK 00521000
  553. STCR14 STC R14,AFTM STORE CAREFULLY-CHOSEN MODE-LETTER. 00522000
  554. DROP R2,R3,R11 00523000
  555. ACTRET ST R1,ACTREG1 RETURN WITH VALUE IN R1 00524000
  556. ACTRET0 LM R12,R5,ACTREGS RESTORE REGISTERS 00525000
  557. SR R15,R15 00526000
  558. BR R14 00527000
  559. DROP R1,R12,R13 00528000
  560. EJECT 00529000
  561. *********************************************************************** 00530000
  562. * 00531000
  563. * CONSTANTS AND EXTERNAL ROUTINE LOCATIONS 00532000
  564. * 00533000
  565. *********************************************************************** 00534000
  566. * 00535000
  567. ACTAFT DC V(AFTSTART) ADDRESS OF ACTIVE FILE TABLE 00536000
  568. ADDONLY DC X'00FFFFFF' (TO ISOLATE ADDRESS BITS & SET C.C.) 00537000
  569. SPACE 00538000
  570. LTORG 00539000
  571. SPACE 3 00540000
  572. * 00541000
  573. * ACTLKP FIXED VARIABLE STORAGE 00542000
  574. * 00543000
  575. ACTSECT DSECT 00544000
  576. ACTREGS DS 10F 00545000
  577. ACTREG1 EQU ACTREGS+20 REGISTER 1 00546000
  578. * 00547000
  579. * PARAMETER LIST DSECT 00548000
  580. * 00549000
  581. PLSECT DSECT 00550000
  582. DS D 00551000
  583. PLN DS D FILE NAME 00552000
  584. PLT DS D FILE TYPE 00553000
  585. PLM DS H FILE MODE 00554000
  586. EJECT 00555000
  587. AFT 00556000
  588. ADT 00557000
  589. FSTB 00558000
  590. NUCON 00559000
  591. REGEQU 00560000
  592. END 00561000