User Tools

Site Tools


ibm:vm370-lib:cp:dmktrc.assemble_src

DMKTRC Source

References

Source Listing

DMKTRC.ASSEMBLE.txt
  1. TRC TITLE 'DMKTRC (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF SOURCE 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKTRC 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * TO PROVIDE A VIRTUAL MACHINE WITH THE FACILITY TO TRACE 00010000
  11. * SVC INSTRUCTIONS, PROGRAM INTERRUPTS, EXTERNAL INTERRUPTS, 00011000
  12. * PRIVILEGED INSTRUCTIONS, SUCCESSFUL BRANCHES, 00012100
  13. * OR ALL INSTRUCTIONS, WITH OUTPUT ON THE PRINTER, TERMINAL, 00013000
  14. * OR BOTH. 00014000
  15. * 00015000
  16. * ATTRIBUTES - 00016000
  17. * 00017000
  18. * REENTRANT, PAGEABLE, CALLED VIA SVC 00018000
  19. * 00019000
  20. * ENTRY POINTS - 00020000
  21. * 00021000
  22. * DMKTRCEX - PROCESS AN EXTERNAL INTERRUPT 00022000
  23. * DMKTRCIO - PROCESS AN I/O INTERRUPT 00023000
  24. * DMKTRCPG - PROCESS A PROGRAM INTERRUPT 00024000
  25. * DMKTRCPV - PROCESS A PRIVILEGED INSTRUCTION 00025000
  26. * DMKTRCSW - TRACE VIRTUAL AND REAL CSWS 00027000
  27. * DMKTRCSV - PROCESS AN SVC, BRANCH, OR FULL INSTRUCTION TRACE 00028000
  28. * DMKTRCPB - PUT BACK USER INSTRUCTIONS ALTERED BY TRACING 00030000
  29. * DMKTRCIT - SET NEEDED "SVC B2" FOR INSTRUCTION TRACING 00031000
  30. * DMKTRCND - FORCIBLY TERMINATE TRACING 00032000
  31. EJECT 00033000
  32. * ENTRY CONDITIONS - 00034000
  33. * 00035000
  34. * FOR ALL ENTRY POINTS: 00036000
  35. * 00037000
  36. * GPR 11 = ADDRESS OF VIRTUAL MACHINE VMBLOK 00038000
  37. * GPR 12 = ENTRY POINT ADDRESSABILITY 00039000
  38. * GPR 13 = ADDRESS OF STANDARD SAVE AREA 00040000
  39. * 00041000
  40. * FOR DMKTRCEX (EXTERNAL INTERRUPT) ENTRY POINT: 00042000
  41. * 00043000
  42. * GPR 0-1 = VIRTUAL EXTERNAL OLD PSW 00044000
  43. * GPR 2-3 = VIRTUAL EXTERNAL NEW PSW 00045000
  44. * GPR 4 = INTERRUPT CODE 00046000
  45. * 00047000
  46. * FOR DMKTRCIO (I/O INTERRRUPT) ENTRY POINT 00048000
  47. * 00049000
  48. * GPR 0-1 = VIRTUAL I/O OLD PSW 00050000
  49. * GPR 2-3 = VIRTUAL I/O NEW PSW 00051000
  50. * GPR 4 = VIRTUAL ADDRESS OF INTERRUPTING DEVICE 00052000
  51. * GPR 5 = VIRTUAL CSW+4/CSW+5 BYTES (IN BITS 16-31) 00053000
  52. * GPR 8 = ADDRESS OF VDEVBLOK 00054000
  53. * 00055000
  54. * FOR DMKTRCSW (CSW TRACING) ENTRY POINT 00056000
  55. * 00057000
  56. * GPR 8 = ADDRESS OF VDEVBLOK 00058000
  57. * GPR 10 = ADDRESS OF IOBLOK 00059000
  58. * 00060000
  59. * FOR DMKTRCPG (PROGRAM INTERRUPT) ENTRY POINT: 00061000
  60. * 00062000
  61. * GPR 0-1 = VIRTUAL PROGRAM OLD PSW 00063000
  62. * GPR 2-3 = VIRTUAL PROGRAM NEW PSW 00064000
  63. * GPR 4 = INTERRUPT LENGTH & CODE 00065000
  64. * 00066000
  65. * FOR DMKTRCPV (PRIVILEGED) ENTRY POINT: 00067000
  66. * 00068000
  67. * GPR 1 = VIRTUAL ADDRESS OF PRIVILEGED INSTRUCTION (OR 'EX') 00069000
  68. * 00070000
  69. * FOR DMKTRCPB, AND DMKTRCND ENTRY POINTS: 00078100
  70. * 00079000
  71. * (NO SPECIAL REGISTER REQUIREMENTS OTHER THAN GPR11-13) 00080000
  72. * 00081000
  73. * FOR DMKTRCIT ENTRY POINT: 00082000
  74. * 00083000
  75. * GPR 1 = VIRTUAL ADDRESS AT WHICH TO INITIATE TRACING 00084000
  76. EJECT 00085000
  77. * ENTRY CONDITIONS (CONTINUED): 00086000
  78. * 00087000
  79. * FOR DMKTRCSV (SVC, BRANCH, OR INSTRUCTION TRACE) ENTRY POINT: 00088000
  80. * 00089000
  81. * GPR 0-1 = SVC OLD PSW 00090000
  82. * GPR 2 = INTERRUPT LENGTH ONLY 00091000
  83. * GPR 4 = INTERRUPT LENGTH & CODE 00092000
  84. * GPR 10 = ADDRESS OF SVC (OR EX-SVC) INSTRUCTION 00093000
  85. * 00094000
  86. * EXIT CONDITIONS - 00095000
  87. * 00096000
  88. * FOR DMKTRCSV ENTRY POINT ONLY: 00097000
  89. * 00098000
  90. * CC = ZERO: GO TO DMKDSPCH = REGULAR "DISPATCH" ENTRY POINT 00099000
  91. * CC = NONZERO: GO TO DMKDSPB (TO CHECK OUT NEW PSW) 00100000
  92. * 00101000
  93. * APPROPRIATE OUTPUT MESSAGES HAVE BEEN GIVEN ON THE USER'S 00102000
  94. * TERMINAL AND/OR VIRTUAL PRINTER; FOR THE DMKTRCSV ENTRY 00103000
  95. * POINT, THE STATE OF HIS VIRTUAL MACHINE HAS BEEN SAVED AS 00104000
  96. * WOULD HAVE BEEN DONE IN DMKPSASV; IN ANY EVENT, THE USER'S 00105000
  97. * VIRTUAL MACHINE IS IN THE SAME RUNNABLE (OR NON-RUNNABLE) 00106000
  98. * STATE AS IT WOULD BE IF TRACING WERE NOT IN EFFECT. 00107000
  99. * 00108000
  100. * CALLS TO OTHER ROUTINES - 00109000
  101. * 00110000
  102. * DMKQCNWT - WRITE A MESSAGE TO USER TERMINAL 00111000
  103. * DMKVSPRT - WRITE A MESSAGE ON PRINTER 00112000
  104. * DMKCVTBH - CONVERT BINARY FIELDS TO HEXADECIMAL 00113000
  105. * DMKDSPCH - TO DISPATCH USER 00118000
  106. * DMKNEMOP - TO GET MNEMONIC EQUIVALENT OF A 370 OP CODE 00119000
  107. * DMKFREE - TO GET FREE STORAGE FOR TRACE CONTROL BLOCK 00120000
  108. * DMKFRET - TO RETURN TRACE CONTROL BLOCK TO FREE STORAGE 00121000
  109. * DMKCFMBK - TO INITIATE A READ FROM A TERMINAL 00122000
  110. * DMKPTRAN - TO BRING A USER PAGE INTO MEMORY WHEN NEEDED 00123000
  111. * DMKPSARX = TO GET VIRTUAL ADDRESS FROM AN RX INSTRUCTION 00124000
  112. * DMKPSARS = TO GET VIRTUAL ADDRESS FROM AN RS INSTRUCTION 00125000
  113. * DMKPSARR = TO GET VIRTUAL ADDRESS FROM AN RR INSTRUCTION 00126000
  114. * DMKPSASC - TO TEST IF SVC BYTE TARGETED FOR A SHARED PAGE 00129000
  115. * DMKATSCF - UNSHARE A NAMED SHARED SYSTEM PRIOR TO SVC INSERT 00130100
  116. * DMKVATRN - TO PERFORM VIRTUAL ADDRESS TRANSLATION AS NEEDED 00131000
  117. * DMKPSASP - TO CHECK FOR STORAGE PROTECTION 00132000
  118. * 00133000
  119. * EXTERNAL REFERENCES - 00134000
  120. * 00135000
  121. * NONE 00136000
  122. * 00137000
  123. * TABLES / WORK AREAS - 00138000
  124. * 00139000
  125. * TRACE CONTROL BLOCK 00140000
  126. EJECT 00141000
  127. * REGISTER USAGE - 00142000
  128. * 00143000
  129. * GPR 9 = ADDRESS OF TRACE CONTROL BLOCK 00144000
  130. * GPR 10 = ADDRESS OF IOBLOK (WHERE APPLICABLE) 00145000
  131. * GPR 12 - BASE REGISTER 00146000
  132. * GPR 13 - ADDRESS OF STANDARD SAVE AREA 00147000
  133. * 00148000
  134. * OTHER REGISTERS = WORK REGISTERS 00149000
  135. * 00150000
  136. * NOTES - 00151000
  137. * 00152000
  138. * SEE "RESTRICTIONS" (PRECEDING "ERROR MESSAGES") 00153000
  139. * 00154000
  140. * VARIOUS TRACE OPTIONS CAN BE SET CUMULATIVELY BY ISSUING 00155000
  141. * SUCCESSIVE TRACE COMMANDS; FOR EXAMPLE TO HAVE BRANCH 00156000
  142. * TRACING ON THE TERMINAL (WITH RUN ON) AND FULL INSTRUCTION 00157000
  143. * TRACING ON THE PRINTER THE FOLLOWING COULD BE ISSUED 00158000
  144. * (ASSUMING THE USER IS IN CP MODE): 00159000
  145. * 00160000
  146. * TRACE BRANCH TERMINAL RUN 00161000
  147. * TRACE INSTRUCT PRINTER 00162000
  148. * BEGIN (OR SIMILAR CP COMMAND) 00163000
  149. * 00164000
  150. * FOR FULL INSTRUCTION OR BRANCH TRACING, ANY INSTRUCTION 00165000
  151. * WHICH MODIFIES THE NEXT BYTE IN STORAGE (FOLLOWING THE 00166000
  152. * INSTRUCTION) WILL CAUSE ERRONEOUS RESULTS, USUALLY 00167000
  153. * RESULTING IN TRACING BEING TERMINATED UNTIL AN INTERRUPT 00168000
  154. * OCCURS. 00169000
  155. * 00170000
  156. * SIMILARLY, AN INSTRUCTION WHICH EXAMINES EITHER (OR BOTH) 00171000
  157. * OF THE NEXT TWO BYTES FOLLOWING THE INSTRUCTION (WHEN 00172000
  158. * RUNNING WITH FULL INSTRUCTION OR BRANCH TRACING) WILL 00173000
  159. * OBTAIN ERRONEOUS DATA. 00174000
  160. * 00175000
  161. * AN INSTRUCTION WHICH EXECUTES THE NEXT INSTRUCTION IN 00176000
  162. * SEQUENCE, ON THE OTHER HAND, WILL BE HANDLED SATISFACTORILY, 00177000
  163. * EXCEPT THAT ONLY THE FIRST EXECUTION OF THE INSTRUCTION WILL 00178000
  164. * WILL BE TRACED. (IF NO TRANSFER OCCURS, THE 'EX' DROPS THRU, 00179000
  165. * AND THE INSTRUCTION IS DONE AGAIN IN LINE, IT WILL NOT 00180000
  166. * BE TRACED THE SECOND TIME. TRACING WILL THEN RESUME WITH 00181000
  167. * THE NEXT INSTRUCTION FOLLOWING THE EXECUTED INSTRUCTION.) 00182000
  168. * 00183000
  169. * WHEN SEVERAL TRACE OPTIONS ARE IN EFFECT, THE SAME 00184000
  170. * INSTRUCTION CAN APPEAR IN THE TRACE OUTPUT MORE THAN 00185000
  171. * ONCE. FOR EXAMPLE, IF FULL INSTRUCTION TRACING WERE 00186000
  172. * IN EFFECT, A START I/O (SIO) INSTRUCTION WOULD BE TRACED 00187000
  173. * BEFORE IT IS EXECUTED; SUBSEQUENTLY, WHEN THE SIO HAS 00188000
  174. * BEEN HANDLED BY CP, AND THE CONDITION CODE IS READY 00189000
  175. * TO BE REFLECTED TO THE USER, THE SIO WOULD BE TRACED 00190000
  176. * AGAIN WITH THE USUAL PERTINENT INFORMATION GIVEN FOR 00191000
  177. * THE TRACING OF I/O OPERATIONS (SEE RESPONSES). 00192000
  178. EJECT 00193000
  179. * OPERATION - 00194000
  180. * 00195000
  181. * NOTE: DMKTRACE - INITIALIZE, MODIFY, OR TERMINATE THE TRACE 00196000
  182. * FUNCTION - IS LOCATED IN "DMKTRA" (A SEPARATE MODULE). 00197000
  183. * 00198000
  184. * 1. DMKTRCEX - PROCESS AN EXTERNAL INTERRUPT 00199000
  185. * 00200000
  186. * A TRACE OUTPUT LINE IS CONSTRUCTED CONTAINING THE 00201000
  187. * PERTINENT INFORMATION FOR AN EXTERNAL INTERRUPT, 00202000
  188. * AND IS PRESENTED TO THE USER IN THE USUAL WAY ON 00203000
  189. * THE TERMINAL, PRINTER, OR BOTH, JUST BEFORE THE EXTERNAL 00204000
  190. * INTERRUPT IS REFFLECTED TO THE USER'S VIRTUAL MACHINE. 00205000
  191. * 00206000
  192. * 2. DMKTRCIO - PROCESS AN I/O INTERRUPT 00207000
  193. * 00208000
  194. * A TRACE OUTPUT LINE IS CONSTRUCTED CONTAINING THE 00209000
  195. * PERTINENT INFORMATION FOR AN I/O INTERRUPT, AND 00210000
  196. * IS PRESENTED TO THE USER IN THE USUAL WAY, JUST BEFORE THE 00211000
  197. * I/O INTERRUPT IS REFLECTED TO THE USER'S VIRTUAL MACHINE. 00212000
  198. * 00213000
  199. * 3. DMKTRCPG - PROCESS A PROGRAM INTERRUPT 00214000
  200. * 00215000
  201. * A TRACE OUTPUT LINE IS CONSTRUCTED CONTAINING THE 00216000
  202. * PERTINENT INFORMATION FOR A PROGRAM INTERRUPT, AND 00217000
  203. * IS PRESENTED TO THE USER IN THE USUAL WAY, JUST BEFORE THE 00218000
  204. * PROGRAM INTERRUPT IS REFLECTED TO THE USER'S VIRTUAL MACHINE. 00219000
  205. * 00220000
  206. * 4. DMKTRCPV - PROCESS A PRIVILEGED INSTRUCTION 00221000
  207. * 00222000
  208. * A TRACE OUTPUT LINE IS CONSTRUCTED CONTAINING THE 00223000
  209. * PERTINENT INFORMATION FOR A PRIVILEGED INSTRUCTION 00224000
  210. * (OTHER THAN SIO, TIO, HIO, OR TCH), AND IS PRESENTED TO 00225000
  211. * THE USER IN THE USUAL WAY, JUST BEFORE THE PRIVILEGED 00226000
  212. * INSTRUCTION IS SIMULATED OR OTHERWISE HANDLED BY CP. 00227000
  213. * 00228000
  214. * 5. DMKTRCSW - TRACE VIRTUAL AND REAL CSWS 00250100
  215. * 00251000
  216. * IF CSW WAS SPECIFIED, WHEN A VIRTUAL CSW AND REAL CSW ARE 00252000
  217. * AVAILABLE, THEY ARE DISPLAYED TO THE USER IN THE USUAL WAY. 00253000
  218. * THE I/O INTERRUPT THEN NORMALLY FOLLOWS IMMEDIATELY (UNLESS 00254000
  219. * THE INTERRUPT IS DRAINED BY A 'TIO' INSTEAD). 00255000
  220. * 00256000
  221. EJECT 00257100
  222. * OPERATION (CONTINUED) - 00257200
  223. * 00257300
  224. * 6. DMKTRCSV - PROCESS AN SVC, BRANCH, OR FULL INSTRUCTION TRACE 00257400
  225. * 00258000
  226. * FOR AN SVC INTERRUPT, THE STATUS OF THE VIRTUAL MACHINE (ILC, 00259000
  227. * CC, SVC INTERRUPT CODE AND OLD PSW) IS SAVED AS IF BY THE 00260000
  228. * DMKPSASV INTERRUPT HANDLER, AND AN OUTPUT LINE IS CONSTRUCTED 00261000
  229. * CONTAINING THE INFORMATION PERTAINING TO AN SVC INTERRUPT. 00262000
  230. * THIS IS THEN PRESENTED TO THE USER IN THE USUAL WAY PRIOR 00263000
  231. * TO REFLECTING THE SVC INTERRUPT TO THE USER'S VIRTUAL MACHINE. 00264000
  232. * 00265000
  233. * BRANCH AND/OR FULL INSTRUCTION TRACING ARE ACCOMPLISHED BY 00266000
  234. * REPLACING THE FIRST TWO BYTES OF THE NEXT SEQUENTIAL 00267000
  235. * VIRTUAL INSTRUCTION BY AN 'SVC B1', REMEMBERING IN THE TRACE 00268000
  236. * EXTENSION BLOCK (TREXT) THE VIRTUAL ADDRESS AND REAL FIRST 00269000
  237. * TWO BYTES OF THE INSTRUCTION WHICH WAS REPLACED. FOR A 00270000
  238. * CONDITIONAL (OR UNCONDITIONAL) CONTROL TRANSFER, AN 'SVC B2' 00271000
  239. * SIMILARLY REPLACES THE FIRST TWO BYTES OF THE VIRTUAL ADDRESS 00272000
  240. * TO WHICH CONTROL MAY (OR WILL) BE TRANSFERRED. 00273000
  241. * 00274000
  242. * WHEN THE 'SVC B1' OR 'SVC B2' IS EXECUTED AND FIELDED BY THE 00275000
  243. * DMKPSASV SVC INTERRUPT HANDLER, CONTROL IS PASSED TO THE 00276000
  244. * DMKTRCSV ENTRY POINT. HERE, APPROPRIATE STEPS ARE TAKEN 00277000
  245. * TO PRINT OR TYPE THE INSTRUCTION, WHETHER OR NOT A TRANSFER 00278000
  246. * OF CONTROL HAS OCCURRED, REPLACE THE ALTERED INSTRUCTION(S), 00279000
  247. * AND SET A NEW 'SVC B1' AND/OR 'SVC B2' FOR THE NEXT TIME. 00280000
  248. * 00281000
  249. * APPROPRIATE SIMILAR MEASURES ARE ALSO TAKEN FOR THE OTHER 00282000
  250. * ENTRY POINTS, IF BRANCH AND/OR FULL INSTRUCTION TRACING IS 00283000
  251. * IN EFFECT. 00284000
  252. * 00285000
  253. * NOTE: WHEN PRINTING TRACE OUTPUT LINES, IF A SEVERE ERROR 00286000
  254. * (R2 = 8 - FOR SPOOLING SPACE FULL) IS RETURNED BY DMKVSPRT, 00287000
  255. * THEN A FORCED 'TRACE END' IS TRIGGERED TO TERMINATE TRACING. 00288000
  256. EJECT 00289000
  257. * RESPONSES - 00290000
  258. * 00291000
  259. * TERMINAL RESPONSES FOR VARIOUS TRACING SITUATIONS: 00292000
  260. * (SEE KEYS BELOW) 00293000
  261. * 00294000
  262. * 1. I/O INSTRUCTION - SIO/SIOF, TIO, HIO/HDV, OR TCH: 00294100
  263. * 00294200
  264. * SEE DMKTRD 00294300
  265. * 00294400
  266. * 2. CCW ("IDAL" OR "SEEK" LINES INCLUDED ONLY IF APPLICABLE): 00309000
  267. * 00310000
  268. * CCW VVVVVV XXXXXXXX XXXXXXXX RRRRRR YYYYYYYY YYYYYYYY 00311000
  269. * " IDAL VVVVVVVV VVVVVVVV IDAL 00RRRRRR 00RRRRRR 00312000
  270. * " SEEK XXXXXXXX XXXXXX SEEK YYYYYYYY YYYY 00313000
  271. * 00314000
  272. * 3. INSTRUCTION TRACING: 00315000
  273. * 00316000
  274. * A. PRIVILEGED INSTRUCTIONS: 00317000
  275. * 00318000
  276. * ::: VVVVVV SSM XXXXXXXX SS (NORMAL SSM) 00319000
  277. * ::: VVVVVV SSM XXXXXXXX SS TTTTTT (SWITCH TO/FROM TRANSLATE MODE) 00320000
  278. * ::: VVVVVV STOSM XXXXXXXX NS (NORMAL STOSM) 00321000
  279. * ::: VVVVVV STOSM XXXXXXXX NS TTTTTT (SWITCH TO TRANSLATE MODE) 00322000
  280. * ::: VVVVVV STNSM XXXXXXXX NS (NORMAL STNSM) 00323000
  281. * ::: VVVVVV STNSM XXXXXXXX NS TTTTTT (SWITCH FROM TRANSLATE MODE) 00324000
  282. * ::: VVVVVV LPSW XXXXXXXX TTTTTTTT TTTTTTTT (IF WAIT BIT ON) 00325000
  283. * ::: VVVVVV LPSW XXXXXXXX ==> TTTTTTTT TTTTTTTT (WAIT BIT NOT ON) 00326000
  284. * ::: VVVVVV MNEM XXXXXXXX (ALL OTHERS) 00327000
  285. * 00328000
  286. * B. EXECUTED INSTRUCTIONS: 00329000
  287. * 00330000
  288. * VVVVVV EX XXXXXXXX ZZ VVVVVV MNEM XXXXXXXXXXXX 00331000
  289. * 00332000
  290. * C. ALL OTHER INSTRUCTIONS: 00333000
  291. * 00334000
  292. * VVVVVV MNEM XXXXXXXXXXXX 00335000
  293. * 00336000
  294. * 4. SUCCESSFUL BRANCH: 00337000
  295. * 00338000
  296. * VVVVVV MNEM XXXXXXXX ==> TTTTTT 00339000
  297. EJECT 00340000
  298. * RESPONSES (CONTINUED) - 00341000
  299. * 00342000
  300. * 5. INTERRUPT (SVC, PROGRAM, OR EXTERNAL): 00343000
  301. * 00344000
  302. * *** VVVVVV INT CODE ==> TTTTTT 00345000
  303. * 00346000
  304. * 6. I/O INTERRUPT (FIRST LINE GIVEN ONLY IF "CSW" WAS SPECIFIED): 00347000
  305. * 00348000
  306. * CSW V VADD XXXXXXXX XXXXXXXX R RADD YYYYYYYY YYYYYYYY 00349000
  307. * *** VVVVVV I/O VADD ==> TTTTTT CSW XXXX 00350000
  308. * 00351000
  309. * KEYS TO MNEMONICS USED IN THE ABOVE RESPONSES: 00352000
  310. * 00353000
  311. * VVVVVV = VIRTUAL ADDRESS 00354000
  312. * TTTTTT = VIRTUAL TRANSFER ADDRESS OR NEW PSW ADDRESS 00355000
  313. * RRRRRR = REAL ADDRESS 00356000
  314. * XXXXXXXX = VIRTUAL INSTRUCTION, COMMAND, ETC. 00357000
  315. * YYYYYYYY = REAL INSTRUCTION, COMMAND, ETC. 00358000
  316. * SS = ARGUMENT BYTE (SSM-BYTE) FOR "SSM" INSTRUCTION 00359000
  317. * NS = NEW SYSTEM-MASK AFTER EXECUTION OF STOSM/STNSM 00360000
  318. * ZZ = LOW-ORDER BYTE OF "R1" REGISTER IN AN EXECUTE INSTR 00361000
  319. * (NOT SHOWN IF "R1" REGISTER IS REGISTER 0) 00362000
  320. * TYPE = VIRTUAL OR REAL DEVICE NAME (DASD, TAPE, ETC.) 00363000
  321. * VADD = VIRTUAL DEVICE ADDRESS 00364000
  322. * RADD = REAL DEVICE ADDRESS 00365000
  323. * MNEM = MNEMONIC FOR INSTRUCTION, ETC. 00366000
  324. * INT = INTERRUPT TYPE (SVC, PROG, EXT, I/O) 00367000
  325. * CODE = INTERRUPT CODE NUMBER (IN HEX) 00368000
  326. * N = CONDITION-CODE NUMBER (0, 1, 2, OR 3) 00369000
  327. * 00370000
  328. * NOTE: FOR AN EXECUTED INSTRUCTION, WHERE "ZZ" (SEE ABOVE) IS 00371000
  329. * NONZERO, THE MNEMONIC FOR THE EXECUTED INSTRUCTION IS GIVEN 00372000
  330. * AS IF THE "ZZ" BYTE HAD BEEN OR'D INTO THE INSTRUCTION. 00373000
  331. * 00374000
  332. * RESTRICTIONS - 00375000
  333. * 00376000
  334. * INSTRUCTION OR BRANCH TRACING (I.E. ARGUMENT OF 'INSTRUCT', 00377000
  335. * 'BRANCH', OR 'ALL' ON THE 'TRACE' COMMAND) IS NOT 00378000
  336. * PERMISSIBLE WHERE THE USER IS RUNNING A SHARED SYSTEM 00379000
  337. * (SEE DMKTRA181E ERROR MESSAGE IN "TRACE" COMMAND). 00380000
  338. * 00381000
  339. * ERROR MESSAGES - 00382000
  340. * 00383000
  341. * NONE 00384000
  342. *. 00385000
  343. SPACE 2 00386000
  344. * REVISED "RELOC" MACRO - USES HALFWORDS (TO SAVE SPACE): 00387000
  345. MACRO 00388000
  346. &NAME RELOC 00389000
  347. ENTRY &NAME 00390000
  348. &NAME DS 0H 00391000
  349. USING *,R12 00392000
  350. ENTER 00393000
  351. SH R12,=AL2(&NAME-&SYSECT) 00394000
  352. USING &SYSECT,R12 00395000
  353. MEND 00396000
  354. EJECT 00397000
  355. COPY OPTIONS 00398000
  356. COPY LOCAL 00399000
  357. EJECT 00400000
  358. DMKTRC CSECT LOADER CONTROL 00401000
  359. SPACE 00402000
  360. DC CL8'DMKTRC' MODULE IDENTIFIER 00403000
  361. SPACE 00404000
  362. USING PSA,R0 00405000
  363. USING TREXT,R9 00406000
  364. USING VMBLOK,R11 00407000
  365. USING DMKTRC,R12 00408000
  366. USING SAVEAREA,R13 00409000
  367. * 00410000
  368. EXTRN DMKCVTBH 00411000
  369. EXTRN DMKSYSRM @VA03162 00412000
  370. EXTRN DMKVSPRT 00414000
  371. EXTRN DMKATSCF,DMKPSASC @V60BC11 00415100
  372. EXTRN DMKCFMBK 00416000
  373. EXTRN DMKNEMOP 00417000
  374. EXTRN DMKPSARX,DMKPSARS,DMKPSARR 00418000
  375. EXTRN DMKLOCKQ,DMKLOCKD @V200820 00419000
  376. EXTRN DMKPTRUL @V408246 00419100
  377. EXTRN DMKVATRN 00421000
  378. EXTRN DMKPSASP CHECK FOR STORAGE PROTECTION @V202232 00422000
  379. * 00423000
  380. * 00426000
  381. * VARIOUS ENTRY POINTS REACHED WHEN A TRACING CONDITIONS OCCURS: 00427000
  382. * 00428000
  383. DMKTRCEX RELOC PROCESS AN EXTERNAL INTERRUPT @V200820 00429000
  384. BAL R14,TRAINIT CALL INITIALIZER SUBROUTINE 00430000
  385. MVC TRLNINT2(3),CLEXT SET EXTERNAL INTERRUPT CODE 00431000
  386. LTR R4,R4 SYSTEM RESTART? @VA09019 00431100
  387. BNM *+10 NO - GO ON @VA09019 00431200
  388. MVC TRLNINT2(10),CLRST SET SYSTEM RESTART CODE @VA09019 00431300
  389. LA R5,VMTREX SIGNAL IN R5 - DMKTRCEX ENTRY 00432000
  390. B TRAJOINT JOIN COMMON CODE TO HANDLE INTERRUPTS 00433000
  391. SPACE 00434000
  392. DMKTRCIO RELOC PROCESS AN I/O INTERRUPT 00435000
  393. BAL R14,TRAINIT CALL INITIALIZER SUBROUTINE 00436000
  394. MVC TRLNINT2(3),CLIO SET I/O INTERRUPT CODE 00437000
  395. LA R5,VMTRIO SIGNAL IN R5 - DMKTRCIO ENTRY 00438000
  396. B TRAJOINT JOIN COMMON CODE TO HANDLE INTERRUPTS 00439000
  397. SPACE 00440000
  398. DMKTRCPG RELOC PROCESS A PROGRAM INTERRUPT 00441000
  399. BAL R14,TRAINIT CALL INITIALIZER SUBROUTINE 00442000
  400. MVC TRLNINT2(4),CLPROG SET PROG INTERRUPT CODE 00443000
  401. LA R5,VMTRPRG SIGNAL IN R5 - DMKTRCPG ENTRY 00444000
  402. TM VMPEND,VMPERPND VIRTUAL "PER" PENDING ? 00445000
  403. BZ TRAJOINT NOPE - R4 (SEE ENTRY CONDITIONS) IS OK 00446000
  404. TM VMTRCTL,VMTRPER WAS CP USING PER PER001 00446100
  405. BO TRAJOINT YES, DONT OR IN PER PER001 00446200
  406. AH R4,HX80 YES - ADD X'0080' TO R4 (INT. CODE) 00447000
  407. TRAJOINT EQU * PRELIMINARY HANDLING OF INTERRUPTS: 00448000
  408. LR R1,R3 TRANSFER-TO-ADDRESS INTO R1, 00449000
  409. CALL DMKCVTBH BINARY TO HEX PLEASE 00450000
  410. STH R0,TRLNINT5 STORE IN OUTPUT LINE 00451000
  411. ST R1,TRLNINT5+2 ... 00452000
  412. L R1,SAVER1 NOW RESTORE R1 = OLD PSW ADDRESS, AND 00453000
  413. B TRAJOIN1 NOW JOIN COMMON CODE. 00454000
  414. SPACE 00455000
  415. DMKTRCSV RELOC PROCESS AN SVC, BRANCH, OR INSTRUCTION 00467000
  416. BAL R14,TRAINIT CALL INITIALIZER SUBROUTINE 00468000
  417. TM VMTRCTL,VMTRBRIN TRACING BRANCHES OR ALL INSTR ? 00469000
  418. BZ TRA40 IF NOT, FORGET IT. 00470000
  419. CL R10,TREXIN1 DOES R10 (FROM DMKPSA) MATCH A SVC B1 ? 00471000
  420. BE TRA50 YES - WE'RE TRACING A FAKE SVC 00472000
  421. CL R10,TREXIN2 OR A SVC B2 ? 00473000
  422. BE TRA50 YES - WE'RE TRACING A FAKE SVC. 00474000
  423. TRA40 MVC TRLNINT2(3),CLSVC TRACING A REAL SVC - SET CODE 00475000
  424. LA R5,VMTRSVC SIGNAL IN R5 - DMKTRCSV ENTRY 00476000
  425. SL R1,F2 BACK UP THE SVC ADDR @VA09034 00476100
  426. TRAJOIN1 MVC TRLNINT,PFXINTRP SET "INTERRUPT" PREFIX 00477000
  427. TRAJOIN2 STC R5,SAVEWRK1+2 STORE INPUT FLAG BITS 00478000
  428. SR R15,R15 SET TO ZERO @VA07715 00479100
  429. IC R15,TREXCTL1 GET CONTROL FLAG @VA07715 00479200
  430. NR R5,R15 DOES IT MATCH CONTROL FLAG @VA07715 00479300
  431. BNZ TRAJOIN3 IF YES WE HAVE NO PROBLEMS. 00480000
  432. MVC SAVEWRK1+3(1),TREXCTL2 IF NOT, THEN SET BRANCH AND/OR 00481000
  433. NI SAVEWRK1+3,(TREXBRAN+TREXINST) INSTRUCT CONTROL BITS 00482000
  434. TRAJOIN3 EQU * @VA09034 00482600
  435. CALL DMKCVTBH @VA08161 00483100
  436. STH R0,TRLNINT1 STORE 6-BYTE HEX ADDRESS 00484000
  437. STCM R1,B'1111',TRLNINT1+2 @VA07715 00485100
  438. MVC TRLNINT4,PFXARROW PUT ==> PRIOR TO BRANCH-TO ADDRESS 00488000
  439. LTR R1,R4 INTERUPT CODE INTO R1 @VA09019 00489100
  440. BM TRAREST IF SYSTEM RESTART GO ON @VA09019 00489200
  441. CALL DMKCVTBH TO HEX PLEASE 00490000
  442. STCM R1,B'1111',TRLNINT3 STORE IN OUTPUT LINE @VA07715 00491100
  443. TRAREST EQU * @VA09019 00491600
  444. TM SAVEWRK1+2,VMTREX+VMTRIO+VMTRPRG ANY OF THESE ? 00492000
  445. BNZ TRA99 TRF IF YES. 00493000
  446. LA R1,SVCOPSW POINT TO USER'S SVC OLD PSW 00494000
  447. BAL R14,TRANBRNG GET ADDR OF SAME & OTHER STUFF IN PAGE 0 00495000
  448. L R1,SVCNPSW+4-SVCOPSW(,R2) GET TRANSFER TO ADDRESS 00496000
  449. CALL DMKCVTBH BINARY TO HEX PLEASE 00497000
  450. STH R0,TRLNINT5 STORE IN OUTPUT LINE 00498000
  451. ST R1,TRLNINT5+2 ... 00499000
  452. * NOW DO ALL NECESSARY STUFF TO "SAVE THE USER'S VIRTUAL MACHINE": 00500000
  453. ICM R4,12,SAVER0+2 CC/PROGRAM MASK INTO LEFT END OF R4, 00501000
  454. L R5,SAVER1 AND 2ND HALF OF PSW INTO R5 00502000
  455. L R6,SAVER4 AND ILC/INT CODE WORD INTO R6 00503000
  456. ST R5,4(,R2) STORE 2ND HALF OF OLD PSW 00504000
  457. TM VMESTAT,VMEXTCM IS VM IN EXTENDED MODE NOW ? 00505000
  458. BZ TRA86 IF NOT, MAKE A "PLAIN" OLD PSW. 00506000
  459. ST R6,INTSVCL-SVCOPSW(,R2) STORE ILC/INT-CODE WORD 00507000
  460. STCM R4,12,2(R2) STORE CC/PROGRAM MASK, 00508000
  461. L R6,VMPSW GET OLD VMPSW, 00509000
  462. STCM R6,12,0(R2) STORE IN 1ST 2 BYTES OF OLD PSW 00510000
  463. B TRA88 GO HANDLE NEW PSW AND FINISH UP. 00511000
  464. TRA86 L R14,SAVER2 ILC ONLY INTO R14, 00512000
  465. SLR R15,R15 CLEAR R15 00513000
  466. SRDL R14,3 NOW INTO FIRST TWO BITS OF R15 00514000
  467. OR R4,R15 'OR' CORRECT ILC WITH CC-PROGRAM MASK 00515000
  468. STCM R4,8,4(R2) STORE ILC/CC/PROGRAM MASK WITH THE ADDR 00516000
  469. ICM R6,12,VMPSW GET VMPSW 1ST TWO BYTES WITH INT-CODE, 00517000
  470. ST R6,0(,R2) AND STORE FIRST HALF OF OLD PSW 00518000
  471. * 00519000
  472. TRA88 LM R4,R5,SVCNPSW-SVCOPSW(R2) GET CORRECT NEW PSW, 00520000
  473. STM R4,R5,VMPSW AND STORE AS VIRTUAL MACHINE PSW 00521000
  474. OI SAVEWRK8,SETCC AND SET FLAG FOR DMKPSASV 00522000
  475. * 00523000
  476. * TRANSFERRING TO A NEW PLACE VIA AN INTERRUPT: 00524000
  477. * R4/R5 = NEW PSW 00525000
  478. * R6 = 1ST WORD OF OLD PSW 00526000
  479. TRA89 TM VMTRCTL,VMTRBRIN TRACING BRANCHES OR ALL INSTR ? 00527000
  480. BZ TRA90 IF NOT, FORGET IT. 00528000
  481. BAL R3,PUTBACK PUT BACK THE OLD USER INSTRUCTIONS 00529000
  482. LA R15,1 MAKE SURE THE ADDRESS IS AN EVEN NO. 00530000
  483. NR R15,R5 ... 00531000
  484. BNZ TRA90 DON'T SET A "SVC B2" IF NO GOOD. 00532000
  485. LA R7,0(,R5) VIRTUAL TRANSFER-TO ADDRESS INTO R7 00533000
  486. LRA R5,0(,R7) IS IT A VALID ADDRESS ? @V304635 00534000
  487. BC 8+2,TRA89A1 CONTINUE IF IT'S NOT A SEG @V408246 00535100
  488. * EXECPTION 00535200
  489. LR R1,R7 GET VIRTUAL ADDRESS IN CORRECT @V408246 00535300
  490. * REG 00535400
  491. CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 00535500
  492. BC 2,TRA90 ADDRESSING ERROR @V408246 00535600
  493. TRA89A1 DS 0H @V408246 00535700
  494. L R5,TRANMASK MASK OF BITS WHICH MUST MATCH OLD PSW 00536000
  495. NR R4,R5 ISOLATE CRUCIAL BITS OF NEW PSW, 00537000
  496. NR R6,R5 AND DITTO FOR OLD PSW 00538000
  497. CLR R4,R6 POSSIBLY EXACTLY THE SAME ? 00539000
  498. BE TRA89C IF YES, THAT MAKES IT EASY. 00540000
  499. ST R6,SAVEWRK3 OLD PSW BITS WHERE WE CAN LOOK AT THEM 00541000
  500. ST R4,SAVEWRK4 DITTO FOR THE NEW PSW BITS 00542000
  501. TM SAVEWRK4+1,EXTMODE WILL THIS PUT USER IN EXTENDED MODE ? 00543000
  502. BZ TRA89A NOPE - SO FAR SO GOOD. 00544000
  503. TM VMPSTAT,VMV370R IS EXTENDED MODE LEGAL FOR THIS GUY ? 00545000
  504. BZ TRA90 NOPE - IT WILL PROGRAM CHECK LATER. 00546000
  505. TRA89A TM SAVEWRK3+1,EXTMODE IS HE IN BC OR EXTENDED MODE NOW ? 00547000
  506. BZ TRA89B BC - SEE IF GOING INTO EXTENDED & TRANS 00548000
  507. TM SAVEWRK3,TRANMODE EXTENDED - IN TRANSLATE MODE NOW ? 00549000
  508. BO TRA90 IF YES WE KNOW IT WILL BE SWITCHING. 00550000
  509. TRA89B CLR R4,R5 GOING INTO EXTENDED & TRANSLATE ? 00551000
  510. BE TRA90 IF YES WE KNOW IT WILL BE SWITCHING. 00552000
  511. TRA89C LR R1,R7 OK TO SET A NEW "SVC B2" WHERE 00553000
  512. BAL R3,SETNEWB4 THE SVC (OR OTHER INTERRUPT) WILL GO 00554000
  513. TRA90 BAL R3,TROUSUB NOW GIVE THE OUTPUT MESSAGE 00555000
  514. * 00556000
  515. TRA92 DS 0H HERE WHEN WE'RE "ALL FINISHED" 00557000
  516. LH R15,TREXTERM PICK UP THE TERMINAL FLAGS @VA09939 00558110
  517. N R15,SAVEWRK1 SHOULD WE STOP? @VA09939 00558120
  518. BZ TRA94 NOPE, AIM FOR EXIT W/O STOP. @VA00782 00560000
  519. LH R15,TREXRUNF PICK UP STOP/RUN FLAG BITS 00561000
  520. N R15,SAVEWRK1 SHOULD WE STOP OR KEEP RUNNING ? 00562000
  521. BZ TRA96 IF "NORUN", GO CALL DMKCFMBK "BREAK" RTN 00563000
  522. TRA94 CLI SAVEWRK8+3,00 FOR "RUN", ANY ERRORS FROM DMKQCNWT ? 00564000
  523. BE TRA97 IF NOT (NO ATTN HIT BY USER), GO EXIT. 00565000
  524. * 00566000
  525. * TRIGGER A STOP AFTER TRACING THIS EVENT, EITHER BECAUSE 'RUN' FLAG 00567000
  526. * IS NOT SET, OR BECAUSE THE USER HIT ATTENTION DURING TERMINAL OUTPUT: 00568000
  527. TRA96 CLI SAVEWRK2,X'83' IS IT A DIAG ?? 00569000
  528. BNE TRA961 NO, OK 00570000
  529. CLC SAVEWRK2+2(2),F8+2 IS DIAG CONSOLE FUNCTION 00571000
  530. BE TRA97 YES, DONT CALL DMKCFMBK, DIAG WILL DO IT 00572000
  531. TRA961 CALL DMKCFMBK ENTER CONSOLE FUNCTION MODE 00573000
  532. OI SAVEWRK7,VMCFWAIT REMEMBER THAT DMKCFMBK SET VMCFWAIT 00574000
  533. TRA97 EQU * UNLOCK USER'S TREXT BLOCK @V200820 00575000
  534. ST R9,TRALOCK+4 SETUP LOCK "NAME" @V200820 00576000
  535. LA R1,TRALOCK POINT TO IT FOR DMKLOC @V200820 00577000
  536. CALL DMKLOCKD UNLOCK - TRACING FINISHED @V200820 00578000
  537. DROP R9 00579000
  538. TRAEXIT DS 0H RESTORE VMRSTAT FLAGBITS (AS NEEDED) BEFORE EXIT: 00580000
  539. OI SAVEWRK7,255-(VMEXWAIT+VMCFWAIT) PRESERVE ALL OTHER BITS 00581000
  540. NC VMRSTAT(1),SAVEWRK7 RESTORE VMEXWAIT|VMCFWAIT AS NEEDED 00582000
  541. TRAEXITR LCTL C1,C1,VMSEG BE SURE CONTROL REG 1 IS CORRECTLY SET, 00583000
  542. TM SAVEWRK8,SETCC SET COND CODE 0 OR NONZERO 00584000
  543. EXIT AND REALLY EXIT. 00585000
  544. EJECT 00586000
  545. * HANDLE EXTERNAL, PROGRAM, OR I/O INTERRUPT: 00587000
  546. USING TREXT,R9 00588000
  547. TRA99 LM R4,R5,SAVER2 NEW PSW INTO R4-R5, 00589000
  548. L R6,SAVER0 1ST WORD OF OLD PSW INTO R6, 00590000
  549. TM SAVEWRK1+2,VMTRIO NOW WAS THAT AN I/O INTERRUPT ? 00591000
  550. BZ TRA89 NO - GIVE MESSAGE AND FINISH UP. 00592000
  551. MVC TRLNINT6,CLCSW FILL IN 'CSW' 00593000
  552. LH R1,SAVER5+2 GET CSW+4/CSW+5 BYTES (THERE FROM CALLER) 00594000
  553. CALL DMKCVTBH BINARY TO HEX PLEASE, 00595000
  554. STCM R1,B'1111',TRLNINT7 STORE IN MESSAGE @VA07715 00596100
  555. B TRA89 GO GIVE I/O INTERRUPT LINE 00597000
  556. SPACE 3 00598000
  557. DMKTRCPV RELOC PROCESS A PRIVILEGED INSTRUCTION: 00599000
  558. BAL R14,TRAINIT CALL INITIALIZER SUBROUTINE 00600000
  559. MVC TRLNINT,PFXPRV USE PRIVILEGED-INSTRUCTION PREFIX 00601000
  560. MVI SAVEWRK1+2,VMTRPRV SIGNAL: DMKTRCPV ENTRY 00602000
  561. LR R10,R1 LET R10 = ADDRESS OF PRIVILEGED INSTR, 00603000
  562. TM TREXCTL1,VMTRPRV "PRIV" CONTROL-BIT SET ? 00604000
  563. BO TRA62 YES - LET INSTRUCTION TRACING DO THE WORK 00605000
  564. MVC SAVEWRK1+3(1),TREXCTL2 IF NOT, THEN SET BRANCH AND/OR 00606000
  565. NI SAVEWRK1+3,(TREXBRAN+TREXINST) INSTRUCT CONTROL BITS, 00607000
  566. TM TREXCTL2,TREXBRAN BRANCH TRACING ON ? 00608000
  567. BZ TRA62 NOPE - GO TO IT. 00609000
  568. B TRA52 YES - USE BRANCH-TRACING CODE. 00610000
  569. EJECT 00611000
  570. USING VDEVBLOK,R8 NEEDED FOR DMKTRCSW ENTRY POINT 00914000
  571. USING IOBLOK,R10 ... 00915000
  572. SPACE 00916000
  573. DMKTRCSW RELOC ENTRY TO TRACE VIRTUAL & REAL CSWS 00917000
  574. BAL R14,TRAINIT CALL INITIALIZER SUBROUTINE 00918000
  575. MVI SAVEWRK1+3,TREXCSW INDICATE TRACING CSWS 00919000
  576. MVC TRLNCSW,PFXCSW PREFIX INTO 1ST 3 BYTES OF OUTPUT MESSAGE 00920000
  577. MVI TRLNCSWV,C'V' 'V' WHERE NEEDED 00921000
  578. LH R1,IOBVADD GET VIRTUAL DEVICE ADDRESS (FROM IOBLOK) 00922000
  579. CALL DMKCVTBH BINARY TO HEX PLEASE 00923000
  580. STCM R1,B'1111',TRLNCSW1 STORE IN OUTPUT MSG @VA07715 00924100
  581. LM R1,R2,VDEVCSW NOW GET VIRTUAL CSW (FROM VDEVBLOK) 00925000
  582. ICM R15,15,IOBCSW CAUTION - 1ST HALF OF CSW = 0 ? @VA00865 00926000
  583. BNZ VCSWOK NOPE - VDEVCSW IS OK. @VA00865 00927000
  584. LM R1,R2,IOBCSW IF YES, USE IOBCSW INSTEAD. @VA00865 00928000
  585. VCSWOK EQU * REAL/VIRTUAL CSW TO HEX: @VA00865 00929000
  586. CALL DMKCVTBH 1ST HALF BINARY TO HEX PLEASE 00930000
  587. STCM R0,B'1111',TRLNCSW2 STORE INTO OUTPUT MSG @VA07715 00931100
  588. STCM R1,B'1111',TRLNCSW2+4 STORE INTO OUTPUT MSG @VA07715 00931200
  589. LR R1,R2 SECOND HALF BINARY TO HEX NOW 00932000
  590. CALL DMKCVTBH ... 00933000
  591. STM R0,R1,TRLNCSW3 STORE IN OUTPUT MSG 00934000
  592. MVI TRLNCSWR,C'R' 'R' WHERE NEEDED 00935000
  593. LH R1,IOBRADD GET REAL DEVICE ADDRESS, 00936000
  594. CALL DMKCVTBH BINARY TO HEX PLEASE 00937000
  595. ST R1,TRLNCSW4 STORE IN OUTPUT MSG 00938000
  596. LM R1,R2,IOBCSW GET REAL CSW 00939000
  597. CALL DMKCVTBH 1ST HALF BINARY TO HEX PLEASE 00940000
  598. STCM R0,B'1111',TRLNCSW5 STORE IN OUTPUT MSG @VA07715 00941100
  599. STCM R1,B'1111',TRLNCSW5+4 STORE INTO MSG @VA07715 00941200
  600. LR R1,R2 SECOND HALF OF REAL CSW 00942000
  601. CALL DMKCVTBH BINARY TO HEX PLEASE 00943000
  602. STCM R0,B'1111',TRLNCSW6 STORE INTO OUTPUT MSG @VA07715 00944100
  603. STCM R1,B'1111',TRLNCSW6+4 STORE INTO MESSAGE @VA07715 00944200
  604. B TRA90 GO GIVE MESSAGE AND FINISH UP. 00945000
  605. SPACE 00946000
  606. DROP R8,R10 00947000
  607. EJECT 00952000
  608. * TRAINIT = SUBROUTINE TO INITIALIZE VARIOUS STUFF AT ENTRY: 00953000
  609. * R14 = RETURN REGISTER 00954000
  610. * 00955000
  611. TRAINIT MVC SAVEWRK7(1),VMRSTAT SAVE VMRSTAT FLAG STATUS AT ENTRY 00956000
  612. OI VMRSTAT,VMEXWAIT+VMCFWAIT ENSURE THAT USER IS NOT RUN 00957000
  613. ICM R9,B'1111',VMTREXT POINT TO TRACE EXT BLOCK @V408246 00958100
  614. BZ TRAEXIT IF NOT, GO AWAY QUIETLY. 00960000
  615. SLR R15,R15 CLEAR SAVEWRK1 FLAG 00961000
  616. ST R15,SAVEWRK1 ... 00962000
  617. ST R15,SAVEWRK8 AND SAVEWRK8 FLAGS & "ERROR CODE" 00963000
  618. ST R9,TRALOCK+4 SETUP LOCK "NAME" @V200820 00964000
  619. LA R1,TRALOCK POINT TO IT FOR DMKLOC @V200820 00965000
  620. LR R9,R14 SAVE INTERNAL RETURN ADDRESS @V200820 00966000
  621. CALL DMKLOCKQ ENQUEUE FOR TRACING @V200820 00967000
  622. TM VMTRCTL,255-VMTRPER ANY TRACING IN EFFECT NOW? PER001 00968000
  623. BE TRAEXIT NO -- EXIT QUIETLY @V200820 00969000
  624. LR R14,R9 RESTORE RETURN REGISTER @V200820 00970000
  625. L R9,VMTREXT GR9 = VIRTUAL MACHINE TRACE BLOCK@V200820 00971000
  626. NI TREXFLAG,255-TREXNDSP RESET DSP INTERLOCK @VA04044 00971500
  627. LM R0,R1,SAVER0 RESTORE REGS @VM08544 00972000
  628. BLANKBUF MVC TREXBUFF(8),BLANKS BLANK THE OUTPUT BUFFER 00973000
  629. MVC TREXBUFF+8(72),TREXBUFF ... 00974000
  630. BR R14 AND RETURN. 00975000
  631. SPACE 2 00976000
  632. DMKTRCPB RELOC ENTRY TO CALL "PUTBACK" ROUTINE 00977000
  633. L R9,VMTREXT POINT TO TREXT CONTROL BLOCK 00978000
  634. BAL R3,PUTBACK DO IT 00979000
  635. MVI TREXNSI,00 ALSO CLEAR 1ST BYTE OF "TREXNSI" 00980000
  636. * RESET 'CALL DMKVAT' BIT AND THE DSP INTERLOCK BIT 00981000
  637. NI TREXFLAG,255-(TREXVAT+TREXNDSP) @VA04044 00982000
  638. B TRAEXITR AND GO EXIT. 00983000
  639. SPACE 2 00984000
  640. DMKTRCIT RELOC ENTRY TO SET "SVC B2" FOR TRACING: 00985000
  641. L R9,VMTREXT POINT TO TREXT CONTROL BLOCK 00986000
  642. LA R7,0(,R1) VIRTUAL ADDRESS WITHOUT HIGH BYTE INTO R7 00987000
  643. LR R1,R7 (AND IN R1 ALSO, PLEASE) 00988000
  644. BAL R3,SETNEWB4 INITIALIZE TRACING AND/OR INSTR 00989000
  645. B TRAEXITR AND GO EXIT. 00990000
  646. EJECT 00991000
  647. * SUBROUTINE TO PUT BACK ANY INSTRUCTIONS WHICH WERE ALTERED: 00992000
  648. * R3 = RETURN REGISTER 00993000
  649. PUTBACK L R0,FFS X'FFFFFFFF' INTO R0 00994000
  650. ST R0,TREXANSI STORE IN TREXANSI (UNTIL SET OTHERWISE) 00995000
  651. L R1,TREXIN1 GET ADDRESS OF 1ST REPLACED INSTRUCTION 00996000
  652. CLR R1,R0 ANYTHING THERE TO PUT BACK ? 00997000
  653. BE PUTBACK2 NO. 00998000
  654. ST R0,TREXIN1 SET ADDR AT TREXIN1 BACK TO X'FFFFFFFF' 00999000
  655. BAL R14,TRANPTBK GET REAL ADDRESS OF 1ST INSTRUCTION 01000000
  656. BNZ PUTBACK2 IF CAN'T GET IT, GIVE UP (SADLY). 01001000
  657. LH R15,TREXSVC1 GET FIRST TWO BYTES OF REAL INSTRUCTION 01002000
  658. CLI 0(R2),X'0A' IS THE SVC STILL THERE ? 01003000
  659. BNE PUTBACK1 IF NOT LEAVE FIRST BYTE ALONE 01004000
  660. STCM R15,2,0(R2) OK - PUT BACK FIRST BYTE OF REAL INSTR 01005000
  661. PUTBACK1 CLI 1(R2),X'B1' IS THE "B1" STILL THERE ? 01006000
  662. BNE PUTBACK2 IF NOT LEAVE THE SECOND BYTE ALONE 01007000
  663. STC R15,1(,R2) OK, PUT BACK 2ND BYTE OF INSTR 01008000
  664. * 01009000
  665. PUTBACK2 L R1,TREXIN2 GET ADDRESS OF 2ND REPLACED INSTRUCTION 01010000
  666. CLR R1,R0 ANYTHING THERE TO PUT BACK ? 01011000
  667. BCR 8,R3 <BE> NO - EXIT. 01012000
  668. ST R0,TREXIN2 SET ADDR AT TREXIN2 BACK TO X'FFFFFFFF' 01013000
  669. BAL R14,TRANPTBK GET REAL ADDRESS OF 2ND INSTRUCTION 01014000
  670. BCR 7,R3 <BNZ> IF CAN'T GET IT, GIVE UP (SADLY). 01015000
  671. CLC 0(2,R2),HSVCB2+2 IS THE "SVC B2" STILL THERE ? 01016000
  672. BCR 7,R3 <BNE> NO (STRANGE) - LEAVE WELL ENOUGH ALONE. 01017000
  673. MVC 0(2,R2),TREXSVC2 PUT BACK 1ST 2 BYTES OF REAL INSTR 01018000
  674. BR R3 AND EXIT. 01019000
  675. EJECT 01020000
  676. * HANDLE TRACING BRANCHES AND/OR INSTRUCTIONS: 01021000
  677. * 01022000
  678. * NOTE: CAN TRACE ANY OF THE FOLLOWING: 01023000
  679. * (1) BRANCHES - ON PRINTER AND/OR TERMINAL 01024000
  680. * (2) INSTRUCTIONS - ON PRINTER AND/OR TERMINAL 01025000
  681. * (3) BRANCHES ON ONE DEVICE (E.G. TERMINAL) AND 01026000
  682. * INSTRUCTIONS ON THE OTHER DEVICE (E.G. PRINTER) 01027000
  683. * 01028000
  684. * R10 = VIRTUAL ADDRESS OF USER INSTRUCTION 01029000
  685. * 01030000
  686. TRA50 NI VMPEND,255-VMPERPND RESET "VMPERPND" TO AVOID PROBLEMS 01031000
  687. LR R1,R10 ADDRESS OF ACTUAL INSTRUCTION INTO R1 01032000
  688. STH R0,VMPSW+2 STORE VMPSW+2 (HARMLESS IF IN BC MODE) 01033000
  689. TM VMESTAT,VMEXTCM IN EXTENDED CONTROL MODE NOW ? 01034000
  690. BO TRA51 YES 01035000
  691. ICM R1,8,SAVER0+2 BC MODE - GET CC & PROGRAM MASK 01036000
  692. TRA51 ST R1,VMPSW+4 STORE VMPSW+4 01037000
  693. TM TREXCTL2,TREXBRAN ARE WE TRACING BRANCHES ? 01038000
  694. BZ TRA60 NO - JUST INSTRUCTIONS THIS TIME. 01039000
  695. * 01040000
  696. * HANDLE TRACING BRANCHES: 01041000
  697. * 01042000
  698. TRA52 OI SAVEWRK8,NOSTOP+NOTRAMSG SET NEEDED FLAG BITS 01043000
  699. CL R10,TREXIN2 ARE WE AT A BRANCH (SVC B2) PLACE ? 01044000
  700. BNE TRA56 NOPE - NOT THIS TIME. 01045000
  701. * (USE A PREFIX OF BLANKS) 01046000
  702. ICM R4,B'1111',TREXANSI GET ORIGIN @V408246 01047100
  703. BM TRA56 NOPE - FORGET IT. 01049000
  704. LA R2,TREXNSI YES - POINT TO THE INSTRUCTION THERE 01050000
  705. * (NOTE - SVC B2 IS STILL REALLY THERE) 01051000
  706. BAL R3,TRASET COMPUTE WHERE WE WOULD HAVE GONE 01052000
  707. CLI TREXNSI,X'05' IS IT A BALR INSTRUCTION @VA02397 01053000
  708. BNE CKADDR NO @VA02397 01054000
  709. TM TREXNSI+1,X'0F' IS BRANCH-TO REG ZERO @VA02397 01055000
  710. BZ CKADDR YES @VA02397 01056000
  711. SLR R1,R1 CLEAR A WORK REG @VA02397 01057000
  712. IC R1,TREXNSI+1 SEE IF THE TWO REGS IN THE BALR @VA02397 01058000
  713. LR R3,R1 INSTRUCTION ARE THE SAME REG @VA02397 01059000
  714. N R1,F15 ISOLATE 2ND REG IN R1 @VA02397 01060000
  715. SRL R3,4 SET UP 1ST REG IN R3 @VA02397 01061000
  716. CLR R1,R3 ARE THE TWO REGS THE SAME @VA02397 01062000
  717. BNE CKADDR NO @VA02397 01063000
  718. LR R1,R10 PUT BRANCHED-TO INST IN R1 @VA02397 01064000
  719. BAL R3,TRANADDR PUT ADDRESS INTO MESSAGE @VA02397 01065000
  720. B CKARROW FINISH MESSAGE @VA02397 01066000
  721. CKADDR CLR R7,R10 IS THAT WHERE WE ARE NOW ? @VA02397 01067000
  722. BNE TRA56 NO, FORGET IT - MUST BE VIA AN INTERRUPT 01068000
  723. * (WHICH WE WOULD HAVE JUST DISPLAYED) 01069000
  724. BAL R3,TRAGETBR BRANCH-TO ADDRESS INTO MESSAGE 01070000
  725. CKARROW CLI 1(R15),C' ' SOMETHING ALREADY THERE? @VA02397 01071000
  726. BNE TRA55 YES (NON-BLANK) LEAVE WELL ENOUGH ALONE 01072000
  727. MVC 0(3,R15),PFXARROW PUT IN AN ARROW: ==> NEW ADDR 01073000
  728. TRA55 BAL R3,TRAGET14 FILL IN THE FIELDS PRECEDING THIS 01074000
  729. MVI SAVEWRK1+3,TREXBRAN SET/RESET NEEDED FLAGBITS 01075000
  730. NI SAVEWRK8,255-NOSTOP ... 01076000
  731. BAL R3,TROUSUB AND OUTPUT THE "BRANCH" LINE. 01077000
  732. * 01078000
  733. TRA56 TM TREXCTL2,TREXINST TRACING INSTRUCTIONS ALSO ? 01079000
  734. BZ TRA62 NOPE - JUST BRANCHES THIS TIME. 01080000
  735. BAL R14,BLANKBUF YES - RESET THE OUTPUT BUFFER, 01081000
  736. NI SAVEWRK8,255-(NOSTOP+NOTRAMSG) RESET THESE FLAG BITS 01082000
  737. * CONTINUE - HANDLE TRACING INSTRUCTIONS: 01083000
  738. EJECT 01084000
  739. * HANDLE TRACING INSTRUCTIONS: 01085000
  740. * 01086000
  741. TRA60 OI SAVEWRK1+3,TREXINST SET TO GIVE INSTRUCTION OUTPUT 01087000
  742. * (USE A PREFIX OF BLANKS) 01088000
  743. CL R10,TREXIN1 DID WE TRANSFER CONTROL ? 01089000
  744. BE TRA62 NOPE - THE PREFIX IS OK. 01090000
  745. MVC TRLNINT,PFXBRNCH SHOW WE'RE AT A NEW PLACE 01091000
  746. TRA62 BAL R3,PUTBACK PUT BACK THE REAL INSTRUCTION(S) 01092000
  747. LR R4,R10 POINT TO THE INSTRUCTION WE WILL NOW DO 01093000
  748. BAL R3,TRAGET14 FILL IN THE PRELIMINARY FIELDS 01094000
  749. BAL R3,TRASET2 SET FOR NEXT INSTRUCTION ETC. 01095000
  750. TM SAVEWRK5+2,X'FF' IS IT SOME KIND OF BRANCH ? 01096000
  751. BZ TRA64 NOPE - LEAVE WELL ENOUGH ALONE 01097000
  752. BO TRA63 MODE-SWITCHING BRANCH - SHOW THE ADDRESS 01098000
  753. ST R4,TREXANSI REMEMBER WHERE ARE NOW 01099000
  754. MVC TREXNSI(6),SAVEWRK2 REMEMBER THE INSTRUCTION ALSO 01100000
  755. TRA63 BAL R3,TRAGETBR BRANCH-TO ADDR INTO MESSAGE 01101000
  756. TRA64 TM VMTRCTL,VMTRBRIN TRACING BRANCHES OR ALL INSTRUCTIONS ? 01102000
  757. BZ TRA90 NO (MUST BE PRIV ENTRY) - JUST GIVE MSG 01103000
  758. BAL R3,SETNEWB2 SET NEW B2 PLACE 01104000
  759. BAL R3,SETNEWB1 AND NEW B1 PLACE 01105000
  760. TM SAVEWRK8,NOSTOP+NOTRAMSG CHECK FLAG BITS 01106000
  761. BM TRA92 MIXED - IT'S JUST NOTRAMSG. 01107000
  762. BO TRA97 BOTH SET - NO MESSAGE AND DO NOT STOP. 01108000
  763. TM SAVEWRK1+3,TREXBRAN DID WE TRACE A BRANCH ABOVE ? 01109000
  764. BZ TRA90 NOPE - GO GIVE MESSAGE AS USUAL. 01110000
  765. NI SAVEWRK1+3,255-(TREXBRAN) YES, RESET FLAGBIT FOR TROUSUB 01111000
  766. BAL R3,TROUSUB OUTPUT THE "INSTRUCTION" LINE 01112000
  767. ICM R15,B'0011',TREXTERM TERM FLAGS @V408246 01112100
  768. BZ TRA94 NO..CONTINUE..... @VA04211 01112300
  769. TM TREXRUNF+1,TREXBRAN+TREXINST BOTH FLAGBITS SAY "RUN" ? 01113000
  770. BO TRA94 YES - "RUN" (UNLESS ATTN HIT BY USER) 01114000
  771. B TRA96 NO - THEN CALL DMKCFMBK ETC. 01115000
  772. SPACE 2 01116000
  773. * SUBROUTINE TO FILL IN VIRTUAL TRANSFER-TO ADDRESS (IF ANY) 01117000
  774. * AT ENTRY: 01118000
  775. * R3 = RETURN REGISTER 01119000
  776. * R7 = BRANCH-TO ADDRESS - IF ANY (X'FFFFFFFF' IF NONE) 01120000
  777. * ACTUAL INSTRUCTION IS IN TREXNSI 01121000
  778. SPACE 01122000
  779. TRAGETBR LTR R1,R7 BRANCH-TO-ADDRESS (IF ANY) INTO R1 01123000
  780. BCR 4,R3 <BM> IF MINUS (X'FFFFFFFF') EXIT FORTHWITH 01124000
  781. TRANADDR CALL DMKCVTBH BINARY TO HEX PLEASE @VA02397 01125000
  782. LA R15,TRLNINS6-4 WHERE TO PUT ARROW & BRANCH-TO ADDRESS 01126000
  783. CLI TREXNSI,X'44' WAS THE INSTRUCTION AN EXECUTE ? 01127000
  784. BNE TRA69 NOPE - WE'RE ALL SET. 01128000
  785. LA R15,TRLNINS9-4 WHERE TO PUT BRANCH-TO ADDR FOR EX-BRANCH 01129000
  786. TRA69 CLI 4(R15),C' ' FIELD ALREADY FILLED IN (LPSW OR EX-LPSW) 01130000
  787. BCR 7,R3 <BNE> IF YES (NON-BLANK), JUST EXIT. 01131000
  788. STH R0,4(,R15) OTHERWISE, STORE BRANCH-TO ADDRESS 01132000
  789. ST R1,6(,R15) ... 01133000
  790. BR R3 EXIT (NOTE: R15 = WHERE-TO-PUT ARROW) 01134000
  791. EJECT 01135000
  792. * SUBROUTINE TO OBTAIN USER INSTRUCTION FROM VIRTUAL MEMORY AND 01136000
  793. * PUT IN A SAVE-AREA FOR GENERAL USE, ALSO FILLING IN OUTPUT LINE 01137000
  794. * 01138000
  795. * AT ENTRY: 01139000
  796. * R1 = VIRTUAL ADDRESS OF USER INSTRUCTION 01140000
  797. * R3 = RETURN REGISTER 01141000
  798. * R8 = ADDRESS OF SAVE AREA (E.G. SAVEWRK2 OR SAVEWRK4) 01142000
  799. * AT EXIT: 01143000
  800. * VIRTUAL INSTRUCTION (IF VALID) IS IN SAVE AREA 01144000
  801. * AND FIELDS TRLNINT1 & TRLNINS2-5 HAVE BEEN FILLED IN 01145000
  802. * 01146000
  803. TRAGET14 LR R1,R4 ENTER HERE IF VIRTUAL ADDRESS IS IN R4 01147000
  804. LA R8,SAVEWRK2 LET SAVEWRK2 (6 BYTES) BE THE SAVE-AREA 01148000
  805. * 01149000
  806. TRAGET MVC 0(6,R8),ZEROES CLEAR 6 BYTES AT THE SAVE AREA 01150000
  807. LR R2,R1 REMEMBER VIRTUAL ADDRESS IN R2 01151000
  808. CALL DMKCVTBH CONVERT TO PRINTABLE HEX 01152000
  809. STH R0,TRLNINT1 STORE IN MESSAGE 01153000
  810. STCM R1,B'1111',TRLNINT1+2 @VA07715 01154100
  811. LA R15,1 MAKE SURE THE ADDRESS = AN EVEN NUMBER 01155000
  812. NR R15,R2 ... 01156000
  813. BCR 7,R3 <BNZ> IF ODD GIVE UP; IT WILL PROGRAM INTERRUPT 01157000
  814. LR R1,R2 ADDRESS BACK IN R1 NOW PLEASE 01158000
  815. BAL R14,TRANVIRT GET 1ST 2 BYTES OF INSTRUCTION 01159000
  816. BCR 7,R3 <BNZ> (BEWARE ADDRESSING ERROR) 01160000
  817. MVC 0(2,R8),0(R2) SAVE THE FIRST TWO BYTES 01161000
  818. LA R2,2(,R1) GET VIRT. ADDR. OF THE NEXT TWO BYTES 01162000
  819. LH R0,0(,R8) OP-CODE INTO R0 01163000
  820. LA R1,TRLNINS2 POINT TO WHERE THE MNEMONIC SHOULD GO 01164000
  821. CALL DMKNEMOP GO MNEMONIC SUBROUTINE GO 01165000
  822. BZ TRAGET1 IF COND CODE = 0, NOT A PRIV. INSTRUCTION 01166000
  823. L R15,VMTREXT MAKE SURE WE REFERENCE TREXT BLOCK 01167000
  824. USING TREXT,R15 (R9 CAN BE FUDGED IF EXECUTED INSTR) 01168000
  825. CLI TRLNINT,C' ' ANY PREFIX ALREADY THERE ? 01169000
  826. BNE TRAGET1 YES (NON-BLANK) LEAVE IT ALONE. 01170000
  827. MVC TRLNINT(3),PFXPRV NO, USE PRIVILEGED-INSTRUCTION PREFIX 01171000
  828. DROP R15 01172000
  829. TRAGET1 LH R1,0(,R8) 1ST TWO BYTES INTO R1, 01173000
  830. CALL DMKCVTBH BINARY TO HEX PLEASE 01174000
  831. STCM R1,B'1111',TRLNINS3 STORE IN MESSAGE @VA07715 01175100
  832. CLI 0(R8),X'40' RR INSTRUCTION ? 01176000
  833. BCR 4,R3 <BL> YES - RETURN TO CALLER. 01177000
  834. LR R1,R2 ADDR OF NEXT TWO BYTES INTO R1 01178000
  835. BAL R14,TRANVIRT GO GET EM 01179000
  836. BCR 7,R3 <BNZ> (BEWARE ADDRESSING ERROR) 01180000
  837. MVC 2(2,R8),0(R2) SAVE THE 3RD & 4TH BYTES 01181000
  838. LA R2,2(,R1) REMEMBER WHERE THE LAST TWO BYTES WILL BE 01182000
  839. LH R1,2(,R8) 3RD & 4TH BYTES BINARY TO HEX 01183000
  840. CALL DMKCVTBH ... 01184000
  841. STCM R1,B'1111',TRLNINS4 STORE IN MESSAGE @VA07715 01185100
  842. CLI 0(R8),X'C0' RS, RS, OR SI INSTRUCTION ? 01186000
  843. BCR 4,R3 <BL> YES - RETURN TO CALLER. 01187000
  844. LR R1,R2 ADDR OF LAST TWO BYTES INTO R1 01188000
  845. BAL R14,TRANVIRT GO GET EM 01189000
  846. BCR 7,R3 <BNZ> (BEWARE ADDRESSING ERROR) 01190000
  847. MVC 4(2,R8),0(R2) SAVE THE LAST TWO BYTES 01191000
  848. LH R1,4(,R8) LAST TWO BYTES BINARY TO HEX 01192000
  849. CALL DMKCVTBH ... 01193000
  850. STCM R1,B'1111',TRLNINS5 STORE IN MESSAGE @VA07715 01194100
  851. BR R3 AND RETURN TO CALLER. 01195000
  852. EJECT 01196000
  853. * MAIN ROUTINE TO COMPUTE ADDRESSES FOR "NEXT SEQUENTIAL INSTRUCTION" 01197000
  854. * AND ADDRESSES AT WHICH TO PLACE "SVC B1" AND/OR "SVC B2" FOR BRANCHES 01198000
  855. * 01199000
  856. * AT ENTRY: 01200000
  857. * R4 = VIRTUAL ADDRESS OF "THIS" OR "PREVIOUS" INSTRUCTION 01201000
  858. * R2 = REAL ADDRESS OF SAID INSTRUCTION (WHICH MUST BE AVAILABLE 01202000
  859. * SOMEWHERE, E.G. IN VMINST, TREXNSI, OR SAVEWRK2/SAVEWRK4) 01203000
  860. * R3 = RETURN REGISTER 01204000
  861. * 01205000
  862. * AT EXIT: 01206000
  863. * R5 = ADDRESS OF "NEXT" INSTRUCTION (= R4 + 2, 4, OR 6) 01207000
  864. * R6 = ADDRESS AT WHICH TO PLACE "SVC B1" INSTRUCTION 01208000
  865. * (VALUE OF X'FFFFFFFF' = DO NOT SET "SVC B1") 01209000
  866. * R7 = ADDRESS AT WHICH TO PLACE "SVC B2" INSTRUCTION 01210000
  867. * (VALUE OF X'FFFFFFFF' = DO NOT SET "SVC B2") 01211000
  868. * 01212000
  869. * NOTE - IF "THIS INSTRUCTION" IS AN EXECUTE (X'44'), ALSO 01213000
  870. * FILLS IN APPROPRIATE LINES OF THE OUTPUT MESSAGE FOR SAME 01214000
  871. * 01215000
  872. TRASET2 LA R2,SAVEWRK2 ENTER HERE TO SET R2 = A(SAVEWRK2) 01216000
  873. MVI TREXNSI,00 CLEAR 1ST BYTE OF "TREXNSI" 01217000
  874. * 01218000
  875. TRASET LM R6,R7,FFS INITIALIZE R6 & R7 = X'FFFFFFFF' 01219000
  876. MVC SAVEWRK4(8),ZEROES CLEAR SAVEWRK4 & SAVEWRK5 ... 01220000
  877. * SAVEWRK4 = 00 MEANS NOT EXECUTED INSTRUCTION 01221000
  878. * SAVEWRK5+2 = 00 MEANS NOT A BRANCH 01222000
  879. CLI 0(R2),X'40' IS IT 'RR' - LESS THAN 40 ? 01223000
  880. BL TRASMALL YES - GO SEE IF RR-TYPE BRANCH. 01224000
  881. CLI 0(R2),X'C0' IS IT 'SS' - C0 UP ? 01225000
  882. BNL TRALARGE YES - IT'S NOT BRANCH, EITHER. 01226000
  883. LA R5,4(,R4) IF 40 TO BF, IT'S A 4-BYTE INSTRUCTION 01227000
  884. CLI 0(R2),X'44' CHECK FOR EXECUTE (44) 01228000
  885. BH TRAGT44 TRF IF > 44 01229000
  886. BL TRANEXT IF < 44 WE KNOW IT'S NOT A BRANCH. 01230000
  887. * IF = 44 (EXECUTE), GET THE EXECUTED INSTRUCTION: 01231000
  888. SLR R8,R8 PICK UP THE "R1" FIELD OF THE EX 01232000
  889. IC R8,1(,R2) INSTRUCTION, 01233000
  890. SRL R8,4 SHIFT TO ISOLATE IT, & REMEMBER IT IN R8 01234000
  891. CALL DMKPSARX GET VIRTUAL ADDRESS OF EXECUTED INST. 01235000
  892. ST R1,SAVEWRK6 REMEMBER VIRT ADDR OF EXECUTED INSTR 01236000
  893. STH R8,SAVEWRK2+6 REMEMBER R8 01237000
  894. LR R5,R3 REMEMBER R3 01238000
  895. LA R9,TRLNBUMP(,R9) BUMP R9 FOR PARALLEL MSG FIELDS 01239000
  896. LA R8,SAVEWRK4 PUT THE EXECUTED INSTRUCTION AT SAVEWRK4 01240000
  897. BAL R3,TRAGET GET THE EXECUTED INSTRUCTION ETC. 01241000
  898. L R9,VMTREXT RESTORE R9 QUICK 01242000
  899. LH R8,SAVEWRK2+6 RESTORE R8 01243000
  900. LR R3,R5 RESTORE R3 01244000
  901. LA R5,4(,R4) RESTORE R5 = R4+4 01245000
  902. AR R8,R8 DOUBLE THE "R1" FIELD FROM THE EX INSTR 01246000
  903. BZ TRA44B IF = 0, THE "R1" FIELD WAS NONEXISTENT 01247000
  904. AR R8,R8 NOW WE HAVE IT TIMES 4, 01248000
  905. L R1,VMGPRS(R8) NOW GET THE REAL "R1" REG. FROM VMBLOK, 01249000
  906. IC R15,SAVEWRK4+1 PICK UP THE 2ND BYTE OF THE EXECUTED INST 01250000
  907. OR R15,R1 OR THE TWO BYTES TOGETHER LIKE 'EX' DOES 01251000
  908. STC R15,SAVEWRK4+1 AND STORE IN THE EXECUTED INSTRUCTION 01252000
  909. CALL DMKCVTBH EX "R1" REGISTER BINARY TO HEX PLEASE 01253000
  910. STH R1,TRLNINS7 AND STORE IN THE EXECUTE OUTPUT MSG 01254000
  911. LH R0,SAVEWRK4 GET 1ST TWO BYTES OF EXECUTED-INSTRUCTION 01255000
  912. LA R1,TRLNINSM POINT TO MNEMONIC FOR SAME, 01256000
  913. CALL DMKNEMOP GET MNEMONIC FOR THE EXECUTED-INSTRUCTION 01257000
  914. TRA44B LA R2,SAVEWRK4 NOW LET R2 POINT AT THE EXECUTED INSTR. 01258000
  915. CL R5,SAVEWRK6 IS EXECUTED INSTRUCTION DIRECTLY IN LINE? 01259000
  916. BNE TRA44D NOPE - NO PROBLEMS. 01260000
  917. LA R5,2(,R5) POINT TO END OF POSSIBLE RR INSTR 01261000
  918. CLI 0(R2),X'40' IS IT AN RR ? 01262000
  919. BL TRA44C YES. 01263000
  920. LA R5,2(,R5) POINT TO END OF POSSIBLE RX, RS, SI INSTR 01264000
  921. CLI 0(R2),X'C0' IS IT ONE OF THESE ? 01265000
  922. BL TRA44C YES. 01266000
  923. LA R5,2(,R5) POINT TO END OF SS INSTR IF NONE OF ABOVE 01267000
  924. TRA44C DS 0H R5 SET TO PUT SVC B1 AFTER EXECUTED INSTR 01268000
  925. * 01269000
  926. TRA44D CLI 0(R2),X'44' NOW TEST FOR EXECUTE OF AN EXECUTE INSTR 01270000
  927. BL TRASMAL2 IF < 44 GO SEE IF AN RR-TYPE BRANCH 01271000
  928. BCR 8,R3 <BE> IF = EX, IT WILL PROGRAM INTERRUPT. 01272000
  929. * > 44, CONTINUE AS A NORMAL INSTR. > 44: 01273000
  930. SPACE 01274000
  931. TRAGT44 DS 0H INSTRUCTION IS KNOWN TO BE > 44 (EX): 01275000
  932. CLI 0(R2),X'87' CHECK FOR BXLE = 87 01276000
  933. BH CHKSTXSM IF > 87, CHECK FOR STNSM OR STOSM (AC/AD) 01277000
  934. CLI 0(R2),X'86' CHECK FOR BXLE OR BXH = 86 01278000
  935. BNL TRABXH IF EITHER BXH OR BXLE GO HANDLE. 01279000
  936. CLI 0(R2),X'47' IF < 86, CHECK FOR BC = 47 01280000
  937. BH TRAGT47 IF > 47 JUST ONE MORE CHECK, FELLAS. 01281000
  938. CALL DMKPSARX IF 45 - 47, GET VIRTUAL ADDRESS 01282000
  939. CLI 0(R2),X'46' OK, NOW WHICH ONE IS IT ? 01283000
  940. B TRABTEST TEST FOR BAL (45), BCT (46), OR BC (47) 01284000
  941. * 01285000
  942. TRAGT47 DS 0H INSTRUCTION IS KNOWN TO BE > 47 & < 86: 01286000
  943. CLI 0(R2),X'82' IS IT LPSW ? 01287000
  944. BE TRALPSW YES - LPSW. 01288000
  945. CLI 0(R2),X'80' IS IT SSM ? 01289000
  946. BNE TRANEXT NO - NOT A BRANCH. 01290000
  947. * SAVEWRK5+3 = 00 MEANS IT'S AN SSM ... 01291000
  948. TRASSM1 DS 0H HANDLE SSM, STNSM, OR STOSM: 01292000
  949. CALL DMKPSARS GET (SINGLE-INDEXED) ADDRESS OF S1 FIELD 01293000
  950. BAL R14,TRANVIRT GET THE ACTUAL SSM-BYTE 01294000
  951. BCR 7,R3 <BNZ> IF WE COULDN'T GET IT, FORGET IT. 01295000
  952. CLI SAVEWRK5+3,00 NOW WAS THAT AN SSM ? 01296000
  953. BE TRASSM2 YES. 01297000
  954. CALL DMKPSASP NO (STNSM/STOSM) CHECK @V202232 01298000
  955. * PROTECTION VIOL. 01299000
  956. BCR 7,R3 <BNZ> PROTECTION VIOLATION IF CC NONZERO. 01300000
  957. LR R1,R8 STNSM/STOSM BYTE INTO R1 01301000
  958. IC R2,VMPSW OLD VMPSW BYTE INTO R2 01302000
  959. CLI SAVEWRK5+3,X'AC' NOW WHICH ONE WAS IT (I'VE FORGOTTEN) 01303000
  960. BE TRASTNSM OH YES - STNSM. 01304000
  961. OR R2,R1 STOSM - 'OR' THEM TOGETHER 01305000
  962. B TRASSM3 AND PREPARE TO CONVER TO HEX ETC. 01306000
  963. TRASTNSM NR R2,R1 STNSM - 'AND' THEM TOGETHER 01307000
  964. B TRASSM3 AND PREPARE TO CONVERT TO HEX ETC. 01308000
  965. * 01309000
  966. TRASSM2 IC R2,0(,R2) GET (& REMEMBER) ACTUAL SSM-BYTE 01310000
  967. * 01311000
  968. TRASSM3 LR R1,R2 PLACE "SSM-BYTE" IN R1 FOR CONVERT TO HEX 01312000
  969. LA R8,TRLNINS7 WHERE TO PUT SSM-BYTE (UNLESS EXECUTED) 01313000
  970. CLI SAVEWRK4,00 WAS THIS AN EXECUTED SSM (OR EQUIV.) 01314000
  971. BE TRASSM4 NOPE - CONTINUE BELOW. 01315000
  972. LA R8,TRLNBUMP(,R8) BUMP R8 FOR EXECUTED INSTRUCTIONS 01316000
  973. TRASSM4 CALL DMKCVTBH "SSM BYTE" BINARY TO HEX 01317000
  974. STH R1,0(,R8) STORE IN MESSAGE LINE 01318000
  975. CLI SAVEWRK5+3,00 NOW WAS THAT AN SSM OR SOME OTHER ? 01319000
  976. BNE TRASSM5 OTHER - MUST BE STNSM OR STOSM. 01320000
  977. TM VMPSTAT,VMV370R IS IT AN EC-MODE MACHINE ? 01321000
  978. BO CHKVCR0 YES. 01322000
  979. TM VMVCR0,X'40' NO, IS BIT 1, CR0 = 1 ? 01323000
  980. BZ TRANEXT NO - NORMAL SSM 01324000
  981. BR R3 YES - EXIT (WILL PROGRAM-CHECK). 01325000
  982. * 01326000
  983. CHKVCR0 L R15,VMECEXT POINT TO EXTENSION BLOCK 01327000
  984. USING ECBLOK,R15 01328000
  985. TM EXTCR0,X'40' IS BIT 1, CR0 = 1 ? 01329000
  986. BCR 1,R3 <BO> YES - EXIT (WILL PROGRAM-CHECK). 01330000
  987. DROP R15 01331000
  988. TRASSM5 TM VMESTAT,VMEXTCM IN EXTENDED MODE NOW ? 01332000
  989. BZ TRANEXT NOPE - NO PROBLEM - SET FOR NEXT INSTR. 01333000
  990. * NOTE: R2 HOLDS "NEW" SYSTEM-MASK ... 01334000
  991. LA R0,255-(PERMODE+TRANMODE+IOMASK+EXTMASK) ILLEGAL BITS 01335000
  992. NR R0,R2 ANY ILLEGAL BITS IN THE NEW SYSTEM-MASK ? 01336000
  993. BCR 7,R3 <BNZ> YES (TUT TUT) - EXIT (WILL PROGRAM CHECK) 01337000
  994. LA R0,TRANMODE SET TO EXAMINE 'TRANMODE' BIT IN SSM-BYTE 01338000
  995. IC R15,VMPSW SIMILAR BYTE FROM OLD V.M. PSW 01339000
  996. NR R2,R0 ISOLATE JUST THE BIT WE WANT 01340000
  997. NR R15,R0 DITTO 01341000
  998. CLR R2,R15 DO THEY MATCH ? 01342000
  999. BE TRANEXT YES - NO TRANSLATE-MODE CHANGE. 01343000
  1000. LR R7,R5 NO - SET R7 FOR "UNCONDITIONAL BRANCH", 01344000
  1001. MVI SAVEWRK5+2,X'FF' BUT SIGNAL DON'T SET AN "SVC B2" 01345000
  1002. B ECBCRUN @VA05533 01346100
  1003. SPACE 01347000
  1004. CHKSTXSM CLI 0(R2),X'AD' 'STORE THEN OR SYSTEM MASK' (STOSM) ? 01348000
  1005. BH TRANEXT NOT THIS TIME. 01349000
  1006. CLI 0(R2),X'AC' OR 'STORE THEN AND SYSTEM MASK' (STNSM) ? 01350000
  1007. BL TRANEXT SOME OTHER TIME, PERHAPS. 01351000
  1008. MVC SAVEWRK5+3(1),0(R2) REMEMBER WHAT WE'VE GOT HERE 01352000
  1009. IC R8,1(,R2) REMEMBER THE STNSM/STOSM BYTE IN R8 01353000
  1010. B TRASSM1 AND JOIN COMMON 'SSM' CODE. 01354000
  1011. SPACE 01355000
  1012. TRALPSW DS 0H LPSW 01356000
  1013. CALL DMKPSARS GET (SINGLE-INDEXED) ADDRESS OF S1 FIELD 01357000
  1014. LA R15,7 MAKE SURE DBL-WORD ALIGNED 01358000
  1015. NR R15,R1 ... 01359000
  1016. BCR 7,R3 <BNZ> IF NOT, IT WILL PROGRAM INTERRUPT. 01360000
  1017. BAL R14,TRANVIRT GET ADDRESS OF USER'S ACTUAL PSW 01361000
  1018. BCR 7,R3 <BNZ> (BEWARE ADDRESSING ERROR) 01362000
  1019. LA R8,TRLNINS6-4 WHERE TO PUT ARROW AND LPSW DBL-WORD 01363000
  1020. CLI SAVEWRK4,X'82' WAS THIS AN EXECUTED LPSW ? 01364000
  1021. BNE TRALPSW1 NOPE - NOT THIS TIME. 01365000
  1022. LA R8,TRLNINS9-4 YES, SET R8 CORRECTLY AS NEEDED BELOW. 01366000
  1023. TRALPSW1 TM 1(R2),WAIT IS THE WAIT BIT ON ? 01367000
  1024. BO TRALPSW6 IF YES, DON'T SET R7. 01368000
  1025. TM 7(R2),X'01' IS THE ADDRESS AN ODD NUMBER ? 01369000
  1026. BO TRALPSW6 IF YES, IT WILL PROGRAM-CHECK. 01370000
  1027. TM 1(R2),EXTMODE USER GOING TO ECMODE? @VA02609 01371000
  1028. BZ TRALPSW7 NO @VA02609 01372000
  1029. TM VMPSTAT,VMV370R YES - IS HE ALLOWED? @VA02609 01373000
  1030. BZ TRALPSW6 NO - PGM CHK WILL FOLLOW @VA02609 01374000
  1031. TRALPSW7 EQU * @VA02609 01375000
  1032. L R1,4(,R2) GET ADDR HE WILL GO TO @VA02609 01376000
  1033. LA R1,0(,R1) MINUS THE HIGH ORDER BYTE @VA02609 01377000
  1034. TM VMPSTAT,VMV370R POSSIBLY ECMODE ?? @VA02609 01378000
  1035. BZ TRALPSW8 NO @VA02609 01379000
  1036. * IF USER ENTERING TRANLATE MODE, 'TO' ADDR MAY BE > VMSIZE 01380000
  1037. TM 0(R2),TRANMODE ENTERING TRANSLATE MODE? @VA02609 01381000
  1038. BO TRALPSW2 YES - CHKS DONE LATER @VA02609 01382000
  1039. TRALPSW8 EQU * @VA02609 01383000
  1040. LRA R0,0(,R1) IS IT A VALID ADDRESS ? @V304635 01384000
  1041. BC 8+2,TRALPSW2 CONTINUE IF IT'S NOT A SEG @V408246 01385100
  1042. * EXCEPTION 01385300
  1043. CALL DMKPTRLK TEMP. FIX PAGE @V408246 01385310
  1044. LR R0,R2 SAVE R2 @V408246 01385320
  1045. CALL DMKPTRAN,PARM=DEFER OTHERWISE LET PTRAN HANDLE @V408246 01385500
  1046. LR R2,R0 RESTORE R2 @V408246 01385510
  1047. BALR R0,R0 SAVE C.C. @V408246 01385520
  1048. CALL DMKPTRUL UNFIX PAGE @V408246 01385530
  1049. SPM R0 RESTORE C.C. @V408246 01385540
  1050. BC 2,TRALPSW6 ADDRESSING ERROR @V408246 01385700
  1051. TRALPSW2 MVC 0(3,R8),PFXARROW OK - PUT IN AN ARROW: ==> NEW ADDR 01386000
  1052. LR R7,R1 SET LPSW-TO ADDRESS IN R7 01387000
  1053. MVI SAVEWRK5+2,X'FF' BUT ASSUME CAN'T SET "SVC B2" 01388000
  1054. CLI TREXNSI,00 TREXNSI ALREADY NONZERO (X'44' OR '82') ? 01389000
  1055. BNE TRALPSW3 YES (NONZERO) - LEAVE WELL ENOUGH ALONE 01390000
  1056. MVI TREXNSI,X'82' NO - INDICATE AN LPSW HANDLED BY DMKTRC 01391000
  1057. TRALPSW3 L R0,TRANMASK MASK OF BITS WHICH MUST MATCH OLD PSW 01392000
  1058. LR R14,R0 FOR IT TO BE SAFE TO SET "SVC B2" NOW 01393000
  1059. N R0,0(,R2) GET CRUCIAL BITS FROM NEW PSW 01394000
  1060. N R14,VMPSW AND CRUCIAL BITS FROM OLD PSW 01395000
  1061. CLR R0,R14 POSSIBLY EXACTLY THE SAME ? 01396000
  1062. BE TRALPSW5 IF YES THAT MAKES IT EASY. 01397000
  1063. TM VMPSW+1,EXTMODE IN BC OR EXTENDED MODE RIGHT NOW ? 01398000
  1064. BZ TRALPSW4 BC - SEE IF GOING INTO EXTENDED & TRANS 01399000
  1065. TM VMPSW,TRANMODE EXTENDED - IN TRANSLATE MODE NOW ? 01400000
  1066. BO TRALPSW6 IF YES WE KNOW IT WILL BE SWITCHING. 01401000
  1067. TRALPSW4 CL R0,TRANMASK GOING INTO EXTENDED & TRANSLATE ? 01402000
  1068. BE TRALPSW6 IF YES WE KNOW IT WILL BE SWITCHING. 01403000
  1069. TRALPSW5 MVI SAVEWRK5+2,X'0F' OK TO SET "SVC B2" ADDRESS AFTER ALL 01404000
  1070. TRALPSW6 LM R1,R2,0(R2) ACTUAL LPSW INTO R1-R2 01405000
  1071. CALL DMKCVTBH 1ST HALF OF LPSW DBL-WORD INTO HEX, 01406000
  1072. STM R0,R1,4(R8) STORE IN OUTPUT LINE 01407000
  1073. LR R1,R2 SECOND HALF 01408000
  1074. CALL DMKCVTBH BINARY TO HEX 01409000
  1075. STM R0,R1,13(R8) AND STORE IN OUTPUT LINE 01410000
  1076. CLI SAVEWRK5+2,X'0F' WILL SVC B2 ADDR BE SET? @VA04044 01410100
  1077. BER R3 YES - NO NEED TO WARN DSP @VA04044 01410200
  1078. ECBCRUN TM TREXCTL2,TREXINST TRACING ALL INSTRUCTIONS? @VA05533 01410300
  1079. BNO FORCEPRV NO, WARN DISPATCH @VA05533 01410400
  1080. TM TREXRUNF,TREXINST IS IT INSTRUCTIONS RUN? @VA05533 01410500
  1081. BOR R3 YES, THEN WE'RE OK @VA05533 01410600
  1082. FORCEPRV OI TREXFLAG,TREXNDSP HAVE DISPATCH CALL DMKTRCIT @VA05533 01410700
  1083. BR R3 AND RETURN TO CALLER. 01411000
  1084. * 01412000
  1085. TRABXH DS 0H BXH (86) OR BXLE (87) 01413000
  1086. CALL DMKPSARS GET (SINGLE-INDEXED) VIRTUAL ADDRESS 01414000
  1087. * 01415000
  1088. * INSTRUCTION IS A CONDITIONAL BRANCH ... 01416000
  1089. TRACOND LR R6,R5 SET R6 ADDRESS FOR NEXT SEQUENTIAL INSTR. 01417000
  1090. LR R7,R1 SET R7 ADDRESS FOR TRANSFER-TO ADDRESS 01418000
  1091. MVI SAVEWRK5+2,X'F0' SIGNAL: CONDITIONAL BRANCH 01419000
  1092. BR R3 AND RETURN TO CALLER. 01420000
  1093. SPACE 01421000
  1094. * INSTRUCTION (NOT EXECUTED) IS AN "RR" INSTRUCTION: 01422000
  1095. TRASMALL LA R5,2(,R4) FOR "RR" ADD 2 FOR NEXT INSTRUCTION 01423000
  1096. * 01424000
  1097. TRASMAL2 CLI 0(R2),X'07' CHECK FOR BCR = 07 01425000
  1098. BH TRASVC IF > 7, CHECK IF IT'S AN SVC 01426000
  1099. CLI 0(R2),X'05' IF < 7, CHECK FOR BALR = 05. 01427000
  1100. BL TRANEXT IF < 5, IT'S NOT A BRANCH. 01428000
  1101. CALL DMKPSARR 05-07, OBTAIN & CHECK "R2" REGISTER 01429000
  1102. BZ TRANEXT IF NONEXISTENT IT'S NOT A BRANCH. 01430000
  1103. CLI 0(R2),X'06' WAS IT BALR (05), BCTR (06), OR BCR (07) 01431000
  1104. * 01432000
  1105. TRABTEST BL TRABRNCH BALR | BAL - AN UNCONDITIONAL BRANCH 01433000
  1106. BE TRACOND BCTR | BCT - A CONDITIONAL BRANCH 01434000
  1107. * 01435000
  1108. TRABCTST TM 1(R2),X'F0' TEST "M" FIELD OF BCR OR BC INSTRUCTION 01436000
  1109. BM TRACOND IF 1 TO 14, IT'S A CONDITIONAL BRANCH 01437000
  1110. BZ TRANEXT IF = 0 IT'S A NO-OP (WON'T BRANCH) 01438000
  1111. * INSTRUCTION IS AN UNCONDITIONAL BRANCH ... 01439000
  1112. TRABRNCH LR R7,R1 SET R7 ADDRESS FOR TRANSFER-TO ADDRESS 01440000
  1113. LR R6,R5 GET NEXT SEQUENTIAL INSTR @VA08753 01440100
  1114. MVI SAVEWRK5+2,X'0F' SIGNAL: VANILLA-TYPE UNCOND. BRANCH 01441000
  1115. BR R3 AND RETURN TO CALLER. 01442000
  1116. SPACE 2 01443000
  1117. TRALARGE LA R5,6(,R4) FOR "SS" INSTRUCTIONS ADD 6 TO GET ADDR 01444000
  1118. * 01445000
  1119. TRANEXT LR R6,R5 SET R6 ADDRESS FOR NEXT SEQUENTIAL INSTR. 01446000
  1120. BR R3 AND RETURN TO CALLER. 01447000
  1121. * 01448000
  1122. TRASVC CLI 0(R2),X'0A' IS IT AN SVC ? 01449000
  1123. BNE TRANEXT NO - SET R6 FOR NEXT SEQUENT. INSTRUCTION 01450000
  1124. OI TREXFLAG,TREXNDSP TELL DSP HANDS OFF @VA04044 01450500
  1125. BR R3 YES (COULD BE ADSTOP) - LEAVE ALONE. 01451000
  1126. EJECT 01452000
  1127. * SETNEWB2 = SUBROUTINE TO SET "SVC B2" AT BRANCH-TO-ADDRESS 01453000
  1128. * 01454000
  1129. * AT ENTRY: 01455000
  1130. * R7 = VIRTUAL ADDRESS TO WHICH CONTROL WILL/MAY BRANCH 01456000
  1131. * R3 = RETURN REGISTER 01457000
  1132. * R4 = ADDRESS OF "THIS INSTRUCTION" 01458000
  1133. SETNEWB2 CLR R7,R4 IS VIRT ADDRESS SAME AS THIS INSTRUCTION? 01459000
  1134. BCR 8,R3 <BE> IF YES (E.G. "B *") LEAVE IT ALONE. 01460000
  1135. LTR R1,R7 IF NOT, SET R1 (AND CHECK SIGN) 01461000
  1136. BCR 4,R3 <BM> IF MINUS (X'FFFFFFFF') EXIT FORTHWITH. 01462000
  1137. CLI SAVEWRK5+2,X'FF' FLAG SET = CANNOT SET SVC B2 NOW ? 01463000
  1138. BCR 8,R3 <BE> YES - DISPATCH WILL HAVE TO SET LATER. 01464000
  1139. SETNEWB4 BAL R14,TRANVIRT GET REAL ADDRESS OF BRANCH-TO PLACE 01465000
  1140. BCR 7,R3 <BNZ> (BEWARE ADDRESSING ERROR) 01466000
  1141. ST R7,TREXIN2 STORE VIRTUAL ADDRESS OF REPLACED INSTR 01467000
  1142. MVC TREXSVC2(2),0(R2) SAVE THE INSTRUCTION THERE, AND 01468000
  1143. HSVCB2 LA R15,SVCB2 REPLACE IT BY "SVC B2" 01469000
  1144. B SETNEWB5 AND REMEMBER VIRTUAL ADDRESS LEVEL. 01470000
  1145. SPACE 2 01471000
  1146. * SETNEWB1 = SUBROUTINE TO SET "SVC B1" AT NEXT SEQUENTIAL INSTR 01472000
  1147. * R6 = ADDRESS AT WHICH TO SET THE "SVC B1" 01473000
  1148. * R3 = RETURN REGISTER 01474000
  1149. SETNEWB1 CL R6,TREXIN2 SAME AS BRANCH-TO-ADDRESS ALREADY SET ? 01475000
  1150. BCR 8,R3 <BE> IF YES (E.G. "B *+4") LEAVE IT ALONE 01476000
  1151. SETNEWB3 LTR R1,R6 IF NOT, SET R1 (AND CHECK SIGN) 01477000
  1152. BCR 4,R3 <BM> IF MINUS (X'FFFFFFFF') EXIT FORTHWITH. 01478000
  1153. BAL R14,TRANVIRT TRY TO GET REAL ADDR OF NEXT INSTRUCTION 01479000
  1154. BCR 7,R3 <BNZ> (BEWARE INVALID ADDRESS) 01480000
  1155. ST R6,TREXIN1 STORE VIRTUAL ADDRESS OF REPLACED INSTR 01481000
  1156. MVC TREXSVC1(2),0(R2) SAVE THE INSTRUCTION THERE, AND 01482000
  1157. LA R15,SVCB1 REPLACE IT BY "SVC B1" 01483000
  1158. SETNEWB5 ST R15,SAVEWRK3 SAVE SVC (B1/B2) @V304735 01484000
  1159. RECHECK SLR R0,R0 INDICATE ABLE TO STORE ANYWHERE @V304735 01485000
  1160. CALL DMKPSASC GOING TO STORE INTO SHARED PAGE? @V304735 01486000
  1161. BZ SVCBYTE NO - PUT SVC IN STORAGE @V304735 01487000
  1162. LR R2,R1 GET VITURAL ADDRESS @VA12533 01487200
  1163. CALL DMKATSCF BUILD NON-SHARED PAGE TABLES @V60BC11 01488100
  1164. BAL R14,TRANVIRT GET THE REAL ADDRESS AGAIN @V304735 01490000
  1165. B RECHECK CHECK AGAIN FOR SHARED PAGE @V304735 01491000
  1166. SVCBYTE DS 0H @V408246 01492100
  1167. MVC 0(2,R2),SAVEWRK3+2 RESTORE SVC INDICATOR @V408246 01493100
  1168. NI TREXFLAG,255-TREXVAT RESET TREXVAT FLAGBIT TO 0 01494000
  1169. TM VMESTAT,VMEXTCM IN EC-MODE NOW ? 01495000
  1170. BCR 8,R3 <BZ> NO - JUST EXIT. 01496000
  1171. TM VMPSW+1,EXTMODE PSW STILL SAY ECMODE? @VA04044 01496300
  1172. BCR 8,R3 <BZ> NO - JUST RETURN @VA04044 01496600
  1173. TM VMPSW,TRANMODE IN EC-MODE, IN TRANSLATE MODE ALSO ? 01497000
  1174. BCR 8,R3 <BZ> NO - JUST EXIT. 01498000
  1175. OI TREXFLAG,TREXVAT YES - REMEMBER TO CALL "TRANVAT" LATER, 01499000
  1176. BR R3 AND EXIT. 01500000
  1177. EJECT 01501000
  1178. * SUBROUTINE TO OUTPUT A TRACE LINE ON THE PRINTER AND/OR TERMINAL 01502000
  1179. * R3 = RETURN REGISTER 01503000
  1180. * TREXBUFF IS FILLED IN TO APPROPRIATE DATA 01504000
  1181. * SAVEWRK1 ANDED WITH TREXPRNT SIGNALS OUTPUT ON PRINTER 01505000
  1182. * SAVEWRK1 ANDED WITH TREXTERM SIGNALS OUTPUT ON TERMINAL 01506000
  1183. * SAVEWRK8+2=HIGHEST ERROR-CODE "SO FAR" FROM DMKQCNWT/DMKDSPCH 01507000
  1184. * I.E. 04 = SINGLE ATTENTION HIT BY USER 01508000
  1185. * 08 = MORE THAN ONE ATTENTION HIT BY USER 01509000
  1186. * 12 = USER'S TERMINAL HAS BEEN TURNED OFF 01510000
  1187. * SAVEWRK9 = USED TO SAVE/RESTORE RETURN-REGISTER 01511000
  1188. * R2 IS USED FOR SCRATCH (NOT PRESERVED) 01512000
  1189. SPACE 01513000
  1190. TROUSUB DS 0H OUTPUT LINE ON PRINTER AND/OR TERMINAL: 01514000
  1191. LA R0,80 LENGTH = 80 BYTES 01515000
  1192. LA R1,TREXBUFF ADDRESS = TREXBUFF 01516000
  1193. SLR R2,R2 R2=0 FOR USE BY DMKVSPRT & DMKQCNWT 01517000
  1194. LH R15,TREXPRNT GET PRINTER FLAG-BITS 01518000
  1195. N R15,SAVEWRK1 OUTPUT ON PRINTER FOR THIS ONE ? 01519000
  1196. BZ TROUSUB4 NOPE - MUST BE JUST THE TERMINAL. 01520000
  1197. LH R0,TREXLCNT GET CURRENT LINE COUNT @V408246 01521100
  1198. LTR R0,R0 NEED PAGE EJECT? @V408246 01521200
  1199. BP TROUSUB2 NOPE - RESTORE R0 = 80 & PRINT. 01523000
  1200. CALL DMKVSPRT YES - GIVE A PAGE EJECT (R0 = 0) 01524000
  1201. TROUSUB2 LA R0,80 NOW RESTORE R0 = 80, 01525000
  1202. CALL DMKVSPRT AND PRINT THE OUTPUT LINE 01526000
  1203. CL R2,F8 *** SEVERE ERROR FROM DMKVSPRT ? *** 01527000
  1204. BE TRAEND1 *** YES - FORCE A TRACE END. *** 01528000
  1205. LH R14,TREXLCNT GET THE CURRENT LINE COUNT, 01529000
  1206. LA R14,1(,R14) ADD ONE, 01530000
  1207. CL R14,F60 CHECK AGAINST 60 LINES PER PAGE 01531000
  1208. BL TROUSUB3 IF < 60 WE'RE OK 01532000
  1209. SLR R14,R14 RESET TO 0 WHEN WE HIT 60 01533000
  1210. TROUSUB3 STH R14,TREXLCNT STORE UPDATED LINE COUNT 01534000
  1211. LH R15,TREXTERM GET TERMINAL FLAG-BITS 01535000
  1212. N R15,SAVEWRK1 OUTPUT ALSO ON TERMINAL ? 01536000
  1213. BCR 8,R3 <BZ> NOPE - EXIT FORTHWITH. 01537000
  1214. TROUSUB4 DS 0H OUTPUT WILL <ALSO> BE ON THE TERMINAL: 01538000
  1215. CLI SAVEWRK8+3,04 HAS MORE THAN ONE ATTENTION BEEN HIT ? 01539000
  1216. BCR 2,R3 <BH> YES - EXIT (DON'T TYPE THE LINE) 01540000
  1217. * (DMKQCNWT WILL REMOVE TRAILING BLANKS FROM COUNT) 01541000
  1218. TROUSUB6 DS 0H NOW READY TO CALL DMKQCNWT: 01542000
  1219. SLR R2,R2 R2=0 FOR PARM=0 FOR DMKQCNWT, AND ... 01543000
  1220. CALL DMKQCNWT WRITE MESSAGE TO TERMINAL 01544000
  1221. * 01545000
  1222. TROUSUB7 TM VMTRCTL,255-VMTRPER TRACING IN EFFECT NOW? PER001 01546000
  1223. BE TRAEXIT NO, GET OUT 01547000
  1224. CH R2,SAVEWRK8+2 CHECK ERROR-CODE AGAINST "HIGHEST SO FAR" 01548000
  1225. BCR 13,R3 <BNH> EXIT IF NO NEW ERROR RETURN CODE 01549000
  1226. STH R2,SAVEWRK8+2 STORE NEW VALUE OF RETURN CODE 01550000
  1227. BR R3 AND EXIT TO CALLER. 01551000
  1228. SPACE 3 01552000
  1229. DMKTRCND RELOC ENTER HERE TO FORCIBLY TERMINATE TRACING 01553000
  1230. MVC SAVEWRK7(1),VMRSTAT SAVE VMRSTAT FLAG STATUS AT ENTRY 01554000
  1231. OI VMRSTAT,VMEXWAIT+VMCFWAIT ENSURE THAT USER IS NOT RUN 01555000
  1232. L R9,VMTREXT POINT TO TREXT CONTROL BLOCK 01556000
  1233. * CONTINUE ... 01557000
  1234. SPACE 01558000
  1235. * NECESSARY TO TERMINATE TRACING: 01559000
  1236. TRAEND1 BAL R3,PUTBACK PUT BACK ANY INSTRUCTIONS WE ALTERED 01560000
  1237. ST R9,TRALOCK+4 SETUP LOCK "NAME" @V200820 01561000
  1238. LA R1,TRALOCK POINT TO THE NAME FIELD @V200820 01562000
  1239. TRAEND2 EQU * DEQUEUE ALL PENDING REQUESTS @V200820 01563000
  1240. CALL DMKLOCKD DEQUEUE THE TRACING LOCK @V200820 01564000
  1241. BZ TRAEND2 CONTINUE UNTIL NOT LOCKED @V200820 01565000
  1242. LA R0,TREXSIZE SIZE OF TREX BLOCK 01566000
  1243. LTR R1,R9 AND IT'S ADDRESS, IF THERE. @VA12401 01567100
  1244. BZ TRAEND2A NO...BYPASS @VA12401 01567200
  1245. SLR R15,R15 BEFORE CALLING DMKFRET, 01568000
  1246. ST R15,VMTREXT CLEAR "VMTREXT" AND 01569000
  1247. NI VMTRCTL,VMTRPER CLEAR TRACING FLAGS. PER001 01570000
  1248. CALL DMKFRET GIVE IT BACK TO FREE STORAGE 01571000
  1249. TRAEND2A EQU * @VA12401 01571100
  1250. TM VMRSTAT,VMLOGOFF IN LOGOFF PROCESS ? @V200820 01572000
  1251. BO TRAEXIT YES - SKIP THE MESSAGE @V200820 01573000
  1252. MSG 'TRACE ENDED' 'TRACE ENDED' MESSAGE TO THE USER 01574000
  1253. CALL DMKQCNWT,PARM=NORET ... 01575000
  1254. B TRAEXIT AND GO EXIT. 01576000
  1255. EJECT 01577000
  1256. * SUBROUTINES TO PERFORM A "TRANS - BRING/DEFER" OR 01578000
  1257. * A CALL TO DMKVATRN (IF NECESSARY) TO GET A REAL EQUIVALENT (IF 01579000
  1258. * FEASIBLE) OF A VIRTUAL ADDRESS: 01580000
  1259. * 01581000
  1260. * AT ENTRY: 01582000
  1261. * R1 = VIRTUAL ADDRESS TO BE TRANSLATED 01583000
  1262. * R14 = RETURN REGISTER 01584000
  1263. * 01585000
  1264. * AT EXIT: 01586000
  1265. * R1 = VIRTUAL ADDRESS 01587000
  1266. * R2 = REAL ADDRESS 01588000
  1267. * CONDITION-CODE SET FROM LRA, DMKPTRLK, OR DMKPTRAN 01589000
  1268. * (CC = 0 IF VIRTUAL ADDRESS WAS LEGITIMATE, AND PAGE IS 01590000
  1269. * IN CORE, OR HAS BEEN BROUGHT INTO CORE WITHOUT ERROR) 01591000
  1270. * 01592000
  1271. * ENTER AT "TRANVIRT" TO PERFORM VIRTUAL/VIRTUAL "TRANS", 01593000
  1272. * OR AT "TRANBRNG" FOR SIMPLE ("VANILLA") TRANSLATIONS 01594000
  1273. * (E.G. USER'S PAGE 0 STUFF, ETC.) 01595000
  1274. SPACE 01596000
  1275. TRANVIRT TM VMESTAT,VMEXTCM IN EC-MODE NOW ? 01597000
  1276. BZ TRANBRNG NO - IT'S "VANILLA" - THAT'S EASY. 01598000
  1277. TM VMPSW+1,EXTMODE STAYING IN EC-MODE? @VA04044 01598300
  1278. BZ TRANBRNG NOPE - USE OUR CREG 1 @VA04044 01598600
  1279. TM VMPSW,TRANMODE IN EC-MODE, IN TRANSLATE MODE ALSO ? 01599000
  1280. BO TRANVAT YES - THAT'S A WORTHY CHALLENGE. 01600000
  1281. * 01601000
  1282. TRANBRNG LCTL C1,C1,VMSEG VANILLA - GET SEGMENT TABLE ORIGIN 01602000
  1283. LRA R2,0(,R1) ATTEMPT TO GET REAL ADDRESS 01603000
  1284. BCR 8,R14 EXIT FORTHWITH IF THE PAGE WAS IN 01604000
  1285. LA R2,(BRING+DEFER) IF NOT, SET "BRING/DEFER" OPTIONS 01605000
  1286. L R15,APTRAN SET R15 TO CALL "DMKPTRAN" 01606000
  1287. TRANCALL ST R14,SAVEWRK9 SAVE R14 = RETURN-REGISTER, 01607000
  1288. CALL 15 ATTEMPT TO BRING IN THE PAGE 01608000
  1289. L R14,SAVEWRK9 RESTORE R14 RETURN REGISTER, 01609000
  1290. BR R14 RETURN TO CALLER WITH CC FROM DMKPTRAN. 01610000
  1291. EJECT 01611000
  1292. * ENTER AT "TRANPTBK" TO INVOKE "TRANBRNG" OR "TRANVAT" 01612000
  1293. * DEPENDING ON WHETHER "TRANBRNG" OR "TRANVAT" WAS 01613000
  1294. * INVOKED TO REPLACE THE USER INSTRUCTION 01614000
  1295. * (THIS BEING REMEMBERED IN "TREXVAT" FLAGBIT IN "TREXFLAG") 01615000
  1296. SPACE 01616000
  1297. TRANPTBK TM TREXFLAG,TREXVAT DID WE SET IT VIA "TRANVAT" ? 01617000
  1298. BZ TRANBRNG NO - INVOKE "TRANBRNG". 01618000
  1299. * YES - CONTINUE ... 01619000
  1300. SPACE 01620000
  1301. * IN EC-MODE & TRANSLATE MODE ALSO: 01621000
  1302. TRANVAT L R15,VMECEXT GET THE USER'S CONTROL REGISTERS 01622000
  1303. USING ECBLOK,R15 01623000
  1304. TM VMESTAT,VMINVPAG TABLES VALID? @VM08636 01624000
  1305. BNZ INTERLD PTR AT WORK... @VM01060 01625000
  1306. PTBKLRA EQU * @VM08636 01626000
  1307. LCTL C0,C1,EXTSHCR0 POINT TO THE SHADOW TABLES 01627000
  1308. DROP R15 01628000
  1309. LRA R2,0(,R1) MAKE THE ATTEMPT FIRST 01629000
  1310. LCTL C0,C0,CPCREG0 RESTORE STAND C-REGS BEFORE 01630000
  1311. LCTL C1,C1,VMSEG WE GO ANYPLACE 01631000
  1312. BCR 8,R14 IF "LRA" SUCCEEDED, RETURN TO CALLER. 01632000
  1313. INTERLD EQU * @VM08636 01633000
  1314. L R15,=A(INTERVAT) SET R15 TO CALL INTERFACE TO DMKVATRN 01634000
  1315. B TRANCALL GO SAVE R14 AND DO THE CALL. 01635000
  1316. SPACE 2 01636000
  1317. * INTERFACE ROUTINE TO CALL DMKVATRN: 01637000
  1318. USING INTERVAT,R12 FOR THIS INTERFACE ROUTINE ONLY. 01638000
  1319. INTERVAT ENTER ENTER HERE (SEE "TRANCALL" ABOVE) 01639000
  1320. LR R3,R1 SET R3 AS NEEDED FOR DMKVAT 01640000
  1321. CALL DMKVATRN ATTEMPT TO GET THE NEEDED ADDRESS 01641000
  1322. LTR R0,R0 SET CC FROM RETURN INDICATOR FROM DMKVAT 01642000
  1323. ST R2,SAVER2 RETURN R2 TO CALLER (IN CASE GOOD) 01643000
  1324. EXIT RETURN TO DMKTRC (WITH COND CODE SET). 01644000
  1325. SPACE 01645000
  1326. USING DMKTRC,R12 RESTORE STANDARD ADDRESSABILITY. 01646000
  1327. EJECT 01647000
  1328. * CONSTANTS: 01648000
  1329. HX80 DC X'0080' ADD TO INTERRUPT CODE IF VIRTUAL "PER" SET 01649000
  1330. DS 0F FULL-WORD ALIGNED CONSTANTS: 01650000
  1331. TRANMASK DC AL1(TRANMODE),AL1(EXTMODE),AL2(0) TO TEST CRUCIAL BITS 01651000
  1332. TRALOCK DC C'TREX',A(*-*) LOCK "NAME" FOR TRACING @V200820 01654000
  1333. SPACE 01655000
  1334. * MISCELLANEOUS FLAGBITS DEFINED IN FIRST BYTE OF SAVEWRK8: 01656000
  1335. SETCC EQU X'80' MUST SET CONDITION-CODE NONZERO AT EXIT 01657000
  1336. NOSTOP EQU X'40' NO MSG TO BE GIVEN, AND DO NOT STOP. 01658000
  1337. NOTRAMSG EQU X'20' NO TRACE MSG WANTED (ALREADY GIVEN) 01659000
  1338. SPACE 01660000
  1339. * NOTE: BYTE AT SAVEWRK8+1 IS AVAILABLE FOR FLAG IF NEEDED 01661000
  1340. * HALFWORD AT SAVEWRK8+2 IS USED FOR ERROR RETURNS FROM DMKQCNWT 01662000
  1341. SPACE 2 01663000
  1342. SVCB1 EQU X'0AB1' = SVC X'B1' TO TRACE NEXT SEQUENTIAL INSTRUCTION 01664000
  1343. SVCB2 EQU X'0AB2' = SVC X'B2' TO TRACE BRANCHES 01665000
  1344. SPACE 01666000
  1345. LTORG 01667000
  1346. EJECT 01668000
  1347. * CONSTANTS (CONTINUED): 01669000
  1348. * 01670000
  1349. CLSVC DC C'SVC' 01672000
  1350. CLIO DC C'I/O' 01673000
  1351. CLPROG DC C'PROG' 01674000
  1352. CLEXT DC C'EXT' 01675000
  1353. CLRST DC CL10'RESTART' @VA09019 01675100
  1354. CLCCW DC C'CCW' 01676000
  1355. CLCSW DC C'CSW' 01678000
  1356. * 01679000
  1357. * PREFIXES FOR THE VARIOUS RESPONSES: 01680000
  1358. * (THESE MAY READILY BE REVISED PER INSTALLATION REQUIREMENTS) 01681000
  1359. SPACE 01682000
  1360. PFXINTRP DC CL3'***' SVC I/O PROGRAM EXTERNAL INTERRUPTS 01683000
  1361. PFXPRV DC CL3':::' PRIVILEGED INSTRUCTION 01684000
  1362. PFXBRNCH DC CL3'==>' TO SHOW WE ARE AT A NEW LOCATION 01691000
  1363. PFXARROW EQU PFXBRNCH TO SHOW WE ARE GOING TO A NEW LOCATION 01692000
  1364. *PFXINST DC CL3' ' INSTRUCTION TRACING 01693000
  1365. PFXCSW EQU CLCSW CSW 01694000
  1366. EJECT 01695000
  1367. COPY VMBLOK 01696000
  1368. VMTRALL EQU VMTRINT+VMTRSIO+VMTRBRIN FOR TRACE 'ALL' 01697000
  1369. COPY TREXT 01698000
  1370. ORG TREXBUFF OUTPUT LINE FOR TCH/TIO/HIO/SIO: 01699000
  1371. SPACE 01700000
  1372. TRLNSIO DC CL3'I/O' PREFIX FOR I/O INSTR (SET FROM PFXIO) 01701000
  1373. DC C' ' 01702000
  1374. TRLNSIO1 DS XL6'00' VIRT ADDR OF I/O INSTR (= TRLNINT1) 01703000
  1375. DC C' ' 01704000
  1376. TRLNSIO5 DS CL5' ' MNEMONIC OF IO INSTRUCTION 01705000
  1377. DC C' ' 01706000
  1378. TRLNSIO4 DS XL8'00' SIO, TIO, HIO, OR TCH INSTRUCTION (HEX) 01707000
  1379. DC CL2' ' 01708000
  1380. TRLNSIO2 DS CL4'DEV' MNEMONIC "NAME" OF VIRTUAL DEVICE 01709000
  1381. DC C' ' 01710000
  1382. TRLNSIO3 DS XL4'00' VADD (HEX) 01711000
  1383. DC CL2' ' 01712000
  1384. TRLNSIOB DC CL2'CC' CC 01713000
  1385. DC C' ' 01714000
  1386. TRLNSIOC DS AL1(0) CC NUMBER 01715000
  1387. DC CL2' ' 01716000
  1388. TRLNSIOD DS CL4'DEV ' REAL TYPE 01717000
  1389. DC C' ' 01718000
  1390. TRLNSIOE DS XL4'00' RADD (HEX) 01719000
  1391. DC CL2' ' 01720000
  1392. TRLNSIOF DC CL3'CSW' CSW 01721000
  1393. DC C' ' 01722000
  1394. TRLNSIOG DS XL4'00' CSW+4/CSW+5 BYTES 01723000
  1395. DC CL2' ' 01724000
  1396. TRLNSIO9 DC CL3'CAW' CAW (FOR SIO ONLY, CC = 0 OR 1) 01725000
  1397. DC C' ' (FOR SIO ONLY, CC = 0 OR 1) 01726000
  1398. DS XL8'00' VIRTUAL CAW (FOR SIO ONLY, CC = 0 OR 1) 01727000
  1399. EJECT 01728000
  1400. ORG TREXBUFF OUTPUT LINE FOR CCW: 01729000
  1401. SPACE 01730000
  1402. TRLNCCW DC CL3'CCW' PREFIX 01731000
  1403. DC C' ' 01732000
  1404. TRLNCCW1 DS XL6'00' VIRTUAL ADDRESS OF CCW 01733000
  1405. DC C' ' 01734000
  1406. TRLNCCW2 DS XL8'00' VIRTUAL CCW 1ST HALF 01735000
  1407. DC C' ' 01736000
  1408. TRLNCCW3 DS XL8'00' VIRTUAL CCW 2ND HALF 01737000
  1409. DC CL2' ' 01738000
  1410. TRLNCCW4 DS XL6'00' REAL ADDRESS OF CCW 01739000
  1411. DC C' ' 01740000
  1412. TRLNCCW5 DS XL8'00' REAL CCW 1ST HALF 01741000
  1413. DC C' ' 01742000
  1414. TRLNCCW6 DS XL8'00' REAL CCW 2ND HALF 01743000
  1415. SPACE 01744000
  1416. ORG TREXBUFF OUTPUT LINE FOR "IDAL" LINE OF CCW: 01745000
  1417. TRLNIDAL DC CL3' " ' PREFIX (IF ANY) 01746000
  1418. DC CL2' ' 01747000
  1419. TRLNIDA1 DC CL4'IDAL' VIRTUAL IDAL 01748000
  1420. DC CL2' ' 01749000
  1421. TRLNIDA2 DS XL8'00' FIRST VIRTUAL IDAW 01750000
  1422. DC C' ' 01751000
  1423. TRLNIDA3 DS XL8'00' SECOND VIRTUAL IDAW 01752000
  1424. DC CL3' ' 01753000
  1425. TRLNIDA4 DC CL4'IDAL' REAL IDAL 01754000
  1426. DC CL2' ' 01755000
  1427. TRLNIDA5 DS XL8'00' FIRST REAL IDAW 01756000
  1428. DC C' ' 01757000
  1429. TRLNIDA6 DS XL8'00' SECOND REAL IDAW 01758000
  1430. SPACE 01759000
  1431. ORG TREXBUFF OUTPUT LINE FOR "SEEK" LINE OF CCW: 01760000
  1432. TRLNSEEK DC CL3' " ' PREFIX (IF ANY) 01761000
  1433. DC CL2' ' 01762000
  1434. TRLNSK1 DC CL4'SEEK' VIRTUAL SEEK 01763000
  1435. DC CL2' ' 01764000
  1436. TRLNSK2 DS XL8'00' VIRTUAL SEEK ARG (1ST 4 BYTES) 01765000
  1437. DC C' ' 01766000
  1438. TRLNSK3 DS XL6'00' VIRTUAL SEEK ARG ETC. (NEXT 3 BYTES) 01767000
  1439. DC CL5' ' 01768000
  1440. TRLNSK4 DC CL4'SEEK' REAL SEEK 01769000
  1441. DC CL2' ' 01770000
  1442. TRLNSK5 DS XL8'00' REAL SEEK ARG (1ST 4 BYTES) 01771000
  1443. DC C' ' 01772000
  1444. TRLNSK6 DS XL4'00' REAL SEEK ARG (LAST 2 BYTES) 01773000
  1445. EJECT 01774000
  1446. ORG TREXBUFF OUTPUT LINE FOR INTERRUPT TRACING: 01775000
  1447. SPACE 01776000
  1448. TRLNINT DC CL3' ' PREFIX (IF ANY) 01777000
  1449. DC C' ' 01778000
  1450. TRLNINT1 DS XL6'00' VIRTUAL ADDRESS OF INSTRUCTION 01779000
  1451. DC C' ' 01780000
  1452. TRLNINT2 DS CL4' ' TYPE (SVC, PROG, EXT, OR I/O) 01781000
  1453. DC CL2' ' 01782000
  1454. TRLNINT3 DS XL4'00' INTERRUPT CODE OR VIRTUAL DEVICE ADDRESS 01783000
  1455. DC C' ' 01784000
  1456. TRLNINT4 DS C'==>' PFXARROW GOES IN HERE 01785000
  1457. DC C' ' 01786000
  1458. TRLNINT5 DS XL6'00' VIRTUAL TRANSFER-TO ADDRESS (FROM NEW PSW) 01787000
  1459. DC CL2' ' 01788000
  1460. TRLNINT6 DC CL3'CSW' CSW (FOR I/O INTERRUPTS ONLY) 01789000
  1461. DC C' ' 01790000
  1462. TRLNINT7 DS XL4'00' CSW+4/CSW+5 BYTES ONLY 01791000
  1463. SPACE 1 01792000
  1464. ORG TRLNINT2 RE-DEFINITION FOR INSTRUCTION TRACING 01793000
  1465. TRLNINS2 DS CL5' ' MNEMONIC OF INSTRUCTION 01794000
  1466. DC C' ' 01795000
  1467. TRLNINS3 DS XL4'00' FIRST TWO BYTES OF INSTRUCTION 01796000
  1468. TRLNINS4 DS XL4'00' NEXT TWO BYTES OF INSTRUCTION (IF ANY) 01797000
  1469. TRLNINS5 DS XL4'00' LAST TWO BYTES OF INSTRUCTION (IF ANY) 01798000
  1470. DC C' ' 01799000
  1471. TRLNINS6 DS XL6'00' VIRTUAL XFER-TO-ADDRESS OR PSW (IF ANY) 01800000
  1472. SPACE 2 01801000
  1473. ORG TRLNINS5+1 RE-DEFINITION FOR EXECUTED INSTRUCTIONS 01802000
  1474. * 01803000
  1475. * NOTE: KEEP TRLNINS8 UP TO TRLNINS9 AT SAME RELATIVE DISPLACEMENTS 01804000
  1476. * AS TRLNINT1 AND TRLNINS2 TO TRLNINS6 01805000
  1477. * (BECAUSE FILLED IN BY INDEXED CODE). 01806000
  1478. * 01807000
  1479. TRLNINS7 DS XL2'00' LOW-ORDER BYTE OF EX "R1" REGISTER (IF ANY) 01808000
  1480. * (OR SSM-BYTE FOR SSM, STNSM, OR STOSM) 01809000
  1481. DC CL2' ' 01810000
  1482. TRLNINS8 DS XL6'00' VIRTUAL ADDRESS OF EXECUTED INSTRUCTION 01811000
  1483. DC C' ' 01812000
  1484. TRLNINSM DS CL5' ' MNEMONIC OF EXECUTED INSTRUCTION 01813000
  1485. DC C' ' 01814000
  1486. DS XL12'00' TWO TO SIX BYTES OF EXECUTED INSTRUCTION 01815000
  1487. DC C' ' 01816000
  1488. TRLNINS9 DS XL6'00' TRANSFER-TO ADDRESS FOR EXECUTED BRANCH 01817000
  1489. * 01818000
  1490. DS XL11'00' WORST CASE (SPACE-WISE) = EXECUTED LPSW 01819000
  1491. WORSCASE EQU *-TRLNINT LENGTH OF OUTPUT LINE FOR WORST CASE. 01820000
  1492. SPACE 01821000
  1493. TRLNBUMP EQU TRLNINS8-TRLNINT1 DISP. OF TRLNINS8 MSG FROM TRLNINT1 01822000
  1494. EJECT 01823000
  1495. ORG TREXBUFF OUTPUT LINE FOR CSW: 01824000
  1496. SPACE 01825000
  1497. TRLNCSW DC CL3'CSW' PREFIX 01826000
  1498. DC C' ' 01827000
  1499. TRLNCSWV DC C'V' 'V' 01828000
  1500. DC C' ' 01829000
  1501. TRLNCSW1 DS XL4'00' VADD 01830000
  1502. DC C' ' 01831000
  1503. TRLNCSW2 DS XL8'00' VIRTUAL CSW (1ST HALF) 01832000
  1504. DC C' ' 01833000
  1505. TRLNCSW3 DS XL8'00' VIRTUAL CSW (2ND HALF) 01834000
  1506. DC CL2' ' 01835000
  1507. TRLNCSWR DC C'R' 'R' 01836000
  1508. DC C' ' 01837000
  1509. TRLNCSW4 DS XL4'00' RADD 01838000
  1510. DC C' ' 01839000
  1511. TRLNCSW5 DS XL8'00' REAL CSW (1ST HALF) 01840000
  1512. DC C' ' 01841000
  1513. TRLNCSW6 DS XL8'00' REAL CSW (2ND HALF) 01842000
  1514. EJECT 01843000
  1515. PSA 01844000
  1516. COPY SAVE 01845000
  1517. COPY CORE @V304735 01846000
  1518. COPY EQU 01847000
  1519. COPY IOBLOKS 01848000
  1520. COPY VBLOKS 01849000
  1521. COPY DEVTYPES 01850000
  1522. END DMKTRC 01851000
ibm/vm370-lib/cp/dmktrc.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator