User Tools

Site Tools


ibm:vm370-lib:rscs:dmtsto.assemble_src

DMTSTO Source

References

Source Listing

DMTSTO.ASSEMBLE.txt
  1. STO TITLE 'DMTSTO (RSCS) VM/370 - RELEASE 6' 00001000
  2. *. 00002000
  3. * MODULE NAME - 00003000
  4. * 00004000
  5. * DMTSTO 00005000
  6. * 00006000
  7. * FUNCTION - 00007000
  8. * 00008000
  9. * THE DMTSTO MODULE IS THE SERVICE ROUTINE WHICH 00009000
  10. * RESERVES PAGES OF FREE MAIN STORAGE FOR USE BY 00010000
  11. * CALLING TASK PROGRAMS. TASK PROGRAMS FREE PAGES OF 00011000
  12. * MAIN STORAGE BY SIMPLY CLEARING TO ZERO THE 00012000
  13. * ASSOCIATED MAP BYTE IN THE MAIN STORAGE MAP. 00013000
  14. * 00014000
  15. * ATTRIBUTES - 00015000
  16. * 00016000
  17. * REUSABLE, NON-INTERRUPTABLE 00017000
  18. * 00018000
  19. * ENTRY POINTS - 00019000
  20. * 00020000
  21. * DMTSTO - RESERVE A BLOCK OF MAIN STORAGE 00021000
  22. * 00022000
  23. * ENTRY CONDITIONS - 00023000
  24. * 00024000
  25. * GPR0 = NUMBER OF CONTIG PAGES REQUESTED (BINARY) 00025000
  26. * GPR1 = PAGE NUMBER OF FIRST PAGE REQUESTED (BINARY) 00026000
  27. * GPR14 = RETURN ADDRESS 00027000
  28. * GPR15 = ENTRY ADDRESS 00028000
  29. * 00029000
  30. * EXIT CONDITIONS - 00030000
  31. * 00031000
  32. * NORMAL - 00032000
  33. * 00033000
  34. * GPR15 = X'00' REQUESTED PAGES NOW RESERVED 00034000
  35. * 00035000
  36. * ERROR - 00036000
  37. * 00037000
  38. * GPR15 = X'10' AT LEAST ONE REQUESTED PAGE IS 00038000
  39. * ALREADY RESERVED 00039000
  40. EJECT 00040000
  41. * 00041000
  42. * CALLS TO OTHER ROUTINES - 00042000
  43. * 00043000
  44. * NONE 00044000
  45. * 00045000
  46. * EXTERNAL REFERENCES - 00046000
  47. * 00047000
  48. * NONE 00048000
  49. * 00049000
  50. * TABLES / WORKAREAS - 00050000
  51. * 00051000
  52. * DMTVEC - SUPERVISOR COMMON AREA 00052000
  53. * DMTMAP - FREE STORAGE MAP 00053000
  54. * TASK ELEMENT 00054000
  55. * 00055000
  56. * REGISTER USAGE - 00056000
  57. * 00057000
  58. * GPR0 = NUMBER OF PAGES REQUESTED ON ENTRY 00058000
  59. * GPR1 = PAGE NUM OF FIRST REQUESTED PAGE ON ENTRY 00059000
  60. * GPR2 = PAGE COUNT WORK REG 00060000
  61. * GPR3 = MAIN STORAGE MAP ENTRY POINTER 00061000
  62. * GPR4 = TASK ELEMENT POINTER 00062000
  63. * GPR5 = UNUSED 00063000
  64. * GPR6 = UNUSED 00064000
  65. * GPR7 = UNUSED 00065000
  66. * GPR8 = UNUSED 00066000
  67. * GPR9 = UNUSED 00067000
  68. * GPR10 = UNUSED 00068000
  69. * GPR11 = UNUSED 00069000
  70. * GPR12 = UNUSED 00070000
  71. * GPR13 = UNUSED 00071000
  72. * GPR14 = TASK SAVE AREA POINTER 00072000
  73. * GPR15 = ENTRY ADDRESS, DMTSTO BASE REGISTER 00073000
  74. * 00074000
  75. * NOTES - 00075000
  76. * 00076000
  77. * DMTSTO IS INTENDED TO BE USED WITH SOME TASK LEVEL 00077000
  78. * SOFTWARE SUPPORT. IN PARTICULAR, A SIMPLE ROUTINE 00078000
  79. * TO GET ONE OR MORE UNSPECIFIED PAGES COULD BE WRITTEN 00079000
  80. * AS A SHARED REENTRANT ROUTINE. MORE EXOTIC AND 00080000
  81. * COMPLEX STORAGE ALLOCATION SYSTEMS MAY BE BASED ON 00081000
  82. * DMTSTO AND RUN AS TASK PROGRAMMING. 00082000
  83. * 00083000
  84. * OPERATION - 00084000
  85. * 00085000
  86. * ON A REQUEST FOR MAIN STORAGE RESERVATION, DMTSTO 00086000
  87. * IMMEDIATELY SUSPENDS THE CALLING TASK'S EXECUTION 00087000
  88. * THROUGH THE FREEZE SVC FUNCTION. WITH THE ACTIVE 00088000
  89. * PSW MASKS SET OFF, DMTSTO INSPECTS THE REQUESTED 00089000
  90. * PAGE ENTRIES IN THE MAIN STORAGE MAP. IF THE PAGES 00090000
  91. * ARE FREE, THEY ARE RESERVED FOR THE TASK BY 00091000
  92. * INSERTING THE CALLING TASK'S ID IN EACH MAP ENTRY. 00092000
  93. * IF SOME PAGE REQUESTED IS NOT FREE AT THE TIME OF 00093000
  94. * THE REQUEST PROCESSING, NO PAGES ARE RESERVED AND 00094000
  95. * AN ERROR CONDITION IS RETURNED TO THE CALLING 00095000
  96. * TASK. (IT IS THE RESPONSIBILITY OF THE CALLING 00096000
  97. * TASK TO RETRY THE REQUEST IN THIS CASE.) DMTSTO 00097000
  98. * EXITS TO THE DISPATCHER. 00098000
  99. * 00099000
  100. * 00100000
  101. *. 00101000
  102. EJECT 00102000
  103. DMTSTO CSECT 00103000
  104. SPACE 00104000
  105. * ENTRY POINT FOR CALL TO DMTSTO ROUTINE 00105000
  106. SPACE 00106000
  107. FREEZE SET REG.14 = ADDR OF TASK SAVE AREA AND SAVE STATE 00107000
  108. SPACE 00108000
  109. USING TAREA,R14 DEFINE TASK SAVE AREA DSECT ADDRESSA 00109000
  110. USING DMTSTO,R15 USE ENTRY REGISTER FOR DMTSTO BASE 00110000
  111. USING SVECTORS,0 GET SVECTORS ADDRESSABILITY 00111000
  112. USING TASKE,R4 GET TASK ELEMENT ADDRESSABILTIY 00112000
  113. SPACE 00113000
  114. XC TGREG15(4),TGREG15 CLEAR REG.15 S/A (RETURN CODE) 00114000
  115. LTR R2,R0 REG.2 = REQUESTED PAGE COUNT - IS IT ZERO? 00115000
  116. BZ MAINDONE EASY REQUEST IF IT IS 00116000
  117. BCTR R2,0 DECREMENT REQUEST COUNT FOR EXECUTE OF CHAR INSTR 00117000
  118. L R3,MAINMAP REG.3 = ADDRESS OF START OF CORE MAP 00118000
  119. SR R1,R1 CLEAR CALLER'S PAGE ADDRESS REGISTER 00119000
  120. IC R1,TGREG1+3 AND SET THE LOW ORDER BYTE AS HE HAD IT 00120000
  121. ALR R3,R1 REG.3 = ADDRESS OF STARTING PAGE ENTRY IN MAP 00121000
  122. EX R2,MAINCHEK MAKE SURE THIS AREA IS FREE... 00122000
  123. BNZ MAINPUNT TOO BAD - NO GO 00123000
  124. L R4,ACTIVE REG.4 = ADDRESS OF CALLER'S TASK ELEMENT 00124000
  125. MVC 0(1,R3),TASKID SET FIRST PAGE TO CALLER'S ID 00125000
  126. LTR R2,R2 IS THIS A MULTIPLE PAGE REQUEST? 00126000
  127. BZ MAINDONE ALL DONE IF IT IS NOT 00127000
  128. BCTR R2,0 BUMP COUNT DOWN AGAIN FOR ID PROPOGATION 00128000
  129. EX R2,MAINSET SET ALL REQUESTED PAGE ENTRIES TO CALLER'S ID 00129000
  130. SPACE 00130000
  131. MAINDONE EQU * 00131000
  132. L R15,DISPATCH REG.15 = ADDRESS OF DISPATCHER ENTRY 00132000
  133. BALR R14,R15 EXIT BACK TO CALLER VIA DISPATCH 00133000
  134. SPACE 00134000
  135. MAINPUNT EQU * 00135000
  136. MVI TGREG15+3,16 SET RETURN CODE IN REG.15 SAVE AREA 00136000
  137. B MAINDONE AND GO TO NORMAL RESTORE AND RETURN 00137000
  138. SPACE 00138000
  139. MAINCHEK OC 0(0,R3),0(R3) TO BE EXECUTED TO TEST FOR ZEROS 00139000
  140. MAINSET MVC 1(0,R3),0(R3) TO BE EXECUTED TO PROPOGATE ID BYTE 00140000
  141. EJECT 00141000
  142. COPY RSSEQU 00142000
  143. EJECT 00143000
  144. COPY SVECTORS 00144000
  145. EJECT 00145000
  146. COPY TAREA 00146000
  147. EJECT 00147000
  148. COPY TASKE 00148000
  149. END 00149000
ibm/vm370-lib/rscs/dmtsto.assemble_src.txt ยท Last modified: 2023/08/06 13:39 by Site Administrator