Table of Contents

DMSGIO Source

References

Source Listing

DMSGIO.ASSEMBLE.txt
  1. GIO TITLE 'DMSGIO (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. *. 00003000
  4. ************************************************************ 00004000
  5. * 00005000
  6. * MODULE NAME: 00006000
  7. * 00007000
  8. * DMSGIO 00008000
  9. * 00009000
  10. * FUNCTION: 00010000
  11. * 00011000
  12. * CREATE THE DIAGNOSE AND CCW'S FOR AN I/O OPERATION TO 00012000
  13. * A DISPLAY TERMINAL FROM A VIRTUAL MACHINE. 00013000
  14. * 00014000
  15. * ATTRIBUTES: 00015000
  16. * 00016000
  17. * DISK RESIDENT 00017000
  18. * 00018000
  19. * ENTRY POINTS: 00019000
  20. * 00020000
  21. * DMSGIO 00021000
  22. * 00022000
  23. * ENTRY CONDITIONS: 00023000
  24. * 00024000
  25. * GPR1 - A(PLIST) 00025000
  26. * PLIST - A(BUFFER) ADDRESS OF INPUT BUFFER 00026000
  27. * A(LINE) ADDRESS OF DISPLAY LINE 00027000
  28. * A(COUNT) ADDRESS OF NUMBER OF BYTES TO 00028000
  29. * BE WRITTEN 00029000
  30. * A(FLAG) ADDRESS OF FUNCTION FLAG 00030000
  31. * 00031000
  32. * GPR13 - EDCB ADDRESS IF USED BY CMS EDITOR 00032000
  33. * OR 00033000
  34. * MUST BE ZERO IF NOT CALLED BY EDITOR 00034000
  35. * 00035000
  36. * OUTPUT: 00036000
  37. * 1. A DIAGNOSE IS ISSUED TO CP TO WRITE TO THE DISPLAY 00037000
  38. * TERMINAL. 00038000
  39. * 2. R15 CONTAINS: 00039000
  40. * A. 0 IF THE I/O OPERATION WAS SUCCESSFUL 00040000
  41. * B. NON-ZERO IF AN I/O ERROR OCURRED 00041000
  42. * 00042000
  43. * EXIT CONDITIONS: 00043000
  44. * 00044000
  45. * NORMAL - GPR15 = 0 00045000
  46. * 00046000
  47. * ERROR - GPR15 ¬= 0 00047000
  48. * 00048000
  49. * CALLS TO OTHER ROUTINES: 00049000
  50. * 00050000
  51. * NONE 00051000
  52. * 00052000
  53. * EXTERNAL REFERENCES: 00053000
  54. * 00054000
  55. * ADEVTAB - ADDRESS OF DEVICE TABLE IN CMS NUCLEUS 00055000
  56. * 00056000
  57. * OPERATION: 00057000
  58. * 00058000
  59. * DMSGIO FIRST DETERMINES IF IT HAS BEEN CALLED BY THE 00059000
  60. * CMS EDITOR. IF IT HAS, THEN A WORK AREA EXISTS IN THE 00060000
  61. * EDITOR EDCB CONTROL BLOCK FOR USE IN BUILDING THE CCW 00061000
  62. * TO BE PASSED TO CP. IF DMSGIO HAS BEEN CALLED FROM 00062000
  63. * AN APPLICATION PROGRAM, POSSIBLY VIA THE DISPW MACRO, 00063000
  64. * THEN DMSGIO GETS FREE STORAGE FOR THE CCW. 00064000
  65. * 00065000
  66. * DMSGIO CREATES A DIAGNOSE INSTRUCTION OF THE FORMAT: 00066000
  67. * 00067000
  68. * --------------------------------------- 00068000
  69. * | 83 | R1 | R2 | 0058 | 00069000
  70. * --------------------------------------- 00070000
  71. * 00071000
  72. * WHERE: 00072000
  73. * 00073000
  74. * 83 IS THE DIAGNOSE OPCADE 00074000
  75. * R1 IS A REGISTER CONTAINING THE ADDRESS OF 00075000
  76. * THE CCW 00076000
  77. * R2 IS A REGISTER CONTAINING A VIRTUAL 00077000
  78. * CONSOLE DEVICE ADDRESS 00078000
  79. * 0058 IS THE DIAGNOSE CODE IN HEXADECIMAL 00079000
  80. * 00080000
  81. * DMSGIO CREATES A CCW OF THE FORMAT: 00081000
  82. * 00082000
  83. * ----------------------------------------------- 00083000
  84. * | X'19' | DATA ADDR | FLGS | CTL | COUNT | 00084000
  85. * ----------------------------------------------- 00085000
  86. * 00086000
  87. * WHERE: 00087000
  88. * 00088000
  89. * DATA ADDR IS THE ADDRESS RECEIVED IN THE 00089000
  90. * PLIST OF THE INPUT BUFFER 00090000
  91. * FLGS Z ARE THE NORMAL CCW FLAG BITS 00091000
  92. * CTL IS THE LINE NUMBER POINTED TO BY 00092000
  93. * THE LINE ADDRESS IN THE PARAMETER 00093000
  94. * LIST. THE HIGH ORDER BIT IS 00094000
  95. * INTERPRETED BY CP AS A REQUEST 00095000
  96. * TO ERASE THE ENTIRE OUTPUT DISPLAY 00096000
  97. * PRIOR TO DISPLAYING THE NEW DATA. 00097000
  98. * IF THE FLAG IN THE PARAMETER LIST 00098000
  99. * INDICATES A CANCEL FUNCTION, THIS 00099000
  100. * FIELD WILL CONTAIN X'FF' TO CAUSE 00100000
  101. * A SCREEN CANCEL OPERATION. 00101000
  102. * COUNT IS THE HALFWORD COUNT POINTED TO 00102000
  103. * BY THE COUNT ADDRESS IN THE 00103000
  104. * PARAMETER LIST 00104000
  105. * 00105000
  106. * USING THE INPUT PARAMETER LIST, THIS MODULE IS A 00106000
  107. * BASIC INTERFACE FOR CMS OR APPLICATIONS PROGRAMS. 00107000
  108. * USING A STANDARD CALLING SEQUENCE, CMS OR AN 00108000
  109. * APLLICATION PROGRAM CAN WRITE TO THE DISPLAY 00109000
  110. * TERMINAL. 00110000
  111. * 00111000
  112. * 00112000
  113. * 00113000
  114. ************************************************************ 00114000
  115. *. 00115000
  116. EJECT 00116000
  117. DMSGIO START 0 00117000
  118. USING DMSGIO,R10 @V305614 00118000
  119. USING EDCB,R13 @V305614 00119000
  120. LR R10,R15 @V305614 00120000
  121. USING NUCON,R0 00121000
  122. USING GIOLIST,R3 @VA05027 00122000
  123. LR R3,R1 SAVE PLIST POINTER @VA05027 00123000
  124. SPACE 1 00124000
  125. LTR R9,R13 IF R13 IS 0 THERE IS NO EDCB @VA05027 00125000
  126. BNZ HAVEDCB ..... @VA05027 00126000
  127. SPACE 1 00127000
  128. DMSFREE DWORDS=2 @VA05027 00128000
  129. LR R13,R1 GET GIO FREE STOR ADR @VA05027 00129000
  130. B READY NOW GO PLUG THE CCW @VA05027 00130000
  131. SPACE 1 00131000
  132. HAVEDCB LA R13,CMDBLOK ADDRESSABILITY FOR COMMAND @VA05027 00132000
  133. DROP R13 @VA05027 00133000
  134. USING GIOBLOK,R13 @VA05027 00134000
  135. SPACE 1 00135000
  136. READY MVI GIOCMD,GIOOP PLUG SPECIAL OP-CODE @VA05027 00136000
  137. MVI GIOFLG,GIOSLI SET SILI BIT ON @VA05027 00137000
  138. MVC GIOBUF(3),GIOLBUF GET BUFFER ADR FROM PLIST @VA05027 00138000
  139. L R2,GIOLINE GET ADR OF LINE NUMBER @VA05027 00139000
  140. MVC GIOCTL,1(R2) PLUG LINE NUMBER @VA05027 00140000
  141. L R2,GIOLCNT GET ADR OF COUNT @VA05027 00141000
  142. MVC GIOCNT,0(R2) PLUG COUNT INTO CCW @VA05027 00142000
  143. L R2,GIOLFLG GET FLAG ADR @VA05027 00143000
  144. TM 0(R2),CANCLB CANCEL REQUESTED ? 00144000
  145. BNO NOCANC NO...BR 00145000
  146. LA R5,CANCEL POINT TO CANCEL CCW @VA05027 00146000
  147. B OVLAY GET DEVICE ADR 00147000
  148. NOCANC LA R5,GIOCMD CCW ADR FOR NORMAL WRITE @VA05027 00148000
  149. MVI 4(R5),X'20' SET ALL FLAGS TO NORMAL GG934D0 00148100
  150. TM 0(R2),X'08' WANTS ATTRIBUTE BYTES ALLOWED? GG934D0 00148200
  151. BNO *+8 NO, DO NOT TURN BIT ON GG934D0 00148300
  152. OI 4(R5),X'02' SET ATTR. ALLOWED FLAG GG934D0 00148400
  153. TM 0(R2),X'04' HI-INTENSITY WANTED? GG934D0 00148500
  154. BNO NOHI NO, DON'T SET BIT GG934D0 00148600
  155. OI 4(R5),X'01' TURN ON HI-INTENSITY GG934D0 00148700
  156. NOHI EQU * GG934D0 00148800
  157. TM 0(R2),ERASB DO WE ERASE ? 00149000
  158. BNO OVLAY NO...BR 00150000
  159. OI GIOCTL,CPMORE SET ERASE BIT FOR CP @VA05027 00151000
  160. OVLAY L R2,ADEVTAB ADR OF DEVTAB IN NUCLEUS 00152000
  161. LH R4,0(,R2) GET CONSOLE DEVICE ADDR 00153000
  162. SR R15,R15 CLEAR RETCODE REGISTER @VM08823 00154000
  163. WAITDISP TIO 0(R4) MAKE SURE DISPLAY @VM08823 00155000
  164. BC 7,WAITDISP IS AVAILABLE @VM08823 00156000
  165. DIAG DC X'83',X'54',X'0058' SPECIAL DISPLAY DIAGNOSE @VM08823 00157000
  166. BZ DONE BR..IF I/O STARTED @VM08823 00158000
  167. BC 3,CCER BR..IF NOT CSW STORED @VM08823 00159000
  168. TM CSW+4,X'10' WAS DEVICE BUSY ? @VM08823 00160000
  169. BO WAITDISP IF SO..TRY AGAIN @VM08823 00161000
  170. CLI CSW+4,X'04' DE ONLY ? @VM08823 00162000
  171. BE WAITDISP YES..BR @VM08823 00163000
  172. B BADERR MUST BE A BAD ONE @VM08823 00164000
  173. CCER EQU * @VM08823 00165000
  174. BC 1,BADERR BR..NOT OPER @VM08823 00166000
  175. B WAITDISP BR..MUST HAVE BEEN BUSY @VM08823 00167000
  176. BADERR EQU * @VM08823 00168000
  177. LA R15,4 SET ERROR CODE @VM08823 00169000
  178. DONE EQU * @VM08823 00170000
  179. LTR R13,R9 DID WE GET FREE STORAGE ? @VA05027 00171000
  180. BNZR R14 JUST RETURN IF NOT @VA05027 00172000
  181. DMSFRET DWORDS=(0),LOC=(1) @VA05027 00173000
  182. BR R14 RETURN 00174000
  183. SPACE 1 00175000
  184. *************************************************************** 00176000
  185. * 00177000
  186. * EQUATES AND CONSTANTS 00178000
  187. * 00179000
  188. *************************************************************** 00180000
  189. SPACE 1 00181000
  190. ERASB EQU X'01' CAUSE MORE STATUS 00182000
  191. CPMORE EQU X'80' TELL CP CAUSE MORE 00183000
  192. CANCLB EQU X'02' CANCEL OP REQUESTED 00184000
  193. GIOOP EQU X'19' SPECIAL OP CODE FOR GRAPHICS @VA05027 00185000
  194. GIOSLI EQU X'20' SILI BIT FOR CCW FLAG @VA05027 00186000
  195. SPACE 1 00187000
  196. * KEEP THE NEXT TWO STATEMENTS TOGETHER * 00188000
  197. DS 0D @VA05027 00189000
  198. CANCEL DC X'1900000020FF0001' CANCEL SCREEN CCW @VA05027 00190000
  199. SPACE 1 00191000
  200. * GIOLIST MAPS THE PARAMETER LIST PASSED TO DMSGIO * 00192000
  201. GIOLIST DSECT @VA05027 00193000
  202. DS X @VA05027 00194000
  203. GIOLBUF DS 3X ADR OF WRITE BUFFER @VA05027 00195000
  204. GIOLINE DS F ADR OF THE LINE NUMBER @VA05027 00196000
  205. GIOLCNT DS F ADR OF THE WRITE COUNT @VA05027 00197000
  206. GIOLFLG DS F ADR OF THE INDICATOR FLAG @VA05027 00198000
  207. SPACE 1 00199000
  208. * GIOBLOK MAPS THE FREE STORAGE OBTAINED BY DMSGIO FOR 00200000
  209. * USE IN BUILDING THE CCW TO BE PASSED TO CP 00201000
  210. GIOBLOK DSECT @VA05027 00202000
  211. GIOCMD DS X CCW OP-CODE @VA05027 00203000
  212. GIOBUF DS 3X WRITE BUFFER ADDRESS @VA05027 00204000
  213. GIOFLG DS X FLAG BYTE @VA05027 00205000
  214. GIOCTL DS X LINE NUMBER @VA05027 00206000
  215. GIOCNT DS H WRITE COUNT @VA05027 00207000
  216. SPACE 1 00208000
  217. EDCB @V305614 00209000
  218. EJECT 00210000
  219. NUCON 00211000
  220. REGEQU 00212000
  221. END 00213000