User Tools

Site Tools


ibm:vm370-lib:cms:dmsgnd.assemble_src

DMSGND Source

References

Source Listing

DMSGND.ASSEMBLE.txt
  1. GND TITLE 'DMSGND (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. * MODULE NAME - 00003000
  4. * 00004000
  5. * DMSGND (GENDIRT) 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * TO GENERATE AN AUXILLARY SYSTEM STATUS TABLE 00009000
  10. * 00010000
  11. * ATTRIBUTES - 00011000
  12. * 00012000
  13. * TRANSIENT, CALLED VIA SVC 00013000
  14. * NOTE: GENDIRT MUST BE GENMOD'D WITH THE SYSTEM OPTION 00013100
  15. * 00014000
  16. * ENTRY POINTS - 00015000
  17. * 00016000
  18. *| DMSGND - GENERATE AN AUXILLARY DIRECTORY 00017000
  19. * 00018000
  20. * ENTRY CONDITIONS - 00019000
  21. * 00020000
  22. *| GPR 1 = ADDRESS OF A PARAMETER LIST WITH THE FOLLOWING FORMAT 00021000
  23. *| 00022000
  24. *| DC CL8'GENDIRT' 00023000
  25. *| DC CL8'DIRTNAME' 00024000
  26. * DC CL8'TARGET MODE' OPTIONAL PARAMETER 00024500
  27. *| DC 8X'FF' 00025000
  28. *| 00026000
  29. *| THE TEXT FOR DIRTNAME MUST HAVE BEEN PREVIOUSLY LOADED 00027000
  30. * 00028000
  31. * EXIT CONDITIONS - 00029000
  32. * 00030000
  33. *| NORMAL - 00031000
  34. *| GPR 15 = 0 - THE AUXILLARY DIRECTORY IS COMPLETE 00032000
  35. *| 00033000
  36. *| ERROR - 00034000
  37. *| GPR 15 = 4 - ONE OR MORE MODULES COULD NOT BE FOUND 00035000
  38. *| GPR 15 = 24 - THE INPUT PARAMETER LIST IS INVALID 00036000
  39. *| GPR 15 = 40 - DIRECTORY NAME NOT FOUND IN LOADER TABLES 00037000
  40. * 00038000
  41. * CALLS TO OTHER ROUTINES - 00039000
  42. * 00040000
  43. *| DMSSTT - TO FIND THE FST ENTRY FOR A FILE 00041000
  44. *| DMSERR - TO SEND AN ERROR MESSAGE 00042000
  45. * 00043000
  46. * EXTERNAL REFERENCES - 00044000
  47. * 00045000
  48. *| NONE 00046000
  49. * 00047000
  50. * TABLES / WORKAREAS - 00048000
  51. * 00049000
  52. *| NONE 00050000
  53. * 00051000
  54. * REGISTER USAGE - 00052000
  55. * 00053000
  56. *| GPR 0 = PARAMETER REGISTER 00054000
  57. *| GPR 1 = PARAMETER LIST BASE REGISTER 00055000
  58. *| GPR 2 = LOADER TABLE ENTRY BASE REGISTER AND 00056000
  59. *| FST BASE REGISTER 00057000
  60. *| GPR 3 = COUNT OF LOADER TABLE ENTRIES AND 00058000
  61. *| CURRENT DIRECTORY ENTRY POINTER 00059000
  62. *| GPR 4 = LOADER TABLE ENTRY SIZE AND 00060000
  63. *| FST ENTRY SIZE 00061000
  64. *| GPR 5 = ADDRESS OF LAST ENTRY IN AUXILLARY DIRECTORY 00062000
  65. *| GPR 6 - GPR 10 = NOT USED 00063000
  66. *| GPR 11 = RETURN CODE 00064000
  67. *| GPR 12 = PROGRAM BASE REGISTER 00065000
  68. *| GPR 13 = NOT USED 00066000
  69. *| GPR 14 = RETURN ADDRESS 00067000
  70. *| GPR 15 = RETURN CODE 00068000
  71. * 00069000
  72. * NOTES - 00070000
  73. * 00071000
  74. * NONE 00072000
  75. * 00073000
  76. * OPERATION - 00074000
  77. * 00075000
  78. *| DMSGND FIRST VERIFIES THAT THE INPUT PARAMETER LIST IS VALID. 00076000
  79. *| IT THEN SERACHES THE LOADER TABLES FOR THE SPECIFIED DIRECTORY 00077000
  80. *| NAME. AFTER LOCATING THE DIRECTORY, DMSGND CALLS 'STATE' TO 00078000
  81. *| LOCATE THE FST ENTRY FOR EACH NAME IN THE DIRECTORY. EACH 00079000
  82. *| ENTRY IS COMPLETED BY MOVING THE LAST 24 BYTES OF THE FST DATA 00080000
  83. * TO THE DIRECTORY ENTRY. IF THE TARGET MODE WAS SPECIFIED 00081000
  84. * ON THE COMMAND, THAT MODE IS PUT INTO THE FSTMODE FIELD. 00081500
  85. * OTHERWISE THE FSTMODE FIELD IS SET TO 'S' TO INDICATE THE 00082000
  86. * SYSTEM DISK. 00082500
  87. * IF ONE OR MORE FST ENTRIES IS NOT FOUND, THE DATA AREA 00083000
  88. * IS ZEROED AND THE RETURN CODE SET TO 4. 00083500
  89. * WHEN ALL THE ENTRIES IN THE DIRECTORY HAVE BEEN PROCESSED 00084000
  90. * DMSGND RETURNS TO THE CALLER. 00084500
  91. *. 00085000
  92. EJECT 00086000
  93. DMSGND START X'E000' GENERATE AN AUXILIARY DIRECTORY 00087000
  94. ENTRY GENDIRT 00088000
  95. GENDIRT EQU * 00089000
  96. USING NUCON,R0 00090000
  97. USING PSECT,R9 V0742 00091000
  98. USING DMSGND,R12 00092000
  99. LR R9,R1 SAVE INPUT PLIST V0742 00092100
  100. SR R11,R11 ZERO THE RETURN CODE 00093000
  101. CLI DIRNAME,X'FF' IS THE DIRECTORY NAME SPECIFIED ? 00094000
  102. BE GNDERR1 NO, CANNOT CONTINUE WITHOUT A NAME 00095000
  103. CLI DIRMODE,X'FF' TARGET MODE SPECIFIED? V0742 00095100
  104. BE DIRT2 NO V0742 00095200
  105. LA R2,DIRMODE LOAD ERROR 2 REGISTER @VA00981 00095240
  106. CLI DIRMODE+1,X'40' MODE MORE THAN 1 CHARA.? @VA00981 00095280
  107. BNE GENERR2A YES, ERROR @VA00981 00095320
  108. CLI DIRMODE,C'A' MODE MUST BE A-Z HRC002DS 00095380
  109. BL GENERR2A HRC002DS 00095400
  110. CLI DIRMODE,C'I' HRC002DS 00095420
  111. BNH CKEND HRC002DS 00095440
  112. CLI DIRMODE,C'J' MODE MUST BE A-Z HRC002DS 00095460
  113. BL GENERR2A HRC002DS 00095480
  114. CLI DIRMODE,C'R' HRC002DS 00095500
  115. BNH CKEND HRC002DS 00095520
  116. CLI DIRMODE,C'S' MODE MUST BE A-Z HRC002DS 00095540
  117. BL GENERR2A HRC002DS 00095560
  118. CLI DIRMODE,C'Z' HRC002DS 00095580
  119. BH GENERR2A HRC002DS 00095600
  120. CKEND EQU * @VA00981 00095800
  121. CLI PARMEND,X'FF' IS THIS THE END OF THE PARAMETER LIST ? 00096000
  122. BNE GNDERR2 NO, THE PARAMETER LIST IS INVALID 00097000
  123. DIRT2 EQU * V0742 00097100
  124. LH R3,TBENT LOAD THE NUMBER OF LOADER TABLE ENTRIES 00098000
  125. LTR R3,R3 HAVE ANY MODULES BEEN LOADED ? 00099000
  126. BZ GNDERR3 NO, ERROR IF DIRECTORY CANNOT BE FOUND 00100000
  127. L R2,ALDRTBLS POINT TO THE TOP OF THE LOADER TABLES 00101000
  128. LA R2,0(,R2) ZERO THE HIGH ORDER BYTE OF THE ADDRESS 00102000
  129. USING LDRTSECT,R2 00103000
  130. LA R4,LDRTSIZE GET THE SIZE OF EACH LOADER TABLE ENTRY 00104000
  131. DIRLOOP SR R2,R4 POINT TO THE NEXT LOADER TABLE ENTRY 00105000
  132. CLC LDRTNAME,DIRNAME IS THIS THE ENTRY FOR THE DIRECTORY 00106000
  133. BE GNDNAME YES, FILL IN THE FST ENTRIES 00107000
  134. BCT R3,DIRLOOP NO, TRY THE NEXT ENTRY IN THE TABLE 00108000
  135. B GNDERR3 ERROR IF DIRECTORY HAS NOT BEEN LOADED 00109000
  136. SPACE 00110000
  137. GNDNAME L R3,LDRTADDR LOAD THE AUXILIARY DIRECTORY ADDRESS 00111000
  138. L R4,0(,R3) LOAD THE FST ENTRY SIZE 00112000
  139. L R5,4(,R3) LOAD THE AUXILIARY DIRECTORY SIZE 00113000
  140. LA R5,0(R5,R3) POINT TO THE LAST DIRECTORY ENTRY 00114000
  141. SR R5,R4 ... 00115000
  142. LA R3,8(,R3) POINT TO THE FIRST DIRECTORY ENTRY 00116000
  143. USING FSTSECT,R3 00117000
  144. FSTLOOP MVC STATENME,FSTDATA MOVE FILE NAME & TYPE TO STATE PLIST 00118000
  145. LA R1,STATELST POINT TO THE PLIST FOR THE STATE FUNCTION 00119000
  146. L R15,ASTATE LOCATE FIRST ENTRY FOR FILE @V305066 00120000
  147. LR R6,R14 SAVE RETURN REGISTER FOR NOW.. @VM03059 00120050
  148. BALR R14,R15 ... @V305066 00120100
  149. LR R14,R6 RESTORE RETURN REGISTER AND @VM03059 00120150
  150. BNZ GNDERR4 SEND WARNING IF FILE NOT FOUND @V305066 00120200
  151. L R2,STATEFST LOAD THE POINTER TO THE FST ENTRY 00122000
  152. USING FSTD,R2 00123000
  153. MVC FSTDATA,FSTDATEW COPY THE DATA TO THE DIRECTORY ENTRY 00124000
  154. MVI FSTMODE,C'S' SET MODE TO 'S' V0742 00124100
  155. CLI DIRMODE,X'FF' WAS A TARGET MODE SPECIFIED? V0742 00124200
  156. BE FSTNEXT NO, BRANCH AROUND V0742 00124300
  157. MVC FSTMODE(1),DIRMODE YES, USE THAT MODE V0742 00124400
  158. FSTNEXT BXLE R3,R4,FSTLOOP POINT TO NEXT DIRECTORY ENTRY AND BRANCH 00125000
  159. LR R15,R11 LOAD THE RETURN CODE 00126000
  160. BR R14 RETURN TO THE CALLER 00127000
  161. EJECT 00128000
  162. GNDERR1 DMSERR NUM=22,LET=E,TEXT='NO DIRECTORY NAME SPECIFIED' 00129000
  163. LA R15,24 LOAD THE RETURN CODE 00130000
  164. BR R14 RETURN TO THE CALLER 00131000
  165. SPACE 00132000
  166. GNDERR2 LA R2,PARMEND POINT TO THE INVALID PARAMETER 00133000
  167. GENERR2A EQU * @VA00981 00133500
  168. DMSERR NUM=70,LET=E,TEXT='INVALID PARAMETER ''........''',SUB=X00134000
  169. (CHARA,(2)) 00135000
  170. LA R15,24 LOAD THE RETURN CODE 00136000
  171. BR R14 RETURN TO THE CALLER 00137000
  172. SPACE 00138000
  173. GNDERR3 LA R2,DIRNAME POINT TO THE DIRECTORY NAME 00139000
  174. DMSERR NUM=21,LET=E,TEXT='ENTRY POINT ''........'' NOT FOUND 'X00140000
  175. ,SUB=(CHARA,(2)) 00141000
  176. LA R15,40 LOAD THE RETURN CODE 00142000
  177. BR R14 RETURN TO THE CALLER 00143000
  178. SPACE 00144000
  179. GNDERR4 LA R2,FSTDATA POINT TO THE FILE NAME 00145000
  180. DMSERR NUM=2,LET=W,TEXT='FILE ''.................'' NOT FOUND'X00146000
  181. ,SUB=(CHAR8A,(2)) 00147000
  182. XC FSTDATA,FSTDATA ZERO THE DIRECTORY DATA 00148000
  183. LA R11,4 LOAD THE RETURN CODE 00149000
  184. B FSTNEXT CONTINUE BUILDING THE DIRECTORY 00150000
  185. EJECT 00151000
  186. STATELST DS 0D 00152000
  187. DC CL8'STATE' 00153000
  188. STATENME DC CL16' ' 00154000
  189. DC CL4'A1' 00155000
  190. STATEFST DC AL4(0) 00156000
  191. SPACE 00157000
  192. LTORG 00158000
  193. SPACE 3 00159000
  194. PSECT DSECT 00160000
  195. DS CL8 00161000
  196. DIRNAME DS CL8 00162000
  197. DIRMODE DS CL8 V0742 00162100
  198. PARMEND DS CL8 00163000
  199. SPACE 2 00164000
  200. LDRTSECT DSECT 00165000
  201. LDRTNAME DS CL8 00166000
  202. DS AL4 00167000
  203. LDRTADDR DS AL4 00168000
  204. DS XL4 00169000
  205. LDRTSIZE EQU *-LDRTSECT 00170000
  206. SPACE 2 00171000
  207. FSTSECT DSECT 00172000
  208. DS CL16 00173000
  209. FSTDATA DS CL24 00174000
  210. ORG FSTSECT+X'18' V0742 00174100
  211. FSTMODE DS CL2 V0742 00174200
  212. EJECT 00175000
  213. FSTD 00176000
  214. NUCON 00177000
  215. REGEQU 00178000
  216. END 00179000
ibm/vm370-lib/cms/dmsgnd.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator