User Tools

Site Tools


ibm:vm370-lib:cms:dmsiow.assemble_src

DMSIOW Source

References

Source Listing

DMSIOW.ASSEMBLE.txt
  1. IOW TITLE 'DMSIOW (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. * MODULE NAME: 00004000
  5. * 00005000
  6. * DMSIOW P3031 00006000
  7. * 00007000
  8. * FUNCTION: 00008000
  9. * 00009000
  10. * PLACE THE VIRTUAL CPU IN THE WAIT STATE UNTIL THE COMPLETION 00010000
  11. * OF AN I/O OPERATION ON ONE OR MORE DEVICES. 00011000
  12. * 00012000
  13. * ATTRIBUTES: 00013000
  14. * 00014000
  15. * NUCLEUS RESIDENT, REENTRANT, CALLED VIA SVC OR BALR 00015000
  16. * IF CALLER'S SYSTEM MASK IS X'00'. 00016000
  17. * 00017000
  18. * ENTRY POINT 00018000
  19. * 00019000
  20. * 1. DMSIOW, WAIT - WAIT FOR END OF I/O OPERATION P3031 00020000
  21. * 2. DMSIOWR, WAITRTN P3031 00021000
  22. * 00022000
  23. * ENTRY CONDITIONS - 00023000
  24. * 00024000
  25. * GPR1 = A(PLIST) 00025000
  26. * 00026000
  27. * PLIST DC CL8'WAIT' 00027000
  28. * DC CL4' ' SYMBOLIC DEVICE NAME/(CON1,DSK1,PCH1,ETC.) 00028000
  29. * DC CL4' ' SYMBOLIC DEVICE NAME/(CON1,DSK1,PCH1,ETC.) 00029000
  30. * . 00030000
  31. * . 00031000
  32. * . 00032000
  33. * DC F'0' SIGNIFIES END OF DEVICE LIST 00033000
  34. * DS 1F SYMBOLIC NAME OF INTERRUPTING DEVICE 00034000
  35. * IS STORED HERE (BY WAIT) AFTER IOINT 00035000
  36. * RETURNS TO WAIT. 00036000
  37. * 00037000
  38. * EXIT CONDITIONS: 00038000
  39. * 00039000
  40. * NORMAL - 00040000
  41. * GPR15 = 0 00041000
  42. * SYMBOLIC NAME OF INTERRUPTING DEVICE STORED IN PLIST. 00042000
  43. * 00043000
  44. * ERROR - 00044000
  45. * GPR15 = 1 - INDICATES THAT SYMBOLIC NAME IS NOT IN 00045000
  46. * THE INTERRUPT TABLES. 00046000
  47. * 00047000
  48. * CALLS TO OTHER ROUTINES: 00048000
  49. * 00049000
  50. * NONE. 00050000
  51. * 00051000
  52. * EXTERNAL REFERENCES: 00052000
  53. * 00053000
  54. * NONE. 00054000
  55. * 00055000
  56. * TABLES/WORKAREAS: 00056000
  57. * 00057000
  58. * NONE. 00058000
  59. * 00059000
  60. * REGISTER USAGE: 00060000
  61. * 00061000
  62. * GPR0 = WORK 00062000
  63. * GPR1 = PLIST ADDRESS 00063000
  64. * GPR2 = SYMBOLIC NAME 00064000
  65. * GPR3 = UNUSED 00065000
  66. * GPR4 = WORK 00066000
  67. * GPR5 = ADDRESS OF USER INTERRUPT TABLE. 00067000
  68. * GPR6 = LENGTH OF USER INTERRUPT TABLE ENTRY=28 00068000
  69. * GPR7 = ADDRESS OF LAST ENTRY IN USER INTERRUPT TABLE. 00069000
  70. * GPR8 = ADDRESS OF NAME OF DEVICE CAUSING LAST I/O INTERRUPT 00070000
  71. * GPR9 = ADDRESS OF REGULAR INTERRUPT TABLE. 00071000
  72. * GPR10 = LENGTH OF REGULAR INTERRUPT TABLE ENTRY=16 00072000
  73. * GPR11 = ADDRESS OF LAST ENTRY IN REGULAR INTERRUPT TABLE 00073000
  74. * TABLE. 00074000
  75. * GPR12 = UNUSED 00075000
  76. * GPR13 = UNUSED 00076000
  77. * GPR14 = CALLER'S RETURN ADDRESS 00077000
  78. * GPR15 = BASE REGISTER 00078000
  79. * 00079000
  80. * NOTES: 00080000
  81. * 00081000
  82. * NONE. 00082000
  83. * 00083000
  84. * OPERATION: 00084000
  85. * 00085000
  86. * WAIT LOOKS UP THE FIRST SYMBOLIC DEVICE NAME IN THE 00086000
  87. * USER-DEFINED INTERRUPT TABLE (IF ANY -- AS 00087000
  88. * INITIALIZED BY THE HNDINT FUNCTION PROGRAM), OR IN 00088000
  89. * THE DEVICE TABLE (DEVTAB) IN THE NUCLEUS. IF THE 00089000
  90. * DEVICE IS NOT IN EITHER TABLE, WAIT RETURNS TO THE 00090000
  91. * CALLER WITH ERROR CODE 1. 00091000
  92. * 00092000
  93. * IF THE DEVICE WAS FOUND, WAIT PUTS THE PSEUDO-WAIT 00093000
  94. * BIT IN THE CORRESPONDING DEVICE TABLE ENTRY ON. WAIT 00094000
  95. * REPEATS THIS PROCEDURE FOR EACH SYMBOLIC DEVICE NAME 00095000
  96. * ON THE PARAMETER LIST. IT THEN LOADS A PSW WITH THE 00096000
  97. * WAIT BIT ON. THIS CAUSES THE SYSTEM TO ENTER THE 00097000
  98. * WAIT STATE UNTIL AN I/O OPERATION IN ONE OF THE 00098000
  99. * SPECIFIED DEVICES IS COMPLETED. AFTER THE I/O 00099000
  100. * OPERATION IS COMPLETED, IOINT RETURNS CONTROL TO 00100000
  101. * WAIT, WHICH PLACES THE SYMBOLIC NAME OF THE 00101000
  102. * INTERUPTING DEVICE (THAT IS, THE DEVICE ON WHICH THE 00102000
  103. * I/O OPERATION WAS COMPLETED) IN THE LAST ENTRY IN THE 00103000
  104. * PARAMETER LIST AND RETURNS CONTROL TO THE CALLER. 00104000
  105. * 00105000
  106. * WAIT CAN BE CALLED VIA SVC, OR CAN ALSO BE CALLED BY 00106000
  107. * BALR IF THE CALLER'S SYSTEM MASK IS X'00'. FOR DISK 00107000
  108. * RESIDENT PROGRAMS DOING THEIR OWN I/O OPERATIONS WAIT 00108000
  109. * SHOULD BE CALLED VIA SVC. 00109000
  110. * 00110000
  111. *. 00111000
  112. EJECT 00112000
  113. WAIT START 0 00113000
  114. USING NUCON,R0 00114000
  115. ENTRY DMSIOW,WAITRTN,DMSIOWR P3031 00115000
  116. DMSIOW EQU * P3031 00116000
  117. EXTRN DEVTAB DEVICE TABLE IN NUCON 00117000
  118. EXTRN TABEND END OF DEVICE TABLE IN NUCON 00118000
  119. EXTRN IONTABL (ADDRESS OF USER-DEFINED INTERRUPT-TABLE) 00119000
  120. STM R0,R11,WAITSAVE SAVE REGISTERS 0 TO 11 00120000
  121. BALR R15,0 RE-ESTABLISH 00121000
  122. USING *,R15 ADDRESSABILITY, 00122000
  123. REGADD SR R0,R0 CLEAR R0, 00123000
  124. LA R1,8(,R1) BUMP R1 TO POINT AT SYMBOLIC DEVICE(S) 00124000
  125. LM R7,R11,AIONTABL SET UP SOME OF THE REG. WE NEED, 00125000
  126. LM R5,R7,4(R7) NOW GET USER-DEFINED-TABLE (IF ANY) 00126000
  127. LR R4,R5 SAVE R5 IN R4 FOR LATER INITIALIZING, 00127000
  128. LR2D L R2,0(,R1) PICK UP NEXT SYMBOLIC DEVICE 00128000
  129. LTR R5,R4 START OF USER-DEFINED-TABLE (IF ANY) 00129000
  130. BZ TRYREG BZ IF NONE, TRY REGULAR NUCON TABLE. 00130000
  131. SRCHU CL R2,NAME(,R5) DOES SYMBOLIC NAME MATCH ? 00131000
  132. BE FOUNDU BE IF MATCH FOUND IN USER-DEFINED-TABLE 00132000
  133. BXLE R5,R6,SRCHU ITERATE THRU USER-DEFINED-TABLE. 00133000
  134. TRYREG L R9,ADEVTB GET START OF REGULAR TABLE, 00134000
  135. SRCHR CL R2,NAME(,R9) DOES SYMBOLIC NAME MATCH REGULAR TABLE ? 00135000
  136. BE FOUND BE IF MATCH FOUND IN REGULAR TABLE. 00136000
  137. BXLE R9,R10,SRCHR ITERATE THRU REGULAR TABLE. 00137000
  138. LA R0,1 SET R0 FOR ERROR NO. 1 (INTO R15 AT END) 00138000
  139. LA R15,NEWADD SET UP R15 AS NEEDED, 00139000
  140. USING NEWADD,R15 FOR NEXT INSTRUCTION ONLY ... 00140000
  141. B LTR54 GO MAKE SURE ALL PSEUDO-WAIT-BITS ARE OFF 00141000
  142. USING REGADD,R15 RESTORE NORMAL ADDRESSABILITY 00142000
  143. FOUNDU LR R9,R5 SAVE ADDRESS IN R9, 00143000
  144. FOUND OI STATS(R9),WAITP SET PSEUDO WAIT-BIT, 00144000
  145. TM STATS(R9),INTR HAS AN INTERRUPT ALREADY BEEN RECEIVED ? 00145000
  146. BO YES1 BO IF YES. OTHERWISE, ... 00146000
  147. LA R1,4(,R1) ADVANCE TO NEXT NAME (IF ANY) 00147000
  148. C R0,0(,R1) IS 'NEXT NAME' 0 (END OF LIST) ? 00148000
  149. BNE LR2D BNE IF NOT, GO HANDLE NEXT NAME. 00149000
  150. LA R1,4(,R1) BUMP R1 TO POINT AT WORD FOR DEVICE NAME 00150000
  151. * FOR WHICH WE EXPECT AN INTERRUPT. 00151000
  152. LPSW WAITNG LOAD PSW ENABLED WITH WAIT BIT ON 00152000
  153. * 00153000
  154. YES1 LA R1,4(,R1) ADVANCE TO NEXT WORD, 00154000
  155. C R0,0(,R1) ARE WE AT THE END OF LIST YET ? 00155000
  156. BNE YES1 IF NOT, KEEP SCANNING AHEAD 00156000
  157. LA R1,4(,R1) NOW POINTTS TO WHERE DEVICE WILL STORE 00157000
  158. TM STATS(R9),INTP HAS INTERRUPT ALSO BEEN PROCESSED ? 00158000
  159. BO YES2 BO IF YES (MAKES IT EASY) 00159000
  160. * HANDLE 'INTERRUPT RECEIVED BUT NOT YET PROCESSED' ... 00160000
  161. MVC IOOPSW,WAITNG SET UP OUR WAIT PSW 00161000
  162. MVC IOOPSW+2(2),SAVIOLD+2(R9) WITH DEVICE FILLED IN 00162000
  163. MVC CSW,SAVCSW(R9) RESTORE REAL CSW 00163000
  164. LPSW IONPSW INVEIGLE 'IOINT' INTO DOING ALL THE WORK. 00164000
  165. * 00165000
  166. YES2 ST R2,0(,R8) STORE DEVICE IN NUCON FOR LATER STORING 00166000
  167. NI STATS(R9),255-INTR-INTP CLEAR INT. REC'D & PROC. BITS 00167000
  168. DMSIOWR EQU * P3031 00168000
  169. WAITRTN BALR R15,0 MAKE ABSOLUTELY SURE 00169000
  170. USING *,R15 WE HAVE ADDRESSABILITY 00170000
  171. NEWADD MVC 0(4,R1),0(R8) PUT NAME OF INT-CAUSING DEVICE IN P-LIST 00171000
  172. LTR54 LTR R5,R4 RESTORE R5, 00172000
  173. BZ CLRREG BZ IF NO USER-TABLE TO CONCERN WITH 00173000
  174. TM DBGFLAGS,DBGEXINT ARE WE IN DEBUG VIA EXT INT @VA05275 00173100
  175. BNZ CLRREG YES DON'T ERASE USER WAITS @VA05275 00173200
  176. OFFSTATU NI STATS(R5),255-WAITP CLEAR ALL PSEUDO-WAIT BITS 00174000
  177. BXLE R5,R6,OFFSTATU IN THE USER-DEFINED-TABLE. 00175000
  178. CLRREG L R9,ADEVTB RESTORE R9, AND 00176000
  179. OFFSTATR NI STATS(R9),255-WAITP CLEAR ALL PSEUDO-WAIT BITS IN 00177000
  180. BXLE R9,R10,OFFSTATR REGULAR NUCON TABLE. 00178000
  181. L R11,AEXTSECT @VM08901 00178100
  182. USING EXTSECT,R11 @VM08901 00178150
  183. CLI TIMCHAR,0 IS 'BLIP' ON? @VM08901 00178200
  184. BE RETURN IF NOT, DON'T RESET INTERVAL@VM08901 00178250
  185. TM EXTFLAG,REALTIMR REAL TIMER BEING USED? @VM08901 00178300
  186. BZ RETURN IF NOT, NO NEED TO RESET @VM08901 00178350
  187. * @VM08901 00178400
  188. MVC TIMER(4),TIMINIT RESET 2-SEC TIMER INTERVAL @VM08901 00178450
  189. NI EXTFLAG,255-REALTIMR AND REAL TIMR INDICATOR @VM08901 00178500
  190. RETURN EQU * @VM08901 00178550
  191. LR R15,R0 ERROR-CODE (USUALLY 0) INTO R15, 00179000
  192. LM R0,R11,WAITSAVE RESTORE REGISTERS 00180000
  193. BR R14 RETURN TO CALLER. 00181000
  194. SPACE 3 00182000
  195. * DISPLACEMENTS .... 00183000
  196. DEVI EQU 0 DEVICE-ADDRESS IN TABLE 00184000
  197. STATS EQU 2 STATUS HALF WORD IN TABLE 00185000
  198. NAME EQU 4 LOGICAL DEVICE NAME 00186000
  199. INTLOC EQU 8 DEVICE INTERRUPT ROUTINE 00187000
  200. SAVIOLD EQU 12 SAVED IO-OLD-PSW 00188000
  201. SAVCSW EQU 20 SAVED CSW 00189000
  202. * 00190000
  203. WAITP EQU X'80' PSEUDO-WAIT-BIT 00191000
  204. ASAP EQU X'40' INT. TO BE HANDLED AS SOON AS POSSIBLE 00192000
  205. INTR EQU X'20' = INTERRUPT RECEIVED 00193000
  206. INTP EQU X'10' = INTERRUPT-PROCESSED 00194000
  207. * 00195000
  208. * 00196000
  209. * CONSTANTS. . . . . 00197000
  210. DS 0D 00198000
  211. WAITNG DC X'FF060000',A(WAITRTN) WAIT PSW WITH RETURN @VA07921 00199000
  212. * KEEP THE FOLLOWING SEVERAL IN ORDER (USED WITH 'LM') ... 00200000
  213. AIONTABL DC A(IONTABL) R7 (VERY BRIEFLY) 00201000
  214. DC V(DEVICE) R8 00202000
  215. ADEVTB DC A(DEVTAB) R9 FIRST ENTRY IN REGULAR NUCON TABLE 00203000
  216. DC F'16' R10 NUMBER OF BYTES PER ENTRY 00204000
  217. DC A(TABEND-16) R11 LAST ENTRY IN REG. NUCON TABLE 00205000
  218. EJECT 00206000
  219. NUCON 00207000
  220. EXTSECT @VM08901 00207100
  221. REGEQU 00208000
  222. END 00209000
ibm/vm370-lib/cms/dmsiow.assemble_src.txt ยท Last modified: 2023/08/06 13:35 by Site Administrator