User Tools

Site Tools


ibm:vm370-lib:cms:dmspnt.assemble_src

DMSPNT Source

References

Source Listing

DMSPNT.ASSEMBLE.txt
  1. PNT TITLE 'DMSPNT (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * MODULE NAME: 00004000
  5. * 00005000
  6. * DMSPNT (POINT) 00006000
  7. * 00007000
  8. * FUNCTION: 00008000
  9. * 00009000
  10. * TO PLACE A FILE STATUS TABLE ENTRY IN THE ACTIVE FILE 00010000
  11. * TABLE (IF NECESSARY), AND TO SET THE READ POINTER 00011000
  12. * AND/OR WRITE POINTER FOR THAT FILE TO A GIVEN ITEM 00012000
  13. * NUMBER. 00013000
  14. * 00014000
  15. * ATTRIBUTES: 00015000
  16. * 00016000
  17. * NUCLEUS RESIDENT, REENTRANT 00017000
  18. * 00018000
  19. * ENTRY POINTS: 00019000
  20. * 00020000
  21. * DMSPNT 00021000
  22. * 00022000
  23. * ENTRY CONDITIONS: 00023000
  24. * 00024000
  25. * LA R1,PLIST R1 MUST POINT TO P-LIST AS USUAL 00025000
  26. * 00026000
  27. * THEN EITHER 00027000
  28. * 00028000
  29. * SVC X'CA' CALL POINT VIA SVC 00029000
  30. * DC AL4(ERROR) ERROR-RETURN 00030000
  31. * 00031000
  32. * OR 00032000
  33. * 00033000
  34. * L R15,APOINT WHERE APOINT=V(DMSPNT) 00034000
  35. * BALR R14,R15 CALLS POINT VIA BALR 00035000
  36. * (WITHIN NUCLEUS) 00036000
  37. * BNZ ERROR TRANSFER IF ERROR 00037000
  38. * 00038000
  39. * R1 MUST POINT TO POINT PARAMETER LIST: 00039000
  40. * DS 0F 00040000
  41. * PLIST DC CL8'POINT' (NOTE - IMMATERIAL IF CALLED BY BALR) 00041000
  42. * DC CL8' ' FILENAME 00042000
  43. * DC CL8' ' FILETYPE 00043000
  44. * DC CL2' ' FILEMODE 00044000
  45. * DC H' ' WRITE POINTER 00045000
  46. * DC H' ' READ POINTER 00046000
  47. * 00047000
  48. * EXIT CONDITIONS: 00048000
  49. * 00049000
  50. * NORMAL RETURN 00050000
  51. * R15=0 (AND CONDITION-CODE=0) 00051000
  52. * 00052000
  53. * FILE NOT FOUND 00053000
  54. * R15=1 (AND CONDITION-CODE=2) 00054000
  55. * 00055000
  56. * PARAMETER LIST ERROR 00056000
  57. * R15=2 (AND CONDITION-CODE=2) 00057000
  58. * 00058000
  59. * CALLS TO OTHER ROUTINES: 00059000
  60. * 00060000
  61. * DMSLAFFE, DMSLAF, DMSLFS 00061000
  62. * 00062000
  63. * EXTERNAL REFERENCES: 00063000
  64. * 00064000
  65. * AFTSECT, FVSECT 00065000
  66. * 00066000
  67. * TABLES/WORKAREAS 00067000
  68. * 00068000
  69. * NONE 00069000
  70. * 00070000
  71. * REGISTER USAGE: 00071000
  72. * 00072000
  73. * R13, FVSECT 00073000
  74. * R12, BASE 00074000
  75. * R1, AFTSECT 00075000
  76. * REST WORK 00076000
  77. * 00077000
  78. * OPERATION: 00078000
  79. * 00079000
  80. * DMSPNT CHECKS FOR POSSIBLE PARAMETER LIST ERRORS 00080000
  81. * AND EXITS WITH ERROR 2 IF PARAMETER LIST IF FAULTY. 00081000
  82. * 00082000
  83. * IF NOT, DMSPNT CALLS DMSLAF TO DETERMINE IF THE FST 00083000
  84. * ENTRY FOR THE GIVEN FILE 00084000
  85. * IS ALREADY IN THE ACTIVE FILE TABLE. IF YES, THE 00085000
  86. * READ AND/OR WRITE POINTERS ARE SET AS DESCRIBED 00086000
  87. * BELOW. 00087000
  88. * 00088000
  89. * IF NOT FOUND BY DMSLAF, THEN DMSPNT CALLS DMSLFS TO 00089000
  90. * FIND THE FILE. IF IT IS NOT FOUND, ERROR 1 IS 00090000
  91. * RETURNED TO THE CALLER. IF FOUND, THEN DMSLAFFE IS 00091000
  92. * CALLED TO 00092000
  93. * PLACE THE GIVEN FILE IN THE ACTIVE FILE TABLE. 00093000
  94. * 00094000
  95. * DMSPNT THEN CHECKS THE READ POINTER PROVIDED BY THE 00095000
  96. * CALLER; IF IT IS 00096000
  97. * ZERO, NO ACTION IS TAKEN. BUT IF NONZERO, THEN ITS 00097000
  98. * VALUE IS STORED IN THE READ POINTER (AFTRP) IN THE 00098000
  99. * ACTIVE FILE TABLE. 00099000
  100. * 00100000
  101. * NEXT, DMSPNT CHECKS THE WRITE POINTER PROVIDED BY THE 00101000
  102. * CALLER; IF IT IS ZERO 00102000
  103. * NO ACTION IS TAKEN. IF THE WRITE POINTER IS A 00103000
  104. * HALFWORD OF ALL ONES (THAT IS,=65535), THEN THE WRITE 00104000
  105. * POINTER AFTWP IS SET TO THE NUMBER OF ITEMS (AFTIC) 00105000
  106. * PLUS ONE. IF THE WRITE POINTER IS NEITHER 0 NOR 00106000
  107. * 65535, THEN ITS VALUE IS STORED IN THE WRITE POINTER 00107000
  108. * (AFTWP) IN THE ACTIVE FILE TABLE. 00108000
  109. * 00109000
  110. * WHEN THROUGH, POINT RETURNS TO THE CALLER AS SHOWN IN 00110000
  111. * THE EXIT CONDITIONS ABOVE. 00111000
  112. * 00112000
  113. *. 00113000
  114. EJECT 00114000
  115. POINT START 0 00115000
  116. USING NUCON,R0 00116000
  117. FSENTR REGSAV3 ENTER 'POINT', SAVE REGISTERS 00117000
  118. LA R6,BACK (FOR BCR'S TO SAVE SPACE) 00118000
  119. * BEWARE OF POSSIBLE INVALID PARAMETER-LIST 00119000
  120. * (E.G. IF CALLED FROM TERMINAL) 00120000
  121. LA R15,2 ERROR 2 IF THIS SHOULD HAPPEN ... 00121000
  122. LA R1,0(,R1) MAKE SURE THE REGISTER IS PRESENTABLE. 00122000
  123. CLC PMODE(10,R1),FENCE WATCH OUT FOR MODE ETC = JUST A FENCE 00123000
  124. BCR 8,R6 ERROR 2 IF IT IS. 00124000
  125. CLC PMODE+2(16,R1),BLNKFEN ALSO WATCH OUT FOR BLANKS & FENCE 00125000
  126. BCR 8,R6 ERROR 2 IF IT IS. 00126000
  127. * IF NEITHER OF THESE, PARAMETER-LIST PRESUMED TO BE OK ... 00127000
  128. * (ALLOW ANY MODE - E.G. P, T, S, BLANK, 00, X'FF', OR *) 00128000
  129. * 00129000
  130. LH R4,WPTR(,R1) PICK UP BOTH POINTERS FROM USER LIST 00130000
  131. LH R5,RPTR(,R1) (WHILE R1 STILL AVAILABLE) 00131000
  132. LR R11,R1 SAVE R1 IN R11 (NEEDED BY 'ACTFREE') 00132000
  133. * 00133000
  134. SR R0,R0 INITIALIZE R0 AND 00134000
  135. L R15,AACTLKP CALL 'ACTLKP' TO SEE 00135000
  136. BALR R14,R15 IF FILE IS IN ACTIVE-FILE-TABLE 00136000
  137. BZ FOUND BZ IF YES, FOUND THEREIN. 00137000
  138. * 00138000
  139. L R15,=V(DMSLFS) IF NOT, GO SEE IF THE FILE EXISTS 00139000
  140. BALR R14,R15 00140000
  141. BCR 7,R6 GO TO 'BACK' IF ERROR & RETURN FSTLKP ERROR-CODE 00141000
  142. * 00142000
  143. L R15,AACTFREE CALL 'ACTFREE' TO INSERT FST-ENTRY 00143000
  144. BALR R14,R15 IN ACTIVE FILE TABLE. 00144000
  145. * 00145000
  146. USING AFTSECT,R1 ... 00146000
  147. FOUND L R2,F65535 65535 INTO R2 00147000
  148. * (NOTE - READ-POINTER FROM P-LIST IN R5, WRITE-PTR IN R4) 00148000
  149. NR R5,R2 MAKE SURE READ-POINTER NO MORE THAN 65535 00149000
  150. BZ TSTWPT AND CHECK IT, BZ IF = 0. 00150000
  151. * 00151000
  152. STH R5,AFTRP STORE NEW READ POINTER IN FST 00152000
  153. * 00153000
  154. TSTWPT NR R4,R2 MAKE SURE WRITE-POINTER NO MORE THAN 65535 00154000
  155. BZ RETURN AND CHECK IT, BZ IF = 0. 00155000
  156. CR R4,R2 IS NEW WRITE-POINTER 'ALL ONES' ? 00156000
  157. BL SETWPT BL IF NOT, STORE NEW POINTER. 00157000
  158. LH R4,AFTIC IF YES, GET NO. OF ITEMS IN FILE, 00158000
  159. NR R4,R2 ... 00159000
  160. AH R4,H1 ADD 1 AND ... 00160000
  161. * 00161000
  162. SETWPT STH R4,AFTWP STORE NEW WRITE-POINTER IN FST-ENTRY 00162000
  163. * 00163000
  164. RETURN SR R15,R15 CLEAR GPR 15 00164000
  165. BACK LM R0,R14,REGSAV3 RESTORE REGISTERS, 00165000
  166. LTR R15,R15 SET CONDITION-CODE FOR CONVENIENCE OF CALLER 00166000
  167. BR R14 AND RETURN. 00167000
  168. * 00168000
  169. H1 DC H'1' 00169000
  170. EJECT 00170000
  171. * DISPLACEMENTS AND CONSTANTS 00171000
  172. * 00172000
  173. * DISPLACEMENTS FROM CALLER'S PARAMETER-LIST ... 00173000
  174. PMODE EQU 24 00174000
  175. WPTR EQU 26 00175000
  176. RPTR EQU 28 00176000
  177. * 00177000
  178. BLNKFEN DC 6C' ',10X'FF' WATCH OUT FOR BLANKS-FENCE OR FENCE 00178000
  179. FENCE EQU BLNKFEN+6 ... 00179000
  180. * 00180000
  181. LTORG 00180100
  182. EJECT 00181000
  183. NUCON 00182000
  184. AFT 00183000
  185. EJECT 00184000
  186. FVS 00185000
  187. EJECT 00186000
  188. REGEQU 00187000
  189. END 00188000
ibm/vm370-lib/cms/dmspnt.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator