Table of Contents

DMSAUD Source

References

Source Listing

DMSAUD.ASSEMBLE.txt
  1. AUD TITLE 'DMSAUD (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * 00004000
  5. * 00005000
  6. * 00006000
  7. * 00007000
  8. * MODULE NAME: 00008000
  9. * 00009000
  10. * DMSAUD 00010000
  11. * 00011000
  12. * SUBROUTINE NAME: 00012000
  13. * 00013000
  14. * DMSAUDK (UPDISK) 00014000
  15. * 00015000
  16. * FUNCTION: 00016000
  17. * 00017000
  18. * TO RESERVE SPACE ON DISK FOR REWRITING A NEW COPY OF 00018000
  19. * THE USER FILE DIRECTORY (UFD) ON DISK, AND THEN TO 00019000
  20. * UPDATE THE UFD ON DISK. 00020000
  21. * 00021000
  22. * ATTRIBUTES: 00022000
  23. * 00023000
  24. * NUCLEUS RESIDENT, REENTRANT 00024000
  25. * 00025000
  26. * ENTRY POINTS: 00026000
  27. * 00027000
  28. * DMSAUD 00028000
  29. * 00029000
  30. * ENTRY CONDITIONS: 00030000
  31. * 00031000
  32. * L R15,AUPDISK WHERE AUPDISK = V(DMSAUD) 00032000
  33. * BALR R14,R15 00033000
  34. * 00034000
  35. * 1. TO UPDATE UFD WHEN AN OUTPUT FILE IS CLOSED: 00035000
  36. * 00036000
  37. * R0 MUST POINT TO ACTIVE DISK TABLE 00037000
  38. * R1 MUST BE POSITIVE AND NONZERO (ANY VALUE) 00038000
  39. * 00039000
  40. * 2. TO RESERVE RECORDS VIA DMSTRKA FOR FUTURE USE: 00040000
  41. * 00041000
  42. * R0 MUST POINT TO ACTIVE DISK TABLE 00042000
  43. * R1 = ZERO 00043000
  44. * 00044000
  45. * 3. TO UPDATE UFD WHEN RECORDS WERE RESERVED 00045000
  46. * PREVIOUSLY: 00046000
  47. * 00047000
  48. * R0 MUST POINT TO ACTIVE DISK TABLE 00048000
  49. * R1 MUST BE NEGATIVE (ANY VALUE) 00049000
  50. * 00050000
  51. * EXIT CONDITIONS: 00051000
  52. * 00052000
  53. * SUCCESSFUL UPDATE OF UFD 00053000
  54. * 00054000
  55. * R15 = 0 (AND CONDITION-CODE = 0) 00055000
  56. * 00056000
  57. * FAILURE UPDATING UFD 00057000
  58. * 00058000
  59. * TRANSFER OF CONTROL TO DMSFNSD - SEE OPERATION FOR DETAILS. 00059000
  60. * 00060000
  61. * CALLS TO OTHER ROUTINES: 00061000
  62. * 00062000
  63. * DMSFREE, DMSFRET, DMSTRKA, DMSTRKX, DMSDIOW, DMSFNSD 00063000
  64. * 00064000
  65. * EXTERNAL REFERENCES: 00065000
  66. * 00066000
  67. * ADTSECT, FVSECT 00067000
  68. * 00068000
  69. * TABLES/WORKAREAS: 00069000
  70. * 00070000
  71. * 800 BYTE MFD AREA 00071000
  72. * 00072000
  73. * REGISTER USAGE: 00073000
  74. * 00074000
  75. * R13 FVSECT 00075000
  76. * R11 ADTSECT 00076000
  77. * R12 BASE 00077000
  78. * REST WORK 00078000
  79. * 00079000
  80. * OPERATION: 00080000
  81. * 00081000
  82. * DMSAUD IS THE ROUTINE THAT UPDATES THE USER FILE 00082000
  83. * DIRECTORY FOR A GIVEN DISK. IT IS CALLED IN ONE OF 00083000
  84. * TWO WAYS: WHEN DMSFNSA HAS CLOSED THE LAST OPEN 00084000
  85. * OUTPUT FILE FOR A GIVEN DISK, IT CALLS THE FIRST 00085000
  86. * ENTRY TO UPDATE THE UFD FOR THAT DISK; WHEN DMSERS 00086000
  87. * FINDS A FILE 00087000
  88. * TO BE ERASED IT FIRST CALLS THE SECOND ENTRY TO 00088000
  89. * RESERVE SOME TRACKS, THEN DOES ITS ERASING FUNCTION, 00089000
  90. * THEN CALLS THE THIRD ENTRY TO WRITE THE NEW UFD ON 00090000
  91. * DISK. 00091000
  92. * 00092000
  93. * THIS LOGIC MAKES POSSIBLE WHAT IS CALLED A "DOUBLE 00093000
  94. * DIRECTORY" SCHEME, WHEREIN THE OLD DIRECTORY STILL 00094000
  95. * EXISTS ON DISK UNTIL THE MFD ITSELF IS FINALLY 00095000
  96. * REWRITTEN ON RECORD 4 OF THE DISK, COMPLETING THE NEW 00096000
  97. * DIRECTORY. IF THE SYSTEM IS INTERRUPTED IN ANY WAY 00097000
  98. * IN THE MIDDLE OF THE PROCESS, THE OLD DIRECTORY IS 00098000
  99. * STILL INTACT, AND ANY OLD FILES POINTED TO THEREBY 00099000
  100. * ARE STILL INTACT. 00100000
  101. * 00101000
  102. * DMSAUD, THEN, HAS BASICALLY TWO STEPS. ENTRY (2) - 00102000
  103. * CALLED ONLY BY DMSERS - DOES ONLY THE FIRST STEP; 00103000
  104. * ENTRY (3) - ALSO CALLED BY DMSERS - DOES ONLY THE 00104000
  105. * SECOND STEP. 00105000
  106. * 00106000
  107. * THE ACTION TAKEN BY EACH STEP IS AS FOLLOWS: 00107000
  108. * 00108000
  109. * STEP 1: AN 800-BYTE BUFFER FOR THE CONSTRUCTING OF A 00109000
  110. * NEW MFD IS OBTAINED FROM FREE STORAGE, AND THE FIRST 00110000
  111. * 600 BYTES ARE CLEARED. AVAILABLE DISK-ADDRESSES 00111000
  112. * ARE OBTAINED FROM DMSTRKA FOR EACH FST HYPERBLOCK AND 00112000
  113. * STORED IN THE MFD, JUST OBTAINED, 00113000
  114. * IN SEQUENTIAL HALFWORDS. THEN, IF THERE ARE NO MORE 00114000
  115. * THAN 215 BYTES OF SIGNIFICANT DATA IN THE QMSK 00115000
  116. * BITMASK, A SENTINEL OF X'FFFF' IS STORED FOLLOWING 00116000
  117. * THESE, AND STEP 1 IS COMPLETE. IF THE QMSK IS LARGER 00117000
  118. * THAN 215 BYTES IN LENGTH AND THERE IS SIGNIFICANT 00118000
  119. * DATA PAST THE 215TH BYTE, HOWEVER, ADDITIONAL 00119000
  120. * DISK-ADDRESSES ARE OBTAINED (AS MANY AS ARE NEEDED), 00120000
  121. * AND STORED FOLLOWING A SENTINEL OF X'FFFD'. ALL 00121000
  122. * NEEDED DISK-ADDRESSES FOR THE NEW MFD HAVE NOW BEEN 00122000
  123. * OBTAINED AND STORED, WITHOUT AFFECTING ANY OLD DATA 00123000
  124. * ON DISK. 00124000
  125. * 00125000
  126. * IF ENTRY (2) WAS CALLED BY DMSERS, DMSAUD EXITS AT 00126000
  127. * THIS POINT. 00127000
  128. * 00128000
  129. * STEP 2: NOW WE CONTINUE IN LINE, OR ENTER HERE IF 00129000
  130. * ENTRY (3) IS CALLED BY DMSERS. 00130000
  131. * 00131000
  132. * DMSAUD NOW CYCLES THROUGH THE 00132000
  133. * OLD MFD (IF ANY) LEFT IN CORE BY THE FILE MANAGEMENT 00133000
  134. * PROGRAMS, AND RETURNS OLD DISK-ADDRESSES CONTAINED 00134000
  135. * THEREIN BY CALLING 00135000
  136. * DMSTRKX 00136000
  137. * TO RETURN THEM TO THE QMSK TABLE. THE OLD MFD IS 00137000
  138. * THEN RETURNED TO FREE STORAGE VIA FRET. 00138000
  139. * 00139000
  140. * NOW THE FST HYPERBLOCKS IN CORE, AND ANY PQMSK 00140000
  141. * EXTENSIONS ARE WRITTEN ON DISK, CALLING WRTK, USING 00141000
  142. * THE DISK-ADDRESSES RESERVED ABOVE IN STEP 1. NEXT, 00142000
  143. * ALL THE DISK COUNTS (ADTNUM, ADTCYL, ETC.), THE FIRST 00143000
  144. * 215 BYTES (OR LESS) OF THE QMSK, THE QQMSK, AND THE 00144000
  145. * UNIT-TYPE BYTE ARE MOVED TO THE MFD, AND THE MFD 00145000
  146. * FINALLY WRITTEN BACK ON RECORD 4 OF THE DISK, 00146000
  147. * COMPLETING THE NEW UFD ON DISK. 00147000
  148. * 00148000
  149. * FINALLY, THE SIGNIFCANT PART OF THE NEW MFD, STILL IN 00149000
  150. * CORE, INCLUDING THE DISK-ADDRESSES OF THE FST 00150000
  151. * HYPERBLOCKS, THE FFFF OR THE FFFD SENTINEL, AND THE 00151000
  152. * DISK-ADDRESSES OF THE QMSK EXTENSION(S) ARE RETAINED 00152000
  153. * IN CORE (IN THE HIGH-NUMBERED END OF THE BUFFER THAT 00153000
  154. * WAS USED FOR THE NEW MFD), AND THE REST OF THE 00154000
  155. * 800-BYTE BUFFER GIVEN BACK TO FREE 00155000
  156. * STORAGE VIA DMSFRET. 00156000
  157. * 00157000
  158. * NOTES: IF A PERMANENT DISK ERROR OCCURS WRITING THE 00158000
  159. * NEW UFD AT ANY POINT, OR IF NECESSARY 00159000
  160. * FREE STORAGE CANNOT BE OBTAINED, THE 00160000
  161. * DMSAUD ROUTINE PURPOSELY TRANSFERS TO 00161000
  162. * THE DMSFNSD CODE, SO THAT THE OLD 00162000
  163. * DIRECTORY WILL BE INTACT UNTIL THE DISK ERROR 00163000
  164. * CAN BE CORRECTED, OR A LARGER VIRTUAL 00164000
  165. * MACHINE DEFINED. 00165000
  166. * 00166000
  167. * SEE ALSO "DMSAUDUP" AND "DMSAUDL", WHICH STILL SERVE 00167000
  168. * A USEFUL PURPOSE, AND ARE RETAINED FOR COMPATIBILITY 00168000
  169. * WITH EXISTING PROGRAMS. DMSAUDUP AND DMSAUDL ARE 00169000
  170. * INCLUDED AS ENTRY-POINTS IN THE DMSAUD ROUTINE. 00170000
  171. * 00171000
  172. * MODULE NAME: 00172000
  173. * 00173000
  174. * DMSAUD 00174000
  175. * 00175000
  176. * SUBROUTINE NAME: 00176000
  177. * 00177000
  178. * DMSAUDUP (UPUFD) 00178000
  179. * 00179000
  180. * FUNCTION: 00180000
  181. * 00181000
  182. * TO CLOSE ALL CMS FILE(S), THEREBY UPDATING THE USER 00182000
  183. * FILE DIRECTORY (UFD) FOR ANY DISK(S) WHICH HAD OUTPUT 00183000
  184. * FILE OPEN. 00184000
  185. * 00185000
  186. * ATTRIBUTES: 00186000
  187. * 00187000
  188. * NUCLEUS RESIDENT, REENTRANT 00188000
  189. * 00189000
  190. * 00190000
  191. * ENTRY POINTS: 00191000
  192. * 00192000
  193. * DMSAUDUP 00193000
  194. * 00194000
  195. * ENTRY CONDITIONS: 00195000
  196. * 00196000
  197. * L R15,=V(DMSAUDUP) (OR EQUIVALENT) 00197000
  198. * BALR R14,R15 00198000
  199. * 00199000
  200. * NO REGISTER REQUIREMENTS. 00200000
  201. * 00201000
  202. * EXIT CONDITIONS: 00202000
  203. * 00203000
  204. * R15 = 0 00204000
  205. * 00205000
  206. * CALLS TO OTHER ROUTINES: 00206000
  207. * 00207000
  208. * DMSFNSA 00208000
  209. * 00209000
  210. * EXTERNAL REFERENCES: 00210000
  211. * 00211000
  212. * FVSECT 00212000
  213. * 00213000
  214. * TABLES/WORKAREAS: 00214000
  215. * 00215000
  216. * NONE. 00216000
  217. * 00217000
  218. * REGISTER USAGE: 00218000
  219. * 00219000
  220. * R13 FVSECT 00220000
  221. * R11 ADTSECT 00221000
  222. * R12 BASE 00222000
  223. * REST WORK 00223000
  224. * 00224000
  225. * OPERATION: 00225000
  226. * 00226000
  227. * 'FINIS * * *' IS CALLED TO CLOSE ANY OPEN FILES, IN 00227000
  228. * THE COURSE OF WHICH, IF ANY OUTPUT FILES ARE OPEN, 00228000
  229. * THE FILE DIRECTORIES FOR THE APPROPRIATE DISK(S) 00229000
  230. * ARE AUTOMATICALLY UPDATED BY DMSAUD. 00230000
  231. * 00231000
  232. * DMSAUD IS CALLED BY DMSINT AND DMSEXT TO ENSURE THAT 00232000
  233. * FILES ARE CLOSED (AND DIRECTORIES 00233000
  234. * UPDATED) IN THE EVENT A USER PROGRAM LEFT ANY FILES 00234000
  235. * OPEN ON ITS COMPLETION. 00235000
  236. * 00236000
  237. * NOTE: DMSAUDUP IS INCLUDED WITH THE DMSAUD ROUTINE; 00237000
  238. * IT INCLUDES CODE COMMON TO DMSAUDL, A NEARLY 00238000
  239. * IDENTICAL FUNCTION ALSO INCLUDED WITH DMSAUD. 00239000
  240. * 00240000
  241. *. 00241000
  242. EJECT 00242000
  243. DMSAUD START 0 P3035 00243000
  244. SPACE 00244000
  245. ENTRY UPDISK P3035 00245000
  246. UPDISK EQU DMSAUD P3035 00246000
  247. ENTRY DMSAUDUP P3035 00247000
  248. ENTRY UPUFD P3035 00248000
  249. SPACE 00249000
  250. USING NUCON,R0 00250000
  251. FSENTR REGSAV0 ENTER 'UPDISK' TO UPDATE DIRECTORY 00251000
  252. LR R11,R0 REFERENCE ACTIVE DISK-TABLE 00252000
  253. USING ADTSECT,R11 ... 00253000
  254. USING NUCON,R0 00254000
  255. OI UFDBUSY,UPBIT SET OUR BIT IN 'UFDBUSY' FLAG 00255000
  256. LTR R2,R1 SAVE R1 IN R2 AND CHECK IT 00256000
  257. BM UPD05 IF NEGATIVE, SKIP OBTAINING RECORDS 00257000
  258. TM ADTFLG3,ADTFUPD1 1ST HALF ALREADY BEEN CALLED ? @VA01100 00258000
  259. BO UPD04 IF YES, OMIT THE FIRST PART. @VA01100 00259000
  260. LA R0,100 SET THE NUMBER OF DWORDS. V0636 00260000
  261. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR,ERR=ERROR25 00261000
  262. ST R1,RWMFD SAVE CORE-ADDRESS OF NEW MFD 00262000
  263. XC 0(200,R1),0(R1) CLEAR 600 BYTES 00263000
  264. MVC 200(200,R1),0(R1) ... 00264000
  265. MVC 400(200,R1),0(R1) (NOT NECESSARY TO CLEAR LAST 200) 00265000
  266. LR R3,R1 LET R3 POINT TO BEGINNING OF BLOCK 00266000
  267. L R4,ADTHBCT R4 = NO. OF HYPERBLOCKS WE HAVE 00267000
  268. UPD02 BAL R10,UPD20 GET NO. OF TRACKS NEEDED AND STORE IN MFD 00268000
  269. MVC 0(2,R3),FFF MOVE IN TENTATIVE X'FFFF' SENTINEL, 00269000
  270. CLC ADTLAST+2(2),H215+2 ARE WE ABOVE 215 BYTES ? 00270000
  271. BL UPD03 IF NOT, THAT'S ALL WE'LL NEED @VA01100 00271000
  272. MVC 0(2,R3),FFD X'FFFD' SENTINEL INSTEAD 00272000
  273. LA R3,2(,R3) ADVANCE TO NEXT DISK-ADDRESS, 00273000
  274. L R4,ADTPQM2 NUMBER OF DISK-RECORDS WE'LL NEED, 00274000
  275. BAL R10,UPD20 GET MORE TRACKS FOR BIT-MASK 00275000
  276. UPD03 OI ADTFLG3,ADTFUPD1 REMEMBER FIRST HALF WAS CALLED @VA01100 00276000
  277. UPD04 LTR R2,R2 DID WE JUST WANT TRACKS (CALLED BY ERASE) 00277000
  278. BZ UPDEXIT BZ IF YES (GO EXIT). 00278000
  279. * 00279000
  280. UPD05 L R7,ADTMFDA GET ADDRESS OF OLD MFD 00280000
  281. LTR R7,R7 (IF ANY) 00281000
  282. BNP UPD07 BNP (BZ) IF NONE THERE, FORGET IT. 00282000
  283. LA R6,UPD06 (FOR BCR'S BELOW) 00283000
  284. UNLOOP LH R0,0(,R7) GET DISK-ADDRESS FROM OLD MFD, 00284000
  285. CH R0,FFF IS IT 'FFFF' ? 00285000
  286. BCR 8,R6 IF YES, WE'RE DONE. 00286000
  287. LTR R0,R0 IF NOT, IS IT 0 ? 00287000
  288. BCR 8,R6 IF YES, WE'RE DONE. 00288000
  289. CH R0,FFD IF NOT, IS IT 'FFFD' ? 00289000
  290. BE LAR727 BE IF YES, 'SKIP OVER IT' 00290000
  291. CH R0,FFE IF NOT, MAYBE 'FFFE' ? 00291000
  292. BCR 8,R6 IF YES, WE'RE DONE. 00292000
  293. LR R1,R11 POINT TO ACTIVE-DISK-TABLE 00293000
  294. ICM R0,B'1100',=H'0' ZERO THE 2 HIGH BYTES. V0636 00294000
  295. L R15,ATRKLKPX AND RETURN TRACK TO BIT-MASK 00295000
  296. BALR R14,R15 VIA TRKLKPX 00296000
  297. LAR727 LA R7,2(,R7) ADVANCE TO NEXT DISK-ADDRESS IN OLD MFD 00297000
  298. B UNLOOP AND CONTINUE GIVING BACK OLD TRACKS. 00298000
  299. * 00299000
  300. UPD06 LM R0,R1,ADTMFDN SET UP R0,R1 00300000
  301. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR GIVE BACK MFD 00301000
  302. SR R1,R1 CLEAR 00302000
  303. ST R1,ADTMFDA ADTMFDA (TO BE SAFE) 00303000
  304. UPD07 L R2,ADTFDA START WITH FIRST HYPERBLOCK 00304000
  305. LA R2,8(,R2) SPACE OVER PRELIMINARY WORDS 00305000
  306. L R3,RWMFD GET ADDRESS OF FIRST DISK-ADDRESS 00306000
  307. LR R9,R3 HANG ONTO INDEFINITELY IN R9 00307000
  308. L R4,ADTHBCT NUMBER OF HYPERBLOCKS TO WRITE 00308000
  309. MVC RWCNT,F800 SET BYTE-COUNT TO 800, 00309000
  310. ST R11,ADTADD SET UP ADD. OF ACTIVE DISK TABLE 00310000
  311. LA R1,DSKLST R1 POINTS TO ALL-PURPOSE LIST 00311000
  312. UPD08 BAL R10,UPD22 WRITE FST HYPERBLOCK ON DISK 00312000
  313. L R2,800(,R2) POINT TO NEXT HYPERBLOCK, 00313000
  314. LA R3,2(,R3) ADVANCE TO NEXT DISK-ADDRESS 00314000
  315. BCT R4,UPD08 ITERATE FOR NO. OF HYPERBLOCKS THERE 00315000
  316. LM R5,R6,ADTMSK ADDRESS OF 'PQMSK' & 'PQQMSK' INTO R5 & R6 00316000
  317. UPD08A LH R0,0(,R3) PICK UP NEXT DISK-ADDRESS 00317000
  318. CH R0,FFF IS IT 'FFFF' SENTINEL ? 00318000
  319. BE UPD09 BE IF YES, DON'T HAVE TO WRITE ANY BIT-MASK 00319000
  320. CH R0,FFD IF NOT, IS IT 'FFFD' SENTINEL ? 00320000
  321. BNE UPD11 TRF IF NOT - GO GIVE BACK UNUSED RECORD. 00321000
  322. MVC RWCNT,ADTPQM1 IF NOT (FFFD THEN), STORE BYTE-COUNT, 00322000
  323. H215 LA R2,215(R5,0) ADJUST CORE-ADDRESS BY 215 & INTO R2, 00323000
  324. LA R3,2(,R3) SKIP OVER FFFD SENTINEL 00324000
  325. LA R8,22+7(,R3) ALLOW FOR QMASK POINTERS. V0636 00325000
  326. BAL R10,UPD22 WRITE BIT-MASK (HOWEVER MUCH NECESSARY) 00326000
  327. LA R15,214 SET TO EX-MVC 215 BYTES 00327000
  328. B UPD10 GO MOVE 215 BYTES OF 1ST CHUNK OF BIT-MASK 00328000
  329. * 00329000
  330. UPD11 LR R1,R11 GIVE BACK UNUSED RECORD 00330000
  331. ICM R0,B'1100',=H'0' ZERO THE 2 HIGH BYTES. V0636 00331000
  332. L R15,ATRKLKPX (WAS AN EMPTY HYPERBLOCK FRET'D 00332000
  333. BALR R14,R15 BY ERASE DURING COMPACTING PROCESS) 00333000
  334. MVC 0(256,R3),2(R3) MOVE MFD INFO. FORWARD 2 BYTES 00334000
  335. MVC 256(104,R3),258(R3) (ALLOWING FOR WORST POSSIBLE CASE) 00335000
  336. SR R0,R0 CLEAR HALFWORD AT MFD+598 (IN CASE NOW 00336000
  337. STH R0,598(,R9) GARBAGE FROM WORST POSSIBLE CASE) 00337000
  338. LA R1,DSKLST RESTORE R1 TO WRTK P-LIST, AND GO CHECK 00338000
  339. B UPD08A FOR 'FFFF' OR 'FFFD' SENTINEL AGAIN. 00339000
  340. * 00340000
  341. MOVBMSK MVC 384(*-*,R9),0(R5) TO MOVE UP TO 1ST 215 BYTES OF BITMASK 00341000
  342. * 00342000
  343. UPD09 LA R8,2+7(,R3) REMEMBER HOW FAR INFO EXTENDS INTO MFD 00343000
  344. L R15,ADTLAST ADTLAST (0-214) INTO R15 FOR EX-MVC 00344000
  345. * 00345000
  346. UPD10 EX R15,MOVBMSK MOVE UP TO 1ST 215 BYTES OF BITMASK TO MFD 00346000
  347. MVC 364(20,R9),ADTNUM MOVE ALL DISK COUNTS TO MFD 00347000
  348. LTR R6,R6 IS THERE A QQMASK FOR THIS DISK 00348000
  349. BNP NOQQ NO. 00349000
  350. MVC 600(200,R9),0(R6) AND MOVE IN 'QQMSK' NOW 00350000
  351. NOQQ L R15,ADTDTA ACCESS UNIT-TYPE-BYTE 00351000
  352. MVC 599(1,R9),DTADT(R15) MOVE IT ALSO TO MFD 00352000
  353. ST R11,FVSDSKA STORE NEEDED ADDRESS IN P-LIST, 00353000
  354. LA R1,RWMFD POINT TO P-LIST TO WRITE MFD 00354000
  355. BAL R10,UPD24 WRITE THE MFD 00355000
  356. SR R8,R9 NUMBER OF BYTES +7 OF INFO IN MFD 00356000
  357. SRA R8,3 NOW INTO DOUBLE WORDS 00357000
  358. LR R0,R8 R0 = NO. OF DBL-WORDS WE'LL KEEP 00358000
  359. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR,ERR=ERROR25 00359000
  360. STM R0,R1,ADTMFDN STORE SIZE & ADDRESS OF 'NEW' MFD BLOCK 00360000
  361. SLA R8,3 DOUBLE-WORDS TO BYTES, 00361000
  362. LR R0,R1 ADDRESS OF NEW BLOCK INTO R0, @VM03177 00362000
  363. LR R14,R9 ADDRESS OF MFD BLOCK INTO R14, @VM03177 00363000
  364. LR R1,R8 NUMBER OF BYTES INTO R1 @VM03177 00364000
  365. LR R15,R8 AND INTO R15 @VM03177 00365000
  366. MVCL R0,R14 MOVE "MFD BLOCK" TO NEW BLOCK @VM03177 00366000
  367. * 00367000
  368. LR R1,R9 ADDR OF MFD FROM DISK. V0636 00368000
  369. LA R0,100 OLD MFD IS 800 BYTES. V0636 00369000
  370. DMSFRET LOC=(1),DWORDS=(0),TYPCALL=BALR GIVE BACK OLD MFD, AND 00370000
  371. NI ADTFLG3,255-ADTFUPD1 CLEAR 1ST-HALF-CALLED FLAG @VA01100 00371000
  372. * 00372000
  373. UPDEXIT KXCHK UPBIT CHECK FOR 'KX' WANTED... 00373000
  374. LM R0,R14,REGSAV0 RESTORE R0-R14 00374000
  375. SR R15,R15 SHOW NO ERRORS 00375000
  376. BR R14 AND RETURN TO CALLER. 00376000
  377. * 00377000
  378. ERROR25 LA R15,25 SAY WHY WE ARE DIEING @VA02374 00378000
  379. B MUSTDIE AND GET OUT @VA02374 00379000
  380. SPACE 00380000
  381. UPD20 L R15,ATRKLKP A(TRKLKP) INTO R15, 00381000
  382. LR R1,R11 R1 MUST POINT TO ACTIVE-DISK-TABLE 00382000
  383. BALR R14,R15 CALL TRKLKP 00383000
  384. N R15,F3 ERROR-CODE FROM TRKLKP CAN BE 0 OR 4 00384000
  385. BZ UPD21 BR IF 0 OR 4 @VA00895 00385000
  386. O R15,F40 INDICATE FROM TRK @VA00895 00386000
  387. B MUSTDIE @VA00895 00387000
  388. UPD21 STH R1,0(,R3) STORE DISK ADR JUST OBTAINED @VA00895 00388000
  389. LA R3,2(,R3) BUMP R3 FOR NEXT TIME 00389000
  390. BCT R4,UPD20 ITERATE FOR 'R4' RECORDS 00390000
  391. BR R10 EXIT TO CALLER WHEN THRU. 00391000
  392. * 00392000
  393. UPD22 ST R2,DSKLOC STORE CORE-ADDRESS, 00393000
  394. ST R3,DSKADR AND ADDRESS OF DISK-ADDRESS 00394000
  395. UPD24 L R15,AWRTK CALL WRTK TO WRITE 00395000
  396. BALR R14,R15 FST HYPERBLOCK OR BIT-MASK ON DISK 00396000
  397. BCR 8,R10 RETURN TO CALLER IF NO DISK ERROR. 00397000
  398. * IF ERROR 3 FROM WRTK (DISK NOT ATTACHED), 00398000
  399. * DON'T ABEND IF "ADTFNOAB" FLAG IS SET: 00399000
  400. CL R15,F3 ERROR 3 ("DISK NOT ATTACHED") ? @VM03177 00400000
  401. BE ABWNTD YES, CHECK ABEND FLAG @VA08383 00400300
  402. CL R15,FSIX ERROR 6 (R/O DISK) ? @VA08383 00400600
  403. BNE MUSTDIE IF NOT WE "MUST DIE". @VM03177 00401000
  404. ABWNTD EQU * @VA08383 00401500
  405. TM ADTFLG3,ADTFNOAB IF SO, "NO ABEND WANTED" ? @VM03177 00402000
  406. BOR R10 YES - JUST RETURN TO CALLER. @VM03177 00403000
  407. * NO - CONTINUE TO "MUSTDIE" ... 00404000
  408. MUSTDIE L R14,ADISKDIE LEAVE OLD UFD INTACT @VA00895 00405000
  409. BR R14 @VA00895 00406000
  410. * 00407000
  411. DROP R11,R12,R13 00408000
  412. EJECT 00409000
  413. USING *,R15 P3035 00410000
  414. DMSAUDUP L R15,AFVS A(FVS) INTO R15 P3035 00411000
  415. UPUFD EQU DMSAUDUP P3035 00412000
  416. USING FVSECT,R15 P3035 00413000
  417. STM R0,R14,REGSAV4 SAVE R0 THRU R14 P3035 00414000
  418. DROP R15 P3035 00415000
  419. LR R13,R15 REFERENCE FVS INFO P3035 00416000
  420. USING FVSECT,R13 P3035 00417000
  421. BALR R12,0 OUR OWN ADDRESSABILITY P3035 00418000
  422. USING *,R12 P3035 00419000
  423. LA R1,FINISLST CALL 'FINIS * * *' TO CLOSE ANY FILES 00420000
  424. SVC X'CA' ... 00421000
  425. DC AL4(*+4) ... 00422000
  426. LM R0,R14,REGSAV4 RESTORE REGISTERS 0-14 P3035 00423000
  427. SR R15,R15 SHOW 'NO ERROR' 00424000
  428. BR R14 AND EXIT. 00425000
  429. SPACE 3 00426000
  430. * FULLWORD CONSTANTS AND ADDRESS CONSTANTS ... 00427000
  431. FSIX DC F'6' @VA08383 00427500
  432. F3 DC F'3' 00428000
  433. F40 DC F'64' @VA00895 00429000
  434. * 00430000
  435. ADISKDIE DC V(DISKDIE) "DISKDIE" = ENTRY-POINT IN "FINIS". 00431000
  436. SPACE 00432000
  437. LTORG OTHER CONSTANTS ... @VM03177 00433000
  438. EJECT 00434000
  439. NUCON 00435000
  440. ADT 00436000
  441. EJECT 00437000
  442. FVS 00438000
  443. * 00439000
  444. REGSAV4 EQU RWFSTRG+12 LAST 15 WORDS OF RWFSTRG = GOOD SAFE PLACE 00440000
  445. EJECT 00441000
  446. REGEQU 00442000
  447. END 00443000