Table of Contents

DMTSVC Source

References

Source Listing

DMTSVC.ASSEMBLE.txt
  1. SVC TITLE 'DMTSVC (RSCS) VM/370 - RELEASE 6' 00001000
  2. *. 00002000
  3. * MODULE NAME - 00003000
  4. * 00004000
  5. * DMTSVC 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * THE DMTSVC MODULE IS THE MSUP SVC INTERRUPT 00009000
  10. * HANDLER. DMTSVC RECEIVES CONTROL DIRECTLY ON AN 00010000
  11. * SVC INTERRUPT. 00011000
  12. * 00012000
  13. * ATTRIBUTES - 00013000
  14. * 00014000
  15. * REUSABLE, EXECUTABLE DISABLED ONLY 00015000
  16. * 00016000
  17. * ENTRY POINTS - 00017000
  18. * 00018000
  19. * DMTSVC - DIRECTLY ON SVC INTERRUPT 00019000
  20. * 00020000
  21. * 00021000
  22. * ENTRY CONDITIONS - 00022000
  23. * 00023000
  24. * ENTERED FROM DISPATCHED PROGRAMMING UPON EXECUTION 00024000
  25. * OF A SVC INSTRUCTION. 00025000
  26. * 00026000
  27. * 00027000
  28. * EXIT CONDITIONS - 00028000
  29. * 00029000
  30. * NORMAL - 00030000
  31. * 00031000
  32. * ON SVC C'F', CONTROL IS RETURNED TO THE INSTRUCTION 00032000
  33. * FOLLOWING THE CALLING SVC INSTRUCTION WITH SYSTEM 00033000
  34. * MASK DISABLED (EXCEPT FOR MACHINE CHECK). THE 00034000
  35. * EXECUTING TASK HAS BEEN UNDISPATCHED, AND ITS TASK ELEMENT 00035000
  36. * ADDRESS IS RETURNED IN GREG 14. 00036000
  37. * 00037000
  38. * ERROR - 00038000
  39. * 00039000
  40. * ON SVC OTHER THAN C'F', CONTROL IS RETURNED TO THE 00040000
  41. * INSTRUCTION FOLLOWING THE CALLING SVC INSTRUCTION WITH 00041000
  42. * SYSTEM STATUS UNMODIFIED. THE SVC IS AN EFFECTIVE NOP. 00042000
  43. EJECT 00043000
  44. * 00044000
  45. * CALLS TO OTHER ROUTINES - 00045000
  46. * 00046000
  47. * NONE 00047000
  48. * 00048000
  49. * 00049000
  50. * EXTERNAL REFERENCES - 00050000
  51. * 00051000
  52. * NONE 00052000
  53. * 00053000
  54. * 00054000
  55. * TABLES / WORKAREAS - 00055000
  56. * 00056000
  57. * TAREA - INTERRUPTED TASK'S SAVE AREA, TO SAVE STATUS 00057000
  58. * TASKE - TASK ELEMENT, TO LOCATE TAREA 00058000
  59. * 00059000
  60. * 00060000
  61. * 00061000
  62. * REGISTER USAGE - 00062000
  63. * 00063000
  64. * GPR13 = CALLER'S TASK ELEMENT BASE 00064000
  65. * GPR14 = CALLER'S TASK SAVE AREA BASE 00065000
  66. * GPR15 = DMTSVC BASE REGISTER 00066000
  67. * 00067000
  68. * NOTES - 00068000
  69. * 00069000
  70. * NONE 00070000
  71. * 00071000
  72. * OPERATION - 00072000
  73. * 00073000
  74. * 00074000
  75. * THE ONLY FUNCTION OF SVC WITHIN THE RSCS SYSTEM IS 00075000
  76. * TO "UNDISPATCH" (OR "FREEZE") AN EXECUTING TASK. 00076000
  77. * SVC IS NECESSARY TO PERFORM THIS FUNCTION SINCE 00077000
  78. * THE LEFT HALF OF THE ACTIVE PSW IS ACCESSABLE ONLY 00078000
  79. * THROUGH STORAGE OF THE PSW ON AN INTERRUPT. THE 00079000
  80. * SVC CODE IS NOT INSPECTED BY SUPEXT, AND IT 00080000
  81. * CURRENTLY HAS NO MEANING (SEE BELOW). 00081000
  82. * 00082000
  83. * THE RUNNING TASK IS "UNDISPATCHED" ON AN SVC BY 00083000
  84. * MOVING THE LEFT HALF OF THE SVC OLD PSW TO THE 00084000
  85. * TASK SAVE AREA RESUME PSW FIELD, STORING THE 00085000
  86. * REGISTER CONTENTS ON INTERRUPT IN THE TASK SAVE 00086000
  87. * AREA, AND SETTING THE RESUME PSW ADDRESS FIELD TO 00087000
  88. * THE CONTENTS OF REG.14 ON INTERRUPT. SUPSVC 00088000
  89. * RETURNS CONTROL BY SETTING REG.14 TO THE ADDRESS 00089000
  90. * OF THE TASK ELEMENT OF THE "UNDISPATCHED" TASK, 00090000
  91. * AND LOADING A PSW WITH ALL MASK BITS SET OFF 00091000
  92. * (EXCEPT MACHINE CHECK) AND EXECUTION ADDRESS AS 00092000
  93. * STORED IN THE SVC OLD PSW. 00093000
  94. * 00094000
  95. * 00095000
  96. *. 00096000
  97. EJECT 00097000
  98. DMTSVC CSECT 00098000
  99. SPACE 00099000
  100. * SUPERVISOR CALL INTERRUPT ENTRY POINT 00100000
  101. USING SVECTORS,0 GET SVECTORS ADDRESSABILITY 00101000
  102. USING TASKE,R13 GET TASK ELEMENT ADDRESSABILITY 00102000
  103. SPACE 00103000
  104. ST R15,SSAVE SAVE WORK REGS TEMPORARILY 00104000
  105. L R15,NEWSVC+4 GET ADDRESS OF ENTRY POINT 00105000
  106. USING DMTSVC,R15 DEFINE ADDRESSING FOR SVC HANDLER 00106000
  107. CLI OLDSVC+3,C'F' IS IT A FREEZE REQUEST? 00107000
  108. BNE SVCNOP NOP FUNCTION IF NOT 00108000
  109. L R15,SSAVE ALL DONE WITH LOCAL ADDRESSING 00109000
  110. STM R13,R14,SSAVE SAVE CONTENTS OF WORK REGISTERS 00110000
  111. L R13,ACTIVE REG.13 = ADDRESS OF CALLER'S TASK ELEMENT 00111000
  112. L R14,TASKSAVE REG.14 = ADDRESS OF CALLER'S TASK S/A 00112000
  113. SPACE 00113000
  114. USING TAREA,R14 DEFINE TASK SAVE AREA DSECT ADDRESSA 00114000
  115. SPACE 00115000
  116. MVC TPSW(4),OLDSVC SAVE LEFT HALF OF CALLER'S PSW 00116000
  117. STM R0,R15,TGREG0 SAVE ALL OF THE CALLER'S REGISTERS 00117000
  118. MVC TGREG13(8),SSAVE RESTORE REGS 13 & 14 TO CORRECT VALUES 00118000
  119. MVC TPSW+4(4),TGREG14 SET REG.14 RETURN ADDR IN RESUME PSW 00119000
  120. SPACE 00120000
  121. MVI ACTIVE,X'00' RESET ACTIVE FLAG 00121000
  122. SPACE 1 00122000
  123. MVI NEWPSW,X'00' SET MASK OFF FOR PSW TO BE LOADED 00123000
  124. MVI NEWPSW+1,X'04' KEY = 0, MACHINE CHECK ON, SUP MODE 00124000
  125. MVC NEWPSW+5(3),OLDSVC+5 MOVE IN RETURN ADDRESS 00125000
  126. LPSW NEWPSW RETURN WITH OLD MASK IN OLDSVC FOR CALLER 00126000
  127. SPACE 00127000
  128. SVCNOP EQU * 00128000
  129. L R15,SSAVE RESTORE R15 00129000
  130. LPSW OLDSVC RESTORE PRE-SVC STATUS - NOP 00130000
  131. EJECT 00131000
  132. COPY RSSEQU 00132000
  133. EJECT 00133000
  134. COPY SVECTORS 00134000
  135. EJECT 00135000
  136. COPY TAREA 00136000
  137. EJECT 00137000
  138. COPY TASKE 00138000
  139. END 00139000