User Tools

Site Tools


ibm:vm370-lib:cms:dmsers.assemble_src

DMSERS Source

References

Source Listing

DMSERS.ASSEMBLE.txt
  1. ERS TITLE 'DMSERS (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * MODULE NAME: 00006000
  5. * 00007000
  6. * DMSERS (ERASE) 00008000
  7. * 00009000
  8. * FUNCTION: 00010000
  9. * 00011000
  10. * TO DELETE A FILE OR RELATED GROUP OF FILES FROM 00012000
  11. * READ-WRITE DISK(S). 00013000
  12. * 00014000
  13. * ATTRIBUTES: 00015000
  14. * 00016000
  15. * NUCLEUS RESIDENT 00017000
  16. * 00018000
  17. * ENTRY POINTS: 00019000
  18. * 00020000
  19. * DMSERS 00021000
  20. * 00022000
  21. * ENTRY CONDITIONS: 00023000
  22. * 00024000
  23. * LA R1,PLIST R1 MUST POINT TO P-LIST AS USUAL 00025000
  24. * 00026000
  25. * THEN EITHER 00027000
  26. * 00028000
  27. * SVC X'CA' CALL ERASE VIA SVC 00029000
  28. * DC AL4(ERROR) ERROR-RETURN (FOR EXAMPLE, IF FILE 00030000
  29. * NOT FOUND) 00031000
  30. * OR 00032000
  31. * 00033000
  32. * L R14,AERASE WHERE AERASE=V(DMSERS) 00034000
  33. * BALR R14,R15 CALL ERASE VIA BALR WITHIN NUCLEUS 00035000
  34. * BNZ ERROR TRANSFER IF ERROR (FOR EXAMPLE, FILE 00036000
  35. * NOT FOUND) 00037000
  36. * 00038000
  37. * R1 MUST POINT TO ERASE PARAMETER LIST: 00039000
  38. * DS 0F 00040000
  39. * 00041000
  40. * PLIST DC CL8'ERASE' (IMMATERIAL IF BALR-CALL) 00042000
  41. * DC CL8' ' FILENAME OR '*' 00043000
  42. * DC CL8' ' FILETYPE OR '*' 00044000
  43. * DC CL2' ' FILEMODE OR 'BLANK' 00045000
  44. * DC CL8'(' START OF OPTIONS, IF SUPPLIED 00046000
  45. * DC CL8'TYPE'|'NOTYPE' 00047000
  46. * DC X'FFFFFFFF' DELIMITER (NECESSARY IF FM 00048000
  47. * OMITTED) 00049000
  48. * 00050000
  49. * EXIT CONDITIONS: 00051000
  50. * 00052000
  51. * NORMAL RETURN 00053000
  52. * R15=0 (AND CONDITION - CODE=0) 00054000
  53. * 00055000
  54. * ERROR RETURN 00056000
  55. * R15= NON-ZERO (AND CONDITION CODE 2) 00057000
  56. * RETURN CODE 24 - PARAMETER LIST ERROR 00058000
  57. * RETURN CODE 25 - INSUFFICIENT FREE STORAGE @VA02374 00058500
  58. * RETURN CODE 28 - FILE NOT FOUND 00059000
  59. * RETURN CODE 36 - DISK IS READ-ONLY 00060000
  60. * RETURN CODE 36 - DISK NOT ACCESSED @VA12416 00060500
  61. * 00061000
  62. * CALLS TO OTHER ROUTINES: 00062000
  63. * 00063000
  64. * DMSLAD - LOCATE THE FIRST R/W DISK 00064000
  65. * DMSLAF - FIND THE ACTIVE FILE TABLE FOR THE GIVEN FILE 00065000
  66. * DMSLAFFE -FIND THE NEXT ACTIVE FILE TABLE 00066000
  67. * DMSFNSD - 'DIE' IF PERMANENT ERROR READING DISK 00067000
  68. * DMSFNST - TEMPORARILY CLOSE A FILE 00068000
  69. * DMSFREE - GET FREE STORAGE 00069000
  70. * DMSFRET - RETURN FREE STORAGE 00070000
  71. * DMSLFS - FIND THE SPECIFIED FILE STATUS TABLE 00071000
  72. * DMSTQQ - ALLOCATE A 200 BYTE DISK AREA 00072000
  73. * DMSDIOR - 00073000
  74. * DMSTRKW - 00074000
  75. * DMSAUD - CLOSE ALL FILES AND UPDATE THE USER FILE DIRECTORY 00075000
  76. * DMSCWRB - TYPE A LINE TO THE TERMINAL 00076000
  77. * DMSTQQX - 00077000
  78. * 00078000
  79. * EXTERNAL REFERENCES: 00079000
  80. * 00080000
  81. * ADT - ACTIVE DISK TABLE 00081000
  82. * AFT - ACTIVE FILE TABLE 00082000
  83. * FSTB - FILE STATUS TABLE BLOCK 00083000
  84. * FVS - INFORMATION FOR THE FILE SYSTEM 00084000
  85. * 00085000
  86. * TABLES/WORKAREAS: 00086000
  87. * 00087000
  88. * MISCELLANEOUS CONSTANTS 00088000
  89. * 00089000
  90. * REGISTER USAGE: 00090000
  91. * 00091000
  92. * GPR1 = A(PLIST) 00092000
  93. * GPR12 = BASE REGISTER 00093000
  94. * GPR13 = A(FVS) 00094000
  95. * 00095000
  96. * NOTES: 00096000
  97. * 00097000
  98. * | ERASE IS TREATED AS A "COMMAND" OR A "FUNCTION" 00097100
  99. * | ACCORDING TO THE HIGH-ORDER BYTE OF R1 AT INPUT, VIZ: 00097200
  100. * | IF = X'0C', IT WAS ISSUED AS A COMMAND FROM DMSINT. 00097300
  101. * | IF = X'0D', IT WAS ISSUED FROM AN EXEC FILE (DMSEXT), 00097400
  102. * | WITH "&CONTROL" SET TO EITHER "CMS" OR "ALL". 00097500
  103. * | IF = X'0E', IT WAS ISSUED FROM AN EXEC FILE (DMSEXT), 00097600
  104. * | WITH "&CONTROL OFF" IN EFFECT. 00097700
  105. * | IF < X'0C' OR > X'0E', IT IS ASSUMED TO BE A FUNCTION. 00097800
  106. * 00097900
  107. * | IF DMSERS IS CALLED AS A FUNCTION, THERE IS NO CHECK FOR 00098000
  108. * | THE "(TYPE" OPTION, AND ALL ERROR MESSAGES ARE OMITTED. 00098100
  109. * 00098200
  110. * | ALSO, IF ERASE IS CALLED FROM EXEC WITH "&CONTROL OFF" IN 00098300
  111. * | EFFECT, THE "FILE NOT FOUND" ERROR MESSAGE IS OMITTED. 00098400
  112. * 00099000
  113. * OPERATION: 00100000
  114. * 00101000
  115. * DMSERS CHECKS THE PARAMETER LIST FOR ERRORS BY THE 00102000
  116. * CALLER. THE FILENAME 00103000
  117. * AND FILETYPE MUST EACH BE GIVEN, OR ELSE A ASTERISK 00104000
  118. * IN PLACE OF FILENAME OR FILETYPE TO INDICATE ALL 00105000
  119. * NAMES AND/OR ALL TYPES. THE FILEMODE MAY BE OMITTED 00106000
  120. * IN WHICH CASE THE FIRST READ-WRITE DISK IS ASSUMED. 00107000
  121. * IF NOT OMITTED, THE FILEMODE MUST BE ALPHABETIC. IF 00108000
  122. * ALPHABETIC, A MODE NUMBER IS ACCEPTABLE. 00109000
  123. * 00110000
  124. * FOR EXAMPLE, A CALL OF ERASE * TEXT A5 WOULD ERASE 00111000
  125. * ALL TEXT FILES ON THE A-DISK THAT HAD A MODE NUMBER 00112000
  126. * OF 5. ALL OTHER TEXT FILES ON ANY DISKS WOULD REMAIN 00113000
  127. * INTACT, AND ALL OTHER A5 FILES WOULD REMAIN ALSO. 00114000
  128. * 00115000
  129. * IF ANY ERRORS ARE DETECTED IN THE PARAMETER LIST, 00116000
  130. * ERROR 1 IS RETURNED, AND NOTHING IS ERASED. 00117000
  131. * 00118000
  132. * AFTER CHECKING THE PARAMETER LIST AND SETTING 00119000
  133. * FLAGBITS AS NEEDED, DMSERS CHECKS FOR A 00120000
  134. * GIVEN FILE AND DELETES IT, IF FOUND, USING THE 00121000
  135. * FOLLOWING PROCEDURE: 00122000
  136. * 00123000
  137. * 1. DMSLAF IS CALLED TO DETERMINE IF THE FILE 00124000
  138. * TO BE ERASED IS STILL ACTIVE - THAT IS, IN THE 00125000
  139. * ACTIVE FILE TABLE (AFT). IF IT IS (ONLY A FILE ON 00126000
  140. * A READ-WRITE DISK IS ACCEPTABLE, OF COURSE), THEN 00127000
  141. * IT IS TEMPORARILY CLOSED VIA A CALL TO EFINIS IN 00128000
  142. * THE DMSFNT ROUTINE, WHICH PERFORMS JUST ENOUGH OF 00129000
  143. * THE NORMAL CLOSING STEPS ORDINARILY PERFORMED BY 00130000
  144. * DMSFNS TO PERMIT THE FILE TO BE SUCCESSFULLY 00131000
  145. * ERASED. PROCEEDS 00132000
  146. * THEN TO STEP 3 BELOW. 00133000
  147. * 00134000
  148. * 2. IF NOT FOUND BY DMSLAF, THEN DMSERS CALLS DMSLFS 00135000
  149. * TO FIND THE FILE. IF NOT FOUND, EXIT IS MADE FROM 00136000
  150. * DMSERS AS DESCRIBED IN STEP 14 BELOW. 00137000
  151. * 00138000
  152. * 3. WHEN THE FILE HAS BEEN FOUND EITHER BY DMSLAF (AND 00139000
  153. * DMSFNSE CALLED), OR BY DMSLFSW, THEN DMSFNST IS 00140000
  154. * CALLED TO TEMPORARILY CLOSE ALL OUTPUT FILES FOR 00141000
  155. * THIS 00142000
  156. * PARTICULAR DISK (UNLESS THIS WAS ALREADY 00143000
  157. * ACCOMPLISHED BY AN EARLIER EXCURSION THROUGH THIS 00144000
  158. * PROCEDURE FOR ANOTHER FILE ON THE SAME DISK). 00145000
  159. * 00146000
  160. * 4. DMSERS THEN CHECKS THE TYPE OPTION FLAG BIT TO 00147000
  161. * DETERMINE IF THE USER SPECIFIED 00148000
  162. * THAT THE IDENTIFIER(S) OF THE FILE(S) BEING ERASED 00149000
  163. * ARE TO BE TYPED TO THE CONSOLE. 00150000
  164. * IF THE BIT IS ON, THE PLIST IS SET UP, AND A CALL 00151000
  165. * IS MADE TO DMSCWR. 00152000
  166. * 00153000
  167. * 5. BEFORE RELEASING ANY TRACKS BELONGING TO THE FILE 00154000
  168. * THAT HAS BEEN FOUND, DMSERS CALLS A SPECIAL ENTRY 00155000
  169. * IN THE DMSAUD ROUTINE TO RESERVE ENOUGH DISK 00156000
  170. * RECORDS FOR A NEW FILE DIRECTORY TO BE UPDATED 00157000
  171. * WHEN THE FILE HAS BEEN ERASED. THIS PROCEDURE IS 00158000
  172. * PART OF CMS'S DOUBLE DIRECTORY SCHEME, AND ENSURES 00159000
  173. * THAT THE FILE DIRECTORY FOR THE DISK FROM WHICH 00160000
  174. * THE FILE IS BEING ERASED IS UPDATED WHEN AND ONLY 00161000
  175. * WHEN THE ERASE HAS BEEN COMPLETED. (IF ANY SYSTEM 00162000
  176. * MALFUNCTION OR USER INTERVENTION INTERRUPTS THE 00163000
  177. * PROCESS BEFORE COMPLETION, THE OLD FILE DIRECTORY 00164000
  178. * AND THE FILE BEING ERASED ARE BOTH STILL INTACT.) 00165000
  179. * 00166000
  180. * 6. THEN (UNLESS IT IS ALREADY AVAILABLE), 1000 BYTES 00167000
  181. * OF FREE STORAGE ARE OBTAINED VIA 00168000
  182. * DMSFREE, FOR USE IN READING IN THE FIRST AND OTHER 00169000
  183. * (IF ANY) CHAIN LINKS OF THE FILE. 00170000
  184. * 00171000
  185. * 7. NEXT THE FIRST CHAIN LINK OF THE FILE IS READ INTO 00172000
  186. * CORE, INTO THE FIRST 200 BYTES OF 00173000
  187. * FREE STORAGE AREA, VIA DMSDIOR. 00174000
  188. * 00175000
  189. * 8. THE DATA BLOCKS POINTED TO BY THE FIRST CHAIN LINK 00176000
  190. * ARE THEN RELEASED VIA DMSTRKX, AND THE FIRST CHAIN 00177000
  191. * LINK ITSELF VIA DMSTQQX (THE FIRST CHAIN LINK 00178000
  192. * REMAINING IN CORE, HOWEVER). 00179000
  193. * 00180000
  194. * 9. IF ANY DATA BLOCKS REMAIN, ACCORDING TO THE FSTDBC 00181000
  195. * DATA-BLOCK-COUNT IN THE FST ENTRY, THEN ADDITIONAL 00182000
  196. * CHAIN LINKS ARE READ INTO CORE, AS POINTED TO BY 00183000
  197. * THE FIRST CHAIN LINK. FOR EACH OF THESE NTH CHAIN 00184000
  198. * LINKS, THE DATA BLOCKS POINTED TO THEREBY ARE 00185000
  199. * RELEASED VIA DMSTRKX, AND THEN THE CHAIN LINK 00186000
  200. * ITSELF. THIS PROCESS CONTINUES, WITH 00187000
  201. * A COUNT OF DATA BLOCKS RETURNED BEING DECREMENTED, 00188000
  202. * UNTIL THERE ARE NONE LEFT, OR ALL AVAILABLE CHAIN 00189000
  203. * LINKS HAVE BEEN EXHAUSTED. 00190000
  204. * 00191000
  205. * 10. AT THIS POINT, ALL DATA BLOCKS AND CHAIN LINKS 00192000
  206. * HAVE BEEN GIVEN BACK TO THE QMSK AND 00193000
  207. * QQMSK VIA APPROPRIATE CALLS TO DMSTRKX AND THE ONE 00194000
  208. * CALL TO DMSTQQX. NOW A CHECK IS MADE 00195000
  209. * TO SEE IF PERCHANCE THE FILE BEING ERASED HAPPENS 00196000
  210. * TO BE CONTAINED IN STATEFST. IF SO, 00197000
  211. * THE CONTENTS OF STATEFST ARE CLEARED TO REFLECT HRC015DS 00198100
  212. * THE DELETION OF THE GIVEN FILE. (NOTE - DMSBRD 00199000
  213. * UTILIZES THE STATEFST INFORMATION IN SOME 00200000
  214. * CIRCUMSTANCES; THUS IT MUST BE EITHER CORRECT OR 00201000
  215. * NULL.) 00202000
  216. * 00203000
  217. * 11. NEXT PROVISIONS ARE MADE TO KEEP THE FST 00204000
  218. * HYPERBLOCKS COMPACTED, FOR THE DISK ON WHICH THE 00205000
  219. * FILE WAS FOUND AND ERASED. IN THIS PROCESS, THE 00206000
  220. * LAST FST ENTRY FOR THE DISK INVOLVED IS MOVED TO 00207000
  221. * WHERE THE FST ENTRY WAS FOR THE FILE THAT WE JUST 00208000
  222. * ERASED, AND THE 00209000
  223. * PLACE FROM WHICH IT WAS MOVED IS CLEARED. A CHECK 00210000
  224. * IS MADE OF THE ACTIVE FILE TABLE VIA DMSLAFNX 00211000
  225. * IN CASE AN ACTIVE FILE ENTRY POINTS TO THE FILE 00212000
  226. * MOVED, IN WHICH CASE THE POINTER IS CORRECTED; THE 00213000
  227. * POINTER FOLLOWING STATEFST IS ALSO CHECKED, AND 00214000
  228. * CORRECTED IF NECESSARY. IN ANY EVENT, THE 00215000
  229. * COMPACTING IS CAREFULLY ACCOMPLISHED, WITH ALL 00216000
  230. * POINTERS, DISPLACEMENTS, BLOCK COUNTS, ETC., BEING 00217000
  231. * CORRECTED AS NECESSARY. 00218000
  232. * 00219000
  233. * 12. FINALLY, A CALL TO THE OTHER ENTRY OF DMSAUD 00220000
  234. * IS MADE TO COMPLETE THE UPDATING OF 00221000
  235. * THE FILE DIRECTORY FOR THE DISK INVOLVED. 00223000
  236. * 00224000
  237. * 13. AT THIS POINT, IF THE ENTIRE FST HYPERBLOCK AND 00225000
  238. * THE LAST FST ENTRY IN THE PRECEDING HYPERBLOCK 00226000
  239. * HAVE ALL BECOME CLEAR, THE LAST HYPERBLOCK IS 00227000
  240. * RETURNED TO FREE STORAGE, AND ALL POINTERS AND 00228000
  241. * COUNTS CORRECTED ACCORDINGLY. (THIS IS DONE TO 00229000
  242. * AVOID KEEPING A NUMBER OF EMPTY HYPERBLOCKS IN 00230000
  243. * CORE IN CASE A LARGE NUMBER OF FILES ARE ERASED.) 00231000
  244. * 00232000
  245. * 14. FINALLY, THE ENTIRE PROCEDURE IS REPEATED STARTING 00233000
  246. * AT STEP 1, IF THE PARAMETER LIST SPECIFIED ALL 00234000
  247. * NAMES, TYPES, OR MODES. 00235000
  248. * 00236000
  249. * 15. WHEN ALL APPROPRIATE ERASING (IF ANY) HAS BEEN 00237000
  250. * COMPLETED, DMSERS RETURNS THE 1000-BYTE 00238000
  251. * BUFFER TO FREE STORAGE, AND EXISTS TO THE CALLER 00239000
  252. * WITH THE APPROPRIATE ERROR CODE. 00240000
  253. * 00241000
  254. * IF NO FILES AT ALL WERE ERASED, DMSERS RETURNS AN 00242000
  255. * ERROR CODE 2, BUT WITHOUT AN ERROR MESSAGE. (SEVERAL 00243000
  256. * SYSTEM PROGRAMS CALL DMSERS TO ELIMINATE OLD 00244000
  257. * LISTINGS, OLD TEXT FILES, ETC., IN CASE THEY MIGHT 00245000
  258. * EXIST, SO THAT AN ERROR MESSAGE FOR FILE NOT FOUND IN 00246000
  259. * DMSERS ITSELF WOULD BE IMPRACTICAL.) 00247000
  260. * 00248000
  261. * SEVERAL ERROR CONDITIONS ARE DETECTED BY DMSERS. ON 00249000
  262. * ONE OF THESE, A PERMANENT I/O ERROR IN READING IN A 00250000
  263. * CHAIN LINK DUE TO HARDWARE DISK ERRORS, DMSERS 00251000
  264. * PURPOSELY INVOKES 00252000
  265. * THE CODE AT DMSFNSD (WITHIN THE FINIS COMMAND) TO 00253000
  266. * LEAVE THE FILE DIRECTORY INTACT UNTIL 00254000
  267. * THE DISK ERROR CAN BE CORRECTED. 00255000
  268. * 00256000
  269. * ON ALL OTHERS, WHEN THE ERROR IS DETECTED, DMSERS 00257000
  270. * CEASES TO GIVE BACK RECORDS USING 00258000
  271. * DMSTKX AND/OR DMSTQQX, BUT DELETES THE FILES AND 00259000
  272. * COMPACTS THE DIRECTORY AS USUAL. AN ERROR 3 IS GIVEN 00260000
  273. * ON EXIT, WHEN DMSERS IS FINISHED. 00261000
  274. * 00262000
  275. * THIS FEATURE MAKES IT FEASIBLE TO ERASE A FAULTY FILE 00263000
  276. * FROM ONE'S DIRECTORY WITHOUT ENDANGERING THE 00264000
  277. * INTEGRITY OF OTHER FILES ON THE SAME DISK. 00265000
  278. * 00266000
  279. *. 00267000
  280. EJECT 00268000
  281. DMSERS START 0 00269000
  282. ERASE EQU * 00270000
  283. SPACE 00271000
  284. ENTRY ERASE 00272000
  285. EXTRN DISKDIE 00273000
  286. SPACE 00274000
  287. USING NUCON,R0 00275000
  288. L R15,AFVS A(FVS) INTO R15 00277000
  289. USING FVSECT,R15 00278000
  290. STM R0,R14,REGSAV1 SAVE REGISTERS. 00279000
  291. DROP R15 00280000
  292. LR R13,R15 REFERENCE FVS INFO. 00281000
  293. USING FVSECT,R13 00282000
  294. BALR R12,0 ESTABLISH OUR OWN ADDRESSIBILITY 00283000
  295. SPACE 00284000
  296. USING *,R12 00285000
  297. OI UFDBUSY,ERBIT SET OUR BIT IN THE UFDBUSY FLAG. 00286000
  298. XC FVSERAS0(12),FVSERAS0 CLEAR 3 WORDS OF ERASE STORAGE, 00287000
  299. MVI ERSFLAG,QUIET DEFAULT FLAG FOR A FUNCTION CALL @VA01154 00288100
  300. LA R1,0(,R1) MAKE PLIST REGISTER PRESENTABLE. 00289000
  301. ST R1,FVSERAS1 STORE R1 FOR USE BY ACTLKP & FSTLKP. 00290000
  302. MVI ERRCOD1,00 INITIALIZE RETURN CODE TO ZERO. 00291000
  303. CLI REGSAV1+4,X'0C' CALLED AS COMMAND FROM "INIT" ? @VA01154 00292100
  304. BL PRESCAN IF < X'0C', TREAT AS A FUNCTION @VA01154 00292200
  305. CLI REGSAV1+4,X'0E' CALLED AS COMMAND FROM "EXEC" ? @VA01154 00292300
  306. BH PRESCAN IF > X'0E', TREAT AS A FUNCTION @VA01154 00292400
  307. MVI ERSFLAG,00 CLEAR FLAG IF IT'S A "COMMAND" @VA01154 00292500
  308. * SCAN FOR PARAMETER LIST ERRORS 00295000
  309. PRESCAN LA R2,ERR1 INITIALIZE ERROR PATH. 00296000
  310. LA R3,PARMCKN AND THE CONTINUATION PATH. 00297000
  311. BALR R6,0 MIGHT AS WELL MARK THE SPOT. 00298000
  312. SCAN LA R1,8(,R1) INCREMENT THE PLIST POINTER. 00299000
  313. CLI 0(R1),X'FF' END OF PARAMETERS? 00300000
  314. BCR 8,R2 YES. THEN, DONE WITH SCAN. 00301000
  315. CLI 0(R1),C'(' IS THERE AN OPTION LIST? 00302000
  316. BE OPTSCAN YES. GO DECIPHER IT. 00303000
  317. BR R3 GO TO THE PROPER ROUTINE. 00304000
  318. EJECT 00305000
  319. PARMCKN LA R2,ERR1 RESET ERROR PATH. 00306000
  320. LA R3,PARMCKT AND CONTINUATION PATH. 00307000
  321. LA R4,ERR2 AND ALSO BE READY FOR JUNK FILEID. 00308000
  322. BAL R5,CKSTAR EVALUATE FILENAME. 00309000
  323. OI ERSFLAG,ALLNAMES SIGNAL ANYTHING WILL DO. 00310000
  324. BR R6 CONTINUE. 00311000
  325. SPACE 00312000
  326. PARMCKT LA R2,CHECKALL SET CONTINUED... 00313000
  327. LA R3,PARMCKM ...SCAN PATHS. 00314000
  328. BAL R5,CKSTAR EVALUATE FILETYPE. 00315000
  329. OI ERSFLAG,ALLTYPES ANYTHING GOES. 00316000
  330. BR R6 CONTINUE. 00317000
  331. SPACE 00318000
  332. PARMCKM LA R2,CHECKALL RESET CONTINUATION PATH. 00319000
  333. LA R3,ERR3 AND ERROR PATH. 00320000
  334. LA R4,ERR2 AND THE OTHER ONE P1035 00321000
  335. BAL R5,CKSTAR EVALUATE FILEMODE. 00322000
  336. OI ERSFLAG,ALLMODES ANYOLD MODE IS FINE. 00323000
  337. TM ERSFLAG,ALLNAMES+ALLTYPES+ALLMODES 00324000
  338. BO ERR6 '* * *' IS NOT ALLOWED. 00325000
  339. CLI 0(R1),C'*' WAS MODE AN ASTERISK? 00326000
  340. BNE CKLET BETTER VERIFY IT THEN. 00327000
  341. TM ERSFLAG,QUIET WAS THIS A FUNCTION CALL? 00328000
  342. BCR 1,R2 ALL DONE IF SO. 00329000
  343. BR R6 GO LOOK AT NEXT PARAMETER (IF ANY) 00330000
  344. CKLET LA R4,ERR2D SET BADMODE VECTOR V0006 00331100
  345. CLI 0(R1),C'A' MAKE SURE THAT MODE IS V0006 00331150
  346. BLR R4 GREATER THAN OR EQUAL TO 'A' HRC002DS 00332490
  347. CLI 0(R1),C'I' AND LESS THAN OR EQUAL TO 'I' HRC002DS 00332980
  348. BNH CKNUM AND NOT IN THE RANGE HRC002DS 00333470
  349. CLI 0(R1),C'J' MAKE SURE THAT MODE IS HRC002DS 00333960
  350. BLR R4 GREATER THAN OR EQUAL TO 'J' HRC002DS 00334450
  351. CLI 0(R1),C'R' AND LESS THAN OR EQUAL TO 'R' HRC002DS 00334940
  352. BNH CKNUM AND NOT IN THE RANGE HRC002DS 00335430
  353. CLI 0(R1),C'S' MAKE SURE THAT MODE IS HRC002DS 00335920
  354. BLR R4 GREATER THAN OR EQUAL TO 'S' HRC002DS 00336410
  355. CLI 0(R1),C'Z' AND LESS THAN OR EQUAL TO 'Z' HRC002DS 00336900
  356. BHR R4 AND NOT IN THE RANGE HRC002DS 00337390
  357. CKNUM CLI 1(R1),C' ' IS ONLY A MODE LETTER SPECIFIED? 00339000
  358. BNE MODECK CORRECT. 00340000
  359. TM ERSFLAG,ALLNAMES+ALLTYPES '* *' ALREADY? 00341000
  360. BO ERR6 NOT ALLOWED. 00342000
  361. TM ERSFLAG,QUIET IS THIS A FUNCTION CALL? 00343000
  362. BCR 1,R2 IF SO, WE'RE DONE. 00344000
  363. BR R6 CONTINUE. 00345000
  364. MODECK CLI 1(R1),C'0' MAKE SURE THAT THE MODENUMBER IS 00346000
  365. BCR 4,R4 NOT LESS THAN 0 00347000
  366. CLI 1(R1),C'5' OR 00348000
  367. BCR 2,R4 GREATER THAN 5. 00349000
  368. TM ERSFLAG,QUIET (UNLESS CALLED AS 00350000
  369. BCR 1,R2 A FUNCTION) 00351000
  370. CLI 2(R1),C' ' OR MORE THAN 2 CHARACTERS. 00352000
  371. BCR 7,R4 OTHERWISE, THESE ALSO 00353000
  372. BR R6 WILL BE ERRORS. 00354000
  373. SPACE 00355000
  374. CKSTAR CLI 0(R1),C'*' IS THERE AN ASTERISK? 00356000
  375. BNE 4(,R5) NO. RETURN. 00357000
  376. CLI 1(R1),C' ' MUST BE FOLLOWED BY A BLANK. 00358000
  377. BCR 8,R5 OKAY. 00359000
  378. BR R4 ERROR 00360000
  379. SPACE 00361000
  380. OPTSCAN L R2,FVSERAS1 GET PLIST POINTER. 00362000
  381. LA R2,24(,R2) GET REASONABLE POSITION FOR PARENTHESIS. 00363000
  382. CR R1,R2 HOW ARE WE DOING? 00364000
  383. BL ERR1 BADLY. 00365000
  384. CLI 8(R1),X'FF' IS IT A BARE PARENTHESIS? 00366000
  385. BE CHECKALL YES, THEN WE ARE DONE. 00367000
  386. LA R5,7 GET THE LENGTH OF AN OPTION. 00368000
  387. LA R1,8(,R1) POINT TO THE OPTION SUPPLIED. 00369000
  388. LA R3,OPTIONS-8 FIND THE OPTION TABLE (OFFSET A LITTLE). 00370000
  389. LA R4,NUMOPTS GET THE NUMBER OF OPTIONS. 00371000
  390. LR R2,R1 MAKE A COPY OF THE POINTER. 00372000
  391. CKBLANK LA R2,1(,R2) POINT INTO THE FIELD. 00373000
  392. CLI 0(R2),C' ' HAVE WE FOUND A BLANK? 00374000
  393. BE GOTLN YES. THEN LET'S GO ON. 00375000
  394. BCT R5,CKBLANK KEEP TRYING. 00376000
  395. GOTLN SR R2,R1 GOT THE LENGTH BY NOW. 00377000
  396. BCTR R2,0 BUT IT'S TOO HIGH BY 1. 00378000
  397. CKNXT LA R3,8(,R3) POINT INTO THE OPTION TABLE. 00379000
  398. EX R2,CKMATCH COMPARE SOMETHING AGAINST SOMETHING ELSE. 00380000
  399. BE OPTFND WE GOT A MATCH! 00381000
  400. BCT R4,CKNXT BETTER LUCK NEXT TIME. 00382000
  401. B ERR5 THERE IS NO NEXT TIME. 00383000
  402. SPACE 00384000
  403. CKMATCH CLC 0(*-*,R3),0(R1) 00385000
  404. SPACE 00386000
  405. OPTFND CLI 0(R1),C'T' WAS IT TYPE (ONLY 'T' SO FAR)? 00387000
  406. BNE PARTDONE NO, SO DON'T SET THE FLAG. 00388000
  407. OI ERSFLAG,TYPEM FLAG THAT THE USER WANTS TO WATCH. 00389000
  408. PARTDONE LA R1,8(,R1) CHECK FOR ADDITIONAL PARAMETERS. 00390000
  409. CLI 0(R1),X'FF' ARE THERE ANY? 00391000
  410. BE CHECKALL NO, THEN WE ARE DONE. 00392000
  411. CLI 0(R1),C')' DID HE BALANCE HIS PARENTHESES? 00393000
  412. BNE ERR3 WITH SOMETHING WEIRD, APPERENTLY. 00394000
  413. LA R1,8(,R1) ANYTHING BEYOND THIS SYNTACTIC ELEGANCE? 00395000
  414. CLI 0(R1),X'FF' WELL? 00396000
  415. BNE ERR3 YES, BUT CAN'T IMAGINE WHAT. 00397000
  416. CHECKALL TM ERSFLAG,ALLNAMES+ALLTYPES+ALLMODES '* * *'? 00398000
  417. BO ERR6 NOT ALLOWED. 00399000
  418. CKM L R1,FVSERAS1 GET STARTING ADDRESS OF THE PLIST. 00400000
  419. TM ERSFLAG,ALLMODES WAS MODE AN ASTERISK? 00401000
  420. BO MAINLOOP DON'T WORRY, IF SO. 00402000
  421. CLI 24(R1),C'A' WAS IT A PARENTHESIS? 00403000
  422. BL CKA MOST LIKELY. 00404000
  423. CLI 24(R1),C'Z' OR POSSIBLY A FENCE? 00405000
  424. BNH MAINLOOP PROBABLY NOT. 00406000
  425. CKA TM ERSFLAG,ALLNAMES+ALLTYPES WAS IT ' * * '? 00407000
  426. BO ERR6 NOT ALLOWED. 00408000
  427. OI ERSFLAG,FRSTONLY SET APPROPRIATE BIT P0589 00410000
  428. LA R1,DMODE-24 POINT TO THE DEFAULT MODE-LETTER. V0268 00411100
  429. L R15,=V(DMSLADW) CALL ADTLKP TO FIND 00412000
  430. BALR R14,R15 THE FIRST READ-WRITE DISK. 00413000
  431. BNZ ERR2X V0268 00414100
  432. ST R1,ADTADD STORE ADT ADDRESS IN A HANDY PLACE. 00419000
  433. SPACE 00420000
  434. MAINLOOP SR R0,R0 R0=0 TO SEARCH FROM THE BEGINNING 00421000
  435. ERAS02 L R1,FVSERAS1 SEARCH ACTIVE-TABLE 00422000
  436. L R15,AACTLKP CALL ACTLKP 00423000
  437. BALR R14,R15 ... 00424000
  438. BZ FOUND1 BRANCH IF ACTLKP FOUND IT. 00425000
  439. LM R0,R1,FVSERAS0 IF NOT, RE-LOAD R0 AND R1 AND 00426000
  440. L R15,=V(DMSLFSW) CALL 'FSTLKW' 00427000
  441. BALR R14,R15 ... 00428000
  442. BZ FOUND2 'FOUND' IF CONDITION-CODE = 0 00429000
  443. * 00430000
  444. ERAS02A TM ERSFLAG,UPNEED UPDATE OF UFD NEEDED ? 00431000
  445. BZ ERAS04 TRF IF NOT. 00432000
  446. ERAS03 L R0,FVSERAS0 A (ACTIVE-DISK-TABLE) INTO R0, 00433000
  447. SR R1,R1 ZERO OUT A REGISTER. V0636 00434100
  448. BCTR R1,0 NOW, MAKE IT NEGATIVE. V0636 00434200
  449. L R15,AUPDISK FINISH UPDATING THE DIRECTORY 00435000
  450. BALR R14,R15 ... 00436000
  451. * 00437000
  452. * GIVE BACK FREE STORAGE IF WE USED ANY ... 00438000
  453. ERAS04 L R1,FVSERAS2 GET ADDRESS OF FREE STORAGE. 00439000
  454. LTR R1,R1 DID WE USE ANY FREE STORAGE AT ALL ? 00440000
  455. BZ ERR2 (NOTHING ERASED) 00441000
  456. * CALL FRET TO RELEASE 1000 BYTES 00442000
  457. LA R0,125 SET THE NUMBER OF DWORDS. V0636 00443100
  458. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR V0636 00443200
  459. L R15,ERRCOD1-3 ERROR-CODE (0 IF ALL WENT WELL) INTO R15 00444000
  460. * 00445000
  461. EXIT KXCHK ERBIT CHECK FOR 'KX' WANTED... 00446000
  462. LM R0,R14,REGSAV1 RESTORE R0-R14 00447000
  463. LTR R15,R15 SET CONDITION-CODE FOR CONVENIENCE OF CALLER 00448000
  464. BR R14 RETURN TO SVCINT OR CALLER. 00449000
  465. EJECT 00450000
  466. FOUND1 DS 0H FILE-TO-BE-ERASED 'FOUND' BY ACTLKP ... 00451000
  467. USING AFTSECT,R1 (BRIEFLY) 00452000
  468. L R11,AFTADT GET POINTER TO ACTIVE-DISK-TABLE 00453000
  469. USING ADTSECT,R11 REFERENCE SAME 00454000
  470. TM ADTFLG1,ADTFRW IS THIS A READ-WRITE DISK ? 00455000
  471. LR R0,R1 IF NOT, SET UP R0 AS NEEDED 00456000
  472. BZ ERAS02 AND RESUME SEARCHING. 00457000
  473. TM ERSFLAG,FRSTONLY FIRST R/W DISK ONLY WANTED ? 00458000
  474. BZ FOUND1A BZ IF NOT (DON'T WORRY ABOUT IT). 00459000
  475. C R11,ADTADD IS THE DISK FOUND THE FIRST R/W DISK ? 00460000
  476. BNE ERAS02 IF NOT, FORGET IT & RESUME SEARCHING. 00461000
  477. FOUND1A LR R0,R11 IF READ-WRITE, SET R0 TO ACT. DISK TABLE 00462000
  478. L R15,ATFINIS CLOSE FILE VIA NEW FUNCTION 'EFINIS' 00463000
  479. BALR R14,R15 WITHOUT CALLING UPDISK OR SUCH. 00464000
  480. L R2,AFTPFST-1 REMEMBER ITS ADDRESS (IF ANY) IN FST-TABLES 00465000
  481. LA R2,0(,R2) (STRIP OFF LIKELY FLAG-BYTE) 00466000
  482. LH R6,AFTFCL GET FIRST-CHAIN-LINK DISK-ADDRESS, 00467000
  483. LH R7,AFTDBC AND NO. OF 800-BYTE DATA BLOCKS 00468000
  484. DROP R1 ... 00469000
  485. L R15,AACTFRET NOW GIVE BACK THE ACTIVE-FILE-TABLE 00470000
  486. BALR R14,R15 (PURPOSELY LEFT THERE FOR US BY EFINIS) 00471000
  487. B FOUND3 AND JOIN FORCES BELOW. 00472000
  488. * 00473000
  489. FOUND2 DS 0H FILE-TO-BE-ERASED 'FOUND' BY FSTLKW ... 00474000
  490. LR R11,R0 REFERENCE THE ACTIVE-DISK-TABLE 00475000
  491. TM ERSFLAG,FRSTONLY FIRST R/W DISK ONLY WANTED ? 00476000
  492. BZ FOUND2A BZ IF NOT (DON'T WORRY ABOUT IT). 00477000
  493. C R11,ADTADD IS THE DISK FOUND THE FIRST R/W DISK ? 00478000
  494. BNE ERAS02A TRF IF NOT, STOP SEARCHING, GO FINISH UP. 00479000
  495. FOUND2A OI FVSERAS1,X'80' SET SIGN-BIT 'ON' IN 'R1' FOR NEXT TIME 00480000
  496. LR R2,R1 REMEMBER ITS ADDRESS IN FST-TABLES FOR LATER 00481000
  497. USING FSTSECT,R2 REFERENCE IT BRIEFLY, 00482000
  498. LH R6,FSTFCL GET FIRST-CHAIN-LINK DISK-ADDRESS, 00483000
  499. LH R7,FSTDBC AND NO. OF 800-BYTE DATA BLOCKS 00484000
  500. DROP R2 00485000
  501. FOUND3 EQU * JOIN FORCES WHETHER FOUND BY ACTLKP OR FSTLKW 00486000
  502. L R1,FVSERAS0 "OLD" ACTIVE-DISK-TABLE (IF ANY) INTO R1, 00487000
  503. CR R11,R1 IS "THIS" ADT THE SAME AS THE OLD ONE ? 00488000
  504. BE FOUND4A TRF IF YES - NO TFINIS OR UPDISK NEEDED. 00489000
  505. LTR R0,R1 DOES OLD ACTIVE-DISK-TABLE EXIST AT ALL ? 00490000
  506. BZ FOUND4 IF NOT (1ST TIME THRU), CALL 'TFINIS' ETC 00491000
  507. SR R1,R1 ZERO OUT A REGISTER. V0636 00492100
  508. BCTR R1,0 NOW, MAKE IT NEGATIVE. V0636 00492200
  509. L R15,AUPDISK 'FINISH' UPDATING DIRECTORY FOR OLD DISK 00493000
  510. BALR R14,R15 ... 00494000
  511. TM ERSFLAG,FRSTONLY WAS FIRST R/W DISK ONLY WANTED ? 00495000
  512. BO ERAS04 TRF IF YES -EXIT RIGHT NOW, MAN. 00496000
  513. SR R1,R1 R1 MUST = 0 NOW 00497000
  514. FOUND4 EQU * CLOSE ANY OPEN FILES... 00498000
  515. LR R0,R11 SET R0 FOR NEW ACTIVE DISK TABLE 00500000
  516. ST R11,FVSERAS0 STORE NEW ACTIVE-DISK-TABLE ADDRESS, 00501000
  517. L R15,ATFINIS CALL 'TFINIS' TO 'TCLOSE' ALL OUTPUT 00502000
  518. BALR R14,R15 FILES FOR THIS ACTIVE-DISK-TABLE. 00503000
  519. L R15,AUPDISK CALL 'UPDISK' TO RESERVE 00504000
  520. BALR R14,R15 DISK-SPACE FOR NEW UFD IN ADVANCE. 00505000
  521. FOUND4A LTR R7,R7 CHECK NUMBER OF 800-BYTE DATA-BLOCKS 00506000
  522. BNP ERROR3 FAULTY FILE IF NOT > 0 (BUT CONTINUE) 00507000
  523. LTR R6,R6 CHECK FIRST-CHAIN-LINK DISK-ADDRESS, 00508000
  524. BZ ERROR3 FAULTY FILE IF = 0. 00509000
  525. STH R6,SIGNAL STORE 1ST CHAIN LINK DISK-ADDRESS IN 00510000
  526. LA R6,SIGNAL HANDY HALFWORD, AND REFER TO IT THERE 00511000
  527. L R1,FVSERAS2 ADDRESS OF BUFFER (IF ANY) INTO R1 00512000
  528. LTR R4,R1 WAS THERE ANY ? 00513000
  529. BP LTR22 BP (BNZ) IF YES - USE IT (IN R4) 00514000
  530. * IF NOT, GET 1000 BYTES - ENOUGH FOR WORST CASE 00515000
  531. LA R0,125 SET THE NUMBER OF DWORDS. V0636 00516100
  532. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR V0636 00516200
  533. LTR R15,R15 FAIL IF FREE STORAGE CANNOT @VA02374 00516500
  534. BNZ ERROR25 BE ACQUIRED @VA02374 00516700
  535. ST R1,FVSERAS2 STORE ITS ADDRESS FOR FUTURE REFERENCE. 00517000
  536. LR R4,R1 CORE-ADDRESS OF 1ST CHAIN LINK TO R4, 00518000
  537. LTR22 TM ERSFLAG,TYPEM IS THE (TYP FLAG ON ?? 00519000
  538. BNO SR55 NO, GO TO SR55 00520000
  539. LTR R2,R2 DOES FST-ENTRY EXIST IN THE TABLES ? 00521000
  540. BZ SR55 IF NOT, FORGET FANCY STUFF. 00522000
  541. USING FSTSECT,R2 00523000
  542. LA R5,15(,R1) POINT CONVENIENTLY INTO THE BUFFER V0144 00524100
  543. MVC 1(8,R5),FSTN MOVE IN THE FILENAME V0144 00524150
  544. MVI 9(R5),C' ' DELIMIT WITH A BLANK V0144 00524200
  545. MVC 10(8,R5),FSTT MOVE IN THE FILETYPE V0144 00524250
  546. MVI 18(R5),C' ' YES...ANOTHER BLANK V0144 00524300
  547. MVC 19(1,R5),ADTM NOW, GET THE CORRECT MODE-LETTER V0144 00524350
  548. MVC 20(1,R5),FSTM+1 AND THE CORRECT NODE-NUMBER V0144 00524400
  549. MVI 0(R5),X'14' MOVE IN THE MESSAGE LENGTH V0144 00524450
  550. LINEDIT MF=(E,'SYS'),TEXTA=(5),TYPCALL=BALR,DOT=NO, V0144*00524500
  551. COMP=NO V0144 00524550
  552. DROP R2 00547000
  553. SR55 SR R5,R5 R5 WILL BE BYTE-COUNT OF '0' 00548000
  554. STM R4,R5,DSKLOC STORE CORE-ADDRESS AND BYTE-COUNT, 00549000
  555. BAL R10,READCL READ IN FIRST CHAIN LINK 00550000
  556. * 00551000
  557. * NOW RELEASE THE VARIOUS DATA BLOCKS AND CHAIN LINKS ... 00552000
  558. * 00553000
  559. SR R3,R3 CLEAR R3 (AN AVAILABLE REGISTER) 00554000
  560. LA R8,80(,R4) POINT TO BEGINNING OF DATA BLOCKS, 00555000
  561. LA R9,60 MAXIMUM OF 60 DATA BLOCKS IN 1ST C.L. 00556000
  562. BAL R10,ERSUB1 RELEASE DATA BLOCKS OF FIRST C.L. 00557000
  563. SR R0,R0 PICK UP THE DISK ADDRESS @VA01100 00558100
  564. ICM R0,B'0011',SIGNAL OF THE 1ST CHAIN LINK @VA01100 00558200
  565. LR R1,R11 REFERENCE ACTIVE-DISK-TABLE, 00559000
  566. L R15,AQQTRKX RELEASE FIRST CHAIN LINK ITSELF 00560000
  567. BALR R14,R15 VIA 'QQTRKX'. 00561000
  568. BZ ERAS05 OK IF R15=0 FROM QQTRKX. JS 00562000
  569. CH R15,H3 IF ERROR, MAYBE ERROR 3 (FULL QQMSK) ? JS 00563000
  570. BNE ERROR3 REAL ERROR (ERROR 3 FOR ERASE) IF NOT JS 00564000
  571. ERAS05 LTR R7,R7 ANY DATA BLOCKS LEFT ? JS 00565000
  572. BNP ERAS06 ALL DONE UNLESS COUNT STILL > 0. 00566000
  573. LR R6,R4 BEGINNING OF 1ST C.L. POINTS TO 2ND C.L. 00567000
  574. LA R4,200(,R4) ADVANCE 200 BYTES FOR 800-BYTE BUFFER, 00568000
  575. LA R5,800 800 BYTES WE'LL READ NOW, 00569000
  576. STM R4,R5,DSKLOC STORE CORE-ADDRESS AND BYTE-COUNT, 00570000
  577. LA R5,40 MAXIMUM OF 40 NTH CHAIN LINKS 00571000
  578. * 00572000
  579. NCLOOP DS 0H LOOP TO READ IN AND RELEASE NTH CHAIN LINKS 00573000
  580. CH R3,0(,R6) CHECK DISK-ADDRESS OF NTH CHAIN LINK 00574000
  581. BE LAR626 BE IF 'EMPTY' ... 00575000
  582. BAL R10,READCL READ IN NTH CHAIN LINK, 00576000
  583. LR R8,R4 POINT TO BEGINNING OF SAME IN CORE 00577000
  584. H400 LA R9,400 MAXIMUM OF 400 DATA BLOCKS, 00578000
  585. BAL R10,ERSUB1 RELEASE UP TO 400 DATA BLOCKS 00579000
  586. LH R0,0(,R6) GET DISK-ADDRESS OF CHAIN-LINK ITSELF, 00580000
  587. LA R9,1 JUST 1, 00581000
  588. BAL R10,ERSUB2 RELEASE NTH CHAIN LINK ITSELF. 00582000
  589. LAR626 LA R6,2(,R6) ADVANCE TO NEXT CHAIN LINK (IF ANY) 00583000
  590. LTR R7,R7 CHECK NUMBER OF DATA BLOCKS LEFT (IF ANY) 00584000
  591. BNP ERAS06 ALL DONE IF NONE LEFT. 00585000
  592. BCT R5,NCLOOP KEEP ITERATING UP TO 40 NTH CHAIN LINKS 00586000
  593. * 00587000
  594. ERROR3 EQU * CHAINING SEARCH TERMINATED. V0039 00588100
  595. * 00589000
  596. ERAS06 LTR R2,R2 REFERENCE FILE ADDRESS IN FST TABLES, 00590000
  597. BZ ERAS14 BZ IF NOT THERE AT ALL (FORGET IT). 00591000
  598. XC 0(40,R2),0(R2) CLEAR THE 40 BYTES, 00592000
  599. C R2,STATER1 DOES ERASED FILE MATCH STATEFST INFO ? 00593000
  600. BNE ERAS07 BNE IF NOT (FORGET IT). 00594000
  601. XC STATEFST(STFSTSIZ),STATEFST Yes? clear STATEFST HRC015DS 00595100
  602. ERAS07 LM R4,R5,ADTCHBA POINT TO 'CURRENT ITEM' (IF ANY), 00596000
  603. AR R4,R5 ADDRESS NOW IN R4. 00597000
  604. LM R6,R7,ADTLHBA POINT TO 00598000
  605. LR R8,R6 'LAST ITEM', 00599000
  606. AR R8,R7 ADDRESS NOW IN R8. 00600000
  607. LA R9,40 (NEED SHORTLY) 00601000
  608. CR R2,R8 DID WE ERASE THE VERY LAST ITEM ? 00602000
  609. BE ERAS12 BE IF YES (ENTIRELY POSSIBLE). 00603000
  610. C R3,0(,R8) IS LAST ITEM NULL ? 00604000
  611. BNE ERAS10 BNE IF NOT (GOOD SHOW, NO PROBLEM). 00605000
  612. ERAS08 BAL R10,ERAS22 BACK OFF 40 BYTES & SEE IF OK, 00606000
  613. BNM ERAS09 NO PROBLEM IF R7 NOT MINUS. 00607000
  614. L R6,FSTBKWD(,R6) BACK UP TO PREVIOUS FST HYPERBLOCK, 00608000
  615. LTR R6,R6 (IF ANY) 00609000
  616. BZ ERAS14 GIVE UP IF NOTHING THERE. 00610000
  617. LA R7,760 POINT TO LAST FST-ENTRY IN PREVIOUS BLOCK 00611000
  618. LR R8,R6 AND GET 00612000
  619. AR R8,R7 ADDRESS OF SAME 00613000
  620. STM R6,R7,ADTLHBA STORE NEW VALUES 00614000
  621. OI ERSFLAG,GIVEBACK SET FLAG-BIT TO DETACH EMPTY FROM CHAIN 00615000
  622. ERAS09 C R3,0(,R8) MAKE SURE NOT ANOTHER EMPTY ONE 00616000
  623. BNE ERAS10 OK IF NOT, PROCEED. 00617000
  624. CR R2,R8 IF EMPTY, ARE WE AT THE FILE WE ERASED ? 00618000
  625. BNE ERAS08 BNE IF NOT, KEEP TRYING. 00619000
  626. B ERAS14 GIVE UP IF YES. 00620000
  627. * 00621000
  628. * CHECK ACTIVE FILE TABLE FOR POSSIBILITY THAT AN 00622000
  629. * ACTIVE FILE TABLE ENTRY POINTS TO THE FST-ENTRY (GIVEN BY R8) 00623000
  630. * THAT WE WILL BE MOVING TO THE EMPTY SLOT GIVEN BY R2 ... 00624000
  631. * 00625000
  632. ERAS10 SR R1,R1 R1=0 TO START WITH 1ST ACTIVE FILE TABLE 00626000
  633. CHKACTL L R15,AACTNXT GET 'NEXT' ACTIVE FILE TABLE 00627000
  634. BALR R14,R15 VIA ACTNXT 00628000
  635. LTR R1,R1 IF R1=0, THERE ARE NO AFT'S LEFT 00629000
  636. BZ ERAS11 BZ IF THAT'S THE CASE, WE'RE DONE. 00630000
  637. USING AFTSECT,R1 IF SOMETHING THERE, REFERENCE THE AFT, 00631000
  638. L R15,AFTPFST-1 GET POINTER TO FST-TABLES, 00632000
  639. LA R15,0(,R15) STRIP OFF FLAG-BYTE, 00633000
  640. CR R15,R8 DOES IT MATCH THE 'LAST' FST ENTRY ? 00634000
  641. BNE CHKACTL IF NOT, KEEP CHECKING. 00635000
  642. IC R14,AFTFLG IF IT DOES MATCH, SAVE THE FLAG-BYTE, 00636000
  643. ST R2,AFTPFST-1 CHANGE POINTER TO THE NEW LOCATION WHERE 00637000
  644. STC R14,AFTFLG THE OLD FILE WAS, RESTORE THE FLAG BYTE, 00638000
  645. DROP R1 00639000
  646. * 00640000
  647. ERAS11 MVC 0(40,R2),0(R8) MOVE THAT LAST FILE TO THE EMPTY SLOT, 00641000
  648. XC 0(40,R8),0(R8) CLEAR THE PLACE WHERE IT WAS 00642000
  649. C R8,STATER1 DOES OLD PLACE MATCH STATEFST POINTER ? 00643000
  650. BNE CR24 BNE IF NOT (FORGET IT). 00644000
  651. ST R2,STATER1 STORE NEW ADDRESS THERE IF IT DID. 00645000
  652. CR24 CR R2,R4 DOES POINTER TO 'CURRENT ITEM' MATCH R2 ? 00646000
  653. BNE ERAS12 BNE IF NOT. 00647000
  654. SR R5,R9 BACK OFF 40 BYTES ON CURRENT DISPLACEMENT 00648000
  655. ST R5,ADTCFST & STORE NEW DISPLACEMENT (MINUS 40 IS OK) 00649000
  656. ERAS12 BAL R10,ERAS22 BACK OFF 40 BYTES ON DISP. OF LAST FST, 00650000
  657. * 00651000
  658. ERAS14 OI ERSFLAG,UPNEED INDICATE UPDATE OF UFD WILL BE NEEDED 00652000
  659. * 00653000
  660. LM R4,R5,ADTHBCT GET HYPERBLOCK COUNT & NUMBER OF FILES, 00654000
  661. BCTR R5,0 DECREMENT NUMBER OF FILES, 00655000
  662. ST R5,ADTFSTC STORE UPDATED VALUE OF NUMBER OF FILES JS 00656000
  663. TM ERSFLAG,GIVEBACK SHOULD WE GIVE BACK EMPTY HYPERBLOCK 00657000
  664. BZ ERAS16 BZ IF FLAG-BIT NOT SET. 00658000
  665. NI ERSFLAG,255-GIVEBACK IF YES, TURN OFF THE FLAG-BIT, 00659000
  666. L R1,FSTFWDP(,R6) GET POINTER TO EMPTY BLOCK (R6 INTACT) 00660000
  667. ST R3,FSTFWDP(,R6) CLEAR IT (R3 IS STILL 0), 00661000
  668. * GIVE BACK 808-BYTE BUFFER VIA FRET 00662000
  669. DMSFRET LOC=(1),DWORDS=101,TYPCALL=BALR 00663000
  670. BCTR R4,0 DECREMENT HYPERBLOCK COUNT, 00664000
  671. LH R6,ADTRES ALSO DECREMENT 00665000
  672. BCTR R6,0 THE 00666000
  673. STH R6,ADTRES RESERVE-COUNT. 00667000
  674. ST R4,ADTHBCT STORE UPDATED HYPERBLOCK COUNT JS 00668000
  675. * 00669000
  676. ERAS16 EQU * JS 00670000
  677. * 00671000
  678. TM ERSFLAG,ALLNAMES+ALLTYPES+ALLMODES SHOULD WE CONTINUE ? 00672000
  679. BZ ERAS03 TRF IF NOT - GO FINISH UP. 00673000
  680. SSM ON PERMIT TIMER AND/OR TERMINAL INTERRUPT(S) 00674000
  681. SSM *+1 NOW INHIBIT ALL INTERRUPTS AGAIN 00675000
  682. B MAINLOOP GO CHECK FOR MORE FILE(S) TO BE ERASED. 00676000
  683. SPACE 2 00677000
  684. * SUBROUTINE TO BACK OFF 40 BYTES ON LAST FST (IF POSSIBLE) 00678000
  685. * 00679000
  686. ERAS22 SR R8,R9 BACK OFF R8 BY 40 (NEEDED IN SOME CASES) 00680000
  687. SR R7,R9 BACK OFF 40 BYTES ON DISP. OF LAST FST, 00681000
  688. BCR 4,R10 BUT IF MINUS, EXIT. 00682000
  689. ST R7,ADTLFST IF 0 OR +, STORE UPDATED DISP. OF LAST FST 00683000
  690. BR R10 AND RETURN TO CALLER. 00684000
  691. * 00685000
  692. * NOTE - CALLER CAN CHECK CONDITION-CODE TO SEE WHAT HAPPENED 00686000
  693. EJECT 00687000
  694. * 00688000
  695. * SUBROUTINE TO READ IN A CHAIN LINK ... 00689000
  696. * 00690000
  697. * R6 = CORE-ADDRESS OF DISK-ADDRESS 00691000
  698. * R10 = RETURN-REGISTER 00692000
  699. * R11 = ADDRESS OF ACTIVE-DISK-TABLE 00693000
  700. * 00694000
  701. READCL ST R6,DSKADR STORE CORE-ADDRESS OF DISK-ADDRESS, 00695000
  702. ST R11,ADTADD STORE ADDRESS OF ACTIVE-DISK-TABLE, 00696000
  703. LA R1,DSKLST PARAMETER-LIST FOR RDTK, 00697000
  704. L R15,ARDTK CALL RDTK TO 00698000
  705. BALR R14,R15 READ IN CHAIN LINK 00699000
  706. BCR 8,R10 IF NO ERRORS, EXIT TO CALLER VIA R10. 00700000
  707. * IF ERROR FROM RDTK (BAD NEWS) ... 00701000
  708. CH R15,H5 ERROR 5 WOULD MEAN 'SICK' DISK-ADDRESS 00702000
  709. BE ERROR3 (FAULTY FILE) 00703000
  710. * FOR ANY OTHER RDTK ERROR, ... 00704000
  711. L R14,ADISKDIE TO 'DIE' IS TO HAVE UFD INTACT @VA01539 00705100
  712. BR R14 UNTIL DISK TROUBLE IS CORRECTED. @VA01539 00705200
  713. * 00707000
  714. * 00708000
  715. * SUBROUTINE TO GIVE BACK A DATA-BLOCK OR CHAIN LINK 00709000
  716. * 00710000
  717. * R7 = NUMBER OF DATA-BLOCKS REMAINING TO BE RETURNED 00711000
  718. * R8 = CORE-ADDRESS OF 1ST DISK-RECORD TO BE RETURNED 00712000
  719. * R9 = NUMBER OF RECORDS TO BE RETURNED (E.G. 1, 60, 400) 00713000
  720. * R10 = RETURN-REGISTER 00714000
  721. * ENTER AT ERSUB1 TO GIVE BACK DATA BLOCKS 00715000
  722. * ENTER AT ERSUB2 WITH R9=1 TO GIVE BACK A CHAIN LINK 00716000
  723. * 00717000
  724. ERSUB1 LH R0,0(,R8) PICK UP DISK-RECORD TO BE GIVEN BACK, 00718000
  725. LTR R0,R0 IS IT 0 (A NULL BLOCK) ? 00719000
  726. BZ LAR828 BZ IF YES (SKIP IT) 00720000
  727. BCTR R7,0 DECREMENT NO. OF DATA-BLOCKS LEFT 00721000
  728. ERSUB2 LR R1,R11 SET R1 FOR ACTIVE-DISK-TABLE, 00722000
  729. ICM R0,B'1100',=H'0' ZERO THE 2 HIGH BYTES V0636 00722100
  730. L R15,ATRKLKPX CALL 'TRKLKPX' TO GIVE 00723000
  731. BALR R14,R15 BACK THE DISK-RECORD 00724000
  732. BNZ ERROR3 BEWARE OF TRKLKPX ERROR 00725000
  733. LAR828 LA R8,2(,R8) ADVANCE TO NEXT DISK-RECORD, 00726000
  734. LTR R7,R7 CHECK IT ANY DATA-BLOCKS LEFT AT ALL, 00727000
  735. BCR 13,R10 'BNP' IF NONE LEFT, EXIT FORTHWITH 00728000
  736. BCT R9,ERSUB1 ITERATE IF NEEDED 00729000
  737. BR R10 RETURN TO CALLER WHEN THRU. 00730000
  738. EJECT 00731000
  739. * CONSTANTS, ETC. 00732000
  740. * 00733000
  741. DMODE DC C'A' DEFAULT MODE-LETTER V0268 00734100
  742. ON DC X'81' PERMIT TIMER AND/OR TERMINAL INTERRUPT(S) 00735000
  743. * 00736000
  744. H3 DC H'0003' ERROR 3 (FULL QQMSK) FROM QQTRKX IS OK JS 00737000
  745. H5 DC H'0005' ERROR 5 FROM RDTK MEANS 'SICK' DISK-ADDRESS 00738000
  746. * 00739000
  747. ADISKDIE DC A(DISKDIE) TO 'DIE' IF PERMANENT ERROR READING DISK. 00740000
  748. * 00741000
  749. * 00742000
  750. ERR1 SR R2,R2 00743000
  751. LA R3,BADID 00744000
  752. LA R4,54 00745000
  753. B ERR4B 00746000
  754. * 00747000
  755. * ERASE HAS NOT BEEN ABLE TO FIND THE FILE(S) WHICH ARE TO BE P0589 00748000
  756. * ERASED. THE FOLLOWING LOGIC DETERMINES THE ERROR MESSAGE WHICH P1035 00749000
  757. * IS TO BE TYPED TO THE USER. FIRST, 'STATEW' IS CALLED, TO SEE P1035 00750000
  758. * ANY OF HIS RULES ARE VIOLATED. IF NOT, WE CALL 'ADTLKP' TO SEE P1035 00751000
  759. * WHETHER THE DISK SPECIFIED IS READ/ONLY, THE LATTER DETERMINING P1035 00752000
  760. * WHETHER WE TYPE 'FILE NOT FOUND' OR 'DISK IS READ/ONLY'. P1035 00753000
  761. ERR2 TM ERSFLAG,FRSTONLY DEFAULT OF MODE? V0268 00754100
  762. BO ERR2A JUST 'FILE NOT FOUND', THEN. V0268 00754150
  763. L R1,FVSERAS1 POINT TO ORIGINAL PLIST P1035 00755000
  764. L R15,ASTATEW CALL 'STATEW' FOR ERROR MSGP1035 00756000
  765. BALR R14,R15 P1035 00757000
  766. SPACE 1 P1035 00758000
  767. * IF RETURN CODE FROM 'STATEW' IS NOT 0 OR 28, THEN STATEW HAS P1035 00759000
  768. * ALREADY TYPED AN ERROR MESSAGE. P1035 00760000
  769. LTR R15,R15 RETURN CODE = 0? P1035 00761000
  770. BZ ERR2CK CONTINUE PROCESSING IF SO P1035 00762000
  771. CH R15,=H'36' WAS DISK NOT ACCESSED? @VA12416 00762500
  772. BE ERR2BX GIVE MSG @VA12416 00762600
  773. CH R15,=H'28' WAS ERR 'FILE NOT FOUND'? P1035 00763000
  774. BNE EXIT JUST PASS BACK STATEW'S RC P1035 00764000
  775. SPACE 1 P1035 00765000
  776. ERR2CK EQU * P1035 00766000
  777. TM ERSFLAG,ALLMODES '*' SPECIFIED FOR FILEMODE?P0589 00767000
  778. BO ERR2A THEN 'FILE NOT FOUND' P0589 00768000
  779. SPACE 1 P0589 00769000
  780. * OTHERWISE HE REQUESTED A SPECIFIC DISK (OR DEFAULTED TO THE P0589 00770000
  781. * A-DISK) P0589 00771000
  782. ERR2X LA R6,DMODE V0268 00772100
  783. L R1,FVSERAS1 GET ADDR OF ORIGINAL PLIST P0589 00773000
  784. TM ERSFLAG,FRSTONLY SHOULD WE USE A-DISK? P0589 00774000
  785. BO *+8 SKIP IF SO P0589 00775000
  786. LA R6,24(,R1) POINT TO SPECIFIED MODE LETP0589 00776000
  787. LR R1,R6 LET R1 POINT TO MODE LET, P0589 00777000
  788. SH R1,=H'24' DISPLACED BACK 24 BYTES P0589 00778000
  789. L R15,=V(DMSLAD) AND CALL ADTLKP P0589 00779000
  790. BALR R14,R15 P0589 00780000
  791. USING ADTSECT,R1 P0589 00781000
  792. DROP R11 P0589 00782000
  793. TM ADTFLG1,ADTFRW+ADTFRO DISK ACCESSED AT ALL? V0268 00782100
  794. BZ ERR2B V0268 00782150
  795. TM ADTFLG1,ADTFRW IS IT READ/WRITE? P0589 00783000
  796. BZ ERR2C GO IF IT'S READ/ONLY P0589 00784000
  797. SPACE 1 P0589 00785000
  798. * COME HERE IF THE 'FILE NOT FOUND' MESSAGE IS TO BE TYPED. P0589 00786000
  799. ERR2A EQU * P0589 00787000
  800. CLI REGSAV1+4,X'0E' WAS ERASE INVOKED FROM EXEC @VA01154 00787100
  801. * WITH "&CONTROL OFF" IN EFFECT ? 00787200
  802. BE ERROR28 IF YES, OMIT THE ERROR MESSAGE @VA01154 00787300
  803. * JUST AS IF IT HAD BEEN A FUNCTION CALL. 00787400
  804. * NO - USE THE USUAL ERROR MESSAGE ROUTINE: 00787500
  805. LA R3,NTFND R3 POINTS TO MSG TEXT P0589 00788000
  806. LA R4,2 00789000
  807. BAL R5,LENCK 00790000
  808. LA R2,8(,R2) 00791000
  809. BAL R5,ERRMSG 00792000
  810. ERROR28 LA R15,28 ERROR 28 = FILE NOT FOUND @VA01154 00793100
  811. B EXIT 00794000
  812. * V0268 00795100
  813. ERR2BX LA R6,24(,R1) POINT TO SPECIFIED MODE LETTER @VA12416 00795120
  814. ERR2B LA R3,NOTACC V0268 00795150
  815. LA R2,1 V0268 00795200
  816. LA R4,69 V0268 00795250
  817. B ERR2E V0268 00795300
  818. * COME HERE IF 'DISK IS READ/ONLY' P0589 00796000
  819. ERR2C EQU * P0589 00797000
  820. LA R3,DISKRO R3 -> MESSAGE TEXT P0589 00798000
  821. LA R2,1 SUBSTITUTION LENGTH P0589 00799000
  822. LA R4,37 MESSAGE NUMBER P0589 00800000
  823. * NOTE: R6 ALREADY POINTS TO THE SUBSTITUTION PARM, THE P0589 00801000
  824. * MODE LETTER. P0589 00802000
  825. ERR2E BAL R5,ERRMSG V0268 00803100
  826. LA R15,36 RETURN CODE = 36 P0589 00804000
  827. B EXIT P0589 00805000
  828. * 00806000
  829. ERR2D LA R3,BADMODE V0006 00806100
  830. LR R6,R1 V0006 00806150
  831. LA R2,8 V0006 00806200
  832. LA R4,48 V0006 00806250
  833. * V0268 00806500
  834. B ERR4C V0268 00806550
  835. ERR3 LA R3,BADPARM 00807000
  836. LA R4,70 00808000
  837. ERR4A LA R2,8 00809000
  838. ERR4B LR R6,R1 00810000
  839. ERR4C BAL R5,ERRMSG 00811000
  840. LA R15,24 00812000
  841. B EXIT 00813000
  842. * 00814000
  843. ERR5 LA R3,BADOPT 00815000
  844. LA R4,3 00816000
  845. B ERR4A 00817000
  846. * 00818000
  847. ERR6 LA R3,CANTDO 00819000
  848. LA R4,71 00820000
  849. BAL R5,LENCK 00821000
  850. LA R2,8(,R2) 00822000
  851. B ERR4C 00823000
  852. * 00824000
  853. LENCK L R1,FVSERAS1 00825000
  854. LA R6,8(,R1) 00826000
  855. LA R2,16 00827000
  856. CLI 24(R1),C'*' 00828000
  857. BCR 8,R5 00829000
  858. CLI 24(R1),C'A' 00830000
  859. BL 4(,R5) 00831000
  860. CLI 24(R1),C'Z' 00832000
  861. BH 4(,R5) 00833000
  862. BR R5 00834000
  863. ERROR25 LA R3,NOCORE MESSAGE 'CORE NOT AVAILABLE' @VA02374 00834150
  864. LA R4,109 STANDARD NOCORE MSG NO @VA02374 00834300
  865. BAL R5,ERRMSG WRITE IT IF BY COMMAND @VA02374 00834450
  866. LA R15,25 @VA02374 00834600
  867. B EXIT @VA02374 00834750
  868. * 00835000
  869. ERRMSG TM ERSFLAG,QUIET ARE WE A FUNCTION? 00836000
  870. BCR 1,R5 YES. NO ERROR MESSAGES, THEN. 00837000
  871. DMSERR MF=(E,'SYS'),LET=E,NUM=(4),TEXTA=(3), X00838000
  872. SUB=(CHAR8A,((6),(2))),TYPCALL=BALR 00839000
  873. BR R5 00840000
  874. * 00841000
  875. NTFND DC AL1(L'NTFNDMSG) 00842000
  876. NTFNDMSG DC C'FILE ''..........................'' NOT FOUND' 00843000
  877. * 00844000
  878. BADOPT DC AL1(L'OPTMSG) 00845000
  879. OPTMSG DC C'INVALID OPTION ''........''' 00846000
  880. * 00847000
  881. BADID DC AL1(L'IDMSG) 00848000
  882. IDMSG DC C'INCOMPLETE FILEID SPECIFIED' 00849000
  883. * 00850000
  884. CANTDO DC AL1(L'CANTMSG) 00851000
  885. CANTMSG DC C'ERASE ................... NOT ALLOWED' 00852000
  886. * 00853000
  887. BADPARM DC AL1(L'PARMMSG) 00854000
  888. PARMMSG DC C'INVALID PARAMETER ''........''' 00855000
  889. * P0589 00856000
  890. DISKRO DC AL1(L'ROMSG) LENGTH OF MESSAGE TEXT P0589 00857000
  891. ROMSG DC C'DISK ''..'' IS READ/ONLY' P0589 00858000
  892. * 00859000
  893. BADMODE DC AL1(L'MODEMSG) V0006 00859100
  894. MODEMSG DC C'INVALID MODE ''........''' V0006 00859150
  895. * V0006 00859200
  896. NOTACC DC AL1(L'ACCMSG) V0268 00859300
  897. ACCMSG DC C'DISK ''..'' NOT ACCESSED' V0268 00859350
  898. * @VA02374 00859365
  899. NOCORE DC AL1(L'COREMSG) @VA02374 00859380
  900. COREMSG DC C'VIRTUAL STORAGE CAPACITY EXCEEDED' @VA02374 00859395
  901. * 00859500
  902. DS 0F 00860000
  903. OPTIONS EQU * 00861000
  904. DC CL8'TYPE' 00862000
  905. DC CL8'NOTYPE' 00863000
  906. NUMOPTS EQU (*-OPTIONS)/8 00864000
  907. * 00865000
  908. LTORG 00865100
  909. EJECT 00866000
  910. NUCON 00867000
  911. AFT 00868000
  912. ADT 00870000
  913. FSTB 00872000
  914. FVS 00874000
  915. * 00875000
  916. ALLNAMES EQU X'80' FLAG-BIT FOR ALL-NAMES 00876000
  917. ALLTYPES EQU X'40' FLAG-BIT FOR ALL-TYPES 00877000
  918. ALLMODES EQU X'20' FLAG-BIT FOR ALL-MODES 00878000
  919. GIVEBACK EQU X'10' GIVE BACK LAST FST HYPERBLOCK (EMPTY) 00879000
  920. FRSTONLY EQU X'08' SEARCH ONLY THE FIRST READ-WRITE DISK 00880000
  921. UPNEED EQU X'04' UPDATE OF UFD NEEDED BEFORE WE EXIT 00881000
  922. TYPEM EQU X'02' TYPING WANTED PLEASE 00882000
  923. QUIET EQU X'01' DO NOT TYPE ERROR MESSAGES 00883000
  924. EJECT 00884000
  925. REGEQU 00885000
  926. END 00886000
ibm/vm370-lib/cms/dmsers.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator