User Tools

Site Tools


ibm:vm370-lib:cms:dmssyn.assemble_src

DMSSYN Source

References

Source Listing

DMSSYN.ASSEMBLE.txt
  1. SYN TITLE 'DMSSYN (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00006000
  4. * 00007000
  5. * 00008000
  6. * 00009000
  7. * 00010000
  8. * MODULE NAME: 00011000
  9. * 00012000
  10. * DMSSYN (SYNONYM) 00013000
  11. * 00014000
  12. * FUNCTION: 00015000
  13. * 00016000
  14. * PROGRAM TO SET UP USER DEFINED COMMAND NAMES AND 00017000
  15. * ABBREVIATIONS FOR CMS COMMANDS. 00018000
  16. * 00019000
  17. * ATTRIBUTES: 00020000
  18. * 00021000
  19. * TRANSIENT (WITH SYSTEM OPTION); SERIALLY REUSABLE. 00022100
  20. * 00023000
  21. * ENTRY POINTS: 00024000
  22. * 00025000
  23. * SYNONYM-WHEN USER ISSUES SYNONYM COMMAND 00026000
  24. * 00027000
  25. * ENTRY CONDITIONS: 00028000
  26. * 00029000
  27. * R15 ADDRESSABILITY 00030000
  28. * R1 PLIST 00031000
  29. * 00032000
  30. * PLIST - 00033000
  31. * CL8'SYNONYM' 00034000
  32. * <CL8'FILENAME'> 00035000
  33. * <CL8'FILETYPE'> 00036000
  34. * <CL8'FILEMODE'> 00037000
  35. * 00038000
  36. * OPTIONS: 00039000
  37. * <CL8'(' 00040000
  38. * CL8'STD'|'NOSTD' STD IS DEFAULT 00041000
  39. * CL8'CLEAR'> 00043000
  40. * XL8'FENCE' 00044000
  41. * 00045000
  42. * 00046000
  43. * EXIT CONDITIONS: 00047000
  44. * 00048000
  45. * NORMAL 00049000
  46. * 00050000
  47. * GPR15 = 0 00051000
  48. * 00052000
  49. * RESPONSES MAY BE: 00053000
  50. * 00054100
  51. * 711I SYSTEM SYNONYMS NOT IN EFFECT 00055100
  52. * A REQUEST HAS BEEN MADE TO PRINT THE SYSTEM 00056100
  53. * ABBREVIATIONS WHILE A PREVIOUS NOSTD IS IN EFFECT 00057100
  54. * 00058100
  55. * 00059100
  56. * 712I NO SYNONYMS (DMSINA NOT IN NUCLEUS) 00060000
  57. * 00061000
  58. * 00062000
  59. * ERROR CODES (WITH MESSAGES) 00063000
  60. * 00064000
  61. * 00065000
  62. * 24 INVALID OPTION 00066000
  63. * 28 FILE NOT FOUND 00067000
  64. * 32 FILE NOT FIXED 80 CHARS, OR INVALID FORMAT 00068000
  65. * 100 DISK READ ERROR 00069000
  66. * 00070000
  67. * 00071000
  68. * 00072000
  69. * 00073000
  70. * EXTERNAL REFERENCES: 00074000
  71. * 00075000
  72. * DMSNUC, DMSINA 00076000
  73. * 00077000
  74. * TABLES/WORKAREAS: 00078000
  75. * 00079000
  76. * FREE STORAGE IS OBTAINED FOR USER SPECIFIED COMMAND 00080000
  77. * NAMES. 00081000
  78. * 00082000
  79. * REGISTER USAGE: 00083000
  80. * 00084000
  81. * R11 ABDSECT 00085000
  82. * R12 BASE 00086000
  83. * R0-8, 10, 12, 14-15 WORK 00087000
  84. * 00088000
  85. * CALLS TO OTHER ROUTINES: 00089000
  86. * 00090000
  87. * DMSFRE, DMSSTT, DMSRDB, DMSFNS, DMSCWR 00091000
  88. * 00092000
  89. * OPERATION: 00093000
  90. * 00094000
  91. * SYNONYM CHECKS IF THERE ARE ANY PARAMETERS OR OPTIONS, 00095100
  92. * IF NONE AND THE NOABBREV FLAG IN THE NUCLEUS IS NOT ON SYSTEM 00096100
  93. * ABBREVIATIONS ARE TYPED; IF ANY USER SYNONYMS, THOSE ARE 00097100
  94. * TYPED ALSO. IF A FILE NAME IS GIVEN IT IS SAVED AND FLAGS 00098100
  95. * ARE SET FOR ANY OPTIONS. IF GIVEN, THE FILEID SPECIFIED IS 00099000
  96. * CHECKED (VIA STATE) FOR A FIXED 80 CHARACTER 00100000
  97. * FORMAT. THE STORAGE FOR AN OLD USERS SYNONYM TABLE IS RELEASED 00101000
  98. * IF ANY, AND STORAGE IS OBTAINED (VIA DMSFRE) FOR THE USER 00102000
  99. * COMMAND NAMES. EACH USER SYNONYM IS READ (DMSBRD) AND THE 00103000
  100. * RECORD IS FORMATTED (VIA A COPY OF SCAN) FOR EASE IN HAND- 00104000
  101. * LING. THEN EACH COMMAND NAME, SYNONYM AND COUNT IS MOVED TO 00105000
  102. * THE FREE STORAGE BLOCK. AT END-OF-FILE THE FILE IS CLOSED 00106000
  103. * (FINIS) AND A POINTER TO THE FREE STORAGE BLOCK IS SET 00107000
  104. * IN DMSINA. NEXT THE OPTIONS ARE HANDLED AS FOLLOWS: 00108000
  105. * CLEAR - RELEASE (DMSFRE) THE OLD USER SYNOMYM TABLE, IF ANY 00109000
  106. * NOTE: THIS HAS NO EFFECT IF A FILEID IS 00109200
  107. * SPECIFIED SINCE THE OLD TABLE IS ALWAYS 00109400
  108. * ERASED BEFORE THE NEW ONE IS BUILT 00109600
  109. * STD - CLEAR NOABBREV FLAG IN NUCON 00110000
  110. * NOSTD - SET NOABBREV FLAB IN NUCON 00111000
  111. * 00112000
  112. * FINALLY RETURN TO CALLER WITH RETURN CODE IN REGISTER 15. 00113000
  113. * 00114000
  114. * 00115000
  115. * NOTES: 00116000
  116. * 00117000
  117. * USER-DEFINED SYNONYMS ARE LOCATED IN A FILE 00118000
  118. * IDENTIFIED AS "FILENAME FILETYPE FILEMODE" IN THE 00119000
  119. * FORMAT SHOWN. IF FILETYPE IS OMITTED, A FILETYPE OF 00120000
  120. * SYNONYM IS ASSUMED; IF FILEMODE IS OMITTED, A MODE 00121000
  121. * OF A1 IS ASSUMED. IF NO FILE IS SPECIFIED, NO 00122000
  122. * USER-DEFINED SYNONYMS ARE SET UP, AND THE SYSTEM 00123000
  123. * ABBREVIATIONS ARE USED IN THE MANNER DEFINED BY THE 00124000
  124. * SPECIFIED OPTIONS. 00125000
  125. * 00126000
  126. * THE USER SYNONYM FILE "FILENAME FILETYPE FILEMODE" 00127000
  127. * CONSISTS OF 80-BYTE FIXED-LENGTH RECORDS IN FREEFORM 00128000
  128. * FORMAT WITH COLUMNS 73 TO 80 IGNORED. THE FORMAT FOR 00129000
  129. * EACH RECORD IS: 00130000
  130. * 00131000
  131. * ----------------------------------------- 00132000
  132. * | | | | 00133000
  133. * | SYSTEM-COMMAND | USER-SYNONYM | COUNT | 00134000
  134. * | | | | 00135000
  135. * ----------------------------------------- 00136000
  136. * 00137000
  137. * WHERE COUNT IS THE NUMBER OF CHARACTERS NECESSARY FOR 00138000
  138. * THE SYNONYM TO BE ACCEPTED. IF OMITTED, THE ENTIRE 00139000
  139. * SYNONYM MUST BE ENTERED. SYNONYM BUILDS A TABLE FROM THE 00140000
  140. * CONTENTS OF THIS FILE TO USE FOR COMMAND SYNONYMS. 00141000
  141. * 00142000
  142. * IF FILEID AND THE OPTION CLEAR ARE BOTH SPECIFIED THE 00143100
  143. * USER SYNONYM TABLE WILL BE CREATED AND NOT CLEARED. 00144100
  144. * 00145100
  145. * 'SYNONYM' (WITH NO ADDITIONAL PARAMETERS) ASKS FOR 00146100
  146. * ON-LINE LISTING OF SYSTEM SHORT-FORM ABBREVIATIONS 00147100
  147. * (IF IN EFFECT), AND USER SYNONYMS (IF ANY). 00148100
  148. * 00149100
  149. * 00151000
  150. * SEE CMS DMSINA ROUTINE FOR FURTHER INFORMATION. 00152000
  151. *. 00153100
  152. EJECT 00155000
  153. SYNONYM START X'E000' (WILL BE TRANSIENT DISK-RESIDENT) 00156000
  154. * 00157000
  155. USING *,R12 ADDRESSABILITY 00158000
  156. USING NUCON,R0 00159000
  157. LR R12,R15 00160000
  158. ST R14,SAVE14 SO YOU CAN GO HOME @VA02569 00160200
  159. SR R15,R15 HANDY NUMBER ZERO @VA02569 00160400
  160. STH R15,OURFLAG CLEAR THE FLAG @VA02569 00160600
  161. ST R15,ERRCODE SET GOOD UNTIL PROVEN BAD @VA02569 00160800
  162. L R11,AUSABRV WITHIN 'ABBREV' ROUTINE. 00161000
  163. LTR R11,R11 MAKE SURE IT'S THERE, 00162000
  164. BZ NOABB ERROR IF NOT. 00163000
  165. USING ABDSECT,R11 REFERENCE EASILY 00164000
  166. CLI 8(R1),X'FF' ANY PARAMETERS AT ALL ? 00165000
  167. BE SHOWSYS IF NOT, JUST WANTS A LIST OF @V305032 00166200
  168. * ABBREVIATIONS / SYNONYMS NOW IN EFFECT. 00166300
  169. MVC STYPE(11),=CL11'SYNONYM A1' INITIALIZE STATE LIST P3070 00171000
  170. CLI 8(R1),C'(' LEFT-PAREN OR FILE-NAME ? 00172000
  171. BE SYN02 BE IF LEFT-PAREN. 00173000
  172. MVC SNAME,8(R1) MUST BE FILENAME, SAVE IT. 00174000
  173. OI OURFLAG+1,NAMEG SIGNAL THAT NAME WAS GIVEN 00175000
  174. LA R1,8(,R1) NEXT PARAMETER, 00176000
  175. CLI 8(R1),X'FF' END OF CALLER'S PARAMETER-LIST ? 00177000
  176. BE SYN08 YES 00178000
  177. CLI 8(R1),C'(' LEFT-PAREN OR FILE-TYPE ? 00179000
  178. BE SYN02 BE IF LEFT-PAREN. 00180000
  179. CLC 8(8,R1),=CL8'SYNONYM' IS TYPE SYNONYM 00181000
  180. BNE ERR1 NO 00182000
  181. MVC STYPE,8(R1) MUST BE FILETYPE, SAVE IT 00183000
  182. LA R1,8(,R1) NEXT PARAMETER, 00184000
  183. CLI 8(R1),X'FF' END OF CALLER'S PARAMETER-LIST ? 00185000
  184. BE SYN08 YES 00186000
  185. CLI 8(R1),C'(' LEFT-PAREN OR FILE-MODE ? 00187000
  186. BE SYN02 BE IF LEFT-PAREN. 00188000
  187. MVC SMODE,8(R1) MUST BE FILE-MODE, SAVE IT 00189000
  188. LA R1,8(,R1) NEXT PARAMETER, 00190000
  189. CLI 8(R1),X'FF' END OF CALLER'S PARAMETER-LIST ? 00191000
  190. BE SYN08 YES 00192000
  191. CLI 8(R1),C'(' BETTER BE LEFT-PAREN THEN. 00193000
  192. BE SYN02 START OF OPTIONS P0684 00194000
  193. LA R1,8(,R1) POINT TO BAD GUY P0684 00195000
  194. B PLISTER GO TELL THE USER P0684 00196000
  195. * LEFT-PAREN ENCOUNTERED... 00197000
  196. SYN02 LA R4,8 SET UP INCREMENTER AND 00198000
  197. LA R5,LASTOP LIMIT FOR BXLE LOOP BELOW 00199000
  198. CLI 9(R1),C' ' BLANK IMMEDIATELY AFTER LEFT-PAREN ? 00200000
  199. BE SYN03 BE IF YES, 1ST OPTION IN NEXT DBL-WORD 00201000
  200. LA R1,9(,R1) SET UP FOR FIRST OPTION 00202000
  201. LA R2,7 IN VERY NEXT BYTE. 00203000
  202. B SYN05 ... 00204000
  203. SYN03 LA R1,16(,R1) SET TO CHECK 1ST OPTION IN NEXT DBL-WORD 00205000
  204. * 00206000
  205. SYN04 LA R2,8 INCREMENTER = 8. 00207000
  206. * 00208000
  207. SYN05 LA R3,FIRSTOP SET FOR EXAMINING OPTIONS 00209000
  208. SYN06 CLC 0(6,R1),0(R3) DOES IT MATCH ONE OF OUR OPTIONS ? 00210000
  209. BE OPFOUND BE IF YES. 00211000
  210. BXLE R3,R4,SYN06 ITERATE THRU OPTION-TABLE. 00212000
  211. PLISTER DS 0H ERROR IN CALLER'S PARAMETER-LIST 00213000
  212. LR R2,R1 CAUSE DMSERR DESTROYS IT.. 00214000
  213. DMSERR NUM=3,LET=E,TEXT='INVALID OPTION ''........''', X00215100
  214. SUB=(CHARA,(2)) 00216000
  215. LA R15,24 MAKE THAT ERROR 24 00217000
  216. B LR14 BACK TO CALLER. 00218000
  217. * 00219000
  218. OPFOUND OC OURFLAG(2),6(R3) 'OR' IN FLAG-BIT (OR BITS) 00220000
  219. TM OURFLAG+1,EPLIST END OF P-LIST ? 00221000
  220. BO SYN07 BO IF YES (NO MORE OPTIONS) 00222000
  221. AR R1,R2 BUMP R1 FOR NEXT OPTION 00223000
  222. B SYN04 AND CONTINUE CHECKING. 00224000
  223. * 00225000
  224. SYN07 TM OURFLAG,STD+NOSTD CHECKING FOR CONFLICTING OPTIONS 00226000
  225. BNO SYN08 ERROR IF BOTH SET 00227000
  226. * 00228000
  227. B ERR066E PUT OUT ERROR MESSAGE @VA02969 00229100
  228. * NO MORE PARAMETERS ... 00231000
  229. SYN08 TM OURFLAG+1,NAMEG WAS NAME GIVEN ? 00232000
  230. BZ SYN13 BZ IF NOT, MUST BE OPTIONS ONLY. 00233000
  231. LA R1,SLIST STATE USER SYN FILE 00234000
  232. L R15,ASTATE STATE @V305066 00235100
  233. BALR R14,R15 ... @V305066 00235600
  234. BNZ NOTFND ERROR IF NOT FOUND @V305066 00236100
  235. LA R1,SNAME SET UP PRETTY FILEID P0685 00237000
  236. BAL R0,SETUP P0685 00238000
  237. L R2,AFST ACCESS FST-ENTRY (IN 'STATEFST') 00239000
  238. CLI 30(R2),C'F' MUST BE FIXED-FILE 00240000
  239. BNE BADUSYN WHOOPS. 00241000
  240. CLC =H'80',34(R2) AND 80-BYTE RECORDS. 00242000
  241. BNE BADUSYN ... 00243000
  242. CH R15,26(,R2) AND > 0 ITEMS IN THE FILE 00244000
  243. BE NOTFND TREAT NULL FILE SAME AS NOT FOUND 00245000
  244. MVC RNAME(16),0(R2) LOOKS OK, SET UP NAME & TYPE 00246000
  245. MVC RMODE,24(R2) ALSO MODE 00247000
  246. LM R0,R1,USABRV ANY OLD-ONES TO GIVE BACK ? 00249000
  247. LTR R1,R1 ... 00250000
  248. BZ SYN10 BZ IF NOT. 00251000
  249. DMSFRET DWORDS=(0),LOC=(1) 00252000
  250. SYN10 LH R3,26(,R2) GET NUMBER OF ITEMS IN THE FILE 00253000
  251. MH R3,=H'17' TIMES 17 BYTES PER ITEM 00254000
  252. LA R0,7(,R3) ADD 7 FOR ROUNDING, 00255000
  253. SRA R0,3 INTO DOUBLE-WORDS WE MUST GO 00256000
  254. DMSFREE DWORDS=(0),TYPE=NUCLEUS GET STORAGE 00257000
  255. STM R0,R1,SAVABR SAVE LOC AND AMOUNT 00258000
  256. MVC USABRV(8),SAVABR MOVE TO LOW STORAGE @V305032 00259100
  257. SH R3,=H'17' POINT TO LAST ITEM 00260000
  258. A R3,SAVABR+4 NOW WE HAVE THE ADDRESS 00261000
  259. ST R3,USABRV+12 STORE WHERE NEEDED. @V305032 00262100
  260. L R2,SAVABR+4 R2 POINTS TO BEGINNING OF FREE STOR 00263000
  261. * NOW READ USER-SYNONYM FILE AND PROCESS IT ... 00264000
  262. SYN11 LA R1,RLIST READ A RECORD 00265000
  263. L R15,ARDBUF ... @V305032 00266100
  264. BALR R14,R15 ... @V305032 00266600
  265. BNZ CHK12 ERROR SHOULD BE END OF FILE @V305032 00267100
  266. LA R1,FORSCAN CALL COPY OF 'SCAN' WHICH MUST BE 00268000
  267. LA R15,SCAN INCLUDED WITH THIS PROGRAM AND LET 00269000
  268. BALR R14,R15 'SCAN' DO ALL THE WORK (WHY NOT ?) 00270000
  269. CLI 0(R1),X'FF' MAKE SURE CMS-NAME REALLY THERE 00271000
  270. BE BADATA ERROR IF NOT 00272000
  271. CLI 8(R1),X'FF' DITTO FOR USER-SYNONYM ... 00273000
  272. BE BADATA ERROR IF NOT 00274000
  273. * COMPUTE NUMBER OF BYTES IN USER-SYNONYM ... 00275000
  274. LA R4,7 START WITH 7, 00276000
  275. LA R3,8(R1,R4) START WITH 8TH CHARACTER 00277000
  276. BLOOP CLI 0(R3),C' ' IS 'LAST' CHARACTER BLANK ? 00278000
  277. BNE CNTFND BNE IF NOT, WE'VE GOT R4. 00279000
  278. BCTR R3,0 DECREMENT R3 FOR NEXT TIME 00280000
  279. BCT R4,BLOOP ITERATE DOWN TO 1 CHARACTER 00281000
  280. CNTFND LA R4,1(,R4) R4 NOW HOLDS ACTUAL BYTE-COUNT. 00282000
  281. CLI 16(R1),C'1' CHECK 'COUNT' (IF THERE) IN USER-SYN 00284000
  282. BL USER4 IF NOT GOOD, USE R4 VALUE. 00285000
  283. CLI 16(R1),C'8' CHECK AGAIN ... 00286000
  284. BH USER4 IF NOT GOOD, USE R4 VALUE. 00287000
  285. SR R3,R3 OBTAIN THE 00288000
  286. IC R3,16(,R1) COUNT WHICH WAS GIVEN, 00289000
  287. SH R3,=X'00F0' BINARY PLEASE, FROM ALPHAMERIC 00290000
  288. STC R3,16(,R2) STORE COUNT (TENTATIVELY) 00291000
  289. CR R3,R4 COMPARE WITH ACTUAL COUNT 00292000
  290. BNH SYN12 OK IF NOT 'TOO LARGE' 00293000
  291. USER4 STC R4,16(,R2) USE ACTUAL COUNT IF NECESSARY 00294000
  292. SYN12 MVC 0(16,R2),0(R1) MOVE CMS-NAME & USER-SYN THERE TOO 00295000
  293. LA R2,17(,R2) INCREMENT FOR NEXT 17-BYTE CHUNK 00296000
  294. B SYN11 AND KEEP READING USER SYN FILE. 00298000
  295. * 00299000
  296. CHK12 C R15,=F'12' READ ERROR IS HOPEFULLY EOF. 00300000
  297. BE CLOSIT YES (OK SO FAR) 00301000
  298. LA R1,100 ERROR CODE 00302000
  299. ST R1,ERRCODE SAVE ERROR-CODE TO SHOW ON RETURN 00303000
  300. DMSERR NUM=104,LET=S,TEXT='ERROR ''...'' READING FILE ''.......00304000
  301. .............'' FROM DISK', P0685X00305000
  302. SUB=(HEX,(15),CHAR8A,NNAME), P0685X00306000
  303. RENT=NO P0685 00307000
  304. BADSHOW LM R0,R1,USABRV GIVE BACK THE FREE STORAGE 00308000
  305. DMSFRET DWORDS=(0),LOC=(1) GIVE BACK STORAGE 00309000
  306. XC USABRV(8),USABRV CLEAR THE POINTERS @V305032 00310100
  307. CLOSIT LA R1,RLIST NOW CLOSE THE FILE @V305032 00311100
  308. L R15,AFINIS VIA 'FINIS' @V305032 00312100
  309. BALR R14,R15 ... @V305032 00313100
  310. L R15,ERRCODE CHECK ERROR-CODE 00315000
  311. LTR R15,R15 ... 00316000
  312. BZ SYN14 HOPEFULLY WE'RE OK. 00317000
  313. LR14 L R14,SAVE14 IF NOT QUIT 00318000
  314. BR R14 (IN DISGUST). 00319000
  315. * 00320000
  316. * IF NO FILE-NAME GIVEN, CHECK FOR 'CLEAR' OPTION ... 00321000
  317. SYN13 TM OURFLAG,CLEAR IS 'CLEAR' WANTED ? 00322000
  318. BZ SYN14 BZ IF NOT. 00323000
  319. CLEARUSR LM R0,R1,USABRV SIZE/ADR OF OLD TAB (IF ANY) @VA02569 00324100
  320. LTR R1,R1 ANYTHING THERE ? 00325000
  321. BZ SYN14 BZ IF NOT. 00326000
  322. DMSFRET DWORDS=(0),LOC=(1) GIVE BACK OLD TABLE 00327000
  323. XC USABRV(8),USABRV ZERO OUT POINTERS @V305032 00328100
  324. * 00329000
  325. SYN14 TM OURFLAG,STD CLEAN UP NOW... 00330000
  326. BZ SYN15 STD FLAG SET ? (BZ IF NOT) 00331000
  327. SYN14A NI OPTFLAGS,255-NOSTDSYN CLEAR 'NOSYN'BIT IF STD @V305032 00332110
  328. B SYN16 00333000
  329. SYN15 TM OURFLAG,NOSTD NOSTD FLAG SET ? 00334000
  330. BO SYN15A YES @VA02969 00335100
  331. OI OURFLAG,STD DEFAULT TO STD @VA02969 00335300
  332. B SYN14A SET STD @VA02969 00335500
  333. SYN15A OI OPTFLAGS,NOSTDSYN SET FOR NO SYSTEM-ABBREVIATIO @V305032 00335710
  334. SYN16 L R14,SAVE14 RESTORE R14 00337000
  335. BR R14 AND RETURN TO CALLER. @V305032 00338000
  336. * 00339000
  337. OURFLAG DC H'00' FLAG FOR OUR USE 00340000
  338. ERRCODE DC F'0' ERROR-CODE SAVED HERE 00341000
  339. * 00342000
  340. DS 0D (MIGHT AS WELL FOR BEST PERFORMANCE) 00343000
  341. * TABLE FOR VARIOUS OPTIONS ... 00344000
  342. * MIN AND EXACT OPTIONS ARE REMOVED.. 00345000
  343. FIRSTOP DC 6X'FF',X'00',AL1(EPLIST) 00346000
  344. DC CL6')',X'00',AL1(EPLIST) 00347000
  345. DC CL6'STD',AL1(STD),AL1(0) 00348000
  346. DC CL6'NOSTD',AL1(NOSTD),AL1(0) 00349000
  347. DC CL6'CLEAR',AL1(CLEAR),AL1(0) 00350000
  348. LASTOP EQU *-8 00352000
  349. * 00353000
  350. * BITS OF OURFLAG ... 00354000
  351. PRINT EQU X'80' 'P' WAS SPECIFIED 00355000
  352. STD EQU X'40' 'STD' WAS SPECIFIED 00356000
  353. NOSTD EQU X'20' 'NOSTD' WAS SPECIFIED 00357000
  354. MIN EQU X'10' 'MIN' WAS SPECIFIED 00358000
  355. XACT EQU X'08' 'EXACT' WAS SPECIFIED 00359000
  356. CLEAR EQU X'04' 'CLEAR' WAS SPECIFIED 00360000
  357. PUSER EQU X'02' 'PUSER' WAS SPECIFIED 00361000
  358. * (ROOM FOR ONE MORE OPTION HERE) 00362000
  359. EPLIST EQU X'80' END OF OPTIONS THRU X'FF' OR RIGHT-PAREN 00363000
  360. NAMEG EQU X'40' SIGNALS FILE-NAME WAS GIVEN 00364000
  361. * 00365000
  362. BADATA DS 0H ERROR IN USER SYN DATA 00366000
  363. DMSERR TEXT='FILE ''....................'' CONTAINS X00367000
  364. INVALID RECORD FORMATS',SUB=(CHAR8A,SNAME), X00368100
  365. LET=E,NUM=56 P0685 00369000
  366. MVC ERRCODE(4),=F'32' RETURN CODE OF 32 P0685 00370000
  367. B BADSHOW GO GIVE BACK FREE STORAGE ETC. 00371000
  368. * 00372000
  369. NOTFND DS 0H USER SYN FILE NOT FOUND (OR NULL) 00373000
  370. C R15,=F'28' WAS RESULT FILE NOT FOUND? P0685 00374000
  371. BNE LR14 NO,THEN MSG ALL READY GIVEN P0685 00375000
  372. DMSERR NUM=2,LET=E,TEXT='FILE ''....................'' NOT FOUN00376000
  373. ND.',SUB=(CHAR8A,SNAME) P0685 00377000
  374. LA R15,28 MAKE THAT ERROR 28 00378000
  375. B LR14 GO EXIT. 00379000
  376. * 00380000
  377. BADUSYN DS 0H WRONG FORMAT OF USER SYN FILE 00381000
  378. DMSERR NUM=7,LET=E,TEXT='FILE ''....................'' NOT FIXE00382000
  379. ED,80 CHAR RECORDS.',SUB=(CHAR8A,NNAME) P0685 00383000
  380. LA R15,32 RETURN CODE = 32 P0683 00384000
  381. B LR14 GO EXIT. 00385000
  382. ERR066E LA R2,=CL8'STD' STD IS ONE ERROR @VA02969 00385100
  383. LA R3,=CL8'NOSTD' NOSTD IS ANOTHER ERROR @VA02969 00385200
  384. DMSERR TEXT='''........'' AND ''........'' ARE CONFLICTING OPTX00385300
  385. IONS',LET=E,NUM=66,SUB=(CHARA,(R2),CHARA,(R3)),RENT=NO 00385400
  386. LA R15,24 SET RETURN CODE @VA02969 00385500
  387. B LR14 EXIT @VA02969 00385600
  388. EJECT 00386000
  389. * COMES HERE TO TYPE OUT SYSTEM SHORT-FORM ABBREVIATIONS 00387000
  390. SHOWSYS SSM =X'81' PERMIT TERMINAL INTERRUPTS; @V305032 00387500
  391. LA R1,TYPCAR CARRIAGE-RETURN FIRST @V305032 00388000
  392. SVC X'CA' @V305032 00388500
  393. TM OPTFLAGS,NOSTDSYN ARE ABBREVS FLAGGED 'OFF'? @V305032 00389000
  394. BZ OKPS BZ IF NOT, OK TO PRINT SYS ABB'S.@V305032 00389500
  395. DMSERR NUM=711,LET=I,TEXT='NO SYSTEM SYNONYMS IN EFFECT' 00390000
  396. * (NOTE -- NOT AN 'ERROR') 00390500
  397. B CRAFTER @V305032 00391000
  398. OKPS LA R1,TFIRST PRELIMINARY HEADER ... @V305032 00391500
  399. SVC X'CA' ... @V305032 00392000
  400. LA R1,TFIRST1 ... @V305032 00392500
  401. SVC X'CA' ... @V305032 00393000
  402. LA R1,TFIRST2 ... @V305032 00393500
  403. SVC X'CA' ... @V305032 00394000
  404. LA R1,TAFTER SET UP R1 FOR TYPEOUTS @V305032 00394500
  405. SR R2,R2 CLEAR R2 (FOR 'IC' BELOW) @V305032 00395000
  406. LM R3,R5,REGTABA PREPARE TO ACCESS SYS ABBREVS @V305032 00395500
  407. * 00396000
  408. SYSLOOP MVC SYSABB,BLANKS BLANK OUT ABBREVIATION @V305032 00396500
  409. MVC SYSCOM(8),0(R3) MOVE IN SYSTEM COMMAND @V305032 00397000
  410. IC R2,8(,R3) GET COUNT OF SHORTEST @V305032 00397500
  411. BCTR R2,0 FORM (LESS 1) @V305032 00398000
  412. EX R2,DMVC MOVE SHORTEST-FORM TO TYPEOUT, @V305032 00398500
  413. SVC X'CA' CALL TYPLIN (DELS TERM'L BLANKS) @V305032 00399000
  414. BXLE R3,R4,SYSLOOP ITERATE FOR ALL SYSTEM COMMANDS @V305032 00399500
  415. CRAFTER LA R1,TYPCAR CARRIAGE-RETURN AFTERWARDS @V305032 00400000
  416. SVC X'CA' ... @V305032 00400500
  417. * 00401000
  418. * 00401500
  419. * COMES HERE TO TYPE OUT USER SYNONYMS (IF ANY) 00402000
  420. SR R15,R15 CLEAR R15 (WILL BE ERROR-CODE) @V305032 00402500
  421. LM R3,R5,USABRV+4 PREPARE TO ACCESS USER SYNONYMS @V305032 00403000
  422. LTR R3,R3 (IF ANY) @V305032 00403500
  423. BZ SYN17 EXIT (NOT AN ERROR) IF NONE. @V305032 00404000
  424. LA R1,TSECOND PRELIMINARY HEADER FOR USER SYN'S@V305032 00404500
  425. SVC X'CA' ... @V305032 00405000
  426. LA R1,TSECOND1 ... @V305032 00405500
  427. SVC X'CA' ... @V305032 00406000
  428. LA R1,TSECOND2 ... @V305032 00406500
  429. SVC X'CA' ... @V305032 00407000
  430. LA R1,TAFTER2 SET UP R1 FOR TYPEOUTS @V305032 00407500
  431. SR R2,R2 (FOR 'IC' BELOW) @V305032 00408000
  432. * 00408500
  433. USRLOOP MVC USERABB2,BLANKS BLANK OUT ABBREV (IF ANY) @V305032 00409000
  434. MVC SYSCOM2(8),0(R3) MOVE IN SYSTEM-COMMAND, @V305032 00409500
  435. MVC USERSYN2(8),8(R3) USER SYNONYM, @V305032 00410000
  436. CLI 16(R3),00 DOES 'SHORT FORM' OF USER-SYN @V305032 00410500
  437. BE NOSHRT EXIST ? @V305032 00411000
  438. CLI 16(R3),07 ONLY YES I NUMBER FROM 1 TO 7 @V305032 00411500
  439. BH NOSHRT ... @V305032 00412000
  440. IC R2,16(,R3) LOOK AT (N+1)TH BYTE OF @V305032 00412500
  441. LA R6,8(R3,R2) USER-SYNONYM @V305032 00413000
  442. CLI 0(R6),C' ' IS IT BLANK ? @V305032 00413500
  443. BE NOSHRT IF YES, IT CAN'T BE A SHORT-FORM @V305032 00414000
  444. BCTR R2,0 IF NON-BLANK, MOVE IN SHORT-FORM @V305032 00414500
  445. EX R2,DMVC2 OF USER-SYNONYM. @V305032 00415000
  446. NOSHRT SVC X'CA' CALL TYPLIN (DELS TERM'L BLANKS) @V305032 00415500
  447. BXLE R3,R4,USRLOOP ITERATE FOR ALL USER ABBREVS @V305032 00416000
  448. LA R1,TYPCAR CARRIAGE-RETURN AFTERWARDS @V305032 00416500
  449. SVC X'CA' ... @V305032 00417000
  450. SYN17 SSM =X'00' REVERT TO USUAL SYSTEM MASK, @V305032 00417500
  451. B SYN16 GO RETN TO CALLER (R15 ALREADY 0)@V305032 00418000
  452. SPACE 3 00418500
  453. NOABB DS 0H NO ABBREVIATIONS AT ALL... @V305032 00449000
  454. DMSERR TEXT='NO SYNONYMS (DMSINA NOT IN NUCLEUS)',LET=I, X00450000
  455. NUM=712 @V305032 00451000
  456. LA R15,0 @V305032 00452000
  457. BR R14 AND EXIT. @V305032 00453000
  458. ERR1 LA R0,8(R1) POINT TO FILETYPE @V305032 00454000
  459. DMSERR NUM=32,LET=E,TEXT='INVALID FILETYPE ''........''',SUB=(R00455000
  460. CHARA,(0)) @V305032 00456000
  461. LA R15,24 RETURN CODE @V305032 00457000
  462. B LR14 AND RETURN @V305032 00458000
  463. EJECT 00459000
  464. DS 0F @V305032 00459500
  465. TYPCAR DC CL8'TYPLIN' TO TYPE A CARRIAGE-RETURN @V305032 00460500
  466. DC AL1(1),AL3(ONEBLNK) ... @V305032 00461500
  467. DC C'B',AL3(1) ... @V305032 00462500
  468. DS 0F @V305032 00463500
  469. TFIRST DC CL8'TYPLIN',AL1(1),AL3(FIRST),C'B',AL3(L'FIRST) @V305032 00464500
  470. TFIRST1 DC CL8'TYPLIN',AL1(1),AL3(FIRST1),C'B',AL3(L'FIRST1) 00465500
  471. TFIRST2 DC CL8'TYPLIN',AL1(1),AL3(FIRST2),C'B',AL3(L'FIRST2) 00466500
  472. * 00467500
  473. TSECOND DC CL8'TYPLIN',AL1(1),AL3(SECOND),C'B',AL3(L'SECOND) 00468500
  474. TSECOND1 DC CL8'TYPLIN',AL1(1),AL3(SECOND1),C'B',AL3(L'SECOND1) 00469500
  475. TSECOND2 DC CL8'TYPLIN',AL1(1),AL3(SECOND2),C'B',AL3(L'SECOND2) 00470500
  476. * 00471500
  477. TAFTER DC CL8'TYPLIN' THEREAFTER @V305032 00472500
  478. DC AL1(1),AL3(SYSCOM) @V305032 00473500
  479. DC C'B',AL3(BLANKS-SYSCOM) @V305032 00474500
  480. * 00475500
  481. FIRST DC C'SYSTEM SHORTEST' @V305032 00476500
  482. FIRST1 DC C'COMMAND FORM' @V305032 00477500
  483. FIRST2 DC C'-------- --' @V305032 00478500
  484. SYSCOM DC CL10' ' E.G. 'ACCESS' GOES HERE @V305032 00479500
  485. SYSABB DC CL8' ' E.G. 'AC' GOES HERE @V305032 00480500
  486. BLANKS DC CL8' ' (FOR INITIALIZING SYSABB ETC.) @V305032 00481500
  487. * 00482500
  488. DMVC MVC SYSABB(*-*),0(R3) (MOVES CORRECT NO. BYTES) @V305032 00483500
  489. SPACE 3 00485000
  490. SAVE14 DC F'0' (R14 SAVED HERE IF NECESSARY) @V305032 00486000
  491. SAVABR DS 2F SAVE COUNT AND ADDRESS @V305032 00487000
  492. SPACE 3 00488000
  493. DS 0F @V305032 00488500
  494. TAFTER2 DC CL8'TYPLIN' @V305032 00489500
  495. DC AL1(1),AL3(SYSCOM2) @V305032 00490500
  496. DC C'B',AL3(EUSERT-SYSCOM2) @V305032 00491500
  497. * 00492500
  498. SECOND DC C'SYSTEM USER SHORTEST' @V305032 00493500
  499. SECOND1 DC C'COMMAND SYNONYM FORM (IF ANY)' @V305032 00494500
  500. SECOND2 DC C'-------- -------- ----' @V305032 00495500
  501. SYSCOM2 DC CL9' ' E.G. 'ERASE' GOES HERE @V305032 00496500
  502. USERSYN2 DC CL9' ' E.G. 'DELETE' GOES HERE @V305032 00497500
  503. USERABB2 DC CL8' ' E.G. 'DELET' GOES HERE @V305032 00498500
  504. EUSERT EQU * (END OF THIS TYPEOUT) @V305032 00499500
  505. * 00500500
  506. ONEBLNK DC C' ' (TO TYPE ONE CARRIAGE-RETURN) @V305032 00501500
  507. * 00502500
  508. DMVC2 MVC USERABB2(*-*),8(R3) MOVE SHORT-FORM OF USER-SYN @V305032 00503500
  509. * 00504500
  510. DS 0F @V305032 00505500
  511. SLIST DC CL8'STATE' STATE-PARAMETER-LIST 00507000
  512. SNAME DC CL8'USER' FILENAME 00508000
  513. STYPE DC CL8'SYN' FILETYPE 00509000
  514. SMODE DC CL2'*' FILE-MODE 00510000
  515. DC CL2' ' (UNUSED) 00511000
  516. AFST DC A(*-*) ADDRESS OF 'STATEFST' 00512000
  517. * 00513000
  518. DS 0F FOR 'RDBUF' & 'FINIS' .. 00514000
  519. RLIST DC CL8'RDBUF' ('FINIS' GOES HERE LATER) 00515000
  520. RNAME DC CL8'USER' FILENAME 00516000
  521. RTYPE DC CL8'SYNONYM' FILETYPE @V305032 00517000
  522. RMODE DC CL2'A1' MODE @V305032 00518000
  523. DC H'0' 'ITEM NUMBER' 00519000
  524. DC A(INBUF) INPUT-BUFFER 00520000
  525. DC F'80' 80 BYTES 00521000
  526. DC CL2'F' FIXED MODE 00522000
  527. DC H'1' ONE ITEM AT A TIME 00523000
  528. DC A(*-*) SHOULD BE 80 BYTES READ 00524000
  529. LTORG 00525000
  530. * 00526000
  531. * KEEP THE FOLLOWING TWO IN ORDER (FOR 'SCAN') .. 00527000
  532. FORSCAN DC F'72' 00528000
  533. INBUF DC CL80' ' RECORDS FOR 'USER SYN' READ IN HERE 00529000
  534. NNAME EQU INBUF P0683 00530000
  535. * 00531000
  536. * PREPARE NEAT FILEID FOR TYPING 00532000
  537. * 00533000
  538. SETUP DS 0H P0683 00534000
  539. MVC INBUF(18),0(R1) FILENAME,TYPE AND MODE P0683 00535000
  540. LR R1,R0 P0683 00536000
  541. BR R1 P0683 00537000
  542. EJECT 00538000
  543. ABDSECT DSECT (TO REFERENCE TABLES IN 'ABBREV') ... 00539000
  544. SPACE 3 00540000
  545. * TABLE GIVING WHEREABOUTS OF USER-DEFINED-ABBREVIATIONS, IF ANY 00541000
  546. * 00542000
  547. * PLEASE KEEP THE FOLLOWING SEVEN AD-CON'S IN ORDER ........ 00543000
  548. * (SO THEY CAN BE REFERENCED FROM 'USABRV' IF NECESSARY) 00544000
  549. USABRV DC F'0' NO. DBL-WORDS FREE-STORAGE IN USER-TABLE. 00545000
  550. DC A(*-*) ADDRESS OF 1ST ITEM IN USER-ABRV-TABLE 00546000
  551. DC F'17' (FOR BXLE) 00547000
  552. DC A(*-*) ADDRESS OF LAST ITEM IN USER-ABRV-TABLE. 00548000
  553. * 00549000
  554. REGTABA DC A(FIRSTAB) REFERENCE 'REGULAR' TABLE ... 00550000
  555. DC F'9' (FOR BXLE) 00551000
  556. DC A(LASTAB) (FOR BXLE) 00552000
  557. * 00553000
  558. NOAB EQU X'80' 'NO ABBREVIATIONS' 00554000
  559. EXACT EQU X'40' FOR 'EXACT' MATCH INSTEAD OF MINIMUM. 00555000
  560. SPACE 2 00556000
  561. * NOTE - USER-DEFINED ABBREVIATION TABLE (17 BYTES PER ITEM) 00557000
  562. * IS A 'SYNONYM' TABLE, OF THE FOLLOWING FORM (FOR EACH ONE)... 00558000
  563. * DC CL8'CMS-NAME' CMS SYSTEM COMMAND - E.G. ERASE 00559000
  564. * DC CL8'USER-SYN' USER-SYNONYM FOR SAME - E.G. DELETE 00560000
  565. * DC AL1(NUMBER) MINIMUM NO. OF BYTES ACCEPTABLE FOR MATCH 00561000
  566. SPACE 2 00562000
  567. FIRSTAB EQU * (REAL TABLE IS IN 'ABBREV') 00563000
  568. LASTAB EQU FIRSTAB+9 (REAL TABLE IS IN 'ABBREV') 00564000
  569. EJECT 00565000
  570. NUCON 00566000
  571. * 00567000
  572. REGEQU 00568000
  573. * 00569000
  574. SPACE 2 00570000
  575. DROP R11 00571000
  576. SYNONYM CSECT (NECESSSARY FOR ADDRESSING 'SCAN' WHICH FOLL 00572000
  577. DROP R12 00573000
  578. EJECT 00574000
  579. SCAN DS 0D COPY OF 'SCAN' ... 00575000
  580. USING *,15 00576000
  581. STM R2,R8,TEMP SAVE ONLY THE REGISTERS WE USE, 00577000
  582. LA R8,COMBUF POINT TO START OF COMMAND BUFFER 00578000
  583. SR 0,0 ZERO OUT THE BUFFER COUNT 00579000
  584. L 4,0(,1) LOAD 4 WITH NO OF CHARACTERS IN LINE 00580000
  585. LA 3,4(,1) AND REG. 3 WITH PTR. TO INFO. START 00581000
  586. LTR 4,4 IS THE COUNT ZERO 00582000
  587. BC 8,NOCHAR YES - NO LINE IN 00583000
  588. BCTR 4,0 4 HOLDS CHAR. COUNT MINUS ONE 00584000
  589. LR 5,4 POINT REG. 5 TO LAST CHARACTER 00585000
  590. AR 5,3 IN INPUT LINE 00586000
  591. BLNKLK EX 4,TRT1 LOOK FOR FIRST NON-BLANK CHARACTER 00587000
  592. BC 8,NOCHAR NONE LEFT 00588000
  593. LR 4,5 GET COUNT OF CHARACTERS STILL 00589000
  594. SR 4,1 UNSCANNED IN INPUT LINE 00590000
  595. LR 3,1 POINT REG. 3 TO NEW INFO BEGINNING 00591000
  596. EX 4,TRT2 AND LOOK FOR NEXT BLANK CHARACTER 00592000
  597. BC 7,GORND WE FOUND A BLANK 00593000
  598. LA 1,1(,5) NO BLANK - POINT REG 1 PAST LINE 00594000
  599. GORND LR 4,1 REG. FOUR HAS COUNT OF 00595000
  600. SR 4,3 CHARACTERS TO MOVE FROM BUFFER 00596000
  601. BCTR 4,0 00597000
  602. EX 4,MVC GO MOVE CHARACTERS 00598000
  603. LA 6,6 ARE ANY BLANKS NEEDED 00599000
  604. SR 6,4 TO FILL IT 00600000
  605. BC 4,FULINE NO 00601000
  606. LA R7,1(R4,R8) YES - POINT TO EMPTY PART OF DBL-WORD 00602000
  607. EX 6,MBLNK AND FILL IT WITH BLANKS 00603000
  608. FULINE LA R8,8(,R8) SPACE UP TO NEXT BUFFER LINE 00604000
  609. A 0,ONE ADD ONE TO COUNT OF BUFFERS USED 00605000
  610. LR 4,5 GET NUMBER OF CHARACTERS LEFT IN LINE 00606000
  611. SR 4,1 ARE THERE ANY 00607000
  612. BC 4,NOCHAR NO - SCAN FINISHED 00608000
  613. LR 3,1 YES - POINT REG. 3 TO NEW BUFFER START 00609000
  614. BC 15,BLNKLK AND CONTINUE LINE SCAN 00610000
  615. * 00611000
  616. * 00612000
  617. * FF-FILL REMAINDER OF LINE (24 JUNE 1968) ... 00613000
  618. NOCHAR LM 2,3,ALLONE ALL ONES INTO R2 AND R3, 00614000
  619. LA 4,8 8 INTO R4 FOR INCREMENTER, 00615000
  620. LA 1,COMBUF SETUP R1 FOR CALLEE 00616000
  621. LA R5,ECOMBUF-8 SET LIMIT FOR BXLE, 00617000
  622. JSLP STM 2,3,0(R8) STORE A DOUBLE-WORD, 00618000
  623. BXLE R8,4,JSLP ITERATE FOR REMAINDER OF COMBUF. 00619000
  624. SLL 0,3 BUFFER AND PLACE NO. OF BYTES 00620000
  625. A 0,FOUR IN BUFFER IN REGISTER ZERO 00621000
  626. LM R2,R8,TEMP RESTORE THE REGISTERS WE USED, 00622000
  627. SR R15,R15 CLEAR ERROR-CODE, 00623000
  628. BR R14 AND RETURN TO CALLER. 00624000
  629. EJECT 00625000
  630. ********************************************************************* 00626000
  631. * 00627000
  632. * DATA AREA 00628000
  633. * 00629000
  634. ********************************************************************* 00630000
  635. * 00631000
  636. TRT1 TRT 0(1,3),NBLNKT SCAN FOR FIRST NON-BLANK CHAR. 00632000
  637. TRT2 TRT 0(1,3),BLNKTB SCAN FOR FIRST BLANK CHARACTER 00633000
  638. MVC MVC 0(1,R8),0(3) MOVE NON-BLANK PORTION INTO A BUFFER 00634000
  639. MBLNK MVC 0(1,R7),BLNKS FILL BUFFER OUT WITH BLANKS 00635000
  640. TEMP DS 7F (R2 THRU R8 SAVED AS NEEDED) 00636000
  641. ONE DC F'1' 00637000
  642. FOUR DC F'4' 00638000
  643. ALLONE DC 4X'FF' 00639000
  644. DC 4X'FF' 00640000
  645. BLNKS DC 8C' ' 00641000
  646. BLNKTB DC 64X'00' TRANSLATION TABLE WITH ONLY 00642000
  647. DC X'01' BLANK TURNED ON 00643000
  648. DC 63X'00' 00644000
  649. DC 128X'00' 00645000
  650. NBLNKT DC 64X'02' TRANSLATION TABLE WITH ONLY 00646000
  651. DC X'00' BLANK TURNED OFF 00647000
  652. DC 63X'02' 00648000
  653. DC 128X'02' 00649000
  654. COMBUF DS 37D (37 DBL-WRDS PLENTY FOR 72-BYTE INPUT) 00650000
  655. ECOMBUF EQU * (THE END) 00651000
  656. END 00652000
ibm/vm370-lib/cms/dmssyn.assemble_src.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator