User Tools

Site Tools


ibm:vm370-lib:cp:dmkped.assemble_src

DMKPED Source

References

Source Listing

DMKPED.ASSEMBLE.txt
  1. PED TITLE 'DMKPED VM/370 VERSION 6, LEVEL 0' 00001000
  2. *. 00002000
  3. * MODULE NAME - 00003000
  4. * DMKPED 00004000
  5. * 00005000
  6. * FUNCTION - 00006000
  7. * 00007000
  8. * TO PRODUCE OUTPUT FOR THE PER TRACE FACILITY 00008000
  9. * 00009000
  10. * ATTRIBUTES - 00010000
  11. * 00011000
  12. * RE-ENTRANT, PAGEABLE, CALLED VIA SVC 00012000
  13. * 00013000
  14. * ENTRY POINT - 00014000
  15. * 00015000
  16. * DMKPEDAL 00016000
  17. * 00017000
  18. * ENTRY CONDITIONS - 00018000
  19. * 00019000
  20. * GPR 11 = VMBLOK ADDRESS 00020000
  21. * GPR 12 = ADDRESS OF DMKPEDAL 00021000
  22. * GPR 13 = ADDRESS OF STANDARD SAVEAREA 00022000
  23. * PEXBLOKS TO BE CHECKED HAVE THE SUCCESS BIT ON. 00023000
  24. * 00024000
  25. * EXIT CONDITIONS - 00025000
  26. * 00026000
  27. * SVC 12, GPRS UNCHANGED 00027000
  28. * 00028000
  29. * CALLS TO OTHER ROUTINES - 00029000
  30. * 00030000
  31. * DMKCFMBK - TO ENTER CONSOLE FUNCTION MODE 00031000
  32. * DMKCFMEN - TO EXECUTE A COMMAND BUFFER 00032000
  33. * DMKFREE - TO OBTAIN FREE STORAGE 00033000
  34. * DMKFRET - TO RELEASE FREE STORAGE 00034000
  35. * DMKQCNWT - TO WRITE A LINE TO THE CONSOLE 00035000
  36. * DMKVSPRT - TO PRINT A LINE ON THE VIRTUAL PRINTER 00036000
  37. * 00037000
  38. * TABLES / WORK AREAS 00038000
  39. * 00039000
  40. * PERBLOK, PEXBLOK, SAVEAREA, VMBLOK, PSA 00040000
  41. * 00041000
  42. * OPERATION - 00042000
  43. * 00043000
  44. * 1. DETERMINE WHAT WILL HAVE TO BE DISPLAYED AND HANDLE STEP 00044000
  45. * 2. SET DISPLAY ROUTINE = DMKVSPRT FOR FIRST PASS 00045000
  46. * 3. IF NEEDED, DISPLAY PAGE TRACE INFO. 00046000
  47. * 4. IF DON'T NEED TO DISPLAY ISN, GOTO STEP 7 00047000
  48. * 5. SET UP SEQUENCE INDICATOR 00048000
  49. * 6. DISPLAY INSTRUCTION, CONDITION CODE 00049000
  50. * 7. IF SUCCESSFUL STORE, DISPLAY *STORE* 00050000
  51. * 8. IF WANTED, DISPLAY ALTERED GREGS 00051000
  52. * 9. IF WANTED, DISPLAY TRACEBACK TABLE 00052000
  53. * 10. DISPLAY ANY DATA STOPS 00053000
  54. * 11. SET DISPLAY ROUTINE = DMKQCNWT AND GO TO STEP 3 FOR SECOND PAS 00054000
  55. * 12. TURN OFF ALL SUCCESS BITS 00055000
  56. * 13. UNSTACK AND EXECUTE COMMAND BUFFERS. 00056000
  57. * 14. CALL DMKCFMBK IF NECESSARY 00057000
  58. * 15. EXIT 00058000
  59. * 00059000
  60. * USAGE OF SAVEWORK AREA 00060000
  61. * 00061000
  62. * SAVEWRK1 BYTE 0 FLAGS 00062000
  63. * X'80' DATA TRAPS PRESENT 00063000
  64. * X'40' ATTN HIT DURING OUTPUT 00064000
  65. * X'20' PASS 2 00065000
  66. * X'10' CALL DMKCFMBK 00066000
  67. * BYTE 1 USED TO SAVE VMRSTAT 00067000
  68. * BYTES 2-3 UNUSED 00068000
  69. * 00069000
  70. * SAVEWRK2 BYTE 0 FLAGS (SAVEWRK2 IS DISPLAY INFO FOR PRINTER) 00070000
  71. * X'80' DISPLAY PAGETRACE INFO 00071000
  72. * X'40' DISPLAY TRACEBACK TABLE 00072000
  73. * X'20' DISPLAY INSTRUCTION 00073000
  74. * X'10' DISPLAY *STORE* 00074000
  75. * BYTE 1 UNUSED 00075000
  76. * BYTES 2-3 REGISTER FLAGS, IF CORRESPONDING BIT IS 00076000
  77. * ON DISPLAY THE GIVEN REGISTER. 00077000
  78. * 00078000
  79. * 00079000
  80. * SAVEWRK3 SAME AS SAVEWRK2 BUT FOR TERMINAL OUTPUT 00080000
  81. * 00081000
  82. * SAVEWRK4 SCRATCH 00082000
  83. * 00083000
  84. * SAVEWRK5 POINTER TO STACK OF COMMAND BUFFERS TO EXECUTE 00084000
  85. * 00085000
  86. * SAVEWRK6 ADDRESS OF OUTPUT ROUTINE, DMKVSPRT DURING PASS 1 00086000
  87. * AND DMKQCNWT DURING PASS 2 00087000
  88. * 00088000
  89. * SAVEWRK7-SAVEWRK8 SCRATCH 00089000
  90. * 00090000
  91. * SAVEWRK9 UNUSED 00091000
  92. *. 00092000
  93. EJECT , 00093000
  94. COPY OPTIONS 00094000
  95. COPY LOCAL 00095000
  96. EJECT , 00096000
  97. DMKPED CSECT , 00097000
  98. SPACE 1 00098000
  99. USING SAVEAREA,R13 00099000
  100. USING VMBLOK,R11 00100000
  101. USING PERBLOK,R8 00101000
  102. USING PEXBLOK,R7 00102000
  103. USING PSA,R0 00103000
  104. SPACE 1 00104000
  105. DC CL8'DMKPED' 00105000
  106. SPACE 1 00106000
  107. EXTRN DMKCFMBK,DMKNEMOP,DMKTMRPT,DMKCFMEN 00107000
  108. EJECT , 00108000
  109. *---------------------------------------------------------------------* 00109000
  110. * ENTRY FOR DISPLAY OF INTERUPT * 00110000
  111. *---------------------------------------------------------------------* 00111000
  112. SPACE 1 00112000
  113. DMKPEDAL RELOC , 00113000
  114. L R8,VMPERCTL LOAD PTR TO PERBLOK 00114000
  115. LTR R8,R8 MAKE SURE IT IS THERE 00115000
  116. BZ PED3 NO? WHAT ARE WE DOING HERE? 00116000
  117. CLC PERCHAIN(4),ZEROES ANY PERBLOKS? 00117000
  118. BZ PED4 NO? NEVER SHOULD HAVE GOTTEN HERE 00118000
  119. XC SAVEWRK1(4),SAVEWRK1 CLEAR SAVEWRK1 00119000
  120. XC SAVEWRK2(8),SAVEWRK2 CLEAR DISPLAY FLAGS 00120000
  121. XC SAVEWRK5(4),SAVEWRK5 AND COMMAND STACK 00121000
  122. MVC SAVEWRK1+1(1),VMRSTAT SAVE VMRSTAT FOR EXIT 00122000
  123. OI VMRSTAT,VMCFWAIT PUT INTO CF WAIT 00123000
  124. SPACE 1 00124000
  125. *---------------------------------------------------------------------* 00125000
  126. * DETERMINE WHAT WILL HAVE TO BE DISPLAYED * 00126000
  127. *---------------------------------------------------------------------* 00127000
  128. LA R7,PERCHAIN-(PEXNEXT-PEXBLOK) POINT TO CHAIN 00128000
  129. PEXLOOP L R7,PEXNEXT POINT TO FIST/NEXT BLOCK 00129000
  130. LTR R7,R7 ANY MORE? 00130000
  131. BZ PASS1 NO, GO SET UP FOR PASS 1 00131000
  132. TM PEXFLAGO,PEXSUCC SUCCESSFUL? 00132000
  133. BZ PEXLOOP NO, TRY NEXT ONE 00133000
  134. XC SAVEWRK4+2(2),SAVEWRK4+2 CLEAR GREG FLAGS 00134000
  135. CLI PEXFLAGT,PEXPGT PAGE TRACE? 00135000
  136. BNE NOTPGT NO, SKIP PGT STUFF 00136000
  137. MVI SAVEWRK4,X'80' INDICATE PAGETRACE OUTPUT 00137000
  138. B CHKCMD AND GO CHECK FOR STACKED COMMAND 00138000
  139. NOTPGT MVI SAVEWRK4,X'20' ALL BUT PGT DISPLAY ISN 00139000
  140. CLI PEXFLAGT,PEXBRTB TRRACE BACK? 00140000
  141. BNE NOTTBK NO, SKIP IT THEN 00141000
  142. OI SAVEWRK4,X'40' INDICATE TRACEBACK OUTPUT 00142000
  143. B CHKCMD AND GO CHECK FOR COMMAND 00143000
  144. NOTTBK CLI PEXFLAGT,PEXGPR GREG? 00144000
  145. BNE NOTGREG NO, SKIP IT 00145000
  146. MVC SAVEWRK4+2(2),PEXGSUC MOVE IN DISPLAY FLAGS 00146000
  147. B CHKCMD AND GO CHECK FOR COMMAND 00147000
  148. NOTGREG TM PEXFLAGT,PEXST STORE EVENT? 00148000
  149. BZ NOTST NO, SKIP IT 00149000
  150. OI SAVEWRK4,X'10' SET TO DISPLAY *STORE* 00150000
  151. NOTST CLI PEXDLEN,0 IS IT A DATA STOP? 00151000
  152. BE CHKCMD NO, CHECK FOR COMMAND 00152000
  153. OI SAVEWRK1,X'80' INDICATE DATA TRAPS PRESENT 00153000
  154. CHKCMD L R2,PEXCMND LOAD PTR TO POSSIBLE COMMAND 00154000
  155. LTR R2,R2 ANY? 00155000
  156. BZ CHKOPTS NO, GO CHECK OPTIONS 00156000
  157. LA R0,BUFSIZE LOAD SIZE OF BUFFER 00157000
  158. CALL DMKFREE GET A CON BUF 00158000
  159. XC 0(BUFSIZE*8,R1),0(R1) CLEAR IT OUT 00159000
  160. IC R3,0(,R2) INSERT LENGTH 00160000
  161. BCTR R3,0 MINUS 1 00161000
  162. EX R3,MVCBUF MOVE INTO BUFFER 00162000
  163. MVC BUFCNT+3-BUFFER(1,R1),0(R2) MOVE IN COUNT 00163000
  164. L R2,SAVEWRK5 LOAD POINTER 00164000
  165. LTR R2,R2 ANY STACKED? 00165000
  166. BNZ SRCHND NO, GO FIND END 00166000
  167. ST R1,SAVEWRK5 SAVE PTR 00167000
  168. B CHKOPTS AND GO CHECK OPTIONS 00168000
  169. SRCHND CLC BUFNXT-BUFFER(4,R2),ZEROES END? 00169000
  170. BE SUCCIS YES, STORE PTR 00170000
  171. L R2,BUFNXT-BUFFER(,R2) LOAD FWD PTR 00171000
  172. B SRCHND AND LOOP 00172000
  173. SUCCIS ST R1,BUFNXT-BUFFER(,R2) SET POINTER 00173000
  174. CHKOPTS TM PEXFLAGO,PEXPRINT PRINTER OUTPUT? 00174000
  175. BZ *+10 NO, SKIP OR 00175000
  176. OC SAVEWRK2(4),SAVEWRK4 OR IN FLAGS 00176000
  177. TM PEXFLAGO,PEXTERM TERMINAL OUTPUT? 00177000
  178. BZ *+10 NO, SKIP OR 00178000
  179. OC SAVEWRK3(4),SAVEWRK4 OR IN FLAGS 00179000
  180. TM PEXFLAGO,PEXRUN RUN? 00180000
  181. BO PEXLOOP YES, NO NEED TO CHECK STEP 00181000
  182. L R1,PEXSTEPN LOAD STEP COUNTER 00182000
  183. BCT R1,SAVESTEP CHECK COUNTER 00183000
  184. MVC PEXSTEPN(4),PEXSTEP RESET STEP COUNTER 00184000
  185. OI SAVEWRK1,X'10' SET TO BREAK 00185000
  186. B PEXLOOP AND CHECK NEXT ONE 00186000
  187. SAVESTEP ST R1,PEXSTEPN SAVE STEP 00187000
  188. B PEXLOOP AND CONTINUE LOOP 00188000
  189. SPACE 1 00189000
  190. *---------------------------------------------------------------------* 00190000
  191. * SET UP FOR DISPLAY LOOP * 00191000
  192. *---------------------------------------------------------------------* 00192000
  193. PASS1 MVC SAVEWRK6(4),=V(DMKVSPRT) SET INITIAL ROUTINE 00193000
  194. SPACE 1 00194000
  195. *---------------------------------------------------------------------* 00195000
  196. * OUTPUT PAGE TRACE INFO * 00196000
  197. *---------------------------------------------------------------------* 00197000
  198. PAGEOUT TM SAVEWRK2,X'80' PRODUCE PAGE TRACE OUTPUT? 00198000
  199. BZ ISNOUT NO, SEE IF SHOULD OUTPUT ISN 00199000
  200. MVC PERBUF(6),=C'*PGT* ' MOVE IN MARKER 00200000
  201. CALL DMKTMRPT GO GET CURRENT VIRT TIME 00201000
  202. STM R0,R1,SAVEWRK7 SAVE IT 00202000
  203. UNPK PERBUF+6(7),PERADDR+1(4) UNPACK ADDRESS 00203000
  204. UNPK PERBUF+13(9),SAVEWRK7(5) UNPACK FIRST HALF 00204000
  205. UNPK PERBUF+21(9),SAVEWRK8(5) UNPACK SECOND HALF 00205000
  206. TR PERBUF+6(23),HEXBENT TRANSLATE TO EBCDIC 00206000
  207. MVI PERBUF+12,C' ' MOVE IN BLANK 00207000
  208. LA R0,29 LOAD LENGTH TO OUTPUT 00208000
  209. BAL R4,DISPLAY AND GO DISPLAY IT 00209000
  210. SPACE 1 00210000
  211. *---------------------------------------------------------------------* 00211000
  212. * CHECK SEQUENCE INDICATOR * 00212000
  213. *---------------------------------------------------------------------* 00213000
  214. ISNOUT TM SAVEWRK2,X'20' DISPLAY INSTRUCTION? 00214000
  215. BZ PASS2 NO, NOTHING ELSE EITHER THEN 00215000
  216. LA R9,PERBUF+1 POINT TO FIRST AVAIL SLOT 00216000
  217. MVI PERBUF,C' ' SET FIRST CHAR TO BLANK 00217000
  218. MVC PERBUF+1(79),PERBUF CLEAR REST TO BLANKS 00218000
  219. LA R2,PERSEQP POINT TO SEQUENCE FIELD 00219000
  220. TM SAVEWRK1,X'20' IS IT PASS 1? 00220000
  221. BZ *+8 YES, WE HAVE PROPER SEQ FIELD 00221000
  222. LA R2,PERSEQT POINT TO PROPER SEQUENCE INDICATOR 00222000
  223. CLC PERADDR+1(3),1(R2) DO WE NEED A SEQUENCE INDICATOR? 00223000
  224. BE *+8 NO, SKIP MOVING IT IN 00224000
  225. MVI PERBUF,C'>' MOVE IN SEQUENCE INDICATOR 00225000
  226. LA R1,4 ASSUME RX/RS/S 00226000
  227. CLI PEREX,X'44' WAS IT AN EX? 00227000
  228. BE CALCSEQ YES, HAVE PROPER LENGTH 00228000
  229. TM PERINST,X'C0' CHECK FIRST TWO BITS 00229000
  230. BM CALCSEQ IS OK, GO GET IT 00230000
  231. LA R1,2 ASSUME RR 00231000
  232. BZ CALCSEQ AND IF IS, SKIP LA 00232000
  233. LA R1,6 LOAD LENGTH FOR SS 00233000
  234. CALCSEQ AL R1,PERADDR ADD TO EVENT ADDR 00234000
  235. ST R1,0(,R2) AND STORE BACK 00235000
  236. SPACE 1 00236000
  237. *---------------------------------------------------------------------* 00237000
  238. * DISPLAY INSTRUCTION * 00238000
  239. *---------------------------------------------------------------------* 00239000
  240. UNPK 0(7,R9),PERADDR+1(4) UNPACK EVENT ADDRESS 00240000
  241. TR 0(6,R9),HEXBENT TRANSLATE EVENT ADDRESS 00241000
  242. MVI 6(R9),C' ' MOVE IN BLANK 00242000
  243. LA R9,7(,R9) POINT TO PLACE TO PUT MNEMONIC 00243000
  244. CLI PEREX,X'44' EXECUTE ISN? 00244000
  245. BNE NOTOUTEX NOPE, CONTINUE 00245000
  246. MVC 0(2,R9),=C'EX' MOVE IN MNEMONIC 00246000
  247. UNPK 6(9,R9),PEREX(5) UNPACK INST 00247000
  248. UNPK 15(3,R9),PEREXMOD(2) UNPACK MODIFIER 00248000
  249. UNPK 18(7,R9),PEREXADD(4) UNPACK ADDRESS 00249000
  250. TR 6(18,R9),HEXBENT TRANSLATE TO HEX 00250000
  251. MVI 14(R9),C' ' MOVE IN BLANK 00251000
  252. MVI 17(R9),C' ' MOVE IN BLANK 00252000
  253. MVI 24(R9),C' ' MOVE IN BLANK 00253000
  254. LA R9,25(,R9) POINT TO PLACE TO PUT ISN 00254000
  255. NOTOUTEX LH R0,PERINST LOAD FIRST 2 BYTES OF ISN 00255000
  256. LR R1,R9 PLACE TO PUT MMNEMONIC 00256000
  257. CALL DMKNEMOP GET MNEMONIC 00257000
  258. SLR R1,R1 CLEAR R1 FOR IC 00258000
  259. IC R1,PERINST INSERT OP CODE 00259000
  260. SRL R1,6 KEEP ONLY FIRST 2 BITS 00260000
  261. LA R1,3(,R1) ADD FUDGE FACTOR 00261000
  262. SRL R1,1 AND GET ILC 00262000
  263. LR R5,R1 PREPARE A REG FOR EXECUTE 00263000
  264. SLL R5,5 MOVE FOR L1 OF UNPACK 00264000
  265. ALR R5,R1 AND L2 00265000
  266. ALR R5,R5 AND DOUBLE FOR PROPER POSITION 00266000
  267. EX R5,UNPKINST UNPK 6(*-*,R9),PERINST(*-*) 00267000
  268. SRL R5,4 SHIFT FOR LENGTH OF RESULT 00268000
  269. LA R1,6(R5,R9) LOAD ADDR TO PUT BLANK 00269000
  270. MVI 0(R1),C' ' MOVE IN BLANK 00270000
  271. BCTR R5,0 DECREMENT FOR EX 00271000
  272. EX R5,TRINSTR AND TRANSLATE TO HEX 00272000
  273. LA R9,15(,R9) LOAD ADDR FOR FIRST OP 00273000
  274. TM PERINST,X'C0' 6 BYTE ISN? 00274000
  275. BNO *+8 NO, SKIP LA 00275000
  276. LA R9,4(,R9) ALLOW AN EXTRA 4 BYTES 00276000
  277. TM PEROP1,PEROPNOT IS THERE A FIRST OPERAND? 00277000
  278. BO PUTCC NOPE, GO PUT OUT CC 00278000
  279. UNPK 0(7,R9),PEROP1+1(4) UNPACK OPERAND 1 00279000
  280. TR 0(6,R9),HEXBENT TRANSLATE TO HEX 00280000
  281. MVI 6(R9),C' ' MOVE IN A BLANK 00281000
  282. LA R9,7(,R9) POINT PAST OPERAND 1 00282000
  283. TM PEROP2,PEROPNOT IS THERE A SECOND OPERAND? 00283000
  284. BO PUTCC NOPE, PUT OUT CC 00284000
  285. UNPK 0(7,R9),PEROP2+1(4) UNPACK IT 00285000
  286. TR 0(6,R9),HEXBENT TRANSLATE TO HEX 00286000
  287. MVI 6(R9),C' ' MOVE IN A BLANK 00287000
  288. LA R9,7(,R9) AND POINT TO NEXT AVAIL SLOT 00288000
  289. SPACE 1 00289000
  290. *---------------------------------------------------------------------* 00290000
  291. * PUT OUT CONDITION CODE * 00291000
  292. *---------------------------------------------------------------------* 00292000
  293. PUTCC IC R1,VMPSW+4 ASSUME BC PSW 00293000
  294. TM VMPSW+1,EXTMODE IN EC MODE? 00294000
  295. BZ *+8 NOPE, KEEP THIS CC 00295000
  296. IC R1,VMPSW+2 GET CORRECT CC 00296000
  297. SRL R1,4 SHIFT IT TO POSITION 00297000
  298. N R1,F3 KILL UNWANTED BITS 00298000
  299. MVC 0(3,R9),=C'CC=' MOVE IN CHARS 00299000
  300. STC R1,3(,R9) STORE CC 00300000
  301. OI 3(R9),X'F0' AND OR IN ZONE 00301000
  302. LA R9,5(,R9) POINT TO NEXT AVAIL SLOT 00302000
  303. SPACE 1 00303000
  304. *---------------------------------------------------------------------* 00304000
  305. * CHECK FOR *STORE* * 00305000
  306. *---------------------------------------------------------------------* 00306000
  307. STOUT TM SAVEWRK2,X'10' DISPLAY *STORE*? 00307000
  308. BZ GPROUT NOPE, OUTPUT REGISTERS 00308000
  309. MVC 0(7,R9),=C'*STORE*' MOVE IN MARKER 00309000
  310. LA R9,8(,R9) POINT TO NEXT AVAIL SLOT 00310000
  311. SPACE 1 00311000
  312. *---------------------------------------------------------------------* 00312000
  313. * DISPLAY ALTERED GENERAL REGISTERS * 00313000
  314. *---------------------------------------------------------------------* 00314000
  315. GPROUT LA R10,PERBUF+80-13 POINT TO LAST POSSIBLE POSITION 00315000
  316. SLR R5,R5 CLEAR R5 00316000
  317. ICM R5,B'1100',SAVEWRK2+2 LOAD REGISTER FLAGS 00317000
  318. BZ GDUMP GO DUMP BUFFER 00318000
  319. LA R6,VMGPRS POINT TO REGISTERS 00319000
  320. SLR R7,R7 CLEAR REG N0 00320000
  321. GRLP ALR R5,R5 CHECK FLAG 00321000
  322. BZ GDUMP NO MORE, DUMP BUFFER 00322000
  323. BC B'0100',NXTREG NOT THIS ONE, TRY NEXT 00323000
  324. CR R9,R10 ENOUGH SPACE LEFT? 00324000
  325. BNH NOGOUT YES, DON'T DUMP BUFFER YET 00325000
  326. LR R0,R9 MOVE ADDR TO R9 00326000
  327. LA R1,PERBUF POINT TO BUFFER 00327000
  328. SLR R0,R1 GET LENGTH 00328000
  329. BAL R4,DISPLAY AND DISPLAY THE BUFFER 00329000
  330. MVC PERBUF(4),BLANKS MOVE IN 4 BLANKS 00330000
  331. LA R9,PERBUF+4 POINT TO SLOT 00331000
  332. NOGOUT CVD R7,SAVEWRK8 CONVERT REG NO TO DEC 00332000
  333. UNPK 0(3,R9),SAVEWRK8+6(2) UNPACK REG NUMBER 00333000
  334. OI 2(R9),X'F0' OR IN ZONE 00334000
  335. MVI 0(R9),C'G' MOVE IN G 00335000
  336. MVI 3(R9),C'=' MOVE IN = 00336000
  337. UNPK 4(9,R9),0(5,R6) UNPACK CONTENTS 00337000
  338. TR 4(8,R9),HEXBENT TRANSLATE 00338000
  339. MVI 12(R9),C' ' MOVE IN TRAILING BLANK 00339000
  340. LA R9,13(,R9) POINT TO NEXT AVAIL SLOT 00340000
  341. NXTREG LA R6,4(,R6) POINT TO NEXT REG 00341000
  342. LA R7,1(,R7) ADD TO COUNTER 00342000
  343. B GRLP AND LOOP 00343000
  344. GDUMP LR R0,R9 MOVE ADDR TO R0 00344000
  345. LA R1,PERBUF POINT TO BUFFER 00345000
  346. SLR R0,R1 GET LENGTH 00346000
  347. BAL R4,DISPLAY AND DISPLAY IT 00347000
  348. SPACE 1 00348000
  349. *---------------------------------------------------------------------* 00349000
  350. * CHECK FOR DISPLAY OF TRACEBACK TABLE * 00350000
  351. *---------------------------------------------------------------------* 00351000
  352. TM SAVEWRK2,X'40' DISPLAY TRACEBACK TABLE? 00352000
  353. BZ DATOUT NO, TRY FOR DATA STOP 00353000
  354. LA R0,5 INDICATE NO MORE THAN 5 00354000
  355. BAL R10,DUMPTBAK AND GO DUMP TABLE 00355000
  356. SPACE 1 00356000
  357. *---------------------------------------------------------------------* 00357000
  358. * DISPLAY DATA STOPS * 00358000
  359. *---------------------------------------------------------------------* 00359000
  360. DATOUT TM SAVEWRK1,X'80' DATA TRAPS PRESENT? 00360000
  361. BZ PASS2 NO, GO SET UP FOR PASS 2 00361000
  362. LA R7,PERCHAIN-(PEXNEXT-PEXBLOK) POINT TO START OF CHAIN 00362000
  363. DATLP L R7,PEXNEXT LOAD FORWARD POINTER 00363000
  364. LTR R7,R7 ANY MORE? 00364000
  365. BZ PASS2 NO, SET UP FOR PASS 2 00365000
  366. TM PEXFLAGO,PEXSUCC SUCCESSFUL? 00366000
  367. BZ DATLP NO, TRY NEXT ONE 00367000
  368. CLI PEXDLEN,0 DATA TRAP? 00368000
  369. BZ DATLP NO, TRY NEXT 00369000
  370. CLI PEXFLAGT,PEXGPR GREG? 00370000
  371. BE DATLP YES, DATA ALREADY DISPLAYED 00371000
  372. MVC PERBUF(8),=C'DATA AT ' MOVE IN CHARS 00372000
  373. TM PEXFLAGT,PEXIFET IFETCH? 00373000
  374. UNPK PERBUF+8(7),PEXADDR3+1(4) UNPACK ADDRESS 00374000
  375. TM PEXFLAGT,PEXIFET IFETCH? 00375000
  376. BZ TRADAT NO, GO TRANSLATE IT 00376000
  377. UNPK PERBUF+8(7),PERADDR+1(4) UNPACK ADDRESS 00377000
  378. CLI PEREX,X'44' EXECUTE ISN? 00378000
  379. BNE TRADAT NO, SKIP CHECK 00379000
  380. CLI PEXDATA,X'44' EXECUTE? 00380000
  381. BE TRADAT YES, IS OK THEN 00381000
  382. UNPK PERBUF+8(7),PEREXADD(4) UNPACK PROPER ADDRESS 00382000
  383. TRADAT TR PERBUF+8(6),HEXBENT TRANSLATE TO HEX 00383000
  384. MVI PERBUF+14,C'=' MOVE IN = 00384000
  385. LA R9,PERBUF+15 POINT TO FIRST AVAIL SLOT 00385000
  386. LA R10,PERBUF+80-2 POINT TO LAST POSSIBLE PLACE 00386000
  387. SLR R5,R5 CLEAR R5 FOR IC 00387000
  388. IC R5,PEXDLEN LOAD LENGTH OF DATA 00388000
  389. LA R6,PEXDATA POINT TO DATA 00389000
  390. CLI PEXFLAGT,PEXMASK MASK BLOK? 00390000
  391. BNE OUTDLP NO, GO DO OUTPUT 00391000
  392. ALR R6,R5 POINT TO PROPER DATA 00392000
  393. OUTDLP CR R9,R10 ENOUGH SPACE LEFT? 00393000
  394. BNH OUTDLP1 YES, USE IT 00394000
  395. LR R0,R9 MOVE TO R0 00395000
  396. LA R1,PERBUF POINT TO BUFFER 00396000
  397. SLR R0,R1 AND GET LENGTH 00397000
  398. BAL R4,DISPLAY AND DISPLAY IT 00398000
  399. MVC PERBUF(2),BLANKS MOVE IN TWO BLANKS 00399000
  400. LA R9,PERBUF+2 INDENT TWO 00400000
  401. OUTDLP1 UNPK SAVEWRK8(3),0(2,R6) UNPACK IT 00401000
  402. TR SAVEWRK8(2),HEXBENT TRANSLATE IT 00402000
  403. MVC 0(2,R9),SAVEWRK8 AND MOVE IT 00403000
  404. LA R9,2(,R9) POINT ONWARD 00404000
  405. LA R6,1(,R6) POINT TO NEXT BYTE 00405000
  406. BCT R5,OUTDLP AND TRY NEXT BYTE 00406000
  407. LR R0,R9 MOVE TO R0 00407000
  408. LA R1,PERBUF POINT TO BUFFER 00408000
  409. SLR R0,R1 GET LENGTH 00409000
  410. BAL R4,DISPLAY AND GO DISPLAY IT 00410000
  411. SPACE 1 00411000
  412. *---------------------------------------------------------------------* 00412000
  413. * HANDLE SECOND PASS * 00413000
  414. *---------------------------------------------------------------------* 00414000
  415. PASS2 TM SAVEWRK1,X'20' ALREADY PASS 2? 00415000
  416. BO UNSUCC YES, GO TURN OFF SUCCESS BITS 00416000
  417. MVC SAVEWRK6(4),=V(DMKQCNWT) MOVE IN ROUTINE ADDR 00417000
  418. OI SAVEWRK1,X'20' INDICATE IS PASS 2 00418000
  419. MVC SAVEWRK2(4),SAVEWRK3 MOVE IN FLAGS FOR PASS 2 00419000
  420. B PAGEOUT AND GO DO IT ALL AGAIN 00420000
  421. SPACE 1 00421000
  422. *---------------------------------------------------------------------* 00422000
  423. * TURN OFF ALL SUCCESS BITS * 00423000
  424. *---------------------------------------------------------------------* 00424000
  425. UNSUCC LA R7,PERCHAIN-(PEXNEXT-PEXBLOK) POINT TO CHAIN 00425000
  426. UNSUCCL L R7,PEXNEXT POINT TO NEXT PEXBLOK 00426000
  427. LTR R7,R7 ANY MORE? 00427000
  428. BZ UNSTACK NO, GO UNSTACK COMMAND BUFFERS 00428000
  429. NI PEXFLAGO,255-PEXSUCC TURN OFF BIT 00429000
  430. B UNSUCCL AND LOOP 00430000
  431. SPACE 1 00431000
  432. *---------------------------------------------------------------------* 00432000
  433. * UNSTACK COMMAND BUFFERS * 00433000
  434. *---------------------------------------------------------------------* 00434000
  435. UNSTACK L R1,SAVEWRK5 LOAD POINTER 00435000
  436. LTR R1,R1 ANYTHING? 00436000
  437. BZ CHKBRK NO, GO CHECK FOR BREAK 00437000
  438. TM VMRSTAT,VMLOGOFF IS A LOGOFF PENDING? 00438000
  439. BO STKFRT YES, FRET THE STACK 00439000
  440. MVC SAVEWRK5(4),BUFNXT-BUFFER(R1) SET NEW POINTER 00440000
  441. L R0,BUFCNT-BUFFER(,R1) LOAD COUNT 00441000
  442. ST R1,BUFNXT-BUFFER(,R1) SAVE POINTER 00442000
  443. CALL DMKCFMEN GO EXECUTE IT 00443000
  444. B UNSTACK AND GO UNSTACK NEXT ONE 00444000
  445. STKFRT LR R2,R1 MOVE TO R2 00445000
  446. STKFRTL LTR R1,R2 CHECK IT 00446000
  447. BZ CHKBRK NONE, GO CHECK FOR BREAK 00447000
  448. LA R0,BUFSIZE LOAD SIZE OF BUFFER 00448000
  449. L R2,BUFNXT-BUFFER(,R1) LOAD FWD PTR 00449000
  450. CALL DMKFRET FRET THE BUFFER 00450000
  451. B STKFRTL AND LOOP 00451000
  452. SPACE 1 00452000
  453. *---------------------------------------------------------------------* 00453000
  454. * CHECK TO SEE IF SHOULD CALL DMKCFMBK * 00454000
  455. *---------------------------------------------------------------------* 00455000
  456. CHKBRK TM VMOSTAT,VMSLEEP WAS HE PUT TO SLEEP? 00456000
  457. BO EXIT YES, JUST EXIT 00457000
  458. TM SAVEWRK1,X'40'+X'10' SHOULD WE BREAK? 00458000
  459. BZ EXIT NO, JUST EXIT 00459000
  460. OI SAVEWRK1+1,VMCFWAIT CFMBK TURNS ON CF WAIT 00460000
  461. CALL DMKCFMBK CALL CFM TO PUT IN CONS MODE 00461000
  462. B EXIT AND EXIT 00462000
  463. EJECT , 00463000
  464. *---------------------------------------------------------------------* 00464000
  465. * ENTRY TO DISPLAY TRACEBACK TABLE * 00465000
  466. *---------------------------------------------------------------------* 00466000
  467. SPACE 00467000
  468. DMKPEDTB RELOC , 00468000
  469. MVC SAVEWRK6(4),=V(DMKQCNWT) MOVE IN ADDR 00469000
  470. MVC SAVEWRK1+1(1),VMRSTAT SAVE VMRSTAT ON ENTRY 00470000
  471. OI VMRSTAT,VMCFWAIT PUT INTO CF WAIT 00471000
  472. L R8,VMPERCTL LOAD POINTER 00472000
  473. LTR R8,R8 ANY? 00473000
  474. BZ NOENTBK 00474000
  475. LA R0,6 DISPLAY UP TO 6 ENTRIES 00475000
  476. BAL R10,DUMPTBAK AND GO DUMP IT 00476000
  477. B EXIT AND EXIT 00477000
  478. NOENTBK LA R0,L'EMPTY LOAD LENGTH 00478000
  479. LA R1,EMPTY POINT TO IT 00479000
  480. SLR R2,R2 CLEAR FLAG 00480000
  481. CALL DMKQCNWT AND TYPE MSG 00481000
  482. B EXIT AND EXIT 00482000
  483. EJECT , 00483000
  484. *---------------------------------------------------------------------* 00484000
  485. * COMMON EXIT * 00485000
  486. *---------------------------------------------------------------------* 00486000
  487. EXIT OI SAVEWRK1+1,255-VMCFWAIT RESTORE VMRSTAT 00487000
  488. NC VMRSTAT(1),SAVEWRK1+1 EXCEPT FOR VMCFWAIT 00488000
  489. EXIT , 00489000
  490. EJECT , 00490000
  491. *---------------------------------------------------------------------* 00491000
  492. * ROUTINE TO DUMP THE TRACEBACK TABLE * 00492000
  493. *---------------------------------------------------------------------* 00493000
  494. DUMPTBAK LR R6,R0 MOVE COUNTER 00494000
  495. L R3,PERTBAK LOAD POINTER 00495000
  496. LTR R3,R3 IS THERE A TABLE? 00496000
  497. BZ TEMPTY NO, TELL HIM SO 00497000
  498. TEMPTYL CLC 0(16,R3),ZEROES IS IT EMPTY? 00498000
  499. BNE TBAKMSG NO, GO DISPLAY IT 00499000
  500. LA R3,16(,R3) POINT TO NEXT ENTRY 00500000
  501. BCT R6,TEMPTYL LOOP UNTIL SOMETHING FOUND 00501000
  502. B TEMPTY NONE, DISPLAY MSG 00502000
  503. TBAKMSG MVC PERBUF(L'TMSG),TMSG 00503000
  504. LA R0,L'TMSG 00504000
  505. BAL R4,DISPLAY 00505000
  506. MVI PERBUF,C':' MOVE IN TBAK INDICATOR 00506000
  507. TBAKLOOP MVI PERBUF+1,C' ' MOVE IN A BLANK 00507000
  508. MVC PERBUF+2(24),PERBUF+1 CLEAR TO BLANKS 00508000
  509. UNPK PERBUF+1(7),0(4,R3) UNPACK ADDRESS OF BRANCH 00509000
  510. TR PERBUF+1(6),HEXBENT TRANSLATE TO EBCDIC 00510000
  511. MVI PERBUF+7,C' ' MOVE IN A BLANK 00511000
  512. LA R1,PERBUF+8 POINT TO PLACE FOR DMKNEMOP 00512000
  513. LR R9,R1 PUT IN R9 WHILE WE'RE AT IT 00513000
  514. ICM R0,B'0011',3(R3) INSERT OP CODE 00514000
  515. CALL DMKNEMOP AND GO DECODE IT 00515000
  516. IC R1,3(,R3) INSERT OP CODE 00516000
  517. SRL R1,6 SHIFT ALL BUT FIRST 2 BITS OUT 00517000
  518. N R1,F3 KILL UNWANTED BITS 00518000
  519. LA R1,3(,R1) ADD FUDGE FACTOR 00519000
  520. SRL R1,1 GET ILC 00520000
  521. LR R2,R1 MOVE TO R2 00521000
  522. SLL R2,5 SHIFT TO GET L1 00522000
  523. ALR R2,R1 ADD IN L2 00523000
  524. ALR R2,R2 AND SHIFT TO POSITION 00524000
  525. EX R2,UNPKISN2 EXECUTE AN UNPACK 00525000
  526. SRL R2,4 SHIFT FOR TRANSLATE 00526000
  527. BCTR R2,0 MINUS 1 FOR EX 00527000
  528. EX R2,TRINSTR TRANSLATE IT 00528000
  529. LA R2,7(R2,R9) POINT TO CHAR TO FIX 00529000
  530. MVI 0(R2),C' ' FIX THE BLANK 00530000
  531. LA R9,15(,R9) POINT TO PLACE TO PUT ADDR 00531000
  532. CLR R9,R2 ENOUGH? 00532000
  533. BNL *+8 YES, SKIP LA 00533000
  534. LA R9,4(,R9) GIVE IT 4 MORE BYTES 00534000
  535. UNPK 0(7,R9),9(4,R3) UNPACK ADDRESS 00535000
  536. TR 0(6,R9),HEXBENT TRANSLATE IT 00536000
  537. LA R0,6(,R9) POINT PAST IT 00537000
  538. LA R1,PERBUF POINT TO BUFFER 00538000
  539. SLR R0,R1 GET LENGTH 00539000
  540. L R2,12(,R3) LOAD COUNT 00540000
  541. CL R2,F1 COUNT OF 1? 00541000
  542. BNH TBAKDISP YES, GO DISPLAY 00542000
  543. MVC 6(LMASK+6,R9),MASK MOVE IN EDIT MASK 00543000
  544. CVD R2,SAVEWRK8 CONVERT TO DECIMAL 00544000
  545. ED 6(LMASK,R9),SAVEWRK8+2 EDIT IT 00545000
  546. AH R0,=AL2(LMASK+6) ADD LENGTH 00546000
  547. TBAKDISP BAL R4,DISPLAY DISPLAY IT 00547000
  548. LA R3,16(,R3) POINT TO NEXT ENTRY 00548000
  549. BCT R6,TBAKLOOP LOOP THROUGH TABLE 00549000
  550. BR R10 RETURN TO CALLER 00550000
  551. TEMPTY MVC PERBUF(L'EMPTY),EMPTY MOVE IN MSG 00551000
  552. LA R0,L'EMPTY POINT TO IT 00552000
  553. BAL R4,DISPLAY DISPLAY IT 00553000
  554. BR R10 AND RETURN TO CALLER 00554000
  555. EJECT , 00555000
  556. *---------------------------------------------------------------------* 00556000
  557. * OUTPUT ROUTINE * 00557000
  558. *---------------------------------------------------------------------* 00558000
  559. DISPLAY LA R1,PERBUF POINT TO BUFFER 00559000
  560. SLR R2,R2 CLEAR ATTN INDICATOR 00560000
  561. L R15,SAVEWRK6 LOAD OUTPUT ROUTINE ADDR 00561000
  562. SVC 8 CALL IT 00562000
  563. LTR R2,R2 ATTN HIT? 00563000
  564. BZR R4 NO, RETURN 00564000
  565. OI SAVEWRK1,X'40' INDICATE ATTN HIT 00565000
  566. BR R4 AND RETURN 00566000
  567. EJECT , 00567000
  568. *---------------------------------------------------------------------* 00568000
  569. * ABENDS * 00569000
  570. *---------------------------------------------------------------------* 00570000
  571. SPACE 1 00571000
  572. ABEND 3 00572000
  573. ABEND 4 00573000
  574. EJECT , 00574000
  575. *---------------------------------------------------------------------* 00575000
  576. * EXECUTED INSTRUCTIONS * 00576000
  577. *---------------------------------------------------------------------* 00577000
  578. MVCBUF MVC 0(*-*,R1),1(R2) EXECUTED MOVE 00578000
  579. UNPKINST UNPK 6(*-*,R9),PERINST(*-*) EXECUTED UNPACK 00579000
  580. UNPKISN2 UNPK 6(*-*,R9),3(*-*,R3) EXECUTED UNPACK 00580000
  581. TRINSTR TR 6(*-*,R9),HEXBENT EXEUTED TRANSLATE 00581000
  582. EJECT , 00582000
  583. *---------------------------------------------------------------------* 00583000
  584. * CONSTANTS * 00584000
  585. *---------------------------------------------------------------------* 00585000
  586. EMPTY DC C'TRACEBACK TABLE IS EMPTY' 00586000
  587. TMSG DC C'TRACEBACK TABLE:' 00587000
  588. MASK DC C' ',11X'20',C' TIMES' 00588000
  589. LMASK EQU *-MASK-6 00589000
  590. HEXBENT EQU *-C'0' 00590000
  591. DC C'0123456789ABCDEF' 00591000
  592. EJECT , 00592000
  593. *---------------------------------------------------------------------* 00593000
  594. * LITERALS * 00594000
  595. *---------------------------------------------------------------------* 00595000
  596. LTORG , 00596000
  597. EJECT , 00597000
  598. *---------------------------------------------------------------------* 00598000
  599. * DSECTS AND EQUATES * 00599000
  600. *---------------------------------------------------------------------* 00600000
  601. SPACE 1 00601000
  602. COPY CONBUF 00602000
  603. COPY EQU 00603000
  604. COPY PERBLOKS 00604000
  605. PSA , 00605000
  606. COPY SAVE 00606000
  607. COPY VMBLOK 00607000
  608. END DMKPED 00608000
ibm/vm370-lib/cp/dmkped.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator