User Tools

Site Tools


ibm:vm370-lib:rscs:dmtcre.assemble_src

DMTCRE Source

References

Source Listing

DMTCRE.ASSEMBLE.txt
  1. CRE TITLE 'DMTCRE (RSCS) VM/370 - RELEASE 6' 00001000
  2. *. 00002000
  3. * MODULE NAME - 00003000
  4. * 00004000
  5. * DMTCRE 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * CREATE NEW TASKS UNDER MSUP 00009000
  10. * 00010000
  11. * ATTRIBUTES - 00011000
  12. * 00012000
  13. * REUSABLE 00013000
  14. * 00014000
  15. * ENTRY POINTS - 00015000
  16. * 00016000
  17. * DMTCRE - CREATE A TASK 00017000
  18. * DMTCREDA - LOAD DASD I/O TABLE 00018000
  19. * 00019000
  20. * ENTRY CONDITIONS - 00020000
  21. * 00021000
  22. * DMTCRE MAY BE CALLED FROM ROUTINES WITHIN THE REX TASK 00022000
  23. * 00023000
  24. * GPR0 = CHAR COUNT OF PARM STRING FOR NEW TASK 00024000
  25. * GPR1 = ADDR OF PARAMETER STRING FOR NEW TASK 00025000
  26. * GPR2 = ADDR OF LINK TABLE ENTRY DESCRIBING THE 00026000
  27. * TASK TO BE CREATED 00027000
  28. * GPR14 = RETURN ADDRESS 00028000
  29. * GPR15 = ENTRY ADDRESS 00029000
  30. * 00030000
  31. * EXIT CONDITIONS - 00031000
  32. * 00032000
  33. * NORMAL - 00033000
  34. * 00034000
  35. * R15 RETURN CODE = 0 00035000
  36. * 00036000
  37. * ERROR - 00037000
  38. * 00038000
  39. * R15 RETURN CODES: 00039000
  40. * 00040000
  41. * 1 => INVALID LOAD DATA FORMAT 00041000
  42. * 2 => REQUIRED STORAGE UNAVAILABLE 00042000
  43. * 3 => TASK NAME DUPLICATE 00043000
  44. * 4 => MAX NUMBER OF TASK ACTIVE 00044000
  45. * 5 => NO SUPQUEUE ELEMENT AVAILABLE 00045000
  46. * 6 => UNEXPECTED EOF 00046000
  47. * 7 => FILE NOT FOUND 00047000
  48. * 8 => FILE FORMAT ERROR (A LA CMS) 00048000
  49. * 9 => FATAL I/O ERROR 00049000
  50. * 00050000
  51. EJECT 00051000
  52. * 00052000
  53. * CALLS TO OTHER ROUTINES - 00053000
  54. * 00054000
  55. * DMTASK - TO CREATE A TASK IN MSUP 00055000
  56. * 00056000
  57. * EXTERNAL REFERENCES - 00057000
  58. * 00058000
  59. * NONE 00059000
  60. * 00060000
  61. * TABLES / WORKAREAS - 00061000
  62. * 00062000
  63. * DMTVEC - COMMON SUPERVISOR AREA 00063000
  64. * DMTSYS - RSCS SYSTEM CONTROL COMMON AREA 00064000
  65. * LINK TABLE 00065000
  66. * 00066000
  67. * (ALL VARIABLES AND BUFFERS USED BY THE CMS READ 00067000
  68. * ACCESS METHOD ARE ORGANIZED IN A SINGLE AREA TO 00068000
  69. * FACILITATE MAINTENANCE AND DEVELOPMENT.) 00069000
  70. * 00070000
  71. * REGISTER USAGE - 00071000
  72. * 00072000
  73. * ALL SUBROUTINES IN THE MODULE CONFORM GENERALLY TO THIS USAGE; 00073000
  74. * ANY INDIVIDUAL DEVIATIONS OR EXTENSIONS ARE LISTED WITH THE 00074000
  75. * COMMAND DESCRIPTION 00075000
  76. * 00076000
  77. * GPR0 = (NON-ADDRESS) CALLING PARAMETER 00077000
  78. * GPR1 = CALLING PARAMETER 00078000
  79. * GPR2 = SCRATCH 00079000
  80. * GPR3 = SCRATCH 00080000
  81. * GPR4 = SCRATCH 00081000
  82. * GPR5 = SCRATCH 00082000
  83. * GPR6 = SCRATCH 00083000
  84. * GPR7 = SCRATCH 00084000
  85. * GPR8 = UNUSED 00085000
  86. * GPR9 = LINK TABLE ADDRESS 00086000
  87. * GPR10 = UNUSED 00087000
  88. * GPR11 = UNUSED 00088000
  89. * GPR12 = BASE REGISTER 00089000
  90. * GPR13 = UNUSED 00090000
  91. * GPR14 = LINKAGE REG - RETURN ADDRESS 00091000
  92. * GPR15 = LINKAGE REG - ENTRY ADDRESS AND RETURN CODE 00092000
  93. * 00093000
  94. * NOTES - 00094000
  95. * 00095000
  96. * DMTCRE IS GENERALLY USED TO CREATE LINE DRIVER TASKS 00096000
  97. * DURING LINK ACTIVATION, BUT IT IS ALSO USED TO CREATE 00097000
  98. * THE AXS AND LAX TASKS DURING RSCS INITIALIZATION. 00098000
  99. * 00099000
  100. * OPERATION - 00100000
  101. * 00101000
  102. * THE MAIN LINE OF THE DMTCRE ROUTINE INCLUDES TWO 00102000
  103. * PHASES, EXECUTED SEQUENTIALLY, ONCE FOR EACH CALL. 00103000
  104. * DMTCRE FIRST LOADS AND RELOCATES A PROGRAM INTO 00104000
  105. * VIRTUAL STORAGE, AND THEN CAUSES IT TO BE EXECUTED 00105000
  106. * AS A NEW TASK THROUGH SUPERVISOR CALLS. A CMS READ 00106000
  107. * ACCESS METHOD IS INCLUDED IN THIS MODULE, AND IS USED 00107000
  108. * BY THE LOADER FOR READING CMS TEXT FILES. THE CMS 00108000
  109. * ACCESS METHOD IS DESCRIBED BELOW. 00109000
  110. * 00110000
  111. *. 00111000
  112. EJECT 00112000
  113. DMTCRE CSECT 00113000
  114. ENTRY DMTCREDA 00114000
  115. USING DMTCRE,R15 GET TEMP ADDRESSABILITY 00115000
  116. STM R0,R15,CRESAVE SAVE CALLER'S REGISTERS TO BE USED 00116000
  117. LA R12,0(R15) GET THE RIGHT ADDRESSABILITY 00117000
  118. DROP R15 00118000
  119. USING DMTCRE,R12 GET THE STANDARD ADDRESSABILITY 00119000
  120. USING SVECTORS,0 GET SVECTORS ADDRESSABILITY 00120000
  121. LR R9,R2 GET THE LINKTABL ADDR 00121000
  122. USING LINKTABL,R9 GET LINKTABL ADDRESSABILITY 00122000
  123. XC CRESTORE(8),CRESTORE CLEAR MAIN STORAGE GOTTEN FIELDS 00123000
  124. SPACE 00124000
  125. MVC OPENFILE(8),LACTDRVR MOVE IN THE FILENAME 00125000
  126. MVC OPENFILE+8(8),CREFTYPE AND THE FILETYPE 00126000
  127. BAL R14,CMSOPEN FIND AND INITIALIZE THE REQUESTED FILE 00127000
  128. LTR R15,R15 DID THAT WORK OUT? 00128000
  129. BNZ CRETERM NOPE - QUIT WITH A RETURN CODE 00129000
  130. SPACE 00130000
  131. CRESDREC EQU * 00131000
  132. BAL R14,CMSGET GET THE NEXT FILE RECORD 00132000
  133. LTR R15,R15 DID WE GET IT? 00133000
  134. BNZ CRETERM NOPE - GIVE UP WITH ERROR CODE 00134000
  135. CLC 0(4,R1),ESDCODE IS THIS AN ESD RECORD? 00135000
  136. BNE CRESDREC NOPE - INVALID RECORD - TRY AGAIN 00136000
  137. SR R2,R2 CLEAR R2 FOR INSERT 00137000
  138. IC R2,11(R1) R2=NUMBER OF BYTES OF ESD DATA 00138000
  139. SRL R2,4 R2=NUMBER OF SEPARATE ESD SUBRECORDS 00139000
  140. LTR R2,R2 ARE THERE ANY AT ALL? 00140000
  141. BNP CRESDREC NOPE - TRY TO GET ANOTHER ESD RECORD 00141000
  142. CRESDGET EQU * 00142000
  143. LA R1,16(R1) R1=ADDRESS OF NEXT ESD SUBRECORD 00143000
  144. CLI 8(R1),X'00' IS THIS A CSECT ENTRY? 00144000
  145. BE CRESDGOT YEP - GO INITIALIZE FOR TEXT READ 00145000
  146. BCT R2,CRESDGET KEEP CYCLING THROUGH ESD RECORD 00146000
  147. B CRESDREC TRY TO GET ANOTHER WHEN EXHAUSTED 00147000
  148. SPACE 00148000
  149. CREMOVE MVC OPENFILE(0),LACTDRVR TO BE EXECUTED BY ABOVE CODE 00149000
  150. EJECT 00150000
  151. CRESDGOT EQU * 00151000
  152. MVI CRESTART,X'00' ZERO TOP BYTE OF START ADDRESS FIELD 00152000
  153. MVC CRESTART+1(3),9(R1) MOVE IN CSECT START ADDRESS 00153000
  154. MVI CRELEN,X'00' CLEAR HIGH ORDER BYTE OF LENGTH FIELD 00154000
  155. MVC CRELEN+1(3),13(R1) MOVE IN THE CSECT LENGTH FROM ESD 00155000
  156. L R2,CRELEN R2=LENGTH OF CSECT TO BE LOADED IN BYTES 00156000
  157. LTR R2,R2 IS THERE ANY LENGTH? 00157000
  158. BNP CREFOUL NOPE - CAN'T DO MUCH WITH THIS FILE 00158000
  159. AL R2,CRESAVE R2=TOTAL LENGTH NEEDED INCLUDING PARM 00159000
  160. SRL R2,12 R2=NUMBER OF PAGES NEEDED - 1 00160000
  161. SPACE 00161000
  162. CREMAIN EQU * 00162000
  163. L R3,MAINMAP R3=ADDRESS OF MAIN STORAGE MAP 00163000
  164. LR R4,R3 R4=MAP ADDRESS TOO 00164000
  165. AL R3,MAINSIZE R3=ADDRESS OF END OF MAIN STORAGE MAP 00165000
  166. SLR R3,2 R3=MAP SCAN STARTING POINT + 1 00166000
  167. BCTR R3,0 BUMP R3 BACK TO EXACT MAP SCAN STARTING POINT 00167000
  168. CREMNEXT EQU * 00168000
  169. CLR R3,R4 HAVE WE BACKED UP TO THE START OF THE MAP YET? 00169000
  170. BNH CREFULL YEP - NO STORAGE AVAILABLE - TOO BAD 00170000
  171. EX R2,CRESCAN CHECK FOR AVAILABLE STORAGE HERE 00171000
  172. BZ CRETRYIT FOUND SOME - TRY TO GET IT CLAIMED 00172000
  173. BCT R3,CREMNEXT KEEP SCANNING TABLE FOR AVAILABLE STORAGE 00173000
  174. B CREFULL SHOULDN'T BE HERE - PUNT WITH NO STORAGE CODE 00174000
  175. SPACE 00175000
  176. CRESCAN OC 0(0,R3),0(R3) TO BE EXECUTED BY CODE ABOVE 00176000
  177. EJECT 00177000
  178. CRETRYIT EQU * 00178000
  179. LA R0,1(R2) R0=NUMBER OF PAGES TO BE REQUESTED 00179000
  180. SLR R3,4 R3=REQUESTED STARTING PAGE NUMBER 00180000
  181. LR R1,R3 R1=REQUESTED PAGE NUMBER FOR CALL TO SUPMAIN 00181000
  182. L R15,MAINREQ R15=ENTRY ADDRESS FOR MAIN STORAGE REQ 00182000
  183. BALR R14,R15 CALL MAIN STORAGE HANDLER TO GET STORAGE 00183000
  184. LTR R15,R15 DID WE GET THE PAGES? 00184000
  185. BNZ CREMAIN NOPE - START TABLE SCAN ALL OVER AGAIN 00185000
  186. SPACE 00186000
  187. STM R0,R1,CRESTORE SET GOTTEN STORAGE CONTROL FIELD 00187000
  188. SLL R1,12 R1=ADDRESS OF FIRST PAGE OF GOTTEN STORAGE 00188000
  189. ST R1,CRELOAD INITIALIZE LOAD START CONTROL FIELD 00189000
  190. LR R2,R1 R2=STARTING ADDRESS FOR LOAD ALSO 00190000
  191. SL R2,CRESTART R2=ACTUAL RELOCATION FACTOR FOR LOAD 00191000
  192. SLL R0,12 R0=TOTAL AVAILABLE STORAGE FOR LOAD 00192000
  193. ALR R1,R0 R1=ADDR OF END OF AVAILABLE STORAGE 00193000
  194. ST R1,CRELIMIT STORE END OF STORAGE ADDRESS IN CONTROL 00194000
  195. SPACE 00195000
  196. CRENEXTX EQU * 00196000
  197. BAL R14,CMSGET GET THE NEXT RECORD FROM THE FILE 00197000
  198. LTR R15,R15 DID WE GET ANOTHER ONE? 00198000
  199. BNZ CREFOUL NOPE - RETURN WITH ACCESS CODE 00199000
  200. CLC 0(4,R1),TXTCODE IS THIS RECORD A TEXT RECORD? 00200000
  201. BNE CRECHKTX CHECK IT CAREFULLY IF IT ISN'T 00201000
  202. SR R4,R4 CLEAR R4 FOR INSERT 00202000
  203. ST R4,CREADDR CLEAR ADDRESS JUSTIFICATION FIELD 00203000
  204. ICM R4,B'0001',11(R1) R4=NUMBER OF BYTES OF TEXT DATA H 00204000
  205. BNP CRENEXTX NOPE - TRY ANOTHER RECORD 00205000
  206. MVC CREADDR+1(3),5(R1) MOVE TEXT DATA ADDRESS TO CONTROL 00206000
  207. L R3,CREADDR R3=UNRELOCATED TEXT ADDRESS 00207000
  208. ALR R3,R2 R3=RELOCATED TEXT DATA LOAD ADDRESS 00208000
  209. CL R3,CRELOAD IS IT ABOVE THE LOWER LIMIT? 00209000
  210. BL CREFOUL BAD FORMAT IF IT IS 00210000
  211. LA R5,0(R3,R4) R5=END OF RELOCATED TEXT DATA LOAD 00211000
  212. CL R5,CRELIMIT IS IT BELOW THE UPPER LIMIT? 00212000
  213. BH CREFOUL BAD FORMAT AGAIN 00213000
  214. BCTR R4,0 BUMP BYTE COUNT DOWN FOR CHAR OP PECULIARITY 00214000
  215. EX R4,CRETLOAD MOVE THE TEXT DATA TO RELOCATED ADDRESS 00215000
  216. B CRENEXTX KEEP LOADING TEXT RECORDS 00216000
  217. SPACE 00217000
  218. CRETLOAD MVC 0(0,R3),16(R1) TO BE EXECUTED TO LOAD SOME TEXT DATA 00218000
  219. EJECT 00219000
  220. CRECHKTX EQU * 00220000
  221. CLC 0(4,R1),ENDCODE DID WE HIT AN END CARD? 00221000
  222. BE CRETASK YEP - NO RELOCATION TO DO - MAKE A TASK 00222000
  223. CLC 0(4,R1),RLDCODE DID WE HIT AN RLD RECORD? 00223000
  224. BNE CRENEXTX NOPE - MUST BE AN INVALID RECORD - IGNORE IT 00224000
  225. SPACE 00225000
  226. CRELOCAT EQU * 00226000
  227. SR R4,R4 CLEAR R4 FOR INSERT 00227000
  228. IC R4,11(R1) R4=NUMBER OF BYTES OF RLD DATA 00228000
  229. LA R4,16(R4,R1) R4=END OF RLD DATA FOR THIS RECORD 00229000
  230. LA R1,20(R1) INITIALIZE RLD SUBRECORD POINTER TO FIRST 00230000
  231. CRENEXRL EQU * 00231000
  232. CLR R1,R4 HAVE WE PASSED THE END OF THE RLD DATA ON THIS REC 00232000
  233. BNL CRERLDRD YES - GO TRY TO READ ANOTHER RECORD 00233000
  234. TM 0(R1),X'F2' ANY FUNNY STUFF IN THE FLAG FIELD? 00234000
  235. BNZ CREFOUL CAN'T HANDLE PR'S, BRANCH TYPES, NEG RELOCATES 00235000
  236. SR R5,R5 CLEAR R5 FOR INSERT 00236000
  237. IC R5,0(R1) R5=RLD FLAG FIELD 00237000
  238. SRL R5,2 R5=LENGTH OF RELOCATABLE ADCON - 1 00238000
  239. LTR R5,R5 IS THERE ANY LENGTH? 00239000
  240. BNP CREFOUL NOPE - BAD FORMAT 00240000
  241. LA R5,1(R5) R5=ACTUAL LENGTH OF RELOCATABLE ADCON 00241000
  242. LA R6,CREADDR+4 R6=ADDR OF END OF JUSTIFICATION FIELD 00242000
  243. SLR R6,R5 R6=ADDRESS FOR JUSTIFICATION MOVE 00243000
  244. MVI CREADDR,X'00' BUT FIRST, MUST RELOCATE ADCON ADDRESS 00244000
  245. MVC CREADDR+1(3),1(R1) MOVE IN UNRELOCATED ADCON ADDRESS 00245000
  246. L R3,CREADDR R3=UNRELOCATED ADCON ADDRESS 00246000
  247. ALR R3,R2 R3=RELOCATED ADCON ADDRESS 00247000
  248. CL R3,CRELOAD IS THE ADCON ABOVE THE LOWER LIMIT? 00248000
  249. BL CREFOUL BAD FORMAT IF NOT 00249000
  250. LA R7,0(R5,R3) R7=RELOCATED ADDR OF END OF ADCON 00250000
  251. CL R7,CRELIMIT IS IT BELOW THE UPPER LIMIT? 00251000
  252. BH CREFOUL BAD FORMAT AGAIN IF NOT 00252000
  253. XC CREADDR(4),CREADDR CLEAR JUSTIFICATION FIELD 00253000
  254. BCTR R5,0 BUMP DOWN ADCON CHAR COUNT FOR MOVE 00254000
  255. EX R5,CREADGET MOVE UNRELOCATED ADCON TO FULLWORD 00255000
  256. L R7,CREADDR R7=UNRELOCATED ADCON 00256000
  257. ALR R7,R2 RELOCATE THE ADCON, AND ... 00257000
  258. ST R7,CREADDR RESTORE THE RELOCATED ADCON TO FULLWORD 00258000
  259. EX R5,CREADPUT MOVE THE RELOCATED ADCON BACK TO STORAGE 00259000
  260. TM 0(R1),X'01' CHECK FLAG FIELD FOR FOLLOWING SUBREC FORMAT 00260000
  261. LA R1,4(R1) MOVE SUBRECORD POINTER AHEAD TO NEXT 00261000
  262. BO CRENEXRL AND DO THE RELOCATE IF IT'S WHERE WE WANT IT 00262000
  263. LA R1,4(R1) MOVE AHEAD FOUR MORE PAST R & P POINTERS 00263000
  264. B CRENEXRL AND DO THE RELOCATE 00264000
  265. SPACE 00265000
  266. CREADGET MVC 0(0,R6),0(R3) MOVE ADCON TO JUSTIFICATION FIELD (EXECUTE 00266000
  267. CREADPUT MVC 0(0,R3),0(R6) MOVE ADCON BACK AGAIN (EXECUTED ABOVE) 00267000
  268. EJECT 00268000
  269. CRERLDRD EQU * 00269000
  270. BAL R14,CMSGET GET ANOTHER RECORD FROM THE FILE 00270000
  271. LTR R15,R15 DID WE GET ANOTHER? 00271000
  272. BNZ CRETERM NOPE - CLEAN UP AND QUIT WITH RETURN CODE 00272000
  273. CLC 0(4,R1),RLDCODE IS THIS ANOTHER RLD RECORD? 00273000
  274. BE CRELOCAT YEP - GO PROCESS IT FROM THE TOP 00274000
  275. B CRETASK GO TURN LOADED RELOCATED FILE INTO A TASK 00275000
  276. EJECT 00276000
  277. CRETASK EQU * 00277000
  278. LM R0,R1,CRESAVE RESTORE PARM FIELD DESCRIPTOR REGISTERS 00278000
  279. L R2,CRELOAD R2=RELOCATED ADDRESS OF START OF LOAD 00279000
  280. ST R0,TGREG0-TAREA(R2) INITIALIZE PARM CHAR COUNT REGISTER 00280000
  281. LTR R3,R0 IS THERE ANY PARM FIELD SPECIFIED? 00281000
  282. BNP CREQTASK NOPE - FORGET ABOUT MOVING IT AROUND 00282000
  283. LR R4,R2 R4=ADDRESS OF START OF LOAD TOO 00283000
  284. AL R4,CRELEN R4=RELOCATED ADDR OF END OF CSECT 00284000
  285. BCTR R3,0 BUMP PARM CHAR COUNT DOWN FOR EXECUTE OF MOVE 00285000
  286. EX R3,CRESETUP MOVE THE PARAMETER FIELD TO TASK STORAGE 00286000
  287. ST R4,TGREG1-TAREA(R2) INITIALIZE PARM FIELD POINTER REGIST 00287000
  288. CREQTASK EQU * 00288000
  289. ST R9,TGREG2-TAREA(R2) GIVE THE TASK HIS LINK TABLE ADDR 00289000
  290. L R0,LACTTNME R0=STANDARD FORMAT NAME FOR LOADED TASK 00290000
  291. L R1,CRELOAD R1=ADDRESS OF NEW TASK SYS S/A 00291000
  292. L R15,TASKREQ R15=ADDRESS OF TASK MANAGER ENTRY POINT 00292000
  293. BALR R14,R15 REQUEST NEW TASK WITH NAME=CURRENT SEQUENCE NU 00293000
  294. LTR R15,R15 DID IT WORK O.K.? 00294000
  295. BNZ CRENOTSK NOPE - GO SEE WHY NOT 00295000
  296. LM R2,R3,CRESTORE PICK UP GOTTEN CORE INFO 00296000
  297. L R1,MAINMAP R1=ADDRESS OF MAIN STORAGE MAP 00297000
  298. ALR R1,R3 R1=START OF NEW TASK STORAGE ENTRY 00298000
  299. STC R0,0(R1) SET NEW TASK ID IN THE STORAGE TABLE 00299000
  300. BCTR R2,0 BUMP NUMBER OF PAGES DOWN ONE 00300000
  301. LTR R2,R2 WERE THERE MORE THAN ONE? 00301000
  302. BNP CREFINIS NOPE - CLEAR RETURN CODE AND RETURN 00302000
  303. BCTR R2,0 BUMP DOWN ONE MORE FOR CHAR OP 00303000
  304. EX R2,CREPROP SET ENTIRE STORAGE TABLE ENTRY TO NEW TASK ID 00304000
  305. CREFINIS EQU * 00305000
  306. SR R15,R15 AND CLEAR REPLY ADDRESS RETURN REGISTER 00306000
  307. CREXIT EQU * 00307000
  308. LM R0,R14,CRESAVE RESTORE REGS 00308000
  309. BR R14 AND RETURN TO THE CALLER 00309000
  310. SPACE 00310000
  311. CRESETUP MVC 0(0,R4),0(R1) MOVE PARM FIELD TO NEW TASK (EXECUTED ABOV 00311000
  312. CREPROP MVC 1(0,R1),0(R1) PROPAGATE NEW ID IN STORAGE TABLE (EXECUTE 00312000
  313. EJECT 00313000
  314. CREFOUL EQU * 00314000
  315. LA R15,X'01' SET RETURN CODE TO INVALID LOAD DATA FORM 00315000
  316. B CRETERM CLEAN UP AND RETURN TO CALLER 00316000
  317. SPACE 00317000
  318. CREFULL EQU * 00318000
  319. LA R15,X'02' SET RETURN CODE STORAGE UNAVAILABLE 00319000
  320. B CRETERM CLEAN UP AND RETURN TO CALLER 00320000
  321. SPACE 00321000
  322. CRENOTSK EQU * 00322000
  323. LR R2,R15 SAVE DMTASK RETURN CODE 00323000
  324. LA R15,3 SET DUP NAME 00324000
  325. SRA R2,3 SEE IF RC = 3 00325000
  326. BZ CRETERM YES..ALL DONE 00326000
  327. LA R15,5 SET NO SUP QUEUE ELEMENT 00327000
  328. BCT R2,CRETERM TAKE RETURN 00328000
  329. LA R15,4 SET MAX TASKS RETURN 00329000
  330. CRETERM EQU * 00330000
  331. LM R2,R3,CRESTORE PICK UP GOTTEN STORAGE INFORMATION 00331000
  332. LTR R2,R2 DID WE GET ANY STORAGE SO FAR? 00332000
  333. BZ CREXIT DON'T WANT TO FREE ANY IF NOT 00333000
  334. L R1,MAINMAP R1=ADDRESS OF START OF MAIN STORAGE MAP 00334000
  335. ALR R1,R3 R1=ADDRESS OF START OF GOTTEN ENTRY 00335000
  336. BCTR R2,0 BUMP COUNT DOWN ONE FOR CHAR OP 00336000
  337. EX R2,CREFREE FREE THE UNUSED GOTTEN CORE 00337000
  338. B CREXIT AND RETURN TO CALLER WITH CODE AS IT STANDS 00338000
  339. SPACE 00339000
  340. CREFREE XC 0(0,R1),0(R1) CLEAR MAIN STORAGE TABLE ENTRY (EXECUTED) 00340000
  341. EJECT 00341000
  342. *---------------------------------------------------------------------* 00342000
  343. * * 00343000
  344. * TASK CREATION CONTROL AREA * 00344000
  345. * * 00345000
  346. *---------------------------------------------------------------------* 00346000
  347. SPACE 00347000
  348. CREWORK DC D'0' DOUBLEWORD USED FOR DECIMAL CONVERSION 00348000
  349. SPACE 00349000
  350. CREFTYPE DC 0F'0',CL8'TEXT' INITIAL OPEN FILE TYPE 00350000
  351. SPACE 00351000
  352. ESDCODE DC X'02',CL3'ESD' FIRST FOUR CHARACTERS OF AN ESD RECORD 00352000
  353. TXTCODE DC X'02',CL3'TXT' FIRST FOUR CHARACTERS OF A TXT RECORD 00353000
  354. RLDCODE DC X'02',CL3'RLD' FIRST FOUR CHARACTERS OF AN RLD RECORD 00354000
  355. ENDCODE DC X'02',CL3'END' FIRST FOUR CHARACTERS OF AN END RECORD 00355000
  356. SPACE 00356000
  357. CRESTORE DC 2F'0' COUNT AND START NUMBER OF GOTTEN PAGES 00357000
  358. SPACE 00358000
  359. CRELOAD DC A(0) (RELOCATED) LOWER LOAD LIMIT ADDRESS 00359000
  360. CRELIMIT DC A(0) (RELOCATED) UPPER LOAD LIMIT ADDRESS 00360000
  361. CRESTART DC A(0) (UNRELOCATED) LOAD CSECT START ADDRESS 00361000
  362. CRELEN DC A(0) LOAD CSECT LENGTH 00362000
  363. CREADDR DC A(0) FIELD FOR JUSTIFYING ADDRESSES FOR RELOCATION 00363000
  364. SPACE 00364000
  365. CRESAVE DC 16F'0' REGISTER SAVE AREA FOR USE BY CREATE ROUTINE 00365000
  366. EJECT 00366000
  367. *. 00367000
  368. * 00368000
  369. * ENTRY NAME - 00369000
  370. * 00370000
  371. * CMSFILCH 00371000
  372. * 00372000
  373. * FUNCTION - 00373000
  374. * 00374000
  375. * READ ONE DASD BLOCK FROM A CMS DISK 00375000
  376. * 00376000
  377. * CALLS TO OTHER ROUTINES - 00377000
  378. * 00378000
  379. * NONE 00379000
  380. * 00380000
  381. * OPERATION - 00381000
  382. * 00382000
  383. * THE CMS BLOCK NUMBER IS TRANSLATED TO BBCCHHR DASD 00383000
  384. * ADDRESS FORMAT, DEPENDING ON THE DASD DEVICE TYPE, 00384000
  385. * AND THE DASD I/O READ OPERATION TO READ THE BLOCK 00385000
  386. * IS PERFORMED. 00386000
  387. * 00387000
  388. * ENTRY CONDITIONS - 00388000
  389. * 00389000
  390. * THE DASD I/O ACCESS TABLES MUST BE PROPERLY SET TO 00390000
  391. * REFLECT THE DASD DEVICE TYPE. 00391000
  392. * 00392000
  393. * GPR1 = CMS BLOCK NUMBER OF BLOCK TO BE READ (BINARY) 00393000
  394. * 00394000
  395. * RESPONSES - 00395000
  396. * 00396000
  397. * NONE 00397000
  398. * 00398000
  399. * ERROR MESSAGES - 00399000
  400. * 00400000
  401. * NONE 00401000
  402. * 00402000
  403. *. 00403000
  404. SPACE 00404000
  405. SPACE 00405000
  406. CMSFILCH DC 0H'0' 00406000
  407. STM R14,R5,CFILSAVE SAVE REGISTERS TO BE MODIFIED 00407000
  408. SR R3,R3 CLEAR OUT R3 00408000
  409. ICM R3,B'0011',CFILSAVE+14 AND GET R1 BLOCK NUM 00409000
  410. SR R2,R2 CLEAR R2 FOR DIVIDE AND CLEAR OF BIN ADDR FIEL 00410000
  411. BCTR R3,0 BUMP BLOCK NUMBER DOWN ONE 00411000
  412. D R2,PERCYL CALC CYLINDER ADDR 00412000
  413. ST R3,BBCCHHR SET 00CC IN DISK ADDR 00413000
  414. LR R3,R2 REMAINDER TO DIVIDE AGAIN 00414000
  415. SR R2,R2 CLEAR FOR NEXT DIVIDE 00415000
  416. D R2,PERTRACK CALC TRACK AND REC ADDRS 00416000
  417. LA R2,1(R2) NORMALIZE TO RECORD 1 00417000
  418. ICM R4,B'1111',OVERNUM ANY OVERFLOW HERE? 00418000
  419. BZ CFILASIS NO NEED TO ADJUST TRACK ADDR 00419000
  420. AR R3,R3 DOUBLE TRACK ADDR TO REAL ... 00420000
  421. CR R2,R4 RECORD ON SECOND OF PAIR? 00421000
  422. BNH CFILASIS NO - CORRECT AS IS 00422000
  423. LA R3,1(R3) INCREMENT TO CORRECT TRACK 00423000
  424. CFILASIS EQU * 00424000
  425. STH R3,BBCCHHR+4 SET TRACK ADDR IN HH 00425000
  426. STC R2,BBCCHHR+6 AND REC NUM IN R 00426000
  427. CLI DEVCODE-IOTABLE+DASD,TYP2314 2314 DASD? 00427000
  428. BE CFILDOIO YES - ALL DONE 00428000
  429. MVI DASETSEC,X'23' SET SECTOR COMMAND CODE 00429000
  430. LA R2,DASDSECS(R2) ADDR OF RECS SECTOR BYTE 00430000
  431. MVC SECTOR(1),0(R2) SET THE SECTOR NUMBER 00431000
  432. SPACE 00432000
  433. CFILDOIO EQU * 00433000
  434. XC DASD(4),DASD CLEAR DIRECT ACCESS I/O SYNCH LOCK 00434000
  435. LA R1,DASD R1=ADDRESS OF DASD I/O TABLE 00435000
  436. L R15,IOREQ R15=ENTRY ADDRESS FOR SUP I/O REQUEST 00436000
  437. BALR R14,R15 START THE DISK I/O 00437000
  438. L R15,WAITREQ R15=ADDRESS OF SUP WAIT REQUEST ENTRY 00438000
  439. BALR R14,R15 WAIT FOR I/O COMPLETION SIGNAL 00439000
  440. SPACE 00440000
  441. SR R15,R15 CLEAR RETURN CODE FOR NOW 00441000
  442. CLI DASD+SIOCOND-IOTABLE,X'00' DID THE I/O START PROPERLY? 00442000
  443. BNE CFILERR SIGNAL I/O ERROR TO CALLER IF NOT 00443000
  444. TM DASD+ENDCSW-IOTABLE+4,X'FF'-CUE-CE-DE DEV STAT @VA04030 00444500
  445. BNZ CFILERR ERROR IF ANYTHING ELSE 00445000
  446. CLI DASD+ENDCSW-IOTABLE+5,X'00' ANY CHANNEL STATUS SET? 00446000
  447. BNE CFILERR BAD SITUATION IF SO 00447000
  448. CFILEXIT EQU * 00448000
  449. L R14,CFILSAVE RESTORE REUTRN ADDRESS 00449000
  450. LM R0,R5,CFILSAVE+8 RESTORE THE REST OF THE REGS 00450000
  451. BR R14 AND RETURN TO THE CALLER 00451000
  452. SPACE 00452000
  453. CFILERR EQU * 00453000
  454. LA R15,X'09' SET I/O ERROR RETURN CODE 00454000
  455. B CFILEXIT AND EXIT TO CALLER 00455000
  456. EJECT 00456000
  457. *. 00457000
  458. * 00458000
  459. * ENTRY NAME - 00459000
  460. * 00460000
  461. * CMSOPEN 00461000
  462. * 00462000
  463. * FUNCTION - 00463000
  464. * 00464000
  465. * INITIALIZE READING OF A CMS FILE 00465000
  466. * 00466000
  467. * CALLS TO OTHER ROUTINES - 00467000
  468. * 00468000
  469. * CMSFILCH - TO READ CMS DASD BLOCKS 00469000
  470. * 00470000
  471. * OPERATION - 00471000
  472. * 00472000
  473. * 1. CLEAR FILE READ STATUS VARIABLES 00473000
  474. * 00474000
  475. * 2. READ THE CMS MASTER FILE DIRECTORY (MFD) 00475000
  476. * 00476000
  477. * 3. READ AND SCAN THE CMS FILE STATUS TABLES (FST) 00477000
  478. * TO LOCATE THE FILE TO BE READ 00478000
  479. * 00479000
  480. * 4. INITIALIZE THE VIRTUAL STORAGE FST FOR THE FILE 00480000
  481. * TO BE READ 00481000
  482. * 00482000
  483. * 5. RETURN TO THE CALLER 00483000
  484. * 00484000
  485. * ENTRY CONDITIONS - 00485000
  486. * 00486000
  487. * THE FILENAME FILETYPE OF THE FILE TO BE READ MUST BE 00487000
  488. * STORED IN THE 'OPENFILE' FIELD PRIOR TO CALLING. 00488000
  489. * 00489000
  490. * RESPONSES - 00490000
  491. * 00491000
  492. * GPR15 = X'07' ON RETURN IF FILE NOT FOUND 00492000
  493. * 00493000
  494. * ERROR MESSAGES - 00494000
  495. * 00495000
  496. * NONE 00496000
  497. * 00497000
  498. *. 00498000
  499. SPACE 00499000
  500. CMSOPEN EQU * 00500000
  501. STM R14,R4,COPNSAVE SAVE CALLER'S REGISTERS 00501000
  502. SR R15,R15 CLEAR R15 FOR RETURN AND ZEROING OF POINTERS 00502000
  503. ST R15,NEXTITEM FORCE NEW DATA ITEM BLOCK READ 00503000
  504. ST R15,NEXTBLOK FORCE NEW CHAIN LINK BLOCK READ 00504000
  505. ST R15,NEXTLINK FORCE READ OF FIRST CHAIN LINK BLOCK 00505000
  506. LA R1,4 R1=BLOCK NUMBER OF THE MASTER FILE DIRECTORY 00506000
  507. BAL R14,CMSFILCH READ THE MASTER FILE DIRECTORY 00507000
  508. LTR R15,R15 DID WE GET IT WITHOUT ERROR? 00508000
  509. BNZ COPNEXIT NOPE - EXIT WITH FILCH ERROR CODE 00509000
  510. MVC BLOKLIST(200),FILCHBUF MOVE SOME MFD FSTBLOCK POINTERS 00510000
  511. MVC BLOKLIST+200(164),FILCHBUF+200 MOVE REMAINDER OF PTRS 00511000
  512. LA R2,BLOKLIST-2 INITIALIZE FSTBLOCK POINTER ADDRESS REG 00512000
  513. MVI BLOKLIST+364,X'FF' ENSURE PRESENCE OF SENTINEL 00513000
  514. COPNGET EQU * 00514000
  515. LA R2,2(R2) R2=ADDRESS OF NEXT FSTBLOCK NUMBER 00515000
  516. CLI 0(R2),X'FF' IS THIS THE END OF THE FST BLOCKS? 00516000
  517. BE COPNMISS YEP - FILE NOT FOUND 00517000
  518. LH R1,0(R2) R1=BLOCK NUMBER OF NEXT FST BLOCK 00518000
  519. BAL R14,CMSFILCH READ THE BLOCK INTO FILCHBUF 00519000
  520. LTR R15,R15 DID WE READ IT O.K.? 00520000
  521. BNZ COPNEXIT NOPE - EXIT WITH FILCH ERROR CODE 00521000
  522. LA R3,FILCHBUF-STATLEN INITIALIZE FST POINTER REGISTER 00522000
  523. LA R4,FILCHBUF+800 SET SEARCH LIMIT REGISTER 00523000
  524. COPNNEXT EQU * 00524000
  525. LA R3,STATLEN(R3) BUMP POINTER TO NEXT FST 00525000
  526. CLR R3,R4 HAVE WE HIT THE END OF THE BLOCK YET? 00526000
  527. BNL COPNGET YEP - TRY TO GET ANOTHER FST BLOCK 00527000
  528. CLI 0(R3),X'00' IS THERE A FILE STAT TABLE HERE? 00528000
  529. BE COPNGET NOPE - TRY TO GET ANOTHER BLOCK 00529000
  530. CLC 0(16,R3),OPENFILE IS THIS THE FST WE WANT? 00530000
  531. BNE COPNNEXT NOPE - TRY ANOTHER FST 00531000
  532. MVC STATABLE(STATLEN),0(R3) GOT IT - INITIALIZE CORE TABLE 00532000
  533. COPNEXIT EQU * 00533000
  534. XC FILERNUM(2),FILERNUM NEXT READ ALWAYS FIRST AFTER OPEN 00534000
  535. L R14,COPNSAVE RESTORE CALLER'S RETURN ADDRESS 00535000
  536. LM R0,R4,COPNSAVE+8 RESTORE REMAINDER OF HIS REGISTERS 00536000
  537. BR R14 AND RETURN WITH RETURN CODE IN R15 00537000
  538. SPACE 00538000
  539. COPNMISS EQU * 00539000
  540. LA R15,X'07' R15=RETURN CODE 7 (FILE NOT FOUN 00540000
  541. B COPNEXIT RESTORE REGS AND RETURN TO CALLER 00541000
  542. EJECT 00542000
  543. *. 00543000
  544. * 00544000
  545. * ENTRY NAME - 00545000
  546. * 00546000
  547. * CMSGET 00547000
  548. * 00548000
  549. * FUNCTION - 00549000
  550. * 00550000
  551. * GET THE NEXT CMS FILE ITEM 00551000
  552. * 00552000
  553. * CALLS TO OTHER ROUTINES - 00553000
  554. * 00554000
  555. * CMSFILCH - TO READ A CMS FILE BLOCK 00555000
  556. * 00556000
  557. * OPERATION - 00557000
  558. * 00558000
  559. * 1. LOCATE THE NEXT DATA ITEM - IF NONE, RETURN END 00559000
  560. * OF FILE 00560000
  561. * 00561000
  562. * 2. IF THE DATA BLOCK HAS BEEN ENTIRELY READ, GO 00562000
  563. * TO 'CGETBLOCK' TO GET THE NEXT DATA BLOCK 00563000
  564. * 00564000
  565. * 3. IF THE CHAIN LINK BLOCK HAS BEEN EXHAUSTED, GO TO 00565000
  566. * 'CGETLINK' TO GET THE NEXT CHAIN LINK BLOCK (THE 00566000
  567. * ALGORITHM FOR DECODING A CMS QQ ADDRESS, USED ONLY 00567000
  568. * FOR THE FIRST CHAIN LINK SUB-BLOCK, IS ENCODED IN 00568000
  569. * THIS ROUTINE) 00569000
  570. * 00570000
  571. * ENTRY CONDITIONS - 00571000
  572. * 00572000
  573. * THE CMS FILE ACCESS VARIABLE AREA MUST BE AS INITIALIZED 00573000
  574. * BY CMSOPEN, OR AS LEFT ON A PREVIOUS CALL TO CMSGET. 00574000
  575. * 00575000
  576. * EXIT CONDITIONS - 00576000
  577. * 00577000
  578. * NORMAL - 00578000
  579. * 00579000
  580. * GPR0 = LENGTH OF NEXT CMS DATA ITEM 00580000
  581. * GPR1 = ADDR OF START OF NEXT CMS DATA ITEM 00581000
  582. * GPR15 = X'00' IMPLIES NORMAL RETURN 00582000
  583. * 00583000
  584. * ERROR - 00584000
  585. * 00585000
  586. * GPR15 = X'06' IF END OF FILE 00586000
  587. * X'07' IF NO FILE ACTIVE (OPEN NOT CALLED) 00587000
  588. * X'08' IF FILE FORMAT ERROR 00588000
  589. * NON-ZERO RETURN CODE FROM CMSFILCH 00589000
  590. * 00590000
  591. * RESPONSES - 00591000
  592. * 00592000
  593. * NONE 00593000
  594. * 00594000
  595. * ERROR MESSAGES - 00595000
  596. * 00596000
  597. * NONE 00597000
  598. * 00598000
  599. *. 00599000
  600. SPACE 00600000
  601. CMSGET EQU * 00601000
  602. STM R14,R4,CGETSAVE SAVE CALLER'S REGISTERS 00602000
  603. SR R15,R15 CLEAR RETURN CODE TO START 00603000
  604. CLI FILENAME,C' ' HAS A FILE BEEN INITIALIZED FOR READ? 00604000
  605. BE CGETNULL NOPE - RETURN NO FILE ACTIVE ERROR CODE 00605000
  606. L R1,NEXTITEM R1=ADDR OF NEXT ITEM IF WE HAVE ONE 00606000
  607. ST R15,NEXTITEM CLEAR ITEM ADDRESS FIELD FOR NOW 00607000
  608. LH R2,FILERNUM R2=LAST ITEM NUMBER GOTTEN 00608000
  609. LA R2,1(R2) BUMP ITEM NUMBER UP ONE 00609000
  610. CH R2,FILEINUM DOES THIS ITEM EXIST IN THE FILE? 00610000
  611. BH CGETEOF NOPE - RETURN END OF FILE 00611000
  612. STH R2,FILERNUM UPDATE LAST GOTTEN ITEM NUMBER 00612000
  613. LTR R2,R1 HAVE WE HIT THE END OF THE DATA ITEM BLOCK? 00613000
  614. BZ CGETBLOK YEP - BETTER GO TRY TO GET ANOTHER 00614000
  615. CGETIGOT EQU * 00615000
  616. L R0,FILEILEN R0=FILE DATA ITEM LENGTH 00616000
  617. ALR R2,R0 R2=ADDRESS OF NEXT DATA ITEM IN BLOCK 00617000
  618. CL R2,ITEMEND DID WE GO PAST THE END OF THE BLOCK? 00618000
  619. BNL CGETEXIT YEP - LEAVE NEXT ITEM ZEROED 00619000
  620. ST R2,NEXTITEM OTHERWISE SET ADDRESS FOR NEXT GET CALL 00620000
  621. CGETEXIT EQU * 00621000
  622. L R14,CGETSAVE R14=CALLER'S RETURN ADDRESS 00622000
  623. LM R2,R4,CGETSAVE+16 RESTORE NON-RETURN REGISTERS 00623000
  624. BR R14 AND RETURN TO CALLER 00624000
  625. SPACE 00625000
  626. CGETBLOK EQU * 00626000
  627. L R1,NEXTBLOK R1=ADDRESS OF NEXT DATA BLOCK NUMBER 00627000
  628. XC NEXTBLOK(4),NEXTBLOK CLEAR NEXT POINTER FOR NOW 00628000
  629. LTR R3,R1 DO WE HAVE ADDRESS FOR ANOTHER DATA BLOCK? 00629000
  630. BZ CGETLINK NO - GO TRY TO READ A CHAIN LINK BLOCK 00630000
  631. CGETBGOT EQU * 00631000
  632. LH R1,0(R1) R1=CMS BLOCK NUMBER FOR NEXT DATA BLOCK 00632000
  633. LTR R1,R1 IS THERE ANOTHER DATA BLOCK IN FACT? 00633000
  634. BZ CGETERR NOPE - SOMETHING IS FOULED UP 00634000
  635. BAL R14,CMSFILCH GO READ THE NEXT DATA BLOCK INTO FILCHBUF 00635000
  636. LTR R15,R15 DID THAT WORK PROPERLY? 00636000
  637. BNZ CGETEXIT EXIT WITH FILCH ERROR CODE IF NOT 00637000
  638. LA R1,FILCHBUF R1=ADDRESS OF FIRST DATA ITEM IN BUF 00638000
  639. LR R2,R1 SET UP R2 THE SAME FOR RETURN BRANCH 00639000
  640. LA R3,2(R3) R3=ADDR OF NEXT DATA BLOCK POINTER 00640000
  641. CL R3,BLOKEND SHOULD WE UPDATE NEXT BLOCK POINTER? 00641000
  642. BNL CGETIGOT NOPE - LEAVE IT ZERO TO FORCE CHAIN LINK READ 00642000
  643. ST R3,NEXTBLOK OTHERWISE SET IT TO UPDATED VALUE 00643000
  644. B CGETIGOT AND RETURN WITH DATA ITEM 00644000
  645. EJECT 00645000
  646. CGETLINK EQU * 00646000
  647. L R1,NEXTLINK R1=ADDR OF NEXT CHAIN LINK BLOCK NUMBER 00647000
  648. CL R1,LINKEND IS IT PAST THE UPPER LIMIT? 00648000
  649. BNL CGETERR THINGS ARE BADLY ASTRAY IF SO 00649000
  650. LTR R4,R1 IS THIS THE FIRST GET REQUEST AFTER OPEN? 00650000
  651. BNZ CGETMAX NOPE - GO GET A FULL SIZE CHAIN LINK BLOCK 00651000
  652. SR R0,R0 CLEAR OFFSET INDEX REG 00652000
  653. SR R1,R1 CLEAR REG.1 FOR INSERT 00653000
  654. ICM R1,B'0011',FILELINK LOAD HALF LOGICAL 00654000
  655. CLI DASD+DEVCODE-IOTABLE,TYP2314 2314 DISK IN USE? 00655000
  656. BNE CGETFILC DON'T FOOL WITH ADDR IF NOT 00656000
  657. TM FILELINK,X'20' IS BIT 2 ON? 00657000
  658. BNO CGETOFF NO - CLEAR HIGH ORDER TWO BITS 00658000
  659. TM FILELINK,X'80' IS BIT 0 SET TO ONE? 00659000
  660. BNO CGETFILC O.K. AS IS IF NOT 00660000
  661. S R1,=A(X'6000') IN THE MYSTIC WAYS OF ALLAH ... 00661000
  662. B CGETFILC GET THE CALCULATED BLOCK NUMBER 00662000
  663. CGETOFF EQU * 00663000
  664. SLL R1,16 LEFT JUSTIFY BLOCK NUMBER 00664000
  665. SLDL R0,2 RETAIN HIGH TWO BITS 00665000
  666. SRL R1,18 AND RE-JUSTIFY THE ADDR 00666000
  667. CGETFILC EQU * 00667000
  668. BAL R14,CMSFILCH GO READ THE FIRST CHAIN LINK 00668000
  669. LTR R15,R15 DID THE READ WORK? 00669000
  670. BNZ CGETEXIT NOPE - FORGET THE WHOLE THING 00670000
  671. LTR R1,R0 LOAD POINT ADJUSTMENT TO DO? 00671000
  672. BZ CGETSKIP NO - SKIP MULITPLY 00672000
  673. LA R2,200 BYTES PER QUARTER BLOCK 00673000
  674. MR R0,R2 DISPLACEMENT INTO BLOCK 00674000
  675. CGETSKIP EQU * 00675000
  676. LA R3,FILCHBUF(R1) ACTUAL ADDR OF FCL SUB-BLOCK 00676000
  677. MVC LINKLIST(80),0(R3) MOVE LIST OF N CHAIN LINKS TO BUF 00677000
  678. MVC BLOKLIST(120),80(R3) MOVE LIST OF DATA BLOCKS TO BU 00678000
  679. LA R3,BLOKLIST+120 R3=CURRENT BLOCK LIST BUFFER LIMIT 00679000
  680. ST R3,BLOKEND SET BLOCK LIST BUFFER LIMIT FIELD 00680000
  681. LA R4,LINKLIST INITIALIZE CHAIN LINK BLOCK NUMBER POINTER 00681000
  682. CGETLGOT EQU * 00682000
  683. ST R4,NEXTLINK SAVE ADDR OF NEXT CHAIN LINK BLOCK NUMBER 00683000
  684. LA R1,BLOKLIST R1=ADDR OF START OF DATA BLOCK NUMBERS 00684000
  685. LR R3,R1 R3=SAME THING FOR RETURN TO BLOCK GET ROUTINE 00685000
  686. B CGETBGOT RETURN TO BLOCK GETTER 00686000
  687. SPACE 00687000
  688. CGETMAX EQU * 00688000
  689. LH R1,0(R1) R1=BLOCK NUMBER OF NEXT CHAIN LINK 00689000
  690. LTR R1,R1 IS THERE SUCH A BLOCK NUMBER HERE? 00690000
  691. BNP CGETERR NOPE - ALL FOULED UP - QUIT 00691000
  692. BAL R14,CMSFILCH READ IN THE NEXT CHAIN LINK BLOCK 00692000
  693. LTR R15,R15 DID THE READ WORK SUCCESSFULLY? 00693000
  694. BNZ CGETEXIT QUIT WITH FILCH ERROR CODE IF NOT 00694000
  695. MVC BLOKLIST(200),FILCHBUF MOVE FIRST QUARTER OF CHAIN LINK 00695000
  696. MVC BLOKLIST+200(200),FILCHBUF+200 MOVE THE SECOND QUARTER 00696000
  697. MVC BLOKLIST+400(200),FILCHBUF+400 MOVE THE THIRD 00697000
  698. MVC BLOKLIST+600(200),FILCHBUF+600 AND THE FOURTH 00698000
  699. LA R3,BLOKLIST+800 R3=MAXIMUM BLOCK LIST BUFFER LIMIT 00699000
  700. ST R3,BLOKEND SET LIMIT FIELD TO CURRENT VALUE 00700000
  701. LA R4,2(R4) BUMP CHAIN LINK BLOCK NUMBER POINTER TO NEXT 00701000
  702. B CGETLGOT GO FINISH UP AND RETURN TO BLOCK GETTER 00702000
  703. SPACE 2 00703000
  704. CGETEOF EQU * 00704000
  705. LA R15,X'06' SET RETURN CODE 6 (END OF FILE) 00705000
  706. LM R0,R1,CGETSAVE+8 SET UP REGS. 0 & 1 AS CALLER HAD THEM 00706000
  707. B CGETEXIT AND RETURN TO CALLER LIKE THAT 00707000
  708. SPACE 00708000
  709. CGETNULL EQU * 00709000
  710. LA R15,X'07' SET RETURN CODE 7 (NO FILE ACTIV 00710000
  711. LM R0,R1,CGETSAVE+8 SET UP REGS. 0 & 1 AS CALLER HAD THEM 00711000
  712. B CGETEXIT RETURN TO CALLER 00712000
  713. SPACE 00713000
  714. CGETERR EQU * 00714000
  715. LA R15,X'08' SET RETURN CODE 8 (FILE FORMAT ERR 00715000
  716. LM R0,R1,CGETSAVE+8 SET UP REGS. 0 & 1 AS CALLER HAD THEM 00716000
  717. B CGETEXIT RETURN TO CALLER 00717000
  718. EJECT 00718000
  719. *---------------------------------------------------------------------* 00719000
  720. * * 00720000
  721. * CMS P-DISK ACCESS CONTROL AREA * 00721000
  722. * * 00722000
  723. *---------------------------------------------------------------------* 00723000
  724. SPACE 00724000
  725. DASD DC 0F'0' CMS DASD I/O REQUEST TABLE 00725000
  726. DC F'0' SYNCH LOCK 00726000
  727. DC AL2(0) DASD DEV ADDR (SET BY INIT) 00727000
  728. DC AL1(24) SENSE INFO REQ FOR DASD 00728000
  729. DC X'00' DEVICE TYPE CODE (SET BY INIT) 00729000
  730. DC A(DASDREAD) ADDR OF DISK READ CHAN PROG 00730000
  731. DC 2F'0' RETURN SIO COND CODE & END CSW 00731000
  732. DC 24X'00' RETURN SENSE INFO ON U CHECK 00732000
  733. DMTCREDA EQU DASD 00733000
  734. SPACE 00734000
  735. * THE FOUR VALUES BELOW ARE SET BY INIT ACCORDING TO THE 00735000
  736. * TYPE OF DASD TO BE USED FOR LOADING 00736000
  737. PERCYL DC F'0' CMS RECORDS/CYL 00737000
  738. PERTRACK DC F'0' CMS RECORDS/X (TRACK OR PAIR) 00738000
  739. OVERNUM DC F'0' RECORD NUMBER OF OVERLAPPER 00739000
  740. DASDSECS DC 20X'00' REC NUMBER - SECTOR TABLE @V304498 00740100
  741. SPACE 2 00741000
  742. DASDREAD CCW X'07',BBCCHHR,CC+SILI,6 SEEK (BBCCHH) 00742000
  743. DASETSEC CCW X'03',SECTOR,CC+SILI,1 NOP OR SET SECTOR 00743000
  744. DASEARCH CCW X'31',BBCCHHR+2,CC+SILI,5 SEARCH ID EQUAL (CCHHR) 00744000
  745. CCW X'08',DASEARCH,X'00',1 BACK TO SEARCH IF UNEQUAL 00745000
  746. CCW X'86',FILCHBUF,SILI,800 READ DATA MULTI-TRACK 00746000
  747. SPACE 00747000
  748. BBCCHHR DC 0F'0',7X'00' DASD ADDR FOR REFERENCE 00748000
  749. SECTOR DC X'00' SECTOR NUMBER OF REC ABOVE 00749000
  750. SPACE 00750000
  751. OPENFILE DC 0F'0',CL8' ',CL8'TEXT' FILE NAME FOR OPEN REQ 00751000
  752. SPACE 00752000
  753. STATABLE DC 0F'0' CMS FILE STATUS TABLE 00753000
  754. FILENAME DC 8C' ' CMS FILE NAME 00754000
  755. FILETYPE DC 8C' ' CMS FILE TYPE 00755000
  756. FILEDATE DC F'0' CREATION DATE - DEC MMDDHHMM 00756000
  757. FILEWNUM DC H'0' WRITE ITEM NUMBER 00757000
  758. FILERNUM DC H'0' READ ITEM NUMBER 00758000
  759. FILEMODE DC 2C' ' CMS FILE MODE 00759000
  760. FILEINUM DC H'0' NUMBER OF ITEMS IN ENTIRE FILE 00760000
  761. FILELINK DC H'0' CMS BLOCK NUMBER OF FIRST CHAIN LINK 00761000
  762. FILEFORM DC C' ' FILE FORMAT: C'F' => FIXED; C'V' => VARIABLE 00762000
  763. FILEFLAG DC X'00' FILE FLAGS - ALWAYS ZERO? 00763000
  764. FILEILEN DC F'0' (MAXIMUM) LENGTH OF FILE DATA ITEMS 00764000
  765. FILESIZE DC H'0' NUMBER OF 800 BYTE BLOCKS IN FILE 00765000
  766. FILEYEAR DC 2C' ' YEAR OF FILE CREATION - LAST TWO DIGITS IN EBCDIC 00766000
  767. STATLEN EQU *-STATABLE LENGTH OF CMS FILE STATUS TABLE 00767000
  768. EJECT 00768000
  769. DC 0D'0' 00769000
  770. NEXTLINK DC A(0) ADDRESS OF POINTER TO NEXT CHAIN LINK 00770000
  771. LINKEND DC A(LINKLIST+80) END OF CHAIN LINK LIST 00771000
  772. LINKLIST DS 80C LIST OF CMS CHAIN LINK BLOCK NUMBERS 00772000
  773. SPACE 00773000
  774. DC 0D'0' 00774000
  775. NEXTBLOK DC A(0) ADDRESS OF POINTER TO NEXT DATA BLOCK 00775000
  776. BLOKEND DC A(BLOKLIST+120) END OF CURRENT DATA BLOCK LIST 00776000
  777. BLOKLIST DS 800C LIST OF CMS FILE DATA BLOCK NUMBERS 00777000
  778. SPACE 00778000
  779. DC 0D'0' 00779000
  780. NEXTITEM DC A(0) ADDRESS OF NEXT (UNREAD) DATA ITEM 00780000
  781. ITEMEND DC A(FILCHBUF+800) END OF FILCH DATA BUFFER 00781000
  782. FILCHBUF DS 800C BUFFER FOR CMS BLOCK FILCH ROUTINE 00782000
  783. SPACE 00783000
  784. CFILSAVE DS 8F SAVE AREA FOR CMS FILCH ROUTINE 00784000
  785. COPNSAVE DS 7F SAVE AREA FOR CMS OPEN ROUTINE 00785000
  786. CGETSAVE DS 7F SAVE AREA FOR CMS GET ROUTINE 00786000
  787. EJECT 00787000
  788. COPY SVECTORS 00788000
  789. EJECT 00789000
  790. COPY TAREA 00790000
  791. EJECT 00791000
  792. COPY LINKTABL 00792000
  793. EJECT 00793000
  794. COPY IOTABLE 00794000
  795. EJECT 00795000
  796. COPY RSSEQU 00796000
  797. EJECT 00797000
  798. COPY DEVTYPES 00798000
  799. END 00799000
ibm/vm370-lib/rscs/dmtcre.assemble_src.txt ยท Last modified: 2023/08/06 13:39 by Site Administrator