Table of Contents

DMSBRD Source

References

Source Listing

DMSBRD.ASSEMBLE.txt
  1. BRD TITLE 'DMSBRD (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * MODULE NAME: 00004000
  5. * 00005000
  6. * DMSBRD (RDBUF) 00006000
  7. * 00007000
  8. * FUNCTION: 00008000
  9. * 00009000
  10. * TO READ ONE OR MORE SUCCESSIVE ITEMS FROM A SPECIFIED 00010000
  11. * FILE. 00011000
  12. * 00012000
  13. * ATTRIBUTES: 00013000
  14. * 00014000
  15. * RESIDENT, REENTRANT, CALLED VIA EITHER AN SVC OR 00015000
  16. * BALR. 00016000
  17. * 00017000
  18. * ENTRY POINT: 00018000
  19. * 00019000
  20. * DMSBRD - READ ONE OR MORE ITEMS FROM A FILE. 00020000
  21. * 00021000
  22. * ENTRY CONDITIONS: 00022000
  23. * 00023000
  24. * LA R1,PLIST R1 MUST POINT TO P-LIST AS USUAL 00024000
  25. * THEN EITHER 00025000
  26. * SVC X'CA' CALL RDBUF VIA SVC 00026000
  27. * DC AL4(RDERROR) ERROR-RETURN (FOR EXAMPLE, IF END-OF-FILE) 00027000
  28. * OR 00028000
  29. * L R15,ARDBUF WHERE ARDBUF = V(RDBUF) 00029000
  30. * BALR R14,R15 CALL RDBUF VIA BALR (WITHIN NUCLEUS) 00030000
  31. * BNZ RDERROR TRANSFER IF ERROR (FOR EXAMPLE, END-OF-FILE) 00031000
  32. * 00032000
  33. * 00033000
  34. * R1 MUST POINT TO RDBUF PARAMETER LIST: 00034000
  35. * DS 0F 00035000
  36. * PLIST DC CL8'RDBUF' (NOTE-IMMATERIAL IF CALLED BY BALR) 00036000
  37. * DC CL8' ' FILENAME 00037000
  38. * DC CL8' ' FILETYPE 00038000
  39. * DC CL2' ' FILEMODE 00039000
  40. * DC H' ' ITEM NO. OF FIRST (OR ONLY) ITEM TO BE READ 00040000
  41. * DC A( ) ADDRESS OF BUFFER INTO WHICH ITEM(S) READ 00041000
  42. * TO BE PLACED (THAT IS, ADDRESS OF INPUT BUF 00042000
  43. * DC F' ' SIZE OF INPUT BUFFER 00043000
  44. * DC CL1' ' F/V FLAG @VA03023 00044000
  45. * DC CL1' ' INDICATION OF NULL RECORD @VA03023 00045000
  46. * RETURNED HERE 00046000
  47. * DC H' ' NUMBER OF ITEMS TO BE READ 00047000
  48. * DC A(*-*) NUMBER OF BYTES READ RETURNED HERE 00048000
  49. * 00049000
  50. * EXIT CONDITIONS: 00050000
  51. * 00051000
  52. * NORMAL RETURN: 00052000
  53. * R15=0 (AND CONDITION CODE = 0) 00053000
  54. * 00054000
  55. * ERROR RETURN: 00055000
  56. * R15 NONZERO (AND CONDITION CODE = 2) 00056000
  57. * 00057000
  58. * ERROR RETURNS (R15 VALUE AT EXIT): 00058000
  59. * 00059000
  60. * 1. GIVEN FILE NOT FOUND. 00060000
  61. * 00061000
  62. * 2. BUFFER AREA NOT WITHIN USER STORAGE LIMITS. 00062000
  63. * 00063000
  64. * 3. PERMANENT DISK ERROR FROM RDTK. 00064000
  65. * 00065000
  66. * 5. NUMBER OF ITEMS = 0. 00066000
  67. * 00067000
  68. * 7. FIXED/VARIABLE FLAG IN FST ENTRY IS NOT "F" OR "V". 00068000
  69. * OR "V"). 00069000
  70. * 00070000
  71. * 8. GIVEN MEMORY AREA WAS SMALLER THAN ACTUAL SIZE OF ITEM 00071000
  72. * READ (NOTE: NONFATAL; NUMBER OF BYTES CORRESPONDING TO 00072000
  73. * SIZE OF BUFFER HAVE BEEN READ). 00073000
  74. * 00074000
  75. * 9. FILE OPEN FOR WRITING - MUST BE CLOSED BEFORE IT CAN BE 00075000
  76. * READ. 00076000
  77. * 00077000
  78. * 11. NUMBER OF ITEMS GREATER THAN 1, FOR VARIABLE-LENGTH 00078000
  79. * FILE. 00079000
  80. * 00080000
  81. * 12. END OF FILE (ITEM NUMBER SPECIFIED EXCEEDS NUMBER OF 00081000
  82. * ITEMS IN FILE) 00082000
  83. * 00083000
  84. * 13. VARIABLE FILE HAS INVALID DISPLACEMENT IN ACTIVE FILE 00084000
  85. * TABLE (INDICATES CODING ERROR--SHOULD NOT OCCUR). 00085000
  86. * 00086000
  87. * NOTE: ALL ERRORS EXCEPT ERROR 8 CAUSE THE FUNCTION 00087000
  88. * CALL TO BE ABORTED. ERROR 8 IS LEGITIMATE IF READING 00088000
  89. * THE FIRST PORTION OF A LARGE RECORD INTO A LITTLE 00089000
  90. * BUFFER. 00090000
  91. * 25. INSUFFICIENT FREE STORAGE AVAILABLE FOR FILE MANAGEMENT @VA02374 00091000
  92. * CONTROL AREAS. @VA02374 00092000
  93. * @VA02374 00093000
  94. * 00094000
  95. * 00095000
  96. * CALLS TO OTHER ROUTINES: 00096000
  97. * 00097000
  98. * ACTFREE, ACTLKP, DMSFREE, DMSFRET, FSTLKP, RDTK 00098000
  99. * 00099000
  100. * EXTERNAL REFERENCES: 00100000
  101. * 00101000
  102. * NONE 00102000
  103. * 00103000
  104. * TABLES/WORKAREAS: 00104000
  105. * 00105000
  106. * NONE 00106000
  107. * 00107000
  108. * REGISTER USAGE: 00108000
  109. * 00109000
  110. * R0 = WORK 00110000
  111. * R1 = ADDRESS OF PLIST 00111000
  112. * R2 - R11 = WORK 00112000
  113. * R12 = BASE REGISTER 00113000
  114. * R13 = BASE REGISTER FOR FVS DSECT 00114000
  115. * R14 = RETURN ADDRESS 00115000
  116. * R15 = BALR REGISTER 00116000
  117. * 00117000
  118. * NOTES: 00118000
  119. * 00119000
  120. * NONE 00120000
  121. * 00121000
  122. * OPERATION: 00122000
  123. * 00123000
  124. * AFTER PERFORMING SOME ERROR CHECKS, RDBUF CALLS 00124000
  125. * ACTLKP TO DETERMINE IF THE GIVEN FILE IS IN THE 00125000
  126. * ACTIVE FILE TABLE. IF IT IS FOUND BUT IS AN ACTIVE 00126000
  127. * WRITE, AN ERROR 9 IS GIVEN. IF AN ACTIVE READ, THEN 00127000
  128. * PROCESSING PROCEEDS AS DESCRIBED UNDER "FILE ACTIVE". 00128000
  129. * IF THE FILE IS ACTIVE BUT NEITHER A READ NOR A WRITE, 00129000
  130. * THEN IT MUST HAVE BEEN PLACED IN THE ACTIVE TABLE BY 00130000
  131. * A POINT FUNCTION CALL; PROCESSING CONTINUES AS 00131000
  132. * DESCRIBED BELOW AT THE POINT AFTER THE ENTRY IS 00132000
  133. * PLACED IN THE ACTIVE FILE TABLE BY ACTFREE. 00133000
  134. * 00134000
  135. * FILE NOT ACTIVE: 00135000
  136. * 00136000
  137. * IF THE FILE IS NOT FOUND BY ACTLKP IN THE ACTIVE FILE 00137000
  138. * TABLE, RDBUF CHECKS TO SEE IF THE FILE REFERENCED AT 00138000
  139. * STATEFST (LEFT BY THE MOST RECENT CALL TO STATE) 00139000
  140. * MATCHES THE CALLER'S PARAMETER LIST. (AS MANY 00140000
  141. * COMMANDS STATE A FILE TO FIND ITS EXISTENCE AND 00141000
  142. * CHARACTERISTICS AND THEN IMMEDIATELY RDBUF THE FIRST 00142000
  143. * RECORD, THERE IS A GOOD CHANCE THIS WILL OCCUR--THUS 00143000
  144. * SAVING A NEEDLESS SEARCH OF THE FST TABLES). IF FOUND 00144000
  145. * AT STATEFST, THE ADDRESSES OF THE ACTIVE DISK TABLE 00145000
  146. * AND THE FST ENTRY ITSELF ARE OBTAINED FROM THE EIGHT 00146000
  147. * BYTES IMMEDIATELY FOLLOWING THE STATEFST COPY, AND 00147000
  148. * FSTLKP IS NOT CALLED. (IF NOT FOUND BY FSTLKP, AN 00148000
  149. * ERROR 1 OCCURS). IF FOUND BY FSTLKP, OR FOUND IN 00149000
  150. * STATEFST AS ABOVE, THEN ACTFREE IS CALLED TO FIND OR 00150000
  151. * CREATE AN ENTRY IN THE ACTIVE FILE TABLE AND INSERT 00151000
  152. * THE 40-BYTE FST ENTRY THEREIN. 00152000
  153. * 00153000
  154. * WHEN THE FILE HAS BEEN PLACED IN THE ACTIVE FILE 00154000
  155. * TABLE (OR WAS ALREADY THERE FROM A POINT FUNCTION AS 00155000
  156. * MENTIONED ABOVE), RDBUF MARKS THE FILE AS BEING 00156000
  157. * ACTIVE. NEXT, RDBUF OBTAINS BUFFER SPACE INTO WHICH 00157000
  158. * TO READ THE DATA BLOCKS AND INTO WHICH TO READ THE 00158000
  159. * FIRST CHAIN LINK. IT THEN CALLS THE RDTK FUNCTION 00159000
  160. * PROGRAM TO READ THE FIRST CHAIN LINK INTO MAIN 00160000
  161. * STORAGE. RDBUF NEXT MOVES THE FIRST 80 BYTES OF THE 00161000
  162. * FIRST CHAIN LINK INTO THE CHAIN LINK DIRECTORY IN THE 00162000
  163. * ACTIVE FILE TABLE ENTRY. THEN RDBUF DETERMINES IF 00163000
  164. * THE ITEM(S) TO BE READ IS/ARE OF FIXED OR VARIABLE 00164000
  165. * LENGTH. IF OF VARIABLE LENGTH, PROCESSING PROCEEDS 00165000
  166. * AS DESCRIBED UNDER "VARIABLE-LENGTH ITEM" IN THIS 00166000
  167. * SECTION. IF OF FIXED LENGTH, PROCESSING PROCEEDS AS 00167000
  168. * DESCRIBED BELOW. 00168000
  169. * 00169000
  170. * FIXED-LENGTH ITEM: RDBUF CALCULATES THE NUMBER OF 00170000
  171. * BYTES TO BE READ. THIS IS EQUAL TO THE ITEM LENGTH 00171000
  172. * MULTIPLIED BY THE NUMBER OF ITEMS TO BE READ. IT 00172000
  173. * THEN CALCULATES (FROM THE ITEM NUMBER SUPPLIED IN THE 00173000
  174. * PARAMETER LIST) THE DATA BLOCK FROM WHICH THE ITEM(S) 00174000
  175. * IS/ARE TO BE READ. THIS CALCULATION ALSO YIELDS THE 00175000
  176. * DISPLACEMENT FROM THE START OF THE DATA BLOCK OF THE 00176000
  177. * FIRST BYTE TO BE READ. NEXT, RDBUF DETERMINES 00177000
  178. * WHETHER THE AFFECTED DATA BLOCK IS IN MAIN STORAGE. 00178000
  179. * IF IT IS NOT, RDBUF DETERMINES WHETHER THE CHAIN LINK 00179000
  180. * REQUIRED TO ACCESS THE NEEDED DATA BLOCK IS IN MAIN 00180000
  181. * STORAGE. IF THE REQUIRED CHAIN LINK IS NOT IN MAIN 00181000
  182. * STORAGE, RDBUF CALLS THE RDTK FUNCTION PROGRAM TO 00182000
  183. * READ IT INTO MAIN STORAGE. AFTER THE REQUIRED CHAIN 00183000
  184. * LINK HAS BEEN READ INTO MAIN STORAGE, OR IF IT IS 00184000
  185. * ALREADY IN MAIN STORAGE, RDBUF DETERMINES WHETHER THE 00185000
  186. * AFFECTED DATA BLOCK EXISTS. (IT WILL IF ITS 00186000
  187. * CORRESPONDING ENTRY IN THE CHAIN LINK THAT IS IN MAIN 00187000
  188. * STORAGE CONTAINS A VALID DISK ADDRESS.) IF THE 00188000
  189. * AFFECTED DATA BLOCK DOES NOT EXIST, RDBUF FILLS THE 00189000
  190. * INPUT BUFFER WITH ZEROES AND RETURNS TO THE CALLING 00190000
  191. * PROGRAM. IF IT DOES EXIST, RDBUF READS IT INTO THE 00191000
  192. * DATA BLOCK BUFFER. 00192000
  193. * 00193000
  194. * IF THE AFFECTED DATA BLOCK IS IN MAIN STORAGE WHEN 00194000
  195. * RDBUF IS CALLED, OR IF IT IS NOT, AFTER IT HAS BEEN 00195000
  196. * READ INTO MAIN STORAGE (IF NECESSARY), RDBUF 00196000
  197. * DETERMINES WHETHER IT CONTAINS ALL OF THE BYTES TO BE 00197000
  198. * READ. (IT WILL IF THE RESULT OF 800 MINUS THE 00198000
  199. * PREVIOUSLY CALCULATED DISPLACEMENT IS GREATER THAN OR 00199000
  200. * EQUAL TO THE NUMBER OF BYTES TO BE READ.) IF THE 00200000
  201. * DATA BLOCK CONTAINS ALL OF THE BYTES TO BE READ, 00201000
  202. * RDBUF MOVES THEM FROM THE DATA BLOCK BUFFER (WHERE 00202000
  203. * THE DATA BLOCK RESIDES) TO THE INPUT BUFFER AND 00203000
  204. * RETURNS TO THE CALLING PROGRAM. IF THE DATA BLOCK 00204000
  205. * DOES NOT CONTAIN ALL OF THE BYTES TO BE READ, RDBUF 00205000
  206. * MOVES THE PERTINENT BYTES FROM THE DATA BLOCK BUFFER 00206000
  207. * TO THE INPUT BUFFER. IT THEN READS THE NEXT DATA 00207000
  208. * BLOCK INTO MAIN STORAGE, OBTAINS THE REMAINING BYTES 00208000
  209. * TO BE READ FROM IT, MOVES THEM TO THE INPUT BUFFER, 00209000
  210. * AND RETURNS TO THE CALLING PROGRAM. (IF THE 800 00210000
  211. * BYTES IN THE NEXT DATA BLOCK ARE NOT SUFFICIENT TO 00211000
  212. * SATISFY THE READ, RDBUF MOVES THE ENTIRE 800 BYTES TO 00212000
  213. * THE INPUT BUFFER AND READS THE NEXT DATA BLOCK TO GET 00213000
  214. * THE REMAINING BYTES. RDBUF REPEATS THIS PROCEDURE 00214000
  215. * UNTIL THE NUMBER OF BYTES IN THE INPUT BUFFER EQUALS 00215000
  216. * THE NUMBER OF BYTES TO BE READ. IT THEN RETURNS TO 00216000
  217. * THE CALLING PROGRAM.) 00217000
  218. * 00218000
  219. * VARIABLE-LENGTH RECORD: RDBUF READS SUCCESSIVE DATA 00219000
  220. * BLOCKS (STARTING WITH THE FIRST) UNTIL IT LOCATES THE 00220000
  221. * ONE THAT CONTAINS THE START OF THE VARIABLE-LENGTH 00221000
  222. * ITEM TO BE READ. IT THEN MOVES THE ITEM LENGTH TO THE 00222000
  223. * START OF THE INPUT BUFFER. IF THE FIRST DATA BLOCK 00223000
  224. * CONTAINS THE ENTIRE ITEM, RDBUF RETURNS TO THE 00224000
  225. * CALLING PROGRAM. IF THE FIRST DATA BLOCK DOES NOT 00225000
  226. * CONTAIN THE ENTIRE ITEM, RDBUF MOVES THE DATA BLOCK 00226000
  227. * TO THE INPUT BUFFER AND READS THE NEXT DATA BLOCK 00227000
  228. * INTO THE DATA BLOCK BUFFER, MOVES THE REMAINDER OF 00228000
  229. * THE ITEM TO THE INPUT BUFFER, AND RETURNS TO THE 00229000
  230. * CALLING PROGRAM. IF THE REMAINDER OF THE 00230000
  231. * VARIABLE-LENGTH ITEM IS NOT COMPLETELY CONTAINED WITH 00231000
  232. * THE 800 BYTES OF THE SECOND DATA BLOCK, RDBUF READS 00232000
  233. * THE NEXT DATA BLOCK TO GET THE REMAINING BYTES. 00233000
  234. * RDBUF REPEATS THIS PROCEDURE UNTIL THE ENTIRE 00234000
  235. * VARIABLE-LENGTH ITEM HAS BEEN PLACED IN THE INPUT 00235000
  236. * BUFFER. IT THEN RETURNS TO THE CALLING PROGRAM. 00236000
  237. * 00237000
  238. * FILE ACTIVE: 00238000
  239. * 00239000
  240. * IF THE FILE IS ACTIVE, RDBUF DETERMINES WHETHER THE 00240000
  241. * ITEM TO BE READ IS OF FIXED OR VARIABLE LENGTH. IF 00241000
  242. * OF FIXED LENGTH, IT PROCEEDS AS DESCRIBED FOR 00242000
  243. * FIXED-LENGTH ITEMS UNDER "FILE NOT ACTIVE". IF OF 00243000
  244. * VARIABLE LENGTH AND THE ITEM TO BE READ IMMEDIATELY 00244000
  245. * FOLLOWS THE ONE JUST READ, RDBUF MOVES THE 00245000
  246. * VARIABLE-LENGTH ITEM INTO THE INPUT BUFFER IN THE 00246000
  247. * PREVIOUSLY DESCRIBED MANNER. IF THE VARIABLE-LENGTH 00247000
  248. * ITEM TO BE READ PRECEDES THE ONE JUST READ, RDBUF 00248000
  249. * PROCEEDS AS DESCRIBED FOR VARIABLE-LENGTH RECORDS 00249000
  250. * UNDER "FILE NOT ACTIVE". IF THE VARIABLE-LENGTH ITEM 00250000
  251. * TO BE READ FOLLOWS, BUT NOT IMMEDIATELY, THE ONE JUST 00251000
  252. * READ, RDBUF READS FORWARD FROM THE CURRENT LOCATION 00252000
  253. * IN THE FILE UNTIL IT LOCATES THE DATA BLOCK 00253000
  254. * CONTAINING THE START OF THE DESIRED ITEM. IT THEN 00254000
  255. * MOVES THAT ITEM TO THE INPUT BUFFER AS PREVIOUSLY 00255000
  256. * DESCRIBED. 00256000
  257. * 00257000
  258. * NOTES: 00258000
  259. * 00259000
  260. * 1. IF FEASIBLE, RDBUF READS ANY PHYSICAL BLOCKS OF 00260000
  261. * 800 BYTES OR MORE DIRECTLY INTO THE CALLER'S 00261000
  262. * BUFFER, RATHER THAN INTO A FREE STORAGE BUFFER AND 00262000
  263. * THEN MOVING THE DATA. FOR EXAMPLE, IF A CALLER 00263000
  264. * CALLS FOR FORTY 80-BYTE RECORDS, TOTALING 3200 00264000
  265. * BYTES, RDBUF (WHEN IT HAS THE DATA-BLOCK DISK 00265000
  266. * ADDRESSES AVAILABLE FROM THE APPROPRIATE CHAIN 00266000
  267. * LINK) CALLS RDTK TO READ THE 3200 BYTES DIRECTLY 00267000
  268. * INTO THE CALLER'S BUFFER. THIS PROCEDURE SAVES 00268000
  269. * CONSIDERABLE PROCESSING, IO'S TO THE DISK, DATA 00269000
  270. * MOVING, ETC. 00270000
  271. * 00271000
  272. * 2. RDBUF, IN ADDITION TO VARIOUS OTHER CHECKING, 00272000
  273. * CHECKS THE CORE-ADDRESS GIVEN BY THE CALLER. THIS 00273000
  274. * CORE ADDRESS MUST BE NO LOWER THAN THE BEGINNING 00274000
  275. * OF FREE STORAGE (FREAR), WITH THE SINGLE EXCEPTION 00275000
  276. * OF THE STORAGE AREA BLK1, WHICH IS LEGAL FOR 00276000
  277. * CERTAIN APPLICATIONS. IF THE CORE-ADDRESS IS NOT 00277000
  278. * ABOVE FREAR OR WITHIN BLK1, AN ERROR CODE 2 IS 00278000
  279. * GIVEN, AND NO READING OCCURS. THIS SAFEGUARDS THE 00279000
  280. * CMS NUCLEUS FROM BEING CLOBBERED BY AN INVALID 00280000
  281. * RDBUF PARAMETER LIST IN ANY PROGRAM. 00281000
  282. * 00282000
  283. *. 00283000
  284. * 3. RDBUF ALSO DETERMINES WHETHER A NULL RECORD HAS BEEN READ 00284000
  285. * AND INDICATES THIS APPROPRIATELY IN THE PLIST. 00285000
  286. EJECT 00286000
  287. DMSBRD START 0 00287000
  288. RDBUF EQU * 00288000
  289. ENTRY RDBUF 00289000
  290. USING NUCON,R0 00290000
  291. FSENTR REGSAV3 ENTER 'RDBUF' HERE, SAVE REGISTERS... 00291000
  292. MVI SWS(R13),00 CLEAR SWITCH (USED AS FOLLOWS ...) 00292000
  293. * BIT 4 = USER BUFFER AREA TOO SMALL IF ON 00293000
  294. * BIT 5 = VARIABLE ITEM ROUTINES 00294000
  295. SR R0,R0 MAKE SURE FULLWORD LOCATION TO STORE NO. 00295000
  296. LA R1,0(,R1) MAKE SURE THE REGISTER IS PRESENTABLE 00296000
  297. ST R0,READCNT INIT READ CNT TO '0' @V208888 00297000
  298. ST R0,FALIGN(,R13) AND MAKE SURE 'FALIGN' IS CLEAR. 00298000
  299. EJECT 00299000
  300. * 00300000
  301. ****************************************************** 00301000
  302. * 00302000
  303. * CHECK FOR PARAMETER LIST ERRORS 00303000
  304. * 00304000
  305. ******************************************************* 00305000
  306. * 00306000
  307. C R0,FILNAM(,R1) ARE FIRST 4 BYTES OF FILE ZERO? 00307000
  308. BE FSTERR YES - AN ERROR IN USER PARAMETER LIST 00308000
  309. * 00309000
  310. LM R14,R15,UBUFF(R1) A(USER-BUFFER) INTO R14, 00310000
  311. LA R14,0(,R14) STRIP OFF HIGH ORDER BYTE 00311000
  312. AR R15,R14 AND NOW HAVE END-OF-BUFFER IN R15. 00312000
  313. L R2,=V(TRANSEND) ADDRESS OF START OF NUCLEUS CODE 00313000
  314. L R3,AUSRAREA ADDRESS OF START OF USER AREA 00314000
  315. L R4,VMSIZE ADDRESS OF END OF VIRTUAL MEMORY 00315000
  316. CR R14,R0 READING INTO LOCATION 0 ? 00316000
  317. BNH ERROR2 YES, ERROR 00317000
  318. CR R15,R2 READING INTO FREE STORAGE ? 00318000
  319. BNH UBUFFOK (OR TRANSIENT AREA?) OK IF YES. @VA01246 00319000
  320. CR R14,R3 READING INTO NUCLEUS CODE ? 00320000
  321. BL ERROR2 YES, ERROR. V0510 00321000
  322. CR R15,R4 READING BEYOND END OF MEMORY ? 00322000
  323. BNH UBUFFOK NO, CONTINUE 00323000
  324. CLC VMSIZE+1(3),SVCOPSW+5 DCSS USER..??? @VA10561 00323300
  325. BL UBUFFOK LET HIM BE @VA10561 00323600
  326. ERROR2 LA R15,2 ERROR 2 IF < FREAR AND NOT IN 'BLK1' 00324000
  327. B RETURN OR IF END-OF-BUFFER > END-OF-CORE. 00325000
  328. * 00326000
  329. UBUFFOK EQU * OK IF USER BUFFER WITHIN BLK1 OR > FREAR & IN CORE 00327000
  330. LR R11,R1 SAVE R1 IN R11 FOR NOW, 00328000
  331. L R15,AACTLKP CALL 'ACTLKP' TO LOOK FOR MATCH. 00329000
  332. BALR R14,R15 (R13 OK AS IS) 00330000
  333. BZ FOUND1 BZ IF ACTLKP FOUND IT. 00331000
  334. CLC STATEFST(16),FILNAM(R1) IF NOT, PERHAPS GIVEN BY STATE? 00332000
  335. BNE RDB01 BNE IF NOT. 00333000
  336. CLC STATEFST+24(2),PMODE(R1) IF YES, DOES MODE MATCH TOO ? 00334000
  337. BE RDB02 GOOD SHOW IF YES, STATEFST HAS THE INFO. 00335000
  338. RDB01 EQU * @VA09734 00335800
  339. LR R1,R11 RESTORE REG ONE FOR LFS @VA09734 00336100
  340. L R15,=V(DMSLFS) IF NOT,CALL FSTLKP @VA09734 00336400
  341. BALR R14,R15 (R13 OK FOR FSTLKP ALSO) 00337000
  342. BZ ENTFND BZ IF FOUND BY FSTLKP. 00338000
  343. * 00339000
  344. FSTERR EQU * NAME NOT FOUND - AN ERROR 00340000
  345. LA R15,1 ERROR CODE 1 00341000
  346. B RETURN AND GO EXIT. 00342000
  347. * 00343000
  348. * FOUND BY ACTLKP ... 00344000
  349. FOUND1 LR R3,R1 REFERENCE ACTIVE-FILE-TABLE, 00345000
  350. USING AFTSECT,R3 ... 00346000
  351. TM AFTFLG,AFTWRT ACTIVE-WRITE ? 00347000
  352. LA R15,9 ERROR 9 00348000
  353. BO RETURN IF YES. 00349000
  354. LA R5,AFTFST POINT R5 TO COPY OF FST BLOCK IN AFT BLOCK 00350000
  355. B RDB03 JOIN CODE BELOW. 00351000
  356. DROP R3 (FOR NOW). 00352000
  357. EJECT 00353000
  358. * 00354000
  359. ************************************************************ 00355000
  360. * 00356000
  361. * NOW REGISTER 5 POINTS TO START OF CORRECT TABLE ENTRY 00357000
  362. * 00358000
  363. ************************************************************ 00359000
  364. * 00360000
  365. RDB02 LM R0,R1,STATER0 LOAD R0-R1 FROM STATEFST AREA. 00361000
  366. CLC 0(8,R1),FILNAM(R11) OSFST? @V201122 00362000
  367. BNE RDB01 MUST BE, DO LFS @V201122 00363000
  368. * 00364000
  369. ENTFND SR R3,R3 R3=0 MEANS FOUND BY FSTLKP 00365000
  370. LR R5,R1 REFERENCE FST-BLOCK 00366000
  371. USING FSTSECT,R5 ... 00367000
  372. RDB03 EQU * NOTE: R11 HOLDS ORIGINAL R1 (P-LIST POINTER) 00368000
  373. SR R8,R8 EMPTY A REGISTER. V0510 00369000
  374. ICM R8,B'0011',HOWMNY(R11) CHECK NO. OF ITEMS. V0510 00370000
  375. LTR R8,R8 SHOULD BE > 0 (AND NO MORE THAN 32767) 00371000
  376. LA R15,5 ERROR 5 IF 00372000
  377. BZ RETURN ¬> 0 V0510 00373000
  378. C R8,=F'32768' COMPARE WITH MAXIMUM. V0510 00374000
  379. BH RETURN <¬ 32768 V0510 00375000
  380. SR R14,R14 EMPTY A REGISTER. V0510 00376000
  381. ICM R14,B'0011',FSTIC GET NO. ITEMS IN FILE. V0510 00377000
  382. SR R4,R4 TIP IT OUT. V0510 00378000
  383. ICM R4,B'0011',ITEM(R11) GET ITEM NUMBER. V0510 00379000
  384. BNZ CKV USE IT, IF NOT = 0. P0297 00380000
  385. ICM R4,B'0011',FSTRP USE READ-POINTER FROM FST. V0510 00381000
  386. CKV CLI FSTFV,C'V' IS IT VARIABLE? P0297 00382000
  387. BNE CKF MAYBE IT'S FIXED? P0297 00383000
  388. C R8,ONE IF V, IS NO. OF ITEMS (STILL IN R8) = 1 ? 00384000
  389. BE CKEOF O.K. P0297 00385000
  390. LA R15,11 ERROR 11 IF NOT 1 ITEM AT A TIME 00386000
  391. B RETURN ... P0297 00387000
  392. CKF CLI FSTFV,C'F' IS IT FIXED? P0297 00388000
  393. BE CKEOF YES, CHECK ON. P0297 00389000
  394. LA R15,7 ERROR 7, IF NOT F OR V. P0297 00390000
  395. B RETURN ... P0297 00391000
  396. CKEOF CR R4,R14 IS NUMBER BIGGER THAN NO. OF ITEMS? P0297 00392000
  397. LA R15,12 ERROR 12 (END OF FILE) P0297 00393000
  398. BH RETURN IF YES, END OF DATA. P0297 00394000
  399. LTR R3,R3 IS THIS IN ACTIVE TABLE? P0297 00395000
  400. BP ACTIVE BP IF YES (ALREADY SET UP) 00396000
  401. DROP R5 00397000
  402. USING FSCBD,R5 @VA06024 00398000
  403. EJECT 00399000
  404. * 00400000
  405. ************************************************************ 00401000
  406. * 00402000
  407. * WE MUST OPEN THE FILE BY LOOKING FOR AN EMPTY 00403000
  408. * ENTRY IN THE ACTIVE STATUS TABLE AND FILLING 00404000
  409. * THIS ENTRY WITH INFORMATION ABOUT THE FIRST 00405000
  410. * CHAIN LINK 00406000
  411. ************************************************************ 00407000
  412. * 00408000
  413. LR R1,R5 RESTORE R1 VALUE FROM FSTLKP, 00409000
  414. * NOTE: R11 HOLDS ORIGINAL R1 (P-LIST POINTER) FOR ACTFREE 00410000
  415. L R15,AACTFREE CALL 'ACTFREE' TO DO ALMOST ALL THE WORK 00411000
  416. BALR R14,R15 ... 00412000
  417. LR R3,R1 REFERENCE ACTIVE FILE TABLE, 00413000
  418. USING AFTSECT,R3 ... 00414000
  419. RDB10 OI AFTFLG,AFTRD SET ACTIVE-READ FLAG-BIT 00415000
  420. STH R4,AFTRP MAKE SURE READ-POINTER IS CORRECT 00416000
  421. MVC PLIST+12(4,R13),AFTADT STORE ACTIVE-DISK-TABLE PTR. 00417000
  422. LA R0,125 GET 125 DOUBLE-WORDS V0510 00418000
  423. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR, @VA03665X00419000
  424. ERR=ERROR25 @VA03665 00420000
  425. ST R1,AFTFCLA POINT TO THE FCL BUFFER. V0510 00421000
  426. LR R10,R1 ALSO KEEP IN R10. 00422000
  427. LA R11,200(,R1) PLUS 200 INTO R11, AND 00423000
  428. ST R11,AFTDBA STORE CORE-ADDRESS OF 800-BYTE DATA-BLOCK 00424000
  429. L R5,REGSAV3+4 NOW PLACE ORIGINAL R1 IN R5 (TO STAY) 00425000
  430. MVC AFTCLD(2),AFTFCL POINT CHAIN LINK PTR TO 00426000
  431. MVC AFTCLN(2),ONE+2 FIRST CHAIN LINK 00427000
  432. SR R9,R9 SIGNIFY WE WANT A QUARTER OF A QUARTER 00428000
  433. ST 9,PLIST+4(,13) OF A TRACK FROM RDTK 00429000
  434. ST 10,PLIST(,13) PUT CORE MEM ADDR IN RDTK PARAM LIST 00430000
  435. LA 9,AFTCLD AND ALSO PLACE ADDRESS OF FIRST DISK 00431000
  436. ST 9,PLIST+8(,13) ADDRESS IN PARAM LIST 00432000
  437. BAL 9,READ AND READ IN FIRST CHAIN LINK 00433000
  438. MVC AFTCLB(80),0(10) MOVE IN LINKAGE PART OF 00434000
  439. * FIRST CH LINK TO THE ACTIVE STATUS TABLE 00435000
  440. MVC AFTIN(4),ZERO INITIALIZE ITEM NO AND DISPLACEME 00436000
  441. CLI AFTFV,C'V' IS IT VARIABLE LENGTH ITEMS 00437000
  442. BE VARSCH YES, FIND LOC. OF ITEM 00438000
  443. EJECT 00439000
  444. * 00440000
  445. ************************************************************ 00441000
  446. * 00442000
  447. * ACTIV - THE FILE IS NOW IN ACTIVE STATUS 00443000
  448. * 00444000
  449. * GIVE THE USER THE ITEM HE REQUESTED 00445000
  450. * 00446000
  451. ************************************************************* 00447000
  452. * 00448000
  453. ACTIV EQU * 00449000
  454. BCTR 4,0 DECREASE ITEM NUMBER BY 1 00450000
  455. SR R9,R9 ... V0510 00451000
  456. ICM R9,B'0011',AFTIC GET NO. ITEMS IN FILE. V0510 00452000
  457. SR 9,4 SUBTRACT FIRST ITEM NO. DESIRED 00453000
  458. CLM R9,B'0011',HOWMNY(R5) ENOUGH ITEMS? V0510 00454000
  459. BL *+8 NO, LIMIT REQUESTED NUMBER 00455000
  460. ICM R9,B'0011',HOWMNY(R5) YES. GIVE ALL. V0510 00456000
  461. M 8,AFTIL MULTIPLY BY ITEM LENGTH 00457000
  462. L 2,BUFSIZ(,R5) AND USER BUFFER SIZE IN REG 2 00458000
  463. LR 7,4 00459000
  464. L 4,UBUFF(,R5) PTR TO USER BUFFER AREA IN REG 4 00460000
  465. LA R4,0(,R4) STRIP OFF HIGH ORDER BYTE 00461000
  466. M 6,AFTIL MULTIPLY BY NO. OF BYTES/ITEM 00462000
  467. LA 8,800 AND DIVIDE BY RECORD LENGTH 00463000
  468. DR 6,8 00464000
  469. * NOW REGISTER 7 HAS THE RELATIVE TRACK 00465000
  470. * NUMBER AND REGISTER 6 HAS THE LOCATION 00466000
  471. * OF THE ITEM 00467000
  472. TM AFTFLG,X'08' IS THERE A DATA-BLOCK IN CORE ? 00468000
  473. BE CORLNK NO - BRANCH TO READ IT IN 00469000
  474. CLM 7,B'0011',AFTDBN IS THE CORRECT DATA BLOCK IN COP0992 00470000
  475. BNE CORLNK NO - GO GET IT 00471000
  476. MVI FSCBFLG,FSTITAV INDICATE ITEM AVAILABLE @VA06024 00474000
  477. * 00475000
  478. * AT THIS POINT, REGISTERS ARE AS FOLLOWS ... 00476000
  479. * R2 = NO. OF BYTES DESIRED BY USER (USER BUFFER SIZE) 00477000
  480. * R4 = ADDRESS OF USER CORE-BUFFER (PTR TO USER BUFFER) 00478000
  481. * R6 = DISPLACEMENT WITHIN BLOCK OF FIRST DATA BYTE 00479000
  482. * R7 = PHYSICAL BLOCK NUMBER ('TRKNO') 00480000
  483. * R8 = BUFFER SIZE (E.G. 800, ETC.) 00481000
  484. * R9 = ITEM-LENGTH (NO OF BYTES ACTUALLY IN ITEM) 00482000
  485. LR1411 LR R14,R11 SET R14=R11 TO PASS 'BNE JSNEW' TEST... 00483000
  486. * 00484000
  487. MVDATA NI AFTFLG,X'FF'-X'08' CLEAR DATA-BLOCK-IN-CORE BIT, 00485000
  488. LR R0,R6 COMPUTE 'DISPLACEMENT' 00486000
  489. AR R0,R9 OF 'NEXT RECORD' 00487000
  490. ST R0,JDISP(,R13) AND SAVE FOR LATER USE. 00488000
  491. CR R14,R11 DID WE READ INTO FREE STORAGE ? 00489000
  492. BNE JSNEW BNE IF NOT (DIRECTLY INTO USER-BUF) 00490000
  493. SR 8,6 GET NO. OF BYTES LEFT IN CURR DATA BLOCK 00491000
  494. CR 9,8 IS THE ITEM WHOLLY CONTAINED IN THE BUFFER 00492000
  495. BNH MOVIT BNH IF YES, GO MOVE IT IN. 00493000
  496. CR 2,8 IS THE USER BUFFER LARGE ENOUGH 00494000
  497. BNH BUFSML BNH IF 'BUFFER SMALL' BUT DATA WILL FIT 00495000
  498. ST 9,TEMP(,13) STORE ACTUAL ITEM LENGTH 00496000
  499. LR 9,8 PUT SIZE OF ITEM IN BLOCK IN CORE IN R9 00497000
  500. LR R15,R8 BYTE-COUNT READ INTO R15, 00498000
  501. BAL R8,ITEMK GO UPDATE COUNT AND MOVE THE DATA. 00499000
  502. LA 8,1(,9) RELOAD REG. 8 00500000
  503. L 9,TEMP(,13) AND REG 9 00501000
  504. SR 9,8 UPDATE ITEM LENGTH LEFT TO MOVE 00502000
  505. AR 4,8 STARTING POINT IN USER AREA 00503000
  506. SR 2,8 AND SIZE OF USER BUFFER LEFT 00504000
  507. LAR7 LA R7,1(,R7) UPDATE RELATIVE TRACK NUMBER IN R7, 00505000
  508. SR66 SR R6,R6 CLEAR R6 TO START AT BEG. OF BLOCK. 00506000
  509. LA 8,800 RESTORE NO. OF BYTES/QUARTER TRACK 00507000
  510. B CORLNK1 READ IN SOME MORE ... 00508000
  511. * 00509000
  512. * 00510000
  513. BUFSML LR 9,2 USER AREA TOO SMALL 00511000
  514. LR R15,R2 BYTE-COUNT READ INTO R15, 00512000
  515. BAL R8,ITEMK GO UPDATE COUNT AND MOVE THE DATA. 00513000
  516. B ERROR8 GO SET ERROR 8 - BUFFER TOO SMALL FOR IT 00514000
  517. * 00515000
  518. * 00516000
  519. MOVIT OI AFTFLG,X'08' SET DATA-BLOCK-IN-CORE IF DATA LEFT 00517000
  520. CR R2,R9 IS USER-BUFFER LARGE ENOUGH FOR ITEM? 00518000
  521. BL BUFSML BL IF NOT, MOVE IN PART OF ITEM. 00519000
  522. LR R15,R9 BYTE-COUNT READ INTO R15, 00520000
  523. BAL R8,ITEMK GO UPDATE COUNT AND MOVE THE DATA. 00521000
  524. B CLEAR15 GO CLEAR R15 AND EXIT. 00522000
  525. * 00523000
  526. * IF WE READ DIRECTLY INTO USER CORE (AT LEAST 800 BYTES) ... 00524000
  527. JSNEW A R7,JACTNO(,R13) UPDATE NUMBER OF PHYSICAL BLOCKS READ 00525000
  528. SR R2,R15 UPDATE R2 = NO. OF BYTES TO READ, 00526000
  529. AR R4,R15 UPDATE R4 = CORE-ADDRESS FOR READING, 00527000
  530. SR R9,R15 UPDATE R9 = NO. OF BYTES TO READ 00528000
  531. A R15,READCNT UPDATE COUNT OF BYTES.. @V208888 00529000
  532. ST R15,READCNT READ THUS FAR. @V208888 00530000
  533. CR R2,R9 IS R2 < R9 ? 00531000
  534. BNL CHEK9 BNL IF NOT (NO PROBLEM). 00532000
  535. LTR R2,R2 IF BUFFER TOO SMALL, IS THERE ANY MORE 00533000
  536. BP SR66 BP IF YES, CONTINUE READING. 00534000
  537. ERROR8 LA R15,8 IF THRU, SET ERROR 8 00535000
  538. B NOERR AND GO COMPUTE CITMDS FOR NEXT TIME. 00536000
  539. CHEK9 LTR R9,R9 IF REGULAR CASE, ANY LEFT TO READ? 00537000
  540. BP SR66 BP IF YES, CONTINUE READING. 00538000
  541. SR R15,R15 IF ALL DONE, CLEAR R15, 00539000
  542. L R6,JREM(,R13) REMAINDER (IT IS VALID) INTO R6, AND 00540000
  543. B STHR7 GO STORE NEW 'TRKNO' AND REMAINDER. 00541000
  544. EJECT 00542000
  545. ********************************************************************* 00543000
  546. * 00544000
  547. * VARIABLE LENGTH ITEM ROUTINES 00545000
  548. * 00546000
  549. ********************************************************************* 00547000
  550. * 00548000
  551. * SEARCH FOR DESIRED ITEM NUMBER 00549000
  552. * 00550000
  553. VARSCH SR 7,7 SET BLOCK NO. = 0 00551000
  554. MVC AFTIN(2),ONE+2 SET ITEM NO = 1 00552000
  555. STH R7,AFTID SET DISPLACEMENT = 0 00553000
  556. BAL R8,DISKRD READ VERY FIRST DATA BLOCK 00554000
  557. VARLP1 CLC AFTIN(2),AFTRP ARE WE AT READ PLACE 00555000
  558. BE ALLSET YUP, ALMOST FINISHED 00556000
  559. VARLP1A LH R6,AFTID GET DISPLACEMENT WITHIN DATA BLOCK 00557000
  560. C 6,=F'798' IS ITEM LENGTH IN THIS BLOCK 00558000
  561. BH OVERLP BH IF NOT, ADJUST THINGS 00559000
  562. BE OVERL3 BE IF LENGTH = LAST 2 BYTES IN BLOCK 00560000
  563. LA 8,0(6,11) GET LOC. OF ITEM LENGTH 00561000
  564. MVC ALIGN(2,13),0(8) ALIGN TO HALFWORD BOUNDARY 00562000
  565. L R15,FALIGN(,R13) GET NEXT ITEM-LENGTH, 00563000
  566. LA R9,2(R6,R15) ADJUST AS NECESSARY, 00564000
  567. VARLP2 C R9,EIGHTHD IS ITEM LENGTH < 800? V0510 00565000
  568. BL INBLCK BL IF YES, IN THIS BLOCK (& IN CORE) 00566000
  569. SR R8,R8 IF 800 OR MORE, 00567000
  570. D R8,EIGHTHD DIVIDE BY 800. V0510 00568000
  571. AR R7,R9 ADD QUOTIENT TO R7, 00569000
  572. LR R9,R8 REMAINDER INTO R9 FOR STORING SHORTLY 00570000
  573. BAL R8,DISKRD READ IN THE APPROPRIATE BLOCK. 00571000
  574. INBLCK STH R9,AFTID STORE NEW DISPLACEMENT (ITEM LENGTH) 00572000
  575. SR R6,R6 ... V0510 00573000
  576. ICM R6,B'0011',AFTIN GET ITEMNO FOR INCR. V0510 00574000
  577. LA 6,1(,6) ... 00575000
  578. STH 6,AFTIN ... 00576000
  579. B VARLP1 TEST ITEM NUMBER 00577000
  580. OVERLP C R6,EIGHTHD FIRST BYTE IN THIS BLOCK? V0510 00578000
  581. BL WAS799 BL IF OK, IT'S THERE AT 799. 00579000
  582. ERROR13 LA R15,13 ERROR 13 IF DISPLACEMENT IS 'SICK'. 00580000
  583. B RETURN (SHOULDN'T HAPPEN IF ALL CODE CORRECT) 00581000
  584. WAS799 MVC ALIGN(1,R13),799(R11) MOVE IN THE FIRST BYTE 00582000
  585. LA 7,1(,7) READ NEXT BLOCK 00583000
  586. BAL R8,DISKRD ... 00584000
  587. MVC ALIGN+1(1,R13),0(R11) GET SECOND BYTE 00585000
  588. L R9,FALIGN(,R13) GET NEW ITEM-LENGTH, 00586000
  589. LA R9,1(,R9) (ADJUST FOR 1-BYTE-LENGTH) 00587000
  590. B VARLP2 AND CONTINUE. 00588000
  591. * 00589000
  592. OVERL3 SR R9,R9 ... V0510 00590000
  593. ICM R9,B'0011',798(R11) GET NEW ITEM LENGTH. V0510 00591000
  594. LA 7,1(0,7) GET NEXT BLOCK 00592000
  595. BAL R8,DISKRD ... 00593000
  596. B VARLP2 AND CONTINUE. 00594000
  597. EJECT 00595000
  598. * 00596000
  599. ********************************************************************* 00597000
  600. * 00598000
  601. * GET VARIABLE LENGTH ITEM LENGTH AND GET DATA 00599000
  602. * 00600000
  603. ********************************************************************* 00601000
  604. * 00602000
  605. NQALLSET DS 0H 'NOT QUITE' ALL SET, DO WE HAVE A BLOCK IN CORE? 00603000
  606. TM AFTFLG,X'08' CHECK THE FLAG ... 00604000
  607. BO ALLSET BO IF FLAG SET, DATA-BLOCK IS THERE. 00605000
  608. BAL R8,DISKRD READ IN THE DATA BLOCK & WE'RE ALL SET 00606000
  609. * 00607000
  610. ALLSET LH 6,AFTID GET DISPLACEMENT 00608000
  611. L R2,BUFSIZ(,R5) USER-BUFFER-SIZE INTO R2, 00609000
  612. L R4,UBUFF(,R5) PTR. TO USER BUFFER IN R4, 00610000
  613. LA R4,0(,R4) STRIP OFF HIGH ORDER BYTE 00611000
  614. C 6,=F'798' IS EVERYTHING IN THIS BLOCK 00612000
  615. BH ALS2 BH IF NOT, ADJUST THINGS. 00613000
  616. BE ALS6 BE IF LENGTH = LAST 2 BYTES IN BLOCK 00614000
  617. LA R8,0(R6,R11) GET LOC. OF LENGTH 00615000
  618. MVC ALIGN(2,13),0(8) ... 00616000
  619. LA 6,2(,6) ADJUST DISPLACEMENT 00617000
  620. ALS5 L R9,FALIGN(,R13) NEW ITEM-LENGTH INTO R9, 00618000
  621. LA 8,800 BUFFER SIZE IN REG 8 00619000
  622. B LR1411 GO SET UP R14 AND MOVE WHATEVER DATA WE HAVE 00620000
  623. SPACE 1 V0510 00621000
  624. ALS2 C R6,EIGHTHD IS FIRST BYTE IN THIS BLOCK? V0510 00622000
  625. BNL ERROR13 BNL IF IT ISN'T (ERROR 13). 00623000
  626. MVC ALIGN(1,R13),799(R11) MOVE FIRST BYTE 00624000
  627. LA 7,1(,7) GET NEXT BLOCK 00625000
  628. BAL R8,DISKRD ... 00626000
  629. MVC ALIGN+1(1,13),0(11) GET SECOND BYTE 00627000
  630. LA 6,1 SET DISPLACEMENT = 1 00628000
  631. B ALS5 SET REGISTERS 00629000
  632. * 00630000
  633. ALS6 SR R9,R9 ... V0510 00631000
  634. ICM R9,B'0011',798(R11) GET NEW ITEM LENGTH. V0510 00632000
  635. B LAR7 GO SET UP R7, R6, R8, & READ A BLOCK. 00633000
  636. EJECT 00634000
  637. ********************************************************************* 00635000
  638. * 00636000
  639. * DISK INTERFACE FOR VARIABLE LENGTH ITEM ROUTINES 00637000
  640. * 00638000
  641. ********************************************************************* 00639000
  642. DISKRD OI SWS(13),X'04' SET FLAG 00640000
  643. B CORLNK2 GO READ A DATA BLOCK INTO FREE STORAGE 00641000
  644. * (RETURN-ADDRESS IS PRESERVED IN R8) 00642000
  645. * 00643000
  646. * 00644000
  647. DSKRET NI SWS(13),X'FB' RESET FLAG 00645000
  648. BR R8 RETURN TO CALLER VIA R8 00646000
  649. EJECT 00647000
  650. * 00648000
  651. ************************************************************ 00649000
  652. * 00650000
  653. * ACTIVE - THE FILE IS ALREADY LISTED IN THE 00651000
  654. * ACTIVE STATUS TABLE SO WE MUST PICK UP ITS 00652000
  655. * ENTRY ADDRESS IN THE AST 00653000
  656. * 00654000
  657. ************************************************************ 00655000
  658. * 00656000
  659. ACTIVE DS 0H NOTE -- R3 ALREADY POINTS TO THE CORRECT ENTRY 00657000
  660. TM AFTFLG,AFTRD ACTIVE-READ FLG-BIT SET ? 00658000
  661. BZ RDB10 BZ IF NOT (MUST BE FROM A 'POINT'). 00659000
  662. STH R4,AFTRP MAKE SURE READ-POINTER IS CORRECT 00660000
  663. MVC PLIST+12(4,R13),AFTADT STORE ACTIVE-DISK-TABLE PTR. 00661000
  664. L R5,REGSAV3+4 NOW PLACE ORIGINAL R1 IN R5 (TO STAY) 00662000
  665. L 10,AFTCLA LOAD ADDRESS OF CHAIN LINK BUFFER 00663000
  666. L 11,AFTDBA LOAD ADDRESS OF DATA BUFFER 00664000
  667. CLI AFTFV,C'V' IS IT VARIABLE LENGTH ITEM 00665000
  668. BNE ACTIV IF NOT 'V', GO HANDLE FIXED FILE. 00666000
  669. * 00667000
  670. * FOR ACTIVE VARIABLE FILE ... 00668000
  671. LH R7,AFTDBN SET PRESENT DATA BLOCK NO. 00669000
  672. CLC AFTIN(2),AFTRP ARE WE AT THE READ PLACE ? 00670000
  673. BE NQALLSET BE IF YES (IF WE HAVE ANYTHING IN CORE) 00671000
  674. BH VARSCH IF >, START SEARCH FROM BEGINNING 00672000
  675. TM AFTFLG,X'08' IF <, START FROM PRESENT POSITION 00673000
  676. BO VARLP1A IF WE HAVE THE BLOCK IN CORE. 00674000
  677. BAL R8,DISKRD IF NOT, READ IT IN FIRST, 00675000
  678. B VARLP1A AND THEN WE CAN PROCEED. 00676000
  679. EJECT 00677000
  680. * 00678000
  681. ************************************************************ 00679000
  682. * 00680000
  683. * CORLNK - READS IN THE DATA BLOCK AND, IF 00681000
  684. * NECESSARY, THE CHAIN LINK CONTAINING THE 00682000
  685. * POINTER TO THE DATA BLOCK WHICH IS NEEDED 00683000
  686. * TO GIVE THE USER THE ITEM HE REQUESTED 00684000
  687. * (RETURNS TO EITHER 'MVDATA' OR 'DSKRET') 00685000
  688. * 00686000
  689. ************************************************************ 00687000
  690. * 00688000
  691. CORLNK EQU * @VA06024 00689000
  692. MVI FSCBFLG,FSTITAV MAKE SURE FIELD IS INITIALIZED @VA06024 00690000
  693. LTR R6,R6 AT THE BEGINNING OF PHYSICAL BLK?@VA03023 00691000
  694. BNZ CORLNK2 BNZ IF NOT, READ INTO FREE STORAGE. 00692000
  695. * 00693000
  696. CORLNK1 LR R14,R4 SET R14 FOR CORE-ADDRESS, 00694000
  697. LR R15,R9 AND R15 FOR ITEM-SIZE 00695000
  698. CR R2,R9 MAKE SURE BUFFER ISN'T 'TOO SMALL' 00696000
  699. BNL CORLNK1A BNL IF OK (ADEQUATE SIZE) 00697000
  700. LR R15,R2 IF R2 <, SUBSTITUTE R2 COUNT. 00698000
  701. CORLNK1A C R15,EIGHTHD BYTE COUNT <¬ 800? V0510 00699000
  702. BNL CORLNK3 BNL IF OK, 800 OR MORE. 00700000
  703. B CORLNK2 INTO FREE STORAGE ... 00701000
  704. * 00702000
  705. JCORLNK2 LM R6,R9,REG69(R13) IF NECESSARY, RESTORE 6-9 AND RECOMPUTE 00703000
  706. * 00704000
  707. CORLNK2 LR R14,R11 SET TO READ INTO FREE STORAGE 00705000
  708. LA R15,800 WITH BYTE-COUNT OF 800. 00706000
  709. * 00707000
  710. CORLNK3 STM R14,R15,JS1415(R13) SAVE R14 & R15, 00708000
  711. STM R6,R9,REG69(R13) (SAVE REGS 6 THRU 9) 00709000
  712. MVC JREM(8,R13),ZERO STORE '0' AND '1' IN JREM & JACTNO 00710000
  713. STH 7,AFTDBN CHANGE DATA TRACK NO. IN ACTIVE STAT TA 00711000
  714. LA 6,60 IS POINTER TO DATA BLOCK 00712000
  715. CR 7,6 IN FIRST CHAIN LINK 00713000
  716. BNL NOTONE BNL IF 60 OR MORE, NOT IN 1ST C. L. 00714000
  717. MVC AFTCLD(2),AFTFCL MOVE DISK ADDR AND NO. OF 00715000
  718. MVC AFTCLN(2),ONE+2 FIRST CH. LINK INTO AST 00716000
  719. L R10,AFTFCLA GET ADDR OF FCL IN STORAGE. V0510 00717000
  720. LA R7,40(,R7) POINT TO THE CHAIN LINK ADDRS. V0510 00718000
  721. LA R8,100 AND INDICATE THEIR NUMBER. V0510 00719000
  722. B GTDATA REJOIN V0510 00720000
  723. RDCHL ST 10,PLIST(,13) SET UP RDTK PARAM LIST WITH ADDR. OF 00721000
  724. LA 9,AFTCLD CORE BUFFER AND ADDRESS OF DISK ADDRESS 00722000
  725. ST 9,PLIST+8(,13) AND READ IN CHAIN LINK 00723000
  726. BAL 9,READ 00724000
  727. RDCHL1 DS 0H @VA01954 00725000
  728. LM R14,R15,JS1415(R13) RESTORE R14 & R15 AS NEEDED. 00726000
  729. LINKIN LR R7,R6 REL. LOC OF DATA BLOCK @ @VA01954 00727000
  730. LA R8,400 SET R8 = 400 IN CASE NOT 1ST C. L. 00728000
  731. GTDATA SR R8,R7 R8 NOW=MAX. NO. OF CONSEC DISKAD'S FOR RDTK 00729000
  732. AR R7,R7 DOUBLE R7 FROM BYTES TO HALFWORDS, 00730000
  733. LA R9,0(R7,R10) R9 = ADDRESS OF 1ST DISK-ADDRESS 00731000
  734. LH R7,0(,R9) ACTUAL DISK-ADDRESS INTO R7, 00732000
  735. STH R7,AFTDBD STORE IT IN ACTIVE-STATUS TABLE. 00733000
  736. STM R14,R15,PLIST(R13) SET UP LOC. & COUNT FOR RDTK, 00734000
  737. * ALSO STORE START OF DISK-ADDRESSES 00735000
  738. ST R9,PLIST+8(,R13) IN PARAMETER-LIST FOR RDTK. 00736000
  739. C R15,EIGHTHD CHECK THE COUNT. V0510 00737000
  740. BH MULTBLKS NON-SIMPLE IF MORE TO DEAL WI@VA01954 00738000
  741. LTR R7,R7 IS BLOCK NULL? @VA01954 00739000
  742. BNZ BALR9 FINE, GO READ IT IN @VA01954 00740000
  743. SPACE 1 @VA01954 00741000
  744. * ZERO THE INTERMEDIATE BUFFER @VA01954 00742000
  745. * FOR THE FOLLOWING INSTRUCTION R14 IS THE ADDRESS, THE INTER- @VA01954 00743000
  746. * MEDIATE BUFFER; R15 IS THE LENGTH TO BE FILLED; R7 BITS 0-7 @VA01954 00744000
  747. * ARE THE PAD CHAR, AND BITS 8-31 ARE THE LENGTH OF THE 'FROM' @VA01954 00745000
  748. * FIELD, SO THE 'FROM' FIELD ADDRESS IN R6 IS IMMATERIAL. @VA01954 00746000
  749. MVCL R14,R6 NULL, CLEAR TO ZEROES @VA01954 00747000
  750. MVI FSCBFLG,FSTNOIT TELL HIM IT'S A NULL BLOCK @VA06024 00748000
  751. B BUFSET GOOD AS REAL I/O @VA01954 00749000
  752. SPACE 1 @VA01954 00750000
  753. MULTBLKS DS 0H @VA01954 00751000
  754. * NOTE -- AT THIS POINT, WE MUST CHECK TO ENSURE THAT ENOUGH 00752000
  755. * CONSECUTIVELY-STORED DISK-ADDRESSES ARE AVAILABLE IN THE 00753000
  756. * CHAIN-LINK TO HANDLE THE COUNT SUPPLIED ... 00754000
  757. SR R14,R14 CLEAR R14 FOR DIVIDE, 00755000
  758. D R14,EIGHTHD DIVIDE NO. BYTES BY 800. V0510 00756000
  759. ST R15,JACTNO(,R13) STORE NO. OF 800-BYTE BLOCKS READ. 00757000
  760. ST R14,JREM(R13) SAVE REMAINDER FOR NOW @VA01954 00758000
  761. CR R15,R8 ARE ENOUGH BLOCKS AVAIL IN CL@VA01954 00759000
  762. BNH SETLOOP SURE, SEE THAT THEY ALL EXIST@VA01954 00760000
  763. ST R8,JACTNO(,R13) STORE NO. OF 800-BYTE CHUNKS READ 00761000
  764. SR R15,R8 BLOCKS LEFT FOR NEXT CHUNK @VA01954 00762000
  765. M R14,EIGHTHD BYTES LEFT FOR NEXT CHUNK @VA01954 00763000
  766. A R15,JREM(R13) PLUS SMALL LEFTOVER @VA01954 00764000
  767. ST R15,JREM(R13) TOTAL BYTES TO GO @VA01954 00765000
  768. LR R15,R8 STD REG FOR BLOCKS TO READ @VA01954 00766000
  769. B ACTBYTE RECALC ACTUAL BYTES TO READ @VA02419 00767000
  770. SETLOOP LR R8,R15 NUMBER OF BLOCKS TO READ @VA02419 00768000
  771. ACTBYTE M R14,EIGHTHD CHANGE BACK TO BYTES @VA02419 00769000
  772. ST R15,PLIST+4(,R13) STORING NEW COUNT IN PLIST 00770000
  773. SPACE 1 @VA01954 00771000
  774. * ALL THE DISK ADDRESSES IN THE CHAIN MUST EXIST ! @VA01954 00772000
  775. SPACE 1 @VA01954 00773000
  776. BLKLOOP LH R7,0(R9) ACTUAL DATA BLOCK TRACK AD @VA01954 00774000
  777. LTR R7,R7 DOES THE DATA BLOCK EXIST? @VA01954 00775000
  778. BZ JCORLNK2 NO, THEN MUST DO INDIVIDUALLY@VA01954 00776000
  779. LA R9,2(R9) POINT TO NEXT ADDR ANYWAY @VA01954 00777000
  780. BCT R8,BLKLOOP @VA01954 00778000
  781. MVC JS1415+4(4,R13),PLIST+4(R13) PREP FOR NEXT GOROU@VA01954 00779000
  782. * 00780000
  783. BALR9 EQU * @VA06024 00781000
  784. OI FSCBFLG,FSTRECAV INDICATE PREV RECORD NULL @VA06024 00782000
  785. BAL R9,READ READ IN THE DATA BLOCK @VA03023 00783000
  786. BUFSET LM R6,R9,REG69(R13) BACK TO CHAIN LINK LEVEL @VA01954 00784000
  787. LM R14,R15,JS1415(R13) R14=ADDRESS & R15=ACTUAL COUNT. 00785000
  788. TM SWS(13),X'04' TEST FOR VARIABLE LENGTH USE 00786000
  789. BE MVDATA GIVE ITEM TO USER 00787000
  790. B DSKRET RETURN TO VARIABLE LENGTH PACKAGE 00788000
  791. * 00789000
  792. * 00790000
  793. NOTONE SR 7,6 CHAIN LINK NO. NOT ONE 00791000
  794. SR 6,6 GET CHAIN LINK NUMBER MINUS TWO IN REG 7 00792000
  795. D 6,FORHUN AND REL LOC OF ADDR IN CH. LINK IN REG 6 00793000
  796. LA 9,2(,7) PUT CHAIN LINK NUMBER IN REG 9 00794000
  797. CH 9,AFTCLN IS IT ALREADY IN CORE 00795000
  798. BE LINKIN YES 00796000
  799. TM AFTFLG,AFTFBA IS THERE AN N'TH CHAIN LINK BUFF? V0510 00797000
  800. BO BUFOKY ONLY NEED ONE. V0510 00798000
  801. ST 1,TEMP(,13) AND GET 800 BYTE BUFFER 00799000
  802. LA R0,100 GET STORAGE FOR CHAIN-LINK BUFFER V0510 00800000
  803. DMSFREE DWORDS=(0),TYPE=NUCLEUS,TYPCALL=BALR V0510 00801000
  804. LTR R15,R15 IF NOT SUCCESSFUL, @VA02374 00802000
  805. BNZ ERROR25 RETURN 'CANNOT COMPLETE' COD@VA02374 00803000
  806. OI AFTFLG,AFTFBA SIGNAL WE HAVE AN N'TH CL BUFFER. V0510 00804000
  807. ST 1,AFTCLA REG 10 AND ACTIVE STATUS 00805000
  808. L 1,TEMP(,13) TABLE 00806000
  809. BUFOKY STH 9,AFTCLN UPDATE CHAIN LINK NO. IN ACTIVE STAT TABLE 00807000
  810. L R10,AFTCLA GET CHAIN LINK BUFFER ADDRESS. V0510 00808000
  811. SLL 7,1 MULTIPLY CH. LINK NO. -2 BY TWO 00809000
  812. LH R8,AFTCLB(R7) TO PICK UP TRACK ADDR OF CHAIN LINK 00810000
  813. STH 8,AFTCLD PUT IT IN ACTIVE STATUS TABLE 00811000
  814. LTR 8,8 IS IT ZERO 00812000
  815. BZ CLEARLNK YES - GIVE USER AN ITEM OF ZERO @VA01486 00813000
  816. * (AND CLEAR THE NTH CHAIN LINK IN STORAGE) 00814000
  817. LA 9,800 NO - SIGNIFY 800 BYTES ARE TO BE READ BY 00815000
  818. ST 9,PLIST+4(,13) RDTK BY PLACING IN PARAM LIST 00816000
  819. B RDCHL LINK IN REG 7 AND READ IT IN 00817000
  820. * 00818000
  821. * IF THE LOGICAL RECORD DOES NOT EXIST BECAUSE THE NTH CHAIN LINK 00819000
  822. * DOES NOT EVEN EXIST, CLEAR THE NTH CHAIN LINK IN STORAGE FIRST: 00820000
  823. CLEARLNK L R14,AFTCLA R14 = ADDRESS OF NTH CHAIN LINK @VA01486 00821000
  824. L R15,EIGHTHD R15 = LENGTH @VA01486 00822000
  825. SR R9,R9 R9 = 0 (R8 IS IMMATERIAL) @VA01486 00823000
  826. MVCL R14,R8 CLEAR THE NTH CHAIN LINK, @VA01486 00824000
  827. B RDCHL1 PRETEND WE GOT IT @VA01954 00825000
  828. * 00826000
  829. * 00827000
  830. ************************************************************ 00828000
  831. * 00829000
  832. * RETURN -- UPDATES THE READ POINTER IN THE FILE STATUS 00830000
  833. * TABLE TO POINT TO THE NEXT SEQUENTIAL ITEM AND RETURNS 00831000
  834. * TO THE USER 00832000
  835. * 00833000
  836. ************************************************************ 00834000
  837. * 00835000
  838. CLEAR15 SR R15,R15 CLEAR ERROR-CODE IN R15 00836000
  839. * 00837000
  840. NOERR L R7,JDISP(,R13) DISPLACEMENT OF NEXT ITEM INTO R7, 00838000
  841. C R7,EIGHTHD < 800? V0510 00839000
  842. BL JSTR7 BL IF YES (EASY) 00840000
  843. NI AFTFLG,X'F7' CLEAR DATA-BLOCK-IN-CORE FLAG-BIT, 00841000
  844. SR R6,R6 CLEAR R6 FOR DIVIDE, 00842000
  845. D R6,EIGHTHD DIVIDE BY 800. V0510 00843000
  846. AH R7,AFTDBN ADD QUOTIENT TO 'TRKNO', 00844000
  847. STHR7 STH R7,AFTDBN STORE UPDATED VALUE OF TRKNO. 00845000
  848. LR R7,R6 PUT REMAINDER (FROM R6) INTO R7, 00846000
  849. JSTR7 STH R7,AFTID STORE REMAINDER (0 TO 799) FOR NEXT TIM 00847000
  850. SR R7,R7 ... V0510 00848000
  851. ICM R7,B'0011',AFTRP ADD NO. ITEMS READ. V0510 00849000
  852. AH 7,HOWMNY(,R5) ADD NO. OF ITEMS READ 00850000
  853. STH R7,AFTRP 00851000
  854. * (NOTE -- 'CITMDS' IS ALREADY UP TO DATE) 00852000
  855. STH 7,AFTIN SAVE ITEM NUMBER 00853000
  856. * 00854000
  857. RETURN EQU * @V208888 00855000
  858. L R1,READCNT @V208888 00856000
  859. L R5,REGSAV3+4 GET USER PLIST @V208888 00857000
  860. * THE FOLLOWING TWO INSTRUCTION PREVENT KEY-THRASHING @VA01954 00858000
  861. C R1,NOBYTE(,R5) IF COUNT ALREADY UPDATED, @V208888 00859000
  862. BE NOCNT DON'T BOTHER STORING @V208888 00860000
  863. ST R1,NOBYTE(,R5) OTHERWISE, DO IT @V208888 00861000
  864. NOCNT EQU * @V208888 00862000
  865. LM R0,R14,REGSAV3 RESTORE REGISTERS, @V208888 00863000
  866. LTR R15,R15 SET CONDITION-CODE (FOR CONVENIENCE OF LOADMOD) 00864000
  867. BR R14 AND EXIT (TO SVCINT OR LOADMOD). 00865000
  868. ERROR25 LA R15,CODE25 INSUFFICIENT STORAGE TO @VA02374 00866000
  869. B RETURN COMPLETE READ OPERATION @VA02374 00867000
  870. EJECT 00868000
  871. * 00869000
  872. ************************************************************ 00870000
  873. * 00871000
  874. * ITEML - A ROUTINE TO MOVE DATA TO THE USER'S BUFFER AREA 00872000
  875. * 00873000
  876. * REGISTER 9 CONTAINS THE NUMBER OF BYTES TO USE MINUS ONE 00874000
  877. * REGISTER 4 CONTAINS THE STARTING ADDRESS OF THE USER AREA 00875000
  878. * 00876000
  879. * RETURN TO THE CALLER IS THROUGH REGISTER 8 00877000
  880. * 00878000
  881. * (DOESN'T MOVE ANYTHING IF R9 < 0 -- JAS, 15 JUNE 1967) 00879000
  882. * 00880000
  883. ************************************************************ 00881000
  884. * 00882000
  885. ITEMK AR R6,R11 IF ENTER HERE, SET UP R6 AS NEEDED. 00883000
  886. ITEML A R15,READCNT UPDATE COUNT OF BYTES.. @V208888 00884000
  887. ST R15,READCNT READ THUS FAR. @V208888 00885000
  888. LA R15,255 NOW SET REGISTER 15 = 255, 00886000
  889. LA R0,256 AND REGISTER 0 = 256. 00887000
  890. S R9,ONE NO. OF BYTES TO MOVE LESS 1 @VA01246 00888000
  891. BM JPUNT DON'T MOVE ANYTHING IF R9 NEGATIVE 00889000
  892. ST 4,REG4(,13) SAVE REG 4 AND 9 00890000
  893. ST 9,REG9(,13) ... 00891000
  894. MVC NOBYTE(4,R5),READCNT UPDAT READ CNT IN USER LIST@V208888 00892000
  895. TESTFF CR R9,R15 IS THE NO. OF BYTES TO MOVE LESS THAN 256 00893000
  896. BNH ONCE YES - GO MOVE ALL AT ONCE 00894000
  897. EX R15,MVC MOVE 256 BYTES AT A TIME @VA01954 00895000
  898. SR 9,0 DECREASE COUNT OF BYTES TO MOVE 00896000
  899. AR 4,0 MOVE POINTER IN USER'S BUFFER 00897000
  900. AR 6,0 AND MOVE POINTER IN CORE BUFFER 00898000
  901. B TESTFF AND GO CHECK ITEM LENGTH REMAINING 00899000
  902. ONCE EX R9,MVC MOVE AMOUNT LESS THAN 256 @VA01954 00900000
  903. L 4,REG4(,13) RESTORE REGISTER 4 AND 9 00901000
  904. L 9,REG9(,13) ... 00902000
  905. JPUNT BR 8 AND RETURN TO THE CALLER 00903000
  906. EJECT 00904000
  907. * 00905000
  908. ************************************************************ 00906000
  909. * 00907000
  910. * READ - A ROUTINE TO READ A PART OF THE DISK 00908000
  911. * INTO CORE BY A CALL TO RDTK 00909000
  912. * 00910000
  913. ************************************************************ 00911000
  914. * 00912000
  915. READ LA 1,PLIST(,13) LOAD ADDR OF RDTK PARAM LIST 00913000
  916. L R15,ARDTK AND GO TO RDTK 00914000
  917. BALR 14,15 00915000
  918. BCR 8,R9 IF OK (C.C. = 0), RETURN TO CALLER 00916000
  919. CH R15,H25 LACK OF STORAGE @VA02374 00917000
  920. BE RETURN YES, RETURN THIS INDICATOR @VA02374 00918000
  921. LA R15,3 ERROR 3 IF PERMANENT DISK ERROR 00919000
  922. B RETURN GO EXIT. 00920000
  923. * 00921000
  924. DROP R12 00922000
  925. H25 DC H'25' @VA02374 00923000
  926. EJECT 00924000
  927. * 00925000
  928. ********************************************************************* 00926000
  929. * 00927000
  930. * FORMATTED PARAMETER LIST (R1, THEN R5) 00928000
  931. * 00929000
  932. ********************************************************************* 00930000
  933. * 00931000
  934. FILNAM EQU 8 FILE-NAME & FILE&TYPE 00932000
  935. PMODE EQU 24 MODE OF FILE 00933000
  936. ITEM EQU 26 ITEM NUMBER DESIRED 00934000
  937. UBUFF EQU 28 POINTER TO USER BUFFER AREA 00935000
  938. BUFSIZ EQU 32 SIZE OF USER BUFFER AREA IN BYTES 00936000
  939. FVFLAG EQU 36 FIXED-VARIABLE FLAG 00937000
  940. HOWMNY EQU 38 NO OF ITEMS WANTED 00938000
  941. NOBYTE EQU 40 NO OF BYTES READ (INSERTED BY RDBUF) 00939000
  942. EJECT 00940000
  943. FVS 00941000
  944. FSCBD @VA06024 00942000
  945. * 00943000
  946. ********************************************************************* 00944000
  947. * 00945000
  948. * FORMATTED SAVE-AREA (R13) 00946000
  949. * 00947000
  950. ********************************************************************* 00948000
  951. * 00949000
  952. TEMP EQU RWFSTRG-DISK$SEG TWO WORDS OF TEMPORARY STORAGE 00950000
  953. REG69 EQU TEMP+8 FOUR WORDS TO HOLD CONTENTS OF REG 6 - 9 00951000
  954. PLIST EQU REG69+16 16 BYTES TO HOLD PARAM. LIST FOR RDTK 00952000
  955. REG4 EQU PLIST VERY TEMPORARY STORAGE FOR REG 4 00953000
  956. REG9 EQU PLIST+4 VERY TEMPORARY STORAGE FOR REG 9 00954000
  957. UNUSED EQU PLIST+16 NO LONGER USED @VA01954 00955000
  958. SWS EQU UNUSED+6 1 BYTE TO CONTAIN FLAGS @VA01954 00956000
  959. FALIGN EQU SWS+2 FULL-WORD WITH 'ALIGN' IN RIGHT-END. 00957000
  960. ALIGN EQU FALIGN+2 HALF-WORD (RIGHT-END OF 'FALIGN') 00958000
  961. JS1415 EQU ALIGN+2 REGS 14-15 SAVED HERE BY 'CORLNK' 00959000
  962. JREM EQU JS1415+8 REMAINDER (IF ANY) IF NOT MULT. OF 800 00960000
  963. JACTNO EQU JREM+4 NO. OF 800-BYTE BLOCKS READ BY CORLNK. 00961000
  964. JDISP EQU JACTNO+4 REMAINDER FROM (R6+R9)-SIMILAR TO JREM 00962000
  965. * 00963000
  966. END$TEMP EQU JDISP+4 END OF TEMPORARY STORAGE. 00964000
  967. * 00965000
  968. DMSBRD CSECT 00966000
  969. * 00967000
  970. ********************************************************************* 00968000
  971. * 00969000
  972. * NUMBERS USED IN RDBUF 00970000
  973. * 00971000
  974. ********************************************************************* 00972000
  975. * 00973000
  976. * NOTE -- KEEP 'ZERO' AND 'ONE' IN ORDER ... 00974000
  977. ZERO DC F'0' 00975000
  978. ONE DC F'1' 00976000
  979. * 00977000
  980. FORHUN DC F'400' 00978000
  981. EIGHTHD DC F'800' V0510 00979000
  982. * 00980000
  983. MVC MVC 0(*-*,R4),0(R6) MOVE FROM INTERMED TO UBUFF @VA01954 00981000
  984. MVC2 MVC 0(*-*,4),0(6) USED TO MOVE LEGIT ITEM TO UBUFF 00982000
  985. * 00983000
  986. CODE25 EQU 25 RC=25 - NOT ENOUGH CORE @VA02374 00984000
  987. * 00985000
  988. LTORG 00986000
  989. EJECT 00987000
  990. AFT 00988000
  991. NUCON 00989000
  992. REGEQU 00990000
  993. FSTB 00991000
  994. END 00992000