Table of Contents

DMSCIT Source

References

Source Listing

DMSCIT.ASSEMBLE.txt
  1. CIT TITLE 'DMSCIT (CMS) VM/370 - RELEASE 6' 00001000
  2. SPACE 2 00002000
  3. * 00020000
  4. * MODULE: 00021000
  5. * 00022000
  6. * DMSCIT 00023000
  7. * 00024000
  8. * FUNCTION: 00025000
  9. * 00026000
  10. * TO PROCESS THE INTERRUPTIONS FOR ALL CMS TERMINAL 00027000
  11. * INPUT/OUTPUT OPERATIONS AND START THE NEXT I/O 00028000
  12. * OPERATION UPON COMPLETION OF THE CURRENT I/O 00029000
  13. * OPERATION. 00030000
  14. * 00031000
  15. * ENTRY POINTS: 00032000
  16. * 00033000
  17. * DMSCITA,CONSI - PROCESS TERMINAL INTERRUPTS 00034000
  18. * DMSCITB - START NEXT I/O OPERATION 00035000
  19. * DMSCITDB - TO FREE I/O BUFFERS FROM STACKS 00036000
  20. * 00037000
  21. * ATTRIBUTES: 00038000
  22. * 00039000
  23. * REENTRANT, NUCLEUS RESIDENT, CALLED BY BALR 00040000
  24. * 00041000
  25. * SUBROUTINE 00042000
  26. * 00043000
  27. * DMSCITA 00044000
  28. * 00045000
  29. * FUNCTION: 00046000
  30. * 00047000
  31. * TO PROCESS CMS TERMINAL I/O INTERRUPTS. 00048000
  32. * 00049000
  33. * ENTRY POINT 00050000
  34. * 00051000
  35. * DMSCITA 00052000
  36. * 00053000
  37. * ENTRY REQUIREMENTS: 00054000
  38. * 00055000
  39. * GPR 5 = ADDRESS OF DEVICE TABLE EENTRY FOR CONSOLE. 00056000
  40. * 00057000
  41. * EXIT CONDITIONS: 00058000
  42. * 00059000
  43. * GPR 15 = 0 INDICATES DE INTERRUPT RECEIVED, NO LONGER 00060000
  44. * WAITING. 00061000
  45. * 00062000
  46. * GPR 15 = 4 INDICATES STILL WAITING FOR DE INTERRUPT. 00063000
  47. * 00064000
  48. * ERROR- 00065000
  49. * GOTO DMSERR ON PERMANENT CONSOLE ERROR 00066000
  50. * 00067000
  51. * CALLS TO OTHER ROUTINES: 00068000
  52. * 00069000
  53. * DMSCITB, DMSFREB, DMSERR 00070000
  54. * 00071000
  55. * EXTERNAL REFERENCES: 00072000
  56. * 00073000
  57. * DMSNUC 00074000
  58. * 00075000
  59. * TABLES / WORKAREAS: 00076000
  60. * 00077000
  61. * NONE 00078000
  62. * 00079000
  63. * REGISTER USAGE: 00080000
  64. * 00081000
  65. * GPR0-9, 11, 12 - WORK REGISTERS 00082000
  66. * GPR5 - DEVICE TABLE ENTRY 00083000
  67. * GPR10 - NOT USED 00084000
  68. * GPR13 - BASE REGISTER 00085000
  69. * GPR14 - LINKAGE 00086000
  70. * 00087000
  71. * OPERATION: 00088000
  72. * 00089000
  73. * UPON RECEIVING CONTROL DMSCITA DETERMINES THE TYPE OF 00090000
  74. * INTERRUPTION. IF THE STATUS BYTES INDICATE NEITHER 00091000
  75. * DEVICE END, UNIT EXCEPTION NOR ATTENTION, DMSCITA 00092000
  76. * RETURNS TO DMSITI 00093000
  77. * WITH REGISTER 15 SET TO 4 INDICATING THAT THE I/O IS 00094000
  78. * STILL IN PROCESS. 00095000
  79. * 00096000
  80. * IF DEVICE END STATUS IS PRESENT, INDICATING THE 00097000
  81. * COMPLETION OF AN I/O OPERATION, DMSCITA TESTS WHETHER 00098000
  82. * THE FINISHED OPERATION WAS A READ OR A WRITE. IF IT 00099000
  83. * WAS A WRITE, DMSCITA DELETES THE FIRST WRITE BUFFER 00100000
  84. * FROM THE OUTPUT STACK AREA AND MOVES THE REMAINING 00101000
  85. * WRITE BUFFERS TO THE BEGINNING OF THE OUTPUT STACK 00102000
  86. * AREA. IF THERE ARE ANY MORE WRITE OPERATIONS 00103000
  87. * PENDING, DMSCITA BALR'S TO DMSCITB TO START THE FIRST 00104000
  88. * OPERATION IN THE OUTPUT STACK. IF THE OPERATION IS 00105000
  89. * STARTED SUCCESSFULLY, DMSCITA RETURNS TO DMSITI WITH 00106000
  90. * REGISTER 15 SET TO ZERO. IF THE OPERATION WAS 00107000
  91. * STARTED UNSUCCESSFULLY, BECAUSE THE USER PUSHED THE 00108000
  92. * ATTENTION KEY, IT IS TREATED THE SAME AS ANY 00109000
  93. * ATTENTION INTERRUPT. ANY OTHER ERRORS CAUSE 00110000
  94. * TERMINATION. 00111000
  95. * 00112000
  96. * IF THE DEVICE END STATUS INDICATES THAT A READ 00113000
  97. * OPERATION COMPLETED, DMSCITA TESTS WHETHER THE READ 00114000
  98. * WAS GENERATED BY AN ATTENTION INTERRUPT. IF IT WAS A 00115000
  99. * NORMAL READ, THE INPUT BUFFER IS CHAINED TO THE END 00116000
  100. * OF THE FINISH READ STACK. IF ANY WRITES ARE PENDING, 00117000
  101. * THE FIRST ONE IS STARTED AS THOUGH A WRITE OPERATION 00118000
  102. * HAD JUST COMPLETED. IF THE READ WAS GENERATED BY AN 00119000
  103. * ATTENTION, THE INPUT BUFFER IS CHECKED TO SEE IF IT 00120000
  104. * CONTAINS THE HO, HT, RT, RO, HX, SO, OR HB 00121000
  105. * IMMEDIATE COMMANDS. IF NOT, IT IS TREATED 00122000
  106. * THE SAME AS A NORMAL READ. IF HO IS FOUND, 00123000
  107. * THE HALT OVERRIDE FLAG IS SET. IF HT IS FOUND, 00124000
  108. * THE HALT TYPING FLAG IS SET. IF RT IS FOUND, 00125000
  109. * THE HALT TYPING FLAG IS SET OFF. IF HX IS FOUND, 00126000
  110. * THE HALT EXECUTION FLAG IS SET. IF SO IS 00126400
  111. * FOUND, THE SUSPEND OVERRIDES FLAG IS SET. 00126800
  112. * IF RO IS FOUND, THE OVERRIDES FLAG IS SET AND 00127200
  113. * THE SUSPEND OVERRIDES FLAG IS TURNED OFF. 00127600
  114. * IF HB IS FOUND, THE BATSTOP FLAG IS SET. 00128000
  115. * IF ONE OF THE IMMEDIATE COMMANDS IS FOUND, THE INPUT 00128400
  116. * BUFFER IS RETURNED TO FREE STORAGE BY BALRING TO 00129000
  117. * ROUTINE DMSFREB. ANY PENDING WRITE OPERATIONS ARE 00130000
  118. * THEN STARTED. 00131000
  119. * 00132000
  120. * IF THE I/O INTERRUPT WAS CAUSED BY AN ATTENTION, 00133000
  121. * THE ATTENTION EXIT QUEUE IS SEARCHED FOR AN 00134000
  122. * ELIGIBLE EXIT. IF ONE IS FOUND CONTROL IS PASSED 00135000
  123. * TO IT. ON RETURN DMSCITA RETURNS TO DMSITI. 00136000
  124. * IF NO EXIT IS FOUND 00137000
  125. * DMSCITA GETS 17 DOUBLE WORDS FROM FREE STORAGE BY 00138000
  126. * BALRING TO ROUTINE DMSFREB. THE ADDRESS OF THE BUFFER 00139000
  127. * IS PLACED IN THE PENDING READ POINTER AND DMSCITB IS 00140000
  128. * BALR'ED TO START THE I/O. RETURN IS THEN MADE TO 00141000
  129. * DMSITI. 00142000
  130. * IF UNIT EXCEPTION THE COMPLETED OPERATION TYPE 00143000
  131. * IS CHECKED. IF IT IS AN ATTENTION READ THE READ 00144000
  132. * START I/O IS REISSUED. OTHERWISE THE RESIDUAL 00145000
  133. * CSW BYTE COUNT IS COMPARED TO THE CCW BYTE COUNT. 00146000
  134. * IF NOT EQUAL THE READ SIO IS REISSUED (USER 00147000
  135. * CANCELLED INPUT LINE) . IF EQUAL, THE READ TER- 00148000
  136. * MINATED FLAG IS SET AND THE INTERRUPT IS TREATED 00149000
  137. * AS AN ATTENTION (ABOVE). 00150000
  138. * 00151000
  139. * SUBROUTINE 00152000
  140. * 00153000
  141. * DMSCITB 00154000
  142. * 00155000
  143. * FUNCTION: 00156000
  144. * 00157000
  145. * TO START THE NEXT TERMINAL INPUT/OUTPUT OPERATION. 00158000
  146. * 00159000
  147. * ENTRY POINT 00160000
  148. * 00161000
  149. * DMSCITB 00162000
  150. * 00163000
  151. * ENTRY REQUIREMENTS: 00164000
  152. * 00165000
  153. * GPR 1 = ADDRESS OF INPUT OR OUTPUT BUFFER. 00166000
  154. * 00167000
  155. * EXIT CONDITIONS: 00168000
  156. * 00169000
  157. * GPR 15 = 0 IF I/O WAS SUCCESSFULLY STARTED. 00170000
  158. * GPR 15 = 4 IF CSW WAS STORED. 00171000
  159. * GPR 15 = 5 IF ATTENTION READ ISSUED WITH A READ OUTSTANDING 00171500
  160. * 00172000
  161. * ERROR- 00173000
  162. * 00174000
  163. * GOTO DMSERR V1A DMSCITA ON PERMANENT CONSOLE ERROR 00175000
  164. * 00176000
  165. * CALLS TO OTHER ROUTINES: 00177000
  166. * 00178000
  167. * DMSERR 00179000
  168. * 00180000
  169. * EXTERNAL REFERENCES: 00181000
  170. * 00182000
  171. * DMSNUC 00183000
  172. * 00184000
  173. * TABLES / WORKAREAS: 00185000
  174. * 00186000
  175. * NONE. 00187000
  176. * 00188000
  177. * REGISTER USAGE: 00189000
  178. * 00190000
  179. * GPR1, GPR8 - WORK REG. 00191000
  180. * GPR9 - DEVICE ADDRESS 00192000
  181. * GPR14 - RETURN 00193000
  182. * GPR15 - BASE 00194000
  183. * 00195000
  184. * OPERATION: 00196000
  185. * 00197000
  186. * DMSCITB BUILDS A CCW STRING AND STARTS THE I/O 00198000
  187. * OPERATION. IF THE I/O STARTED SUCCESSFULLY RETURN IS 00199000
  188. * MADE TO THE CALLER WITH REGISTER 15 SET TO ZERO. IF 00200000
  189. * THE CSW WAS STORED BY THE START I/O INSTRUCTION, 00201000
  190. * REGISTER 15 IS SET TO 4 BEFORE RETURNING. IF THE 00202000
  191. * CHANNEL IS BUSY, A TEST I/O INSTRUCTION IS EXECUTED 00203000
  192. * UNTIL THE CHANNEL IS FREE. AT WHICH TIME, THE I/O 00204000
  193. * OPERATION IS RETRYED. 00205000
  194. * 00206000
  195. * SUBROUTINE 00207000
  196. * 00208000
  197. * DMSCITDB 00209000
  198. * 00210000
  199. * FUNCTION 00211000
  200. * 00212000
  201. * CLEAR READ AND WRITE STACKS. 00213000
  202. * 00214000
  203. * ENTRY CONDITIONS 00215000
  204. * 00216000
  205. * R14=RETURN, R15=ADDRESSABILITY 00217000
  206. * 00218000
  207. * CALLS TO OTHER ROUTINES 00219000
  208. * 00220000
  209. * DMSFREB 00221000
  210. * 00222000
  211. * EXTERNAL REFERENCES 00223000
  212. * 00224000
  213. * DMSNUC 00225000
  214. * 00226000
  215. * TABLES/WORKAREAS 00227000
  216. * 00228000
  217. * NONE 00229000
  218. * 00230000
  219. * REGISTER USAGE 00231000
  220. * 00232000
  221. * R13 BASE 00233000
  222. * 0,1,3-6,14,15 WORK 00234000
  223. * 00235000
  224. * OPERATION 00236000
  225. * RESET THE WRITE STACK POINTER TO ELIMINATE ALL 00237000
  226. * STACKED WRITES. CLEAR FINISHED AND PENDING READ 00238000
  227. * POINTERS, RETURN ANY ATTENTION READ BUFFERS TO 00239000
  228. * FREE STORAGE. RETURN TO CALLER 00240000
  229. *. 00241000
  230. EJECT 00242000
  231. DMSCITA START 00243000
  232. CONSI EQU * 00244000
  233. ENTRY CONSI 00245000
  234. ENTRY DMSCITB,DMSCITDB 00246000
  235. USING *,13 00247000
  236. LR 13,15 RESET BASE 00248000
  237. USING NUCON,R0 00249000
  238. USING NUCDSECT,5 00250000
  239. LH 9,NCDEVAD SET R9 TO 1052 ADDRESS 00251000
  240. LR 12,14 SAVE RETURN REGISTER 00252000
  241. NI TSOFLAGS,255-TSOATCNL RESET READ CANCELLED FLAG 00253000
  242. CKSTAT TM CSW+5,X'FF' ANY SEVERE ERRORS 00254000
  243. BZ CKSTAT1 NO 00255000
  244. CITERR1 DMSERR TEXT='PERMANENT CONSOLE ERROR, RE-IPL CMS', X00256000
  245. TYPCALL=BALR,HALT=YES,DISP=SIO,LET=T,NUM=171 00257000
  246. BAL R14,CITERR1 00258000
  247. CKSTAT1 CLI CSW+4,CE+DE CHANNEL END DEVICE END P3108 00259000
  248. BE CEDE YES, LOOK FOR POSSIBLE ATTENTION P3108 00260000
  249. TM CSW+4,DE DEVICE END WO/CE P3108 00261000
  250. BO HNDLDE YES, GO HANDLE IT 00262000
  251. TM CSW+4,ATTN NO, WAS IT FOR ATTENTION?" 00263000
  252. BO SETWAIT BRANCH IF SO @VA05051 00264500
  253. TM CSW+4,UE WAS LINE CANCELLED 00265000
  254. BO HNDLUE YES 00266000
  255. TM CSW+4,CE NO, WAS IT CHANNEL END? 00267000
  256. BO CEONLY YES, GO WAIT FOR DE 00268000
  257. BAL R14,CITERR1 00269000
  258. CEONLY LA 15,CE SET R15 FOR IOINT 00270000
  259. BR 14 AND RETURN TO IT 00271000
  260. CEDE L R2,CSW FIND CHANNEL PROGRAM P3108 00272000
  261. SH R2,=H'16' P3108 00273000
  262. TM 0(R2),X'0A' WAS IT A READ P3108 00274000
  263. BNO HNDLDE NO P3108 00275000
  264. L R2,0(R2) GET READ BUFFER ADDRESS P3108 00276000
  265. CLI 0(R2),0 WAS IT A NULL LINE P3108 00277000
  266. BNE HNDLDE NO P3108 00278000
  267. TIO 0(R9) CHECK CONSOLE P3108 00279000
  268. BZ HNDLDE CLEAR, GO HANDLE DEVICE END P3108 00280000
  269. BC 4,CSWSTORD BRANCH IF CSW STORED P3108 00281000
  270. BAL R14,CITERR1 SOMETHING WRONG P3108 00282000
  271. CSWSTORD OI TSOFLAGS,TSOATCNL ASSUME READ CANCELLED BY ATTENTP3108 00283000
  272. XC PENDREAD(4),PENDREAD CLEAR PENDING READ POINTERP3108 00284000
  273. B HNDLATTN HANDLE ATTENTION P3108 00285000
  274. EJECT 00285500
  275. HNDLUE L R1,CURRIOOP GET READ PARAMETERS 00286000
  276. TM 0(R1),LONGOP+NOATTN @V2D4598 00286250
  277. BZ HNDLUE2 NORMAL, CLEAR & RESTART @V2D4598 00286500
  278. BM HNDLUE3 LONG, CLEAR & RESTART @V2D4598 00286750
  279. OI 0(R1),RDATTNZ LONG, NO ATTN RESTART @V2D4598 00287000
  280. L R2,CSW ASSUMING IT'S OUR CCW, @V2D4598 00287250
  281. LA R2,8(,R2) THAT IS... @V2D4598 00287500
  282. B HNDLDE2 RETURN WHAT WE GOT @V2D4598 00287750
  283. HNDLUE2 EQU * @V2D4598 00288000
  284. LA R14,LNNORMOP(,R1) POINT CLEAR-SINK TO BUFFER @V2D4598 00288250
  285. SR R15,R15 AND GET BUFFER LENGTH @V2D4598 00288500
  286. IC R15,TONRMLEN(,R1) INTO MVCL SINK-LENGTH @V2D4598 00288750
  287. B HNDLUE4 GO CLEAR BUFFER @V2D4598 00289000
  288. HNDLUE3 EQU * @V2D4598 00289250
  289. L R14,0(,R1) POINT CLEAR-SINK AT USER BUFFER @V2D4598 00289500
  290. LH R15,TOLNGLEN(,R1) AND ITS LENGTH IN MVCL REG @V2D4598 00289750
  291. HNDLUE4 EQU * @V2D4598 00290000
  292. SR R3,R3 ZERO MVCL SOURCE-LENGTH, @V2D4598 00290250
  293. MVCL R14,R2 AND CLEAR BUFFER 00290500
  294. TM DBGFLAGS,DBGEXEC+DBGEXINT ARE WE IN DEBUG ? @VA00770 00291100
  295. BO NORMRD YES..HOLD ON THE READ @VA00770 00291200
  296. B STRTCON1 REISSUE READ 00292000
  297. EJECT 00294000
  298. HNDLDE L 2,CSW GET LAST COMMAND ADDRESS+8 00295000
  299. LA 2,0(,2) 00296000
  300. HNDLDE2 LA R3,CONCCWS+16 @V2D4598 00297000
  301. CR 2,3 IS IT MY CCW STRING? 00298000
  302. BE CSWOK YES, GO ON 00299000
  303. CLC NUMPNDWR,=H'0' NO, ARE THERE ANY WRITES PENDING ? 00300000
  304. BE CLR15 NO, IGNORE THE 'DE' 00301000
  305. LTR 2,2 WAS THERE ANY COMMAND ADDRESS? 00302000
  306. BZ CSWOK NO, WE'LL HOPE IT'S OK 00303000
  307. BAL R14,CITERR1 00304000
  308. * 00305000
  309. CSWOK L 2,CURRIOOP GET ADDRESS OF LAST I/O WORK AREA 00306000
  310. TM 0(2),X'0A' WAS IT A READ OPERATION? 00307000
  311. BO READFIN YES, GO PROCESS IT 00308000
  312. * 00309000
  313. WRITFIN LA R3,LNLONGOP-LNNORMOP OFFSET TO NEXT WRITE (?) @V2D4598 00309600
  314. TM 0(R2),LONGOP WAS IT A LONG OPERATION? @V2D4598 00310200
  315. BO WRITFIN2 YES, CONTINUE @V2D4598 00310800
  316. IC R3,TONRMLEN(,R2) NO, GET SIZE OF DATA @V2D4598 00311400
  317. WRITFIN2 LA R3,LNNORMOP(R3,R2) R3 PTS TO NEXT WRITE IN STK @V2D4598 00312000
  318. C R3,PENDWRIT IS THERE ONE ? 00313000
  319. BNL STKEMPTY BRANCH IF HIGH OR EQUAL, IE., EMPTY NOW 00314000
  320. LH R8,NUMPNDWR GET NUMBER OF ENTRIES IN STACK 00315000
  321. LTR 8,8 CHECK ITS VALUE 00316000
  322. BNP STKEMPTY IF ZERO OR INVALID, FORCE EMPTY STACK 00317000
  323. LR 1,2 MORE ENTRIES TO COME, DELETE CURRENT FROM 00318000
  324. BAL 14,PACK THE STACK AND PACK REMAINING IN FRONT 00319000
  325. BCT 8,STKRESET REDUCE STACK ENTRY COUNT 00320000
  326. STKEMPTY LA R3,CONSTACK SET R3 TO START OF STACK BUFFER 00321000
  327. ST R3,PENDWRIT RESETSTACK POINTER 00322000
  328. SR 8,8 CLEAR COUNTER OF ENTRIES 00323000
  329. STKRESET STH R8,NUMPNDWR AND SET REMAINING ENTRY COUNT IN STACK 00324000
  330. LTR R8,R8 ANY PENDING WRITES 00325000
  331. BZ CLR15 NO, RETURN 00326000
  332. TRYWRT LA R1,CONSTACK YES, TRY STARTING FIRST IN STACK 00327000
  333. LA R15,DMSCITB 00328000
  334. BALR 14,15 00329000
  335. LTR 15,15 DID SIO GET STARTED? 00330000
  336. BZ EXIT YEP, GO AWAY 00331000
  337. CLI CSW+4,X'90' PENDING ATTENTION 00332000
  338. BE HNDLATTN YES 00333000
  339. BAL R14,CITERR1 00334000
  340. EJECT 00335000
  341. READFIN EQU * @VA05051 00335400
  342. NI MISFLAGS,255-ATTNHIT REMOVE ATTENTION BIT @VA05051 00335900
  343. TM 0(R2),FROMATTN WAS READ GENERATED BY 'ATTN'?@VA05051 00336400
  344. BZ NORMRD NO, BRANCH 00337000
  345. TM DBGFLAGS,DBGEXEC+DBGEXINT ARE WE IN DEBUG? @VA04109 00337400
  346. BO NORMRD YES--BRANCH @VA04109 00337800
  347. CLI 4(R2),X'0' IF NOT A TWO CHARACTER CMD @VA02167 00338200
  348. BNE NORMRD SKIP THE FANCY STUFF @VA02167 00338400
  349. LH R8,2(R2) GET A WORKABLE COPY @VA02167 00338600
  350. O R8,=CL4' ' CONVERT TO UPPER CASE @VA02167 00338800
  351. CH R8,=CL2'HT' HALT TYPING? @VA02167 00339000
  352. BE KILTYP @VA02167 00339200
  353. CH R8,=CL2'RT' RESUME TYPING? @VA02167 00339400
  354. BE ENBTYP @VA02167 00339600
  355. CH R8,=CL2'HX' HALT EXECUTION? @VA02167 00339800
  356. BE KILLX @VA02167 00340000
  357. CH R8,=CL2'HO' HALT OVERRIDE? @VA02167 00340200
  358. BE HLTOVR @VA02167 00340400
  359. CH R8,=CL2'SO' SUSPEND OVERRIDE? @VA02167 00340600
  360. BE SUSOVR @VA02167 00340800
  361. CH R8,=CL2'RO' RESUME OVERRIDE? @VA02167 00341000
  362. BE RESOVR BRANCH IF YES @VM01080 00341700
  363. CH R8,=CL2'HB' HALT BATCH ? @V2D2721 00342400
  364. BE HLTBAT @V2D2721 00343100
  365. NORMRD EQU * 00344000
  366. LH 3,NUMFINRD UPDATE FINISHED READ COUNT 00345000
  367. LA 3,1(,3) 00346000
  368. STH 3,NUMFINRD 00347000
  369. L R2,PENDREAD GET ADDRESS OF START OF READ WORK AREA 00348000
  370. XC PENDREAD,PENDREAD ZERO PENDING READ POINTER 00349000
  371. L 3,LSTFINRD ADD CURRENT FINISHED READ TO CHAIN 00350000
  372. LTR 3,3 00351000
  373. BZ FSTATTRD 00352000
  374. ST 2,0(,3) 00353000
  375. B SETLSTRD 00354000
  376. FSTATTRD ST 2,FSTFINRD IF FIRST FINISHED READ, SET IT 00355000
  377. SETLSTRD ST 2,LSTFINRD ALWAYS SET LAST FINISHED READ POINTER 00356000
  378. CKWRTSTK EQU * 00357000
  379. CLC NUMPNDWR,=H'0' ANY WRITES PENDING ? 00358000
  380. L R9,=V(CONSOLE) GET CONSOLE DEVICE ADDRESS 00359000
  381. LH R9,0(,R9) ... 00360000
  382. BNE TRYWRT YES, GO DO IT 00361000
  383. CLR15 SR 15,15 NO, TIME TO RETURN TO 'IOINT' 00362000
  384. EXIT LR 14,12 RESTORE RETURN REGISTER 00363000
  385. BR 14 00364000
  386. * 00365000
  387. ENBTYP NI MSGFLAGS,255-NOTYPING RESET NO TYPING FLAG 00370000
  388. B FRETX 00371000
  389. SPACE 00372000
  390. USING SVCSECT,R15 00373000
  391. HLTOVR EQU * 00374000
  392. L R15,ASVCSECT POINT TO SVCSECT 00375000
  393. OI OVSTAT,OVSHO TURN ON 'HALT OVERRIDES' FLAG 00376000
  394. NI OVSTAT,X'FF'-OVSSO TURN OFF 'SUSPEND' FLAG 00377000
  395. B FRETX GO RELEASE BUFFER 00378000
  396. SPACE 00379000
  397. SUSOVR EQU * 00380000
  398. L R15,ASVCSECT POINT TO SVCSECT 00381000
  399. OI OVSTAT,OVSSO TURN ON 'SUSPEND OVERRIDES' FLAG 00382000
  400. B FRETX GO RELEASE BUFFER 00383000
  401. SPACE 00384000
  402. RESOVR EQU * 00385000
  403. L R15,ASVCSECT POINT TO SVCSECT 00386000
  404. OI OVSTAT,OVSON TURN ON OVERRIDES 00387000
  405. NI OVSTAT,X'FF'-OVSSO TURN OFF 'SUSPEND OVERRIDES' FLG 00388000
  406. B FRETX GO RELEASE BUFFER 00389000
  407. DROP R15 00390000
  408. SPACE 00391000
  409. * 00392000
  410. KILLX EQU * 00393000
  411. L R15,AFVS POINT TO FVSECT @VA07100 00393100
  412. USING FVSECT,R15 FOR ADDRESSABILITY @VA07100 00393200
  413. CLI UFDBUSY,X'02' IS ABEND IN PROCESS ? @VA07100 00393300
  414. BE NORMRD GO BACK TO ABEND PROCESSING @VA07100 00393400
  415. CLC DATIPCMS(4),=F'0' IPL STORAGE SET? @VA14055 00393430
  416. BE NORMRD NO - SO SKIP THE MESS @VA14055 00393460
  417. OI TSOFLAGS,TSOATCNL INDICATE ATTN DURING READ @VA02650 00393500
  418. OI KXFLAG,KXWANT INDICATE KX HAS OCCURRED 00396000
  419. DROP R15 00397000
  420. B FRETX GO RELEASE THE 'ATTN' BUFFER 00398000
  421. * @V2D2721 00398250
  422. HLTBAT OI BATFLAG2,BATSTOP STOP BATCH AFTER CURRENT JOB@V2D2721 00398500
  423. B FRETX GO RELEASE THE LINE BUFFER @V2D2721 00398750
  424. * 00399000
  425. KILTYP OI MSGFLAGS,NOTYPING SET "KT" FLAG-BIT 00400000
  426. LA R9,CONSTACK 00401000
  427. SR 8,8 00402000
  428. DELETE C R9,PENDWRIT YES, ARE WE AT END OF ENTRIES? 00403000
  429. BNL ENDELETE YES, GO AWAY 00404000
  430. TM 0(9),X'80' IS ENTRY A PRIORITY TYPE? 00405000
  431. BO SKPDELET YES, DON'T DELETE IT FROM STACK 00406000
  432. LR 1,9 NO, GO OVERLAY THIS ENTRY WITH ALL ABOVE 00407000
  433. BAL 14,PACK 00408000
  434. B DELETE 00409000
  435. ENDELETE STH R8,NUMPNDWR RESET NUMBER OF WRITES IN STACK 00410000
  436. FRETX L R1,PENDREAD GET ADDRESS OF READ WORK AREA 00411000
  437. XC PENDREAD,PENDREAD ZERO PENDING READ POINTER 00412000
  438. LA 0,17 00413000
  439. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR 00414000
  440. B CKWRTSTK GO LOOK FOR SOME TYPING TO DO 00415000
  441. * 00416000
  442. SKPDELET SR 1,1 00417000
  443. IC 1,1(,9) GET LENGTH OF PRIORITY ENTRY 00418000
  444. LA 9,2(1,9) UPDATE R9 TO BYPASS IT 00419000
  445. LA 8,1(,8) 00420000
  446. B DELETE 00421000
  447. EJECT 00422000
  448. SETWAIT EQU * @VA05051 00422100
  449. OI MISFLAGS,ATTNHIT SET ATTENTION BIT @VA05051 00422200
  450. USING CMSTAXE,R1 @V1D1709 00422500
  451. HNDLATTN L R1,TAXEADDR GET EXIT QUEUE ADDR 00423000
  452. LTR R1,R1 DOES ONE EXIST 00424000
  453. BZ ATTNREAD NO, START AN ATTENTION READ 00425000
  454. NC PENDREAD(4),PENDREAD IS THERE A PENDING READ? @VA01844 00425200
  455. BZ TESTEXC IF SO, CANCEL IT @VA01844 00425400
  456. OI TSOFLAGS,TSOATCNL ... AND INDICATE SO @VA01844 00425600
  457. XC PENDREAD(4),PENDREAD ........... @VA01844 00425800
  458. TESTEXC EQU * @V1D1709 00426000
  459. TM TAXESTAT,TAXEFREQ HAS EXIT BEEN TAKEN @V1D1709 00426500
  460. BNO ACTIVE NO, IT WILL BE NEXT 00427000
  461. L R1,TAXELNK YES, LOOK AT NEXT @V1D1709 00428000
  462. LA R1,0(0,R1) CLEAR HI BYTE 00429000
  463. LTR R1,R1 IS THERE ANOTHER 00430000
  464. BNP ATTNREAD NO MORE EXITS, ISSUE READ 00431000
  465. B TESTEXC GO CHK THIS EXIT BLOCK 00432000
  466. ACTIVE L R14,AIOSECT ADR OF I/O SAVE AREA 00433000
  467. MVC TAIERSAV(64),0(R14) SAVE ATTN TIME REGS IN TAIE @V1D1709 00434000
  468. TM IOOPSW+1,WAIT WAS CMS WAITING? @VA05024 00434100
  469. BZ MVPSW BRANCH IF NOT @VA05024 00434200
  470. L R14,WAITSAVE+4 GET WAITD PLIST POINTER @VA05024 00434300
  471. LA R14,CON8(,R14) POINT TO SYMBOLIC NAMES @VA05024 00434400
  472. SR R15,R15 CLEAR A REGISTER @VA05024 00434500
  473. CHKSYM EQU * @VA05024 00434600
  474. CLC CONSOLE,0(R14) WAITING ON CONSOLE? @VA05024 00434700
  475. BE NIPSW BRANCH IF SO @VA05024 00434800
  476. LA R14,CON4(,R14) POINT TO NEXT NAME @VA05024 00434900
  477. C R15,0(,R14) IS THERE ONE? @VA05024 00435000
  478. BNE CHKSYM BRANCH IF YES @VA05024 00435100
  479. TM OSSFLAGS,OSWAIT SLEEPING ON OS ECB? @V305665 00435440
  480. BZ MVPSW BRANCH IF NOT @V305665 00435460
  481. NIPSW NI IOOPSW+1,255-WAIT WAKE UP SLEEPING PRINCESS @V2D4598 00435540
  482. MVPSW EQU * @V1D1709 00435600
  483. MVC TAXEIOL(4),IOOPSW SAVE LEFT HALF IO OLD PSW @V1D1709 00436000
  484. MVC TAIEIAD(4),IOOPSW+4 SAVE RIGHT HALH IO OLD PSW @V1D1709 00436400
  485. MVC TAXETSOF(1),TSOFLAGS SAVE CANCELLED READ @V1D1709 00436800
  486. NI TSOFLAGS,255-TSOATCNL RESET CANCEL READ FLAG P3108 00437000
  487. ST R12,TAXERTNA SAVE RETURN ADDR. @V1D1709 00438000
  488. LA R14,STAXRET SET RETURN LOCATION 00439000
  489. LA R13,TAXEEXTS SET UP SAVE AREA @V1D1709 00440000
  490. MVC TAXEIOWS(44),WAITSAVE SAVE DMSIOW REGS. @V1D1709 00441000
  491. XC NUMPNDWR(2),NUMPNDWR CLEAR WRITE STACK V0001 00441100
  492. LA R15,CONSTACK V0001 00441200
  493. ST R15,PENDWRIT V0001 00441300
  494. L R15,TAXEEXIT LOAD EXIT ADDR. @V1D1709 00442000
  495. OI TAXESTAT,TAXEFREQ INDICATE EXIT TAKEN @V1D1709 00442300
  496. DROP R1 @V1D1709 00442600
  497. USING CMSTAXE,R2 @V1D1709 00442900
  498. LR R2,R1 PUT ARRD TAXE INTO R2 @V1D1709 00443200
  499. LA R1,TAIEMSGL GET ADDR. OF TAIE @V1D1709 00443500
  500. ST R1,TAXETAIE PUT IT IN PARAMETER LIST @V1D1709 00443800
  501. LA R1,TAXETAIE SET R1 TO ATTN EXIT PARA LIST@V1D1709 00444100
  502. LPSW 0(R2) GO TO EXIT ROUTINE @V1D1709 00444400
  503. DROP R2 @V1D1709 00444700
  504. STAXRET BALR R13,0 REESTABLISH ADDR. 00445000
  505. USING *,R13 00446000
  506. L R13,BASELOC 00447000
  507. USING DMSCITA,R13 00448000
  508. SSM *+1 GO DISABLED 00449000
  509. L R1,TAXEADDR GET EXIT QUEUE 00450000
  510. USING CMSTAXE,R1 @V1D1709 00451000
  511. STAXRET2 EQU * @V1D1709 00451300
  512. L R2,TAXELNK POINTER TO NEXT TAXE @V1D1709 00451600
  513. LA R2,0(0,R2) CLEAR HI BYTE P3108 00452000
  514. LTR R2,R2 ANY MORE 00453000
  515. BZ STAXRET1 NO, R1 HAS RIGHT CMSTAXE 00454000
  516. TM 8(R2),TAXEFREQ WAS THIS EXIT TAKEN @V1D1709 00455000
  517. BNO STAXRET1 NO, MUST BE RET FROM PREVIOUS EXIT 00456000
  518. LR R1,R2 YES, LOOK AT NEXT EXIT 00457000
  519. B STAXRET2 00458000
  520. STAXRET1 EQU * @V1D1709 00459000
  521. NI TAXESTAT,255-TAXEFREQ RESET 'TAKEN' INDICATOR @V1D1709 00459500
  522. L R12,TAXERTNA RESTORE RETURN ADDR. @V1D1709 00460000
  523. NI MISFLAGS,255-ATTNHIT REMOVE ATTENTION BIT @VA05051 00460500
  524. L R6,AIOSECT ADDRESS OF IO SAVE AREA 00461000
  525. MVC 0(64,R6),TAIERSAV RESTORE REGS FROM ATTN RTN. @V1D1709 00462000
  526. MVC IOOPSW(4),TAXEIOL RESTORE LEFT HALF IO OLD PSW @V1D1709 00462500
  527. MVC IOOPSW+4(4),TAIEIAD RESTORE RT HALF IO OLD @V1D1709 00463000
  528. MVC WAITSAVE(44),TAXEIOWS RESTORE DMSIOW REGS. @V1D1709 00463500
  529. TM TAXETSOF,TSOATCNL WAS READ CANCELLED? @V1D1709 00464000
  530. BNO CLR15 @VA05885 00466100
  531. OI TSOFLAGS,TSOATCNL YES, SET FLAG P3108 00467000
  532. B CLR15 @VA05885 00469100
  533. DROP R1 @V1D1709 00469500
  534. ATTNREAD LA R0,17 17 DBL WORDS READ WORK AREA 00470000
  535. DMSFREE DWORDS=(0),TYPCALL=BALR 00471000
  536. MVI 0(1),0 ZERO OUT THE AREA 00472000
  537. MVC 1(135,1),0(1) 00473000
  538. ST R1,PENDREAD SAVE ADDRESS OF AREA 00474000
  539. MVI 4(1),X'4A' SET FLAG FOR ATTENTION READ 00475000
  540. MVI 5(1),130 SET DESIRED LENGTH TO 130 00476000
  541. LA 1,4(,1) SET R1 FOR 'STNEWCON' 00477000
  542. STRTCON1 LA R15,DMSCITB START CONSOLE 00481000
  543. BALR 14,15 00482000
  544. LTR 15,15 GOOD SIO? 00483000
  545. BNZ ATTNPEND NO, CHECK FOR ATTENTION PENDING @VA02650 00484300
  546. TM TSOFLAGS,TSOATCNL WAS READ TERMINATED BY ATTN? @VA02650 00484600
  547. BZ EXIT NO, GO AWAY @VA02650 00484900
  548. LA R15,5 INDICATE THAT READ TERM. BY ATTN @VA02650 00485200
  549. B EXIT GET OUT @VA02650 00485500
  550. ATTNPEND CLI CSW+4,X'90' ATTENTION PENDING? @VA02650 00485800
  551. BE STRTCON1 YES, IGNORE AT THIS TIME 00486000
  552. BAL R14,CITERR1 00487000
  553. EJECT 00488000
  554. USING DMSCITB,R15 00489000
  555. DMSCITB DS 0H @V2D4598 00489500
  556. SR R8,R8 @V2D4598 00490000
  557. MVN CONCCWS(1),0(R1) MOVE CCW OPCODE '1' OR 'A' @V2D4598 00490500
  558. LA R7,LNNORMOP(,R1) DATADDR (ASSUMING SHORT OP) @V2D4598 00491000
  559. IC R8,TONRMLEN(,R1) LENGTH (DITTO) @V2D4598 00491500
  560. TM 0(R1),LONGOP IS IT SHORT? @V2D4598 00492000
  561. BNO BUILD YES, CONTINUE @V2D4598 00492500
  562. ICM R7,B'0111',TOLNGADR(R1) NO, R7 GETS ADDRESS, @V2D4598 00493000
  563. ICM R8,B'0011',TOLNGLEN(R1) AND R8 GETS LENGTH @V2D4598 00493500
  564. BUILD STCM R7,B'0111',CONCCWS+1 STORE BUFFER ADDRESS @V2D4598 00494000
  565. STH R8,CONCCWS+6 AND LENGTH @V2D4598 00494500
  566. LA 8,CONCCWS GET ADDRESS OF CCW CHAIN 00495000
  567. TRYAGAIN ST 8,CAW SET CAW 00496000
  568. SIO 0(9) ISSUE SIO 00497000
  569. BC 7,CKCC START OK? 00498000
  570. ST R1,CURRIOOP YES, SAVE WORKAREA ADDRESS 00499000
  571. SR R7,R7 CLEAR R7 FOR RETURN CODE @VA04854 00499125
  572. RETURN TM 0(R1),X'01' WAS THIS A WRITE? @VA04854 00499250
  573. BNO RETURN1 NO; NOTHING TO FREE @VA04854 00499375
  574. TM 0(R1),LONGOP YES; WAS IT A "LONG" ONE? @VA04854 00499500
  575. BNO RETURN1 NO; NOTHING TO FREE @VA04854 00499625
  576. LH R8,TOLNGLEN(,R1) YES; GET LENGTH OF LINE, @VA04854 00499750
  577. ICM R1,B'0111',TOLNGADR(R1) AND ITS ADDRESS @VA04854 00499875
  578. LA R0,7(,R8) ROUND UP THE LENGTH, @VA04854 00500000
  579. SRL R0,3 AND EXPRESS IT IN DOUBLEWORDS @VA04854 00500125
  580. LR R8,R14 SAVE RETURN ADDRESS @VA04854 00500250
  581. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR @VA04854 00500375
  582. LR R14,R8 RESTORE RETURN ADDRESS @VA04854 00500500
  583. RETURN1 LR R15,R7 RESTORE RETURN CODE @VA04854 00500625
  584. BR R14 RETURN TO CALLER @VA04854 00500750
  585. * 00502000
  586. CKCC BC 3,CCERR BRANCH IF NOT CSW STORED 00503000
  587. CLI CSW+4,X'14' WAS IT NOT-READY TO READY PENDING 00504000
  588. BE TRYAGAIN YES, REISSUE START I/O 00505000
  589. LA R7,4 SET ERROR RETURN CODE @VA04854 00506000
  590. B RETURN1 @VA05913 00507100
  591. * 00508000
  592. CCERR BC 1,CC3 BAD ERROR, BREAKIT TO 2 OR 3 00509000
  593. TIO 0(9) UNIT BUSY, WAIT FOR END 00510000
  594. BC 7,CCERR 00511000
  595. B TRYAGAIN 00512000
  596. * 00513000
  597. CC3 EQU * @VA06123 00513500
  598. L R13,=A(DMSCITA) @VA06123 00514000
  599. DROP R15 @VA06123 00514500
  600. USING DMSCITA,R13 @VA06123 00515000
  601. BAL R14,CITERR1 TERMINATE @VA06123 00515500
  602. EJECT 00517000
  603. * ROUTINE TO PACK NEWER ENTRIES IN 'STKBUF' DOWN OVER 00518000
  604. * SPECIFIED ENTRY TO BE DELETED. ON ENTRY, R1 HAS 00519000
  605. * THE ADDRESS OF ENTRY TO BE OVERLAYED. 00520000
  606. * ROUTINE DOES NOT SAVE REGISTERS, AND USES THE FOLLOWING 00521000
  607. * REGISTERS: R4,R5,R6,R7. @V2D4598 00522000
  608. * @V2D4598 00523000
  609. PACK DS 0H @V2D4598 00524000
  610. LA R4,LNLONGOP ASSUME R1 PTS TO LONG WRITE @V2D4598 00525000
  611. TM 0(R1),LONGOP IS IT ONE? @V2D4598 00526000
  612. BO PACK2 -YES, NEXT OP AT R1+LNLONGOP @V2D4598 00527000
  613. IC R4,TONRMLEN(,R1) NO, NEXT WRITE AT R1 + ... @V2D4598 00528000
  614. LA R4,LNNORMOP(,R4) ...LNNORMOP+DATASIZE @V2D4598 00529000
  615. * @V2D4598 00530000
  616. PACK2 ALR R4,R1 R4 POINTS TO NEXT WRITE @V2D4598 00531000
  617. L R5,PENDWRIT R5 POINTS TO END OF STACK @V2D4598 00532000
  618. CR R4,R5 ARE THERE MORE? @V2D4598 00533000
  619. ST R1,PENDWRIT (ASSUME NOT) @V2D4598 00534000
  620. BNLR R14 EXIT IF NOTHING TO MOVE @V2D4598 00535000
  621. * @V2D4598 00536000
  622. SLR R5,R4 R5 IS LENGTH OF STACKED WRITES @V2D4598 00537000
  623. LR R7,R5 SO IS R7, FOR MVCL @V2D4598 00538000
  624. LR R6,R1 R6 IS SINK, R4 IS SOURCE @V2D4598 00539000
  625. MVCL R6,R4 PACK THE WRITE-STACK DOWN @V2D4598 00540000
  626. ST R6,PENDWRIT CORRECT END-OF-STACK PTR @V2D4598 00541000
  627. BR R14 AND EXIT @V2D4598 00542000
  628. EJECT 00548000
  629. USING *,13 00549000
  630. DMSCITDB EQU * @VA06123 00550000
  631. LR R13,R15 @VA06123 00550100
  632. LR 6,14 SAVE RETURN-ADDRESS 00551000
  633. LA R14,CONSTACK RESET WRITE-STACK POINTER 00552000
  634. ST R14,PENDWRIT ... 00553000
  635. SR 3,3 00554000
  636. STH R3,NUMPNDWR 00555000
  637. LH R4,NUMFINRD ANY READ BUFFERS TO RELEASE 00556000
  638. LTR 4,4 00557000
  639. BZ CKPENRD NO, MAYBE NOT 00558000
  640. L 5,FSTFINRD MAYBE YES 00559000
  641. CKFINRD LTR 1,5 00560000
  642. BZ CKPENRD NO ADDRESS, IGNORE CHAIN 00561000
  643. L R5,0(,R1) GET NEXT AREA ADDRESS 00562000
  644. TM 4(1),X'40' IS IT AN 'ATTN' BUFFER? 00563000
  645. BZ CKR4 NO, DON'T FREE IT 00564000
  646. LA 0,17 YES, FREE IT UP 00565000
  647. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR 00566000
  648. CKR4 BCT 4,CKFINRD LOOP IF MORE 00567000
  649. CKPENRD ST 3,FSTFINRD INSURE CONSTANTS ARE SET TO ZERO 00568000
  650. ST 3,LSTFINRD 00569000
  651. STH 3,NUMFINRD 00570000
  652. L R5,PENDREAD IS THERE A PENDING READ ? 00571000
  653. LTR 1,5 00572000
  654. BZ ENDES NO ADDRESS, SO IGNORE IT 00573000
  655. TM 4(1),X'40' IS IT AN ATTENTION READ? 00574000
  656. BZ ENDES NO, DON'T RELEASE IT 00575000
  657. LA 0,17 YES 00576000
  658. DMSFRET DWORDS=(0),LOC=(1),TYPCALL=BALR 00577000
  659. ENDES ST R3,PENDREAD INSURE ZERO CONSTANTS 00578000
  660. LR 14,6 RESTORE RETURN-ADDRESS 00579000
  661. SR 15,15 00580000
  662. BR 14 00581000
  663. DS 0D 00582000
  664. BASELOC DC A(DMSCITA) 00584000
  665. CONSOLE DC CL4'CON1' @VA06165 00584100
  666. CON4 EQU 4 @VA06165 00584110
  667. CON8 EQU 8 @VA06165 00584120
  668. SPACE 2 00585000
  669. LTORG 00586000
  670. SPACE 00587000
  671. NUCDSECT DSECT 00588000
  672. NCDEVAD DS H 00589000
  673. NCSTATS DS H 00590000
  674. NCWAITB EQU NCSTATS 00591000
  675. NCDEVTP EQU NCSTATS+1 00592000
  676. NCNAME DS CL4 00593000
  677. NCINTRTN DS A 00594000
  678. NUCNSIZE EQU *-NUCDSECT 00595000
  679. * @V2D4598 00595040
  680. * EQUATES TO DESCRIBE CONSOLE OP-STRINGS @V2D4598 00595080
  681. * @V2D4598 00595120
  682. LNNORMOP EQU 2 LENGTH OF A NORMAL CONSOP @V2D4598 00595160
  683. LNLONGOP EQU 6 '' '' LONG '' @V2D4598 00595200
  684. TONRMLEN EQU 1 OFFSET TO NORMAL LENGTH-BYTE @V2D4598 00595240
  685. TOLNGLEN EQU 4 '' '' LONG LENGTH-HLFWD @V2D4598 00595280
  686. TOLNGADR EQU 1 '' '' LONG BUFFADDR @V2D4598 00595320
  687. * @V2D4598 00595360
  688. * BITS IN THE HIGH HALF OF WRITE CONSOP OPCODE @V2D4598 00595400
  689. * @V2D4598 00595440
  690. PRTYWRIT EQU X'80' PRIORITY WRITE OPERATION @V2D4598 00595480
  691. * @V2D4598 00595520
  692. * BITS IN THE HIGH HALF OF A READ OPCODE @V2D4598 00595560
  693. * @V2D4598 00595600
  694. RDATTNZ EQU X'80' READ TERMINATED BY ATTENTION @V2D4598 00595640
  695. FROMATTN EQU X'40' READ IN RESPONSE TO ATTENTION @V2D4598 00595680
  696. NOATTN EQU X'20' READ TO NOT BE RETRIED IF @V2D4598 00595720
  697. * * ENDED BY ATTENTION @V2D4598 00595760
  698. * @V2D4598 00595800
  699. * BITS IN HIGH HALF OF EITHER OPCODE @V2D4598 00595840
  700. * @V2D4598 00595880
  701. LONGOP EQU X'10' OPERATION TO/FROM USER BUFFER @V2D4598 00595920
  702. * @V2D4598 00595960
  703. EJECT 00596000
  704. NUCON 00597000
  705. FVS 00598000
  706. TSOBLKS @V1D1709 00598500
  707. SVCSECT 00599000
  708. EQUATES 00600000
  709. REGEQU 00601000
  710. END 00602000