User Tools

Site Tools


ibm:vm370-lib:cp:dmkvcn.assemble_src

DMKVCN Source

References

Source Listing

DMKVCN.ASSEMBLE.txt
  1. VCN TITLE 'DMKVCN (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF SYSIN 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKVCN 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * TO HANDLE THE SIMULATION OF ALL USER SIO'S TO A VIRTUAL 00010000
  11. * CONSOLE 00011000
  12. * 00012000
  13. * ATTRIBUTES - 00013000
  14. * 00014000
  15. * REENTRANT, RESIDENT, ENTERED VIA GOTO FROM DMKVIOEX 00015000
  16. * 00016000
  17. * ENTRY POINTS - 00017000
  18. * 00018000
  19. * DMKVCNEX - TO SIMULATE A SIO TO A VIRTUAL CONSOLE 00019000
  20. * 00020000
  21. * ENTRY CONDITIONS - 00021000
  22. * 00022000
  23. * GPR2 = CONTENTS OF THE USER'S CAW (VIRTUAL ADDRESS) 00023000
  24. * GPR6 = ADDRESS OF THE VCHBLOK FOR ADDRESSED VIRTUAL CHANNEL 00024000
  25. * GPR7 = ADDRESS OF THE VCUBLOK FOR ADDRESSED VIRTUAL 00025000
  26. * CONTROL UNIT 00026000
  27. * GPR8 = ADDRESS OF THE VDEVBLOK FOR ADDRESSED VIRTUAL DEVICE 00027000
  28. * GPR11 = ADDRESS OF THE USER'S VMBLOK 00028000
  29. * GPR12 = ADDRESS OF DMKVCN 00029000
  30. * 00030000
  31. * NOTE THAT WHEN DMKVCNEX IS ENTERED ROM DMKVIO, GPR13 DOES 00031000
  32. * NOT POINT TO A SAVEAREA, AND THE ENTER AND EXIT MACROS MAY NOT 00032000
  33. * BE USED. INSTEAD, EXIT IS MADE DIRECTLY TO DMKDSPCH VIA A 00033000
  34. * GOTO. 00034000
  35. * 00035000
  36. * EXIT CONDITIONS - 00036000
  37. * 00037000
  38. * NORMAL - 00038000
  39. * EXIT IS MADE DIRECTLY TO DMKDSPCH, WITH THE CORRECT PENDING 00039000
  40. * STATUS PLACED IN ALL VIRTUAL IO BLOKS AND THE USER'S 00040000
  41. * CHANNEL PROGRAM COMPLETELY INTERPRETED. NOTE THAT THE USER IS 00041000
  42. * REMOVED FROM EXECUTION WAIT BEFORE THE FIRST CCW IS 00042000
  43. * INTERPRETED. 00043000
  44. * 00044000
  45. * ERROR - 00045000
  46. * NONE 00046000
  47. * 00047000
  48. EJECT 00048000
  49. * 00049000
  50. * CALLS TO OTHER ROUTINES - 00050000
  51. * 00051000
  52. * DMKFREE, DMKFRET - TO GET AND RETURN A DATA BUFFER FROM FREE 00052000
  53. * STORAGE 00053000
  54. * DMKQCNWT - TO WRITE DATA TO THE USER IN RESPONSE TO A 00054000
  55. * WRITE CCW, AND TO WRITE THE VIRTUAL BELL MESSAGE 00055000
  56. * IN RESPONSE TO AN ALARM CCW 00056000
  57. * DMKQCNRD - TO READ DATA FROM THE USER IN RESPONSE TO A VIRTUAL 00057000
  58. * READ CCW 00058000
  59. * DMKCFMBK - TO PLACE THE USER IN CONSOLE FUNCTION MODE IF 2 00059000
  60. * OR MORE ATTENTIONS ARE HIT 00060000
  61. * DMKSCNVU - TO SCAN FOR VIRTUAL CONSOLE DEVICE AFTER 00061000
  62. * READ OR WRITE RETURN - IT MAY HAVE MOVED. 00062000
  63. * DMKDSPCH - TO AWAIT COMPLETION OF CONSOLE I/O 00063000
  64. * DMKCFMAT - TO SET AN ATTN INT PENDING 00064000
  65. * DMKPSASC - TO CHECK STORAGE PROTECTION KEY 00065000
  66. * DMKPSACC - TO CHECK IF SHARED PAGE HAS BEEN CHANGED 00066000
  67. * DMKVMAPS - TO UNSHARE A NAMED SHARED SYSTEM FROM RUNUSER 00067000
  68. * HDKD58EN - TO HANDLE DIAGNOSE X'58' FULL SCREEN I/O HRC058DK 00067100
  69. * 00068000
  70. * EXTERNAL REFERENCES - 00069000
  71. * 00070000
  72. * DMKVIOMK - A TABLE OF BIT FLAGS INDEXABLE BY DEVICE ADDRESS, 00071000
  73. * USED TO SET AND CLEAR PENDING FLAGS IN VIRTUAL 00072000
  74. * DEVICE, CONTROL UNIT, AND CHANNEL BLOKS 00073000
  75. * 00074000
  76. * TABLES / WORK AREAS - 00075000
  77. * 00076000
  78. * THE VIRTUAL DEVICE, CONTROL UNIT, AND CHANNEL BLOKS ARE 00077000
  79. * UPDATED WITH THE PROPER INTERRUPT AND STATUS INFORMATION 00078000
  80. * SO THAT UNSTIO MAY UNSTACK A VIRTUAL INTERRUPT TO THE 00079000
  81. * USER WHEN HE IS ENABLED 00080000
  82. * 00081000
  83. * REGISTER USAGE - 00082000
  84. * 00083000
  85. * GPR6 = ADDRESS OF THE VCHBLOK FOR ADDRESSED DEVICE 00084000
  86. * GPR7 = ADDRESS OF THE VCUBLOK FOR ADDRESSED DEVICE 00085000
  87. * GPR8 = ADDRESS OF THE VDEVBLOK FOR ADDRESSED DEVICE 00086000
  88. * GPR9 = SUBROUTINE LINKAGE RETURN REGISTER 00087000
  89. * GPR10 = DATA BUFFER PTR 00088000
  90. * GPR11 = ADDRESS OF USER'S VMBLOK 00089000
  91. * GPR12 = DMKVCN BASE ADDRESS 00090000
  92. * GPR13 = ADDRESS OF THE VCONCTL BLOK 00091000
  93. * GPR14,GPR15 = BALR LINKAGE FOR CALLS TO DMKFREE AND DMKFRET 00092000
  94. * 00093000
  95. * ALL OTHER REGISTERS ARE WORK REGISTERS 00094000
  96. * 00095000
  97. * NOTES - 00096000
  98. * 00097000
  99. * VIRTUAL CONSOLE READ OR WRITE OPERATIONS ARE LIMITED TO 00098000
  100. * A MAXIMUM OF 2032 BYTES ON A CCW SEQUENCE. A CCW SEQUENCE 00099000
  101. * IS DEFINED AS A READ OR WRITE CCW THAT IS DATA CHAINED. 00100000
  102. * A CCW THAT IS UNCHAINED OR COMMAND CHAINED COMPLETES 00101000
  103. * A SEQUENCE. IF AN OPERATION IS ATTEMPTED FOR MORE THAN 00102000
  104. * 2032 BYTES THE CCW CHANNEL PROGRAM IS TERMINATED WITH 00103000
  105. * INCORRECT LENGTH AND CHANNEL PROGRAM CHECK. 00104000
  106. * 00105000
  107. EJECT 00106000
  108. * 00107000
  109. * OPERATION - 00108000
  110. * 00109000
  111. * 1. MARK THE VIRTUAL DEVICE AND SUBCHANNEL BUSY, CLEAR THE 00110000
  112. * CSW AND SAVE THE STORAGE KEY. 00111000
  113. * 00112000
  114. * 2. VERIFY THAT THE DEVICE IS READY; IF NOT SET INTERVENTION 00113000
  115. * REQUIRED IN THE VIRTUAL SENSE BYTE AND INDICATE UNIT 00114000
  116. * CHECK. 00115000
  117. * 00116000
  118. * 3. IF THE CCW OP-CODE IS LEGAL CONTINUE PROCESSING FOR THE 00117000
  119. * GIVEN CCW OP-CODE TYPE; OTHERWISE SET COMMAND REJECT IN 00118000
  120. * THE VIRTUAL SENSE BYTE AND INDICATE UNIT CHECK. 00119000
  121. * 00120000
  122. *. 00121000
  123. EJECT 00122000
  124. COPY OPTIONS 00123000
  125. SPACE 2 00124000
  126. COPY LOCAL OPTIONS 00125000
  127. EJECT 00126000
  128. DMKVCN CSECT 00127000
  129. SPACE 3 00128000
  130. USING PSA,R0 00129000
  131. USING VCHBLOK,R6 00130000
  132. USING VCUBLOK,R7 00131000
  133. USING VDEVBLOK,R8 00132000
  134. USING VMBLOK,R11 00133000
  135. SPACE 00134000
  136. EXTRN DMKCFMEN,DMKTBLUP @V200930 00135000
  137. EXTRN DMKQCNRD,DMKCFMBK,DMKVIOMK 00136000
  138. EXTRN DMKSCNVU,DMKCFMAT @V200930 00137000
  139. EXTRN DMKFRET @V200730 00138000
  140. EXTRN DMKGRTDS,DMKGRTIN @V60A6B6 00138100
  141. EXTRN DMKPSASC,DMKPSACC @V60BC11 00139000
  142. EXTRN DMKVMASH @VA07351 00139100
  143. EXTRN HDKD58EN HRC058DK 00139150
  144. EJECT 00140000
  145. ENTRY DMKVCNEX 00141000
  146. USING *,R12 00142000
  147. SPACE 00143000
  148. DMKVCNEX DS 0H 00144000
  149. L R1,VDEVIOCT GET IOCOUNT FOR DEVICE 00145000
  150. AL R1,F1 BUMP IO COUNT 00146000
  151. ST R1,VDEVIOCT AND STORE 00147000
  152. OI VDEVSTAT,VDEVBUSY+VDEVCHBS INDICATE DEVICE BUSY 00148000
  153. NI VMRSTAT,X'FF'-VMEXWAIT REMOVE FROM EXECUTION WAIT 00149000
  154. LA R1,0(,R2) CLEAR STORAGE KEY FROM CAW 00150000
  155. OI VDEVFLAG,VDEVCCW1 INDICATE 1ST CCW 00151000
  156. XC VDEVCSW+4(2),VDEVCSW+4 SET STATUS PORTION OF INITIAL *00152000
  157. CSW TO ZERO 00153000
  158. STCM R2,B'1000',VDEVKEY SAVE STORAGE KEY IN VDEVBLOK 00154000
  159. L R13,VDEVCON GET VCONCTL BLOCK 00155000
  160. USING VCONCTL,R13 00156000
  161. ST R1,VCONCAW SET FIRST VIRTUAL CAW 00157000
  162. NI VDEVCFLG,X'FF'-(VDEVATTN+VDEVTRAN+VDEVVCF) RESET@V200930 00158000
  163. MVI VCONFLAG,0 CLEAR FLAG 00159000
  164. TM VDEVKEY,X'0F' CHECK FOR INVALID KEY BITS IN CAW 00160000
  165. BNZ PROGCHK BRANCH IF ANY ON 00161000
  166. SPACE 1 00162000
  167. VCNGTNXT EQU * HERE TO GET AND PROCESS NEXT CCW 00163000
  168. BAL R9,GETCCW GET CCW 00164000
  169. SPACE 00165000
  170. VCNNEXT EQU * HERE TO INTERPRET CCW 00166000
  171. TM VCONCOMD,X'0F' CHECK FOR A VALID OPCODE BIT 00167000
  172. BZ PROGCHK ERROR IF NONE ON 00168000
  173. CLI VCONCOMD,X'03' NOP? 00169000
  174. BE VCNF1 YES 00170000
  175. CLI VCONCOMD,X'04' SENSE? 00171000
  176. BE VCNSNSCN YES 00172000
  177. MVI VDEVSNSE,0 RESET VIRTUAL SENSE BYTE 00173000
  178. CLI VCONCOMD,X'0B' ALARM? 00174000
  179. BE VCNF1 YES 00175000
  180. TM VDEVSTAT,VDEVNRDY IS DEVICE NOT READY? 00176000
  181. BNO VCNDTACW NO 00177000
  182. MVI VDEVSNSE,INTREQ SET INTERVENTION REQUIRED 00178000
  183. B UNITCHK 00179000
  184. SPACE 1 00180000
  185. VCNDTACW CLI VCONCOMD,X'0A' READ INQUIRY? 00181000
  186. BE VCNRD YES 00182000
  187. CLI VCONCOMD,X'0E' CMS READ WITH INHIBIT ? @V60C3BE 00182100
  188. BE VCNRD BR YES @V60C3BE 00182200
  189. CLI VCONCOMD,X'02' READ READER 2? 00183000
  190. BE VCNRD YES 00184000
  191. CLI VCONCOMD,X'09' WRITE WITH AUTO CARRIAGE RETURN 00185000
  192. BE VCNWRT YES 00186000
  193. CLI VCONCOMD,X'01' WRITE WITH NO AUTO CARRIAGE RETURN 00187000
  194. BE VCNWRT YES 00188000
  195. CLI VCONCOMD,X'19' DIAG SCREEN WRITE ?? @V200730 00189000
  196. BE VCNWRT YES, CONT AND CHECK LATER @V200730 00190000
  197. CLI VCONCOMD,X'29' DIAG 58 FULL SCR WRITE? HRC058DK 00190100
  198. BE HD58SPCL Y, SPECIAL HANDLING HRC058DK 00190110
  199. CLI VCONCOMD,X'2A' DIAG 58 FULL SCR READ? HRC058DK 00190120
  200. BE HD58SPCL Y, SPECIAL HANDLING HRC058DK 00190130
  201. CLI VCONCOMD,X'63' DIAG 58 control query? HRC064DK 00190200
  202. BE HD58SPCL Y, special handling HRC064DK 00190210
  203. VDEVREJ MVI VDEVSNSE,CMDREJ SET COMMAND REJECT @V200730 00191000
  204. B UNITCHK 00192000
  205. HD58SPCL EQU * HRC058DK 00192100
  206. CALL HDKD58EN CALL DIAG 58 SUPPORT RTN HRC058DK 00192110
  207. B LASTCCW POST STATUS AND EXIT HRC058DK 00192120
  208. EJECT 00193000
  209. *. 00194000
  210. * OPERATION OF SENSE COMMAND - 00195000
  211. * 00196000
  212. * 1. TURN ON PCI BIT IN VIRTUAL CSW IF ON IN CCW. 00197000
  213. * 00198000
  214. * 2. SET CHANNEL END AND DEVICE END IN VIRTUAL CSW. 00199000
  215. * 00200000
  216. * 3. IF THE CCW COUNT IS 1 PROCEED; OTHERWISE IF DATA CHAINING 00201000
  217. * IS ON OR SILI IS NOT ON SET INCORRECT LENGTH IN VIRTUAL 00202000
  218. * CSW AND SUPPRESS ALL CHAINING. 00203000
  219. * 00204000
  220. * 4. IF SKIP IS ON GOTO STEP 5; OTHERWISE CHECK FOR PROTECTION 00205000
  221. * AND ADDRESSING VIOLATIONS AND MOVE SENSE DATA TO VIRTUAL 00206000
  222. * MEMORY. 00207000
  223. * 00208000
  224. * 5. TEST FOR POSSIBLE COMMAND CHAINING; IF CHAINING, LOCATE AND 00209000
  225. * VERIFY NEXT CCW AND RESTART INTERPRETAION PROCESS; 00210000
  226. * OTHERWISE EXIT AFTER POSTING PROPER ENDING STATUS. 00211000
  227. * 00212000
  228. *. 00213000
  229. SPACE 3 00214000
  230. VCNSNSCN EQU * HERE TO SIMULATE A SENSE OPERATION 00215000
  231. OI VDEVCSW+4,CE+DE SET BOTH CHANNEL & DEVICE END 00216000
  232. LH R4,VCONCNT GET COUNT 00217000
  233. N R4,XRIGHT16 ... 00218000
  234. BCTR R4,0 DECREMENT BY 1 00219000
  235. STH R4,VDEVCSW+6 SET RESIDUAL COUNT 00220000
  236. LTR R4,R4 NOW ZERO? 00221000
  237. BZ SENSMOVE YES, COUNT WAS OK 00222000
  238. TM VCONFLAG,CD DATA CHAINED? 00223000
  239. BO SENSWLR YES, GIVE WLR 00224000
  240. TM VCONFLAG,SILI SILI SPECIFIED? 00225000
  241. BO SENSMOVE YES 00226000
  242. SENSWLR OI VDEVCSW+5,IL SET INCORRECT LENGTH 00227000
  243. NI VCONFLAG,X'FF'-(CD+CC) SUPPRESS CHAINING 00228000
  244. SENSMOVE TM VCONFLAG,SKIP SKIP SPECIFIED? 00229000
  245. BO FLAGTEST YES 00230000
  246. L R1,VCONADDR GET VIRTUAL DATA ADDRESS 00231000
  247. LA R1,0(,R1) ... 00232000
  248. SL R6,VMCHSTRT CHANNEL DISP @VA01770 00233000
  249. SL R7,VMCUSTRT CONT. UNIT DISP @VA01770 00234000
  250. SL R8,VMDVSTRT GET VDEVBLOK DISPLACEMENT 00235000
  251. TRANS 2,1,OPT=(BRING,DEFER),ADEX=PROGCHK1 00236000
  252. AL R6,VMCHSTRT RESTORE ADDRESS @VA01770 00237000
  253. AL R7,VMCUSTRT RESTORE ADDRESSS @VA01770 00238000
  254. AL R8,VMDVSTRT ADDRESS OF VDEVBLOK 00239000
  255. TM VCONFLAG,IDA INDIRECT DATA ADDRESS ? 00240000
  256. BNO SENSPROT NO 00241000
  257. TM VCONADDR+3,X'03' IDA LIST MUST BE ON A WORD *00242000
  258. BOUNDRY 00243000
  259. BNZ PROGCHK ERROR IF NOT 00244000
  260. L R1,0(,R2) GET FIRST INDIRECT DATA ADDRESS WORD 00245000
  261. SL R6,VMCHSTRT CHANNEL DISP @VA01770 00246000
  262. SL R7,VMCUSTRT CONT. UNIT DISP @VA01770 00247000
  263. SL R8,VMDVSTRT GET VDEVBLOK DISPLACEMENT 00248000
  264. ALTER1 TRANS 2,1,OPT=(BRING,DEFER),ADEX=PROGCHK1 @V304735 00249000
  265. CALL DMKPSACC CHECK IF SHARED PAGE WAS CHANGED @V304735 00250000
  266. BZ NOTCHG1 IF NOT - CONTINUE @V304735 00251000
  267. CALL DMKVMASH FLAG ALL CHANGED SHARED PAGES @VA07351 00251100
  268. B ALTER1 RE-ISSUE THE TRANS CALL @V304735 00254000
  269. NOTCHG1 AL R6,VMCHSTRT RESTORE ADDRESS @V304735 00255000
  270. AL R7,VMCUSTRT RESTORE ADDRESS @V304735 00256000
  271. AL R8,VMDVSTRT RESTORE ADDRESS @V304735 00257000
  272. SENSPROT IC R0,VDEVKEY GET VIRTUAL CAW KEY @V304735 00258000
  273. CALL DMKPSASC CHECK FOR PROTECTION VIOLATION @V304735 00259000
  274. BNE PROTCHK ERROR 00260000
  275. MVC 0(1,R2),VDEVSNSE MOVE SENSE BYTE TO VIRTUAL CORE 00261000
  276. B FLAGTEST 00262000
  277. EJECT 00263000
  278. *. 00264000
  279. * OPERATION OF ALARM AND NOP COMMANDS - 00265000
  280. * 00266000
  281. * 1. TURN ON PCI BIT IN VIRTUAL CSW IF ON IN CCW. 00267000
  282. * 00268000
  283. * 2. SET CHANNEL END AND DEVICE END IN VIRTUAL CSW. 00269000
  284. * 00270000
  285. * 3. IF ALARM COMMAND SEND VIRTUAL BELL MESSAGE TO USER; 00271000
  286. * OTHERWISE CONTINUE. 00272000
  287. * 00273000
  288. * 4. TEST FOR POSSIBLE COMMAND CHAINING; IF CHAINING, LOCATE 00274000
  289. * AND VERIFY NEXT CCW AND RESTART INTERPRETATION PROCESS; 00275000
  290. * OTHERWISE EXIT AFTER POSTING PROPER ENDING STATUS. 00276000
  291. * 00277000
  292. *. 00278000
  293. SPACE 3 00279000
  294. VCNF1 EQU * HERE FOR A CONTROL IMMEDIATE CCW 00280000
  295. OI VDEVCSW+4,CE+DE SET BOTH CHANNEL & DEVICE END 00281000
  296. CLI VCONCOMD,X'0B' ALARM? 00282000
  297. BNE FLAGTEST NO 00283000
  298. TM VDEVFLAG,VDEVCCW1 FIRST CCW? @VA03330 00284000
  299. BZ VCNALRM NO - CONTINUE @VA03330 00285000
  300. TM VCONFLAG,CD DATA CHAINED CONTROL? @VA03330 00286000
  301. BNZ VCNALRW YES - CC=1 @VA03330 00287000
  302. TM VCONFLAG,CC POSSIBLE CC=0? @VA03330 00288000
  303. BNZ VCNALRM YES - LET HIM RUN @VA03330 00289000
  304. VCNALRW OI VMRSTAT,VMEXWAIT MAKE HIM WAIT @VA03330 00290000
  305. VCNALRM EQU * @VA03330 00291000
  306. BAL R9,VCNQM000 Clear queued messages HRC063DK 00291500
  307. LA R0,L'ALARMMSG GET LENGTH OF MESSAGE 00292000
  308. LA R1,ALARMMSG GET MESSAGE PTR 00293000
  309. LA R2,VMGENIO+ALARM+NOTIME PARMS FOR DMKQCNWT @VM01022 00294000
  310. SL R6,VMCHSTRT CHANNEL DISPLACEMENT @VA09479 00294100
  311. SL R7,VMCUSTRT CTRL UNIT DISPLACEMENT @VA09479 00294200
  312. SL R8,VMDVSTRT VDEVBLOK DISPLACEMENT @VA09479 00294300
  313. CALL DMKQCNWT WRITE WITH DELAYED RETURN @VA04067 00295000
  314. AL R6,VMCHSTRT RESTORE ADDRESS @VA09479 00295100
  315. AL R7,VMCUSTRT RESTORE ADDRESS @VA09479 00295200
  316. AL R8,VMDVSTRT RESTORE ADDRESS @VA09479 00295300
  317. SLR R15,R15 ZERO REG 15 @VA04067 00296000
  318. STC R15,VMRBSC ZERO CONTASK CNT FOR REMOTE 3270 @VA04067 00297000
  319. SPACE 00298000
  320. FLAGTEST TM VCONFLAG,CD DATA CHAINED? 00299000
  321. BO CKALARM VMEXWAIT ON FOR ALARM CCW @VA04067 00300000
  322. TM VCONFLAG,CC COMMAND CHAINED? 00301000
  323. BNO CKALARM VMEXWAIT ON FOR ALARM CCW @VA04067 00302000
  324. NI VDEVFLAG,X'FF'-VDEVCCW1 TURN OFF FIRST CCW FLAG 00303000
  325. B VCNGTNXT PROCESS NEXT CCW 00304000
  326. CKALARM CLI VCONCOMD,X'0B' ALARM CCW? @VA04067 00305000
  327. BNE LASTCCW NO - VMEXWAIT NOT ON BEFORE QCN @VA04067 00306000
  328. TM VDEVFLAG,VDEVCCW1 FIRST CCW? @VA04067 00307000
  329. BZ LASTCCW NO - VMEXWAIT NOT ON BEFORE QCN @VA04067 00308000
  330. NI VMRSTAT,X'FF'-VMEXWAIT TURN OFF VMEXWAIT @VA04067 00309000
  331. B LASTCCW GO FINISH UP @VA04067 00310000
  332. EJECT 00311000
  333. *. 00312000
  334. * OPERATION OF READ COMMAND - 00313000
  335. * 00314000
  336. * 1. CALCULATE SIZE OF FREE STORAGE DATA BUFFER. 00315000
  337. * 00316000
  338. * 1A. LOOK FOR SPECIAL CASE WHERE A READ IS TO BE INTERCEPTED 00317000
  339. * AND A CARRIAGE RETURN IS TO BE SIMULATED. THIS FUNCTION 00318000
  340. * IS PART OF THE SYSLOAD DRIVER AND CAUSES THE AUTOLOGGED 00319000
  341. * ON USER TO EXECUTE HIS PROFILE EXEC WHEN THE FIRST READ 00320000
  342. * IS ISSUED AFTER IPLING CMS. 00321000
  343. SPACE 1 00322000
  344. * 2. CALL DMKQCNRD TO OBTAIN TERMINAL INPUT. 00323000
  345. * 00324000
  346. * 3. SET CHANNEL END IN VIRTUAL CSW. 00325000
  347. * 00326000
  348. * 4. IF A LINE BREAK HAS OCCURED DURING THE READ CALL DMKFRET 00327000
  349. * TO RETURN THE DATA BUFFER TO FREE STORAGE AND THEN EXIT; 00328000
  350. * IF A SINGLE ATTENTION IS HIT AND IF THE VIRTUAL CONSOLE IS 00329000
  351. * STILL BUSY SET UNIT EXCEPTION IN THE VIRTUAL CSW AND POST 00330000
  352. * PROPER ENDING STATUS; IF 2 OR MORE ATTENTIONS ARE HIT TURN 00331000
  353. * ON THE MULTIPLE ATTENTION FLAG FOR LATER INTERROGATION; 00332000
  354. * OTHERWISE IF THE VIRTUAL CONSOLE IS STILL BUSY TURN 00333000
  355. * ON PCI IN THE VIRTUAL CSW IF ON IN CCW AND VALIDITY CHECK 00334000
  356. * FOR PROTECTION AND ADDRESSING VIOLATIONS AND IF THE SKIP 00335000
  357. * FLAG IS NOT ON CCW MOVE DATA TO VIRTUAL MEMORY 00336000
  358. * REEXECUTING THE MOVE WITH AN UPDATED ADDRESS WHEN DATA 00337000
  359. * CHAINING IS SPECIFIED. 00338000
  360. * 00339000
  361. * 5. TEST FOR POSSIBLE COMMAND CHAINING; IF CHAINING LOCATE 00340000
  362. * AND VERIFY NEXT CCW AND RESTART INTERPRETATION PROCESS; 00341000
  363. * OTHERWISE EXIT AFTER POSTING PROPER ENDING STATUS. 00342000
  364. * 00343000
  365. * 6. THE DATA ENTERED BY A VIRTUAL MACHINE READ IS EXAMINED 00344000
  366. * TO CHECK FOR EXECUTION OF CP CONSOLE FUNCTIONS . 00345000
  367. * THE DATA IS EXANINED ONLY IF THE VIRTUAL MACHINE IS 00346000
  368. * USING LINEDIT AND IF NO ATTN INDICATORS ARE SET. 00347000
  369. * THE DATA MUST START AT THE FIRST DATA POSITION AND 00348000
  370. * MUST BE OF THE FOLLOWING FORMAT: 00349000
  371. * #CP ( OPTIONAL DATA ) 00350000
  372. * WHERE THE # IS THE LOGICAL LINEND CHARACTER 00351000
  373. * IF THE OPTIONAL DATA IS NOT ENTERED THE CP ENVIR 00352000
  374. * IS ENTERED OTHERWISE THE DATA IS A CONSOLE FUNCTION TO BE 00353000
  375. * EXECUTED . CONTROL IS RETURNED TO THE VIRTUAL MACHINE 00354000
  376. * AND THE READ IS CANCELLD BY A UE STATUS. 00355000
  377. * THIS FEATURE ALLOWS ANY MACHINE TO EXECUTE A CONSOLE 00356000
  378. * FUNCTION FROM A VIRTUAL MACHINE READ. 00357000
  379. * NIFTY .... !!!! 00358000
  380. * 00359000
  381. *. 00360000
  382. SPACE 3 00361000
  383. VCNRD EQU * HERE TO SIMULATE A READ OPERATION 00362000
  384. OI VDEVCSW+4,CE SET CHANNEL END 00363000
  385. BAL R9,VCNSCALC CALCULATE SIZE NEEDED FOR BUFFER 00364000
  386. LA R0,9(,R4) GET COUNT ROUNDED TO NEAREST DOUBLE WORD 00365000
  387. SRL R0,3 ALLOWING FOR A 2 BYTE SLOP AREA 00366000
  388. CALL DMKFREE 00367000
  389. ST R1,VCONBUF SAVE BUFFER ADDRESS @V200730 00368000
  390. STH R0,VCONBFSZ SET DATA BUFFER SIZE HRC101DK 00369490
  391. L R10,VCONRBUF TEST IF A VIRTUAL BUFFER EXISTS @V200730 00370000
  392. LTR R10,R10 IS THERE ONE ?? @V200730 00371000
  393. BZ TSTWBUF NO, TEST FOR WRITE BUFFER @V200730 00372000
  394. CH R4,VCONRCNT IS COUNT LESS THAN BUFFER COUNT ?@V200730 00373000
  395. BL *+8 YES - @V200730 00374000
  396. LH R4,VCONRCNT NO - USE BUFFER BYTE COUNT @V200730 00375000
  397. S R4,F1 DECREMENT FOR EXECUTED MOVE @V305535 00377000
  398. BM *+8 BYPASS MOVE, NOTHING THERE @V305535 00378000
  399. EX R4,MVCBUFF MOVE DATA FROM VIRTUAL BUFFER @V200730 00379000
  400. L R1,VCONRBUF LOAD ADDRESS OF VIRTUAL BUFFER @V200730 00380000
  401. SLR R0,R0 CLEAR @V200730 00381000
  402. ST R0,VCONRBUF CLEAR BUFFER ADDRESS @V200730 00382000
  403. LH R0,VCONRBSZ SIZE IN DW'S OF VIRTUAL BUFFER HRC101DK 00383490
  404. CALL DMKFRET FRET IT. @V200730 00384000
  405. LA R0,1 INCREMENT . . @V305535 00385000
  406. AR R0,R4 . . DECREMENTED COUNT @V305535 00386000
  407. SLR R2,R2 CLEAR @V200730 00387000
  408. LH R4,VDEVADD FORM DEVICE ADDR IN R4 @V200730 00388000
  409. LH R5,VCUADD ... @V200730 00389000
  410. OR R4,R5 ... @V200730 00390000
  411. AH R4,VCHADD ... @V200730 00391000
  412. L R1,VCONBUF GET BUFFER ADDRESS @V200730 00392000
  413. B VCNRDRET CONTINUE AS IF READ WAS DONE @V200730 00393000
  414. SPACE 00394000
  415. TSTWBUF TM VDEVFLAG,VDEVCSPL CONSOLE SPOOLING ?? @V200730 00395000
  416. BZ WFRET NO, FRET ANY BUFFER @V200730 00396000
  417. TM VDEVSFLG,VDEVTERM TERM OUTPUT WITH SPOOLING ?? @V200730 00397000
  418. BO WFRET YES, FRET ANY BUFFER @V200730 00398000
  419. L R1,VCONWBUF GET LAST OUTPUT FROM VIRT WRITE @V200730 00399000
  420. LTR R1,R1 IS THERE ANY ?? @V200730 00400000
  421. BZ QCNRD NO, CONT WITH READ @V200730 00401000
  422. LH R0,VCONWCNT GET DATA COUNT @V200730 00402000
  423. CALL DMKQCNWT,PARM=NORET+PRIORITY FORCE MSG TO TERMI @V200730 00403000
  424. WFRET L R1,VCONWBUF GET BUFFER ADDRESS @V200730 00404000
  425. LTR R1,R1 IS THERE ONE ?? @V200730 00405000
  426. BZ QCNRD NO, CONT WITH THE READ @V200730 00406000
  427. SR R0,R0 CLEAR @V200730 00407000
  428. ST R0,VCONWBUF CLEAR BUFFER ADDRESS @V200730 00408000
  429. IC R0,VCONWBSZ GET BUFFER SIZE @V200730 00409000
  430. CALL DMKFRET FRET BUFFER @V200730 00410000
  431. QCNRD EQU * @V200820 00411000
  432. TM VMMLEVEL,VMMSTMP TIME-STAMPING OUTPUT ? @V200820 00412000
  433. BZ QCNRDR NO -- O.K. AS IS @V200820 00413000
  434. SLR R0,R0 ZERO-LENGTH WRITE FOR TIME STAMP @V200820 00414000
  435. LA R1,BLANKS LET GR1 BE VALID @V200820 00415000
  436. CALL DMKQCNWT,PARM=NORET+NOAUTO FORCE TIME STAMP @V200820 00416000
  437. QCNRDR EQU * @V200820 00417000
  438. LA R2,VMGENIO PARM FOR READ @V200730 00418000
  439. TM VMMLEVEL,VMMLINED EDIT INPUT ?? @V200730 00419000
  440. BZ *+8 NO, CONT @V200730 00420000
  441. LA R2,EDIT+VMGENIO EDIT AND VM IO @V200730 00421000
  442. LR R0,R4 SET DATA COUNT TO READ @V200730 00422000
  443. LH R4,VDEVADD FORM DEV ADDRESS IN R4 @V200730 00423000
  444. LH R5,VCUADD .. @V200730 00424000
  445. OR R4,R5 .. @V200730 00425000
  446. AH R4,VCHADD .. @V200730 00426000
  447. L R1,VCONBUF SET BUFFER ADDRESS @V200730 00427000
  448. SPACE 00427010
  449. CLI VCONCOMD,X'0E' CMS READ WITH INHIBIT ? @V60C3BE 00427020
  450. BNE VCNRDY BR NO @V60C3BE 00427030
  451. MVI VCONCOMD,X'0A' YES. CHANGE TO REAL READ @V60C3BE 00427040
  452. LA R2,INHIBIT(R2) AND ADD INHIBIT TO QCN PARMS @V60C3BE 00427050
  453. VCNRDY EQU * @V60C3BE 00427060
  454. SPACE 00427070
  455. CALL DMKQCNRD READ DATA FROM TERMINAL @V200730 00428000
  456. SPACE 1 00429000
  457. VCNRDRET EQU * HERE AT COMPLETION OF READ 00430000
  458. TM VMRSTAT,VMLOGOFF USER IN LOGOFF NOW ? @VM08939 00431000
  459. BO VCNEXITY YES - JUST BAIL OUT FAST @VM08939 00432000
  460. LR R10,R1 SAVE BUFFER ADDRESS @V200730 00433000
  461. L R1,VCONRBUF IS THERE A WAITING BUFFER @VA11787 00433100
  462. LTR R1,R1 ... @VA11787 00433150
  463. BZ VCNRDCNT NO,CONTINUE AS BEFORE @VA11787 00433200
  464. ST R10,VCONRBUF EXCHANGE PREVIOUS BUFFER AND @VA11787 00433250
  465. ST R1,VCONBUF CURRENT BUFFER @VA11787 00433300
  466. LR R10,R1 CURRENT BUFFER FOR VCN @VA11787 00433350
  467. SR R0,R0 CLEAR WORK REGISTER @VA11787 00433400
  468. LH R0,VCONRBSZ GET CURRENT BUFFER SIZE HRC101DK 00433480
  469. LH R1,VCONBFSZ GET PREVIOUS BUFFER SIZE HRC101DK 00433510
  470. STH R1,VCONRBSZ AND EXCHANGE THEM HRC101DK 00433540
  471. STH R0,VCONBFSZ ... HRC101DK 00433570
  472. LH R0,VCONRCNT GET CURRENT DATA COUNT @VA11787 00433650
  473. LH R1,VCONCNT GET PREVIOUS DATA COUNT @VA11787 00433700
  474. STH R0,VCONCNT AND EXCHANGE THEM @VA11787 00433750
  475. STH R1,VCONRCNT ... @VA11787 00433800
  476. VCNRDCNT DS 0H @VA11787 00433850
  477. LR R1,R4 SET DEVICE ADDRESS 00434000
  478. CALL DMKSCNVU FIND DEVICE BLOKS AGAIN 00435000
  479. BNZ VCNEXITY DEVICE GONE, GET OUT 00436000
  480. LR R1,R10 SET BUFFER ADDRESS 00437000
  481. TM VDEVTYPC,CLASTERM STILL A TERMINAL ?? 00438000
  482. BZ VCNEXITY NO, GET OUT 00439000
  483. CLI VDEVTYPE,TYP3210 STILL A VIRTUAL CONSOLE ?? 00440000
  484. BNE VCNEXITY NO, GET OUT 00441000
  485. B *+4(R2) 00442000
  486. B VCNRDNAT NO ATTENTION HIT 00443000
  487. B VCNRDSAT SINGLE ATTENTION HIT 00444000
  488. B VCNRDDAT 2 OR MORE ATTENTIONS HIT 00445000
  489. B VCNUE LINE BREAK - CANCEL THE READ @VM08939 00446000
  490. SPACE 00447000
  491. VCNRDSAT EQU * HERE WHEN A SINGLE ATTENTION IS HIT DURING A READ 00448000
  492. LTR R0,R0 TEST FOR ATTN WITH NO CHARS TYPED 00449000
  493. BNZ VCNUE NO, SET UE 00450000
  494. CALL DMKCFMAT SET ATTN INT PENDING @V200930 00451000
  495. BZ VCNRDNAT ATTN SET OK, CONT @V200930 00452000
  496. TM VDEVCFLG,VDEVATTN FLAGGED FOR CP, ATTN NOT SET @V200930 00453000
  497. BO LASTCCW YES, TERMINATE CCW STRING @V200930 00454000
  498. SPACE 00455000
  499. VCNRDDAT EQU * HERE WHEN 2 OR MORE ATTENTIONS ARE HIT FOR A READ 00456000
  500. OI VDEVCFLG,VDEVATTN INDICATE BREAK IS TO BE CALLED LATER 00457000
  501. LTR R0,R0 ANY CHARACTERS TYPED ?? 00458000
  502. BNZ VCNRDNAT YES, CONT 00459000
  503. VCNUE OI VDEVCSW+4,UE FLAG UE FOR CANCEL, MACHINE @V200930 00460000
  504. * RE-READ 00461000
  505. SPACE 00462000
  506. VCNRDNAT EQU * HERE AT COMPLETION OF READ 00463000
  507. ALR R0,R10 GET END OF BUFFER 00464000
  508. TM VDEVSTAT,VDEVBUSY+VDEVCHBS IS DEVICE STILL BUSY? 00465000
  509. BO VCNRDCD YES - O.K. @VM08939 00466000
  510. BAL R9,VCNRELSE FRET THE READ BUFFERS @VM08939 00467000
  511. B VCNEXITY EXIT FORTHWITH @VM08939 00468000
  512. VCNRDCD EQU * HERE TO MOVE READ DATA 00469000
  513. CLR R0,R10 ANY CHARS ENTERED ?? @V200930 00470000
  514. BE NOCP NO, CONT @V200930 00471000
  515. TM VDEVCSW+4,UE LINE CANCELED ?? @V200930 00472000
  516. BO NOCP YES, CONT @V200930 00473000
  517. TM VDEVCFLG,VDEVATTN ATTN TO CP ?? @V200930 00474000
  518. BNO NOATT NO, CONTINUE @VA11228 00475100
  519. OI VCONFLAG,SKIP YES,DON'T PASS DATA TO USER @VA11228 00475200
  520. B NOCP PROCESS READ DATA @VA11228 00475300
  521. NOATT DS 0H @VA11228 00475400
  522. TM VMMLEVEL,VMMLINED LINEDIT ON ?? @V200930 00476000
  523. BZ NOCP NO, IGNORE DATA @V200930 00477000
  524. L R15,0(R10) GET CHARS TYPED .. FIRST FOUR @V200930 00478000
  525. O R15,=X'00404040' UPPER CASE FOR COMPARE @V200930 00479000
  526. CLM R15,14,=X'15C3D7' IS IT 'LINEND'CP'? @VA03041 00480000
  527. BNE NOCP NO, CONTINUE @VA03041 00481000
  528. SLR R0,R10 COMPUTE INPUT COUNT @VA03041 00482000
  529. CL R0,F3 MORE THAN THREE? @VA03041 00483000
  530. BNH SETCP NO, MUST BE CP ONLY @VA03041 00484000
  531. CLI 3(R10),X'40' FOLLOWED BY A BLANK? @VA03041 00485000
  532. BNE SETBUFL NO, CANNOT EXECUTE CP @VA03041 00486000
  533. CL R0,F4 MORE THAN FOUR? @VA03041 00487000
  534. BNH SETCP NO, MUST BE CP ONLY @VA03041 00488000
  535. OI VDEVCFLG,VDEVVCF FLAG FOR VIRT CONSOLE FUNCTION @V200930 00489000
  536. LR R3,R0 GET SIZE @V200930 00490000
  537. LA R0,18 SIZE FOR BUFFER @V200930 00491000
  538. CALL DMKFREE GET CONSOLE FUNCTION BUFFER @V200930 00492000
  539. MVC 0(8,R1),BLANKS CLEAR BUFFER @V200930 00493000
  540. MVC 8(17*8,R1),0(R1) .. @V200930 00494000
  541. CL R3,=F'132' IS IT BIGGER THAN ALLOWED .. @V200930 00495000
  542. BL *+8 NO, CONT @V200930 00496000
  543. LA R3,132 SET TO MAXIMUM @V200930 00497000
  544. BCTR R3,R0 SET FOR EXECUTE @V200930 00498000
  545. EX R3,MVCP MOVE DATA TO BUFFER @V200930 00499000
  546. L R15,=A(DMKTBLUP) GET UPPER CASE TRANSLATE TABLE @V200930 00500000
  547. EX R3,TRCP TRANSLATE TO UPPER CASE DATA @V200930 00501000
  548. LA R0,1(R3) RESTORE R0 COUNT @V200930 00502000
  549. USING BUFIN,R1 @V200930 00503000
  550. ST R1,BUFNXT SET DATA ADDRESS @V200930 00504000
  551. ST R0,BUFCNT SET DATA COUNT @V200930 00505000
  552. DROP R1 @V200930 00506000
  553. ST R1,VCONRBUF SAVE BUFFER ADDRESS @V200930 00507000
  554. B SETUE SET CANCEL TO MACHINE @V200930 00508000
  555. SETCP OI VDEVCFLG,VDEVATTN FLAG TO GO TO CP MODE @V200930 00509000
  556. SETUE OI VDEVCSW+4,UE FLAG CANCEL TO MACHINE @V200930 00510000
  557. SETBUFL ALR R0,R10 SET R0 TO END OF BUFFER @VA03041 00511000
  558. NOCP DS 0H @V200930 00512000
  559. BAL R9,VCNMVDAT MOVE DATA 00513000
  560. TM VDEVCSW+4,UE UNIT EXCEPTION ? 00514000
  561. BO LASTCCW YES 00515000
  562. TM VCONFLAG,CD+CC CHAINING? 00516000
  563. BZ LASTCCW 00517000
  564. NI VDEVFLAG,X'FF'-VDEVCCW1 TURN OFF FIRST CCW FLAG 00518000
  565. BAL R9,GETCCW GET NEXT CCW 00519000
  566. B VCNRDRL RETURN HERE IF COMMAND CHAINING 00520000
  567. B VCNRDCD RETURN HERE IF DATA CHAINING 00521000
  568. VCNRDRL EQU * ... 00522000
  569. BAL R9,VCNRELSE RELEASE BUFFER 00523000
  570. B VCNNEXT 00524000
  571. SPACE 2 00525000
  572. MVCP MVC 0(*-*,R1),0(R10) MOVE DATA TO BUFFER @V200930 00526000
  573. TRCP TR 0(*-*,R1),0(R15) TRANSLATE TO UPPER CASE @V200930 00527000
  574. EJECT 00528000
  575. *. 00529000
  576. * OPERATION OF WRITE COMMAND - 00530000
  577. * 00531000
  578. * 1. CALCULATE SIZE OF FREE STORAGE DATA BUFFER. 00532000
  579. * 00533000
  580. * 2. TURN PCI ON IN THE VIRTUAL CSW IF ON IN THE CCW AND 00534000
  581. * VALIDITY CHECK FOR ADDRESSING VIOLATION AND MOVE DATA FROM 00535000
  582. * VIRTUAL MEMORY. 00536000
  583. * 00537000
  584. * 3. IF DATA CHAINING IS ON LOCATE AND VERIFY NEXT CCW AND THEN 00538000
  585. * REPEAT STEP 2. 00539000
  586. * 00540000
  587. * 4. IF SILI IS NOT SPECIFIED, SET INCORRECT LENGTH IN THE 00541000
  588. * VIRTUAL CSW. 00542000
  589. * 00543000
  590. * 5. IF THE VIRTUAL CONSOLE IS STILL BUSY, CALL DMKQCNWT TO 00544000
  591. * WRITE THE MESSAGE ON THE REAL TERMINAL. 00545000
  592. * 00546000
  593. * 6. IF A LINE BREAK HAS OCCURED DURING THE WRITE CALL DMKFRET 00547000
  594. * TO RETURN THE DATA BUFFER TO FREE STORAGE AND THEN EXIT; 00548000
  595. * IF A SINGLE ATTENTION IS HIT SET THE ATTN FLAG IN VDEVINTS 00549000
  596. * TO REFLECT AN ATTENTION INTERRUPT AFTER THE PRESANT I/O 00550000
  597. * OPERATION IS REFLECTED; IF 2 OR MORE ATTENTIONS ARE HIT, 00551000
  598. * TURN ON THE MULTIPLE ATTENTION FLAG FOR LATER 00552000
  599. * INTERROGATION. 00553000
  600. * 00554000
  601. * 7. TEST FOR POSSIBLE COMMAND CHAINING; IF CHAINING LOCATE AND 00555000
  602. * VERIFY NEXT CCW AND RESTART INTERPRETATION PROCESS; 00556000
  603. * OTHERWISE EXIT AFTER POSTING PROPER ENDING STATUS. 00557000
  604. * 00558000
  605. *. 00559000
  606. SPACE 3 00560000
  607. VCNWRT EQU * HERE TO SIMULATE A WRITE OPERATION 00561000
  608. BAL R9,VCNQM000 Clear queued messages HRC063DK 00561500
  609. OI VDEVCSW+4,CE SET CHANNEL END 00562000
  610. BAL R9,VCNSCALC CALCULATE SIZE NEEDED FOR BUFFER 00563000
  611. LA R0,7(,R4) GET COUNT ROUNDED TO NEAREST DOUBLE WORD 00564000
  612. SRL R0,3 ... 00565000
  613. CALL DMKFREE 00566000
  614. LR R10,R1 SAVE PTR 00567000
  615. ST R10,VCONBUF REMEBER HERE 00568000
  616. STH R0,VCONBFSZ SET DATA BUFFER SIZE HRC101DK 00569490
  617. VCNCNCDW LH R0,VCONCNT GET CCW COUNT 00570000
  618. N R0,XRIGHT16 ... 00571000
  619. ALR R0,R10 RO POINTS TO CURRENT END OF BUFFER 00572000
  620. BAL R9,VCNMVDAT CALL SUBROUTINE TO MOVE DATA 00573000
  621. TM VCONCCW+4,CD DATA CHAINING? 00574000
  622. BO VCNCNCHN YES 00575000
  623. TM VCONCCW+4,SILI SILI? 00576000
  624. BO VCNCWRT YES 00577000
  625. OI VDEVCSW+5,IL SET INCORRECT LENGTH 00578000
  626. NI VCONCCW+4,X'FF'-(CD+CC) SUPPRESS CHAINING 00579000
  627. VCNCWRT L R1,VCONBUF GET CONSOLE WORK BUFFER 00580000
  628. SR R2,R2 CLEAR PARAMETER REGISTER 00581000
  629. SLR R10,R1 GET LENGTH 00582000
  630. LTR R0,R10 LENGTH .EQ. 0 00583000
  631. BZ VCNWTNAT YES -- NOTHING MORE TO WRITE 00584000
  632. TM VCONCOMD,X'08' AUTO CARRIAGE RETURN? 00585000
  633. BO VCNCNF5 YES 00586000
  634. LA R2,VMGENIO+NOAUTO @V200820 00587000
  635. B VCNCN 00588000
  636. VCNCNF5 EQU * NORMAL VIRTUAL MACHINE WRITE @V200820 00589000
  637. LA R2,VMGENIO @V200820 00590000
  638. VCNCN LH R4,VDEVADD GET DEVICE ADDRESS @V200730 00591000
  639. LH R5,VCUADD .. 00592000
  640. OR R4,R5 .. 00593000
  641. AH R4,VCHADD .. 00594000
  642. LR R10,R1 BUFFER ADDRESS IN R10 @V200930 00595000
  643. ICM R2,8,VCONDWC GET DIAGNOSE CORD OR ZERO @VA07542 00596100
  644. TM VCONFLAG,X'01' HIGH INTENSITY? HRC310DK 00596110
  645. BZ *+8 NOPE, LEAVE R2 ALONE HRC310DK 00596120
  646. O R2,=A(HILIGHT) YES, SET HILIGHT FLAG HRC310DK 00596130
  647. TM VCONDWC,X'40' DIAGNOSE GRAPHICS WRITE ?? @VA07542 00597100
  648. BNZ CONWAIT YES..WAIT FOR MESSAGE @VM01023 00598000
  649. ICM R15,B'1111',VMTERM GET TERM RDEVBLOK.. @VM01023 00599000
  650. BNP CONWAIT NOT THERE..SAD... @VM01023 00600000
  651. USING RDEVBLOK,R15 @VM01023 00601000
  652. CLI RDEVTYPC,CLASTERM TERM CLASS ? @VM01023 00602000
  653. BNE CONWAIT NO..3270L @VM01023 00603000
  654. CLI RDEVTYPE,TYPBSC REMOTE 3270 ? @VM01023 00604000
  655. BNE CONWAIT NO..SORRY... @VM01023 00605000
  656. DROP R15 @VM01023 00606000
  657. SLR R15,R15 CLEAR COUNT REG @VM01023 00607000
  658. CH R0,=H'80' MORE THAN A LINE ? @VM01023 00608000
  659. BH CONWAIT SKIP FOR NOW... @VM01023 00609000
  660. IC R15,VMRBSC PICK UP CONTASK COUNT (MAYBE) @VM01023 00610000
  661. LA R15,1(,R15) ADD ONE @VM01023 00611000
  662. STC R15,VMRBSC REPLACE @VM01023 00612000
  663. CH R15,=H'22' REACHED THE LIMIT ? @VM01023 00613000
  664. BNL CONWAIT YES..STOP RIGHT HERE... @VM01023 00614000
  665. O R2,=A(NORET) RETURN IMMEDIATELY @VM01023 00615000
  666. CALL DMKQCNWT AND GO SEND MSG @VM01023 00616000
  667. SLR R2,R2 CLEAR RETURN CODE @VM01023 00617000
  668. B VCNNMVI CONTINUE... @VM01023 00618000
  669. CONWAIT EQU * @VM01023 00619000
  670. CALL DMKQCNWT WAIT FOR COMPLETION @VM01023 00620000
  671. SLR R15,R15 CLEAR CONTASK @VM01023 00621000
  672. STC R15,VMRBSC COUNT... @VM01023 00622000
  673. SPACE 1 00623000
  674. VCNNMVI EQU * HERE AT COMPLETION OF WRITE 00624000
  675. TM VMRSTAT,VMLOGOFF VIRTUAL MACHINE IN LOGOFF ? @VM08939 00625000
  676. BO VCNEXITY YES - BAIL OUT RAPIDLY @VM08939 00626000
  677. LR R1,R4 GET DEVICE ADDRESS 00627000
  678. CALL DMKSCNVU FIND DEVICE BLOKS AGAIN 00628000
  679. BNZ VCNEXITY DEVICE GONE, GET OUT 00629000
  680. TM VDEVTYPC,CLASTERM IS IT A TERMINAL DEVICE ? 00630000
  681. BZ VCNEXITY NO - EXIT 00631000
  682. CLI VDEVTYPE,TYP3210 IS IT A CONSOLE ?? 00632000
  683. BNE VCNEXITY NO -- EXIT 00633000
  684. LR R4,R0 SAVE DATA COUNT @V200730 00634000
  685. L R1,VCONWBUF GET OLD BUFFER ADDRESS @V200730 00635000
  686. LTR R1,R1 IS THERE ONE ?? @V200730 00636000
  687. BZ TSTSAVE NO, TEST TO SAVE THIS DATA @V200730 00637000
  688. SR R0,R0 CLEAR @V200730 00638000
  689. ST R0,VCONWBUF CLEAR BUFFER ADDRESS 00639000
  690. IC R0,VCONWBSZ GET OLD BUFFER SIZE @V200730 00640000
  691. CALL DMKFRET FRET OLD BUFFER @V200730 00641000
  692. TSTSAVE TM VDEVFLAG,VDEVCSPL CONSOLE SPOOLING ?? @V200730 00642000
  693. BZ TSTR2 NO, CONT @V200730 00643000
  694. TM VDEVSFLG,VDEVTERM TERM OUTPUT WITH SPOOLING ?? @V200730 00644000
  695. BO TSTR2 YES, CONT @V200730 00645000
  696. CLI VCONCOMD,X'19' DIAGNOSE WRITE ? @VM01022 00646000
  697. BE TSTR2 YES, DO NOT SAVE DIAGNOSE DATA @VM01022 00647000
  698. LA R0,7(R4) ROUND UP DATA COUNT @V200730 00648000
  699. SRL R0,3 GET DOUBLE WORD COUNT @V200730 00649000
  700. CALL DMKFREE GET A BUFFER @V200730 00650000
  701. STC R0,VCONWBSZ SAVE BUFFER SZIE @V200730 00651000
  702. STH R4,VCONWCNT SAVE DATA COUNT @V200730 00652000
  703. ST R1,VCONWBUF SAVE BUFFER ADDRESS @V200730 00653000
  704. BCTR R4,R0 DECREMENT FOR EXECUTE @V200730 00654000
  705. EX R4,SAVEBUF SAVE DATA IN BUFFER @V200730 00655000
  706. TSTR2 B *+4(R2) BRANCH ON R2 RETURN CODE @V200730 00656000
  707. B VCNWTNAT NO ATTENTION HIT 00657000
  708. B VCNWTSAT SINGLE ATTENTION HIT 00658000
  709. B VCNWTDAT 2 OR MORE ATTENTIONS HIT 00659000
  710. B LASTCCW LINE BREAK - STOP CHAINING NOW @VM08939 00660000
  711. SPACE 00661000
  712. VCNWTSAT CALL DMKCFMAT CALL TO SET ATTN INT PENDING @V200930 00662000
  713. BZ VCNWTNAT ATTN SET OK, CONT @V200930 00663000
  714. TM VDEVCFLG,VDEVATTN FLAGGED FOR CP, ATTN NOT SET @V200930 00664000
  715. BO LASTCCW YES, TERMINATE CCW STRING @V200930 00665000
  716. SPACE 00666000
  717. VCNWTDAT EQU * HERE WHEN 2 OR MORE ATTENTIONS ARE HIT DURING A WRITE 00667000
  718. OI VDEVCFLG,VDEVATTN INDICATE BREAK IS TO BE CALLED LATER 00668000
  719. SPACE 00669000
  720. VCNWTNAT EQU * HERE AT COMPLETION OF WRITE 00670000
  721. BAL R9,VCNRELSE RELEASE BUFFER 00671000
  722. TM VDEVSTAT,VDEVBUSY+VDEVCHBS DEVICE STILL BUSY? 00672000
  723. BNO VCNEXITY NO 00673000
  724. TM VCONFLAG,CD+CC CHAINING? 00674000
  725. BZ LASTCCW NO 00675000
  726. VCNCNCHN NI VDEVFLAG,X'FF'-VDEVCCW1 TURN OFF FIRST CCW FLAG 00676000
  727. BAL R9,GETCCW GET NEXT CCW 00677000
  728. B VCNNEXT RETURN HERE IF COMMAND CHAINING 00678000
  729. B VCNCNCDW RETURN HERE IF DATA CHAINING 00679000
  730. EJECT 00680000
  731. GETCCW EQU * HERE TO FIND AND VALIDATE THE NEXT NON-TIC CCW IN *00681000
  732. CHANNEL PROGRAM 00682000
  733. NC VDEVCSW+4(2),=AL1(CE,PCI) CLEAR VIRTUAL CSW STATUS 00683000
  734. L R1,VCONCAW POINT TO NEXT CCW TO PROCESS 00684000
  735. ADDRTEST TM VCONCAW+3,7 CHECK DOUBLE-WORD ALIGNMENT 00685000
  736. BNZ PROGCHK ALIGNMENT ERROR 00686000
  737. LA R15,8(,R1) GET CCW ADDRESS+8 00687000
  738. ST R15,VDEVCSW AND SAVE IN CSW 00688000
  739. ST R15,VCONCAW AND IN CAW FOR NEXT TIME 00689000
  740. SL R6,VMCHSTRT CHANNEL DISP @VA01770 00690000
  741. SL R7,VMCUSTRT CONT. UNIT DISP @VA01770 00691000
  742. SL R8,VMDVSTRT GET VDEVBLOK DISPLACEMENT 00692000
  743. ALTER2 TRANS 2,1,OPT=(BRING,DEFER),ADEX=PROGCHK1 GET CCW @V304735 00693000
  744. CALL DMKPSACC CHECK IF SHARED PAGE WAS CHANGED @V304735 00694000
  745. BZ NOTCHG2 IF NOT - CONTINUE @V304735 00695000
  746. CALL DMKVMASH FLAG ALL CHANGED SHARED PAGES @VA07351 00695100
  747. B ALTER2 RE-ISSUE THE TRANS CALL @V304735 00697000
  748. NOTCHG2 AL R6,VMCHSTRT RESTORE ADDRESS @V304735 00698000
  749. AL R7,VMCUSTRT RESTORE ADDRESS @V304735 00699000
  750. AL R8,VMDVSTRT ADDRESS OF VDEVBLOK 00700000
  751. TM 0(R2),X'07' COULD IT BE A TIC ? 00701000
  752. BNZ NOTTIC NO 00702000
  753. TM 0(R2),X'08' IS IT A TIC ? 00703000
  754. BO TIC YES 00704000
  755. SPACE 1 00705000
  756. NOTTIC EQU * 00706000
  757. LA R15,4 SET TENTATIVE EXIT INDEX 00707000
  758. TM VCONFLAG,CD DATA CHAINING ?? @V200730 00708000
  759. BO GETCD YES, GET ADDRESS @V200730 00709000
  760. MVC VCONCCW,0(R2) MOVE CCW TO VCONCTL @V200730 00710000
  761. SLR R15,R15 SET EXIT INDEX FOR CMD CHHRC058DK 00710100
  762. CLI VCONCCW,X'29' DIAG 58 FULL SCR WRITE? HRC058DK 00710110
  763. BE SETRETN Y, BYTE 5 HAS OPT FLAGS HRC058DK 00710120
  764. CLI VCONCCW,X'2A' DIAG 58 FULL SCR READ? HRC058DK 00710130
  765. BE SETRETN Y, BYTE 5 HAS OPT FLAGS HRC058DK 00710140
  766. CLI VCONCCW,X'63' DIAG 58 control query? HRC064DK 00710200
  767. BE SETRETN Y, pass it through HRC064DK 00710210
  768. OI VCONDWC,X'40' ASSUME DIAGNOSE GRAPHICS WRITE @VA07542 00711100
  769. CLI VCONCCW,X'19' DIAG WRITE CCW ?? @V200730 00713000
  770. BE SETRETN YES, BYTE 5 HAS LINE CORD @V200730 00714000
  771. MVI VCONDWC,X'00' CLEAR FOR OTHER WRITES @VA07542 00715100
  772. B SETRETN SET RETURN INDEX @V200730 00716000
  773. GETCD L R1,0(R2) GET ADDRESS PORTION @V200730 00717000
  774. STCM R1,7,VCONCCW+1 SET DATA ADDRESS @V200730 00718000
  775. L R1,4(R2) GET REST OF CCW @V200730 00719000
  776. STCM R1,8,VCONFLAG SET CCW FLAGS @V200730 00720000
  777. STH R1,VCONCNT SET NEW CCW COUNT @V200730 00721000
  778. SETRETN ALR R9,R15 SET CORRECT EXIT ADDRESS 00722000
  779. TM VCONFLAG,PCIF PCI FLAG ON ? 00723000
  780. BNO *+8 NO 00724000
  781. OI VDEVCSW+5,PCI SET PCI IN VIRTUAL CSW 00725000
  782. LH R1,VCONCNT GET CCW COUNT 00726000
  783. N R1,XRIGHT16 COUNT ZERO? 00727000
  784. BZ PROGCHK YES 00728000
  785. STH R1,VDEVCSW+6 SET RESIDUAL COUNT 00729000
  786. CLI VCONCCW,X'19' DIAGNOSE WRITE? HRC310DK 00729100
  787. BE *+12 YES, ALLOW 38-39 NON-ZERO HRC310DK 00729200
  788. TM VCONFLAG,3 BITS 38-39 OF THE CCW MUST BE 0 00730000
  789. BNZ PROGCHK IF NOT -- 00731000
  790. TM VCONFLAG,IDA INDIRECT DATA ADDRESS ? 00732000
  791. BNO VCNDTTS NO 00733000
  792. TM VCONADDR+3,X'03' IDA MUST BE ON A WORD *00734000
  793. BOUNDRY 00735000
  794. BNZ PROGCHK ERROR IF NOT 00736000
  795. SL R6,VMCHSTRT GET DISPLACEMENT; BLOCKS @VA03177 00737000
  796. SL R7,VMCUSTRT MAY MOVE @VA03177 00738000
  797. SL R8,VMDVSTRT ... @VA03177 00739000
  798. L R1,VCONCCW GET VIRT ADD OF IDA LIST @VA03177 00740000
  799. TRANS 2,1,OPT=(BRING,DEFER),ADEX=PROGCHK1 PULL IDA IN @VA03177 00741000
  800. AL R6,VMCHSTRT FIX DISPLACEMENT; BLOCKS @VA03177 00742000
  801. AL R7,VMCUSTRT MAY HAVE MOVED @VA03177 00743000
  802. AL R8,VMDVSTRT ... @VA03177 00744000
  803. TM 0(R2),X'FF' IS FIRST IDA ENTRY VALID ? @VA03177 00745000
  804. BNZ PROGCHK NO- BRANCH; ERROR @VA03177 00746000
  805. VCNDTTS NI VDEVCFLG,X'FF'-VDEVTIC TURN TIC FLAG OFF 00747000
  806. BR R9 RETURN 00748000
  807. SPACE 1 00749000
  808. TIC EQU * HERE TO FOLLOW THE TIC 00750000
  809. TM VDEVFLAG,VDEVCCW1 IS IT THE FIRST CCW? 00751000
  810. BO PROGCHK YES, GO SET PROGRAM CHECK 00752000
  811. TM VDEVCFLG,VDEVTIC TIC TO TIC ? 00753000
  812. BO PROGCHK YES, GO SET PROGRAM CHECK 00754000
  813. OI VDEVCFLG,VDEVTIC INDICATE LAST CCW WAS A TIC 00755000
  814. L R1,0(,R2) GET TIC ADDRESS 00756000
  815. LA R1,0(,R1) STRIP OP-CODE 00757000
  816. ST R1,VCONCAW SAVE ADDRESS 00758000
  817. B ADDRTEST GO VALIDATE NEW CCW 00759000
  818. EJECT 00760000
  819. VCNSCALC EQU * HERE TO CALCUATE THE SIZE OF THE DATA BUFFER *00761000
  820. NEEDED FOR READ AND WRITE SIMULATION 00762000
  821. SLR R4,R4 CLEAR 00763000
  822. L R1,VCONCAW GET CURRENT CAW 00764000
  823. S R1,F8 AND BACKUP TO GET CURRENT CCW 00765000
  824. VCNSCLP LR R3,R1 CHECK FOR NON DOUBLE WORD ALIGNMENT 00766000
  825. N R3,F7 ... 00767000
  826. BNZ PROGCHK MUST BE ZERO 00768000
  827. SL R6,VMCHSTRT CHANNEL DISP @VA01770 00769000
  828. SL R7,VMCUSTRT CONT. UNIT DISP @VA01770 00770000
  829. SL R8,VMDVSTRT GET VDEVBLOK DISPLACEMENT 00771000
  830. ALTER3 TRANS 2,1,OPT=(BRING,DEFER),ADEX=PROGCHK1 GET CCW @V304735 00772000
  831. CALL DMKPSACC CHECK IF SHARED PAGE WAS CHANGED @V304735 00773000
  832. BZ NOTCHG3 NOT CHANGED - CONTINUE @V304735 00774000
  833. CALL DMKVMASH FLAG ALL CHANGED SHARED PAGES @VA07351 00774100
  834. B ALTER3 RE-ISSUE THE TRANS CALL @V304735 00776000
  835. NOTCHG3 AL R6,VMCHSTRT RESTORE ADDRESS @V304735 00777000
  836. AL R7,VMCUSTRT RESTORE ADDRESS @V304735 00778000
  837. AL R8,VMDVSTRT ADDRESS OF VDEVBLOK 00779000
  838. TM VCONCOMD-VCONCCW(R2),X'07' IS CCW A TIC ? 00780000
  839. BNZ VCNSCCT NO 00781000
  840. TM VCONCOMD-VCONCCW(R2),X'08' IS CCW A TIC ? 00782000
  841. BNO VCNSCCT NO 00783000
  842. TM VDEVCFLG,VDEVTIC HAD A TIC BEFORE ?? 00784000
  843. BO PROGCHK YES, PROGRAM CHECK FOR CHANNEL 00785000
  844. OI VDEVCFLG,VDEVTIC FLAG AS TIC ENCOUNTERED 00786000
  845. L R1,VCONADDR-VCONCCW(,R2) GET NEW CCW ADDRESS 00787000
  846. LA R1,0(,R1) CLEAR OP-CODE 00788000
  847. B VCNSCLP 00789000
  848. SPACE 1 00790000
  849. VCNSCCT EQU * 00791000
  850. NI VDEVCFLG,X'FF'-VDEVTIC UNFLAG TIC ENCOUNTERED 00792000
  851. LH R3,VCONCNT-VCONCCW(,R2) GET CCW COUNT 00793000
  852. N R3,XRIGHT16 ... 00794000
  853. ALR R4,R3 ACCUMULATE COUNT 00795000
  854. TM VCONDWC,X'40' IS THIS DIAG 58 ? HRC101DK 00795100
  855. BZ CKSIOSIZ NO, USE NORMAL SIZE HRC101DK 00795200
  856. CL R4,=F'4064' LARGER THAN MAX ALLOWED ?? HRC101DK 00795300
  857. BNH NEXT OK IF LESS THAN OR EQUAL TO MAX HRC101DK 00795400
  858. B PRGIL ELSE PROG CHECK HRC101DK 00795500
  859. CKSIOSIZ EQU * HRC101DK 00795600
  860. CL R4,=F'2032' LARGER THAN MAX ALLOWED ?? 00796000
  861. BL NEXT NO, CONT 00797000
  862. PRGIL OI VDEVCSW+5,IL SET INCORRECT LENGTH @V200730 00798000
  863. B PROGCHK SET CHAN PROG CHECK 00799000
  864. NEXT DS 0H 00800000
  865. TM VCONFLAG-VCONCCW(R2),CD DATA CHAINED ? 00801000
  866. BZ TSTGRF NO, TEST FOR DIAG WRITE @V200730 00802000
  867. LA R1,8(,R1) GET NEXT CCW 00803000
  868. B VCNSCLP 00804000
  869. TSTGRF TM VCONDWC,X'40' DIAGNOSE GRAPHICS WRITE ?? @VA07542 00805100
  870. BCR 8,R9 NO, RETURN @V200730 00806000
  871. L R3,VMTERM GET USER TERM RDEVBLOK @V200730 00807000
  872. LTR R3,R3 IS THERE ONE NOW ?? @V200730 00808000
  873. BNP 0(R9) NO, RETURN @V200730 00809000
  874. USING RDEVBLOK,R3 ADDRESSING @V200730 00810000
  875. CLI RDEVTYPC,CLASGRAF IS IT A GRAF DEVICE @V200730 00811000
  876. BE *+20 YES, CHECK FOR ERASE SCREEN @V2D3931 00812000
  877. CLI RDEVTYPC,CLASTERM IS THIS A TERMINAL CLASS @V2D3931 00813000
  878. BNE VDEVREJ NO, REJECT - CANN'T HACK IT @V2D3931 00814000
  879. CLI RDEVTYPE,TYPBSC IS THIS A BISYNC LINE FOR 3270 @V2D3931 00815000
  880. BNE VDEVREJ NO, REJECT - SET UNIT CHECK FLAG @V2D3931 00816000
  881. CLI VCONDWC,X'FF' ERASE SCREEN, CLEAR DIAGNOSE ?? @VA07542 00818100
  882. BCR 8,R9 YES, LET IT GO 00819000
  883. SLR R0,R0 CLEAR A WORK REGISTER @V60A6B6 00819100
  884. IC R0,VCONDWC GET LINE COORDINATE NO @V60A6B6 00819200
  885. N R0,=XL4'0000003F' AND OUT ERASE BIT @V60A6B6 00819300
  886. SLR R1,R1 CLEAR DISPLAY INDEX REGISTER @V60A6B6 00820000
  887. CLI RDEVTYPE,TYPBSC DISPLAY ON A REMOTE LINE ? @V60A6B6 00821100
  888. BE CHKSIZE YES. @V60A6B6 00822100
  889. CHKGRAF EQU * @V60A6B6 00822200
  890. IC R1,RDEVGRTY GET LOCAL DISPLAY'S SCREEN INDEX @V60A6B6 00822300
  891. DROP R3 FINISHED USING RDEVBLOK... @V60A6B6 00822400
  892. CHKSIZE EQU * @V60A6B6 00822500
  893. L R2,=A(DMKGRTIN) ADDRESS INPUT COORDINATE TABLE @V60A6B6 00822600
  894. LA R2,0(R1,R2) AND GET THE RIGHT ONE FOR DEVICE @V60A6B6 00823000
  895. CLM R0,B'0001',0(R2) THIS WRITE TO THE INPUT AREA? @V60A6B6 00823100
  896. BE TSTINPT YES, CHECK THAT @V200730 00824000
  897. MH R0,=H'80' GET BUFFER POSITION START @V60A6B6 00825100
  898. ALR R0,R4 ADD THIS DATA COUNT @V60A6B6 00825200
  899. L R2,=A(DMKGRTDS) ADDRESS TABLE OF DISPLAY SIZES @V60A6B6 00825300
  900. L R2,0(R1,R2) GET RIGHT SIZE FOR THIS DEVICE @V60A6B6 00825400
  901. LA R2,6(,R2) PLUS 6 FOR HI INTENSITY HRC310DK 00825410
  902. CLR R0,R2 CAN'T BE MORE THAN THIS @V60A6B6 00825500
  903. BNHR R9 OK, CONTINUE @V60A6B6 00825600
  904. B PRGIL SORRY CHUM, THAT'S A NO-NO @V200730 00829000
  905. TSTINPT CL R4,=F'136' CANT WRITE MORE THAN THIS @V200730 00830000
  906. BNH 0(R9) OK, CONT @V200730 00831000
  907. B PRGIL WELL, I WARNED YOU @V200730 00832000
  908. EJECT 00833000
  909. VCNMVDAT EQU * HERE TO MOVE DATA BETWEEN USER AND DATA BUFFER 00834000
  910. OI VDEVCFLG,VDEVTRAN INDICATE A DATA TRANSFER 00835000
  911. VCNCUPCR CLR R0,R10 IF FIELD IS ALREADY EMPTY 00836000
  912. BE CCWWLRCN GIVE STATUS 00837000
  913. L R1,VCONADDR GET DATA ADDRESS 00838000
  914. LA R1,0(,R1) CLEAR OP-CODE 00839000
  915. LH R4,VCONCNT GET COUNT 00840000
  916. N R4,XRIGHT16 ... 00841000
  917. TM VCONFLAG,IDA INDIRECT DATA ADDRESS ? 00842000
  918. BNO VCNCTADR NO 00843000
  919. ST R1,VCONIDAP SAVE FIRST IDAW PTR 00844000
  920. SL R6,VMCHSTRT CHANNEL DISP @VA01770 00845000
  921. SL R7,VMCUSTRT CONT. UNIT DISP @VA01770 00846000
  922. SL R8,VMDVSTRT GET VDEVBLOK DISPLACEMENT 00847000
  923. ALTER4 TRANS 2,1,OPT=(BRING,DEFER),ADEX=VCNCHAD FETCH IDAW @V304735 00848000
  924. CALL DMKPSACC CHECK IF SHARED PAGE WAS CHANGED @V304735 00849000
  925. BZ NOTCHG4 NOT CHANGED - CONTINUE @V304735 00850000
  926. CALL DMKVMASH FLAG ALL CHANGED SHARED PAGES @VA07351 00850100
  927. B ALTER4 RE-ISSUE THE TRANS CALL @V304735 00852000
  928. NOTCHG4 AL R6,VMCHSTRT RESTORE ADDRESS @V304735 00853000
  929. AL R7,VMCUSTRT RESTORE ADDRESS @V304735 00854000
  930. AL R8,VMDVSTRT ADDRESS OF VDEVBLOK 00855000
  931. L R1,0(,R2) GET FIRST IDA 00856000
  932. VCNCTADR LR R5,R0 GET CURRENT CHARACTER PTR @V304635 00857000
  933. SLR R5,R10 GET FIELD LENGTH COUNT 00858000
  934. LA R14,2048(,R1) 00859000
  935. N R14,=A(X'FFF800') 00860000
  936. SLR R14,R1 GET COUNT TO END OF 2K PROTECTION AREA 00861000
  937. CLR R4,R5 LESS THAN FULL RECORD REQUESTED? 00862000
  938. BNL VCNCTPG NO 00863000
  939. LR R5,R4 COUNT TO BE MOVED IS CCW COUNT 00864000
  940. TM VCONFLAG,CD+SILI DATA CHAINING OR SILI? 00865000
  941. BNZ VCNCTPG YES 00866000
  942. OI VDEVCSW+5,IL SET INCORRECT LENGTH 00867000
  943. NI VCONFLAG,X'FF'-(CD+CC) SUPPRESS CHAINING 00868000
  944. VCNCTPG CLR R14,R5 00869000
  945. BNL VCNMVDCN MUST STOP AT END OF 2K 00870000
  946. LR R5,R14 COUNT TO BE MOVED IS TO 2K BOUNDRY 00871000
  947. VCNMVDCN C R5,F256 IS COUNT > 256 BYTES? 00872000
  948. BNH VCNMVDCO NO 00873000
  949. L R5,F256 COUNT TO BE MOVED IS 256 BYTES 00874000
  950. VCNMVDCO BCTR R5,0 DECREMENT COUNT FOR MVC 00875000
  951. SL R6,VMCHSTRT CHANNEL DISP @VA01770 00876000
  952. SL R7,VMCUSTRT CONT. UNIT DISP @VA01770 00877000
  953. SL R8,VMDVSTRT GET VDEVBLOK DISPLACEMENT 00878000
  954. ALTER5 TRANS 2,1,OPT=(BRING,DEFER),ADEX=VCNCHAD GET DATA PAGE@V304735 00879000
  955. CALL DMKPSACC CHECK IF SHARED PAGE WAS CHANGED @V304735 00880000
  956. BZ NOTCHG5 NOT CHANGED - CONTINUE @V304735 00881000
  957. CALL DMKVMASH FLAG ALL CHANGED SHARED PAGES @VA07351 00881100
  958. B ALTER5 NOW RE-ISSUE THE TRANS CALL @V304735 00883000
  959. NOTCHG5 AL R6,VMCHSTRT RESTORE ADDRESS @V304735 00884000
  960. AL R7,VMCUSTRT RESTORE ADDRESS @V304735 00885000
  961. AL R8,VMDVSTRT ADDRESS OF VDEVBLOK 00886000
  962. TM VCONCOMD,X'01' WRITE COMMAND? 00887000
  963. BNO VCNMVRD NO 00888000
  964. EX R5,MVCFCORE MOVE DATA FROM VIRTUAL CORE 00889000
  965. B VCNMVDC 00890000
  966. VCNMVRD TM VCONFLAG,SKIP SUPPRESS DATA TRANSFER? 00891000
  967. BO VCNMVDC YES 00892000
  968. LR R3,R0 SAVE BUFFER LENGTH REGISTER @V304735 00893000
  969. IC R0,VDEVKEY GET VIRTUAL CAW KEY @V304735 00894000
  970. CALL DMKPSASC CHECK FOR PROTECTION VIOLATION @V304735 00895000
  971. BNZ VCNCPRTV BRANCH ON PROTECTION ERROR @V304735 00896000
  972. LR R0,R3 RESTORE BUFFER LENGTH @V304735 00897000
  973. EX R5,MVCTCORE MOVE DATA INTO VIRTUAL CORE 00898000
  974. VCNMVDC LA R5,1(,R5) DATA MOVE COMPLETE, RESTORE COUNT 00899000
  975. ALR R10,R5 POINT TO NEW START OF FIELD 00900000
  976. SLR R4,R5 REDUCE CCW COUNT 00901000
  977. STH R4,VDEVCSW+6 SAVE RESIDUAL COUNT 00902000
  978. BCR 10,R9 CCW COUNT SATISFIED, EXIT 00903000
  979. CLR R0,R10 BUFFER EXHAUSTED? 00904000
  980. BE CCWWLRCN YES, TEST FOR WRL 00905000
  981. ALR R1,R5 POINT TO NEW VIRTUAL DATA AREA 00906000
  982. TM VCONFLAG,IDA INDIRECT DATA ADDRESS ? 00907000
  983. BNO VCNCTADR NO 00908000
  984. LR R3,R1 GET IDA 00909000
  985. N R3,=X'FF0007FF' VALID IDA ON 2K BOUNDRY? @VA03177 00910000
  986. BNZ VCNCTADR NO 00911000
  987. L R1,VCONIDAP GET CURRENT IDAW PTR 00912000
  988. LA R1,4(,R1) BUMP BY 4 00913000
  989. ST R1,VCONIDAP REPLACE 00914000
  990. SL R6,VMCHSTRT CHANNEL DISP @VA01770 00915000
  991. SL R7,VMCUSTRT CONT. UNIT DISP @VA01770 00916000
  992. SL R8,VMDVSTRT GET VDEVBLOK DISPLACEMENT 00917000
  993. ALTER6 TRANS 2,1,OPT=(BRING,DEFER),ADEX=VCNCHAD FETCH IDAW @V304735 00918000
  994. CALL DMKPSACC CHECK IF SHARED PAGE WAS CHANGED @V304735 00919000
  995. BZ NOTCHG6 NOT CHANGED - CONTINUE @V304735 00920000
  996. CALL DMKVMASH FLAG ALL CHANGED SHARED PAGES @VA07351 00920100
  997. B ALTER6 NOW - REISSUE THE TRANS CALL @V304735 00922000
  998. NOTCHG6 AL R6,VMCHSTRT RESTORE ADDRESS @V304735 00923000
  999. AL R7,VMCUSTRT RESTORE ADDRESS @V304735 00924000
  1000. AL R8,VMDVSTRT ADDRESS OF VDEVBLOK 00925000
  1001. L R1,0(,R2) GET IDA 00926000
  1002. LR R3,R1 GET IDA 00927000
  1003. N R3,=X'FF0007FF' VALID IDA ON 2K BOUNDRY? @VA03177 00928000
  1004. BNZ VCNCCHAD NO -- GIVE CHANNEL PROGRAM CHECK 00929000
  1005. B VCNCTADR 00930000
  1006. SPACE 00931000
  1007. VCNCHAD EQU * HERE WHEN A CHANNEL PROGRAM CHECK OCCURS DURING 00932000
  1008. * EXECUTION OF THE MOVE SUBROUTINE (BRANCH FROM TRANS) 00933000
  1009. AL R6,VMCHSTRT ADDRESS OF VCHBLOK @VA01770 00934000
  1010. AL R7,VMCUSTRT ADDRESS OF VCUBLOK @VA01770 00935000
  1011. AL R8,VMDVSTRT ADDRESS OF VDEVBLOK 00936000
  1012. VCNCCHAD EQU * HERE IF CHANNEL PROGRAM CHECK DURING MOVE ROUTINE 00937000
  1013. OI VDEVCSW+5,PRGC INDICATE PROGRAM CHECK 00938000
  1014. B *+8 00939000
  1015. SPACE 00940000
  1016. VCNCPRTV EQU * HERE WHEN A PROTECTION VIOLATION OCCURS DURING *00941000
  1017. EXECUTION OF THE MOVE SUBROUTINE 00942000
  1018. OI VDEVCSW+5,PRTC INDICATE PROTECTION CHECK 00943000
  1019. TM VCONCCW+4,CD DATA CHAINING? 00944000
  1020. BO WLRBRKCN YES -- GIVE WLR 00945000
  1021. TM VCONCCW+4,SILI SILI? 00946000
  1022. BO WLRBRKSP YES -- JUST BREAK CHAIN 00947000
  1023. B WLRBRKCN GIVE INCORRECT LENGTH AND BREAK CHAIN 00948000
  1024. SPACE 00949000
  1025. CCWWLRCN EQU * HERE WHEN FIELD COUNT EMPTIED BEFORE CCW COUNT 00950000
  1026. TM VCONFLAG,CD DATA CHAINING? 00951000
  1027. BO WLRBRKCN DATA CHAINING MUST BE BROKEN 00952000
  1028. TM VCONFLAG,SILI WLR IS OK WITH SILI SET 00953000
  1029. BCR 1,R9 00954000
  1030. WLRBRKCN OI VDEVCSW+5,IL SET INCORRECT LENGTH RECORD 00955000
  1031. WLRBRKSP NI VCONFLAG,X'FF'-(CD+CC) SUPPRESS CHAINING 00956000
  1032. BR R9 EXIT 00957000
  1033. SPACE 00958000
  1034. MVCTCORE MVC 0(0,R2),0(R10) EXECUTED MOVE TO VIRTUAL CORE 00959000
  1035. MVCFCORE MVC 0(0,R10),0(R2) EXECUTED MOVE FROM VIRTUAL CORE 00960000
  1036. MVCBUFF MVC 0(0,R1),0(R10) EXCUTED MOVE FROM VIRTUAL BUFFER @V200730 00961000
  1037. SAVEBUF MVC 0(0,R1),0(R10) EXECUTED TO SAVE WRITE DATA @V200730 00962000
  1038. EJECT 00963000
  1039. VCNRELSE EQU * HERE TO RETURN THE DATA BUFFER TO FREE STORAGE 00964000
  1040. L R13,VDEVCON POINT TO VCONCTL BLOK @VA14366 00964100
  1041. SLR R0,R0 CLEAR FOR IC 00965000
  1042. LH R0,VCONBFSZ GET NUMBER OF DOUBLE WORDS TO FREHRC101DK 00966490
  1043. L R1,VCONBUF GET PTR TO DATA BUFFER 00967000
  1044. LTR R1,R1 BLOCK ALREADY RETURNED ? 00968000
  1045. BCR 8,R9 (BZR) YES 00969000
  1046. CALL DMKFRET 00970000
  1047. ENTRY DMKVCNFT ENTRY POINT TO TELL DMKFRE ... @VA05235 00970100
  1048. DMKVCNFT EQU * ADDRESS OF ABOVE DMKFRET CALL. @VA05235 00970200
  1049. XC VCONBUF,VCONBUF CLEAR PTR 00971000
  1050. BR R9 00972000
  1051. * 00972200
  1052. VCNQM000 EQU * HRC063DK 00972220
  1053. L R5,VDEVQMB -> QMBLOK chain anchor HRC063DK 00972240
  1054. XC VDEVQMB,VDEVQMB Clear queued msg chain HRC063DK 00972260
  1055. USING QMBLOK,R5 QMBLOK is def in VBLOKS HRC063DK 00972280
  1056. * HRC063DK 00972300
  1057. VCNQM010 EQU * HRC063DK 00972320
  1058. LTR R5,R5 Do we have queued msgs? HRC063DK 00972340
  1059. BZR R9 No, just exit HRC063DK 00972360
  1060. L R0,QMQCNR0 Load message length HRC063DK 00972380
  1061. LA R1,QMMSGTXT -> message text HRC063DK 00972400
  1062. L R2,QMQCNR2 Load msg option flags HRC063DK 00972420
  1063. O R2,=A(NOQUEUE) Set 'do not queue' flag HRC063DK 00972440
  1064. CALL DMKQCNWT Issue msgs HRC063DK 00972460
  1065. L R0,QMSIZE Size of QMBLOK+msg txt HRC063DK 00972480
  1066. LR R1,R5 QMBLOK ptr to R1 HRC063DK 00972500
  1067. L R5,QMNEXT -> next QMBLOK HRC063DK 00972520
  1068. CALL DMKFRET Release prev QMBLOK HRC063DK 00972540
  1069. B VCNQM010 Go prcoess next QMBLOK HRC063DK 00972560
  1070. DROP R5 QMBLOK HRC063DK 00972580
  1071. * HRC063DK 00972600
  1072. EJECT 00973000
  1073. * 00974000
  1074. * HERE FOR SUBROUTINES TO HANDLE EXIT FROM DMKVCNEX 00975000
  1075. * 00976000
  1076. SPACE 00977000
  1077. UNITCHK EQU * HERE TO INDICATE UNIT CHECK - SENSE BYTE IS ALREADY 00978000
  1078. * SET 00979000
  1079. OI VDEVCSW+4,CE+DE+UC SET UNIT CHECK 00980000
  1080. B VCNEXIT 00981000
  1081. SPACE 00982000
  1082. PROTCHK EQU * HERE ON A PROTECTION VIOLATION 00983000
  1083. OI VDEVCSW+5,PRTC SET PROTECTION CHECK 00984000
  1084. B LASTCCWX 00985000
  1085. SPACE 00986000
  1086. PROGCHK1 EQU * HERE ON A CHANNEL PROGRAM CHECK FROM TRANS MACRO 00987000
  1087. AL R6,VMCHSTRT ADDRESS OF VCHBLOK @VA01770 00988000
  1088. AL R7,VMCUSTRT ADDRESS OF VCUBLOK @VA01770 00989000
  1089. AL R8,VMDVSTRT ADDRESS OF VDEVBLOK 00990000
  1090. PROGCHK EQU * HERE ON A PROGRAM CHECK 00991000
  1091. OI VDEVCSW+5,PRGC SET CHANNEL PROGRAM CHECK 00992000
  1092. SPACE 1 00993000
  1093. LASTCCWX EQU * 00994000
  1094. TM VDEVCSW+4,CE IS CE IN CSW ? 00995000
  1095. BNO VCNEXIT NO 00996000
  1096. OI VDEVCSW+4,DE PUT DE IN CSW FOR EXCEPTION CONDITIONS 00997000
  1097. B VCNEXIT 00998000
  1098. SPACE 00999000
  1099. LASTCCW EQU * HERE TO FINISH PROCESSING THE LAST CCW 01000000
  1100. TM VDEVCSW+4,DE IS DE IN CSW? 01001000
  1101. BO VCNEXIT YES, NO DE STATUS IN DEVICE 01002000
  1102. OI VDEVSTAT,VDEVPEND DE MUST BE PENDING IN DEVICE 01003000
  1103. OI VDEVINTS,DE ... 01004000
  1104. SPACE 01005000
  1105. VCNEXIT EQU * HERE FOR GENERAL EXIT 01006000
  1106. IC R0,VDEVKEY GET CAW PROTECT KEY @VA13617 01006100
  1107. STC R0,VDEVCSW PUT IT IN CSW @VA13617 01006200
  1108. NI VDEVCSW,X'F0' CLEAN UP LOW NIBBLE @VA13617 01006300
  1109. BAL R9,VCNRELSE RELEASE BUFFER - IF ANY 01007000
  1110. TM VCUTYPE,VCUSHRD SHARED SUBCHANNEL? @VA01709 01008000
  1111. BZ *+8 NO, NO STATUS FOR CU @VA01709 01009000
  1112. OI VCUSTAT,VCUCEPND INTERRUPT PENDING IN CU @VA02998 01010000
  1113. OI VDEVSTAT,VDEVCHAN SET CHANNEL INTERRUPT PENDING 01011000
  1114. CLI VCONCOMD,X'29' DIAG 58 FULL SCR WRITE? HRC058DK 01011100
  1115. BE VCND58 Y, SPECIAL HANDLING HRC058DK 01011110
  1116. CLI VCONCOMD,X'2A' DIAG 58 FULL SCR READ? HRC058DK 01011120
  1117. BE VCND58 Y, SPECIAL HANDLING HRC058DK 01011130
  1118. CLI VCONCOMD,X'63' DIAG 58 control query? HRC064DK 01011200
  1119. BE VCND58 Y, exit w/ CC from HDKD58HRC064DK 01011210
  1120. TM VDEVFLAG,VDEVCCW1 STILL ON 1ST CCW? 01012000
  1121. BNO VCNEXITX NO, NO CHANCE FOR CC1 TO SIO 01013000
  1122. TM VDEVCSW+4,CE+DE ANY CHANNEL OR DEVICE STATUS PENDING 01014000
  1123. BZ VCNCC1 NO, MUST BE AN UNUSUAL CONDITION 01015000
  1124. TM VCONCOMD,X'03' IS IT AN IMMEDIATE COMMAND? 01016000
  1125. BNO VCNEXITX NO 01017000
  1126. B VCNCC1 GO SET CC1 HRC058DK 01017100
  1127. VCND58 EQU * HRC058DK 01017110
  1128. CLI VDEVCSW+4,CE+DE NORMAL COMPLETION? HRC058DK 01017120
  1129. BE VCNEXITX Y, HANDLE PENDING INTRPT HRC058DK 01017130
  1130. SPACE 01018000
  1131. VCNCC1 EQU * HERE FOR CC1 TO SIO 01019000
  1132. TM VMESTAT,VMEXTCM IS V.M. IN EXTENDED CONTROL MODE ? 01020000
  1133. BNO VCN004 NO 01021000
  1134. OI VMPSW+2,X'10' SET CC1 IN EXTENDED PSW 01022000
  1135. B VCN005 01023000
  1136. VCN004 OI VMPSW+4,X'10' SET CC1 IN STANDARD PSW 01024000
  1137. VCN005 EQU * 01025000
  1138. LA R1,CSW ADDRESS OF CSW 01026000
  1139. SL R6,VMCHSTRT CHANNEL DISP @VA01770 01027000
  1140. SL R7,VMCUSTRT CONTR. UNIT DISP @VA01770 01028000
  1141. SL R8,VMDVSTRT GET VDEVBLOK DISPLACEMENT 01029000
  1142. TRANS 2,1,OPT=(BRING,DEFER) BRING IN USER'S PAGE 0 01030000
  1143. AL R6,VMCHSTRT RESTORE ADDRESS @VA01770 01031000
  1144. AL R7,VMCUSTRT RESTORE ADDRESS @VA01770 01032000
  1145. AL R8,VMDVSTRT ADDRESS OF VDEVBLOK 01033000
  1146. MVC 4(2,R2),VDEVCSW+4 STORE STATUS ONLY 01034000
  1147. NI VDEVSTAT,X'FF'-VDEVCHAN NO CHANNEL CLASS INTERRUPT PEND 01035000
  1148. CLI VDEVCSW+4,X'8E' DIAG 58 CP interruption? HRC062DK 01035100
  1149. BNE VCNEXITX No HRC062DK 01035150
  1150. MVC 0(8,R2),VDEVCSW Provide full CSW on X'8E'HRC062DK 01035200
  1151. SPACE 01036000
  1152. VCNEXITX EQU * HERE TO TEST FOR AND POST PENDING INTERRUPTS 01037000
  1153. TM VDEVSTAT,VDEVCHAN+VDEVPEND ANY INTERRUPTS PENDING? 01038000
  1154. BZ VCNNOINT NO, EXIT 01039000
  1155. L R2,=A(DMKVIOMK) POINT TO INTERRUPT PENDING MASK *01040000
  1156. TABLE 01041000
  1157. LH R3,VDEVADD GET DEVICE ADDRESS 01042000
  1158. AR R3,R3 *2 01043000
  1159. LA R3,0(R3,R2) POINT TO CORRECT PENDING MASK 01044000
  1160. OC VCUDVINT,0(R3) SET PENDING FLAGS IN VCUBLOK 01045000
  1161. LH R3,VCUADD GET ADDRESS OF CONTROL UNIT 01046000
  1162. SRL R3,3 *2 01047000
  1163. LA R3,0(R3,R2) POINT TO CORRECT PENDING MASK 01048000
  1164. OC VCHCUINT,0(R3) AND SET PENDING FLAG 01049000
  1165. LH R3,VCHADD GET CHANNEL ADDRESS 01050000
  1166. SRL R3,7 *2 01051000
  1167. ALR R3,R2 POINT TO MASK BYTES 01052000
  1168. OC VMIOINT,0(R3) FLAG CHANNEL PENDING IN VMBLOK 01053000
  1169. OI VMPEND,VMIOPND FLAG SUMMARY PENDING BYTE 01054000
  1170. TM VDEVCFLG,VDEVTRAN DID DATA TRANSFER OCCUR ? 01055000
  1171. BNO VCNNOINT NO 01056000
  1172. TM VMOSTAT,VMDISC DISCONNECTED USER ? 01057000
  1173. BO *+8 YES -- FORGET ABOUT Q1 01058000
  1174. OI VMQSTAT,VMPRIDSP FLAG USER TO ENTER DISPATCHER Q1 01059000
  1175. SPACE 01060000
  1176. VCNNOINT EQU * HERE DIRECTLY IF NO INTERRUPTS ARE PENDING 01061000
  1177. NI VDEVSTAT,X'FF'-(VDEVBUSY+VDEVCHBS) MARK DEVICE & *01062000
  1178. SUBCHANNEL AS NO LONGER BUSY 01063000
  1179. TM VDEVCFLG,VDEVATTN WAS A DOUBLE ATTN HIT ? 01064000
  1180. BO VCNBK YES, GO TO CP MODE @V200930 01065000
  1181. TM VDEVCFLG,VDEVVCF FLAGGED TO DO VIRT CONS FUNC ??@V200930 01066000
  1182. BZ VCNEXITY NO, CONT @V200930 01067000
  1183. L R1,VCONRBUF GET BUFFER ADDRESS @V200930 01068000
  1184. USING BUFIN,R1 @V200930 01069000
  1185. SR R0,R0 CLEAR @V200930 01070000
  1186. ST R0,VCONRBUF CLEAR BUFFER ADDRESS @V200930 01071000
  1187. L R0,BUFCNT GET DATA COUNT @V200930 01072000
  1188. DROP R1 @V200930 01073000
  1189. TM VMOSTAT,VMCF AVOID OVERLAPPING TASKS @VA02350 01074000
  1190. BO VCNEXITY @VA02350 01075000
  1191. CALL DMKCFMEN DO VIRT CONSOLE FUNCTION @V200930 01076000
  1192. B VCNEXITY RETURN @V200930 01077000
  1193. VCNBK DS 0H @V200930 01078000
  1194. CALL DMKCFMBK PLACE USER IN CONSOLE FUNCTION MODE 01079000
  1195. SPACE 1 01080000
  1196. VCNEXITY TM VMDSTAT,VMTIO USER IN TIO BUSY LOOP ?? @V200730 01081000
  1197. BZ *+8 NO, SKIP @V200730 01082000
  1198. NI VMRSTAT,X'FF'-VMEXWAIT-VMIDLE REMOVE FROM WAIT @V200730 01083000
  1199. GOTO DMKDSPCH LEAVE HERE @V200730 01084000
  1200. SPACE 01085000
  1201. ALARMMSG DC C'RRRR....RING....GGGG' VIRTUAL BELL 01086000
  1202. EJECT 01087000
  1203. LTORG 01088000
  1204. COPY DEVTYPES 01089000
  1205. COPY EQU 01090000
  1206. COPY VBLOKS 01091000
  1207. COPY RBLOKS @V200730 01092000
  1208. COPY VMBLOK 01093000
  1209. PSA 01094000
  1210. COPY IOBLOKS 01095000
  1211. COPY CONBUF @V200930 01096000
  1212. END 01097000
ibm/vm370-lib/cp/dmkvcn.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator