User Tools

Site Tools


ibm:vm370-lib:rscs:dmtpst.assemble_src

DMTPST Source

References

Source Listing

DMTPST.ASSEMBLE.txt
  1. PST TITLE 'DMTPST (RSCS) VM/370 - RELEASE 6' 00001000
  2. *. 00002000
  3. * MODULE NAME - 00003000
  4. * 00004000
  5. * DMTPST 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * THE DMTPST MODULE IS A SERVICE ROUTINE WHICH MAY 00009000
  10. * BE CALLED FROM ANYWHERE IN THE RSS SYSTEM. DMTPST 00010000
  11. * IS USED TO SIGNAL THE COMPLETION OF AN EVENT BY 00011000
  12. * MEANS OF POSTING THE EVENT'S ASSOCIATED SYNCH 00012000
  13. * LOCK. DMTPST IS ENTIRELY REENTRANT, USES NO MAIN 00013000
  14. * STORAGE (EXCEPT THE SYNCH LOCK WHICH IS SPECIFIED 00014000
  15. * TO BE POSTED), AND MAY BE ENTERED WITH PSW 00015000
  16. * INTERRUPT MASKS ON OR OFF. DMTPST DOES NOT CHANGE 00016000
  17. * THE STATE OF THE RUNNING PSW IN ANY WAY. 00017000
  18. * 00018000
  19. * ATTRIBUTES - 00019000
  20. * 00020000
  21. * REENTRANT 00021000
  22. * 00022000
  23. * ENTRY POINTS - 00023000
  24. * 00024000
  25. * DMTPST - SIGNAL EVENT COMPLETION TO A TASK 00025000
  26. * 00026000
  27. * ENTRY CONDITIONS - 00027000
  28. * GPR0 = ONE BYTE POST CODE 00028000
  29. * GPR1 = ADDR OF SYNCH LOCK TO BE POSTED 00029000
  30. * GPR14 = RETURN ADDRESS 00030000
  31. * 00031000
  32. * EXIT CONDITIONS - 00032000
  33. * 00033000
  34. * NORMAL - 00034000
  35. * 00035000
  36. * GPR0 = ADDR OF POSTED SYNCH LOCK 00036000
  37. * GPR1 = ADDR OF POSTED SYNCH LOCK 00037000
  38. * 00038000
  39. * ERROR - 00039000
  40. * 00040000
  41. * NONE 00041000
  42. * 00042000
  43. EJECT 00043000
  44. * 00044000
  45. * CALLS TO OTHER ROUTINES - 00045000
  46. * 00046000
  47. * NONE 00047000
  48. * 00048000
  49. * EXTERNAL REFERENCES - 00049000
  50. * 00050000
  51. * NONE 00051000
  52. * 00052000
  53. * TABLES / WORKAREAS - 00053000
  54. * 00054000
  55. * TASK ELEMENT (SUPERVISOR QUEUE) 00055000
  56. * 00056000
  57. * REGISTER USAGE - 00057000
  58. * 00058000
  59. * GPR0 = SCRATCH (SYNCH LOCK ADDR SAVE REG) 00059000
  60. * GPR1 = SYNCH LOCK ADDR, TASK ELEMENT POINTER 00060000
  61. * GPR2 = UNUSED 00061000
  62. * GPR3 = UNUSED 00062000
  63. * GPR4 = UNUSED 00063000
  64. * GPR5 = UNUSED 00064000
  65. * GPR6 = UNUSED 00065000
  66. * GPR7 = UNUSED 00066000
  67. * GPR8 = UNUSED 00067000
  68. * GPR9 = UNUSED 00068000
  69. * GPR10 = UNUSED 00069000
  70. * GPR11 = UNUSED 00070000
  71. * GPR12 = UNUSED 00071000
  72. * GPR13 = UNUSED 00072000
  73. * GPR14 = RETURN ADDRESS 00073000
  74. * GPR15 = UNUSED 00074000
  75. * 00075000
  76. * NOTES - 00076000
  77. * 00077000
  78. * NONE 00078000
  79. * 00079000
  80. * OPERATION - 00080000
  81. * 00081000
  82. * 00082000
  83. * DMTPST POSTS THE SYNCH LOCK SPECIFIED IN THE CALL 00083000
  84. * BY PLACING THE SPECIFIED ONE-BYTE CODE IN THE HIGH 00084000
  85. * ORDER BYTE OF THE SYNCH LOCK (AND FORCING THE HIGH 00085000
  86. * ORDER BIT OF THE SYNCH LOCK TO ONE). IF THE 00086000
  87. * SPECIFIED SYNCH LOCK HAS BEEN WAITED ON (IF A TASK 00087000
  88. * ELEMENT ADDRESS HAS BEEN SET IN THE SYNCH LOCK), 00088000
  89. * THE WAITING TASK'S TASK ELEMENT ADDRESS IS LOADED 00089000
  90. * FROM THE SYNCH LOCK AND THE "WAITING" BIT IN THE 00090000
  91. * TASK TABLE IS SET TO ZERO. (THIS MAKES THE TASK 00091000
  92. * DISPATCHABLE.) THE LOW ORDER THREE BYTES OF THE 00092000
  93. * SYNCH LOCK ARE SET TO ZERO, AND CONTROL IS 00093000
  94. * RETURNED DIRECTLY TO THE CALLER BY MEANS OF A 00094000
  95. * BRANCH (CONTROL IS NOT PASSED TO THE DISPATCHER). 00095000
  96. * 00096000
  97. *. 00097000
  98. EJECT 00098000
  99. DMTPST CSECT 00099000
  100. SPACE 00100000
  101. USING TASKE,R1 GET TASK ELEMENT ADDRESSABILITY 00101000
  102. STC R0,0(R1) STORE POST CODE IN SYNLOCK TO BE POSTED 00102000
  103. OI 0(R1),X'80' AND SET HIGH-ORDER BIT TO FORCE NON-ZERO 00103000
  104. OC 1(3,R1),1(R1) IS THERE A TASK ELEMENT ADDRESS HERE? 00104000
  105. BCR 8,R14 NOPE - MUST BE AN EARLY POST - ALL DONE 00105000
  106. L R0,0(R1) REG 0 (SCRATCH REG) = ADDR OF SOME TASK ELEMENT 00106000
  107. XC 1(3,R1),1(R1) CLEAR TASK ELEMENT ADDRESS FROM THE SYNLOC 00107000
  108. XR R0,R1 THIS IS A TRICK TO SWAP THE CONTENTS OF TWO REGS, 00108000
  109. XR R1,R0 WITHOUT USING ANY NON-REGISTER STORAGE 00109000
  110. XR R0,R1 NEVER THOUGHT I'D NEED TO USE IT 00110000
  111. NI TASKSTAT,X'FF'-WAITING SET TASK DISPATCHABLE 00111000
  112. LR R1,R0 RESTORE ADDRESS OF THE SYNLOCK TO REG.1 00112000
  113. BR R14 AND RETURN TO THE CALLER 00113000
  114. EJECT 00114000
  115. COPY TASKE 00115000
  116. EJECT 00116000
  117. COPY RSSEQU 00117000
  118. END 00118000
ibm/vm370-lib/rscs/dmtpst.assemble_src.txt ยท Last modified: 2023/08/06 13:39 by Site Administrator