Table of Contents

DMSARN Source

References

Source Listing

DMSARN.ASSEMBLE.txt
  1. ARN TITLE 'DMSARN (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * MODULE NAME: 00004000
  5. * 00005000
  6. * DMSARN (ASM3705) 00006000
  7. * 00007000
  8. * FUNCTION: 00008000
  9. * 00009000
  10. * ASM3705 COMMAND. TO PROVIDE THE INTERFACE BETWEEN 00010000
  11. * THE USER AND THE 370X ASSEMBLER. 00011000
  12. * 00012000
  13. * ATTRIBUTES: 00013000
  14. * 00014000
  15. * DISK RESIDENT 00015000
  16. * 00016000
  17. * ENTRY POINTS: 00017000
  18. * 00018000
  19. * DMSARN - SEE FUNCTION DESCRIPTION 00019000
  20. * ASMHAND - SYSUT2 PROCESSING ROUTINE (CALLED FROM DMSSOB) 00020000
  21. * 00021000
  22. * ENTRY CONDITIONS: 00022000
  23. * 00023000
  24. * ASM3705 - 00024000
  25. * GPR1 = A(PLIST) 00025000
  26. * GPR14 = RETURN ADDRESS 00026000
  27. * GPR15 = A(CALLED ROUTINE) 00027000
  28. * PLIST = CL8 - FILENAME 00028000
  29. * 00029000
  30. * OPTIONAL AND IN ANY ORDER - 00030000
  31. * CL8'(' - START OF OPTIONS 00031000
  32. * CL8'XREF'|'NOXREF' *** DEFAULTS APPEAR FIRST *** 00032000
  33. * CL8'NORENT'|'RENT' 00033000
  34. * CL8'NODECK'|'DECK' 00034000
  35. * CL8'LOAD'|'NOLOAD' 00035000
  36. * CL8'LIST'|NOLIST' 00036000
  37. * CL8'DISK'|'PRINTER'|'NOPRINT' 00037000
  38. * CL'8'LINECNT', CL8'55'|'NN' 00038000
  39. * 00039000
  40. * XL8 - FENCE 00040000
  41. * 00041000
  42. * EXIT CONDITONS: 00042000
  43. * 00043000
  44. * NORMAL - 00044000
  45. * GPR15 = 0 NO ERROR 00045000
  46. * 00046000
  47. * ERROR - 00047000
  48. * GPR15 = 28 FILE NOT FOUND. 00048000
  49. * GPR15 = 24 INVALID OPTION, NO FILENAME 00049000
  50. * GPR15 = 32 ILLEGAL RECORD LENGTH FOR ASM3705 FILE. 00050000
  51. * GPR15 = 36 NO READ/WRITE DISKS ACCESSED. 00051000
  52. * GPR15 = 4 MINOR ERRORS DETECTED DURING ASSEMBLE, 00052000
  53. * SUCCESSFUL PROGRAM EXECUTION IS PROBABLE. 00053000
  54. * GPR15 = 8 ERRORS DETECTED DURING ASSEMBLE, 00054000
  55. * UNSUCCESSFUL PROGRAM EXECUTION IS 00055000
  56. * POSSIBLE. 00056000
  57. * GPR15 = 12 SERIOUS ERRORS DETECTED DURING ASSEMBLE, 00057000
  58. * UNSUCCESSFUL EXECUTION IS PROBABLE. 00058000
  59. * GPR15 = 16 CRITICAL ERRORS DETECTED DURING ASSEMBLE, 00059000
  60. * UNSUCCESSFUL EXECUTION IS PROBABLE. 00060000
  61. * GPR15 = 20 CATASTROPHIC ERRORS DETECTED DURING 00061000
  62. * ASSEMBLE (PARTIAL OR COMPLETE ASSEMBLY 00062000
  63. * CANCELLED). 00063000
  64. * 00064000
  65. * CALLS TO OTHER ROUTINES: 00065000
  66. * 00066000
  67. * DMSERSA - ERASE OLD FILES 00067000
  68. * DMSSMNE - INITIALIZE STORAGE POINTERS 00068000
  69. * DMSSTTA - LOCATE THE FILE 00069000
  70. * IFKASM - 370X ASSEMBLER ROOT SEGMENT 00070000
  71. * 00071000
  72. * EXTERNAL REFERENCES: 00072000
  73. * 00073000
  74. * FREEMAIN 00074000
  75. * GETMAIN 00075000
  76. * NUCON 00076000
  77. * TYPE 00077000
  78. * 00078000
  79. * 00079000
  80. * TABLES/WORKAREAS: 00080000
  81. * 00081000
  82. * DEFAULTS, OPTEST - LISTS OF VALID OPTIONS AND DEFAULTS 00082000
  83. * 00083000
  84. * REGISTER USAGE: 00084000
  85. * 00085000
  86. * GPR0 = WORKING REGISTER 00086000
  87. * GPR1 = WORKING REGISTER 00087000
  88. * GPR3 = BASE REGISTER 00088000
  89. * GPR4 = WORKING REGISTER 00089000
  90. * GPR5 = WORKING REGISTER 00090000
  91. * GPR6 = RETURN ADDRESS TO CALLER 00091000
  92. * GPR7 = WORKING REGISTER 00092000
  93. * GPR8 = WORKING REGISTER 00093000
  94. * GPR9 = WORKING REGISTER 00094000
  95. * GPR10 = CONSTANT '8' 00095000
  96. * GPR12 = WORKING REGISTER 00096000
  97. * GPR13 = WORKING REGISTER 00097000
  98. * GPR14 = RESERVED TO BALR 14, 15 00098000
  99. * GPR15 = ERROR CODE ON RETURN. 00099000
  100. * 00100000
  101. * NOTES - 00101000
  102. * 00102000
  103. * NONE 00103000
  104. * 00104000
  105. * OPERATION: 00105000
  106. * 00106000
  107. * ASM3705 FIRST SETS A BIT (COMPSWT,X'80') IN 00107000
  108. * OSSFLAGS TO INDICATE THE 370X ASSEMBLER IS RUNNING. 00108000
  109. * 00109000
  110. * ASM3705 NEXT SCANS THE OPTIONS SPECIFIED AND USES 00110000
  111. * THE INFORMATION THEREBY OBTAINED TO SET UP THE OPTION 00111000
  112. * LIST FOR THE 370X ASSEMBLER AND THE FILEDEF PLISTS FOR THE 00112000
  113. * CALLS TO FILEDEF. IF A PARTICULAR OPTION IS NOT 00113000
  114. * SELECTED, THE CORRESPONDING DEFAULT VALUE APPEARS IN 00114000
  115. * THE LIST, WHICH IS COMPACTED TO ELIMINATE BLANKS 00115000
  116. * BEFORE PASSING IT TO THE ASSEMBLER. 00116000
  117. * 00117000
  118. * IF RUNNING UNDER THE BATCH MONITOR, 00118000
  119. * ASM3705 TYPES A MESSAGE AT THE TERMINAL GIVING THE 00119000
  120. * NAME OF THE FILE ABOUT TO BE ASSEMBLED. IT THEN 00120000
  121. * CALLS STATE TO VERIFY THE EXISTENCE OF THIS FILE. IF 00121000
  122. * IT DOES NOT EXIST, ASSEMBLE ISSUES AN ERROR MESSAGE 00122000
  123. * AND RETURNS TO THE CALLER. IF IT DOES EXIST, 00123000
  124. * ASM3705 CHECKS THE ITEM LENGTH, ISSUES AN ERROR 00124000
  125. * MESSAGE IF ITEM LENGTH IS INCORRECT AND RETURNS TO 00125000
  126. * THE CALLER. 00126000
  127. * 00127000
  128. * IF THE LENGTH IS CORRECT, ASM3705 CALLS ERASE TO 00128000
  129. * DELETE ANY EXISTING TEXT, LISTING, AND UTILITY FILES 00129000
  130. * FOR THE CURRENT ASM3705 FILE, AND SETS UP STORAGE BY 00130000
  131. * CALLS TO STRINIT AND GETMAIN. 00131000
  132. * 00132000
  133. * IT THEN CALLS ADTLKW TO OBTAIN THE MODE OF THE 00133000
  134. * READ-WRITE DISK WITH MOST AVAILABLE SPACE AND USES IT 00134000
  135. * TO SET UP THE FILEDEF PLIST FOR THE SYSUT FILES AND 00135000
  136. * CHECKS TO SEE IF THE DISK WITH THE MOST SPACE IS THE SOURCE 00136000
  137. * DISK. IF IT IS DIFFERENT, THE SYSUT FILES ARE ERASED 00137000
  138. * FROM IT (SYSUT FILES ALREADY ERASED FROM SOURCE). IF 00138000
  139. * NOT SPECIFIED BY THE USER, THE TEXT AND LISTING FILES 00139000
  140. * ARE WRITTEN ON THE 1) DISK FROM WHICH THE ASM3705 00140000
  141. * SOURCE IS READ; 2) ON THE "PARENT" DISK, IF THE 00141000
  142. * FIRST DISK IS A READ-ONLY EXTENSION; OR 3) THE 00142000
  143. * PRIMARY A-DISK. IF NONE OF THESE CHOICES IS 00143000
  144. * AVAILABLE, THE COMMAND WILL BE TERMINATED. CMS 00144000
  145. * CONTROL BLOCKS (CMSCB'S), WHICH REFLECT THE SELECTED 00145000
  146. * OPTION, ARE SET UP FOR THE TEXT, LISTING, ASM3705 AND 00146000
  147. * UTILITY FILES. AFTER EACH SUCCESSFUL RETURN FROM 00147000
  148. * FILEDEF, ASM3705 SETS A CLEAR SWITCH TO INDICATE 00148000
  149. * WHICH CMSCB'S ARE TO BE CLEARED AT THE END OF 00149000
  150. * THE ASSEMBLY. ASM3705 FINALLY BRANCHES TO THE 370X ASSEMBLER. 00150000
  151. * 00151000
  152. * ON RETURN FROM THE 370X ASSEMBLER, ASM3705 ERASES THE 00152000
  153. * UTILITY FILES AND CLEARS THE CMSCBS WHICH IT HAD SET UP. 00153000
  154. * AFTER ANY NECESSARY ERROR MESSAGES, ASM3705 FINALLY 00154000
  155. * SETS THE RELEASE PAGE BIT, CLEARS THE SSTATEXT 00155000
  156. * EXTENSION, CLEAR OSSFLAGS, PLACES THE ERROR CODE IN 00156000
  157. * REGISTER 15 AND RETURNS TO THE USER. 00157000
  158. * 00158000
  159. * 00159000
  160. * SPECIAL OUTPUT HANDLING ROUTINE: ASMHAND 00160000
  161. * 00161000
  162. * THE SYSTEM ROUTINE SOEOB INTERFACES WITH ASMHAND 00162000
  163. * WHENEVER ANY I/O ACTIVITY PERTAINS TO THE 00163000
  164. * SYSUT2 FILE DURING THE ASSEMBLY. 00164000
  165. * 00165000
  166. * SYSUT2 - IF THE FILE IS BEING READ IN ASSEMBLER PHASE 00166000
  167. * 1, ASMHAND ACCESSES THE UTILITY CONTROL TABLE TO 00167000
  168. * ASCERTAIN THE LENGTH AND LOCATION OF THE RECORDS TO 00168000
  169. * BE MOVED AND MOVES IT TO THE SPECIFIED INPUT BUFFER. 00169000
  170. * IF THE FILE IS BEING READ, BUT NOT IN PHASE 1, FIXED 00170000
  171. * LENGTH IS FORCED AND ASMHAND RETURNS TO SOEOB. 00171000
  172. * 00172000
  173. * IF THE FILE IS BEING WRITTEN IN PHASE 1, THE UTILITY 00173000
  174. * CONTROL TABLE IS FIRST SET UP BY A CALL TO GETMAIN 00174000
  175. * AND THEN UPDATED TO REFLECT THE NUMBERS OF RECORDS TO 00175000
  176. * BE WRITTEN. IF THE FILE IS BEING WRITTEN BUT IS NOT 00176000
  177. * IN PHASE 1, ASMHAND FORCES A WRITE OF 4000 BYTES AND 00177000
  178. * RETURNS TO THE CALLER. 00178000
  179. * 00179000
  180. * 00180000
  181. *. 00181000
  182. EJECT 00182000
  183. DMSARN START X'00000' @V200820 00183000
  184. USING DMSARN,R3 @V200820 00184000
  185. LR R3,R15 @V200820 00185000
  186. LR R2,R1 SAVE PARAMETER LIST ADDRESS. @V200820 00186000
  187. ST R14,SVREG14 SAVE RETURN TO CMS @V200820 00187000
  188. * SET UP SOME QUANTITIES 00188000
  189. DMSKEY NUCLEUS DISABLE NUCLEUS PROTECT. @V200820 00189000
  190. USING NUCON,R0 @V200820 00190000
  191. OI OSSFLAGS,COMPSWT INDICATE ASSEMBLER RUNNING.. @V200820 00191000
  192. LA R10,8 SET CONSTANT @V200820 00192000
  193. MVI FDEFSWT,0 INITIALIZE FILEDEF SWITCH @V200820 00193000
  194. EJECT 00194000
  195. *********************************************************************** 00195000
  196. * 00196000
  197. * PROCESS ASSEMBLER OPTIONS. 00197000
  198. * 00198000
  199. *********************************************************************** 00199000
  200. SPACE 00200000
  201. CLI 8(R2),X'FF' FILENAME SPECIFIED? @V200820 00201000
  202. BE ERR1E NO, ERROR @V200820 00202000
  203. CLI 8(R2),C'(' DITTO @V200820 00203000
  204. BE ERR1E @V200820 00204000
  205. LA R2,8(,R2) POINT TO FILENAME @V200820 00205000
  206. LA R8,8(,R2) POINT TO OPTIONS @V200820 00206000
  207. SUIT03 CLI 0(R8),X'FF' @V200820 00207000
  208. BE SQUEEZE NO OPTIONS @V200820 00208000
  209. CLI 0(R8),C'(' @V200820 00209000
  210. BE SUIT02 @V200820 00210000
  211. B ERR3E MUST HAVE '(' BEFORE OPTNS @V200820 00211000
  212. * OPTIONS HANDLING... 00212000
  213. SUIT02 CLI 1(R8),BLANK ASSEMBLE CALLED AS COMMAND? @V200820 00213000
  214. BNE SUIT05 @V200820 00214000
  215. LA R8,8(,R8) PTR TO FIRST OPTION. @V200820 00215000
  216. B SUIT14 @V200820 00216000
  217. SUIT05 MVC 0(7,R8),1(R8) REARRANGE OPTION TO ... @V200820 00217000
  218. MVI 7(R8),BLANK DESTROY THE LEADING BLANK @V200820 00218000
  219. * BEGIN THE UNIQUE OPTION SCANNING. 00219000
  220. SUIT14 CLI 0(R8),C')' END OF OPTIONS? @V200820 00220000
  221. BE SQUEEZE YES. @V200820 00221000
  222. CLI 0(R8),X'FF' ASK AGAIN, HE'S BUSY! @V200820 00222000
  223. BE SQUEEZE YES. @V200820 00223000
  224. * COMMENCE OPTION SCANNER... 00224000
  225. CLC 0(8,R8),PRT CMS 'PRINT' OPTION? @V200820 00225000
  226. BE PDEV @V200820 00226000
  227. CLC 0(3,R8),=CL3'PR' @V200820 00227000
  228. BNE TNOPRNT @V200820 00228000
  229. PDEV MVC LISTDEV(8),=CL8'PRINTER' LISTING TO PRINTER @V200820 00229000
  230. B SUIT08 @V200820 00230000
  231. TNOPRNT CLC 0(8,R8),NOPRINT @V200820 00231000
  232. BE NOPSW @V200820 00232000
  233. CLC 0(5,R8),=CL5'NOPR' @V200820 00233000
  234. BNE LISTDSK @V200820 00234000
  235. NOPSW OI FDEFSWT,NOPRNT SET 'NOPRINT' SW @V200820 00235000
  236. B SUIT08 @V200820 00236000
  237. LISTDSK CLC 0(8,R8),DISK LISTING TO DISK? @V200820 00237000
  238. BE SUIT08 YES, DEFAULT @V200820 00238000
  239. LA R5,OPTEST POINT TO START OF NON-DEFAULTS @V200820 00239000
  240. LA R6,8 INCREMENT @V200820 00240000
  241. LA R7,RENT END OF TABLE @V200820 00241000
  242. AGAIN LA R4,OPTSTART-9 POINT TO WORK AREA @V200820 00242000
  243. NEXTOPT LA R4,9(,R4) BUMP TO NEXT WORK SPACE @V200820 00243000
  244. CLC 0(8,R8),0(R5) USER OPTION = TABLE OPTION? @V200820 00244000
  245. BNE BXLE IF NOT, TRY AGAIN @V200820 00245000
  246. MVC 0(8,R4),0(R5) IF SO, PASS HIM TO ASM3705 (LATER@V200820 00246000
  247. B SUIT08 AND GET NEXT USER OPTION... @V200820 00247000
  248. BXLE BXLE R5,R6,NEXTOPT @V200820 00248000
  249. XI *+5,X'F0' FIRST TIME SWITCH @V200820 00249000
  250. RESET BC 15,SUIT080 EXECUTE FOLLOWING FIRST TIME THR @V200820 00250000
  251. LA R5,DEFAULTS NOW CHECK DEFAULTS, JUST IN CASE @V200820 00251000
  252. LA R7,DEFAULTD END OF DEFAULTS TABLE @V200820 00252000
  253. B AGAIN USE SAME BXLE AGAIN @V200820 00253000
  254. SUIT080 CLC 0(7,R8),LINECNT+1 ONLY ONE OPTION LEFT... @V200820 00254000
  255. BNE ERR3E INVALID OPTION - QUIT @V200820 00255000
  256. AR R8,R10 YES - BUMP R8 TO LINE COUNT @V200820 00256000
  257. LA R7,ERR3E LOAD ERROR RETURN @V200820 00257000
  258. CLI 0(R8),BLANK ANY VALUE GIVEN? @V200820 00258000
  259. BCR 8,R7 NO...ERROR @V200820 00259000
  260. TM 0(R8),X'F0' 1ST DIGIT NUMERIC? @V200820 00260000
  261. BCR 14,R7 NO...ERROR @V200820 00261000
  262. CLI 1(R8),BLANK 2ND DIGIT ? @V200820 00262000
  263. BE MOVER NO @V200820 00263000
  264. TM 1(R8),X'F0' YES...IS IT NUMERIC? @V200820 00264000
  265. BCR 14,R7 NO...ERROR @V200820 00265000
  266. CLI 2(R8),BLANK 3RD DIGIT? @V200820 00266000
  267. BCR 7,R7 NO...ERROR @V200820 00267000
  268. B USECNT VALID ENTRY @V200820 00268000
  269. MOVER MVC 1(1,R8),0(R8) MOVE OVER SINGLE DIGIT AND.. @V200820 00269000
  270. MVI 0(R8),C'0' GIVE IT A TENS DIGIT OF '0' @V200820 00270000
  271. USECNT MVC LINECNT+9(2),0(R8) AND PUT IT IN OPTION LIST @V200820 00271000
  272. SUIT08 AR R8,R10 INC SCAN POINTER THRU ENTRIES @V200820 00272000
  273. MVI RESET+1,X'F0' RESET SCANNING SWITCH @V200820 00273000
  274. B SUIT14 @V200820 00274000
  275. EJECT 00275000
  276. *********************************************************************** 00276000
  277. * 00277000
  278. * FOR ANY FILE TO ASSEMBLE, CHECK ITS EXISTENCE, RECORD LENGTH 00278000
  279. * AND ERASE UNECESSARY FILES 00279000
  280. * 00280000
  281. *********************************************************************** 00281000
  282. * REVISE EXEC PARAMETER LIST BEFORE INVOKING ASSEMBLER 00282000
  283. * 00283000
  284. SQUEEZE LA R12,OPTSTART SET START ADDRESS @V200820 00284000
  285. LA R15,OPTEND-1 SET END ADDRESS @V200820 00285000
  286. LA R14,1 SET INCREMENT @V200820 00286000
  287. LA R6,EXECPARM+2 SET ADDRES FOR BLANKLESS LINE @V200820 00287000
  288. LR R1,R6 SAVE BEGIN LOCATION @V200820 00288000
  289. TEST CLI 0(R12),BLANK IS THE FIRST CHARACTER A BLAN @V200820 00289000
  290. BE MOVALONG YES. IGNORE IT @V200820 00290000
  291. MVC 0(1,R6),0(R12) MOVE NON BLANK OPTION CHARAC @V200820 00291000
  292. LA R6,1(,R6) INCREMENT "TO" POINTER @V200820 00292000
  293. MOVALONG BXLE R12,R14,TEST YES, GO GET NEXT CHARACTER @V200820 00293000
  294. SR R6,R1 GET LENGTH OF WRUNG OUT LINE @V200820 00294000
  295. STH R6,EXECPARM SAVE LENGTH OF PLIST @V200820 00295000
  296. * 00296000
  297. SUIT15 EQU * @V200820 00297000
  298. TM BATFLAGS,BATRUN IF BATCH RUNNING, TELL HIM.. @V200820 00298000
  299. BZ SUIT25 WHERE HE IS. @V200820 00299000
  300. MVC MSG1NAM(8),0(R2) @V200820 00300000
  301. LA R1,CONSOL @V200820 00301000
  302. SVC X'CA' @V200820 00302000
  303. DC AL4(*+4) @V200820 00303000
  304. B CONTINUE @V200820 00304000
  305. * VERIFY FILE EXISTENCE 00305000
  306. SUIT25 MVC STATE+8(8),0(R2) SET FILE NAME @V200820 00306000
  307. XC ODE(2),ODE CLEAR ODE SPECIFICATION. @V200820 00307000
  308. MVC STATE+16(8),INPUT SET INPUT TYPE NAME. @V200820 00308000
  309. LA R1,STATE @V200820 00309000
  310. SVC X'CA' @V200820 00310000
  311. DC AL4(SUIT25A) @V200820 00311000
  312. B SUIT16 @V200820 00312000
  313. SUIT25A MVI ERRCODE,X'01' @V200820 00313000
  314. MVC ERASE+24(2),A1 DUMMY-OUT MODE @V200820 00314000
  315. B SUIT18A @V200820 00315000
  316. * 00316000
  317. SUIT16 L R8,AFSTCOPY @V200820 00317000
  318. USING FSTSECT,R8 @V200820 00318000
  319. MVC SYSNMOD(2),FSTM PROVIDE ASSEM SOURCE MODE @V200820 00319000
  320. DROP R8 @V200820 00320000
  321. CLI 35(R8),X'50' LRECL = 80 BYTES? @V200820 00321000
  322. BE SUIT17 @V200820 00322000
  323. MVC SYSNAM(8),0(R2) SET FILEID FOR ERRMSG @V200820 00323000
  324. LA R9,SYSNAM POINT TO FILEID @V200820 00324000
  325. B ERR007E @V200820 00325000
  326. EJECT 00326000
  327. * 00327000
  328. * FIND A R/W DISK FOR WRITING TEXT &LISTING FILES... 00328000
  329. * 00329000
  330. SUIT17 L R1,FSTL(R8) GET A(ADT) FROM FSTCOPY (STA @V200820 00330000
  331. USING ADTSECT,R1 @V200820 00331000
  332. TM ADTFLG1,ADTFRW IS ORIGIN OF FILE A R/W DISK @V200820 00332000
  333. BO USEIT YES - WRITE BACK TO IT... @V200820 00333000
  334. CLI ADTMX,BLANK NO - IS IT AN EXTENSION? @V200820 00334000
  335. BE CONTINUE NO- DEFAULT TO PRIMARY DISK @V200820 00335000
  336. MVC ADTPARM(1),ADTMX YES - @V200820 00336000
  337. LA R1,ADTLIST CALL ADTLKW FOR PARENT DISK. @V200820 00337000
  338. L R15,VCADTLKW GET ADTLKW ADDRESS @VM03093 00338100
  339. BALR R14,R15 @V200820 00339000
  340. BC 2,CONTINUE IF PARENT DISK R/O, DEFAULT. @V200820 00340000
  341. * 00341000
  342. USEIT MVC WMODE(1),ADTM IF R/W, USE FOR WRITING NEW @V200820 00342000
  343. * FILES 00343000
  344. * PREPARE TO ERASE OLD FILES... 00344000
  345. DROP R1 @V200820 00345000
  346. CONTINUE MVC ERASE+24(2),WMODE SET MODE @V200820 00346000
  347. SUIT18A MVC ERASE+8(8),0(R2) SET NAME @V200820 00347000
  348. LA R9,DDFIN-8 @V200820 00348000
  349. LA R13,INPUT+8 @V200820 00349000
  350. LA R8,8 @V200820 00350000
  351. LA R1,ERASE @V200820 00351000
  352. SUIT18 MVC ERASE+16(8),0(R13) @V200820 00352000
  353. SVC X'CA' ERASE LISTING,TEXT, UTILITY FILES@V200820 00353000
  354. DC AL4(JBXLE) ERROR-RETURN IF IT DIDN'T EXIST @V200820 00354000
  355. JBXLE BXLE R13,R8,SUIT18 ITERATE ... @V200820 00355000
  356. EJECT 00356000
  357. *********************************************************************** 00357000
  358. * 00358000
  359. * INITIALIZATION IN CMS NUCLEUS. 00359000
  360. * 00360000
  361. *********************************************************************** 00361000
  362. L R15,ASTRINIT INITIALIZE FREE STORAGE @V200820 00362000
  363. BALR R14,R15 @V200820 00363000
  364. * RESERVE A LARGE ENOUGH AREA TO LOAD THE LONGEST ASSEMBLE PATH 00364000
  365. L R0,MAXLENGT @V200820 00365000
  366. GETMAIN R,LV=(R0) @V200820 00366000
  367. L R9,FAKELEN @V200820 00367000
  368. LA R8,FAKEAD @V200820 00368000
  369. GETMAIN EC,LV=(R9),A=(R8) @V200820 00369000
  370. SPACE 3 00370000
  371. * MOVE FILE NAME AND MODE IN OSSVC PACKAGE. 00371000
  372. L R8,AOPSECT @V200820 00372000
  373. MVC 8(8,R8),0(R2) MOVE FILE NAME @V200820 00373000
  374. MVC 24(2,R8),ERASE+24 AND MODE @V200820 00374000
  375. L R15,VCADTLKW SET UP CALL TO ADTLKW @VM03093 00375100
  376. MVC ADTPARM,=C'??' FIND DISK WITH MOST SPACE @V200820 00376000
  377. LA R1,ADTLIST @V200820 00377000
  378. BALR R14,R15 @V200820 00378000
  379. BC 2,ERR006E NO READ/WRITE DISKS @V200820 00379000
  380. USING ADTSECT,R1 @V200820 00380000
  381. MVC SYSUTMOD(1),ADTM @V200820 00381000
  382. MVC ERASE+24(2),SYSUTMOD SET UP UTILITY ERASE @V200820 00382000
  383. DROP R1 @V200820 00383000
  384. CLC SYSUTMOD(1),WMODE SOURCE = MOST AVAIL. SPACE? @V200820 00384000
  385. BE NOERASE IF SO, ALREADY ERASED SYSUTS @V200820 00385000
  386. BAL R7,SUIT19 ERASE SYSUTS FROM WRITE DISK @V200820 00386000
  387. NOERASE EQU * @V200820 00387000
  388. USING FCBSECT,R11 @V200820 00388000
  389. MVC SUTNAM(8),0(R2) INITIALIZE SYSUT FILENAME @V200820 00389000
  390. MVI DDSYSUT+5,C'1' SET UP FILEDEF SYSUT1 @V200820 00390000
  391. MVI DD2SYSUT+5,C'1' @V200820 00391000
  392. LA R1,UTFDEF FILEDEF SYSUT1 @V200820 00392000
  393. SVC 202 @V200820 00393000
  394. DC AL4(*+4) @V200820 00394000
  395. LTR R15,R15 ANY ERRORS? @V200820 00395000
  396. BP CLOSE YES, GO AWAY @V200820 00396000
  397. LTR R11,R0 CHEK FOR USER FCB @V200820 00397000
  398. BM FDEFUT2 REQUEST SUCCESSFUL, GO ON @V200820 00398000
  399. MVC FCBPROC(4),AASMHAND USER FCB - TELL HIM WHERE TO@V200820 00399000
  400. FDEFUT2 OI FDEFSWT,X'02' SET FIRST RECORD UTILITY SWCH @V200820 00400000
  401. MVI DDSYSUT+5,C'2' SET UP FILEDEF SYSUT2 @V200820 00401000
  402. MVI DD2SYSUT+5,C'2' @V200820 00402000
  403. LA R1,UTFDEF @V200820 00403000
  404. SVC 202 @V200820 00404000
  405. DC AL4(*+4) @V200820 00405000
  406. LTR R15,R15 ANY ERRORS? @V200820 00406000
  407. BP CLOSE YES, GO AWAY @V200820 00407000
  408. LTR R11,R0 @V200820 00408000
  409. BM UT3 REQUEST SUCCESSFUL, GO ON @V200820 00409000
  410. MVC FCBPROC(4),AASMHAND USER FCB - TELL HIM WHERE TO@V200820 00410000
  411. UT3 LPR R11,R11 @V200820 00411000
  412. OI FCBIOSW,FCBPROCC+FCBPROCO AUXPROC FOR SYSUT2 @V200820 00412000
  413. MVI DDSYSUT+5,C'3' SET UP FILEDEF SYSUT3 @V200820 00413000
  414. MVI DD2SYSUT+5,C'3' @V200820 00414000
  415. LA R1,UTFDEF @V200820 00415000
  416. SVC 202 @V200820 00416000
  417. DC AL4(*+4) @V200820 00417000
  418. LTR R15,R15 ANY ERRORS? @V200820 00418000
  419. BP CLOSE YES, GO AWAY @V200820 00419000
  420. LTR R11,R0 @V200820 00420000
  421. BM FILEDEF REQUEST SUCCESSFUL - GO ON @V200820 00421000
  422. MVC FCBPROC(4),AASMHAND USER FCB - TELL HIM WHERE TO@V200820 00422000
  423. FILEDEF EQU * @V200820 00423000
  424. XR R12,R12 CLEAR R12 @V200820 00424000
  425. LH R12,WMODE LOAD MODE FOR DISK WRITING @V200820 00425000
  426. MVC SYSNAM(8),0(2) STORE FILENAME IN SYSIN PLIST @V200820 00426000
  427. STH R12,TEXTMOD PROVIDE DISK MODE FOR TEXT @V200820 00427000
  428. MVC TEXTNAM(8),0(2) STORE FILENAME IN TEXT PLIST @V200820 00428000
  429. CLC LISTDEV(3),DISK IS PRINTER DEVICE DSK? @V200820 00429000
  430. BE DISKLIST YES, DROP @V200820 00430000
  431. MVC LISTNAM(56),OVER MUST BE PRINTER... @V200820 00431000
  432. B SETFDEF @V200820 00432000
  433. DISKLIST STH R12,LISTMOD PROVIDE DISK O|P MODE @V200820 00433000
  434. MVC LISTNAM(8),0(2) STORE FNAME IN LISTING PLIST @V200820 00434000
  435. SETFDEF LA R1,SYSFDEF SET UP SYSIN FILEDEF @V200820 00435000
  436. SVC 202 @V200820 00436000
  437. DC AL4(*+4) @V200820 00437000
  438. LTR R15,R15 @V200820 00438000
  439. BP CLOSE ANY ERROR? @V200820 00439000
  440. TM ERRCODE,X'01' ? SYSIN FILE ON DISK ? @V200820 00440000
  441. BZ SETEXT YES - GO ON @V200820 00441000
  442. LTR R11,R0 ? USER FCB ? @V200820 00442000
  443. BP DEVTEST YES, GO CHECK HIS DEVICE @V200820 00443000
  444. NI ERRCODE,X'00' NO, ERROR EXIT @V200820 00444000
  445. B ERR002E @V200820 00445000
  446. DEVTEST EQU * @V200820 00446000
  447. CLI FCBDEV,X'14' ? IS DEVICE DISK ? @V200820 00447000
  448. BNE SETEXT NO - SOMETHING ELSE, SO OK @V200820 00448000
  449. NI ERRCODE,X'00' YES, ERROR EXIT @V200820 00449000
  450. B ERR002E @V200820 00450000
  451. SETEXT LA R1,TXTFDEF SET UP TEXT FILEDEF @V200820 00451000
  452. SVC 202 @V200820 00452000
  453. DC AL4(*+4) @V200820 00453000
  454. LTR R15,R15 ANY ERROR? @V200820 00454000
  455. BP CLOSE YES @V200820 00455000
  456. CLC NODECK+1(8),DECK CHEK FOR 'DECK' OPTION @V200820 00456000
  457. BNE LISTR NO - CHEK FOR LISTING @V200820 00457000
  458. LA R1,PUNFDEF YES - SET UP SYSPUNCH FILEDE @V200820 00458000
  459. SVC 202 @V200820 00459000
  460. DC AL4(*+4) @V200820 00460000
  461. LTR R15,R15 ANY ERROR? @V200820 00461000
  462. BP CLOSE @V200820 00462000
  463. LISTR TM FDEFSWT,NOPRNT WAS 'NOPRINT' SPEC'D ? @V200820 00463000
  464. BZ FDEFLIST IF NOT, ISSUE SYSPRINT FDEF @V200820 00464000
  465. MVC LISTDEV(16),DUMMY IF SO, ISSUE DUMMY FDEF...(N @V200820 00465000
  466. FDEFLIST LA R1,LSTFDEF SET UP LISTING FILEDEF @V200820 00466000
  467. SVC 202 @V200820 00467000
  468. DC AL4(*+4) @V200820 00468000
  469. LTR R15,R15 @V200820 00469000
  470. BP CLOSE ANY ERROR? @V200820 00470000
  471. LIST2 LA R1,LIBFDEF SET UP CMSLIB FILEDEF @V200820 00471000
  472. SVC 202 @V200820 00472000
  473. DC AL4(*+4) @V200820 00473000
  474. LTR R15,R15 ANY ERROR? @V200820 00474000
  475. BP CLEARFCB YES. (PROBABLY NO MACLIB FOUND) @V200820 00475000
  476. LPR R11,R0 LOAD (+) FCB ADDR INTO R11 ( @V200820 00476000
  477. OI FCBINIT,FCBCATML MACLIB CONCAT FLAG ON @V200820 00477000
  478. EJECT 00478000
  479. *********************************************************************** 00479000
  480. * 00480000
  481. * CALL THE ASSEMBLER 00481000
  482. * 00482000
  483. *********************************************************************** 00483000
  484. DMSKEY RESET RESET NUCLEUS PROTECT. @V200820 00484000
  485. LA R0,*+8 HELLO ASSEMBLER, THIS IS CMS! @V200820 00485000
  486. B *+12 @V200820 00486000
  487. DC CL8'IFKASM' HELLO CMS, THIS IS ASSEMBLER! @V200820 00487000
  488. SR R1,R1 @V200820 00488000
  489. SVC 8 LOAD THE ASSEMBLER @V200820 00489000
  490. ST R0,VIFKASM @V200820 00490000
  491. LM 13,1,LINK @V200820 00491000
  492. BR R15 @V200820 00492000
  493. * 00493000
  494. * ON RETURN FROM THE ASSEMBLER. 00494000
  495. * 00495000
  496. RETURN EQU * @V200820 00496000
  497. OI FDEFSWT,ASMFIN SIGNAL BACK FROM ASSEMBLER @V200820 00497000
  498. LA R9,3 CHECK FOR MULTIPLE OF 4 @V200820 00498000
  499. NR R9,R15 @V200820 00499000
  500. LTR R9,R9 @V200820 00500000
  501. BNZ SAVRET STRANGE RETURN FROM ASM3705 @V200820 00501000
  502. CH R15,=H'16' ALSO IF > 16 @V200820 00502000
  503. BH SAVRET @V200820 00503000
  504. B *+4(R15) JUMP TAB FOR NORMAL RETURNS @V200820 00504000
  505. B SUIT19 RETURN = 0 @V200820 00505000
  506. B ERR004W 4 @V200820 00506000
  507. B ERR008W 8 @V200820 00507000
  508. B ERR012W 12 @V200820 00508000
  509. B ERR016W 16 @V200820 00509000
  510. * 00510000
  511. SAVRET EQU * @V200820 00511000
  512. STH R15,ERRCODE RETURN CODE FORM THE ASSEMBLER @V200820 00512000
  513. * 00513000
  514. * ERASE UTILITIES 00514000
  515. SUIT19 EQU * @V200820 00515000
  516. LA R9,DDFIN-16 @V200820 00516000
  517. LA R13,INPUT+24 ERASE UTILITIES, USING DDLIST @V200820 00517000
  518. LA R8,8 @V200820 00518000
  519. LA R1,ERASE @V200820 00519000
  520. SUIT20 MVC ERASE+16(8),0(R13) @V200820 00520000
  521. SVC X'CA' @V200820 00521000
  522. DC AL4(*+4) @V200820 00522000
  523. BXLE R13,R8,SUIT20 @V200820 00523000
  524. TM FDEFSWT,ASMFIN BEFORE OR AFTER ASSEMBLY? @V200820 00524000
  525. BCR 8,R7 BEFORE, RETURN TO INITIALIZA @V200820 00525000
  526. CLOSE LA R1,FINIS FINIS * * * (TO BE SAFE) @V200820 00526000
  527. SVC X'CA' @V200820 00527000
  528. DC AL4(*+4) @V200820 00528000
  529. * 00529000
  530. CLEARFCB MVC CLEARNAM(8),CLEARALL CLEAR ALL FCB'S... @V200820 00530000
  531. LA R1,CLEARFIL @V200820 00531000
  532. SVC 202 @V200820 00532000
  533. DC AL4(*+4) @V200820 00533000
  534. EJECT 00534000
  535. * ALL FILES ARE NOW ASSEMBLED. 00535000
  536. END SR R0,R0 @V200820 00536000
  537. TM FDEFSWT,ASMFIN COMMAND ERRORS? @V200820 00537000
  538. BZ CMDERR YES... @V200820 00538000
  539. DMSKEY NUCLEUS DISABLE NUCLEUS PROTECT. @V200820 00539000
  540. CMDERR EQU * COME HERE IF COMMAND ERROR @V200820 00540000
  541. NI OSSFLAGS,255-COMPSWT ASSEMBLER NO LONGER RUN @V200820 00541000
  542. OI MISFLAGS,RELPAGES SET RELEASE PAGE BIT @V200820 00542000
  543. DMSKEY RESET RESET NUCLEUS PROTECT. @V200820 00543000
  544. L R14,SVREG14 @V200820 00544000
  545. LH R15,ERRCODE @V200820 00545000
  546. BR R14 RETURN TO SVCINT @V200820 00546000
  547. SPACE 2 00547000
  548. PRINT NOGEN 00548000
  549. ERR1E DMSERR NUM=1,LET=E,TEXT='NO FILENAME SPECIFIED' @V200820 00549000
  550. MVI ERRCODE+1,X'18' RETURN CODE = 24 @V200820 00550000
  551. B END @V200820 00551000
  552. SPACE 00552000
  553. ERR002E EQU * @V200820 00553000
  554. DMSERR NUM=002,LET=E,SUB=(CHARA,(R2)), @V200820*00554000
  555. TEXT='FILE ''........ ASM3705'' NOT FOUND' @V200820 00555000
  556. MVI ERRCODE+1,X'1C' @V200820 00556000
  557. B CLOSE @V200820 00557000
  558. * 00558000
  559. ERR007E EQU * @V200820 00559000
  560. DMSERR NUM=007,LET=E,SUB=(CHAR8A,(R9)), @V200820*00560000
  561. TEXT='FILE ''....................'' IS NOT FIXED, 80 CHA*00561100
  562. R. RECORDS' @VA04895 00562100
  563. MVI ERRCODE+1,X'20' @V200820 00563000
  564. B CLOSE @V200820 00564000
  565. * 00565000
  566. ERR006E EQU * @V200820 00566000
  567. DMSERR NUM=6,LET=E,TEXT='NO READ/WRITE DISK ACCESSED' @V200820 00567000
  568. MVI ERRCODE+1,X'24' @V200820 00568000
  569. B END GET OUT. @V200820 00569000
  570. * 00570000
  571. ERR3E EQU * @V200820 00571000
  572. DMSERR NUM=3,LET=E,SUB=(CHARA,(R8)), @V200820*00572000
  573. TEXT='INVALID OPTION ''........''' @V200820 00573000
  574. MVI ERRCODE+1,X'18' @V200820 00574000
  575. B END @V200820 00575000
  576. EJECT 00576000
  577. ERR004W DMSERR NUM=4,LET=W,TEXT='WARNING MESSAGES ISSUED' @V200820 00577000
  578. MVI ERRCODE+1,X'04' @V200820 00578000
  579. B SUIT19 @V200820 00579000
  580. * 00580000
  581. ERR008W DMSERR NUM=8,LET=W,TEXT='ERROR MESSAGES ISSUED' @V200820 00581000
  582. MVI ERRCODE+1,X'08' @V200820 00582000
  583. B SUIT19 @V200820 00583000
  584. * 00584000
  585. ERR012W DMSERR NUM=12,LET=W,TEXT='SEVERE ERROR MESSAGES ISSUED' 00585000
  586. MVI ERRCODE+1,X'0C' @V200820 00586000
  587. B SUIT19 @V200820 00587000
  588. * 00588000
  589. ERR016W DMSERR NUM=16,LET=W,TEXT='TERMINAL ERROR MESSAGES ISSUED' 00589000
  590. MVI ERRCODE+1,X'10' @V200820 00590000
  591. B SUIT19 @V200820 00591000
  592. * 00592000
  593. EJECT 00593000
  594. *********************************************************************** 00594000
  595. * 00595000
  596. * PARAMETER LIST FOR THE ASSEMBLER 00596000
  597. * 00597000
  598. *********************************************************************** 00598000
  599. SPACE 00599000
  600. LINK DC A(SAVEAREA) R13 @V200820 00600000
  601. DC A(RETURN) R14 @V200820 00601000
  602. VIFKASM DC A(0) R15: V(IFKASM) @V200820 00602000
  603. DC F'0' @V200820 00603000
  604. DC A(PARAMLST) R1 @V200820 00604000
  605. * 00605000
  606. PARAMLST DC A(EXECPARM) @V200820 00606000
  607. DC X'80',AL3(DDNAMES) @V200820 00607000
  608. * ASSEMBLER DEFAULT OPTIONS ARE SHOWN. 00608000
  609. DS 0H @V200820 00609000
  610. EXECPARM DC H'00' L'REVISED EXEC PARAM FIELD @V200820 00610000
  611. DC 100C' ' @V200820 00611000
  612. OPTSTART EQU * ASSEMBLER OPTION WORK AREA @V200820 00612000
  613. LIST DC CL8'LIST' @V200820 00613000
  614. XREF DC CL9',XREF' @V200820 00614000
  615. LOAD DC CL9',LOAD' @V200820 00615000
  616. NODECK DC CL9',NODECK' @V200820 00616000
  617. NORENT DC CL9',NORENT' @V200820 00617000
  618. LINECNT DC C',LINECNT=55' @V200820 00618000
  619. OPTEND EQU * END OF DEFAULT OPTIONS + 1 @V200820 00619000
  620. DS 0H @V200820 00620000
  621. * ALTERNATE DD NAMES AND ERASURE LIST 00621000
  622. DDNAMES DC AL2(DDFIN-*),24X'00' @V200820 00622000
  623. DC CL8'CMSLIB' @V200820 00623000
  624. INPUT DC CL8'ASM3705' @V200820 00624000
  625. DC CL8'LISTING' @V200820 00625000
  626. DC CL8'PUNCH' @V200820 00626000
  627. DC CL8'SYSUT1' @V200820 00627000
  628. DC CL8'SYSUT2' @V200820 00628000
  629. DC CL8'SYSUT3' @V200820 00629000
  630. DC CL8'TEXT' @V200820 00630000
  631. DDFIN EQU * @V200820 00631000
  632. * LIST OF OPTION KEYWORDS TO COMPARE WITH PARAMETER ENTRIES 00632000
  633. OPTEST DS 0H @V200820 00633000
  634. NOLIST DC CL8'NOLIST' @V200820 00634000
  635. NOXREF DC CL8'NOXREF' @V200820 00635000
  636. NOLOAD DC CL8'NOLOAD' @V200820 00636000
  637. DECK DC CL8'DECK' @V200820 00637000
  638. RENT DC CL8'RENT' @V200820 00638000
  639. * DEFAULTS - SCAN IN CASE OF CONFLICTING ENTRIES, ETC. 00639000
  640. DEFAULTS DS 0H @V200820 00640000
  641. DC CL8'LIST' @V200820 00641000
  642. DC CL8'XREF' @V200820 00642000
  643. DC CL8'LOAD' @V200820 00643000
  644. DC CL8'NODECK' @V200820 00644000
  645. DEFAULTD DC CL8'NORENT' @V200820 00645000
  646. * 00646000
  647. PRT DC CL8'PRINT' @V200820 00647000
  648. NOPRINT DC CL8'NOPRINT' @V200820 00648000
  649. DS 0H @V200820 00649000
  650. WMODE DC CL2'A1' MODE FOR DISK OUTPUT @V200820 00650000
  651. BLANK EQU X'40' @V200820 00651000
  652. EJECT 00652000
  653. * 00653000
  654. * MANDATORY FILE SETUPS 00654000
  655. * 00655000
  656. SYSFDEF DS 0D @V200820 00656000
  657. DC CL8'FILEDEF' @V200820 00657000
  658. DC CL8'ASM3705' @V200820 00658000
  659. DC CL8'DISK' @V200820 00659000
  660. SYSNAM DC CL8' ' @V200820 00660000
  661. DC CL8'ASM3705' @V200820 00661000
  662. SYSNMOD DC CL8'A1' @V200820 00662000
  663. DC CL8'(RECFM' @V200820 00663000
  664. DC CL8'FB' @V200820 00664000
  665. DC CL8'LRECL' @V200820 00665000
  666. DC CL8'80' @V200820 00666000
  667. DC CL8'BLOCK' @V200820 00667000
  668. DC CL8'800' @V200820 00668000
  669. DC CL8'NOCHANGE' @V200820 00669000
  670. DC 8X'FF' @V200820 00670000
  671. TXTFDEF DS 0D @V200820 00671000
  672. DC CL8'FILEDEF' @V200820 00672000
  673. DC CL8'TEXT' @V200820 00673000
  674. TEXTDEV DC CL8'DISK' @V200820 00674000
  675. TEXTNAM DC CL8' ' @V200820 00675000
  676. DC CL8'TEXT' @V200820 00676000
  677. TEXTMOD DC CL8' ' @V200820 00677000
  678. DC CL8'(' @V200820 00678000
  679. DC CL8'NOCHANGE' @V200820 00679000
  680. DC 8X'FF' @V200820 00680000
  681. PUNFDEF DS 0D @V200820 00681000
  682. DC CL8'FILEDEF' @V200820 00682000
  683. DC CL8'PUNCH' @V200820 00683000
  684. DC CL8'PUNCH' @V200820 00684000
  685. DC CL8'(' @V200820 00685000
  686. DC CL8'RECFM' @V200820 00686000
  687. DC CL8'F' @V200820 00687000
  688. DC CL8'LRECL' @V200820 00688000
  689. DC CL8'80' @V200820 00689000
  690. DC CL8'BLOCK' @V200820 00690000
  691. DC CL8'80' @V200820 00691000
  692. DC CL8'NOCHANGE' @V200820 00692000
  693. DC 8X'FF' @V200820 00693000
  694. LSTFDEF DS 0D @V200820 00694000
  695. DC CL8'FILEDEF' @V200820 00695000
  696. DC CL8'LISTING' @V200820 00696000
  697. LISTDEV DC CL8'DISK' @V200820 00697000
  698. LISTNAM DC CL8' ' @V200820 00698000
  699. DC CL8'LISTING' @V200820 00699000
  700. LISTMOD DC CL8' ' @V200820 00700000
  701. OVER DC CL8'(' @V200820 00701000
  702. DC CL8'RECFM' @V200820 00702000
  703. DC CL8'FB' @V200820 00703000
  704. DC CL8'BLOCK' @V200820 00704000
  705. DC CL8'605' @V200820 00705000
  706. DC CL8'NOCHANGE' @V200820 00706000
  707. DC 8X'FF' @V200820 00707000
  708. UTFDEF DS 0D @V200820 00708000
  709. DC CL8'FILEDEF' @V200820 00709000
  710. DDSYSUT DC CL8'SYSUT1' FIRST SYSUT FILEDEF @V200820 00710000
  711. DISK DC CL8'DISK' @V200820 00711000
  712. SUTNAM DC CL8' ' @V200820 00712000
  713. DD2SYSUT DC CL8'SYSUT1' @V200820 00713000
  714. SYSUTMOD DC CL8' 4' @V200820 00714000
  715. DC CL8'(' @V200820 00715000
  716. DC CL8'NOCHANGE' @V200820 00716000
  717. DC CL8'BLOCK' @V200820 00717000
  718. DC CL8'1739' @V200820 00718000
  719. DC CL8'AUXPROC' @V200820 00719000
  720. DC AL4(ASMHAND) @V200820 00720000
  721. DC AL4(0) @V200820 00721000
  722. FENCE DC 8X'FF' @V200820 00722000
  723. LIBFDEF DS 0D @V200820 00723000
  724. DC CL8'FILEDEF' @V200820 00724000
  725. DC CL8'CMSLIB' @V200820 00725000
  726. DC CL8'DISK' @V200820 00726000
  727. DC CL8'CMSLIB' @V200820 00727000
  728. DC CL8'MACLIB' @V200820 00728000
  729. DC CL8'*' @V200820 00729000
  730. DC CL8'(LRECL' @V200820 00730000
  731. DC CL8'80' @V200820 00731000
  732. DC CL8'RECFM' @V200820 00732000
  733. DC CL8'FB' @V200820 00733000
  734. DC CL8'BLOCK' @V200820 00734000
  735. DC CL8'800' @V200820 00735000
  736. DC CL8'NOCHANGE' @V200820 00736000
  737. DC 8X'FF' @V200820 00737000
  738. CLEARFIL DS 0D @V200820 00738000
  739. DC CL8'FILEDEF' @V200820 00739000
  740. CLEARNAM DC CL8'*' @V200820 00740000
  741. DC CL8'CLEAR' @V200820 00741000
  742. DC 8X'FF' @V200820 00742000
  743. ADTLIST DS 0D @V200820 00743000
  744. DC CL24' ' IMMATERIAL @V200820 00744000
  745. ADTPARM DC CL2' ' CODE FOR ADTLKW CALLS @V200820 00745000
  746. SYSUT1 DC CL8'SYSUT1' @V200820 00746000
  747. SYSUT2 DC CL8'SYSUT2' @V200820 00747000
  748. SYSUT3 DC CL8'SYSUT3' @V200820 00748000
  749. CLEARALL DC CL8'*' @V200820 00749000
  750. DUMMY DC CL8'DUMMY' @V200820 00750000
  751. DC 8X'FF' @V200820 00751000
  752. EJECT 00752000
  753. *********************************************************************** 00753000
  754. * 00754000
  755. * CALLING SEQUENCES 00755000
  756. * 00756000
  757. *********************************************************************** 00757000
  758. DS 0F @V200820 00758000
  759. STATE DC CL8'STATE' @V200820 00759000
  760. DC CL8' ' FILE NAME @V200820 00760000
  761. DC CL8' ' TYPE @V200820 00761000
  762. ODE DC CL2'0' MODE @V200820 00762000
  763. DC CL2'0' UNUSED @V200820 00763000
  764. AFSTCOPY DC A(0) ADDRESS OF FST COPY LOCATION @V200820 00764000
  765. * 00765000
  766. DS 0F @V200820 00766000
  767. ERASE DC CL8'ERASE' @V200820 00767000
  768. DC CL8' ' FILE NAME @V200820 00768000
  769. DC CL8' ' TYPE @V200820 00769000
  770. DC CL2' ' MODE @V200820 00770000
  771. * 00771000
  772. DS 0F @V200820 00772000
  773. FINIS DC CL8'FINIS' @V200820 00773000
  774. DC CL8'*' @V200820 00774000
  775. DC CL8'*' @V200820 00775000
  776. DC CL8'*' @V200820 00776000
  777. * 00777000
  778. DS 0F @V200820 00778000
  779. CONSOL DC CL8'TYPLIN' @V200820 00779000
  780. DC AL1(1) @V200820 00780000
  781. DC AL3(MSG1) MESSAGE ADDRESS @V200820 00781000
  782. DC C'R' @V200820 00782000
  783. DC AL3(EMSG1-MSG1) MESSAGE LENGTH @V200820 00783000
  784. EJECT 00784000
  785. *********************************************************************** 00785000
  786. * 00786000
  787. * DATA 00787000
  788. * 00788000
  789. *********************************************************************** 00789000
  790. SPACE 00790000
  791. ERRCODE DC H'0' @V200820 00791000
  792. MSG1 DC C' ASSEMBLING: ' @V200820 00792000
  793. MSG1NAM DC CL8' ' FILE NAME @V200820 00793000
  794. EMSG1 EQU * @V200820 00794000
  795. A1 DC CL2'A1' @V200820 00795000
  796. * 00796000
  797. AASMHAND DC A(ASMHAND) AUXILLARY I/O HANDLER @V200820 00797000
  798. * 00798000
  799. * 00799000
  800. SVREG14 DC F'0' @V200820 00800000
  801. MAXLENGT DC X'00007000' LONGEST ASSEMBLER PATH @V200820 00801000
  802. HALFZERO EQU MAXLENGT H'0' @V200820 00802000
  803. * 00803000
  804. SAVEAREA DC 18F'0' @V200820 00804000
  805. * 00805000
  806. DROP R3 @V200820 00806000
  807. EJECT 00807000
  808. * 00808000
  809. * SPECIAL HANDLING ROUTINE. ENTERED FROM "EOBROUTN". 00809000
  810. * UPON ENTRY: 00810000
  811. * R1=A(DECB) R2=A(DCB) R8=A(OPSECT) 00811000
  812. * R11=A(FCBSECT) R14=A(RETURN) R15=A(ASMHAND) 00812000
  813. * 00813000
  814. * UPON RETURN: 00814000
  815. * ALL REGS ARE RESTORED, EXCEPT R15; 00815000
  816. * EQ 0-EXECUTE I/O REQUEST GT 0-RESIDUAL COUNT LT 0-ERROR CODE 00816000
  817. ASMHAND DS 0D @V200820 00817000
  818. USING ASMHAND,R15 @V200820 00818000
  819. USING NUCON,R0 @V200820 00819000
  820. USING FCBSECT,R11 @V200820 00820000
  821. STM R0,R15,SAVEREGS @V200820 00821000
  822. LR R3,R15 @V200820 00822000
  823. DROP R15 @V200820 00823000
  824. USING ASMHAND,R3 @V200820 00824000
  825. * DETERMINE WHICH DATA SET NEEDS SPECIAL HANDLING 00825000
  826. CLC FCBDD(5),=CL8'SYSUT' @V200820 00826000
  827. BNE HRETURN NOT AN UTITLITY FILE @V200820 00827000
  828. CLI FCBDD+5,C'2' @V200820 00828000
  829. BE SYSUTY HANDLE SYSUT2 @V200820 00829000
  830. * ANY SYSTEM UTILITY DATA SET 00830000
  831. SYSUTX EQU * FUDGE SYSTEM UTILITY @V200820 00831000
  832. MVI FCBFORM,C'F' FORCE "FIXED" RECORDS @V200820 00832000
  833. TM IOBIOFLG,IOBIN INPUT? @V200820 00833000
  834. BO HRETURN YES. @V200820 00834000
  835. MVC FCBBYTE+2(2),HALF4000 FORCE WRITE OF 4000 BYT @V200820 00835000
  836. B HRETURN @V200820 00836000
  837. * ASSEMBLER SYSUT2 00837000
  838. SYSUTY EQU * KEEP SYSUT2 IN CORE DURING @V200820 00838000
  839. * PHASE 1 00839000
  840. USING UTENTRY,R2 @V200820 00840000
  841. USING UTHEAD,R5 @V200820 00841000
  842. L R5,UTSAV GET TABLE ENTRY @V200820 00842000
  843. TM FCBIOSW,FCBCLOSE IN CLOSE? @V200820 00843000
  844. BO CLUT2 YES. @V200820 00844000
  845. TM IOBIOFLG,IOBIN INPUT? @V200820 00845000
  846. BNO WRUT2 NOPE. @V200820 00846000
  847. RDUT2 LTR R5,R5 READING. IN PHASE 1? @V200820 00847000
  848. BZ SYSUTX NO. DO NORMAL SYSUT I/O @V200820 00848000
  849. LH R4,FCBITEM @V200820 00849000
  850. N R4,HALFWORD @V200820 00850000
  851. CH R4,UTNOENT DOES READ POINTER GT N'ENTRIES? @V200820 00851000
  852. BH EOFUT2 YES, SIMULATE EOF @V200820 00852000
  853. SLL R4,3 GET INDEX TO TABLE ENTRY @V200820 00853000
  854. LA R2,0(R5,R4) A(ENTRY FOR THIS RECORD) @V200820 00854000
  855. LH R4,FCBBYTE+2 @V200820 00855000
  856. CH R4,UTLNG VERIFY BYTES REQUESTED LE LRECL @V200820 00856000
  857. BNH *+6 @V200820 00857000
  858. HALF4000 DC H'4000' @V200820 00858000
  859. STH R4,FCBREAD SET COUNT OF BYTES READ @V200820 00859000
  860. L R5,UTRECAD GET A("FROM") @V200820 00860000
  861. L R7,FCBBUFF @V200820 00861000
  862. LR R6,R4 GET L'RECORD @V200820 00862000
  863. BAL R14,MOVEMODE MOVE THE RECORD @V200820 00863000
  864. B UTRETURN @V200820 00864000
  865. WRUT2 LTR R5,R5 WRITING. IN PHASE 1? @V200820 00865000
  866. BNZ UTSET YES. @V200820 00866000
  867. TM FDEFSWT,X'02' FIRST TIME? @V200820 00867000
  868. BNO SYSUTX NO @V200820 00868000
  869. NI FDEFSWT,X'FD' TURN OFF FIRST TIME SWITCH @V200820 00869000
  870. B UTSETUP GO SET THINGS UP @V200820 00870000
  871. UTSET LH R4,FCBITEM @V200820 00871000
  872. N R4,HALFWORD @V200820 00872000
  873. CH R4,UTNOENT DOES WRT PTR GT N'RECORDS? @V200820 00873000
  874. BH UTGETCOR YES. GET MORE CORE @V200820 00874000
  875. SLL R4,3 @V200820 00875000
  876. LA R2,0(R5,R4) GET INDEX INTO TABLE @V200820 00876000
  877. UTSET1 EQU * @V200820 00877000
  878. LH R4,FCBBYTE+2 @V200820 00878000
  879. STH R4,FCBREAD SET N'BYTES @V200820 00879000
  880. L R5,FCBBUFF GET A("FROM") @V200820 00880000
  881. L R7,UTRECAD GET A("TO") @V200820 00881000
  882. LR R6,R4 GET L'RECORD @V200820 00882000
  883. BAL R14,MOVEMODE @V200820 00883000
  884. B UTRETURN @V200820 00884000
  885. UTSETUP EQU * SET UP WORD TABLE @V200820 00885000
  886. L R0,FAKELEN @V200820 00886000
  887. L R1,FAKEAD @V200820 00887000
  888. FREEMAIN R,LV=(R0),A=(R1) @V200820 00888000
  889. LA R0,800 GET 100 DOUBLE WORDS @V200820 00889000
  890. LA R10,UTSAV @V200820 00890000
  891. GETMAIN EC,LV=(R0),A=(R10) @V200820 00891000
  892. LTR R15,R15 STORAGE AVAILABLE? @V200820 00892000
  893. BNZ ERR109S NO, ERROR @V200820 00893000
  894. L R1,0(,R10) LOAD ADDR OF FREE STORAGE @V200820 00894000
  895. ST R1,UTSAV @V200820 00895000
  896. LR R5,R1 @V200820 00896000
  897. LA R0,1 @V200820 00897000
  898. STH R0,FCBITEM SET R/W POINTERS @V200820 00898000
  899. ST R0,UTNOENT @V200820 00899000
  900. B UTSET @V200820 00900000
  901. UTGETCOR EQU * GET A NEW BUFFER @V200820 00901000
  902. LH R2,UTNOENT @V200820 00902000
  903. CH R2,HALF99 IS TABLE FULL? @V200820 00903000
  904. BL *+10 @V200820 00904000
  905. B ERR109S @V200820 00905000
  906. HALF99 DC H'99' @V200820 00906000
  907. CH R4,UTNXT SAME AS NEXT ENTRY? @V200820 00907000
  908. BE *+10 @V200820 00908000
  909. B ERR109S @V200820 00909000
  910. DC H'23' @V200820 00910000
  911. STH R4,UTNOENT UPDATE N'ENTRIES @V200820 00911000
  912. LA R2,1(,R4) @V200820 00912000
  913. STH R2,UTNXT UPDATE NEXT AVAILABLE @V200820 00913000
  914. SLL R4,3 @V200820 00914000
  915. LA R2,0(R5,R4) GET INDEX TO TABLE @V200820 00915000
  916. LH R9,FCBBYTE+2 GET L'RECORD @V200820 00916000
  917. STH R9,UTLNG @V200820 00917000
  918. LA R10,UTRECAD @V200820 00918000
  919. GETMAIN EC,LV=(R9),A=(R10) @V200820 00919000
  920. LTR R15,R15 @V200820 00920000
  921. BNZ ERR109S @V200820 00921000
  922. B UTSET1 @V200820 00922000
  923. CLUT2 EQU * CLOSE OUT SYSUT2 @V200820 00923000
  924. LTR R5,R5 ANY BLOCKS USED? @V200820 00924000
  925. BZ HRETURN NOPE. @V200820 00925000
  926. LH R4,UTNOENT GET N'ENTRIES TO RELEASE @V200820 00926000
  927. LR R2,R5 @V200820 00927000
  928. UTNXTFR LA R2,8(,R2) GET NEXT BLOCK TO FREE @V200820 00928000
  929. LH R0,UTLNG @V200820 00929000
  930. L R1,UTRECAD @V200820 00930000
  931. FREEMAIN R,LV=(R0),A=(R1) @V200820 00931000
  932. BCT R4,UTNXTFR @V200820 00932000
  933. LA R0,800 FREE CONTROL BLOCK @V200820 00933000
  934. L R1,UTSAV @V200820 00934000
  935. FREEMAIN R,LV=(R0),A=(R1) @V200820 00935000
  936. SR R15,R15 @V200820 00936000
  937. ST R15,UTSAV SET UTSAV INDEX POINTER CLEAR @V200820 00937000
  938. B HRETURN @V200820 00938000
  939. EJECT 00939000
  940. * 00940000
  941. * MOVE THE RECORD 00941000
  942. * 00942000
  943. SPACE 00943000
  944. * R6=L'RECORD R7=A("TO") R5=A("FROM") R14=A(RETURN) 00944000
  945. MOVEMODE DS 0H MOVE A RECORD @V200820 00945000
  946. MV1 SH R6,HALF256+2 N'BYTES GT 256? @V200820 00946000
  947. BM LT256 NO. @V200820 00947000
  948. MVC 0(256,R7),0(R5) MOVE 256 BYTES OF THE RECORD @V200820 00948000
  949. BCR 8,R14 L'RECORD=256; FINISHED @V200820 00949000
  950. HALF256 LA R7,256(R7,R0) INCREMENT "TO" LOCATION @V200820 00950000
  951. LA R5,256(,R5) INCREMENT "FROM" LOCATION @V200820 00951000
  952. B MV1 MOVE ANOTHER CHUNCK OF RECORD @V200820 00952000
  953. LT256 AH R6,HALF256+2 RESTORE TRUE COUNT @V200820 00953000
  954. BCTR R6,0 PLAY GAMES @V200820 00954000
  955. EX R6,MOVEREC MOVE ALONG @V200820 00955000
  956. BR R14 RETURN @V200820 00956000
  957. MOVEREC MVC 0(*-*,R7),0(R5) MOVE THE RECORD @V200820 00957000
  958. SPACE 3 00958000
  959. EOFUT2 LA R15,12 INDEICATE EOF ON DATA SET @V200820 00959000
  960. LNR R15,R15 NEGATIZE VALUE @V200820 00960000
  961. B RET @V200820 00961000
  962. ERR109S DMSERR NUM=109,LET=S,TEXT='VIRTUAL STORAGE CAPACITY EXCEEDED' 00962000
  963. LA R15,104 RETURN CODE = 104 @V200820 00963000
  964. LH R4,UTNOENT @V200820 00964000
  965. BCTR R4,0 @V200820 00965000
  966. STH R4,UTNOENT @V200820 00966000
  967. B CLUT2 @V200820 00967000
  968. HRETURN SR R15,R15 RETURN TO EOBROUTN @V200820 00968000
  969. B RET @V200820 00969000
  970. UTRETURN L R15,FCBREAD SEND BACK BYTES READ @V200820 00970000
  971. RET LM R0,R14,SAVEREGS @V200820 00971000
  972. BR R14 @V200820 00972000
  973. * 00973000
  974. DS 0F @V200820 00974000
  975. FAKELEN DC X'00005000' @V200820 00975000
  976. FAKEAD DC F'0' @V200820 00976000
  977. HALFWORD DC F'65535' @V200820 00977000
  978. SAVEREGS DC 16F'0' @V200820 00978000
  979. FDEFSWT DC X'00' FILEDEF REMEMBERER: @V200820 00979000
  980. NOPRNT EQU X'80' 'NOPRINT' OPTION @V200820 00980000
  981. ASMFIN EQU X'40' ON IF ASSEMBLER CALLED @V200820 00981000
  982. EJECT 00982000
  983. UTHEAD DSECT @V200820 00983000
  984. UTDUM DS H @V200820 00984000
  985. UTRDPTR DS 0H @V200820 00985000
  986. UTWRPTR DS H READ/WRITE POINTER @V200820 00986000
  987. UTNOENT DS H N'ENTRIES IN TABLE @V200820 00987000
  988. UTNXT DS H NEXT AVAILABLE ENTRY @V200820 00988000
  989. UTENTRY DSECT @V200820 00989000
  990. UTENTNO DS H RECORD ALIGNMENT @V200820 00990000
  991. UTLNG DS H L'BUFFER @V200820 00991000
  992. UTRECAD DS A A(BUFFER) @V200820 00992000
  993. EJECT 00993000
  994. PRINT GEN 00994000
  995. REGEQU @V200820 00995000
  996. SPACE 00996000
  997. CMSCB @V200820 00997000
  998. ADT @V200820 00998000
  999. SPACE 00999000
  1000. FSTB @V200820 01000000
  1001. NUCON @V200820 01001000
  1002. UTSAV EQU IOBCSW HANDLING SYSUT2 @V200820 01002000
  1003. SPACE 3 01003000
  1004. DMSARN CSECT @V200820 01004000
  1005. LTORG @V200820 01005000
  1006. SPACE 01006000
  1007. ORG DMSARN+X'1000' @V200820 01007000
  1008. END DMSARN 01008000