Table of Contents

DMSLIB Source

References

Source Listing

DMSLIB.ASSEMBLE.txt
  1. LIB TITLE 'DMSLIB (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00004000
  4. * 00005000
  5. * 00006000
  6. * 00007000
  7. * MODULE NAME: 00008000
  8. * 00009000
  9. * DMSLIB 00010000
  10. * 00011000
  11. * 00012000
  12. * FUNCTION: 00013000
  13. * 00014000
  14. * TO SEARCH TEXT LIBRARIES FOR UNDEFINED SYMBOLS, AND TO 00015000
  15. * CLOSE LIBRARIES. 00016000
  16. * 00017000
  17. * ATTRIBUTES: 00018000
  18. * 00019000
  19. * REENTRANT, NUCLEUS RESIDENT 00020000
  20. * 00021000
  21. * ENTRY POINTS: 00022000
  22. * 00023000
  23. * DMSLIB 00024000
  24. * 00025000
  25. * ENTRY CONDITIONS: 00026000
  26. * 00027000
  27. * R3 - RETURN ADDRESS IF AN UNDEFINED NAME IS FOUND IN A 00028000
  28. * TXTLIB DICTIONARY 00029000
  29. * R14 - RETURN IF NO UNDEFINED NAMES RESOLVED 00030000
  30. * R13 - ADDRESS OF FREEST 00031000
  31. * 00032000
  32. * EXIT CONDITIONS: 00033000
  33. * 00034000
  34. * NORMAL - 00035000
  35. * BR TO R3 IF AN UNDEFINED NAME IS ASSOCIATED WITH EITHER 00036000
  36. * A TEXT FILE OR A TXTLIB, BR TO R14 OTHERWISE. 00037000
  37. * 00038000
  38. * ERROR - 00039000
  39. * BALR TO DMSLIO IF ERROR OCCURS DURING POINT FUNCTION 00040000
  40. * THEN RETURN TO CALLER VIA R14 00041000
  41. * 00042000
  42. * CALLS TO OTHER ROUTINES: 00043000
  43. * 00044000
  44. * DMSSTT - TO FIND TEXT FILE WITH SAME NAME AS UNDEFINED 00045000
  45. * DMSPNT - TO PUT READ POINTER AT PROPER ITEM IN TXTLIB 00046000
  46. * FOR DMSLDR 00047000
  47. * DMSLIO - TO PUT OUT ERROR MESSAGES 00048000
  48. * DMSFREE, DMSFRET, DMSFNS 00049000
  49. * 00050000
  50. * EXTERNAL REFERENCES: 00051000
  51. * 00052000
  52. * LDRST, LOADER TABLE, NUCON, TXTLIB LIST 00053000
  53. * 00054000
  54. * TABLES/WORKAREAS: 00055000
  55. * 00056000
  56. * MYFREE 00057000
  57. * 00058000
  58. * REGISTER USAGE: 00059000
  59. * 00060000
  60. * R13 - FREEST 00061000
  61. * R12 - MYFREE 00062000
  62. * R14 - RETURN 00063000
  63. * R11 - BASE 00064000
  64. * OTHERS - WORK 00065000
  65. * 00066000
  66. * OPERATION: 00067000
  67. * 00068000
  68. * 1. SAVE REGISTERS 14-12, SET UP MYFREE IF NOT PREVIOUSLY 00069000
  69. * DONE. 00070000
  70. * 00071000
  71. * 2. IF CALLED TO CLOSE TXTLIBS FREE 'MYFREE' WORKAREA, 00072000
  72. * RESET LIBE FLAGS IN FREEST. 00073000
  73. * 00074000
  74. * 3. SCAN LOADER TABLE FOR AN UNDEFINED ENTRY, IF NONE BR 00075000
  75. * 14. 00076000
  76. * 00077000
  77. * 4. STATE FOR A TEXT FILE WITH THE SAME NAME AS THE 00078000
  78. * UNDEFINED ENTRY UNLESS NOAUTO SPECIFIED. IF A DECK IS 00079000
  79. * FOUND RETURN VIA R3 WITH PLIST IN FREEST SET UP FOR 00080000
  80. * DMSLDR, OTHERWISE CONTINUE. 00081000
  81. * 00082000
  82. * 5. SCAN ALL TXTLIB DICTIONARIES FOR A MATCH ON THE 00083000
  83. * UNDEFINED NAME UNLESS NOLIBE SPECIFIED. IF NO MATCH GO 00084000
  84. * TO STEP 3. IF NOLIBE SPECIFIED OR NO TXTLIBS DEFINED 00085000
  85. * GO TO STEP 3. V0217 00086100
  86. * 00087000
  87. * 6. MATCH FOUND-ISSUE POINT ON THE TXTLIB TO SET READ 00088000
  88. * POINTER FOR DMSLDR, RETURN TO DMSLDR VIA R3. 00089000
  89. * IF THE NAME IS AS ALIAS CREATE AN ENTRY IN THE LOADER 00090000
  90. * TABLE FOR IT. IF NOT AN ALIAS TURN ON MNSD FLAG TO 00091000
  91. * INDICATE TO DMSSLN THAT STRTADDR MUST BE USED AS THE 00092000
  92. * ENTRY LOCATION TO THIS ROUTINE. 00093000
  93. * 00094000
  94. * 7. FOR A POINT ERROR BALR TO DMSLIO FOR POINT ERROR 00095000
  95. * MESSAGE AND RETURN VIA R14. 00096000
  96. *. 00097000
  97. EJECT 00098000
  98. DMSLIB START 00099000
  99. BALR 11,0 GET BASE 00100000
  100. SPACE 00101000
  101. USING *,11 SETUP ADDRESSING 00102000
  102. USING LDRST,R13 00103000
  103. USING MYFREE,12 ... 00104000
  104. USING NUCON,R0 00105000
  105. SPACE 2 00106000
  106. B LIBSTR 00107000
  107. DC X'CCCC' 00108000
  108. DC C'DMSLIB' 00109000
  109. DC X'CCCC' 00110000
  110. LIBSTR STM 14,12,APSV SAVE REGISTERS 00111000
  111. TM FLAGS,SETLIB TEST FOR SETUP 00112000
  112. BZ SETUP GO SETUP IF NOT DONE 00113000
  113. L 12,FLAGS GET BASE FOR MYFREE 00114000
  114. LA 12,0(0,12) ... 00115000
  115. LTR 12,12 IS IT ZERO? 00116000
  116. BZ RETURN YES, SETUP NOT CALLED RETURN 00117000
  117. TM FLAGS,CLOSELIB CLOSE CALLED? 00118000
  118. BO CLOSE ... 00119000
  119. BZ SRCHSET NO, GO SEARCH 00120000
  120. SPACE 2 00121000
  121. RETURN LM 14,12,APSV RESTORE REGISTERS 00122000
  122. LA 11,1 RESET REG 11 00123000
  123. BR 14 BACK TO CALLER 00124000
  124. EJECT 00125000
  125. SETUP L PTR,FLAGS SEE IF FREE STORAGE HAS BEEN SE 00126000
  126. LA 12,0(0,PTR) ... 00127000
  127. TM FLAGS,CLOSELIB CALL TO CLOSE? 00128000
  128. BO RETURN YES - RETURN 00129000
  129. LTR 12,12 ZERO? 00130000
  130. BNZ SYSCHK NO, PROCEED WITH SETUP 00131000
  131. SPACE 2 00132000
  132. DMSFREE DWORDS=MYFREESZ,TYPCALL=BALR @VA14153 00133000
  133. LR 12,1 ... 00134000
  134. AR PTR,12 FORM COMPLETE FLAGS BWORD 00135000
  135. ST PTR,FLAGS STORE BASE IN FLAGS 00136000
  136. XC LIBCNT(12),LIBCNT SET LIBCNT,OLDTBLNG,& LDRCNT 00137000
  137. MVC LDRPTR(4),TBLREF SET LOCATION OF TAB ENTRYS 00138000
  138. SPACE 2 00139000
  139. SYSCHK MVC LIBSAV(60),APSV SAVE REGS IN MY FREE 00140000
  140. LA PLISTR,TXTLIBS ADDRESS OF TXTLIB LIST 00141000
  141. OI FLAGS,SETLIB INDICATE SETUP DONE 00142000
  142. SPACE 2 00143000
  143. LISTLOOK LA CNT,LIBS MAX NUMBER OF LIBRARIES 00144000
  144. LA INC,1 SETUP FOR LIBCNT 00145000
  145. LA INDEX,LIB1NAM INSERT NAMES IN SEQUENCE 00146000
  146. LISTLOOP CLI 0(PLISTR),X'FF' END OF LIST? 00147000
  147. BE ENDLOOK YES, QUIT LOOKING 00148000
  148. LA INC,1(0,INC) UPDATE CNT 00149000
  149. MVC 0(8,INDEX),0(PLISTR) PUT LIBE NAME IN LIST 00150000
  150. LA INDEX,24(0,INDEX) UPDATE LIBE LIST PTR 00151000
  151. LA PLISTR,8(0,PLISTR) UPDATE P LIST PTR 00152000
  152. BCT CNT,LISTLOOP BACK FOR ANOTHER 00153000
  153. SPACE 2 00154000
  154. ENDLOOK BCTR INC,0 COUNT MINUS 1 00155000
  155. ST INC,LIBCNT SAVE NO. OF LIBRARIES 00156000
  156. LTR INC,INC IS IT ZERO? 00157000
  157. BZ SRCHSET+4 NO LIBS GIVEN 00158000
  158. EJECT 00159000
  159. DICTSET EQU * 00160000
  160. L CNT,LIBCNT GET NUM OF LIBES TO READ 00161000
  161. LA INDEX,LIB1NAM START WITH FIRST 00162000
  162. MVC FILE(8),FNAME SAVE PRESENT FILE NAME 00163000
  163. LA R1,TXTDIRC-12 SET R1 FOR DIRECTORY SET 00164000
  164. SETLOOP L R1,12(R1) ADDR OF NEXT TXTLIB DIR BLK 00165000
  165. MVC 8(16,INDEX),16(R1) MOVE ESSENTIAL INFO. 00166000
  166. LA INDEX,24(0,INDEX) UPDATE PTR TO LIBE NAMES IN LIS 00167000
  167. BCT CNT,SETLOOP PROCESS ANOTHER LIBE FILE 00168000
  168. B SRCHSET+4 NOW GO SEARCH LIBRARIES 00169000
  169. SPACE 00170000
  170. EJECT 00177000
  171. *********************************************************************** 00178000
  172. * 00179000
  173. * SEARCH CORE-RESIDENT LIBRARY DIRECTORIES 00180000
  174. * 00181000
  175. *********************************************************************** 00182000
  176. SRCHSET STM 14,12,LIBSAV SAVE REGISTERS IN MY FREE 00183000
  177. LM TEMP,PTR,OLDTBLCT GET PREVIOUS TABLE PARAMS 00184000
  178. AH CNT,TBLCT CORRECT NUM LEFT IN TAB 00185000
  179. SR CNT,TEMP ... 00186000
  180. LH TEMP,TBLCT GET NEW TBLCT 00187000
  181. STM TEMP,PTR,OLDTBLCT SAVE FOR NEXT TIME 00188000
  182. LA DEC,20 SET FOR LOOKING AT LDRTBL 00189000
  183. SPACE 00190000
  184. LDRGO LM CNT,PTR,LDRCNT GET PRESENT LDRTBL PARAMS 00191000
  185. LTR CNT,CNT ANY MORE ENTRYS? 00192000
  186. BZ RETURN NO, RETURN TO CALLER @VM08899 00193000
  187. LDRLOOK SR PTR,DEC UPDATE PTR 00194000
  188. CLI 8(PTR),X'80' UNDEFINED? 00195000
  189. BE UNDEF YES, LOOK IN LIBE @VA14274 00195700
  190. CLI 8(PTR),X'83' WXTRN? @VA14274 00195800
  191. BNE NXTENTRY NO,GO TO NEXT ENTRY IN LDR TABLE @VA14274 00195900
  192. CLC CMNDLIST(8),INCLUDE INCLUDE COMMAND ??? @VA14274 00196000
  193. BNE NXTENTRY @VA14274 00196100
  194. LA R15,CMNDLIST+8 POINT TO COMMAND PARAMETERS @VA14274 00196200
  195. LA R4,8 LOAD INCREMENT @VA14274 00196300
  196. L R5,PARMLIST POINT TO OPTIONS IN COMMAND @VA14274 00196400
  197. SR R5,R4 ...AND SET A FENCE FOR BXLE @VA14274 00196500
  198. NEXTPARM CLC 0(8,PTR),0(R15) DO NAMES MATCH? @VA14274 00196600
  199. BE UNDEF YES, OVERRIDE WXTRN @VA14274 00196700
  200. BXLE R15,R4,NEXTPARM LOOK NEXT PARAM. IN COMMAND @VA14274 00196800
  201. NXTENTRY EQU * @VA14274 00196900
  202. BCT CNT,LDRLOOK LOOK AT NEXT ENTRY @VA14274 00197000
  203. B RETURN NO MORE ENTRY'S, RETURN @VM08899 00198000
  204. SPACE 00199000
  205. UNDEF BCTR CNT,0 DECREASE CNT BY ONE 00200000
  206. STM CNT,PTR,LDRCNT SAVE PRESENT LDRTBL PARAMS 00201000
  207. LM NAMA,NAMB,0(PTR) GET UNDEFINED NAME 00202000
  208. SPACE 00203000
  209. TM FLAG2,NOAUTO HAS AUTO TEXT LOAD BEEN SUPPRESSED 00204000
  210. BO LIBSERCH YES, GO TO LIBRARY SEARCH 00205000
  211. MVI FMODE,X'00' SEE IF 'TEXT' FILE EXISTS 00206000
  212. STM NAMA,NAMB,FNAME ... 00207000
  213. STM NAMA,NAMB,FINIS+8 ... 00208000
  214. MVC FTYPE(8),=CL8'TEXT' ... 00209000
  215. MVC RDISK(8),STATESET SET PLIST FOR STATE 00210000
  216. LA 1,RDISK ... 00211000
  217. L R15,ASTATE CHECK FOR TEXT V0217 00212100
  218. BALR R14,R15 V0217 00212200
  219. BNZ LIBSERCH BRANCH IF NOT FOUND V0217 00212300
  220. B RETN FOUND, RETURN TO LOADER TO PROCESS 00214000
  221. SPACE 00215000
  222. LIBSERCH EQU * 00216000
  223. TM FLAG2,NOLIBE HAS LIBRARY SEARCH BEEN SUPPRESSED 00217000
  224. BO LDRGO YES, CHECK NEXT LDR TBL NAME V0217 00218100
  225. L CNT,LIBCNT GET NO OF LIBES 00219000
  226. LTR CNT,CNT IS NUM ZERO? 00220000
  227. BZ LDRGO YES, TRY NEXT V0217 00221100
  228. LA INDEX,LIB1NAM START WITH FIRST 00222000
  229. SPACE 00223000
  230. AGAIN LM PTR,COMP,12(INDEX) SETUP BXLE FOR CURRENT LIBE DIC 00224000
  231. SR COMP,INC POINT TO LAST ENTRY @VA01364 00224100
  232. SEARCH CL NAMB,4(0,PTR) DOES SECOND HALF MATCH? 00225000
  233. BNE NOTYET NO - TRY NEXT ENTRY 00226000
  234. CL NAMA,0(0,PTR) DOES FIRST HALF MATCH? 00227000
  235. BE FND YES - TERMINATE 00228000
  236. NOTYET BXLE PTR,INC,SEARCH KEEP LOOKING 00229000
  237. LA INDEX,24(0,INDEX) UPDATE LIBE PTR 00230000
  238. BCT CNT,AGAIN TRY ANOTHER LIBRARY 00231000
  239. B LDRGO NOT IN ANY LIBE, GET NEXT ENTR 00232000
  240. SPACE 2 00233000
  241. FND MVC FNAME(8),0(INDEX) PUT LIBE NAME IN P LIST 00234000
  242. MVC FTYPE(8),RDSET SET TYPE TO 'TXTLIB' 00235000
  243. L R1,LDRCNT+4 GET LDR TBL PTR 00237000
  244. OI 16(R1),X'04' INDICATE NAME FOUND IN TXTLIB 00238000
  245. TM 11(R7),X'80' IS THIS AN ALIAS 00239000
  246. BO FND1 YES 00240000
  247. OI OSSFLAGS,DYMBRNM NO, TELL DMSSLN TO USE STRTADDR 00241000
  248. FND1 LH PTR,8(0,PTR) GET THIRD WORD OF DICTIONARY ENTRY 00242000
  249. STH PTR,RADD ... 00243000
  250. MVI FMODE,X'00' ... 00244000
  251. LA 1,RDISK ... 00245000
  252. L R15,APOINT SET READ POINTER TO MEMBER V0217 00246100
  253. BALR R14,R15 V0217 00246200
  254. BNZ PTERR BRANCH IF ERROR V0217 00246300
  255. RETN EQU * 00248000
  256. MVC RDISK(8),RDBUFSET RESET CALL TO RDBUF 00249000
  257. BAL 2,SETLIST PUT LIST BACK FOR LDR 00250000
  258. LM 14,12,LIBSAV RESTORE REGISTERS 00251000
  259. LA 11,1 RESET REG 11 00252000
  260. BR 3 RETURN TO CALLER 00253000
  261. EJECT 00254000
  262. CLOSE LA R1,RDISK SET TO CLOSE ALL TXTLIBS P3063 00255000
  263. L R0,LIBCNT TXTLIB COUNT P3063 00256000
  264. LTR R0,R0 IS IT ZERO P3063 00257000
  265. BZ FREEWK YES, DON'T ISSUE ANY FINIS' P3063 00258000
  266. LA INDEX,LIB1NAM POINT LIBRARY LIST @VA05578 00259100
  267. MVC RDISK(8),FINISET SET FUNCTION CODE @V305665 00260100
  268. MVC RDISK+16(10),RDSET SET FTYPE AND MODE P3063 00261000
  269. FINISLP MVC FNAME(8),0(INDEX) FIRST (NEXT) NAME TO PLIST @VA05578 00262100
  270. L R15,AFINIS GET ADDRESS OF FINIS ROUTINE @V305665 00263100
  271. BALR R14,R15 AND CLOSE THE FILE @V305665 00263200
  272. LA INDEX,24(INDEX) POINT TO NEXT LIBRARY NAME @VA05578 00265100
  273. BCT R0,FINISLP CLOSE ALL LIBS P3063 00266000
  274. FREEWK LA R0,MYFREESZ FREEE DMSLIB WORK AREA P3063 00267000
  275. LR 1,12 ... 00268000
  276. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR 00269000
  277. SR 0,0 GET A ZERO 00270000
  278. ST 0,FLAGS KILL THE FLAG INDICATORS 00271000
  279. B RETURN BACK TO CALLER 00272000
  280. SPACE 00273000
  281. RDERR LA 5,RDERRN GET READ ERR MESS NUM 00274000
  282. B PANIC GO TAKE CARE OF MESSAGE 00275000
  283. PTERR LA 5,PTERRN GET POINT ERR MESS NUM 00276000
  284. PANIC MVC OUTBUF(18),FNAME PUT FILENAME IN MSG BUFFER 00277000
  285. LR R12,R5 SAVE CODE P3063 00278000
  286. LM R14,R11,APSV RESTORE REGS P3063 00279000
  287. LR R5,R12 RESTORE CODE REG P3063 00280000
  288. L R15,=V(DMSLDRD) 00281000
  289. BR R15 FATAL ERROR 00282000
  290. EJECT 00283000
  291. SPACE 2 00284000
  292. SETLIST LA 1,SPEC RESET BUFF ADDRESS 00285000
  293. ST 1,RADD ... 00286000
  294. SR 0,0 GET A ZERO 00287000
  295. STH 0,RITEM RESET ITEMNUM 00288000
  296. LA 0,10 GET 10 00289000
  297. STH 0,RNUM RESET NUM OF ITEMS 00290000
  298. LA 0,800 RESET BUFF LENGTH 00291000
  299. ST 0,RLENG ... 00292000
  300. MVI FMODE,C' ' RESET FMODE TO ' ' 00293000
  301. BR 2 BACK TO CALLER (INTERNAL) 00294000
  302. EJECT 00295000
  303. DS 0D @VA14274 00296000
  304. INCLUDE DC CL8'INCLUDE' INCLUDE COMMAND @VA14274 00296500
  305. FINISET DC CL8'FINIS' @VA14274 00297000
  306. STATESET DC CL8'STATE' 00299000
  307. RDBUFSET DC CL8'RDBUF' 00300000
  308. SPACE 00301000
  309. RDSET DC CL8'TXTLIB' 00302000
  310. DC CL2' ' 00303000
  311. DC H'0' 00304000
  312. DC A(0) 00305000
  313. DC A(800) ,00 BYTE BUFF (TEN CARDS) 00306000
  314. DC CL2'F' 00307000
  315. DC H'1' 00308000
  316. SPACE 2 00309000
  317. LTORG 00309100
  318. EJECT 00312000
  319. LIBS EQU 8 MAXIMUM NUMBER OF LIBRARIES 00313000
  320. SPACE 2 00314000
  321. MYFREE DSECT 00315000
  322. LIBCNT DS F 00316000
  323. OLDTBLCT DS F 00317000
  324. LDRCNT DS F 00318000
  325. LDRPTR DS F 00319000
  326. LIB1NAM DS 2F 00320000
  327. LIB1FNUM DS F 00321000
  328. LIB1BXLE DS 3F 00322000
  329. MORELIBS DS (LIBS*6-6)F 00323000
  330. LIBSAV DS 16F 00324000
  331. MYFREEND DS 0D 00325000
  332. SPACE 00326000
  333. MYFREESZ EQU (MYFREEND-MYFREE)/8 00327000
  334. SPACE 00328000
  335. DEC EQU 2 00329000
  336. ITEM EQU 2 00330000
  337. ADD EQU 3 00331000
  338. NAMA EQU 4 00332000
  339. NAMB EQU 5 00333000
  340. PLISTR EQU 5 00334000
  341. TEMP EQU 5 00335000
  342. CNT EQU 6 00336000
  343. PTR EQU 7 00337000
  344. INC EQU 8 00338000
  345. COMP EQU 9 00339000
  346. INDEX EQU 10 00340000
  347. SPACE 00341000
  348. NOERRN EQU 56 IO INDEX 00342000
  349. RDERRN EQU 62 IO INDEX 00343000
  350. PTERRN EQU 66 IO INDEX 00344000
  351. EJECT 00345000
  352. LDRST 00346000
  353. EJECT 00347000
  354. NUCON 00348000
  355. RDISK EQU READBUF 00349000
  356. HITEM EQU SPEC+16*4 00350000
  357. HLST EQU SPEC+17*4 00351000
  358. NUMITEM EQU SPEC+18*4 00352000
  359. NUMFREE EQU SPEC+19*4 00353000
  360. RREAD EQU NUMBYTE 00354000
  361. FSTB 00355000
  362. REGEQU 00356000
  363. EJECT 00357000
  364. END 00358000