User Tools

Site Tools


ibm:vm370-lib:cms:dmsdbd.assemble_src

DMSDBD Source

References

Source Listing

DMSDBD.ASSEMBLE.txt
  1. DBD TITLE 'DMSDBD (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * 00004000
  5. * MODULE NAME - 00005000
  6. * 00006000
  7. *| DMSDBD 00007000
  8. * 00008000
  9. * FUNCTION - 00009000
  10. * 00010000
  11. *| DMSDBD ENABLES A USER TO DUMP HIS VIRTUAL CORE FROM 00011000
  12. * WITHIN AN EXECUTING PROGRAM. 00012000
  13. * 00013000
  14. * ATTRIBUTES - 00014000
  15. * 00015000
  16. * REENTRANT, NUCLEUS RESIDENT, CALLED VIA BALR 14,15 00016000
  17. * 00017000
  18. * 00018000
  19. * ENTRY POINTS - 00019000
  20. * 00020000
  21. *| DMSDBD 00021000
  22. * 00022000
  23. * ENTRY CONDITIONS - 00023000
  24. * 00024000
  25. * REGISTER 1 POINTS TO THE FOLLOWING 'PLIST'. 00025000
  26. * 00026000
  27. * DUMPLIST DC A(GPRS) ADDRESS OF REG SAVE AREA (0-15) 00027000
  28. * DC A(LOWCORE) ADDRESS OF LOWCORE SAVE AREA 00028000
  29. * DC A(BEGIN) STARTING DUMP LOCATION (IN HEX) 00029000
  30. * DC A(END) ENDING DUMP LOCATION (IN HEX) 00030000
  31. * DC A(FREGS) A(FLOATING POINT REG. SAVE AREA) 00031000
  32. * DC A(DUMPTITLE) ADDRESS OF DUMPTITLE 00032000
  33. * 00033000
  34. * REGISTER 0 CONTAINS THE PSW LOCATION REQUESTED FOR THE 00034000
  35. * DUMP. 00035000
  36. * 00036000
  37. * EXIT CONDITIONS - 00037000
  38. * 00038000
  39. * THERE ARE NO ERROR CODES SUPPLIED BY DEBDUMP. 00039000
  40. * 00040000
  41. * CALLS TO OTHER ROUTINES - 00041000
  42. * 00042000
  43. * NONE 00043000
  44. * 00044000
  45. * EXTERNAL REFERENCES - 00045000
  46. * 00046000
  47. * NUCON - NUCLEUS AREA CONSTANTS AND VARIABLES 00047000
  48. * DBGSECT - DEBDUMP AND DEBUG STORAGE AREA 00048000
  49. * 00049000
  50. * TABLES / WORKAREAS - 00050000
  51. * 00051000
  52. * TBL1, TBL2 - TRANSLATE TABLE 00052000
  53. * 00053000
  54. * REGISTER USAGE - 00054000
  55. * 00055000
  56. * GPR0 = DISPLACEMENT OF PSW FROM A(LOWCORE) 00056000
  57. *| GPR1 = A(USER'S PARAMETER LIST) 00057000
  58. *| GPR4, GPR5, GPR6, GPR8, GPR10, GPR11 = WORK REGS. 00058000
  59. * GPR3 = A(DBGSECT) 00059000
  60. * GPR7 = V(PRINTER1) 00060000
  61. *| GPR12, GPR13 = UNUSED 00061000
  62. * GPR14 = RETURN ADDRESS 00062000
  63. *| GPR15 = BASE REGISTER 00063000
  64. * 00064000
  65. * NOTES - 00065000
  66. * 00066000
  67. * NONE 00067000
  68. * 00068000
  69. * OPERATION - 00069000
  70. * 00070000
  71. *| DMSDBD FIRST OBTAINS THE ADDRESS OF DUMPTITLE AND 00071000
  72. * SENDS THE TITLE TO THE VIRTUAL PRINTER. IT THEN 00072000
  73. * OBTAINS THE ADDRESSES OF THE GENERAL-PURPOSE REGISTER 00073000
  74. * SAVE AREA, THE FLOATING-POINT REGISTER SAVE AREA, THE 00074000
  75. * PSW REQUESTED IN REGISTER 0, THE CSW AND THE CAW. THE 00075000
  76. * CONTENTS OF THE SAVE AREAS ARE SENT TO THE VIRTUAL 00076000
  77. * PRINTER WITH APPROPRIATE HEADINGS. 00077000
  78. * 00078000
  79. * THE ADDRESS OF LOWCORE IS THEN OBTAINED. IF THIS 00079000
  80. *| STARTING LOCATION IS LESS THEN X'A0' THAT PORTION OR 00080000
  81. *| ALL OF LOWCORE FROM 0 TO X'A0' UP TO AND INCLUDING THE 00081000
  82. * ENDING DUMPING LOCATION IS SENT TO THE VIRTUAL PRINTER. 00082000
  83. * THE PRINTER IS CLOSED AFTER THE LAST LINE IS DUMPED. 00083000
  84. * CONTROL IS PASSED BACK TO THE CALLER PROGRAM. 00084000
  85. *. 00085000
  86. EJECT 00086000
  87. DMSDBD START 0 00087000
  88. USING *,R15 BASE REGISTER 00088000
  89. SPACE 1 00089000
  90. USING NUCON,R0 ACCESS NUCLEUS AREA CONSTANTS 00090000
  91. USING DBDPLIST,R1 ACCESS PLIST SYMBOLICALLY 00091000
  92. SPACE 1 00092000
  93. USING DMSDBD,R15 BASE REGISTER 00093000
  94. ST R3,CPULOG SAVE REGISTER 3 00094000
  95. L R3,=V(DBGSECT) ACCESS DEBUG STORAGE 00095000
  96. USING DBGSECT,R3 00096000
  97. STM R2,R11,ARGS SAVE THE REGISTERS 00097000
  98. MVC ARGS+4(4),CPULOG SAVE THE ORIGINAL REGISTER 3 00098000
  99. SPACE 1 00099000
  100. * 00100000
  101. * NEED PRINTER ADDRESS IN R7 00101000
  102. * 00102000
  103. L R7,ADEVTAB A(DEVICE TABLE) 00103000
  104. USING DEVTAB,R7 DESCRIPTION OF DEVICE TABLE 00104000
  105. LH R7,PRINTER1 A(PRINTER) 00105000
  106. DROP R7 00106000
  107. * 00107000
  108. NI DBGSWTCH,255-DBDEXIT CLEAR DUMP EXIT FLAG 00108000
  109. MVI LINE,C' ' BLANK DBGOUT LINE 00109000
  110. MVC LINE+1,LINE THE REST OF IT 00110000
  111. * 00111000
  112. MVI SAVE1,4 4 PRINTER LINES FOR THE TITLE 00112000
  113. L R6,AGPRS GET A(REG SAVE AREA) 00113000
  114. LA R8,CCWPRINT GET IT WHILE WE CAN 00114000
  115. ST R8,CAW 00115000
  116. L R8,ATITLE GET ADDRESS OF DUMPTITLE 00116000
  117. ST R8,CCWPRINT 00117000
  118. MVI CCWPRINT,EJECT NEW PAGE 00118000
  119. BAL R11,DUMPIO GO I/O IT 00119000
  120. MVI CCWPRINT,SP3 DOUBLE SPACE AFTER TITLE 00120000
  121. BAL R11,DUMPIO EXECUTE DUMP DBGOUT 00121000
  122. LA R8,DBGOUT PUT BUFFER ADDRESS INTO R8 00122000
  123. ST R8,CCWPRINT 00123000
  124. MVC LINE(9),=CL9' GR 0-7' 00124000
  125. MVI CCWPRINT+7,X'62' PRINT ONLY 96 BYTES 00125000
  126. MVI CCWPRINT,SP1 SINGLE SPACE 00126000
  127. BAL R10,FRMLIN 00127000
  128. MVI LINE+6,C'8' RESET LINE HEADER 00128000
  129. MVI LINE+8,C'F' 00129000
  130. MVI CCWPRINT,SP2 00130000
  131. BAL R10,FRMLIN 00131000
  132. L R6,AFPRS GET V(ADDRESS OF FPR SAVE) 00132000
  133. MVC LINE(9),=CL9' FPREGS' 00133000
  134. MVC LASTLINE(32),0 FILL IT WITH SOMETHING 00134000
  135. MVI CCWPRINT,SP2 DOUBLE SPACE 00135000
  136. BAL R10,FRMLIN 00136000
  137. EJECT 00137000
  138. * 00138000
  139. * CODE TO PRINT 'PSW' 'CSW' AND 'CAW' WITH DUMP 00139000
  140. * 00140000
  141. L R10,ALOC SET UP LOWCORE ADDRESS TEMP. 00141000
  142. MVI DBGOUT,C' ' 00142000
  143. MVC DBGOUT+1(132),DBGOUT CLEAR BUFFER 00143000
  144. MVC DBGOUT+11(4),=CL4'PSW=' 00144000
  145. AR R10,R0 R0=V(APPR. PSW UPON DEBUG ENTRY) TR 00145000
  146. UNPK DBGOUT+17(9),0(5,R10) GET PSW 00146000
  147. TR DBGOUT+17(8),TBL1-240 00147000
  148. MVI DBGOUT+25,X'40' BLANK OUT THE GARBAGE BYTE @VA09674 00147500
  149. UNPK DBGOUT+26(9),4(5,R10) 00148000
  150. TR DBGOUT+26(8),TBL1-240 00149000
  151. MVI DBGOUT+34,X'40' BLANK OUT THE GARBAGE BYTE @VA09674 00149500
  152. SR R10,R0 00150000
  153. MVC DBGOUT+37(4),=CL4'CSW=' 00151000
  154. UNPK DBGOUT+43(9),64(5,R10) GET CSW 00152000
  155. TR DBGOUT+43(8),TBL1-240 00153000
  156. MVI DBGOUT+51,X'40' BLANK OUT THE GARBAGE BYTE @VA09674 00153500
  157. UNPK DBGOUT+52(9),68(5,R10) 00154000
  158. TR DBGOUT+52(8),TBL1-240 00155000
  159. MVI DBGOUT+60,X'40' BLANK OUT THE GARBAGE BYTE @VA09674 00155500
  160. MVC DBGOUT+63(4),=CL4'CAW=' 00156000
  161. UNPK DBGOUT+69(9),72(5,R10) GET CAW 00157000
  162. TR DBGOUT+69(8),TBL1-240 00158000
  163. MVI DBGOUT+77,X'40' BLANK OUT THE GARBAGE BYTE @VA09674 00158500
  164. MVI CCWPRINT,SP2 00159000
  165. LR R10,R11 00160000
  166. BAL R11,DUMPIO 00161000
  167. LR R11,R10 00162000
  168. MVI DBGOUT,C' ' 00163000
  169. MVC DBGOUT+1(132),DBGOUT CLEAR BUFFER 00164000
  170. LA R11,1(,R11) INCREMENT LINE COUNTER FOR SP2 00165000
  171. STC R11,SAVE1 SAVE IT 00166000
  172. EJECT 00167000
  173. * 00168000
  174. * DUMP LOWCORE LOCATIONS 00169000
  175. * 00170000
  176. MVI CCWPRINT+7,X'85' RESTORE FULL L NE PRINT 00171000
  177. MVI CCWPRINT,SP1 RETURN TO SINGLE SPACING 00172000
  178. MVC LINE(9),=CL9' 000000' SET LINE IDENTIFICATION 00173000
  179. L R6,AFIRST GET FIRST DUMPING LOCATION 00174000
  180. N R6,EVENOFF 00175000
  181. ST R6,AFIRST TRUNCATED TO EVEN-HEX TENTHS 00176000
  182. L R10,ALOC START AT VIRTUAL ZERO 00177000
  183. LA R4,DMPLOW POINTER INTO DUMPING PATHS 00178000
  184. LA R5,X'A0' TEST IF GREATER THAN LOWER CORE 00179000
  185. CR R6,R5 IS FIRSTLOC LT X'A0'? 00180000
  186. BNL DOK NO, START AT FIRSTLOC P0482 00181000
  187. ST R5,AFIRST SET FIRSTLOC = X'A0' 00182000
  188. SR R5,R5 FIRSTLOC IS BWT ZERO-X'A0' 00183000
  189. DMPLOW1 CR R6,R5 00184000
  190. BNE DMPLOW2 NOT YET. 00185000
  191. DMPLOW1A AR R6,R10 GET LOCATION OF VIRTUALLY SAVED LOC 00186000
  192. L R5,AFINAL SET AFINAL FOR COMPARES P0482 00187000
  193. AH R5,=X'00C0' P0482 00188000
  194. ST R5,AFINAL P0482 00189000
  195. BR R4 00190000
  196. DMPLOW2 LA R4,LTWENTY-LZERO(R4) INCR. DUMP POINTER P0482 00191000
  197. LA R5,32(,R5) INCREMENT COMPARISION POITNER 00192000
  198. B DMPLOW1 00193000
  199. DONE L R5,AFINAL RESET FINAL ADDRESS P0482 00194000
  200. SH R5,=X'00C0' P0482 00195000
  201. ST R5,AFINAL P0482 00196000
  202. B DONE1 EXIT P0482 00197000
  203. DMPLOW EQU * DUMP SAVED LOW CORE LOCATIONS 00198000
  204. LZERO MVI LINE+7,C'0' 00199000
  205. BAL R10,FRMLIN 00200000
  206. C R6,AFINAL END OF REQUEST P0482 00201000
  207. BNL DONE BRANCH IF YES P0482 00202000
  208. LTWENTY MVI LINE+7,C'2' 00203000
  209. BAL R10,FRMLIN 00204000
  210. C R6,AFINAL END OF REQUEST P0482 00205000
  211. BNL DONE YES P0482 00206000
  212. LFORTY MVI LINE+7,C'4' 00207000
  213. BAL R10,FRMLIN 00208000
  214. C R6,AFINAL END OF REQUEST P0482 00209000
  215. BNL DONE YES P0482 00210000
  216. LSIXTY MVI LINE+7,C'6' 00211000
  217. BAL R10,FRMLIN 00212000
  218. C R6,AFINAL END OF REQUEST P0482 00213000
  219. BNL DONE YES P0482 00214000
  220. LEIGHTY MVI LINE+7,C'8' 00215000
  221. BAL R10,FRMLIN 00216000
  222. MVI CCWPRINT,SP1 00217000
  223. L R6,AFIRST GET FIRST DUMPING CORE LOCATION 00218000
  224. L R5,AFINAL RESET FINAL ADDRESS P0482 00219000
  225. SH R5,=X'00C0' P0482 00220000
  226. ST R5,AFINAL P0482 00221000
  227. NEXTLINE EQU * DUMP FROM ACTUAL CORE LOCATIONS 00222000
  228. C R6,AFINAL AT END OF DUMP AREA ? 00223000
  229. BL DOK NOPE. CONTINUE VOMITTING CORE 00224000
  230. DONE1 OI DBGSWTCH,DBDEXIT SIGNAL DUMP RETURN P0482 00225000
  231. MVI CCWPRINT,CLOSEPRT CLOSE OUT PRINTER FILE 00226000
  232. B DUMPIO EXECUTE 00227000
  233. DOK EQU * WRITEOUT CORE LOCATIONS 00228000
  234. LA R5,OUTRNGE GET RETURN ADDRESS IN CASE A @VM03020 00228100
  235. OI DBGFLAGS,DBGRECUR PROGRAM CHECK OCCURS. @VM03020 00228200
  236. CLC LASTLINE(32),0(R6) IS LAST LINE SAME AS CURRENT 00229000
  237. BNE ST6 NO 00230000
  238. NI DBGFLAGS,255-DBGRECUR CLEAR RECURSION FLAG. @VM03020 00230100
  239. LA R6,32(,R6) INCREASE LOC CTR BY 32 00231000
  240. TM DBGSWTCH,DBDDMSG PRINT DUPLICATE MESSAGE ? 00232000
  241. BO NEXTLINE NO. ALREADY PRINT IT 00233000
  242. OI DBGSWTCH,DBDDMSG SIGNAL DUPLICATE PRINTED LINE 00234000
  243. MVI LINE,C' ' CLEAR LINE BUFFER 00235000
  244. MVC LINE+1(132),LINE 00236000
  245. MVC LINE+20(L'DUPMSG),DUPMSG MOVE IN MESSAGE 00237000
  246. MVI CCWPRINT,SP1 VERIFY SINGLE SPACE 00238000
  247. BAL R11,DUMPIO 00239000
  248. IC R11,SAVE1 COUNT THE LINE 00240000
  249. LA R11,1(,R11) 00241000
  250. STC R11,SAVE1 SAVE THE LINE COUNT 00242000
  251. B NEXTLINE 00243000
  252. * LINE HEADER 00244000
  253. ST6 EQU * 00245000
  254. NI DBGFLAGS,255-DBGRECUR CLEAR RECURSION FLAG. @VM03020 00245100
  255. NI DBGSWTCH,255-DBDDMSG CLEAR DUPLICATE MSG INDICATOR 00246000
  256. MVC LASTLINE(32),0(R6) SAVE LINE TO BE PRINTR 00247000
  257. ST R6,DEC 00248000
  258. UNPK LINE+3(7),DEC+1(4) 00249000
  259. TR LINE+3(6),TBL1-240 00250000
  260. MVI LINE+9,C' ' 00251000
  261. BAL R10,FRMLIN 00252000
  262. B NEXTLINE 00253000
  263. SPACE 2 00253100
  264. OUTRNGE A R6,F4096 BUMP TO NEXT PAGE IN STORAGE @VM03020 00253200
  265. SRL R6,12 NOW ROUND TO A @VM03020 00253300
  266. SLL R6,12 FULL PAGE BOUNDARY. @VM03020 00253400
  267. ICM R5,B'1000',0(R6) IS THIS ADDRESS VALID ? @VM03020 00253500
  268. B ST6 IF HERE, ADDRESS IS GOOD. @VM03020 00253600
  269. EJECT 00254000
  270. * 00255000
  271. * PRINTER CHANNEL COMMAND INITIATOR 00256000
  272. * 00257000
  273. DUMPIO EQU * WRITEOUT CORE 00258000
  274. SIO 0(R7) GO PRINT IT 00259000
  275. BC 1,NOTOP MESSAGE IF NOT AVAILABLE @VA05073 00260100
  276. BC 2,DUMPIO REPEAT IF BUSY @VA05073 00260200
  277. TIO 0(R7) GIVE IT A CHANCE TO FINISH 00261000
  278. BC 7,*-4 00262000
  279. TM DBGSWTCH,DBDEXIT EXIT SIGNALLED ? 00263000
  280. BO GETOUT IF EQUAL YES, GET OUT. 00264000
  281. BR R11 NO, GO BACK FOR MORE. 00265000
  282. GETOUT EQU * 00266000
  283. LM R2,R11,ARGS RESTORE REGISTERS 00267000
  284. BR R14 BACK TO CALLER 00268000
  285. SPACE 1 00268100
  286. NOTOP EQU * @VA05073 00268200
  287. LR R2,R15 SAVE ADDRESSABILITY OVER SVC @VA05073 00268300
  288. LR R4,R14 SAVE CALLER'S ADDRESS @VA09007 00268350
  289. DMSERR TEXT='PRINTER (...) NOT ATTACHED',SUB=(HEX,(7)),NUM=113X00268400
  290. ,LET=S,CSECT=DBG,TYPCALL=BALR @VA09007 00268500
  291. LR R15,R2 RESTORE ADDRESSABILITY @VA05073 00268600
  292. LR R14,R4 RESTORE CALLER'S ADDRESS @VA09007 00268650
  293. B GETOUT EXIT @VA05073 00268700
  294. EJECT 00269000
  295. * 00270000
  296. * CORE LOCATION PRINTOUT IN "HEX= 00271000
  297. * 00272000
  298. FRMLIN DS 0H 00273000
  299. LA R4,LINE1 00274000
  300. LA R5,LINE1A 00275000
  301. LA R2,2 00276000
  302. * TRANSLATE LINE DATE 00277000
  303. A1 LA R11,4 00278000
  304. A2 L R9,0(,R6) 00279000
  305. ST R9,DEC 00280000
  306. LA R6,4(,R6) 00281000
  307. UNPK 0(9,R4),DEC(5) 00282000
  308. TR 0(8,R4),TBL1-240 00283000
  309. MVC 8(2,R4),BLANKS 00284000
  310. LA R4,10(,R4) 00285000
  311. ST R9,0(,R5) 00286000
  312. TR 0(4,R5),TBL2 00287000
  313. LA R5,4(,R5) 00288000
  314. BCT R11,A2 00289000
  315. MVC 0(4,R4),BLANKS 00290000
  316. LA R4,4(,R4) 00291000
  317. BCT R2,A1 00292000
  318. MVI LINE1B,C'*' SET UP PRETTY INTERPRETATIONS 00293000
  319. MVI LINE1C,C'*' 00294000
  320. A4 BAL R11,DUMPIO 00295000
  321. IC R11,SAVE1 INCREMENT PRINT LINE COUNTER 00296000
  322. LA R11,1(,R11) 00297000
  323. STC R11,SAVE1 SAVE IT 00298000
  324. CLI SAVE1,55 MAX OF 55 LINES TO PAGE 00299000
  325. BCR 4,R10 NOPE. 00300000
  326. MVI CCWPRINT,EJECT YES. GET TO NEW PAGE 00301000
  327. BAL R11,DUMPIO 00302000
  328. MVI SAVE1,0 RESET LINE COUNTER 00303000
  329. MVI CCWPRINT,SP1 RESET CCW 00304000
  330. BR R10 00305000
  331. * 00306000
  332. EJECT 00307000
  333. * 00308000
  334. * CONSTANTS 00309000
  335. * 00310000
  336. SPACE 1 00311000
  337. DS 0F 00312000
  338. F4096 DC F'4096' FULL PAGE CONSTANT @VM03020 00312100
  339. EVENOFF DC X'FFFFFFE0' HIGHER UPPER 00313000
  340. SP1 EQU X'09' PRINT SPACE ONE LINE 00314000
  341. SP2 EQU X'11' PRINT SPACE 2 LINES 00315000
  342. SP3 EQU X'19' PRINT SPACE 3 LINES 00316000
  343. EJECT EQU X'8B' EJECT PAGE 00317000
  344. CLOSEPRT EQU X'C0' ILLEGAL CCW TO CLOSE PRINTER 00318000
  345. BLANKS DC 4X'40' 00319000
  346. DUPMSG DC C'*** DUPLICATE CORE LOCATIONS ***' 00320000
  347. TBL1 DC C'0123456789ABCDEF' 00321000
  348. TBL2 DS 0X 00322000
  349. DC 64C'.' 00323000
  350. DC C' ' 00324000
  351. DC 15C'.' 00325000
  352. DC C'&&' 00326000
  353. DC 10C'.' 00327000
  354. DC C'$*.;.-/' 00328000
  355. DC 9C'.' 00329000
  356. DC C',%' 00330000
  357. DC 14C'.' 00331000
  358. DC C' ' 00332000
  359. DC 4C'.' 00333000
  360. DC C'ABCDEFGHI' 00334000
  361. DC 7C'.' 00335000
  362. DC C'JKLMNOPQR' 00336000
  363. DC 8C'.' 00337000
  364. DC C'STUVWXYZ' 00338000
  365. DC 23C'.' 00339000
  366. DC C'ABCDEFGHI' 00340000
  367. DC 7C'.' 00341000
  368. DC C'JKLMNOPQR' 00342000
  369. DC 8C'.' 00343000
  370. DC C'STUVWXYZ' 00344000
  371. DC 6C'.' 00345000
  372. DC C'0123456789' 00346000
  373. DC 6C'.' 00347000
  374. LTORG 00348000
  375. EJECT 00349000
  376. DBDPLIST DSECT 00350000
  377. AGPRS DS A A(REG. 0-15 SAVE AREA) 00351000
  378. ALOC DS A A(LOWCORE SAVE AREA) 00352000
  379. AFIRST DS A A(START DUMP) 00353000
  380. AFINAL DS A A(END OF DUMP) 00354000
  381. AFPRS DS A A(FLOATING POINT REG. SAVE AREA) 00355000
  382. ATITLE DS A A(DUMP TITLE) 00356000
  383. EJECT 00357000
  384. DBGSECT 00358000
  385. NUCON 00359000
  386. REGEQU 00360000
  387. EQUATES 00361000
  388. DEVTAB 00362000
  389. END 00363000
ibm/vm370-lib/cms/dmsdbd.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator