User Tools

Site Tools


ibm:vm370-lib:cp:dmkios.assemble_src

DMKIOS Source

References

Source Listing

DMKIOS.ASSEMBLE.txt
  1. IOS TITLE 'DMKIOS (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. MACRO 00003000
  4. &LABEL INCR &COUNT 00004000
  5. &LABEL LA R0,1 00005000
  6. AL R0,&COUNT 00006000
  7. ST R0,&COUNT 00007000
  8. MEND 00008000
  9. *********************************************************************** 00009000
  10. * * 00009100
  11. *MODULE NAME = DMKIOS * 00009200
  12. * * 00009300
  13. *DESCRIPTIVE NAME = DMKIOS (CP) I/O SCHEDULER * 00009400
  14. * * 00009500
  15. *COPYRIGHT = NONE * 00009600
  16. * * 00009700
  17. *STATUS = VM/370 - RELEASE 6, LEVEL 0 * 00009800
  18. * * 00009900
  19. *FUNCTION = TO SCHEDULE REQUESTS FOR VIRTUAL MACHINE AND CONTROL * 00010000
  20. * PROGRAM I/O OPERATIONS. * 00010100
  21. * * 00010200
  22. *NOTES = SEE BELOW * 00010300
  23. * * 00010400
  24. * DEPENDENCIES = NONE * 00010500
  25. * * 00010600
  26. * RESTRICTIONS = NONE * 00010700
  27. * * 00010800
  28. * REGISTER CONVENTIONS = R0 = PSA * 00010900
  29. * R1 = CPEXBLOK * 00011000
  30. * R2 = I/O RESTART INDEX (0, 4, 8 OR 12) * 00011100
  31. * R3 = INTERNAL SUBROUTINE LINKAGE (1ST LEVEL * 00011200
  32. * R4 = INTERNAL SUBROUTINE LINKAGE (3RD LEVEL * 00011300
  33. * R5 = INTERNAL SUBROUTINE LINKAGE (2ND LEVEL * 00011400
  34. * R6 = RCHBLOK BASE * 00011500
  35. * R7 = RCUBLOK BASE * 00011600
  36. * R8 = RDEVBLOK BASE * 00011700
  37. * R9 = DMKIOS 2ND BASE * 00011800
  38. * R10 = IOBLOK BASE * 00011900
  39. * R11 = VMBLOK BASE * 00012000
  40. * R12 = DMKIOS BASE * 00012100
  41. * R13 = SAVEAREA BASE FOR DMKIOSQR AND DMKIOSQV* 00012200
  42. * R14 = EXTERNAL SUBROUTINE LINKAGE * 00012300
  43. * R15 = EXTERNAL SUBROUTINE LINKAGE * 00012400
  44. * * 00012500
  45. * PATCH LABEL = N/A * 00012600
  46. * * 00012700
  47. *MODULE TYPE = CSECT * 00012800
  48. * * 00012900
  49. * PROCESSOR = ASSEMBLER XF * 00013000
  50. * * 00013100
  51. * MODULE SIZE = 8K BYTES (2 BASE REGISTERS DESIGN POINT) * 00013200
  52. * * 00013300
  53. * ATTRIBUTES = REENTRANT, RESIDENT. * 00013400
  54. * * 00013500
  55. *ENTRY POINT = DMKIOSQR * 00013600
  56. * * 00013700
  57. * PURPOSE = SCHEDULE A CP GENERATED I/O OPERATION * 00013800
  58. * * 00013900
  59. * LINKAGE = ENTERED VIA SVC CALL * 00014000
  60. * * 00014100
  61. *ENTRY POINT = DMKIOSQV * 00014200
  62. * * 00014300
  63. * PURPOSE = SCHEDULE A VIRTUAL MACHINE I/O OPERATION * 00014400
  64. * * 00014500
  65. * LINKAGE = ENTERED VIA SVC CALL * 00014600
  66. * * 00014700
  67. *ENTRY POINT = DMKIOSRW * 00014800
  68. * * 00014900
  69. * PURPOSE = PROCESS IOBLOK USED FOR REWIND * 00015000
  70. * * 00015100
  71. * LINKAGE = INTERRUPT RETURN ADDRESS FOR REWIND * 00015200
  72. * * 00015300
  73. *ENTRY POINT = DMKIOSHA * 00015400
  74. * * 00015500
  75. * PURPOSE = HALT AN ACTIVE DEVICE * 00015600
  76. * * 00015700
  77. * LINKAGE = ENTERED VIA SVC CALL * 00015800
  78. * * 00015900
  79. *ENTRY POINT = DMKIOSER * 00016000
  80. * * 00016100
  81. * PURPOSE = ERROR PROCESSING * 00016200
  82. * * 00016300
  83. * LINKAGE = CPEXBLOK RETURN ADDRESS DURING ERROR PROCESSING * 00016400
  84. * (FOR DISPATCHER TO COMPARE AGAINST) * 00016500
  85. * * 00016600
  86. *ENTRY POINT = DMKIOSRC * 00016700
  87. * * 00016800
  88. * PURPOSE = ERROR PROCESSING * 00016900
  89. * * 00017000
  90. * PURPOSE = CPEXBLOK RETURN ADDRESS DURING ERROR PROCESSING * 00017100
  91. * (FOR DISPATCHER TO COMPARE AGAINST) * 00017200
  92. * * 00017300
  93. *ENTRY POINT = DMKIOSRS * 00017400
  94. * * 00017500
  95. * PURPOSE = RESTART DEVICE * 00017600
  96. * * 00017700
  97. * LINKAGE = ENTERED VIA GOTO FROM DMKIOT * 00017800
  98. * * 00017900
  99. *ENTRY POINT = DMKIOSRU * 00018000
  100. * * 00018100
  101. * PURPOSE = RESTART CU-CH * 00018200
  102. * * 00018300
  103. * LINKAGE = ENTERED VIA GOTO FROM DMKIOT * 00018400
  104. * * 00018500
  105. *ENTRY POINT = DMKIOSRH * 00018600
  106. * * 00018700
  107. * PURPOSE = RESTART CH * 00018800
  108. * * 00018900
  109. * LINKAGE = ENTERED VIA GOTO FROM DMKIOT * 00019000
  110. * * 00019100
  111. *ENTRY POINT = DMKIOSRY * 00019200
  112. * * 00019300
  113. * PURPOSE = PERFORM ERROR RECOVERY * 00019400
  114. * * 00019500
  115. * LINKAGE = ENTERED VIA GOTO FROM DMKIOT * 00019600
  116. * * 00019700
  117. *ENTRY POINT = DMKIOSRQ * 00019800
  118. * * 00019900
  119. * PURPOSE = REQUEUE REQUEST * 00020000
  120. * * 00020100
  121. * LINKAGE = ENTERED VIA GOTO FROM DMKIOT * 00020200
  122. * * 00020300
  123. *ENTRY POINT = DMKIOSST * 00020400
  124. * * 00020500
  125. * PURPOSE = ISSUE SIO * 00020600
  126. * * 00020700
  127. * LINKAGE = ENTERED VIA GOTO FROM DMKIOT * 00020800
  128. * * 00020900
  129. *ENTRY POINT = DMKIOSSV * 00021000
  130. * * 00021100
  131. * PURPOSE = ADDRESS OF CHANNEL AND CONTROL UNIT UPON ENTRY * 00021200
  132. * * 00021300
  133. * LINKAGE = USED BY DMKIOT FOR ADDRESSES SAVE AREA * 00021400
  134. * * 00021500
  135. *INPUT = * 00021600
  136. * DMKIOSQR * 00021700
  137. * R8 = ADDRESS OF RDEVBLOK FOR UNIT TO START * 00021800
  138. * R10 = ADDRESS OF IOBLOK CONTAINING TASK INFORMATION * 00021900
  139. * R12 = BASE FOR DMKIOSQR * 00022000
  140. * R13 = ADDRESS OF STANDARD SAVEAREA * 00022100
  141. * DMKIOSQV * 00022200
  142. * R8 = ADDRESS OF VDEVBLOK FOR VIRTUAL DEVICE TO START * 00022300
  143. * R10 = ADDRESS OF IOBLOK CONTAINING TASK INFORMATION * 00022400
  144. * R12 = BASE FOR DMKIOSQV * 00022500
  145. * R13 = ADDRESS OF STANDARD SAVEAREA * 00022600
  146. * DMKIOSHA * 00022700
  147. * R8 = ADDRESS OF RDEVBLOK FOR UNIT TO HALT * 00022800
  148. * R10 = ADDRESS OF IOBLOK CONTAINING TASK INFORMATION * 00022900
  149. * R12 = BASE FOR DMKIOSHA * 00023000
  150. * R13 = ADDRESS OF STANDARD SAVEAREA * 00023100
  151. * DMKIOSRW * 00023200
  152. * R10 = ADDRESS OF IOBLOK CONTAINING TASK INFORMATION * 00023300
  153. * R12 = BASE FOR DMKIOSRW * 00023400
  154. * DMKIOSER * 00023500
  155. * R10 = ADDRESS OF IOBLOK CONTAINING TASK INFORMATION * 00023600
  156. * R12 = BASE FOR DMKIOSER * 00023700
  157. * DMKIOSRC * 00023800
  158. * R10 = ADDRESS OF IOBLOK CONTAINING TASK INFORMATION * 00023900
  159. * R12 = BASE FOR DMKIOSRC * 00024000
  160. * DMKIOSRH * 00024100
  161. * R12 = BASE FOR DMKIOSRH * 00024200
  162. * DMKIOSRQ * 00024300
  163. * R12 = BASE FOR DMKIOSRQ * 00024400
  164. * DMKIOSRS * 00024500
  165. * R12 = BASE FOR DMKIOSRS * 00024600
  166. * DMKIOSRU * 00024700
  167. * R12 = BASE FOR DMKIOSRU * 00024800
  168. * DMKIOSRY * 00024900
  169. * R12 = BASE FOR DMKIOSRY * 00025000
  170. * DMKIOSST * 00025100
  171. * R12 = BASE FOR DMKIOSST * 00025200
  172. * DMKIOSSV * 00025300
  173. * NONE * 00025400
  174. *OUTPUT = * 00025500
  175. * DMKIOSQR * 00025600
  176. * NONE * 00025700
  177. * DMKIOSQV * 00025800
  178. * NONE * 00025900
  179. * DMKIOSHA * 00026000
  180. * NONE * 00026100
  181. * DMKIOSRW * 00026200
  182. * NONE * 00026300
  183. * DMKIOSRH * 00026400
  184. * NONE * 00026500
  185. * DMKIOSRQ * 00026600
  186. * NONE * 00026700
  187. * DMKIOSRS * 00026800
  188. * NONE * 00026900
  189. * DMKIOSRU * 00027000
  190. * NONE * 00027100
  191. * DMKIOSRY * 00027200
  192. * NONE * 00027300
  193. * DMKIOSST * 00027400
  194. * NONE * 00027500
  195. *EXIT-NORMAL = * 00027600
  196. * DMKIOSQR * 00027700
  197. * RETURN TO CALLER VIA EXIT SVC * 00027800
  198. * DMKIOSQV * 00027900
  199. * RETURN TO CALLER VIA EXIT SVC * 00028000
  200. * DMKIOSHA * 00028100
  201. * RETURN TO CALLER VIA EXIT SVC * 00028200
  202. * DMKIOSER * 00028300
  203. * RETURN TO CALLER VIA EXIT SVC IF ENTRY WAS VIA CALL; * 00028400
  204. * ELSE TO DISPATCHER (DMKDSPCH OR DMKDSPA) VIA GOTO * 00028500
  205. * DMKIOSRW * 00028600
  206. * DMKDSPCH VIA GOTO * 00028700
  207. * DMKIOSRC * 00028800
  208. * DMKDSPCH VIA GOTO * 00028900
  209. * DMKIOSRH * 00029000
  210. * DMKDSPCH VIA GOTO * 00029100
  211. * DMKIOSRQ * 00029200
  212. * DMKDSPCH VIA GOTO * 00029300
  213. * DMKIOSRS * 00029400
  214. * DMKDSPCH VIA GOTO * 00029500
  215. * DMKIOSRU * 00029600
  216. * DMKDSPCH VIA GOTO * 00029700
  217. * DMKIOSRY * 00029800
  218. * DMKDSPCH VIA GOTO * 00029900
  219. * DMKIOSST * 00030000
  220. * DMKDSPCH VIA GOTO * 00030100
  221. *EXIT-ERROR = * 00030200
  222. * DMKIOSQR * 00030300
  223. * NONE * 00030400
  224. * DMKIOSQV * 00030500
  225. * NONE * 00030600
  226. * DMKIOSHA * 00030700
  227. * ABEND 1 * 00030800
  228. * ABEND 4 * 00030900
  229. * DMKIOSER * 00031000
  230. * ABEND 2 * 00031100
  231. * DMKIOSRW * 00031200
  232. * NONE * 00031300
  233. * DMKIOSRC * 00031400
  234. * NONE * 00031500
  235. * DMKIOSRH * 00031600
  236. * NONE * 00031700
  237. * DMKIOSRQ * 00031800
  238. * NONE * 00031900
  239. * DMKIOSRS * 00032000
  240. * NONE * 00032100
  241. * DMKIOSRU * 00032200
  242. * NONE * 00032300
  243. * DMKIOSRY * 00032400
  244. * NONE * 00032500
  245. * DMKIOSST * 00032600
  246. * NONE * 00032700
  247. * * 00032800
  248. *EXTERNAL REFERENCES = SEE BELOW * 00032900
  249. * * 00033000
  250. * ROUTINES = DMKSTKIO - TO STACK FOR 2ND LEVEL PROCESSING IOBLOKS FOR* 00033100
  251. * COMPLETED OPERATIONS. * 00033200
  252. * DMKSTKLP - TO STACK A PRIORITY CPEXBLOK * 00033300
  253. * DMKSTKMP - TO STACK A REQUEST ON MAIN (I/O) PROCESSOR * 00033400
  254. * DMKSCNRU - TO LOCATE RCHBLOK, RCUBLOK, AND RDEVBLOK FOR * 00033500
  255. * THE UNIT CAUSING THE INTERRUPT * 00033600
  256. * DMKIOERR - TO RECORD I/O ERRORS * 00033700
  257. * DMKCCHIS - TO HANDLE CHANNEL ERRORS DETECTED VIA STATUS * 00033800
  258. * STORED ON CC 1 AFTER A SIO * 00033900
  259. * DMKDASER - TO RETRY FAILING DASD OPERATIONS * 00034000
  260. * DMKRSPER - TO RETRY FAILING UNIT RECORD OPERATIONS * 00034100
  261. * DMKTAPER - TO RETRY FAILING TAPE OPERATIONS * 00034200
  262. * DMKBSCER - TO RETRY BISYNC OPERATIONS * 00034300
  263. * DMKTRDSI - TO TRACE VIRTUAL MACHINE START I/O INSTRUCTION 00034400
  264. * DMKFREE - TO OBTAIN FREE STORAGE FOR AN IOBLOK * 00034500
  265. * DMKFRET - TO RETURN IOBLOKS TO FREE STORAGE * 00034600
  266. * DMKSCHDL - TO ALTER A VIRTUAL MACHINE'S DISPATCH STATUS * 00034700
  267. * DMKENTSK - MONITOR SEEKS LIST * 00034800
  268. * DATA AREAS = DMKSYSVM - SYSTEM VMBLOK * 00034900
  269. * PSA - PREFIX STORAGE AREA * 00035000
  270. * IOERBLOK - I/O ERROR INFORMATION BLOCK * 00035100
  271. * IOBLOK - I/O TACK CONTROL BLOCK * 00035200
  272. * CPEXBLOK - * 00035300
  273. * RCHBLOK - REAL CHANNEL BLOCK * 00035400
  274. * RCUBLOK - REAL CONTROL UNIT BLOCK * 00035500
  275. * RDEVBLOK - REAL DEVICE BLOCK * 00035600
  276. * VMBLOK - VIRTUAL MACHINE CONTROL BLOCK * 00035700
  277. * SAVEAREA - SAVE AREA SVC CALL * 00035800
  278. * * 00035900
  279. * CONTROL BLOCKS = * 00036000
  280. * DMKRIOCU - START OF REAL CONTROL UNIT BLOCK LIST * 00036100
  281. * DMKRIOCT - LOOP DELIMITING ADDRESS * 00036200
  282. * * 00036300
  283. *TABLES = NONE * 00036400
  284. * * 00036500
  285. *MACROS = PSA * 00036600
  286. * * 00036700
  287. *CHANGE ACTIVITY = AS FOLLOWS: * 00036800
  288. * CHANGE 01 02/16/79 SPLIT OF MODULE DMKIOS - DMKIOS PORTION * 00036900
  289. * * 00037000
  290. *********************************************************************** 00037100
  291. EJECT 00126000
  292. COPY OPTIONS 00127000
  293. COPY LOCAL OPTIONS 00128000
  294. SPACE 2 00129000
  295. DMKIOS CSECT 00130000
  296. ENTRY DMKIOSQR,DMKIOSQV,DMKIOSHA @VA09587 00131000
  297. ENTRY DMKIOSER,DMKIOSRC @VA02760 00132000
  298. ENTRY DMKIOSRS,DMKIOSSV @VA09587 00132100
  299. ENTRY DMKIOSRH,DMKIOSRQ,DMKIOSRU,DMKIOSRY,DMKIOSST @VA09587 00132200
  300. ENTRY DMKIOSMQ QUEUE OF MINI IOB'S @V407438 00133000
  301. ENTRY DMKIOSNM NO. OF TIMES WERE OUT OF MINI'S @V407438 00134000
  302. SPACE 00135000
  303. EXTRN DMKSCHDL,DMKSTKIO,DMKSCNRU @VA09587 00136000
  304. EXTRN DMKCCHIS,DMKIOERR,DMKDASER,DMKTAPER,DMKRSPER @VA09587 00137000
  305. EXTRN DMKBSCER @VA09587 00139000
  306. EXTRN DMKENTSK @V60BEBC 00142000
  307. EXTRN HDKD7CIO HRC065DK 00142100
  308. EXTRN DMKRIOCT,DMKRIOCU @VA08355 00143000
  309. AIF (NOT &AP).DSPRU6 00144000
  310. EXTRN DMKDSPRU,DMKLOKSY @V4M0173 00145000
  311. .DSPRU6 ANOP 00146000
  312. EXTRN DMKSTKMP,DMKDSPA @V4M0173 00147000
  313. EXTRN DMKSTKLF @V4M0154 00148000
  314. SPACE 00150000
  315. AIF (NOT &TRACE(6)).IOSNDX 00151000
  316. EXTRN DMKTRDSI @V4M0240 00152000
  317. .IOSNDX ANOP (END OF EXTRN'S) 00153000
  318. SPACE 00154000
  319. USING PSA,R0 00155000
  320. USING CPEXBLOK,R1 00156000
  321. USING RCHBLOK,R6 00157000
  322. USING RCUBLOK,R7 00158000
  323. USING RDEVBLOK,R8 00159000
  324. USING IOBLOK,R10 00160000
  325. USING VMBLOK,R11 00161000
  326. USING SAVEAREA,R13 00162000
  327. SPACE 00163000
  328. USING DMKIOS,R12,R9 @VA04182 00164000
  329. EJECT 00165000
  330. *. 00166000
  331. * 00167000
  332. * A. OPERATION OF DMKIOSQR - 00168000
  333. * 0. FOR AP SUPPORT -- SWITCH TO I/O PROC. @V407593 00169000
  334. * 1. FLAG IOBLOK AS CP GENERATED I/O 00170000
  335. * 2. JOIN COMMON CODE AT IOSQCOM (C, BELOW) 00171000
  336. * 00172000
  337. *. 00173000
  338. SPACE 00174000
  339. DMKIOSQR ENTER 00175000
  340. L R9,IOSBASE2 SET SECOND BASE @VA04182 00176000
  341. SWITCH ENSURE EXECUTION ON I/O-PROC. @V407593 00177000
  342. OI IOBFLAG,IOBCP FLAG AS CP GENERATED I/O 00178000
  343. USING RDEVBLOK,R8 00181000
  344. B IOSQCOM CONTINUE 00182000
  345. SPACE 2 00183000
  346. *. 00184000
  347. * 00185000
  348. * B. OPERATION OF DMKIOSQV - 00186000
  349. * 0. FOR AP SUPPORT -- SWITCH TO I/O PROC. @V407593 00187000
  350. * 1. SAVE ADDRESS OF USER'S VMBLOK IN IOBUSER 00188000
  351. * 2. BUMP COUNT SIO'S IN VDEVBLOK 00189000
  352. * 3. JOIN COMMON CODE AT IOSQCOM (C, BELOW) 00190000
  353. * 00191000
  354. *. 00192000
  355. SPACE 00193000
  356. USING *,R12 00194000
  357. DMKIOSQV ENTER 00195000
  358. L R12,IOSBASE1 RESET THE BASE REGISTER TO DMKIOS@VA04182 00196000
  359. USING DMKIOS,R12 00197000
  360. L R9,IOSBASE2 SET SECOND BASE @VA04182 00198000
  361. USING DMKIOS,R12,R9 @VA04182 00199000
  362. SWITCH ENSURE EXECUTION ON I/O-PROC. @V407593 00200000
  363. ST R11,IOBUSER SAVE VMBLOK ADDRESS 00201000
  364. NI IOBFLAG,X'FF'-IOBCP TURN OFF CP GENERATED I/O FLAG 00202000
  365. TM IOBSPEC,IOBTIO+IOBHIO IS THIS A START I/O REQUEST ? 00203000
  366. BZ IOSQVREL YES -- ADD ONE TO SIO COUNTS 00204000
  367. USING VDEVBLOK,R8 00205000
  368. L R8,VDEVREAL POINT TO REAL DEVICE BLOCK 00206000
  369. B IOSQCOM GO SCHEDULE THE INSTRUCTION 00207000
  370. IOSQVREL EQU * INCREMENT START I/O COUNTS 00208000
  371. LA R1,1(0,0) 00209000
  372. AL R1,VDEVIOCT ADD ONE TO VIRTUAL SIO COUNT 00210000
  373. ST R1,VDEVIOCT 00211000
  374. L R8,VDEVREAL GET REAL DEVICE RDEVBLOK ADDRESS 00212000
  375. USING RDEVBLOK,R8 00213000
  376. SPACE 2 00214000
  377. EJECT 00215000
  378. *. 00216000
  379. * 00217000
  380. * C. OPERATION OF IOSQCOM - 00218000
  381. * 1. MARK IOBLOK AS NOT QUEUED, AND LINK IT TO ITSELF 00219000
  382. * 2. BUMP COUNT OF SIO'S IN RDEVBLOK 00220000
  383. * 3. IF THE DEVICE IS BUSY OR SCHEDULED, QUEUE THE IOBLOK FROM 00221000
  384. * THE DEVICE AND EXIT TO THE CALLER; OTHERWISE, 00222000
  385. * 4. CALL THE FIRST LEVEL SUBROUTINE IOSTRTDV TO SCHEDULE THE 00223000
  386. * OPERATION, AND EXIT TO THE CALLER 00224000
  387. * 00225000
  388. *. 00226000
  389. SPACE 00227000
  390. USING RDEVBLOK,R8 00228000
  391. IOSQCOM DS 0H 00229000
  392. ST R10,IOBLINK FORCE IOBLOK TO LINK TO ITSELF 00230000
  393. * IOBLOK POINTS TO ITSELF (= ORIGINAL COPY) 00231000
  394. SLR R1,R1 ZERO GPR-1 00232000
  395. ST R1,IOBIOER MAKE SURE THERE'S NO IOERBLOK PTR. 00233000
  396. NI IOBSPEC,255-IOBUNSL CLEAR UNSOL. INT. FLAG @VA05636 00234000
  397. TM RDEVADD,RDEVLDEV Is this a logical dev? HRC065DK 00234040
  398. BO LDEVIO Yes HRC065DK 00234050
  399. * BUMP COUNT FOR REQUESTS OF SIO'S 00234100
  400. TM IOBSPEC,IOBTIO+IOBHIO IS THIS A SIO? @VA11946 00234200
  401. BNZ NOCNT IF NOT - DON'T COUNT @VA11946 00234300
  402. LA R1,1 BUMP COUNT @VA11946 00234400
  403. AL R1,RDEVIOCT UPDATE THE SIO COUNT @VA11946 00234500
  404. ST R1,RDEVIOCT SAVE NEW COUNT @VA11946 00234600
  405. NOCNT EQU * @VA11946 00234700
  406. SPACE 00235000
  407. CLC RDEVTYPC(2),=AL1(CLASSPEC,TYPCTCA) CTCA DEVICE? @VA08043 00236000
  408. BNE IOSSCHZ NO, DON'T ALLOW HANG UP @VA08043 00237000
  409. TM IOBSPEC,IOBTIO+IOBHIO FOR TIO OR HIO? @VA08043 00238000
  410. BNZ IOSSCHX YES, DON'T WAIT @VA08043 00239000
  411. IOSSCHZ EQU * @VA08043 00240000
  412. IOSCHED TM RDEVSTAT,RDEVSCED+RDEVBUSY IS DEVICE AVAILABLE ? 00241000
  413. BNZ IOSQUED QUEUE IOBLOK @VA12963 00242100
  414. IOSSCHX EQU * @VA08043 00243000
  415. BAL R3,IOSTRTDV START THE I/O TO THIS DEVICE @VA04182 00244000
  416. B IOSQXIT RETURN TO CALLER 00245000
  417. LDEVIO EQU * HRC065DK 00245100
  418. MVC IOBRADD,RDEVADD Ensure LDEV addr in blokHRC069DK 00245150
  419. CALL HDKD7CIO Go analyze LDEV CCW str HRC065DK 00245200
  420. B IOSQXIT Return to caller HRC065DK 00245300
  421. SPACE 00246000
  422. IOSQUED BAL R4,IOSQDEV QUEUE THE IOBLOK OFF THE RDEVBLOK 00247000
  423. IOSQXIT EXIT RETURN TO CALLER 00248000
  424. SPACE 1 00248100
  425. EJECT 00249000
  426. *. 00250000
  427. * 00251000
  428. * OPERATION OF DMKIOSHA 00252000
  429. * 0. FOR AP SUPPORT -- SWITCH TO I/O PROC. @V407593 00253000
  430. * 1. IF IOB IS ACTIVE MARK THE RDEVBLOK TO BE RESET, ELSE 00254000
  431. * GOTO STEP 6. 00255000
  432. * 2. TURN RDEVHIO BIT ON IN THE ACTIVE IOB. 00256000
  433. * 3. IF 370 TYPE CHANNEL GO TO IOSTART TO HALT THE DEVICE. 00257000
  434. * 4. IF 360 TYPE CHANNEL AND THE CHANNEL IS BUSY WITH THE 00258000
  435. * DEVICE GO TO IOSTART TO HALT THE DEVICE, ELSE 00259000
  436. * RESCHEDULE THE IOB TO HALT THE DEVICE WHEN THE CHANNEL 00260000
  437. * OR CONTROL UNIT IS FREE OF ANY BURST OPERATION. 00261000
  438. * 5. RETURN TO CALLER. 00262000
  439. * 6. SEARCH DEVICE, CONTROL UNIT AND CHANNEL QUEUES FOR IOB. 00263000
  440. * 7. IF FOUND DEQUEUE AND STACK. 00264000
  441. * 8. RETURN TO CALLER. 00265000
  442. * 00266000
  443. *. 00267000
  444. SPACE 1 00268000
  445. USING *,R12 @VA04182 00269000
  446. DMKIOSHA ENTER ENTRY TO HALT AN ACTIVE DEVICE *00270000
  447. OR STACK A QUEUED IOBLOK. 00271000
  448. L R12,IOSBASE1 RESET THE BASE REGISTER TO DMKIOS@VA04182 00272000
  449. USING DMKIOS,R12 @VA04182 00273000
  450. L R9,IOSBASE2 SET SECOND BASE REG @VA04182 00274000
  451. USING DMKIOS,R12,R9 @VA04182 00275000
  452. TM IOBRADD,RDEVLDEV Is this an LDEV? HRC078DK 00275300
  453. BO IOSQXIT Avoid real halt i/o HRC078DK 00275500
  454. SWITCH ENSURE EXECUTION ON I/O-PROC. @V407593 00276000
  455. TM IOBSTAT,IOBMINI IS THIS A MINI IOB? @V407438 00277000
  456. BZ IOS4OK NOPE, OK THIS TIME @V407438 00278000
  457. ABEND 4 MUST CALL IOS WITH A REAL IOB @V407438 00279000
  458. IOS4OK EQU * CONTINUE @V407438 00280000
  459. CL R10,RDEVAIOB ACTIVE ON THE DEVICE ? @VA04182 00281000
  460. BNE SCANQS NO- SCAN ALL QUEUES FOR THE IOB @VA04182 00282000
  461. LH R1,IOBRADD POINT TO THE REAL DEVICE ADDRESS @VA05537 00283000
  462. CALL DMKSCNRU FIND THE CH-CU BLOK USING THE @VA05537 00284000
  463. * SAME PATH 00285000
  464. BZ IOS1OK ALL SET @VA05537 00286000
  465. ABEND 1 WHOOPS LOOKS LIKE A BAD IOB @VA05537 00287000
  466. * (FRET'ED ? ) 00288000
  467. IOS1OK ST R6,PTHSAVE SAVE RCHBLOK AND RCUBLOK @VA07225 00289000
  468. ST R7,PTHSAVE+4 FOR LATER USE @VA07225 00290000
  469. CL R10,RDEVAIOB IS R8 STILL POINTING TO THE @VA07225 00291000
  470. * SAME RDEVBLOK 00292000
  471. BNE IOS1 NO, BR. BAD IOB OR BAD CALLNG SEQ@V407438 00293000
  472. TM IOBFLAG,IOBERP IS ERP IN CONTROL? @VA05537 00294000
  473. BO HALTERP YES, SPECIAL HANDLING @VA05537 00295000
  474. TM IOBSPEC,IOBHIO+IOBTIO IS THIS A HALT OR TEST I/O@VA04182 00296000
  475. BNZ SKIPREST YES- DO NOT RESET JUST RESTART @VA04182 00297000
  476. * THE IOB 00298000
  477. OI IOBSPEC,IOBHIO RESET IOBLOK FOR HALT I/O @VA04182 00299000
  478. OI RDEVSTA2,RDEVRACT MARK THE DEVICE RESET @VA04182 00300000
  479. SKIPREST EQU * @VA05537 00301000
  480. TM RCHTYPE,RCH370 370 CHANNEL @VA04182 00302000
  481. BO IOSTART YES- GO LET THE CHANNEL DO THE @VA04182 00303000
  482. * WORK 00304000
  483. TM RDEVSTA2,RDEVBUCH IS THE DEVICE BUSY WITH THE @VA04182 00305000
  484. * CHAN 00306000
  485. BO IOSTART YES, THEN GO STOP IT NOW. @V407438 00307000
  486. LA R0,CLASSPEC*256+TYPCTCA SETUP FOR CTCA TEST @VA04182 00308000
  487. CH R0,RDEVTYPC TEST FOR CTCA @VA04182 00309000
  488. BE TSTCHBSY YES...SEE IF CHANNEL BUSY @VA04182 00310000
  489. TM RCUSTAT,RCUBUSY CONTROL UNIT BUSY? @VA04182 00311000
  490. BO IOSCBUSY YES- QUEUE THE DEVICE FIRST ON @VA04182 00312000
  491. * THE CU 00313000
  492. TSTCHBSY EQU * @VA04182 00314000
  493. TM RCHSTAT,RCHBUSY CHANNEL BUSY @VA04182 00315000
  494. BO IOSQBSY YES- QUEUE THE DEVICE FIRST ON @VA04182 00316000
  495. * THE CH 00317000
  496. B IOSTART NO BURST DEVICE WORKING, HALT @VA04182 00318000
  497. * THE DEVICE 00319000
  498. HALTERP TM RDEVSTAT,RDEVNRDY IS THE DEVICE NOT READY @VA05537 00320000
  499. BZ IOSQXIT IF READY, WAIT FOR ERP TO FINISH @VA07225 00321000
  500. LR R0,R6 RCHBLOK ADDR TO R0 @VA07225 00322000
  501. LR R1,R7 RCUBLOK ADDR TO R1 @VA07225 00323000
  502. B CALLERP IF NOT READY, QUIT @VA07225 00324000
  503. SPACE 00325000
  504. SCANQS EQU * SCAN DEV, CU AND CH QUEQES FOR @VA04182 00326000
  505. * IOB 00327000
  506. LR R2,R8 SET SCAN POINTER TO DEVICE BLOCK @VA04182 00328000
  507. BAL R5,DEQUEUE SCAN FOR IOB, IF FOUND DEQUEUE @VA04182 00329000
  508. BNZ CUA IF NOT FOUND BRANCH @VA04182 00330000
  509. IC R1,RDEVQCNT REDUCE QUEUE COUNT BY 1 @VA04182 00331000
  510. BCTR R1,0 ... @VA04182 00332000
  511. STC R1,RDEVQCNT ... @VA04182 00333000
  512. CL R8,RDEVFIOB @VA08180 00334000
  513. BNE STACKIOB YES- BRANCH @VA04182 00335000
  514. NI RDEVSTAT,255-RDEVSCED REMOVE SCHEDULED BIT @VA04182 00336000
  515. * NOTE: DO NOT REMOVE ANY BUSY BITS EVEN IF THERE IS NO ACTIVE 00337000
  516. * IOB. ANY INT. MUST RESTART THE DEVICE, CONTROL UNIT OR 00338000
  517. * CHANNEL BECAUSE THE INTERRUPT IS NOT UNSOLICITED. 00339000
  518. SPACE 1 00340000
  519. STACKIOB CALL DMKSTKIO STACK THE IOB @VA04182 00341000
  520. B IOSQXIT GO HOME @VA04182 00342000
  521. SPACE 1 00343000
  522. CUA L R7,RDEVCUA POINT TO THE PRIMARY CU @VA04182 00344000
  523. TM RCUTYPE,RCUSUB IS THIS A SUBORD CONTROL UNIT? @VA04182 00345000
  524. BZ SETPTR NO, BR. @V407438 00346000
  525. L R7,RCUPRIME POINT TO PRIMARY CONTROL UNIT @VA04182 00347000
  526. SETPTR LR R2,R7 SET SCAN POINTER TO CU BLOCK @VA04182 00348000
  527. BAL R3,CULOOP SCAN THE CU AND CH PATH @VA04182 00349000
  528. L R7,RDEVCUB GET ALTERNATE CONTROL UNIT @V407438 00350000
  529. LTR R7,R7 IS THERE ONE? @V407438 00351000
  530. BZ IOSQXIT NOPE, IOB NOT FOUND, MUST HAVE @V407438 00352000
  531. * BEEN STACKED BEFORE WE GOT HERE 00353000
  532. TM RCUTYPE,RCUSUB IS THIS CU A SUBORDINATE? @V407438 00354000
  533. BZ *+8 NOPE, ALL SET @V407438 00355000
  534. L R7,RCUPRIME ADDRESS OF THE PRIME CU BLOK @V407438 00356000
  535. LR R2,R7 SET SCAN POINTER TO CU BLOK @V407438 00357000
  536. BAL R3,CULOOP TRY TO FIND THE IOB ON THIS CU/CH@V407438 00358000
  537. B IOSQXIT NOPE, IOB NOT FOUND, MUST HAVE @V407438 00359000
  538. * BEEN STACKED BEFORE WE GOT HERE 00360000
  539. SPACE 1 00361000
  540. CULOOP BAL R5,DEQUEUE SCAN FOR IOB, IF FOUND DEQUEUE @VA04182 00362000
  541. BNZ CHA IF NOT FOUND BRANCH @VA04182 00363000
  542. LH R1,RCUQCNT REDUCE THE COUNT BY 1 @VA04182 00364000
  543. BCTR R1,0 ... @VA04182 00365000
  544. STH R1,RCUQCNT ... @VA04182 00366000
  545. TSTCUQ CL R7,RCUFIOB ANY IOB'S QUEUED ON CONTROL UNIT @VA04182 00367000
  546. BNE STARTDEV @VA08180 00368000
  547. NI RCUSTAT,255-RCUSCED NO- RESET THE SCHEDULED BIT @VA04182 00369000
  548. B STARTDEV @VA08180 00370000
  549. SPACE 1 00371000
  550. CHA SLR R1,R1 SET INDEX TO ZERO @V407438 00372000
  551. NEXTCH L R6,RCUCHA(R1) GET THE 1ST OR NEXT CHANNEL @V407438 00373000
  552. LTR R6,R6 IS THERE ONE? @V407438 00374000
  553. BZR R3 NOPE, RETURN @V407438 00375000
  554. LR R2,R6 SET TO SCAN THE CHANNEL BLOCK @V407438 00376000
  555. BAL R5,DEQUEUE GO SEARCH FOR THE IOB ON CHAN @V407438 00377000
  556. BZ DECRCNT IOB FOUND, GO FINISH UP @V407438 00378000
  557. LA R1,4(R1) BUMP CHANNEL INDEX @V407438 00379000
  558. CL R1,=F'12' HAVE WE LOOKED AT THE LAST CHAN? @V407438 00380000
  559. BHR R3 NO MORE CHANNELS, IOB NOT FOUND @V407438 00381000
  560. B NEXTCH CONTINUE LOOKING ON NEXT CHANNEL @V407438 00382000
  561. SPACE 00383000
  562. DECRCNT EQU * @VA08180 00384000
  563. LH R1,RCHQCNT REDUCE THE COUNT BY 1 @VA04182 00385000
  564. BCTR R1,0 ... @VA04182 00386000
  565. STH R1,RCHQCNT ... @VA04182 00387000
  566. B TSTCUQ TEST SCHEDULED BIT AND STACK IOB @VA04182 00388000
  567. SPACE 1 00389000
  568. DEQUEUE LM R14,R15,RDEVFIOB-RDEVBLOK(R2) GET IOB QUEUE *00390000
  569. POINTERS FOR CH, CU OR DEV BLOCK 00391000
  570. NEXTIOB CLR R10,R14 IOB FOUND ? @VA04182 00392000
  571. BE FOUND YES- BRANCH @VA04182 00393000
  572. CLR R14,R15 LAST IOB ? @VA04182 00394000
  573. BE NOTFOUND YES- BRANCH @VA04182 00395000
  574. L R14,IOBFPNT-IOBLOK(R14) POINT TO THE NEXT IOB @VA04182 00396000
  575. B NEXTIOB LOOP @VA04182 00397000
  576. SPACE 1 00398000
  577. FOUND LM R14,R15,IOBFPNT GRAB CHAIN POINTERS @VA04182 00399000
  578. ST R14,IOBFPNT-IOBLOK(R15) POINT PREV TO NEXT @VA04182 00400000
  579. ST R15,IOBBPNT-IOBLOK(R14) POINT NEXT TO PREV @VA04182 00401000
  580. ST R5,SAVEWRK2 SAVE R5 ACROSS 'IOSDQM' ROUTINE @V407438 00402000
  581. BAL R5,IOSDQM GO CLEAN UP ANY MINI IOB'S @V407438 00403000
  582. L R5,SAVEWRK2 RESTORE R5 @V407438 00404000
  583. BAL R1,IOSTSTIW CHECK VMIOWAIT STATUS @VA04182 00405000
  584. CLR R1,R1 SET CC=0 @VA04182 00406000
  585. BR R5 RETURN CC = 0; IOB FOUND @VA04182 00407000
  586. SPACE 1 00408000
  587. NOTFOUND TM NOTFOUND,X'FF' SET CC = 1 @VA04182 00409000
  588. BR R5 RETURN CC = 1; IOB NOT FOUND @VA04182 00410000
  589. STARTDEV EQU * @VA08180 00411000
  590. CALL DMKSTKIO @VA08180 00412000
  591. NI RDEVSTAT,255-(RDEVSCED+RDEVBUSY) @VA08180 00413000
  592. BAL R4,IOSDQDV @VA08180 00414000
  593. BAL R3,IOSTRTDV @VA08180 00415000
  594. B IOSQXIT @VA08180 00416000
  595. EJECT 00417000
  596. SPACE 00891000
  597. IOSIOERR EQU * @VA01762 00892000
  598. NI IOBSPEC2,X'FF'-(IOBUC+IOBSNSIO) CLEAR ERR. FLAGS@V407438 00893000
  599. TM IOBSPEC,IOBTIO WAS IOBLOK MARKED FOR 'TIO' ONLY @VA01762 00894000
  600. BO IOSSTACK YES - BYPASS ERP PROCESSING 00895000
  601. TM IOBFLAG,IOBCP+IOBHVC IS IT A CP GENERATED I/O 00896000
  602. BNZ IOSCPERR YES--GO TRY TO RESTART. 00897000
  603. BAL R5,IOSRECER GO, RECORD USER ERROR . 00898000
  604. B IOSRSTDV AND CONTINUE PROCESSING 00899000
  605. SPACE 00900000
  606. IOSCPERR DS 0H HERE FOR ERRORS IN CP GENERATED I/O 00901000
  607. CLI RDEVTYPC,CLASTERM IS THIS A TERMINAL CLASS ? @V2D3931 00902000
  608. BNE IOSBSC NO, CHECK OTHER CLASES @V2D3931 00903000
  609. TM RDEVSTAT,RDEVDED IS THIS DEVICE DEDICATED @V2D3931 00904000
  610. BO IOSBSC YES, BYPASS CHECK FOR LINE @V2D3931 00905000
  611. TM IOBFLAG,IOBHVC IS THIS A DIAGNOSE REQUEST @V2D3931 00906000
  612. BO IOSBSC YES, BYPASS BISYNC LINE FTN. @V2D3931 00907000
  613. TM RDEVTYPE,TYPBSC IS THIS A BISYNC LINE ? @V2D3931 00908000
  614. BO IOSSERP YES, GO TO ERP SUPPORT @V2D3931 00909000
  615. IOSBSC EQU * @V2D3931 00910000
  616. TM RDEVTYPC,CLASURI+CLASURO+CLASDASD+CLASTAPE @V200820 00911000
  617. BZ IOSSTACK NO ERP - STACK THE IOBLOK @V200820 00912000
  618. TM RDEVTYPC,CLASURI+CLASURO @VA01599 00913000
  619. BZ IOSSERP NO, GO TO EREP SUPPORT @VA01599 00914000
  620. TM IOBFLAG,IOBHVC IS THIS A DIAGNOSE REQUEST @VA01599 00915000
  621. BO IOSSTACK YES, GO STACK THE IOBLOK @VA01599 00916000
  622. IOSSERP EQU * @VA01599 00917000
  623. TM IOBSPEC2,IOBRETRY HAVE ALREADY STACKED CPEX @VA08119 00918000
  624. BO IOSRSTCU YES, DONT STACK ANOTHER @VA08119 00919000
  625. OI IOBSPEC2,IOBRETRY CAN ONLY HANDLE ONE RETRY/IOB @VA08119 00920000
  626. OI IOBFLAG,IOBERP INDICATE ERP IN CONTROL @V408246 00921000
  627. LA R5,IOSRSTCU SET UP RETURN FROM THE CPEXBLOK ROUTINE 00922000
  628. * TO DEQUE THE NEXT IOBLOK AND LET THE 00923000
  629. * SYSTEM GO TO WORK. 00924000
  630. BAL R2,IOSGCPEX BUILD A CP EXECUTION BLOCK TO RETURN TO 00925000
  631. * THE NEXT INSTRUCTION 00926000
  632. DMKIOSER EQU * (DSP REFERENCES THIS LABEL) @VA02760 00927000
  633. USING *,R15 ADDRESSABILITY @VA09587 00927100
  634. L R12,IOSBASE1 RESET BASE REGISTER TO IOS @VA09587 00927150
  635. USING DMKIOS,R12 ADDRESSABILITY @VA09587 00927200
  636. L R9,IOSBASE2 RESET BASE REGISTER TO IOS @VA09587 00927250
  637. USING DMKIOS,R12,R9 ADDRESSABILITY @VA09587 00927300
  638. DROP R15 @VA09587 00927350
  639. L R15,IOBIOER GET ADDRESS OF IOERBLOK @VA01160 00929000
  640. LTR R15,R15 IS THERE AN IOERBLOK @VA01599 00930000
  641. BZ CALLERP NO, GO TO ERP SUPPORT @VA01599 00931000
  642. TM CSW+5,CDC+CCC+IFCC WAS THIS A CHANNEL ERROR @V508690 00932000
  643. BNZ CALLERP YES @V508690 00933000
  644. USING IOERBLOK,R15 ADDRESSABILITY @VA01160 00934000
  645. TM IOERDATA,INTREQ IS DEVICE READY ? @VA01160 00935000
  646. BNO CALLERP YES @VA01160 00936000
  647. OI VMRSTAT,VMIDLE DROP USER FROM QUEUE @VA01160 00937000
  648. CALL DMKSCHDL ... @VA01160 00938000
  649. DROP R15 @VA01160 00939000
  650. CALLERP DS 0H @V408246 00940000
  651. L R15,=A(DMKDASER) ADDR OF DASD ERP @VA01174 00941000
  652. CLI RDEVTYPC,CLASDASD DASD DEVICE ?? 00942000
  653. BE CALLRTRY YES -- 00943000
  654. L R15,=A(DMKRSPER) ADDRESS OF SPOOLING RETRY ROUTINE 00944000
  655. TM RDEVTYPC,CLASURI+CLASURO UNIT RECORD DEVICE ?? 00945000
  656. BNZ CALLRTRY 00946000
  657. L R15,=A(DMKTAPER) ADDRESS OF TAPE RETRY ROUTINE 00947000
  658. CLI RDEVTYPC,CLASTAPE IS THIS A TAPE DEVICE ? @V2D3931 00948000
  659. BE CALLRTRY YES, GO TO TAPE ERP MODULE @V2D3931 00949000
  660. L R15,=A(DMKBSCER) ADDRESS OF BISYNC RETRY ROUTINE@V2D3931 00950000
  661. SPACE 00951000
  662. CALLRTRY CALL (15),AFFINITY CALL APPROPRIATE RECOVERY ROUTINE@V407593 00952000
  663. NI IOBSPEC2,X'FF'-IOBRETRY TURN OFF IOBRETRY @VA12941 00952100
  664. ST R0,PTHSAVE RE-EST PTHSAVE INCASE LOST @VA07225 00953000
  665. ST R1,PTHSAVE+4 CONTROL ON GIVING CONTROL TO DAS @VA07225 00954000
  666. LR R1,R11 ADDR OF VMBLOK TO BE UNLOCKED .. @V407593 00955000
  667. C R1,LASTUSER IS VMBLOK LASTUSER? @V407508 00956000
  668. BE NOUNLOCK YES, DO NOT UNLOCK LASTUSER @V407508 00957000
  669. C R1,ASYSVM IS VMBLOK THE SYSTEM VMBLOK? @V407508 00958000
  670. BE NOUNLOCK YES, NO NEED TO UNLOCK SYSTEM @V407508 00959000
  671. LOCK RELEASE,TYPE=VMBLOK UNLOCK THIS VM @V407593 00960000
  672. NOUNLOCK DS 0H @V407508 00961000
  673. SPACE 00962000
  674. TM IOBFLAG,IOBERP IS ERP STILL IN CONTROL ?? 00963000
  675. BO IOSCKRST YES - TEST FOR RESTART REQUEST 00964000
  676. BAL R5,IOSRECER NO - GO RECORD ERROR 00965000
  677. B IOSRSTDV AND RESTART DEVICE 00966000
  678. SPACE 00967000
  679. IOSCKRST TM IOBFLAG,IOBRSTRT IS ERP REQUESTING RESTART ?? 00968000
  680. BNO IOSRSTCU NO--MUST BE WAITING FOR INT. @VA04277 00969000
  681. SLR R2,R2 @VA04277 00970000
  682. ST R2,RDEVAIOB CLEAR ACTIVE IOBLOK @VA04277 00971000
  683. NI RDEVSTAT,X'FF'-RDEVBUSY MARK DEVICE NOT BUSY @VA04277 00972000
  684. B IOSREQUE GO RESTART THE OPERATION @VA04277 00973000
  685. EJECT 01007000
  686. IOSSTACK DS 0H HERE TO 01008000
  687. CALL DMKSTKIO STACK THE IOBLOK 01009000
  688. * STOP CHARGING FOR INTERRUPT AND @V407593 01010000
  689. * START CHARGING RESTARTED USER @V407593 01011000
  690. CHARGE SWITCH,ASYSVM @V407593 01012000
  691. SPACE 01013000
  692. B IOSRSTDV @VA09587 01013100
  693. * 01013115
  694. USING *,R12 @VA09587 01013130
  695. DMKIOSRH DS 0H @VA09587 01013145
  696. L R12,IOSBASE1 @VA09587 01013160
  697. USING DMKIOS,R12 @VA09587 01013175
  698. L R9,IOSBASE2 @VA09587 01013190
  699. USING DMKIOS,R12,R9 @VA09587 01013205
  700. B IOSRSTCH @VA09587 01013220
  701. * 01013235
  702. USING *,R12 @VA09587 01013250
  703. DMKIOSRQ DS 0H @VA09587 01013265
  704. L R12,IOSBASE1 @VA09587 01013280
  705. USING DMKIOS,R12 @VA09587 01013295
  706. L R9,IOSBASE2 @VA09587 01013310
  707. USING DMKIOS,R12,R9 @VA09587 01013325
  708. B IOSREQUE @VA09587 01013340
  709. * 01013355
  710. DMKIOSRS DS 0H @VA09587 01013370
  711. USING *,R12 @VA09587 01013385
  712. L R12,IOSBASE1 @VA09587 01013400
  713. USING DMKIOS,R12 @VA09587 01013415
  714. L R9,IOSBASE2 @VA09587 01013430
  715. USING DMKIOS,R12,R9 @VA09587 01013445
  716. B IOSRSTDV @VA09587 01013460
  717. * 01013475
  718. USING *,R12 @VA09587 01013490
  719. DMKIOSRU DS 0H @VA09587 01013505
  720. L R12,IOSBASE1 @VA09587 01013520
  721. USING DMKIOS,R12 @VA09587 01013535
  722. L R9,IOSBASE2 @VA09587 01013550
  723. USING DMKIOS,R12,R9 @VA09587 01013565
  724. B IOSRSTCU @VA09587 01013580
  725. * 01013595
  726. USING *,R12 @VA09587 01013610
  727. DMKIOSRY DS 0H @VA09587 01013625
  728. L R12,IOSBASE1 @VA09587 01013640
  729. USING DMKIOS,R12 @VA09587 01013655
  730. L R9,IOSBASE2 @VA09587 01013670
  731. USING DMKIOS,R12,R9 @VA09587 01013685
  732. B CALLERP @VA09587 01013700
  733. * 01013715
  734. USING *,R12 @VA09587 01013730
  735. DMKIOSST DS 0H @VA09587 01013745
  736. L R12,IOSBASE1 @VA09587 01013760
  737. USING DMKIOS,R12 @VA09587 01013775
  738. L R9,IOSBASE2 @VA09587 01013790
  739. USING DMKIOS,R12,R9 @VA09587 01013805
  740. B IOSTART @VA09587 01013820
  741. * 01013835
  742. USING *,R15 @VA09587 01013850
  743. DMKIOSRC DS 0H @VA09587 01013865
  744. L R12,IOSBASE1 @VA09587 01013880
  745. DROP R15 @VA09587 01013895
  746. USING DMKIOS,R12 @VA09587 01013910
  747. L R9,IOSBASE2 @VA09587 01013925
  748. USING DMKIOS,R12,R9 @VA09587 01013940
  749. B IOSRC1 @VA09587 01013955
  750. IOSBASE1 DC A(DMKIOS) ADCONS MUST BE IN THE FIRST 4K @VA09587 01013970
  751. IOSBASE2 DC A(DMKIOS+4096) AND AFTER THE LAST ENTRY POINT @VA09587 01013985
  752. IOSRSTDV DS 0H 01014000
  753. SLR R2,R2 ... 01015000
  754. ST R2,RDEVAIOB CLEAR ACTIVE IOBLOK POINTER 01016000
  755. NI RDEVSTAT,X'FF'-RDEVBUSY AND MARK DEVICE NOT BUSY 01017000
  756. SPACE 01018000
  757. IOSRSTDE DS 0H 01019000
  758. BAL R4,IOSDQDV DEQUEUE THE NEXT IOBLOK OFF DEVICE QUEUE 01020000
  759. IOSREQUE BAL R3,IOSTRTDV +0, START THE I/O TO THIS DEVICE @V407438 01021000
  760. IOSRSTCU DS 0H +4, START THE CONTROL UNIT @V407438 01022000
  761. BAL R4,IOSDQCU DEQUEUE THE NEXT IOBLOK ON C.U. QUEUE 01023000
  762. BAL R3,IOSTRTCU +0, START I/O TO THIS CTL UNIT @V407438 01024000
  763. IOSRSTCH DS 0H +4, START THE CHANNEL @V407438 01025000
  764. BAL R4,IOSDQCH DEQUEUE NEXT IOBLOK OFF THE CHANNEL QUEUE 01026000
  765. BAL R3,IOSTRTCH +0, START I/O TO THIS CHANNEL @V407438 01027000
  766. TM RCHSTAT,RCHBUSY +4, IS THE CHANNEL BUSY? @V407438 01028000
  767. BO IOSTEXIT YES, EXIT 01029000
  768. C R6,RCHFIOB ANYTHING QUEUED ON THE CHANNEL 01030000
  769. BNE IOSRSTCH YES, RESTART IT 01031000
  770. EJECT 01032000
  771. IOSTEXIT LTR R13,R13 WAS ENTRY TO IOS FROM A "CALL" 01033000
  772. BNZ IOSRETRN YES, RETURN TO CALLER 01034000
  773. SLR R3,R3 SET BRANCH INDEX TO ZERO @V407438 01035000
  774. CL R6,RCHRSTQ DID WE RESTART DIFF. CHAN ON INT?@V407438 01036000
  775. BE CHKCU NOPE, GO CHECK CTL UNIT @V407438 01037000
  776. L R4,RCHRSTQ GET INTERRUPTING CHANNEL ADDR @V407438 01038000
  777. ST R6,RCHRSTQ RESTARTED CHANNEL IS DONE NOW @V407438 01039000
  778. LR R6,R4 SET TO INT. CHAN FOR 2ND RESTART @V407438 01040000
  779. LA R3,4(R3) SET FOR CHANNEL CHANGE ONLY @V407438 01041000
  780. CHKCU LTR R7,R7 DOES CU EXIST (COULD BE CH AVAIL)@V407438 01042000
  781. BNP BRESTART(R3) NOPE, GO TO DISP OR CH RESTART @V407438 01043000
  782. CL R7,RCURSTQ DID WE RESTART DIFF. CU ON INT? @V407438 01044000
  783. BE BRESTART(R3) NOPE, GO TO DISP OR CH RESTART @V407438 01045000
  784. L R5,RCURSTQ GET INTERRUPTING CTL UNIT ADDR @V407438 01046000
  785. ST R7,RCURSTQ RESTARTED CTL UNIT IS DONE NOW @V407438 01047000
  786. LR R7,R5 SET TO INT. CU FOR 2ND RESTART @V407438 01048000
  787. LA R3,8(R3) SET FOR CTL UNIT CHANGE @V407438 01049000
  788. C R3,=F'12' @V407438 01050000
  789. BNE BRESTART(R3) @V407438 01051000
  790. B *+4(R3) GO TO EXIT OR RESTART ROUTINE @V407438 01052000
  791. SPACE 01053000
  792. BRESTART B IOSGDISP EXIT FORTHWITH @V407438 01054000
  793. B IOSRSTCH CH CHANGE ONLY, RESTART INT CH @V407438 01055000
  794. B IOSRSTCU CU CHANGE ONLY, RESTART INT CU @V407438 01056000
  795. B IOSRSTCU CH & CU CHNGE, RESTRT FROM INT CU@V407438 01057000
  796. EJECT 01058000
  797. SPACE 01059000
  798. * STOP CHARGING FOR RESTART, AND @V407593 01060000
  799. * RE-ESTABLISH RUNUSER FOR DISPATCH@V407593 01061000
  800. * START CHARGING HIM @V407593 01062000
  801. IOSGDISP CHARGE SWITCH,LASTUSER @V407511 01063000
  802. AIF (NOT &AP).LOKSY8 01064000
  803. * IF MPSYSLOCK CAN BE OBTAINED, @V407593 01065000
  804. * THEN GOTO DSPCH, OTHERWISE, @V407593 01066000
  805. * GOTO DSPRU @V407593 01067000
  806. TM APSTAT1,APUOPER RUNNING IN ATTACHED MODE @V407511 01068000
  807. BZ GOTOCH NO, GOTO DSPCH @V407511 01069000
  808. L R15,=A(DMKLOKSY+2) GET ADDR OF SYSTEM LOCK @V407511 01070000
  809. CLC LPUADDR,0(R15) DO I ALREADY HAVE THE SYSTEM LOCK@V407511 01071000
  810. BE GOTOCH YES, GOTO DSPCH @V407511 01072000
  811. L R15,PREFIXB ACCESS OTHER PSA @VA09257 01072100
  812. TM XCPEND-PSA(R15),XCDISP IS DISPATCH PENDING @VA09257 01072300
  813. BO GOTODSPA YES, DO NOT OBTAIN LOCK @VA09257 01072500
  814. LOCK OBTAIN,TYPE=SYS,SPIN=NO @V407593 01073000
  815. BNE GOTODSPA COULDNT GET LOCK - GOTO DSPA @V4M0173 01074000
  816. .LOKSY8 ANOP 01075000
  817. GOTOCH GOTO DMKDSPCH @V407593 01076000
  818. GOTODSPA GOTO DMKDSPA GO TRY TO REDISPATCH RUNUSER @V4M0173 01077000
  819. IOSRETRN DS 0H HERE TO EXIT FROM RESTART 01078000
  820. * STOP CHARGING RESTARTED USER @V407593 01079000
  821. * GET CALLERS R11 AND @V407593 01080000
  822. * START CHARGING HIM @V407593 01081000
  823. CHARGE SWITCH,SAVER11 @V407593 01082000
  824. EXIT RETURN TO CALLER 01083000
  825. EJECT 01084000
  826. IOSTRTDV EQU * HERE TO START OR RESTART A DEVICE@V407438 01085000
  827. TM RDEVSTAT,RDEVDISA IS THE DEVICE OFF LINE ?? 01086000
  828. BO IOSNOPTH YES -- GO RETURN CC 3 01087000
  829. OI RDEVSTAT,RDEVSCED FLAG DEVICE AS SCHEDULED 01088000
  830. CLI RDEVTYPC,CLASDASD IS IT A MOVEABLE HEAD DEVICE ?? 01089000
  831. BNE IOSPATH NO -- NO SPLIT SEEK 01090000
  832. TM RDEVFTR,FTRRPS DOES DEVICE HAVE RPS FEATURE ? @V304498 01091000
  833. BZ IOSCKR NO -- GO TEST FOR SPLIT SEEK @V2A2029 01092000
  834. OI IOBFLAG,IOBRELCU RPS DEVICES LEAVE CU NONBUSY @V407438 01093000
  835. B IOSPATH CONTINUE -- 01094000
  836. SPACE 01095000
  837. IOSCKR DS 0H 01096000
  838. SPACE 01097000
  839. TM IOBSPEC,IOBTIO+IOBHIO IS THIS A 'TIO' OR 'HIO' ? 01098000
  840. BNZ IOSPATH YES -- SKIP SEEK CHECKING 01099000
  841. L R1,IOBCAW GET ADDRESS OF 1ST CCW 01100000
  842. CLI 0(R1),X'07' IS OPERATION A CYLINDER SEEK ?? 01101000
  843. BNE IOSPATH NO -- 01102000
  844. SPACE 01103000
  845. TM IOBFLAG,IOBSPLT RESTARTING SPLIT SEEK ?? 01104000
  846. BZ IOSCKSPL NO -- SEE IF THIS SEEK SHOULD BE SPLIT 01105000
  847. SPACE 01106000
  848. OI 4(R1),CC RECHAIN THE SEEK 01107000
  849. NI IOBFLAG,X'FF'-(IOBSPLT+IOBRELCU) AND UNFLAG TASK 01108000
  850. B IOSPATH GO RESTART 01109000
  851. SPACE 01110000
  852. IOSCKSPL DS 0H TEST FOR SEEK TO SPLIT 01111000
  853. TM IOBFLAG,IOBRSTRT RESTARTED OPERATION ? 01112000
  854. BO IOSPATH YES -- NO SPLIT SEEK FOR ERP. 01113000
  855. TM 4(R1),CC IS THE SEEK COMMAND CHAINED ?? 01114000
  856. BZ IOSPATH NO -- 01115000
  857. OI IOBFLAG,IOBSPLT+IOBRELCU FLAG SPLIT SEEK AND CU RELEASE 01116000
  858. NI 4(R1),X'FF'-CC AND UNCHAIN THE SEEK - 01117000
  859. SPACE 01118000
  860. IOSPATH TM IOBSTAT,IOBPATHF SPECIFIC PATH REQUESTED? @V407438 01119000
  861. BZ GETPATH NOPE, CONTINUE AND FIND ONE @V407438 01120000
  862. LR R0,R8 SAVE RDEVBLOK ADDRESS @V407438 01121000
  863. LH R1,IOBRADD GET THE PATH ADDRESS WE'RE TO USE@V407438 01122000
  864. CALL DMKSCNRU GO FIND RDEV, RCU AND RCH BLOCKS @V407438 01123000
  865. CLR R0,R8 RDEVBLOK BETTER BE THE SAME... @V407438 01124000
  866. BE GETPATH ... OK THIS TIME @V407438 01125000
  867. ABEND 5 SOMEBODY LIED ON ENTRY @V407438 01126000
  868. SPACE 01127000
  869. GETPATH BAL R5,IOSFINDP FIND AVAILABLE PATH DEVICE AND @V407438 01128000
  870. * RETURN IF SUCCESSFUL, ELSE EXIT ON GPR3 01129000
  871. * NOTE: THE REAL CHANNEL, CONTROL UNIT AND DEVICE ADDRESS 01130000
  872. * ARE SETUP IN THE IOBLOK BY THE FIND PATH SUBROUTINE. 01131000
  873. B IOSTART PATH FOUND, GO START THE I/O @V407438 01132000
  874. EJECT 01133000
  875. IOSTRTCU BAL R5,IOSFCH FIND CHAN PATH & FILL IN IOBRADD @V407438 01134000
  876. IOSTRTCH LH R1,IOBRADD GET THE FULL DEVICE ADDRESS @V407438 01135000
  877. CALL DMKSCNRU POINT TO THE PRIME CH, CU AND DEV@V407438 01136000
  878. BZ IOSTART AND START THIS DEVICE @V407438 01137000
  879. ABEND 2 IOBRADD BAD, IOB FRET'ED? @V407438 01138000
  880. SPACE 3 01139000
  881. *. 01140000
  882. * 01141000
  883. * F. OPERATION OF IOSTART - 01142000
  884. * IF THERE ARE ANY MINI IOB'S ON THE IOBLINK CHAIN, CALL 01143000
  885. * IOSDQM TO REMOVE THEM AND RETURN WITH THE MAIN IOB. 01144000
  886. * 1. IF THE IOBLOK HAS BEEN FLAGGED AS "RESET", FLAG THE DEVICE 01145000
  887. * AS AVAIALBLE AND ATTEMPT TO RESTART IT; OTHERWISE, CONTINUE 01146000
  888. * 2. CHAIN THE ACTIVE IOBLOK FROM THE RDEVBLOK, AND MARK THE 01147000
  889. * SUBCHANNEL PATH BUSY 01148000
  890. * 3. MARK THE APPROPRIATE UNITS IN THE I/O PATH BUSY 01149000
  891. * 4. LOCATE THE CALLER'S CAW, GET THE UNIT ADDRESS, AND ISSUE 01150000
  892. * THE SIO 01151000
  893. * 01152000
  894. *. 01153000
  895. SPACE 01154000
  896. IOSTART EQU * 01155000
  897. CL R10,IOBLINK IS THERE A MINI-IOB CHAIN? @V407438 01156000
  898. BE *+8 NOPE, SKIP @V407438 01157000
  899. BAL R5,IOSDQM YUP, GO CLEAN UP MINI IOB CHAIN @V407438 01158000
  900. TM IOBFLAG,IOBRES HAS I/O REQUEST BEEN RESET ?? 01159000
  901. BZ IOSETIOB NO -- GO SAVE ADDRESS OF ACTIVE IOBLOK 01160000
  902. TM RDEVSTA2,RDEVRACT IS DEVICE BEING RESET 01161000
  903. BO IOSETIOB YES- MUST FINISH THE RESET 01162000
  904. NI RDEVSTAT,X'FF'-RDEVSCED UNFLAG DEVICE SCHEDULED 01163000
  905. NI RCUSTAT,X'FF'-RCUSCED AND CU ALSO 01164000
  906. BAL R1,IOSTSTIW CHECK VMIOWAIT STATUS @VA04182 01165000
  907. B IOSSTACK STACK IOBLOK AND RESTART DEVICE @VM08864 01166000
  908. EJECT 01167000
  909. * HERE TO TURN OFF VMIOWAIT IF A RESET IOB WAS ABOUT TO BE 01168000
  910. * STARTED. IF VMBLOK-LOCK IS NOT HELD (OR ACQUIRED), THEN 01169000
  911. * A CPEXBLOK MUST BE STACKED. 01170000
  912. SPACE 2 01171000
  913. SPACE 01172000
  914. IOSETIOB DS 0H SAVE ADDRESS OF ACTIVE IOBLPK 01173000
  915. ST R10,RDEVAIOB SAVE ADDRESS OF ACTIVE IOBLOK 01174000
  916. OI RDEVSTAT,RDEVBUSY MARK DEVICE BUSY - 01175000
  917. NI RDEVSTAT,X'FF'-RDEVSCED AND RESET SCHEDULED, IF NEEDED 01176000
  918. TM RCHTYPE,RCHSEL IS THIS A SELECTOR CHANNEL? @V407438 01177000
  919. BZ IOSRCHNB NOPE, BR. DO NOT MARK IT BUSY @V407438 01178000
  920. OI RCHSTAT,RCHBUSY SET CHANNEL BUSY FLAG 01179000
  921. IOSRCHNB TM RCUTYPE,RCUSHRD ONLY 1 SUBCHANNEL FOR THIS CU ? 01180000
  922. BZ IOSRCUNB NO, DO NOT MARK BUSY 01181000
  923. OI RCUSTAT,RCUBUSY SET CONTROL UNIT BUSY 01182000
  924. NI RCUSTAT,X'FF'-RCUSCED AND RESET SCHEDULED 01183000
  925. IOSRCUNB TM IOBFLAG,IOBRSTRT IS THIS A RESTARTED OPERATION ? 01184000
  926. BO IOSRCAW YES, USE THE RESTART CAW 01185000
  927. TM IOBSPEC2,IOBSNSIO THIS IOB FOR SENSE?? @VA10557 01185100
  928. BNO IOSCAW NO, PROCESS AS NORMAL @VA10557 01185200
  929. L R2,IOBIOER OTHERWISE USE IOERCAW @VA10557 01185300
  930. LTR R2,R2 IF THERE IS NO IOERBLOK @VA10557 01185400
  931. BZ ABND09 THEN ABEND VM/370 @VA10557 01185500
  932. LA R2,IOERCCW-IOERBLOK(R2) POINT R2 AT SENSE CCW @VA10557 01185600
  933. B IOSTCAW AND CONTINUE AS BEFORE @VA10557 01185700
  934. ABND09 DS 0H IF WE ARE HERE, THEN THERE MUST @VA10557 01185800
  935. ABEND 9 BE TROUBLE IN RIVER CITY @VA10557 01185900
  936. SPACE 01186000
  937. SPACE 01187000
  938. IOSCAW DS 0H 01188000
  939. L R2,IOBCAW LOAD THE 1ST CCW ADDRESS 01189000
  940. B IOSTCAW CONTINUE 01190000
  941. SPACE 01191000
  942. IOSRCAW L R2,IOBRCAW LOAD THE RESTART CCW ADDRESS 01192000
  943. SPACE 01193000
  944. IOSTCAW ST R2,CAW STORE IN THE CHANNEL ADDRESS WORD 01194000
  945. IOSSIO NI IOBSTAT,X'FF'-IOBCC3 RESET CONDITION CODE IN IOBLOK 01195000
  946. XC CSW(8),CSW CLEAR CSW FOR SIO 01196000
  947. XC IOBCSW(8),IOBCSW CLEAR ANY OLD STATUS IN CSW @VA03817 01197000
  948. LH R1,IOBRADD LOAD REAL DEVICE ADDRESS 01198000
  949. SPACE 01199000
  950. TM IOBSPEC,IOBTIO+IOBHIO IS THIS REALLY A TIO OR HIO ? 01200000
  951. BNZ IOSQTIO YES -- GO FIND OUT WHICH 01201000
  952. SPACE 01205000
  953. SIO 0(R1) START THE I/O OPERATION 01206000
  954. SPACE 01207000
  955. AIF (NOT &TRACE(9)).TR2 01208000
  956. BAL R15,TRACESUB TRACE THE STARTIO (RETURN R15+2) 01209000
  957. DC X'0B00' TRACE TABLE FLAG FOR START I/O 01210000
  958. .TR2 ANOP 01211000
  959. SPACE 3 01212000
  960. *. 01213000
  961. * 01214000
  962. * 5. FOR CC = 0 ON A SPLIT SEEK TO A DASD DEVICE, 01215000
  963. * ISSUE A TIO SO THE STATUS OF THE SEEK CAN BE INTERROGATED. 01216000
  964. * IF THE ACCESS ARM REQUIRES MOVEMENT RESTART ANY REQUESTS 01217000
  965. * QUEUED FROM THE CONTROL UNIT. IF THE ARM IS ALREADY 01218000
  966. * POSITIONED RESTART THE DEVICE. 01219000
  967. * FOR A NON-DASD DEVICE, EXIT TO DMKDSPCH AFTER TAKING THE 01220000
  968. * VIRTUAL MACHINE OUT OF IOWAIT 01221000
  969. * 6. CC = 2 SHOULD OCCUR ONLY FOR A BLOCK MULTIPLEXOR CHANNEL; 01222000
  970. * IF IT DOES, REQUEUE THE IOBLOK ON THE CHANNEL AND EXIT; 01223000
  971. * OTHERWISE, ASSUME A FALSE BUSY ON MPX AND RETRY THE SIO 01224000
  972. * 7. CC = 3 IS FLAGGED AS A FATAL ERROR AND THE IOBLOK IS STACK- 01225000
  973. * ED FOR RETURN TO THE CALLER 01226000
  974. * 8. FOR CC = 1, STATUS IS TESTED FOR ERRORS AND SENSE IS SCHED- 01227000
  975. * ULED VIA A CALL TO IOSENSE (J, BELOW); WHEN THE SENSE IS 01228000
  976. * STARTED, RETURN TO CALLER 01229000
  977. * 9. IF NO ERRORS ARE INDICATED AND THE OPERATION IS COMPLETE 01230000
  978. * (DE POSTED), STACK THE IOBLOK AND CALL IOSRSTRT (E, ABOVE) 01231000
  979. * TO RESTART THE PATH 01232000
  980. * 10. IF THE OPERATION IS NOT COMPLETE (PCI OR CE WITHOUT DE), 01233000
  981. * COPY AND STACK THE IOBLOK AND RESTART THE CHANNEL AND CU 01234000
  982. * VIA A CALL TO IOSRSTRT (E, ABOVE) 01235000
  983. * 11. EXIT TO THE CALLER (EITHER IOSRSTRT OR IOSQCOM) 01236000
  984. * 01237000
  985. *. 01238000
  986. SPACE 01239000
  987. BC 8,IOSCC0 BRANCH IF SUCCESSFULLY STARTED 01240000
  988. BC 4,IOSCC1 BRANCH IF CSW STORED 01241000
  989. BC 1,IOSCC3 BRANCH IF NOT OPERATIONAL 01242000
  990. SPACE 2 01243000
  991. IOSQBSY TM RCHTYPE,RCHMPX BYTE MULTIPLEXER CHANNEL ? @VA01383 01244000
  992. BO *+8 YES - DO NOT MARK BUSY @VA01383 01245000
  993. OI RCHSTAT,RCHBUSY SET CHANNEL BUSY @VA01662 01246000
  994. NI RCUSTAT,X'FF'-RCUBUSY RESET CONTROL UNIT BUSY FLAG 01247000
  995. OI RDEVSTAT,RDEVSCED DEVICE IS SCHEDULED @VA04452 01248000
  996. L R1,RCHFIOB GET POINTER TO CHANNEL QUEUE 01249000
  997. BAL R4,IOSQCHSK AND QUEUE AND WAIT FOR CHANNEL AVAILABLE 01250000
  998. LH R4,RCHQCNT ADD 1 TO COUNT OF IOBLOCKS @VA01044 01251000
  999. LA R4,1(R4) QUEUED OFF THIS CHANNEL 01252000
  1000. STH R4,RCHQCNT @VA01044 01253000
  1001. XC RDEVAIOB(4),RDEVAIOB CLEAR ACTIVE IOBLOK POINTER@VA0773 01254000
  1002. TM RCUTYPE,RCUSHRD ONLY 1 SUBCHAN FOR THIS CU @V407438 01255000
  1003. BZ *+8 NOPE, MANY, DO NOT MARK SCHEDULED@V407438 01256000
  1004. OI RCUSTAT,RCUSCED SET CONTROL UNIT SCHEDULED FLAG 01257000
  1005. B IOSTEXIT AND EXIT 01258000
  1006. EJECT 01259000
  1007. IOSQTIO TM IOBSPEC,IOBHIO IS THIS A HALT I/O REQUEST? @V407438 01260000
  1008. BO IOSQHIO YUP, BR. @V407438 01261000
  1009. SPACE 01262000
  1010. TIO 0(R1) ISSUE REQUESTED TEST I/O 01263000
  1011. SPACE 01264000
  1012. AIF (NOT &TRACE(9)).TRTIO 01265000
  1013. BAL R15,TRACESUB TRACE THE TEST I/O (RETURN R15+2) 01266000
  1014. DC X'0E00' TRACE TABLE FLAG FOR TEST I/O 01267000
  1015. .TRTIO ANOP 01268000
  1016. BC 8,IOSDVFRE CC = 0 DEVICE IS FREE 01269000
  1017. BC 4,TIOCC1 CC = 1 CSW STORED 01270000
  1018. BC 1,IOSCC3 CC = 3 NOT OPERATIONAL 01271000
  1019. B IOSQBSY QUEUE IOBLOK UNTIL CHANNEL IS FREE 01272000
  1020. SPACE 2 01273000
  1021. IOSQHIO HDV 0(R1) ISSUE REQUESTED HALT I/O 01274000
  1022. SPACE 01275000
  1023. AIF (NOT &TRACE(9)).TRHIO 01276000
  1024. BAL R15,TRACESUB TRACE THE HALT DEVICE (RETURN R15+2) 01277000
  1025. DC X'0F00' TRACE TABLE FLAG FOR HALT DEVICE 01278000
  1026. .TRHIO ANOP 01279000
  1027. HIOBR DS 0H @VA05687 01280000
  1028. BC 8,IOSCBUSY CC = 0 CONTROL UNIT BUSY 01281000
  1029. BC 4,HIOCC1 CC = 1 CSW STORED 01282000
  1030. BC 1,IOSCC3 CC = 3 NOT OPERATIONAL 01283000
  1031. TM RCHTYPE,RCH370 370 TYPE CHANNEL 01284000
  1032. BO IOSQBSY YES- WAIT FOR INT *01285000
  1033. NO- HDV WORKS LIKE A HIO FOR 360 CHANNEL *01286000
  1034. AND A BURST OPERATION WAS JUST HALTED 01287000
  1035. NI RDEVSTA2,X'FF'-RDEVBUCH RESET DEVICE BUSY WITH CHANNEL 01288000
  1036. OI IOBSTAT,IOBCC2 PASS CC = 2 TO THE CALLER 01289000
  1037. TM RDEVSTA2,RDEVRACT DEVICE RESET 01290000
  1038. BZ IOSNOSK NO- BURST DEVICE HALTED (ALL SET) 01291000
  1039. CLEANUP NI IOBSPEC,X'FF'-IOBHIO RESET THE HIO BIT 01292000
  1040. OI IOBSPEC,IOBTIO SET UP FOR A TEST I/O 01293000
  1041. B IOSSIO GO DRAIN THE DEVICE 01294000
  1042. SPACE 1 01295000
  1043. IOSDVFRE NI RCHSTAT,255-RCHBUSY FREE UP THE DEVICE PATH 01296000
  1044. NI RCUSTAT,255-RCUBUSY ... 01297000
  1045. TM RDEVSTA2,RDEVRACT IS DEVICE BEING RESET ? 01298000
  1046. BZ RESETFLG NO, BR. @V407438 01299000
  1047. NI IOBSPEC,X'FF'-IOBTIO REMOVE TIO BIT 01300000
  1048. OI IOBSTAT,IOBFATAL FATAL ERROR IF ACTIVE DEV RESET 01301000
  1049. NI IOBFLAG,X'FF'-IOBRSTRT CLEAR RESTART FLAG @VA01327 01302000
  1050. RESETFLG EQU * @VM01157 01303000
  1051. NI RDEVSTA2,X'FF'-(RDEVBUCH+RDEVRACT) RESET FLAGS IF ON 01304000
  1052. B IOSSTACK LEAVE THE USER IN IOWAIT @VM08864 01305000
  1053. EJECT 01306000
  1054. IOSCC0 DS 0H HERE FOR SUCCESSFUL SIO: 01307000
  1055. CLI RDEVTYPC,CLASDASD IS THIS A DASD DEVICE? 01308000
  1056. BNE SKIPDA NOPE, BR. 01309000
  1057. TM CPCREG8+2,SEEKCL SEEKS MONITORING ACTIVE? @VMI0068 01310000
  1058. BNO NOMC NO, DON'T MONITOR CALL @VMI0068 01311000
  1059. CLI RDEVTYPE,TYP2305 IS DASD DEV. A DRUM @VA07979 01312000
  1060. BE NOMC YES, DON'T MONITOR ZERO LNTH SEEK@VA07979 01313000
  1061. STM R0,R7,TEMPSAVE SAVE REGS FOR SEARCH @V60BEBC 01314000
  1062. L R7,=A(DMKENTSK) GET TO MON SEEKS LIST @V60BEBC 01315000
  1063. ICM R7,B'1111',0(R7) .... @V60BEBC 01316000
  1064. BZ RELOAD RESTORE REGS AND ISSUE MC @VMI0067 01317000
  1065. LA R6,SKSHDR(R7) SKIP HEADER TO BEGINNING OF LIST @V60BEBC 01318000
  1066. LH R5,0(R7) NUM. DEVICES TO R5 @V60BEBC 01319000
  1067. BCTR R5,0 LESS 1 @V60BEBC 01320000
  1068. SLL R5,1 TIMES 2 YIELD OFFSET TO LAST @V60BEBC 01321000
  1069. * ENTRY @V60BEBC 01322000
  1070. AR R5,R6 ADDR(LAST)=ADDR(FIRST)+LAST @V60BEBC 01323000
  1071. * OFFSET @V60BEBC 01324000
  1072. NXTSCAN CR R5,R6 UPPER BOUND:LOWER BOUND @V60BEBC 01325000
  1073. BL NOTFOUN DEV ADDRESS NOT FOUND @V60BEBC 01326000
  1074. LR R4,R5 SET MIDPOINT @VA09284 01327100
  1075. AR R4,R6 TO @VA09284 01327200
  1076. SRL R4,2 FLOOR((UBOUND+LBOUND)/2) @V60BEBC 01328000
  1077. SLL R4,1 THIS DOES PROPER ROUNDING @V60BEBC 01329000
  1078. CH R1,0(R4) COMPARE I/O DEV ADDRS @V60BEBC 01330000
  1079. BE FOUN FOUND IT @V60BEBC 01331000
  1080. BH ADJUSTL ADJUST LOWER BOUND @V60BEBC 01332000
  1081. LR R5,R4 ADJUST UPPER BOUND TO @V60BEBC 01333000
  1082. S R5,F2 MIDPOINT LESS 2 @V60BEBC 01334000
  1083. B NXTSCAN NEXT PASS @V60BEBC 01335000
  1084. ADJUSTL LA R6,2(R4) LOWER BOUND=MIDPOINT+2 @V60BEBC 01336000
  1085. B NXTSCAN NEXT PASS @V60BEBC 01337000
  1086. FOUN TM 4(R7),INCLUDE MONITOR SEEK IF INCLUDED @V60BEBC 01338000
  1087. BO RELOAD ... @V60BEBC 01339000
  1088. B NOGO DON'T MONITOR IF EXCLUDED @V60BEBC 01340000
  1089. NOTFOUN TM 4(R7),EXCLUDE MONITOR SEEK IF EXCLUDED @V60BEBC 01341000
  1090. BO RELOAD ... @V60BEBC 01342000
  1091. NOGO LM R0,R7,TEMPSAVE RESTORE REGS @V60BEBC 01343000
  1092. B NOMC @V60BEBC 01344000
  1093. RELOAD LM R0,R7,TEMPSAVE RESTORE REGS @V60BEBC 01345000
  1094. IOSMC MC MNCOCYL,MNCLSEEK MONITOR SEEK I/O REQUEST 01346000
  1095. NOMC EQU * @VA07979 01347000
  1096. LH R5,IOBCYL GET TARGET ARM POSITION 01348000
  1097. STH R5,RDEVCYL POSITION IT IN THE DEVICE BLOCK 01349000
  1098. SKIPDA EQU * NON-DASD, CONTINUE... 01350000
  1099. OI RDEVSTA2,RDEVBUCH MARK DEVICE BUSY WITH CHANNEL 01351000
  1100. NI RDEVSTA2,X'FF'-RDEVCONC RESET CONTINGENT @VA01044*01352000
  1101. CONNECTION @VA01044 01353000
  1102. TM IOBFLAG,IOBSPLT IOS IOB DOING A SPLIT SEEK ? 01354000
  1103. BZ IOSNOSK NO - BRANCH. 01355000
  1104. IOSTIO TIO 0(R1) YES - CLEAR STATUS 01356000
  1105. BC 2,IOSTIO WAIT UNTIL CHANNEL IS CLEAR. 01357000
  1106. TM CSW+4,DE IS ACCESS ARM ALREADY THERE ? 01358000
  1107. BZ IOSCHEND IF NOT, RESTART DEVICES OFF CONTROL UNIT 01359000
  1108. NI IOBFLAG,X'FF'-IOBSPLT TURN OFF SPLIT SEEK FLAG 01360000
  1109. L R2,CAW RELOAD ADDRESS OF CCW'S FROM CAW @VA00739 01361000
  1110. OI 4(R2),CC AND RECHAIN THE SEEK CCW. 01362000
  1111. B IOSSIO RESTART THE CHANNEL PROGRAM 01363000
  1112. IOSCHEND NI RCHSTAT,X'FF'-RCHBUSY FLAG CHANNEL AND 01364000
  1113. NI RCUSTAT,X'FF'-RCUBUSY CONTROL UNIT AS NOT BUSY 01365000
  1114. NI RDEVSTA2,X'FF'-RDEVBUCH RESET DEVICE BUSY WITH CHANNEL 01366000
  1115. B IOSRSTCU RESTART THE CONTROL UNIT AND CHANNEL 01367000
  1116. SPACE 1 01368000
  1117. IOSNOSK TM IOBFLAG,IOBCP+IOBHVC+IOBPAG CP-GEN I/O OPERATION ? 01369000
  1118. BNZ IOSDTCH YES - DO NOT CHANGE USER STATUS @VM08572 01370000
  1119. TM IOBSPEC,IOBSIOF START I/O FAST RELEASE ? @VA01382 01371000
  1120. BO IOSDTCH YES - HE'S NOT IN VMIOWAIT @VA01382 01372000
  1121. AIF (NOT &TRACE(6)).IOSNTRC @V407593 01373000
  1122. TM VMTRCTL,VMTRSIO TRACE WANTED?... @V407593 01374000
  1123. BZ IOSNTRC NO, NOT THIS TIME... @V407593 01375000
  1124. BAL R5,IOSTRACE TRACE WANTED, SCHED. CPEX BLOCK A@V407593 01376000
  1125. B IOSDTCH THEN CONTINUE WITH I/O WORK. @V407593 01377000
  1126. EJECT 01378000
  1127. * APU SUPPORT CODE TO TURN OFF IOWAIT BIT IN RSTAT, AND EITHER 01379000
  1128. * PERFORM THE SCHEDULER FUNCTION OF TURNING ON THE VMRUN-BIT IN 01380000
  1129. * VMDSTAT OR ELSE CALL THE SCHEDULER. THE VMBLOK-LOCK MUST 01381000
  1130. * BE HELD BEFORE TESTING OR CHANGING RSTAT--IF LOCK IS HELD 01382000
  1131. * OR CAN BE OBTAINED, TURN OFF VMIOWAIT IN VMRSTAT, OTHERWISE 01383000
  1132. * STACK A CPEX-BLOCK FOR SUBSEQUENT TURN-OFF AND CONT. WITH I/O 01384000
  1133. * NEXT, IF RSTAT IS NOW ZERO AND VMDSTAT HAS ONLY INQUE, THEN 01385000
  1134. * THE SCHEDULER FUNCTION OF TURNING ON VMRUN CAN BE PERFORMED, 01386000
  1135. * OTHERWISE A CALL TO THE SCHEDULER IS REQUIRED. THIS IN TURN 01387000
  1136. * REQUIRES THAT THE SYSTEM LOCK BE HELD. 01388000
  1137. * NOTE THAT THIS PLACES IN DMKIOS A SCHEDULER FUNCTION. 01389000
  1138. SPACE 4 01390000
  1139. .IOSNTRC ANOP @V407593 01391000
  1140. IOSNTRC EQU * HERE TO TURN OFF VMIOWAIT AND, @V407593 01392000
  1141. * CALL (OR STACK) CALL TO SCHEDULE 01393000
  1142. AIF (NOT &AP).APCHK4 01394000
  1143. TM APSTAT1,APUOPER APU OPERATIONAL @V407593 01395000
  1144. BO LOCKSQ YES, GO TO MP LOGIC @V407593 01396000
  1145. .APCHK4 ANOP 01397000
  1146. NI VMRSTAT,X'FF'-VMIOWAIT TURN OFF IOWAIT @V407593 01398000
  1147. CL R11,RUNUSER IS RESTARTED USER RUNUSER @V407593 01399000
  1148. BNE GOSCHED NO, LET DMKSCH KNOW ABOUT IT @VA09196 01400100
  1149. TM CPSTAT,CPRUN WAS SYSTEM ACTUALLY RUNNING @VA09196 01400300
  1150. * RUNUSER 01400500
  1151. BO IOSDTCH YES, DISPATCH WILL CALL SCH. @VA09196 01400700
  1152. GOSCHED CALL DMKSCHDL @VA09196 01400900
  1153. AIF (NOT &AP).APCHK5 01402000
  1154. B IOSDTCH AND CONTINUE WITH I/O @V407593 01403000
  1155. LOCKSQ LTR R13,R13 CALL ENTRY?IF YES, VM-&SYS-LOCKS HELD @V4M0137 01404000
  1156. BZ OBTLKS NO, LOCKS NOT HELD @V4M0137 01405000
  1157. NI VMRSTAT,X'FF'-VMIOWAIT TURN OFF IOWAIT @V4M0137 01406000
  1158. CL R11,RUNUSER IS RESTARTED USER RUNUSER? @VA09196 01406100
  1159. BE IOSDTCH YES, DISPATCH WILL CALL SCHD. @VA09196 01406600
  1160. CALL DMKSCHDL LET SCHEDULER KNOW ABOUT IT @V4M0137 01407000
  1161. B IOSDTCH AND CONTINUE WITH I/O PROCESSING @V4M0137 01408000
  1162. OBTLKS CLC VMLOCK+2(2),LPUADDR IS VMLOCK HELD? @V4M0137 01409000
  1163. BNE OBTVML1 NO...GO TRY TO LOCK IT @V4M0137 01410000
  1164. CLI VMDSTAT,VMINQ IS ONLY THE 'INQUE'-BIT ON?? @V4M0137 01411000
  1165. BNE OBTSL1 BR. IF NOT @V4M0137 01412000
  1166. CLI VMRSTAT,VMIOWAIT IS ONLY THE IOWAIT BIT ON?? @V4M0137 01413000
  1167. BNE OBTSL1 BR. IF ITS NOT @V4M0137 01414000
  1168. NI VMRSTAT,X'FF'-VMIOWAIT TURN OFF IOWAIT, AND @V4M0137 01415000
  1169. OI VMDSTAT,VMRUN TURN ON VMRUN IN D-STAT @V4M0137 01416000
  1170. B IOSDTCH AND CONTINUE WITH I/O PROCESSING @V4M0137 01417000
  1171. OBTSL1 DS 0H @VA07467 01418000
  1172. L R15,=A(DMKLOKSY+2) LOAD ADDR OF SYSTEM LOCK @VA07467 01419000
  1173. CLC LPUADDR,0(R15) LOCK ALREADY HELD @VA07467 01420000
  1174. BE OBTSL2 YES, SKIP OBTAINING SYSTEM LOCK @VA07467 01421000
  1175. LOCK OBTAIN,TYPE=SYS,SPIN=NO @VA07467 01422000
  1176. BE OBTSL2 GOT THE LOCK @V4M0137 01423000
  1177. LA R2,TOFFSH ADDR OF ENTRY ON UNSTACK @V4M0137 01424000
  1178. BAL R5,IOSGCPEX GO BUILD/STACK A CPEX BLOCK @V4M0137 01425000
  1179. B IOSDTCH AND CONTINUE WITH I/O PROCESSING @V4M0137 01426000
  1180. OBTSL2 NI VMRSTAT,X'FF'-VMIOWAIT TURN OFF IOWAIT, AND @V4M0137 01427000
  1181. CALL DMKSCHDL CALL SCHEDULER, AND @V4M0137 01428000
  1182. BAL R5,RELSL GO RELEASE MP-SYS LOCK @V4M0137 01429000
  1183. B IOSDTCH AND CONTINUE WITH I/O PROCESSING @V4M0137 01430000
  1184. OBTVML1 LR R1,R11 REG1 GETS VMBLOCK TO BE LOCKED @V4M0137 01431000
  1185. LOCK OBTAIN,TYPE=VMBLOK,SPIN=NO,OPTION=NOUPDT @V4M0173 01432000
  1186. BE OBTVML2 BR. IF LOCK WAS OBTAINED @V4M0137 01433000
  1187. LA R2,TOFFSH ADDR OF ENTRY ON UNSTACK @V4M0137 01434000
  1188. BAL R5,IOSGCPEX GO BUILD/STACK A CPEX BLOCK @V4M0137 01435000
  1189. B IOSDTCH AND CONTINUE WITH I/O PROCESSING @V4M0137 01436000
  1190. OBTVML2 CLI VMDSTAT,VMINQ IS ONLY THE 'INQUE'-BIT ON?? @V4M0137 01437000
  1191. BNE OBTSL3 BR. IF NOT @V4M0137 01438000
  1192. CLI VMRSTAT,VMIOWAIT IS ONLY THE IOWAIT BIT ON?? @V4M0137 01439000
  1193. BNE OBTSL3 BR. IF ITS NOT @V4M0137 01440000
  1194. NI VMRSTAT,X'FF'-VMIOWAIT TURN OFF IOWAIT, AND @V4M0137 01441000
  1195. OI VMDSTAT,VMRUN TURN ON VMRUN IN D-STAT @V4M0137 01442000
  1196. B RELVML THEN GO RELEASE VM-LOCK @V4M0137 01443000
  1197. OBTSL3 L R15,=A(DMKLOKSY+2) LOAD ADDR OF SYSTEM LOCK @V4M0169 01444000
  1198. CLC LPUADDR,0(R15) LOCK ALREADY HELD @V4M0169 01445000
  1199. BE OBTSL4 YES, SKIP OBTAINING SYSTEM LOCK @V4M0169 01446000
  1200. LOCK OBTAIN,TYPE=SYS,SPIN=NO 01447000
  1201. BE OBTSL4 GOT THE SYSLOCK...OUT OF IOWAIT. @V4M0137 01448000
  1202. LA R2,TOFFSH ADDR OF ENTRY ON UNSTACK @V4M0137 01449000
  1203. BAL R5,IOSGCPEX GO BUILD/STACK A CPEX BLOCK @V4M0137 01450000
  1204. B RELVML @V4M0137 01451000
  1205. OBTSL4 NI VMRSTAT,X'FF'-VMIOWAIT TURN OFF IOWAIT, AND @V4M0137 01452000
  1206. CALL DMKSCHDL LET THE SCHEDULER KNOW ABOUT IT @V4M0137 01453000
  1207. BAL R5,RELSL GO RELEASE MP-SYS LOCK @V4M0137 01454000
  1208. RELVML LR R1,R11 LOAD REG FOR UNLOCK @V4M0168 01455000
  1209. LOCK RELEASE,TYPE=VMBLOK @V4M0168 01456000
  1210. L R14,PREFIXB ACCESS PREFIX OF APU @V4M0173 01457000
  1211. CLI CPSTATUS-PSA(R14),CPWAIT IS AP IDLE @V4M0173 01458000
  1212. BNE IOSDTCH NO @V4M0173 01459000
  1213. TM VMDSTAT,VMRUN DOES VM APPEAR RUNNABLE @V4M0173 01460000
  1214. BZ IOSDTCH NO @V4M0173 01461000
  1215. SIGNAL WAKEUP WAKE-UP APU @V4M0173 01462000
  1216. B IOSDTCH AND CONTINUE WITH I/O PROCESSING @V4M0137 01463000
  1217. RELSL EQU * HERE ON REG 5 TO RELEASE SYS-LOCK@V4M0137 01464000
  1218. LOCK RELEASE,TYPE=SYS @V4M0137 01465000
  1219. BR R5 AND RETURN @V4M0137 01466000
  1220. TOFFSH NI VMRSTAT,X'FF'-VMIOWAIT TURN OFF BIT, AND @V4M0137 01467000
  1221. CALL DMKSCHDL CALL SCHEDULER, AND @V4M0137 01468000
  1222. GOTO DMKDSPCH @V4M0137 01469000
  1223. EJECT 01470000
  1224. .APCHK5 ANOP 01471000
  1225. IOSDTCH EQU * PRIME BLOCK MULTIPLEXOR CHANNELS @VM08572 01472000
  1226. TM RCHTYPE,RCHBMX BLOCK MULTIPLEXER CHANNEL @VM08572 01473000
  1227. BZ IOSTEXIT NO - FORGET TCH CMD. @VM08572 01474000
  1228. LH R1,RCHADD PICK UP CHANNEL ADDRESS @VA04045 01475000
  1229. CL R6,RCHFIOB ANYTHING ON CHANNEL @VA04045 01476000
  1230. BE TSTSUBCH NO- TEST SUBCHANNEL @VA04045 01477000
  1231. TM RCUTYPE,RCUSHRD ONLY ONE SUBCHANNEL @VA04045 01478000
  1232. BZ TESTCHAN NOPE, GO ATTEMPT RCU RESTART @V407438 01479000
  1233. TCH 0(R1) PRIME FOR CHANNEL AVAILABLE INT. @VA04045 01480000
  1234. BZ IOSRSTCH RESTART THE CHANNEL @VA04045 01481000
  1235. OI RCHSTAT,RCHBUSY BUSY - USE ALT PTH ON NEXT REQ @V407438 01482000
  1236. B IOSTEXIT IF BUSY EXIT @VA04045 01483000
  1237. SPACE 01484000
  1238. TSTSUBCH TM RCUTYPE,RCUSHRD ONLY ONE SUBCHANNEL @VA04045 01485000
  1239. BO IOSTEXIT YES- EXIT @VA04045 01486000
  1240. CL R7,RCUFIOB ANYTHING WAITING ON SUBCHANNEL @VA04045 01487000
  1241. BE IOSTEXIT NO- EXIT @VA04045 01488000
  1242. TESTCHAN TCH 0(R1) PRIME FOR CHANNEL AVAILABLE INT. @VA04045 01489000
  1243. BZ IOSRSTCU RESTART THE CONTROL UNIT @VA04045 01490000
  1244. OI RCHSTAT,RCHBUSY SET CHANNEL BUSY @VA04045 01491000
  1245. B IOSRSTCU PROMOTE IOB TO CHANNEL QUEUE TO @VA04045*01492000
  1246. BE RESTARTED BY CHANNEL AVAILABLE INT. 01493000
  1247. SPACE 3 01494000
  1248. TIOCC1 CLI CSW+4,SM+CUE+BUSY 370X STATUS = X'70' ?? @VA05928 01495000
  1249. BE IOSQTIO YES REISSUE TIO @VA05928 01496000
  1250. TM RDEVSTA2,RDEVRACT ACTIVE DEVICE RESET ?? @VA05928 01497000
  1251. BZ IOSCC1 NO- BRANCH 01498000
  1252. TM CSW,X'04' IS LOGOUT PENDING INDICATED ? @VA01068 01499000
  1253. BO IOSCCSET YES, GO SAVE CSW @VA01068 01500000
  1254. CLI CSW+4,SM+BUSY CONTROL UNIT BUSY ? 01501000
  1255. BE IOSCBUSY QUEUE FIRST OF THE CHANNEL 01502000
  1256. NI RDEVSTA2,X'FF'-RDEVRACT RESET THE RESET BIT 01503000
  1257. NI IOBSPEC,X'FF'-IOBTIO REMOVE THE TIO BIT 01504000
  1258. OI IOBFLAG,IOBRES DO NOT LET THE IOB BE RESTARTED 01505000
  1259. NI IOBFLAG,X'FF'-IOBRSTRT CLEAR RESTART FLAG @VA01327 01506000
  1260. OI IOBSTAT,IOBFATAL FATAL ERROR IF ACTIVE DEV RESET 01507000
  1261. CLI CSW+4,BUSY IS THE DEVICE BUSY ? 01508000
  1262. BE IOSTEXIT YES- WAIT FOR THE I/O INTERUPTION *01509000
  1263. (DO NOT ALTER THE USER'S STATUS) 01510000
  1264. B IOSCCSET GO AHEAD @VA04240 01514000
  1265. SPACE 1 01515000
  1266. HIOCC1 CLI CSW+4,SM+BUSY CONTROL UNIT BUSY 01516000
  1267. BE IOSCBUSY YES- QUEUE THE IOB (WAIT FOR CU END) 01517000
  1268. TM CSW,X'04' IS LOGOUT PENDING INDICATED ? @VA01068 01518000
  1269. BO IOSCCSET YES, GO SAVE CSW @VA01068 01519000
  1270. TM RDEVSTA2,RDEVRACT DEVICE RESET ? 01520000
  1271. BZ IOSCC1 NO, RETURN CONDITION CODE 1 @VA05687 01521000
  1272. CLI CSW+4,SM+BUSY+CUE PATH IMMINENTLY FREE? @VA05687 01522000
  1273. BNE CLEANUP NO, SOMETHING HAPPENED @VA05687 01523000
  1274. LA R2,16 SET UP FOR 16 RETRIES @VA05687 01524000
  1275. HIORLOOP HDV 0(R1) TRY AGAIN TO HALT THE DEVICE @VA05687 01525000
  1276. AIF (NOT &TRACE(9)).TRHIOR @VA05687 01526000
  1277. BAL R15,TRACESUB TRACE THE HIO @VA05687 01527000
  1278. DC X'0F00' HIO TRACE TABLE CODE @VA05687 01528000
  1279. .TRHIOR ANOP 01529000
  1280. BC 8+2+1,HIOBR IF IT WORKED, USE NORMAL CODE @VA05687 01530000
  1281. CLI CSW+4,SM+BUSY+CUE DID IT WORK? @VA05687 01531000
  1282. BNE HIOCC1 YES, CHECK IT OUT @VA05687 01532000
  1283. BCT R2,HIORLOOP RETRY @VA05687 01533000
  1284. * OTHERWISE WE WILL ASSUME THAT NOTHING IS REALLY ACTIVE 01534000
  1285. SPACE 01535000
  1286. IOSCC1 OI IOBSTAT,IOBCC1 SET CC = 1 IN THE IOBLOK 01536000
  1287. IOSCCSET EQU * 01537000
  1288. SLR R2,R2 CLEAR RESTART INDEX 01538000
  1289. MVC IOBCSW,CSW AND SAVE THE CSW 01539000
  1290. TM CSW+5,CDC+CCC+IFCC ARE THERE ANY CHANNEL ERRORS ? 01540000
  1291. BZ IOSJ2 NO,SKIP 01541000
  1292. TM CSW,X'04' IS LOGOUT PENDING INDICATED ? @VA01068 01542000
  1293. BZ IOSCCH NO LOGOUT PEND - CALL DMKCCH @VA13318 01543000
  1294. SLR R1,R1 CLEAR WORK REG @VA13318 01543100
  1295. IC R1,IOBERCNT LOGOUT PEND / CCC RETRY COUNT @VA13318 01543200
  1296. C R1,F10 RETRY COUNT EXCEED 10 @VA13318 01543300
  1297. BH IOSFATAL YES, REFLECT TO USER @VA13318 01543400
  1298. LA R1,1(,R1) INCREMENT RETRY COUNT @VA13318 01543500
  1299. STC R1,IOBERCNT STORE IN IOBLOK @VA13318 01543600
  1300. B IOSQBSY QUEUE OFF THE CHANNEL @VA13318 01543700
  1301. IOSFATAL NI RCHSTAT,255-RCHBUSY TURN OFF CHANNEL BUSY @VA13318 01543800
  1302. NI RCUSTAT,255-RCUBUSY TURN OFF CONTROL UNIT BUSY @VA13318 01543900
  1303. NI RDEVSTAT,255-RDEVBUSY DEVICE NO LONGER BUSY @VA13318 01544000
  1304. XC RDEVAIOB,RDEVAIOB CLEAR ACTIVE IOBLOK @VA13318 01544100
  1305. OI IOBSTAT,IOBFATAL FATAL I/O IF EXCEED 10 RETRIES @VA13318 01544200
  1306. CALL DMKSTKIO STACK THE IOBLOK @VA13318 01544300
  1307. B IOSTEXIT EXIT TO CALLER @VA13318 01544400
  1308. IOSCCH NI RDEVSTA2,255-RDEVBUCH RESET DEVICE BUSY ON CHAN @VA13318 01544500
  1309. AIF (NOT &AP).APCHK6 01545000
  1310. TM APSTAT1,APUOPER RUNNING AP ? @VA08540 01546000
  1311. BZ CCHDO NO - CALL CCH @VA08540 01547000
  1312. L R15,=A(DMKLOKSY+2) GET ADDRESS OF SYSTEM LOCK @VA08540 01548000
  1313. CLC LPUADDR,0(R15) DO WE HOLD SYSTEM LOCK @VA08540 01549000
  1314. BE CCHDO YES- CALL CCH @VA08540 01550000
  1315. LOCK OBTAIN,TYPE=SYS,SPIN=NO,SAVE GET THE LOCK @VA08540 01551000
  1316. BE CCHNT2 @VA08540 01552000
  1317. LA R1,X'F00' CHANNEL MASK @VA08540 01553000
  1318. LH R3,INTTIO GET DEVICE ADDRESS @VA08540 01554000
  1319. NR R1,R3 CHANNEL ADDRESS @VA08540 01555000
  1320. SRL R1,8 POSITION FOR COUNT @VA08540 01556000
  1321. L R2,CHANOFF CHANNEL MASK BIT @VA08540 01557000
  1322. SRL R2,0(R1) POSITION BIT MASK @VA08540 01558000
  1323. X R2,FFS INVERT BITS @VA08540 01559000
  1324. STCTL C2,C2,TEMPSAVE STORE CONTROL REG 2 @VA08540 01560000
  1325. N R2,TEMPSAVE DISABLE FAILING CHANNEL @VA08540 01561000
  1326. ST R2,TEMPSAVE STORE UPDATED CONTROL REG @VA08540 01562000
  1327. LCTL C2,C2,TEMPSAVE LOAD UPDATED CONTROL REG @VA08540 01563000
  1328. LA R0,CPEXSIZE GET SIZE OF A CPEXBLOK @VA08540 01564000
  1329. CALL DMKFREE OBTAIN A CPEXBLOK FROM FREE STOR @VA08540 01565000
  1330. USING CPEXBLOK,R1 ADDRESSIBILITY TO CPEXBLOK @VA08540 01566000
  1331. LA R15,CCHUNST1 LOAD ADDR RETURN POINT @VA08540 01567000
  1332. STM R15,R12,CPEXADD SAVE REGISTERS @VA08540 01568000
  1333. XC CPEXR13,CPEXR13 INDICATE NO SAVEAREA UPON RETURN@VA08540 01569000
  1334. MVC CPEXPROC,LPUADDR IND UNSTACKING ON THIS PROC @VA08540 01570000
  1335. CALL DMKSTKLF STACK A PRIORITY CPEXBLOK @VA08540 01571000
  1336. GOTO DMKDSPRU RETURN TO DISPATCHER @VA08540 01572000
  1337. DROP R1 @VA08540 01573000
  1338. CCHUNST1 DS 0H ENTERED VIA CPEXBLOK @VA08540 01574000
  1339. ST R6,PTHSAVE RE-EST RCHBLOK/RCUBLOK ADDR @VA08540 01575000
  1340. ST R7,PTHSAVE+4 IN CASE OF LOST CONTROL @VA08540 01576000
  1341. LA R1,X'F00' CHANNEL MASK @VA08540 01577000
  1342. NR R1,R3 GET INTERUPT ADDRESS @VA08540 01578000
  1343. SRL R1,8 SHIFT FOR COUNT @VA08540 01579000
  1344. L R2,CHANOFF CHANNEL MASK BIT @VA08540 01580000
  1345. SRL R2,0(R1) CORRECT POSITION BIT @VA08540 01581000
  1346. STCTL C2,C2,TEMPSAVE STORE CONTROL REG FOR UPDATING @VA08540 01582000
  1347. O R2,TEMPSAVE REENABLE FAILING CHANNEL @VA08540 01583000
  1348. ST R2,TEMPSAVE STORE UPDATED CONTROL REG @VA08540 01584000
  1349. LCTL C2,C2,TEMPSAVE LOAD UPDATED CONTROL REG @VA08540 01585000
  1350. B CCHDO CALL DMKCCHIS @VA08540 01586000
  1351. CCHNT2 CALL DMKCCHIS,AFFINITY RECORD THE ERROR @VA08540 01587000
  1352. LOCK RELEASE,TYPE=SYS,SAVE GIVE BACK THE LOCK @VA08540 01588000
  1353. B CCHDONE @VA08540 01589000
  1354. .APCHK6 ANOP 01590000
  1355. CCHDO EQU * @VA08540 01591000
  1356. CALL DMKCCHIS,AFFINITY YES--RECORD AND RETURN @V407593 01592000
  1357. CCHDONE NI RCHSTAT,X'FF'-RCUBUSY CHANNEL NO LONGER BUSY @VA08540 01593000
  1358. NI RCUSTAT,X'FF'-RCUBUSY RESET CU BUSY @VA03511 01594000
  1359. B IOSIOERR GO CALL ERP 01595000
  1360. SPACE 01596000
  1361. IOSJ2 EQU * 01597000
  1362. TM IOBCSW+4,UC UNIT CHECK PRESENT ?? 01598000
  1363. BZ IOSPCI1 NO -- GO TEST FOR PCI 01599000
  1364. NI RDEVSTA2,X'FF'-RDEVBUCH RESET DEVICE BUSY WITH CHANNEL 01600000
  1365. BAL R5,IOSENSE GO ATTEMPT TO START SENSE 01601000
  1366. B IOSTEXIT +0 - SENSE STARTED, EXIT @V407438 01602000
  1367. OI IOBSTAT,IOBFATAL +4 - BAD NEWS IF CAN'T SENSE @V407438 01603000
  1368. NI IOBFLAG,X'FF'-IOBRSTRT CLEAR RESTART FLAG @VA01327 01604000
  1369. BAL R5,IOSRECER REOCRD THE I/O ERROR 01605000
  1370. B IOSRSTDV GO RESTART DEV W/ NEXT IO REQUEST@V407438 01606000
  1371. SPACE 01607000
  1372. IOSPCI1 TM IOBCSW+5,PCI PCI IN STATUS ? 01608000
  1373. BZ IOSCKBDE NO -- CONTINUE 01609000
  1374. TM IOBCSW+5,PRGC+PRTC+CHC CHANNEL PROG., PROT. @VA01599 01610000
  1375. * CHECK OR CHAINING 01611000
  1376. BNZ IOSCKBDE YES -- STACK THE IOBLOK 01612000
  1377. CLI IOBCSW+4,0 ACCOMPANIED BY ANY UNIT STATUS ? 01613000
  1378. BNE IOSCKBDE YES - PRESENT ALL AT ONCE 01614000
  1379. SPACE 01615000
  1380. BAL R5,COPYIOB GO COPY AND STACK THE IOBLOK 01616000
  1381. NI IOBSTAT,X'FF'-IOBCC3 REMOVE CONDITION CODE 01617000
  1382. B IOSTEXIT AND LEAVE 01618000
  1383. SPACE 1 01619000
  1384. IOSCKBDE NI RCHSTAT,X'FF'-RCHBUSY @VA00931 01620000
  1385. TM IOBCSW+4,CE+BUSY IF CE AND BUSY @VA06008 01621000
  1386. BO DEVCLEAR - OR - @VA06008 01622000
  1387. TM IOBCSW+4,DE+BUSY IF DE AND BUSY @VA06008 01623000
  1388. BO DEVCLEAR DECIDE TO RESTART OR REFLECT @VA05686 01624000
  1389. SPACE 01625000
  1390. TM IOBCSW+4,CUE CONTROL UNIT END ?? 01626000
  1391. BO IOSTART YES- RETRY SIO (HOPE ITS CLEARED)@VA00849 01627000
  1392. TM IOBSPEC,IOBIMSTK SHUTDOWN FUNCTION ? @VA05361 01628000
  1393. BO IOSSTACK YES,GIVE IOBLOK STATUS @VA05361 01629000
  1394. SPACE 01630000
  1395. SPACE 01631000
  1396. CLI CSW+4,BUSY+SM IS THE CONTROL UNIT BUSY ? 01632000
  1397. BE IOSCBUSY YES, QUEUE AND WAIT FOR CU END 01633000
  1398. SPACE 01634000
  1399. NI RCUSTAT,X'FF'-RCUBUSY FFLAG CU NOT BUSY 01635000
  1400. SPACE 01636000
  1401. CLI CSW+4,BUSY IS THE DEVICE BUSY ?? 01637000
  1402. BNE IOSCKDE NO -- GO TEST FOR DEVICE FREE 01638000
  1403. TM IOBSPEC,IOBTIO+IOBHIO TIO OR HIO REQUEST @VA04182 01639000
  1404. BNZ IOSTCK YES- STACK THE IOB @VA04182 01640000
  1405. B IOSDBUSY NO, CHECK ON IT FURTHER @VA05417 01641000
  1406. * VA05417 01642000
  1407. SPACE 01643000
  1408. DEVCLEAR TM IOBFLAG,IOBCP+IOBHVC+IOBERP SEE IF VIRT SIO @VA05686 01644000
  1409. BNZ IOSTART IF NOT, JUST RESTART @VA05686 01645000
  1410. TM IOBSPEC,IOBTIO+IOBHIO ENSURE SIO @VA05686 01646000
  1411. BNZ IOSTART OTHERWISE RESTART @VA05686 01647000
  1412. TM RDEVSTAT,RDEVDED IS DEVICE DEDICATED? @VA05686 01648000
  1413. BZ IOSTART NO, DONT REFLECT BUSY @VA05686 01649000
  1414. NI RCUSTAT,X'FF'-RCUBUSY CLEAR CU BUSY @VA05686 01650000
  1415. B IOSTCK STACK THE IOBLOK @VA05686 01651000
  1416. IOSCKDE DS 0H 01652000
  1417. TM IOBCSW+4,CE IS THE DEVICE FREE ?? 01653000
  1418. BZ IOSTCK YES -- GO STACK THE IOBLOK 01654000
  1419. TM IOBCSW+4,DE+ATTN ONE MORE TEST 01655000
  1420. BNZ IOSTCK YES -- STACK THE IOBLOK AND RESTART 01656000
  1421. SPACE 01657000
  1422. TM IOBSPEC,IOBTIO+IOBHIO TIO OR HIO REQUEST @VA04182 01658000
  1423. BNZ IOSTCK YES- RETURN WITH STATUS @VA04182 01659000
  1424. TM IOBSTAT,IOBFATAL IS THIS THE LAST INT FROM *01660000
  1425. A HALT ACTIVE REQUEST 01661000
  1426. BO IOSTCK YES- RETURN TO CALLER WITH STATUS@VA04182 01662000
  1427. BAL R5,COPYIOB COPY THE CHANNEL END IOBLOK AND STACK IT 01663000
  1428. NI IOBSTAT,X'FF'-IOBCC3 AND RESTORE THE ZERO CONDITION 01664000
  1429. B IOSRSTCU GO RESTART THE CONTROL UNIT AND CHANNEL 01665000
  1430. SPACE 3 01666000
  1431. IOSCC3 EQU * HERE FOR CC = 3 -- 01667000
  1432. TM RDEVSTA2,RDEVRACT ACTIVE DEVICE BEING RESET? 01668000
  1433. BZ RESTSTA2 NO- BRANCH 01669000
  1434. NI IOBSPEC,X'FF'-(IOBTIO+IOBHIO) RESET SPEC BITS IF ON 01670000
  1435. RESTSTA2 NI RDEVSTA2,X'FF'-(RDEVBUCH+RDEVRACT) RESET BITS IF ON 01671000
  1436. OI IOBSTAT,IOBCC3+IOBFATAL FATAL ERROR, CC = 3 @VM08891 01672000
  1437. NI IOBFLAG,255-IOBRSTRT DO NOT RESTART THE I/O @VM08891 01673000
  1438. NI RCHSTAT,255-RCHBUSY CHANNEL NO LONGER BUSY @VM08891 01674000
  1439. NI RCUSTAT,255-RCUBUSY CTL UNIT NO LONGER BUSY @VM08891 01675000
  1440. NI RDEVSTAT,255-RDEVBUSY DEVICE NOT BUSY @VM08891 01676000
  1441. SPACE 2 01677000
  1442. IOSTCK DS 0H 01678000
  1443. TM CSW+5,PRGC+PRTC+CHC PROGRAM PROTECTION OR CHAINING ERR 01679000
  1444. BZ IOSSTACK NO, STACK IOB & RESTART DEVICE @V407438 01680000
  1445. TM IOBSPEC,IOBIMSTK SHUTDOWN FUNCTION ? @VA05361 01681000
  1446. BO IOSSTACK YES, GIVE IOBLOK STATUS @VA05361 01682000
  1447. BAL R5,IOSENSE GO BUILD AN IOERBLOK 01683000
  1448. B IOSIOERR AND RETRY AND/OR RECORD THE ERROR 01684000
  1449. EJECT 01685000
  1450. IOSCBUSY EQU * HERE IF CU IS BUSY 01686000
  1451. TM RCUTYPE,RCUSUB IS IT A SUBORDINATE CU @VA07009 01687000
  1452. BZ *+8 NO...BRANCH @VA07009 01688000
  1453. L R7,RCUPRIME GET ADDRESS OF THE PRIME @VA07009 01689000
  1454. L R1,RCUFIOB GET POINTER TO IOBLOK QUEUE 01690000
  1455. BAL R4,IOSQCUSK AND RE-QUEUE THE IOBLOK FIRST 01691000
  1456. LH R4,RCUQCNT ADD 1 TO COUNT OF IOBLOCKS @VA01044 01692000
  1457. LA R4,1(R4) QUEUED OFF THIS CONTROL UNIT 01693000
  1458. STH R4,RCUQCNT @VA01044 01694000
  1459. SR R2,R2 CLEAR I/O RESTART INDEX 01695000
  1460. ST R2,RDEVAIOB CLEAR ACTIVE IOBLOK POINTER 01696000
  1461. OI RDEVSTAT,RDEVSCED DEVICE IS SCHEDULED @VA04452 01697000
  1462. B IOSRSTCH AND RESTART THE CHANNEL 01698000
  1463. SPACE 01699000
  1464. IOSDBUSY EQU * HERE IF DEVICE IS BUSY 01700000
  1465. TM IOBFLAG,IOBSPLT WAS THIS A SPLIT SEEK? @VA03732 01701000
  1466. BNO LOCBUSY1 NO @VA05417 01702000
  1467. NI IOBFLAG,X'FF'-(IOBRELCU+IOBSPLT) UNFLAG IT @VA03732 01703000
  1468. L R1,IOBCAW GET FIRST CCW @VA02011 01704000
  1469. OI 4(R1),CC RECHAIN THE SEEK @VA02011 01705000
  1470. SPACE 01706000
  1471. LOCBUSY1 EQU * @VA05417 01707000
  1472. TM RDEVSTAT,RDEVDED DEDICATED DEVICE? @VA05417 01708000
  1473. BNO REQUEUE NO, REQUEUE THE TASK @VA05417 01709000
  1474. TM IOBFLAG,IOBHVC WAS THIS DIAGNOSE @VA07486 01710000
  1475. BO REQUEUE YES, REQUEUE IT @VA07486 01711000
  1476. TM RDEVSTA2,RDEVCONC CONTINGENT CONNECTION? @VA05417 01712000
  1477. BNO IOSTCK NO,STACK THE BLOCK @VA07486 01713000
  1478. REQUEUE EQU * @VA02011 01714000
  1479. LA R1,RDEVIOBL ADDR OF LOCK-WORD IN RDEVBLOK @VA10824 01714100
  1480. LOCK OBTAIN,TYPE=PRIVATE,SPIN=YES LOCK THE IOB'S @VA10824 01714200
  1481. BAL R4,IOSQDEV AND REQUEUE THE IOBLOK FROM THE DEVICE 01715000
  1482. SR R2,R2 CLEAR I/O RESTART INDEX 01716000
  1483. ST R2,RDEVAIOB CLEAR THE ACTIVE IOBLOK POINTER 01717000
  1484. LA R1,RDEVIOBL ADDR OF LOCK-WORD IN RDEVBLOK @VA10824 01717100
  1485. LOCK RELEASE,TYPE=PRIVATE RELEASE THE IOB'S @VA10824 01717200
  1486. B IOSRSTCU AND RESTART THE CONTROL UNIT 01718000
  1487. SPACE 3 01719000
  1488. AIF (NOT &TRACE(9)).TRACE9 01720000
  1489. TRACESUB TM TRACFLG2,TRACBEF TRACING ACTIVE? 01721000
  1490. BZ NOTRAC9 BRANCH IF NOT 01722000
  1491. IC R4,0(R15) R4 GETS TRACE-CODE FROM CALLER @V407593 01723000
  1492. * THEN GET TRACE-TABLE PRT AND @V407593 01724000
  1493. * FLAG ENTRY (SIO=0B TIO=0E HIO=0F)@V407593 01725000
  1494. TRACE CODE=(R4),R14,R0,R5 @V4M0000 01726000
  1495. STCM R15,B'1000',1(R14) SAVE CONDITION CODE 01727000
  1496. NI 1(R14),X'30' TURN OFF ILC AND PROGRAM MASK BITS 01728000
  1497. STH R1,2(,R14) SAVE DEVICE ADDRESS 01729000
  1498. ST R10,4(,14) SAVE IOBLOK ADDRESS 01730000
  1499. MVC 8(4,R14),CAW SAVE CAW 01731000
  1500. XC 12(4,R14),12(R14) CLEAR LAST FIELD 01732000
  1501. CLI 1(R14),X'10' CONDITION CODE 1 ? 01733000
  1502. BNE *+10 NO -- DON'T SAVE CSW 01734000
  1503. MVC 12(4,R14),CSW+4 SAVE RIGHT HALF OF CSW 01735000
  1504. NOTRAC9 EQU * 01736000
  1505. SPM R15 RESTORE CONDITION CODE 01737000
  1506. B 2(,R15) RETURN TO CALLER+2 01738000
  1507. .TRACE9 ANOP 01739000
  1508. EJECT 01740000
  1509. *. 01741000
  1510. * OPERATION OF IOSFINDP - 01742000
  1511. * 01743000
  1512. * IOSFINDP IS CALLED BY THE CHANNEL, CONTROL UNIT AND DEVICE 01744000
  1513. * RESTART ROUTINES TO LOCATE AN AVAILABLE PATH TO THE DEVICE. 01745000
  1514. * IT ATTEMPTS TO SCHEDULE THE I/O REQUEST ON THE FIRST PATH 01746000
  1515. * (CONTROL UNIT 'A' AND CHANNEL 'A'). IF MULTIPATH LOGIC 01747000
  1516. * HAS BEEN INCLUDED (IN DMKRIO) FOR THE DEVICE, ALTERNATE 01748000
  1517. * PATHS WILL BE EXAMINED, QUEUEING THE PRIMARY IOB ON THE 01749000
  1518. * FIRST BUSY PATH AND MINI IOB'S ON ANY ALTERNATE BUSY PATHS. 01750000
  1519. * IF AN AVAILABLE PATH IS FOUND, EXIT IS TAKEN TO THE FIRST 01751000
  1520. * LEVEL CALLER VIA R5 TO START THE I/O. 01752000
  1521. * IF NO AVAILABLE PATH IS FOUND, BUT THE I/O REQUEST HAS 01753000
  1522. * BEEN QUEUED ON ONE OR MORE PATHS, EXIT IS TAKEN TO THE 01754000
  1523. * MAINLINE CALLER VIA R3. 01755000
  1524. * IF NO AVAILABLE PATH IS FOUND AND THE REQUEST HAS NOT BEEN 01756000
  1525. * QUEUED ON ANY PATH (BECAUSE ALL PATHS ARE OFFLINE ETC.) 01757000
  1526. * THEN THE I/O REQUEST IS MARKED FATAL+CC3 AND THE IOB IS 01758000
  1527. * STACKED. EXIT IS THEN MADE TO THE MAINLINE CALLER VIA R3. 01759000
  1528. * 01760000
  1529. * WHEN IOSFINDP IS CALLED, THERE IS AN IOB POINTED TO 01761000
  1530. * BY R10 FOR WHICH A PATH MUST BE FOUND. IF, DURRING THE 01762000
  1531. * FINDPATH PROCESS, THAT IOB GETS QUEUED (AND THE R10QED BIT 01763000
  1532. * IS SET) THEN THE ROUTINE CONTINUES SEARCHING FOR PATHS, BUT 01764000
  1533. * IF ONE IS FOUND, A MINI-IOB MUST BE OBTAINED FROM THE 01765000
  1534. * MINI-IOB QUEUE BEFORE THE I/O CAN BE QUEUED ON THE PATH. 01766000
  1535. * A MINI-IOB IS NOT OBTAINED IMMEDIATELY BECAUSE OF PROCESSING 01767000
  1536. * TIME AND THE LIKELYHOOD OF NOT FINDING AN ALTERNATE PATH. 01768000
  1537. * CONSEQUENTLY, THE PATH AND STATUS INFORMATION IS KEPT IN 01769000
  1538. * THE FINDPATH STATUS AREA BELOW DURING THE SEARCH PROCESS. 01770000
  1539. * WHEN AN AVAILABLE PATH IS LOCATED, THE INFORMATION IS MOVED 01771000
  1540. * FROM THE FINDPATH STATUS AREA TO THE IOB. 01772000
  1541. * 01773000
  1542. * NOTE: IN GENERAL: 01774000
  1543. * R5 RETURNS TO IOSTART 01775000
  1544. * R3 RETURNS TO IOSQXIT (IF IOS ENTERED VIA CALL), 01776000
  1545. * OR TO DEQUEUE FROM CU (IF IOS ENTERED VIA INT 01777000
  1546. *. 01778000
  1547. SPACE 01779000
  1548. SPACE 01780000
  1549. DS 0F ALIGNMENT @V407438 01781000
  1550. PTHFLG1 DC X'00' FIND PATH FLAGS @V407438 01782000
  1551. SPACE 01783000
  1552. * BITS DEFINED IN THE PTHFLG1 FIELD 01784000
  1553. R10QED EQU X'80' R10 IOB HAS BEEN QED ON REAL BLKS@V407438 01785000
  1554. EXTPAG EQU X'40' SPECIAL CASE PAGING WHILE EXTEND @V407438 01786000
  1555. R7CUB EQU X'20' R7 REPRESENTS 2ND CTL UNIT @V407438 01787000
  1556. SPACE 01788000
  1557. CHINDEX DC X'00' CHANNEL INDEX @V407438 01789000
  1558. DEVADD DC H'0' DEVICE ADDRESS @V407438 01790000
  1559. SPACE 01791000
  1560. DMKIOSSV DS 0F RCH AND RCU ADDRESS @VA09587 01791100
  1561. PTHSAVE DC 2F'0' A(CHANNEL) & A(CTL UNIT) ON ENTRY@V407438 01792000
  1562. *OSIBLKS DC 2A(0) INTERRUPT CH/CU BLOCK ADDRS 01793000
  1563. *OSRBLKS DC 2A(0) RESTART CH/CU BLOCK ADDRS 01794000
  1564. ORIGR10 DC A(0) ADDRESS OF THE ORIGINAL R10 IOB @V407438 01795000
  1565. DMKIOSMQ DC A(0) MINI IOB QUEUE @V407438 01796000
  1566. DMKIOSNM DC F'0' COUNT OF DEPLETED MINI IOB STACK @V407438 01797000
  1567. GETMCT DC F'0' COUNT OF GOTMINI'S @V407438 01798000
  1568. DEQMCT DC F'0' COUNT OF IOSDQM'S @V407438 01799000
  1569. DQMSWP DC F'0' IOSDQM'S WHERE R10 IN = MINI IOB @V407438 01800000
  1570. SPACE 2 01801000
  1571. IOSFCH EQU * HERE TO FIND CHANNEL PATH TO DEV @V407438 01802000
  1572. ST R6,PTHSAVE SAVE R6 AND R7 IN CASE @VA07369 01803000
  1573. ST R7,PTHSAVE+4 EXIT ON R3 @VA07369 01804000
  1574. SLR R0,R0 CLEAR FIELDS @V407438 01805000
  1575. ST R0,PTHFLG1 CLEAR FLAGS, CH INDEX, DEV ADD @V407438 01806000
  1576. LH R1,IOBRADD GET CURRENT IOBRADD FIELD @V407438 01807000
  1577. STH R1,DEVADD PUT IN DEVADD, TO BE COMPLETED. @V407438 01808000
  1578. ST R10,ORIGR10 SAVE ORIGINAL IOB ADDRESS @V407438 01809000
  1579. TM IOBSTAT,IOBPATHF FIXED PATH I/O? @V407438 01810000
  1580. BZ IOSBLKS MUST RE-EST RDEVBLOK @VA07779 01811000
  1581. CALL DMKSCNRU GO GET THE CORRECT RCHADDR @V407438 01812000
  1582. B FINDEX AND CONTINUE... @V407438 01813000
  1583. SPACE 01814000
  1584. IOSFINDP EQU * HERE TO FIND A PATH TO THE DEVICE@V407438 01815000
  1585. ST R6,PTHSAVE STORE R6 AND R7 IN CASE @VA07369 01816000
  1586. ST R7,PTHSAVE+4 EXIT ON R3 @VA07369 01817000
  1587. SLR R0,R0 SET CHANNEL INDEX TO ZERO @V407438 01818000
  1588. ST R0,PTHFLG1 CLEAR FLAGS, CH INDEX, DEV ADD @V407438 01819000
  1589. ST R10,ORIGR10 SAVE ORIGINAL IOB ADDRESS @V407438 01820000
  1590. TM IOBSTAT,IOBPATHF IOBRADD COMPLETE (FIXED PATH)? @V407438 01821000
  1591. BZ IOSGETCU NOPE, BR. @V407438 01822000
  1592. LH R0,IOBRADD GET THE PATH ADDR AND SAVE FOR...@V407438 01823000
  1593. STH R0,DEVADD LATER. R6, R7 & R8 ALREADY SET UP@V407438 01824000
  1594. B IOSFNDCU NOW GO CHECK CU STATUS ETC. @V407438 01825000
  1595. SPACE 01826000
  1596. IOSGETCU L R7,RDEVCUA GET FIRST CONTROL UNIT @V407438 01827000
  1597. IOSDEVAD TM PTHFLG1,R10QED HAS IOBLOK BEEN QUEUED? @VA07369 01828000
  1598. BO SKIPADDR DON'T MODIFY IOBRADD @VA07369 01829000
  1599. MVC IOBRADD,RDEVADD RDEVADD TO IOBLOK @VA07369 01830000
  1600. OC IOBRADD,RCUADD OR IN CONTROL UNIT ADDRESS @VA07369 01831000
  1601. SKIPADDR TM RCUTYPE,RCUSUB IS THIS SUBORDINATE CU @VA07369 01832000
  1602. BZ *+8 NO, BRANCH @VA07369 01833000
  1603. L R7,RCUPRIME YES, POINT TO PRIME CU @VA07369 01834000
  1604. TM RDEVSTA2,RDEVALT ALT PATH DEVICE @VA07369 01835000
  1605. BZ IOSCHTIO NO,TAKE SHORT PATH @VA09242 01836050
  1606. TM PTHFLG1,R7CUB PRCESSING 2ND CU PATH ? @VA08913 01836100
  1607. BO IOSFNDCU YES, CUA SET BY IOSNOSCN @VA08913 01836200
  1608. LH R0,IOBRADD MUST SAVE ADDRESS WE START WITH @VA07369 01837000
  1609. STH R0,DEVADD ... @VA07369 01838000
  1610. SPACE 01839000
  1611. * FOLLOWING TEST PUT IN TO ALLOW A TIO FOR A SPECIFIC PATH 01840000
  1612. * REQUEST EVEN IF CTL UNIT IS OFFLINE. 01841000
  1613. SPACE 01842000
  1614. IOSFNDCU EQU * @VA08547 01843000
  1615. TM IOBSPEC,IOBTIO DO WE HAVE A TIO ?? @VA08547 01844000
  1616. BZ IOSCKCUD IF NOT TREAT NORMALLY @VA08547 01845000
  1617. TM IOBSTAT,IOBPATHF SPECIFIC PATH ??? @VA08547 01846000
  1618. BO IOSCKCUB IF IT IS - BYPASS OFFLINE CHK @VA08547 01847000
  1619. IOSCKCUD EQU * @VA08547 01848000
  1620. TM RCUSTAT,RCUDISA IS CU OFFLINE ?? @VA08547 01849000
  1621. BO IOSTNCU YUP, BR. GO TRY NEXT CTL UNIT @V407438 01850000
  1622. IOSCKCUB EQU * @VA08547 01851000
  1623. TM RCUSTAT,RCUBUSY IS IT BUSY ?? @V407438 01852000
  1624. BO IOSQTNCU YUP, BR. GO Q AND TRY NEXT CU @V407438 01853000
  1625. FNDCU L R2,PREFIXA GET PROCESSOR PREFIX ADDR @VA07369 01854000
  1626. CLI XTNDLOCK-PSA(R2),SET IN EXTEND?? @V407593 01855000
  1627. BNE IOSCONT NOPE, CONTINUE. @V407438 01856000
  1628. TM IOBFLAG,IOBPAG IS THIS IOBLOK FOR PAGING? @V407438 01857000
  1629. BZ IOSCONT NO - CONTINUE @V407438 01858000
  1630. OI PTHFLG1,EXTPAG FLAG SPECIAL CASE: EXTEND+PAGING @V407438 01859000
  1631. B IOSGETCH CONTINUE WITH CHANNEL PROCESSING @V407438 01860000
  1632. SPACE 01861000
  1633. IOSCONT EQU * @V407438 01862000
  1634. TM RCUSTAT,RCUSCED IS C.U. ALREADY SCHEDULED ?? @V407438 01863000
  1635. BO IOSCKREL YA, SEE IF THIS TASK WILL REL IT @V407438 01864000
  1636. C R7,RCUFIOB ANY TASKS ALREADY QUEUED HERE ?? @V407438 01865000
  1637. BE IOSCKCU NO -- GO CHECK OUT CU TYPE @V407438 01866000
  1638. IOSCKREL TM IOBFLAG,IOBRELCU THIS REQ. RELEASE THE C.U.?? @V407438 01867000
  1639. BO IOSCKCU REL. CU, CONT. AND FIND CH @VA07369 01868000
  1640. TM IOBSTAT,IOBPATHF FIXED PATH I/O ? @VA07369 01869000
  1641. BO IOSQTNCU YES, QUEUE ON CONTROL UNIT @VA07369 01870000
  1642. TM RDEVSTA2,RDEVALT ALT. PATH DEVICE @VA07369 01871000
  1643. BZ IOSQUECU NO SKIP OVERHEAD @VA07369 01872000
  1644. B IOSQTNCU TRY ALT. PATHS IF AVAIL. @VA07369 01873000
  1645. IOSCKCU TM RCUTYPE,RCUSHRD WILL UNIT BE TIED UP ?? @V407438 01874000
  1646. BZ IOSGETCH NO -- NO NEED TO FLAG SCHEDULED @V407438 01875000
  1647. OI RCUSTAT,RCUSCED FLAG IT @V407438 01876000
  1648. IOSGETCH DS 0H @V407438 01877000
  1649. TM IOBSTAT,IOBPATHF IS THIS A FIXED PATH TASK? @V407438 01878000
  1650. BZ IOSFNDCH NO, MUST DETERMINE IF ALT. PATH @VA07369 01879000
  1651. FINDEX ST R3,ORIGR10 SAVE R3 TEMPORARILY @V407438 01880000
  1652. LA R1,RCUCHA GET ADDR OF FIRST CHANNEL PATH @V407438 01881000
  1653. LA R2,4 INDEX VALUE @V407438 01882000
  1654. LA R3,RCUCHD ADDR OF LAST CHANNEL PATH @V407438 01883000
  1655. NEXTCHA CL R6,0(R1) IS THIS THE PATH WERE ON? @V407438 01884000
  1656. BE *+8 YES, BR. @V407438 01885000
  1657. BXLE R1,R2,NEXTCHA NOPE, KEEP LOOKING @V407438 01886000
  1658. LA R2,RCUCHA ADDR OF THE FIRST PATH AGAIN @V407438 01887000
  1659. SLR R1,R2 CREATE THE CHANNEL INDEX @V407438 01888000
  1660. L R3,ORIGR10 RESTORE R3 @V407438 01889000
  1661. B CHFND AND CONTINUE... @V407438 01890000
  1662. SPACE 01891000
  1663. BUMPCH SLR R6,R6 CLEAR FOR INSERT @V407438 01892000
  1664. IC R6,CHINDEX GET CURRENT CHANNEL INDEX @V407438 01893000
  1665. LR R1,R6 SAVE THE CHANNEL INDEX @V407438 01894000
  1666. L R6,RCUCHA(R6) GET NEXT CHANNEL @V407438 01895000
  1667. LTR R6,R6 DOES THIS CHANNEL EXIST? @V407438 01896000
  1668. BZ IOSTNCU NOPE, MAYBE MORE CHANS ON NEXT CU@V407438 01897000
  1669. TM PTHFLG1,R10QED HAS PRIME IOB BEEN QUEUED? @VA07305 01898000
  1670. BO CHFND YES, ADDR ALREADY IN IOB @VA07305 01899000
  1671. MVC IOBRADD(1),RCHADD ADDR TO IOBRADD IN CASE CC3 @V4M0216 01900000
  1672. CHFND SRL R1,2 CVT CHAN INDEX TO VALUE BETWN 0-3@V407438 01901000
  1673. IC R1,DISATBL(R1) GET PROPER CU TO CH PATH BIT @V407438 01902000
  1674. SPACE 01903000
  1675. * FOLLOWING TEST MADE TO ALLOW TIO FOR SPECIFIC PATH 01904000
  1676. * REQUEST EVEN IF CHANNEL OFFLINE 01905000
  1677. SPACE 01906000
  1678. TM IOBSPEC,IOBTIO IS IT A TIO ??? @VA08547 01907000
  1679. BZ IOSCKCHD IF NOT - DO NORMAL CHECK @VA08547 01908000
  1680. TM IOBSTAT,IOBPATHF SPECIFIC PATH REQUESTED ?? @VA08547 01909000
  1681. BO IOSLOCCH IF SO - BYPASS OFFLINE CHECK @VA08547 01910000
  1682. IOSCKCHD EQU * @VA08547 01911000
  1683. EX R1,CUCHPTH (TM RCUSTAT,RCUCHXOF) PTH AVAIL? @V407438 01912000
  1684. BO IOSTNCH NOPE, BR. GO TRY NEXT CHANNEL @V407438 01913000
  1685. IOSLOCCH EQU * @VA08547 01914000
  1686. IC R0,RCHADD GET THE CHANNEL ADDRESS @V407438 01915000
  1687. STC R0,DEVADD AND COMPLETE THE PATH ADDRESS @V407438 01916000
  1688. TM RCHSTAT,RCHBUSY IS IT BUSY ?? @V407438 01917000
  1689. BO IOSQTNCH YUP, BR. GO Q AND TRY NEXT CHAN @V407438 01918000
  1690. TM RCHTYPE,RCHMPX BYTE MULTIPLEXER CHANNEL ? @V407438 01919000
  1691. BO IOSFNDP YES, ITS NEVER BUSY @V407438 01920000
  1692. TM PTHFLG1,EXTPAG IS THIS THE SPECIAL CASE? @V407438 01921000
  1693. BO IOSFNDP YES, SKIP THE QUEUE CHECK @V407438 01922000
  1694. C R6,RCHFIOB ANY ONE ELSE QUEUED AHEAD OF US? @V407438 01923000
  1695. BNE IOSQTNCH YUP, GO QUEUE AND TRY NEXT CH @V407438 01924000
  1696. * HERE WHEN A PATH HAS BEEN FOUND 01925000
  1697. IOSFNDP EQU * @V407438 01926000
  1698. TM PTHFLG1,R10QED HAS THE R10 IOB BEEN QUEUED? @V407438 01927000
  1699. BZ SETADDR NOPE, OK TO USE IT AS IS, BR. @V407438 01928000
  1700. L R10,ORIGR10 YES, GET THE ORIGINAL R10 IOB @V407438 01929000
  1701. L R2,=A(DMKRIOCU) GET START OF RCUBLOKS @VA08355 01930000
  1702. LA R0,0(R2) CLEAR HI ORDER BYTE @VA08355 01931000
  1703. L R2,=A(DMKRIOCT) GET LOOP DELIMIT ADDRESS @VA08355 01932000
  1704. LA R2,0(R2) CLEAR HI ORDER BYTE @VA08355 01933000
  1705. LR R1,R10 GET IOBLOK TO DEQUEUE @VA08355 01934000
  1706. GETRBLOK DS 0H @VA08355 01935000
  1707. L R1,IOBBPNT-IOBLOK(R1) GET PREVIOUS IOBLOK @VA08355 01936000
  1708. LA R1,0(R1) CLEAR HI ORDER BYTE @VA08355 01937000
  1709. CR R1,R2 RCH-RCU BLOK ??? @VA08355 01938000
  1710. BNL GETRBLOK NO, ROTATE TO NEXT BLOK @VA08355 01939000
  1711. CR R1,R0 IOBLOK IN UNLOCKED V=R ??? @VA08355 01940000
  1712. BL GETRBLOK YES, ROTATE TO NEXT BLOK @VA08355 01941000
  1713. LH R2,RCUQCNT-RCUBLOK(R1) GET QUEUE COUNT @VA08355 01942000
  1714. BCTR R2,0 FROM BLOK AND DECREMENT @VA08355 01943000
  1715. STH R2,RCUQCNT-RCUBLOK(R1) AND SAVE NEW COUNT @VA08355 01944000
  1716. LM R1,R2,IOBFPNT DEQUEUE THE ORIGINAL IOB @V407438 01945000
  1717. ST R1,IOBFPNT-IOBLOK(R2) FROM THE REAL BLOCKS @V407438 01946000
  1718. ST R2,IOBBPNT-IOBLOK(R1) ... @V407438 01947000
  1719. CLR R1,R2 DID WE JUST DEQUEUE THE LAST ONE?@V407438 01948000
  1720. BNE SETADDR NOPE, CONTINUE @V407438 01949000
  1721. NI RCUSTAT-RCUBLOK(R1),X'FF'-RCUSCED UNMARK SCED'D @V407438 01950000
  1722. SETADDR LH R0,DEVADD PICK UP THE PATH ADDRESS @V407438 01951000
  1723. STH R0,IOBRADD AND PUT IT IN THE IOB @V407438 01952000
  1724. LTR R13,R13 IS THIS A RESTART OPERATION? @V407438 01953000
  1725. BNZR R5 NOPE, RETURN FORTHWITH @V407438 01954000
  1726. L R0,PTHSAVE GET ENTRY CHANNEL ADDR @V407438 01955000
  1727. L R1,PTHSAVE+4 GET ENTRY CONTROL UNIT @V407438 01956000
  1728. CLR R0,R6 CURRENT CHANNEL SAME AS ENTRY? @V407438 01957000
  1729. BNE CKCHRSTQ NOPE, GO CHECK OUT THE RESTART Q @V407438 01958000
  1730. CLR R1,R7 YUP, IS CURR CU SAME AS ENTRY? @V407438 01959000
  1731. BER R5 YA, NOTHING CHANGD, RET TO DO I/O@V407438 01960000
  1732. CL R7,RCURSTQ ANYTHING ON THE CU RESTART Q? @V407438 01961000
  1733. BE SCURSTQ NOPE, GO SETUP CU RESTART @V407438 01962000
  1734. CL R1,RCURSTQ IS IT THE SAME AS ENTRY VALUE? @V407438 01963000
  1735. BNE IOS8 NOPE, BAD NEWS. @V407438 01964000
  1736. SCURSTQ ST R1,RCURSTQ SET THIS CU TO RESTART ENTRY ONE @V407438 01965000
  1737. CKCHRSTQ CL R6,RCHRSTQ DOES CH HAVE A RESTART VALUE? @V407438 01966000
  1738. BE SCHRSTQ NOPE, GO SET UP CH RESTART @V407438 01967000
  1739. CL R0,RCHRSTQ IS IT THE SAME AS THE ENTRY VALUE@V407438 01968000
  1740. BNE IOS8 NOPE, BAD NEWS. @V407438 01969000
  1741. SCHRSTQ ST R0,RCHRSTQ SET CHANNEL TO RESTART ENTRY ONE @V407438 01970000
  1742. BR R5 RETURN TO START THE I/O @V407438 01971000
  1743. SPACE 1 01971100
  1744. IOSCHTIO EQU * @VA09242 01971200
  1745. TM IOBSPEC,IOBTIO TEST I/O ? @VA09242 01971300
  1746. BZ IOSCU NO, CHECK OFFLINE @VA09242 01971400
  1747. TM IOBSTAT,IOBPATHF FIXED PATH ? @VA09242 01971500
  1748. BO IOSCUGO YES, DO NOT CHECK OFFLINE @VA09242 01971600
  1749. SPACE 01972000
  1750. IOSCU TM RCUSTAT,RCUDISA CONTROL UNIT OFFLINE @VA07369 01973000
  1751. BO IOSNOPTH NO AVAILABLE PATH, CC=3 @VA07369 01974000
  1752. IOSCUGO EQU * @VA09242 01974500
  1753. TM RCUSTAT,RCUBUSY CONTROL UNIT BUSY? @VA07369 01975000
  1754. BZ FNDCU NO, WE FOUND ONE; LOOK AT CH @VA07369 01976000
  1755. IOSQUECU BAL R4,IOSQCU QUEUE IOBLOK OFF RCUBLOK @VA07369 01977000
  1756. B IOSPTHEX RESTORE R6/R7 AS OF ENTRY @VA07369 01978000
  1757. SPACE 01979000
  1758. IOSBLKS ICM R1,B'0010',RCHADD RE-EST BLOCKS IN CASE @VA07779 01980000
  1759. * ENTERED WITH DIFFERENT R8 = RDEVBLOK 01981000
  1760. CALL DMKSCNRU REACQUIRE BLOCKS @VA07779 01982000
  1761. SPACE 01983000
  1762. IOSFNDCH TM RDEVSTA2,RDEVALT ALT. PATH DEVICE @VA07369 01984000
  1763. BO BUMPCH YES, INCUR OVERHEAD PROCESSING @VA07369 01985000
  1764. L R6,RCUCHA GET CHANNEL ADDRESS @VA07369 01986000
  1765. MVC IOBRADD(1),RCHADD COMPLETE ADDR IN IOBLOK @VA07369 01987000
  1766. TM RCUSTAT,RCUCHAOF IS CHANNEL PATH OFFLINE? @VA07369 01988000
  1767. BO IOSNOPTH YES, COULDN'T GET TO DEVICE @VA07369 01989000
  1768. TM RCHSTAT,RCHBUSY IS CHANNEL BUSY @VA07369 01990000
  1769. BO IOSQUECH YES, GO QUEUE @VA07369 01991000
  1770. TM RCHTYPE,RCHMPX BYTE MULTIPLEXER CHANNEL? @VA07369 01992000
  1771. BOR R5 ITS NEVER BUSY; WE HAVE PATH @VA07369 01993000
  1772. TM PTHFLG1,EXTPAG SPECIAL CASE (EXTEND + PAGING)? @VA07369 01994000
  1773. BOR R5 YES, GET IT GOING @VA07369 01995000
  1774. C R6,RCHFIOB ANYONE QUEUED AHEAD OF US @VA07369 01996000
  1775. BER R5 NO @VA07369 01997000
  1776. IOSQUECH BAL R4,IOSQCH QUEUE IOBLOK OFF RCHBLOK @VA07369 01998000
  1777. B IOSPTHEX RESTORE R6/R7 AND EXIT TO CALLER @VA07369 01999000
  1778. SPACE 02000000
  1779. SPACE 02001000
  1780. ABEND 8 CLOSED FOR STREET REPAIRS @V407438 02002000
  1781. SPACE 02003000
  1782. * CONTROL UNIT TO CHANNEL PATH OFFLINE BITS IN RCUSTAT 02004000
  1783. DISATBL DC AL1(RCUCHAOF,RCUCHBOF,RCUCHCOF,RCUCHDOF) @V407438 02005000
  1784. CUCHPTH TM RCUSTAT,0 CHECK CU TO CH PATH AVAILABILITY @V407438 02006000
  1785. SPACE 02007000
  1786. IOSQTNCH EQU * HERE TO QUEUE AND TRY NEXT CHAN @V407438 02008000
  1787. LA R14,IOSQCH ADDR OF CHANNEL QUEUEING ROUTINE @V407438 02009000
  1788. BAL R4,GETIOB GO CHECK OUT IOB STATUS FIRST @V407438 02010000
  1789. IOSTNCH TM IOBSTAT,IOBPATHF FIXED PATH IOB? @V407438 02011000
  1790. BO IOSNOCU YES, LOOK NO FURTHER, BR. @V407438 02012000
  1791. CLI CHINDEX,12 HAVE WE RUN OUT OF CHANNELS? @V407438 02013000
  1792. BNL IOSTNCU YES, GO TRY NEXT CONTROL UNIT @V407438 02014000
  1793. IC R1,CHINDEX GET CURRENT CHANNEL INDEX @V407438 02015000
  1794. LA R1,4(R1) BUMP TO NEXT CHANNEL POSITION @V407438 02016000
  1795. STC R1,CHINDEX AND RE-STORE FOR LATER @V407438 02017000
  1796. B IOSGETCH AND GO TRY CHECK IT OUT @V407438 02018000
  1797. SPACE 02019000
  1798. IOSQTNCU LA R14,IOSQCU ADDRESS OF THE QUEUEING ROUTINE @V407438 02020000
  1799. BAL R4,GETIOB GO CHECK OUT THE IOB SITUATION @V407438 02021000
  1800. IOSTNCU TM IOBSTAT,IOBPATHF FIXED PATH I/O? @VA07369 02022000
  1801. BO IOSNOCU YES, LOOK NO FURTHER @VA07369 02023000
  1802. TM PTHFLG1,R7CUB DOES R7 REPRESENT SECOND CU @VA07369 02024000
  1803. BO IOSNOCU YES, NO MORE CONTROL UNITS LEFT @VA07369 02025000
  1804. LTR R8,R8 CUE ON UNDEFINED DEVICE? @VA07369 02026000
  1805. BNM IOSNOSCN NO, DO NOT RE-EST. BLOCKS @VA07226 02027000
  1806. LH R1,IOBRADD GET CURRENT DEVICE ADDRESS @V4M0223 02028000
  1807. CALL DMKSCNRU REACQUIRE REAL BLOCKS @V4M0223 02029000
  1808. IOSNOSCN L R7,RDEVCUB PROCESSING SECOND CTL UNIT PATH @VA07369 02030000
  1809. LTR R7,R7 DOES IT EXIST? @V407438 02031000
  1810. BZ IOSNOCU NOPE, THEN WE'VE DONE ALL WE CAN @V407438 02032000
  1811. OI PTHFLG1,R7CUB PROCESSING SECOND CTL UNIT PATH @V407438 02033000
  1812. NI DEVADD+1,X'0F' CLEAR FIRST CUA @VA08913 02033100
  1813. OC DEVADD,RCUADD OR IN NEW CU ADDRESS @VA08913 02033200
  1814. MVI CHINDEX,0 SET CHANNEL INDEX BACK TO ZERO @V407438 02034000
  1815. B IOSDEVAD NOW GO CHECK OUT THIS PATH @V407438 02035000
  1816. SPACE 02036000
  1817. IOSNOCU TM PTHFLG1,R10QED HAS AN IOB BEEN QUED SOMEWHERE? @V407438 02037000
  1818. BO IOSPTHEX YES, WE DID OUT BEST, NOW RETURN @V407438 02038000
  1819. TM IOBSTAT,IOBMINI IS THIS A MINI IOB? @V407438 02039000
  1820. BZ IOSNOPTH NOPE, OK THIS TIME @V407438 02040000
  1821. ABEND 6 MINI-IOB'S NOT ALLOWD OUTSIDE IOS@V407438 02041000
  1822. IOSNOPTH OI IOBSTAT,IOBFATAL+IOBCC3 COULNDN'T GET TO DEVICE @V407438 02042000
  1823. CALL DMKSTKIO STACK FOR 2ND LEVEL INT HANDLER @V407438 02043000
  1824. IOSPTHEX L R6,PTHSAVE RESTORE CH & CU @VA07369 02044000
  1825. L R7,PTHSAVE+4 VALUES AS OF ENTRY @VA07369 02045000
  1826. LTR R13,R13 DID WE GET HERE VIA 'CALL'? @V407438 02046000
  1827. BZR R3 NOPE, INT., RETURN @V407438 02047000
  1828. * STOP CHARGING USER, @V407593 02048000
  1829. * GET CALLERS R11, AND @V407593 02049000
  1830. * START CHARGING HIM. @V407593 02050000
  1831. CHARGE SWITCH,SAVER11 @V407593 02051000
  1832. BR R3 EXIT TO CALLER @V407438 02052000
  1833. EJECT 02053000
  1834. GETIOB TM PTHFLG1,R10QED HAS THE R10 IOB BEEN QUED? @V407438 02054000
  1835. BZ SETADDR2 NO, GO TO QUEUEING ROUTINE @V407438 02055000
  1836. L R1,DMKIOSMQ GET NEXT MINI IOB ON THE QUEUE @V407438 02056000
  1837. LTR R1,R1 IS THERE ONE THERE? @V407438 02057000
  1838. BNZ GOTMINI YUP, BR. @V407438 02058000
  1839. L R1,DMKIOSNM GET COUNT OF TIMES THIS HAPPENED @V407438 02059000
  1840. AL R1,F1 BUMP IT @V407438 02060000
  1841. ST R1,DMKIOSNM AND SAVE @V407438 02061000
  1842. B IOSPTHEX RETURN TO CALLER @V407438 02062000
  1843. SPACE 02063000
  1844. GOTMINI L R0,0(R1) UNCHAIN 1ST MINIIOB: GET 2ND ONE @V407438 02064000
  1845. ST R0,DMKIOSMQ AND MAKE IT THE FIRST @V407438 02065000
  1846. L R0,IOBLINK GET PREVIOUS IOBLOK IOBLINK FIELD@V407438 02066000
  1847. ST R0,IOBLINK-IOBLOK(R1) PUT IT IN THE NEW IOBLOK @V407438 02067000
  1848. ST R1,IOBLINK SET PREV. IOB. IOBLINK TO NEW BLK@V407438 02068000
  1849. LH R0,IOBFLAG GET OLD IOBFLAG+IOBSTAT FIELDS @V407438 02069000
  1850. STH R0,IOBFLAG-IOBLOK(R1) AND PUT IN THE MINI BLOK @V407438 02070000
  1851. OI IOBSTAT-IOBLOK(R1),IOBMINI FLAG NEW BLK AS MINI @V407438 02071000
  1852. LR R10,R1 THE MINI IS NOW THE CURRENT IOB @V407438 02072000
  1853. INCR GETMCT @V407438 02073000
  1854. SETADDR2 DS 0H @V4M0225 02074000
  1855. LH R0,DEVADD GET THE PATH ADDRESS @V4M0225 02075000
  1856. STH R0,IOBRADD AND PUT IT IN THE IOB @V407438 02076000
  1857. OI PTHFLG1,R10QED MARK R10 IOB AS HAVING BEEN QUED @V407438 02077000
  1858. BR R14 GO TO QUEUEING ROUTINE @V407438 02078000
  1859. EJECT 02079000
  1860. *. 02080000
  1861. * MINI IOB - "DEQUEUE FROM RBLOKS, UNCHAIN FROM 02081000
  1862. * OTHER IOB'S" - ROUTINE 02082000
  1863. * ON ENTRY R10 = IOB WHOSE INFORMATION IS TO BE KEPT. 02083000
  1864. * ALL MINI IOB'S ON THE IOBLINK CHAIN WILL BE DEQUEUED FROM 02084000
  1865. * THEIR RBLOKS QUEUES, UNCHAINED FROM THE IOBLINK FIELD 02085000
  1866. * AND RETURNED TO THE IOS BACK POCKET MINI IOB STACK. 02086000
  1867. * THE R10 IOB MUST HAVE ALREADY BEEN DEQUEUED, IT IS NOT 02087000
  1868. * DEQUEUED IN THIS ROUTINE. ON EXIT, THE REAL (FULL) IOB 02088000
  1869. * ON THE IOBLINK CHAIN WILL BE IN R10, AND THE IOBRADD, 02089000
  1870. * IOBFLAG AND IOBSTAT FIELDS WILL CONTAIN THE SAME INFORMATION 02090000
  1871. * WHICH WAS IN THOSE FIELDS OF THE R10 IOB AT ENTRY. 02091000
  1872. *. 02092000
  1873. SPACE 02093000
  1874. IOSDQM LR R4,R10 REMEMBER THE ORIGINAL R10 IOB @V407438 02094000
  1875. INCR DEQMCT @V407438 02095000
  1876. DEQMINI L R1,IOBLINK GET NEXT IOB ON MINI CHAIN @V407438 02096000
  1877. CLR R1,R10 ANY MORE ON THE CHAIN? @V407438 02097000
  1878. BER R5 NOPE, RETURN @V407438 02098000
  1879. CLR R1,R4 SHOULD THIS IOB BE DEQUED? @V407438 02099000
  1880. BE IOSNODEQ NOPE, ALREADY DEQUED, BR. @V407438 02100000
  1881. L R2,=A(DMKRIOCU) GET START OF RCUBLOKS @VA08355 02101000
  1882. LA R0,0(R2) CLEAR HI ORDER BYTE @VA08355 02102000
  1883. L R2,=A(DMKRIOCT) GET LOOP DELIMIT ADDRESS @VA08355 02103000
  1884. LA R2,0(R2) CLEAR HI ORDER BYTE @VA08355 02104000
  1885. LR R3,R1 GET IOBLOK TO DEQUEUE @VA08355 02105000
  1886. FNDRBLOK DS 0H @VA08355 02106000
  1887. L R3,IOBBPNT-IOBLOK(R3) GET PREVIOUS IOBLOK @VA08355 02107000
  1888. LA R3,0(R3) CLEAR HI ORDER BYTE @VA08355 02108000
  1889. CR R3,R2 RCH-RCU BLOK ??? @VA08355 02109000
  1890. BNL FNDRBLOK NO, ROTATE TO NEXT BLOK @VA08355 02110000
  1891. CR R3,R0 IOBLOK IN UNLOCKED V=R ??? @VA08355 02111000
  1892. BL FNDRBLOK YES, ROTATE TO NEXT BLOK @VA08355 02112000
  1893. LH R2,RCUQCNT-RCUBLOK(R3) GET QUEUE COUNT @VA08355 02113000
  1894. BCTR R2,0 FROM BLOK AND DECREMENT @VA08355 02114000
  1895. STH R2,RCUQCNT-RCUBLOK(R3) AND SAVE NEW COUNT @VA08355 02115000
  1896. LM R2,R3,IOBFPNT-IOBLOK(R1) GET FWD & BACK PTRS @V407438 02116000
  1897. ST R2,IOBFPNT-IOBLOK(R3) REMOVE FROM FWD CHAIN @V407438 02117000
  1898. ST R3,IOBBPNT-IOBLOK(R2) AND FROM BACK CHAIN @V407438 02118000
  1899. CLR R2,R3 ARE WE DEQUEUEING THE LAST IOB? @V407438 02119000
  1900. BNE *+8 NOPE, SKIP @V407438 02120000
  1901. NI RCUSTAT-RCUBLOK(R2),X'FF'-RCUSCED YUP, UNSCHED @V407438 02121000
  1902. IOSNODEQ TM IOBSTAT-IOBLOK(R1),IOBMINI IS NEW BLOK A MINI @V407438 02122000
  1903. BZ FNDREAL NOPE, REAL IOB HAS BEEN FOUND, BR@V407438 02123000
  1904. L R0,IOBLINK-IOBLOK(R1) GET NEW IOB CHAIN PTR @V407438 02124000
  1905. ST R0,IOBLINK REMOVE R1 IOB FROM MINI CHAIN @V407438 02125000
  1906. L R0,DMKIOSMQ GET MINI IOB BACK POCKET Q PTR @V407438 02126000
  1907. ST R0,0(R1) CHAIN THE R1 MINI IOB ON THE... @V407438 02127000
  1908. ST R1,DMKIOSMQ ...BACK POCKET QUEUE @V407438 02128000
  1909. B DEQMINI AND ON WITH THE NEXT ONE... @V407438 02129000
  1910. SPACE 02130000
  1911. FNDREAL TM IOBSTAT,IOBMINI IS THE R10 IOB A MINI? @V407438 02131000
  1912. BO IOS7OK YES, OK THIS TIME, BR @V407438 02132000
  1913. ABEND 7 NOPE, THEN R1 & R10 ARE REAL SOBS@V407438 02133000
  1914. IOS7OK L R0,IOBRADD GET RADDR, FLAG & SPEC FIELDS @V407438 02134000
  1915. ST R0,IOBRADD-IOBLOK(R1) PUT THEM IN THE REAL IOB @V407438 02135000
  1916. INCR DQMSWP @V407438 02136000
  1917. NI IOBSTAT-IOBLOK(R1),X'FF'-IOBMINI THIS ISNT AMINI@V407438 02137000
  1918. LR R10,R1 MAKE THE REAL IOB THE R10 IOB @V407438 02138000
  1919. * IN THE IOSDQXX ROUTINE (ENTERED TO DEQUEUE AN IOB FOR RESTARTING 02139000
  1920. * A CH, CU OR DEV), THE SWITCH OF THE CPUTIMER IS SKIPPED IF THE 02140000
  1921. * DEQUEUEING IS BEING DONE ON A MINI-IOB; IT IS LEFT TO THIS ROUTINE 02141000
  1922. * TO SWITCH THE CPUTIMER WHEN THE REAL IOB IS FOUND. 02142000
  1923. CHARGE SWITCH,IOBUSER @V407593 02143000
  1924. B DEQMINI CONTINUE PROCESSING MINI CHAIN @V407438 02144000
  1925. EJECT 02242000
  1926. COPYIOB EQU * HERE TO COPY IOBLOKS FOR NON-DEVICE-END INTERRUPTS 02243000
  1927. LA R0,IOBSIZE GET IOBLOK SIZE 02244000
  1928. CALL DMKFREE GET CORE 02245000
  1929. CL R10,RDEVAIOB STILL ACTIVE OVER THE CALL ? @VA03817 02246000
  1930. BNE FRETCOPY NO- SYSTEM EXTENDED, INT CAME IN @VA03817 02247000
  1931. TM IOBCSW+4,CE IF CHANNEL END WITH... @VA03817 02248000
  1932. BZ COPYBLOK DEVICE END OR ATTENTION... @VA03817 02249000
  1933. TM IOBCSW+4,DE+ATTN THAN DON'T COPY THE IOBLOK, @VA03817 02250000
  1934. BZ COPYBLOK ENDING STATUS WAS RECEIVED..@VA03817*02251000
  1935. WHILE THE SYSTEM WAS EXTENDING FREE STORAGE. 02252000
  1936. FRETCOPY CALL DMKFRET FRET BLOCK, ENDING STATUS CAME IN@VA03817 02253000
  1937. BR R5 THEN RETURN TO THE CALLER @VA03817 02254000
  1938. SPACE 1 02255000
  1939. COPYBLOK EQU * HERE IF ENDING STATUS NOT RECEIVED FOR THE DEVICE 02256000
  1940. MVC 0(IOBSIZE*8,R1),0(R10) COPY THE BLOK 02257000
  1941. * NOTE: "IOBLINK" IN COPIED IOBLOK DOES 02258000
  1942. * NOT "POINT TO ITSELF" - INDICATING THAT 02259000
  1943. * THIS IS "NOT THE FINAL INTERRUPT". 02260000
  1944. LR R2,R10 SAVE THE ADDRESS OF THE OLD BLOK @VA04182 02261000
  1945. LR R10,R1 GET ADDRESS OF NEW BLOK 02262000
  1946. SLR R1,R1 CLEAR IOERBLOK POINTER @VA01225 02263000
  1947. ST R1,IOBIOER . . .TO AVOID DOUBLE FRET @VA01225 02264000
  1948. CALL DMKSTKIO STACK THE IOBLOK 02265000
  1949. LR R10,R2 RESTORE ADDRESS OF OLD BLOK @VA04182 02266000
  1950. XC IOBCSW(8),IOBCSW ZERO OLD CSW FOR NEXT INT. @VA03817 02267000
  1951. BR R5 AND RETURN TO CALLER 02268000
  1952. EJECT 02269000
  1953. ENTRY DMKIOSRW PROCESS IOBLOK USED FOR A REWIND 02270000
  1954. DROP R9 @VA13034 02270100
  1955. USING *,R12 02271000
  1956. DMKIOSRW EQU * HERE TO PROCESS IOBLOK(S) FOR TAPE REWIND 02272000
  1957. LA R0,IOBSIZE GET SIZE OF STANDARD IOBLOK 02273000
  1958. CL R10,IOBLINK IS THE IOBLOK THE ORIGINAL COPY? 02274000
  1959. BNE IOSIGN01 NO-FREE 8 DOUBLE WORDS 02275000
  1960. L R1,IOBCAW POINT TO CCW @VA04137 02276000
  1961. SL R1,F16 POINT TO BEGINNING OF RCWTASK @VA04137 02277000
  1962. USING RCWTASK,R1 @VA04137 02278000
  1963. LH R0,RCWCCNT SIZE OF RCWTASK @VA04137 02279000
  1964. CALL DMKFRET RELEASE RCWTASK @VA04137 02280000
  1965. DROP R1 @VA04137 02281000
  1966. DROP R12 02282000
  1967. SPACE 02283000
  1968. IOSIGNOR DS 0H 02284000
  1969. LA R0,IOBSIZE SIZE OF IOBLOK 02285000
  1970. IOSIGN01 LR R1,R10 AND ITS ADDRESS 02286000
  1971. L R2,IOBIOER IOERBLOK ADDRESS IF THERE IS ONE @V200820 02287000
  1972. CALL DMKFRET RETURN IOBLOK TO FREE STORAGE 02288000
  1973. L R12,ADSPCH A(DMKDSPCH) FOR 'GOTO'-STYLE EXIT@V200820 02289000
  1974. LTR R1,R2 WAS THERE AN IOERBLOK ? @V200820 02290000
  1975. BCR 8,R12 NO -- GOTO DMKDSPCH @V200820 02291000
  1976. LA R0,IOERSIZE IOERBLOK SIZE IN DOUBLE-WORDS @V200820 02292000
  1977. AH R0,IOEREXT-IOERBLOK(,R1) ...PLUS EXTENSION @V200820 02293000
  1978. CALL DMKFRET RELEASE THE IOERBLOK @V200820 02294000
  1979. BR R12 GOTO DMKDSPCH @V200820 02295000
  1980. SPACE 02296000
  1981. USING DMKIOS,R12 REESTABLISH ADDRESSABILITY 02297000
  1982. USING DMKIOS,R12,R9 @VA13034 02297100
  1983. EJECT 02298000
  1984. *. 02299000
  1985. * I. OPERATION OF QUEUEING AN IOBLOK. 02300000
  1986. * 1. NORMALLY IOBLOKS ARE QUEUED ON A FIFO BASIS; HOWEVER, 02301000
  1987. * REQUESTS FOR MOVEABLE HEAD DASDI DEVICES ARE QUEUED BY 02302000
  1988. * SEEK ADDRESS. THIS IS CALLED -ORDERED SEEK QUEUEING- AND 02303000
  1989. * IS USED TO IMPROVE SYSTEM THROUGHPUT. FOR NON-DEDICATED 02304000
  1990. * DASDI DEVICES IOBLOKS ARE ADDED TO THE IOBLOK CHAIN BASED 02305000
  1991. * ON THEIR SEEK ADDRESS. THE CHAIN IS FORMED SO THAT THE 02306000
  1992. * SEEK ADDRESS CONTAINED IN THE IOBCYL IS BUILT IN ASCENDING 02307000
  1993. * ORDER. WHEN THE IOBLOK IS DE-QUEUED, THE CHAIN IS SEARCHED 02308000
  1994. * IN THE SAME DIRECTION AS THE ARM MOVEMENT. I.E. IF THE ARM 02309000
  1995. * IS SEEKING FORWARD THE CHAIN IS SEARCHED IN ASCENDING 02310000
  1996. * ORDER. IF THE ARM IS SEEKING BACKWARD THE CHAIN IS SEARCHED 02311000
  1997. * IN A DESCENDING ORDER. THIS ACTION CONTINUES UNTIL THE END 02312000
  1998. * OF THE CHAIN IS DETECTED. 02313000
  1999. * 02314000
  2000. *. 02315000
  2001. SPACE 02316000
  2002. * QUEUE AN IOBLOK ON A REAL DEVICE QUEUE 02317000
  2003. * 02318000
  2004. IOSQDEV DS 0H 02319000
  2005. SLR R1,R1 CLEAR FOR INSERT 02320000
  2006. IC R1,RDEVQCNT ADD 1 TO COUNT OF IOBLOKS @VA01044 02321000
  2007. LA R1,1(R1) QUEUED OFF THIS DEVICE BLOCK 02322000
  2008. STC R1,RDEVQCNT @VA01044 02323000
  2009. LR R1,R8 SAVE BACK CHAIN POINTER 02324000
  2010. CLI RDEVTYPC,CLASDASD MOVEABLE HEAD DEVICE ?? 02325000
  2011. BE IOSQVDOS YES -- USE ORDERED SEEK QUEUEING 02326000
  2012. * IF NOT A DISK, QUEUE REQUESTS FIFO 02327000
  2013. L R2,RDEVLIOB POINT TO LAST IOBLOK ON DEVICE 02328000
  2014. B IOSQBLOK AND GO QUEUE THE BLOK 02329000
  2015. SPACE 02330000
  2016. IOSQVDOS DS 0H QUEUE REQUESTS IN ASCENDING ORDER BY SEEK ADDRESS 02331000
  2017. LH R0,IOBCYL GET CYLINDER NUMBER FOR THIS IOBLOK 02332000
  2018. IOSQDEVC LR R2,R1 SAVE BACK CHAIN POINTER 02333000
  2019. L R1,IOBFPNT-IOBLOK(,R1) POINT TO NEXT BLOK ON CHAIN 02334000
  2020. CR R1,R8 END OF CHAIN REACHED ?? 02335000
  2021. BE IOSQBLOK YES -- GO QUEUE TO END 02336000
  2022. CH R0,IOBCYL-IOBLOK(,R1) COMPARE SEEK ADDRESSES 02337000
  2023. BNL IOSQDEVC LOOK UNTIL NEW ONE > CHAIN @V407438 02338000
  2024. B IOSQBLOK NEW REQUEST IS HIGH, CHAIN IT @V407438 02339000
  2025. EJECT 02359000
  2026. * 02360000
  2027. * QUEUE AN IOBLOK ON A REAL CONTROL UNIT QUEUE 02361000
  2028. * 02362000
  2029. IOSQCU DS 0H 02363000
  2030. IOSQCUCR DS 0H 02364000
  2031. LH R1,RCUQCNT ADD 1 TO COUNT OF I/O BLOCKS @VA01044 02365000
  2032. LA R1,1(R1) QUEUED OFF THIS CONTROL UNIT 02366000
  2033. STH R1,RCUQCNT @VA01044 02367000
  2034. LM R1,R2,RCUFIOB GET POINTERS TO IOBLOKS CHAINED TO RCU 02368000
  2035. TM IOBFLAG,IOBRELCU WILL CU BE RELEASED ON INITIATION ? 02369000
  2036. BO IOSQCUSK YES, ADD TO THE START OF THE QUEUE 02370000
  2037. * QUEUE IN FIFO ORDER 02371000
  2038. LR R1,R7 SET FORWARD POINTER TO QUEUE ANCHOR 02372000
  2039. B IOSQBLOK AND GO QUEUE THE BLOK 02373000
  2040. SPACE 02374000
  2041. * QUEUE SEEKS, REW, RUN AND BLOCK MULTIPLEX OPERATIONS FIRST 02375000
  2042. IOSQCUSK LR R15,R7 SAVE ADDRESS OF QUEUE ANCHOR 02376000
  2043. LR R2,R7 SAVE 1ST BACKCHAIN 02377000
  2044. B IOSQSK AND GO QUEUE THE IOBLOK 02378000
  2045. SPACE 3 02379000
  2046. * 02380000
  2047. * QUEUE AN IOBLOK ON A REAL CHANNEL QUEUE 02381000
  2048. * 02382000
  2049. IOSQCH DS 0H 02383000
  2050. IOSQCHCR DS 0H 02384000
  2051. LH R1,RCHQCNT ADD 1 TO COUNT OF I/O BLOCKS @VA01044 02385000
  2052. LA R1,1(R1) QUEUED OFF THIS CHANNEL 02386000
  2053. STH R1,RCHQCNT @VA01044 02387000
  2054. LM R1,R2,RCHFIOB GET POINTERS TO IOBLOKS QUEUED ON CHAN 02388000
  2055. TM IOBFLAG,IOBRELCU WILL CU BE RELEASE ON INITIATION ? 02389000
  2056. BO IOSQCHSK YES, ADD TO THE START OF THE QUEUE 02390000
  2057. SPACE 02391000
  2058. * QUEUE IN FIFO ORDER 02392000
  2059. LR R1,R6 POINT FORWARD CHAIN 02393000
  2060. B IOSQBLOK AND GO QUEUE FIFO 02394000
  2061. SPACE 02395000
  2062. * QUEUE SEEKS, REW, RUN AND BLOCK MULTIPLEX OPERATIONS FIRST 02396000
  2063. IOSQCHSK LR R15,R6 SAVE ADDRESS OF QUEUE ANCHOR 02397000
  2064. LR R2,R6 SAVE 1ST BACKCHAIN 02398000
  2065. SPACE 2 02399000
  2066. IOSQSK CLR R1,R15 AT THE END OF THE QUEUE ?? 02400000
  2067. BE IOSQBLOK YES -- 02401000
  2068. TM IOBFLAG-IOBLOK(R1),IOBRELCU END OF HI PRIORITY BLOKS ? 02402000
  2069. BZ IOSQBLOK YES -- 02403000
  2070. LR R2,R1 SAVE NEW BACK CHAIN 02404000
  2071. L R1,IOBFPNT-IOBLOK(,R1) GET NEXT IOBLOK QUEUED 02405000
  2072. B IOSQSK AND CONTINUE 02406000
  2073. SPACE 3 02407000
  2074. SPACE 3 02408000
  2075. IOSQBLOK DS 0H GENERAL BLOK QUEUEING ROUTINE 02409000
  2076. STM R1,R2,IOBFPNT STORE FORWARD AND BACK CHAIN POINTERS 02410000
  2077. ST R10,IOBBPNT-IOBLOK(,R1) INSERT NEW BACKCHAIN 02411000
  2078. ST R10,IOBFPNT-IOBLOK(,R2) AND FORWARD CHAIN 02412000
  2079. BR R4 AND RETURN TO CALLER 02413000
  2080. EJECT 02414000
  2081. * 02415000
  2082. * DEQUEUE THE NEXT IOBLOK OFF A REAL DEVICE QUEUE 02416000
  2083. * 02417000
  2084. * EXITS - 02418000
  2085. * R4+4 IF THE QUEUE IS EMPTY 02419000
  2086. * R4 IF AN IOBLOK IS DEQUEUED 02420000
  2087. * 02421000
  2088. * 02422000
  2089. * FOR APU SUPPORT IT IS NECESSARY TO LOCK THE RDEVBLOK 02423000
  2090. * TO AVOID INTERFERENCE WITH DMKPAG WHEN DMKPAG ADDS IOBS TO 02424000
  2091. * THE QUEUE OF IOBS ON A PAGING DEVICE. TO CONTROL LOCKING AND 02425000
  2092. * UNLOCKING, THE CALLERS REG IS HELD IN REG 3 AND REG 4 IS SET 02426000
  2093. * TO A LOCAL ADDRESS. THE RDEVBLOK LOCK IS THEN ACQUIRED. 02427000
  2094. * ON RETURN FROM DEQUEUE, THE LOCK IS RELEASED AND THE 02428000
  2095. * PROPER EXIT IS TAKEN 02429000
  2096. * 02430000
  2097. IOSDQDV DS 0H 02431000
  2098. TM RDEVSTAT,RDEVSCED ANYTHING SCHEDULED FOR @VA04452 02432000
  2099. * DEVICE CHAINED FROM C.U. OR CHANNEL QUEUES 02433000
  2100. BO 4(,R4) YES - THEN IT MUST START FIRST. @VA04452 02434000
  2101. AIF (NOT &AP).APCHK7 02435000
  2102. TM APSTAT1,APUOPER RUNNING AP? @V4M0146 02436000
  2103. BNO DQIT NO, SKIP THE APU LOGIC @V4M0146 02437000
  2104. LR R3,R4 SAVE CALLERS REG4 @V4M0146 02438000
  2105. LA R4,GOTYA GET NEW RETURN POINT @V407593 02439000
  2106. LA R1,RDEVIOBL ADDR OF LOCK-WORD IN RDEVBLOCK @V407593 02440000
  2107. LOCK OBTAIN,TYPE=PRIVATE,SPIN=YES @V407593 02441000
  2108. B DQIT WE GOT THIS LOCKED,GO DQIT @V4M0146 02442000
  2109. * HERE ON FINISHING-UP THE DEQUEUE @V407593 02443000
  2110. GOTYA B NORM NORMAL RETURN (IE BR R4) @V407593 02444000
  2111. B NORMP4 EMPTY QUEUE CASE (IE BR 4,(,R4)) @V407593 02445000
  2112. NORM LR R4,R3 RESTORE REG4 @V4M0146 02446000
  2113. B UNLOCK GO UNLOCK THE RDEVBLOCK @V407593 02447000
  2114. NORMP4 LA R4,4(,R3) RESTORE TO RETURN POINT PLUS 4 @V4M0146 02448000
  2115. UNLOCK LA R1,RDEVIOBL ADDR OF LOCK-WORD IN RDEVBLOCK @V407593 02449000
  2116. LOCK RELEASE,TYPE=PRIVATE RELEASE THE LOCK @V407593 02450000
  2117. BR R4 AND GET OUT @V407593 02451000
  2118. EJECT 02452000
  2119. DQIT EQU * @V4M0146 02453000
  2120. .APCHK7 ANOP 02454000
  2121. L R10,RDEVFIOB LOAD ADDRESS OF 1ST IOBLOK QUEUED 02455000
  2122. CR R8,R10 IS THE QUEUE EMPTY ? 02456000
  2123. BE 4(,R4) YES -- EXIT NOW 02457000
  2124. * 02458000
  2125. * MAKE SURE THAT THE IOBLOK DOES NOT HAVE IOBFLT 02459000
  2126. * FLAG SET - THAT IS, THE IOBLOK IS NOT 02460000
  2127. * QUEUED IN WAIT FOR AN MSS CYLINDER FAULT 02461000
  2128. * 02462000
  2129. TESTCYFT EQU * @V60B6B8 02463000
  2130. TM IOBSTAT,IOBFLT IS IOBLOK WAITING FOR CYL FLT @V60B6B8 02464000
  2131. BZ SETCOUNT NO, CONTINUE @V60B6B8 02465000
  2132. L R10,IOBFPNT GET NEXT IOBLOK @V60B6B8 02466000
  2133. CR R8,R10 IS THERE ONE @V60B6B8 02467000
  2134. BE 4(,R4) NO, IOBLOK POINTS TO RDEVBLOK @V60B6B8 02468000
  2135. B TESTCYFT CHECK THE NEXT ONE @V60B6B8 02469000
  2136. SETCOUNT EQU * SET THE COUNT OF QUEUED BLOCKS @V60B6B8 02470000
  2137. L R1,F0 CLEAR FOR INSERT 02471000
  2138. IC R1,RDEVQCNT SUB 1 FROM COUNT OF IOBLOKS @VA01044 02472000
  2139. BCTR R1,0 QUEUED THIS DEVICE BLOCK 02473000
  2140. STC R1,RDEVQCNT @VA01044 02474000
  2141. CLI RDEVTYPC,CLASDASD IS IT A MOVEABLE HEAD DEVICE ?? 02475000
  2142. LR R2,R8 POINT TO RDEVBLOK TO CHECK QUEUE 02476000
  2143. BNE IOSTSTQ NO- CHECK QUEUE POINTERS AND DEQUEUE IOB 02477000
  2144. SPACE 02478000
  2145. * DEQUEUE IN ORDER BY SEEK ADDRESS 02479000
  2146. C R8,IOBFPNT ONLY 1 IOBLOK ON THIS QUEUE ? 02480000
  2147. BE IOSDQBLK YES, DON'T BOTHER GOING THRU CHAIN 02481000
  2148. LH R0,RDEVCYL LOAD CURRENT CYLINDER ADDRESS 02482000
  2149. TM RDEVFLAG,RDEVSKUP SEEKING UP THE PACK ? @VA00915 02483000
  2150. BZ IOSDQDVD BRANCH IF NO 02484000
  2151. IOSDQDVN DS 0H LOOK FOR AN ADDRESS EQUAL OR HIGHER 02485000
  2152. CH R0,IOBCYL IS CYLINDER ADDRESS GE CURRENT CYLINDER ? 02486000
  2153. BNH IOSDQBLK ADDRESS GE TO CURRENT ARM, GO DEQUEUE 02487000
  2154. IOSDQNXT L R10,IOBFPNT OTHERWISE, LOOK AT NEXT IOBLOK 02488000
  2155. CR R8,R10 IS THIS THE END OF THE CHAIN ? 02489000
  2156. BNE IOSDQDVN BRANCH IF NO 02490000
  2157. NI RDEVFLAG,X'FF'-RDEVSKUP NOW SEEKING DOWN @VA00915 02491000
  2158. IOSDQDVD L R10,RDEVLIOB LOAD ADDRESS OF LAST IOBLOK QUEUED 02492000
  2159. IOSDQDVP DS 0H LOOK FOR AN ADDRESS EQUAL OR LOWER 02493000
  2160. CH R0,IOBCYL IS CYLINDER ADDRESS LE CURRENT CYLINDER ? 02494000
  2161. BNL IOSDQBLK ADDRESS LE TO CURRENT ARM - GO DEQUEUE 02495000
  2162. L R10,IOBBPNT BACK DOWN THE CHAIN 02496000
  2163. CR R8,R10 IS THIS THE END OF THE CHAIN ? 02497000
  2164. BNE IOSDQDVP BRANCH IF NO 02498000
  2165. OI RDEVFLAG,RDEVSKUP NOW SEEKING UP THE PACK @VM08572 02499000
  2166. B IOSDQNXT GO GET ADDRESS OF FIRST IOBLOK 02500000
  2167. SPACE 02501000
  2168. EJECT 02502000
  2169. * 02503000
  2170. * DEQUEUE THE NEXT IOBLOK OFF A REAL CONTROL UNIT QUEUE 02504000
  2171. * 02505000
  2172. * EXITS - 02506000
  2173. * R4+4 IF THE QUEUE IS EMPTY 02507000
  2174. * R4 IF AN IOBLOK WAS DEQUEUED 02508000
  2175. * 02509000
  2176. IOSDQCU DS 0H 02510000
  2177. L R10,RCUFIOB LOAD ADDRESS OF 1ST IOBLOK SCHEDULED 02511000
  2178. CR R7,R10 IS THE QUEUE EMPTY ? 02512000
  2179. BE 4(,R4) YES -- EXIT NOW 02513000
  2180. LH R1,RCUQCNT SUB 1 FROM COUNT OF I/O BLOCKS @VA01044 02514000
  2181. BCTR R1,0 QUEUED OFF THIS CONTROL UNIT 02515000
  2182. STH R1,RCUQCNT @VA01044 02516000
  2183. LR R2,R7 POINT TO THE RCUBLOK TO CHECK QUEUE 02517000
  2184. B IOSTSTQ GO CHECK QOEUE POINTERS AND DEQUEUE IOB 02518000
  2185. SPACE 3 02519000
  2186. * 02520000
  2187. * DEQUEUE THE NEXT IOBLOK OFF A REAL CHANNEL QUEUE 02521000
  2188. * 02522000
  2189. * EXITS - 02523000
  2190. * R4+4 IF THE QUEUE IS EMPTY 02524000
  2191. * R4 IF AN IOBLOK WAS DEQUEUED 02525000
  2192. * 02526000
  2193. IOSDQCH DS 0H 02527000
  2194. L R10,RCHFIOB LOAD ADDRESS OF 1ST IOBLOK SCHEDULED 02528000
  2195. CR R6,R10 IS THE QUEUE EMPTY ? 02529000
  2196. BE 4(,R4) YES -- ESIT NOW 02530000
  2197. LH R1,RCHQCNT SUB 1 FROM COUNT OF I/O BLOCKS @VA01044 02531000
  2198. BCTR R1,0 QUEUED OFF THIS CHANNEL 02532000
  2199. STH R1,RCHQCNT @VA01044 02533000
  2200. LR R2,R6 POINT TO THE RCHBLOK TO CHECK QUEQE 02534000
  2201. SPACE 1 02535000
  2202. IOSTSTQ C R2,IOBBPNT THE BACK POINTER MUST POINT BACK TO 02536000
  2203. BE IOSDQBLK THE QUEUE WE ARE DEQUEUING FROM OR 02537000
  2204. ABEND 3 THIS IOBLOK IS ON TWO QUEUES!!! 02538000
  2205. SPACE 2 02539000
  2206. IOSDQBLK DS 0H HERE FOR GENERAL IOBLOK DEQUEUE 02540000
  2207. LM R1,R2,IOBFPNT GET FORWARD AND BACKWARD POINTERS 02541000
  2208. ST R1,IOBFPNT-IOBLOK(,R2) UNCHAIN THE BLOK 02542000
  2209. ST R2,IOBBPNT-IOBLOK(,R1) -- 02543000
  2210. TM IOBSTAT,IOBMINI IS THIS A MINI-IOB? @V407438 02544000
  2211. BOR R4 YES, THEN IOBUSER DOESN'T EXIST @V407438 02545000
  2212. * IOSDQM ROUTINE WILL DO TIMER SWITCH 02546000
  2213. * OTHERWISE, STOP CHARGING OLD USER@V407593 02547000
  2214. * GET USER OF NEW IOB, AND @V407593 02548000
  2215. * START CHARGING HIM @V407593 02549000
  2216. CHARGE SWITCH,IOBUSER @V407593 02550000
  2217. BR R4 AND EXIT 02551000
  2218. EJECT 02552000
  2219. *. 02553000
  2220. * 02554000
  2221. * J. OPERATION OF IOSENSE - 02555000
  2222. * 1. FLAG THE IOBLOK AS AN ERROR TASK 02556000
  2223. * 2. IF THE DEVICE IS STILL BUSY, EXIT TO CALLER TO WAIT FOR THE 02557000
  2224. * DEVICE END 02558000
  2225. * 3. IF THE DEVICE IS FREE, START THE SENSE AND EXIT TO CALLER 02559000
  2226. * 02560000
  2227. *. 02561000
  2228. SPACE 02562000
  2229. IOSENSE EQU * HERE TO SENSE ALL UNITS @VA09137 02563100
  2230. TM IOBSPEC2,IOBSNSIO UC WHILE ATTEMPTING SENSE @VA09137 02564100
  2231. BO IOSENBAD TROUBLE -INTERRUPT TIME - SENSE @VA10398 02580100
  2232. TM IOBSPEC2,IOBUC FIRST ENTRY AFTER UNIT CHECK? @V407438 02581000
  2233. BZ IOSGTERR YES -- GO BUILD ERROR BLOK 02582000
  2234. L R4,IOBIOER GET ADDRESS OF ERROR BLOK 02583000
  2235. USING IOERBLOK,R4 @VM01071 02584000
  2236. TM RDEVSTAT,RDEVDED IS DEVICE DEDICATED? @VA03834 02585000
  2237. BO IOSETCAW YES--GIVE CURRENT STATUS ONLY @VA03834 02586000
  2238. OC IOBCSW(8),IOERCSW ADD OLD CSW TO NEW CSW @VM01071 02587000
  2239. B IOSETCAW AND GO START SENSE 02588000
  2240. SPACE 02589000
  2241. IOSGTERR DS 0H SET ERROR CONTROL BLOKS 02590000
  2242. LA R0,IOERSIZE GET ERROR RECORDING BLOK 02591000
  2243. CALL DMKFREE -- 02592000
  2244. ST R1,IOBIOER AND SAVE ITS ADDRESS 02593000
  2245. LR R4,R1 AND USE GPR4 FOR ADDRESSABILITY 02594000
  2246. XC IOERBLOK(IOERSIZE*8),IOERBLOK CLEAR TO ZEROES 02595000
  2247. MVC IOERCSW,IOBCSW SAVE UNIT CHECK CSW 02596000
  2248. TM IOBCSW+4,UC UNIT CHECK PRESENT @VA01599 02597000
  2249. BCR 8,R5 NO, RETURN TO IN LINE CODE @VA01599 02598000
  2250. LM R0,R1,IOSSNCCW GET MODEL SENSE CCW @VA09137 02598100
  2251. ALR R0,R4 ADJUST DATA ADDRESS @VA09137 02598200
  2252. STM R0,R1,IOERCCW SAVE IN IOERBLOK @VA09137 02598300
  2253. OI IOBSPEC2,IOBUC FLAG ERROR TASK @VA09137 02598400
  2254. TM IOBSPEC,IOBTIO+IOBHIO WAS THIS A SIO REQUEST @VA01599 02599000
  2255. BNZ IOSPERP NO, GET SENSE CCW @VA01599 02600000
  2256. TM IOBFLAG,IOBCP+IOBHVC IS THIS A CP OR DIAGNOSE @VA01599 02601000
  2257. * REQUEST 02602000
  2258. BNZ NOT3203 YES, GO AROUND 3203 CODE @VA09137 02603050
  2259. TM RDEVSTAT,RDEVDED DEVICE DEDICATED ? @VA09137 02603100
  2260. BNO IOSPERP NO,NO CHECK FOR 3203 @VA09137 02603150
  2261. CLC RDEVTYPC(2),=AL1(CLASURO,TYP3203) 3203 PRINTER? @VA09137 02603200
  2262. BNE IOSPERP NO, GET SENSE CCW @VA09137 02603250
  2263. CLC CSW+4(2),=AL1(CE+UC,0) SPECIAL 3203 INTERRUPT? @VA09137 02603300
  2264. BE SPECINT SPECIAL 3203 INTERRUPT @VA14489 02603360
  2265. CLC CSW+4(2),=AL1(CE+UC+IL,0) SPECIAL 3203 @VA14489 02603365
  2266. * INTERRUPT? 02603370
  2267. BNE IOSPERP NO, GET SENSE CCW @VA14489 02603375
  2268. SPECINT EQU * @VA14489 02603380
  2269. OI IOBSPEC3,IOBPST TELL VIO TO POST @VA09137 02603400
  2270. LR R3,R5 SAVE R5 IN R3 ACROSS BAL @VA09137 02603450
  2271. BAL R5,COPYIOB REFLECT THIS INTERRUPT @VA09137 02603500
  2272. LR R5,R3 RESTORE R5 @VA09137 02603550
  2273. NI IOBSPEC3,255-IOBPST TURN OFF POST @VA09137 02603600
  2274. B SNS3203 DO TIO @VA09137 02603650
  2275. NOT3203 EQU * @VA09137 02603700
  2276. OI IOBFLAG,IOBERP SET INDICATOR FOR ERP SUPPORT @VA01599 02604000
  2277. IOSPERP EQU * @VA01599 02605000
  2278. TM IOBCSW+4,CE IS THE DEVICE FREE ? @VA01068 02611000
  2279. BZ IOSETCAW YES -- GO START THE SENSE 02612000
  2280. TM IOBCSW+4,DE+ATTN IS DEVICE STILL BUSY ? @VA01068 02613000
  2281. BNZ IOSETCAW NO, ISSUE SENSE COMMAND 02614000
  2282. LH R1,IOBRADD GET REAL DEVICE ADDRESS @VM01011 02615000
  2283. XC CSW(8),CSW CLEAR THE REAL CSW @VM01011 02616000
  2284. TIO 0(R1) SEE IF IT'S REALLY BUSY @VM01011 02617000
  2285. BC 8+1,IOSETCAW GO AHEAD WITH THE SENSE @VM01011 02618000
  2286. BC 2,IOSENSWT REALLY BUSY - WAIT FOR IT @VM01011 02619000
  2287. TM CSW+4,DE+UC+ATTN ENDING STATUS ? @VM01011 02620000
  2288. BZ IOSENSWT NO -- WAIT FOR IT @VM01011 02621000
  2289. OI IOBCSW+4,DE FAKE DEVICE END REGARDLESS @VM01011 02622000
  2290. B IOSETCAW AND GO AHEAD WITH THE SENSE @VM01011 02623000
  2291. IOSENSWT EQU * @VM01011 02624000
  2292. TM RDEVSTAT,RDEVDED IS DEVICE DEDICATED 02625000
  2293. BO COPYIOB YES, COPY IOBLOK FOR DEDICATED USER'S 02626000
  2294. BR R5 MUST WAIT FOR DEVICE END 02627000
  2295. SPACE 02627050
  2296. SNS3203 EQU * 3203 TIO CODE FOR 0A STATUS @VA09137 02627100
  2297. LH R1,IOBRADD GET REAL DEVICE ADDRESS @VA09137 02627150
  2298. XC CSW(8),CSW CLEAR CSW @VA09137 02627200
  2299. TIO 0(R1) IS IT BUSY ? @VA09137 02627250
  2300. BC 8+1,IOSETCAW GO AHEAD WITH SENSE @VA09137 02627300
  2301. BCR 2,R5 WAIT FOR DEVICE END @VA09137 02627350
  2302. TM CSW+4,DE DEVICE END ? @VA09137 02627400
  2303. BZR R5 NO, WAIT FOR IT @VA09137 02627450
  2304. OI IOBCSW+4,DE SET DE FOR REFLECTION @VA09137 02627500
  2305. B IOSETCAW GO DO SENSE @VA09137 02627550
  2306. SPACE 3 02628000
  2307. * 02629000
  2308. * TEST IOBLOK TO SEE IF VMBLOK SHOULD BE TAKEN OUT OF 02630000
  2309. * VMIOWAIT. 02631000
  2310. * 02632000
  2311. IOSTSTIW DS 0H @VA04182 02633000
  2312. TM IOBFLAG,IOBCP CP GENERATED I/O ? @VA04182 02634000
  2313. BOR R1 IF SO, DON'T RESET IOWAIT @VA04182 02635000
  2314. TM IOBSPEC,IOBSIOF SIO FAST RELEASE ? @VA04182 02636000
  2315. BOR R1 IF SO, SAME AS ABOVE @VA04182 02637000
  2316. NI VMRSTAT,X'FF'-VMIOWAIT NO LONGER IN VMIOWAIT @VA04182 02638000
  2317. BR R1 RETURN TO CALLER @VA04182 02639000
  2318. EJECT 02640000
  2319. IOSETCAW DS 0H 02641000
  2320. LA R1,IOERCCW GET ADDRESS OF SENSE CCW 02642000
  2321. ST R1,CAW SET UP CHANNEL ADDRESS WORD 02643000
  2322. XI IOBSPEC2,IOBUC+IOBSNSIO UNFLAG UC, FLAG SENSE @V407438 02644000
  2323. LH R1,IOBRADD GET DEVICE ADDRESS 02645000
  2324. OI RDEVSTA2,RDEVCONC ALLOW PRESERVATION OF @VA01044*02646000
  2325. CONTINGENT CONNECTION FOR VIRTUAL USER. @VA01044 02647000
  2326. CLI RDEVTYPC,CLASGRAF GRAF DEVICE @VA09500 02648100
  2327. BNE IOSNSIO1 NO, NOT 3270 TYPE @VA05088 02649000
  2328. TM RDEVTYPE,TYP3277+TYP3284 3277 OR 3284? @VA09500 02649100
  2329. BZ IOSNSIO1 NO- BRANCH @VA09500 02649110
  2330. LA R15,2000(R0) LOAD COUNT FOR 3270 @VA05088 02650000
  2331. B IOSNSIO GO TO SIO FOR SENSE @VA05088 02651000
  2332. RETYCNT DC F'40000' RETRY COUNT @VA09500 02651100
  2333. IOSNSIO1 EQU * @VA05088 02652000
  2334. L R15,RETYCNT LOAD RETRY COUNT @VA09500 02653100
  2335. IOSNSIO SIO 0(R1) ATTEMPT TO DO SENSE 02654000
  2336. BCR 8,R5 SENSE STARTED -- GO WAIT FOR INTERRUPT 02655000
  2337. BC 1,IOSENFAL ERROR FOR CC = 3 ON SIO 02656000
  2338. BC 4,IOSNCC1 GO CHECK OUT CSW FOR CC = 1 ON SIO 02657000
  2339. TM RCHTYPE,RCHBMX BUSY VALID ONLY ON BLOCK MULTIPLEXOR 02658000
  2340. BZ IOSINBAD OTHERWISE, PROBABLE FAILURE @VA01350 02659000
  2341. CLI RDEVTYPC,CLASGRAF GRAF DEVICE @VA09500 02660100
  2342. BNE NOTGRAF1 NO-BRANCH @VA09500 02660200
  2343. TM RDEVTYPE,TYP3277+TYP3284 @VA09500 02660300
  2344. BM IOSINBAD IF EITHER LIMITED RETRY @VA09500 02660400
  2345. NOTGRAF1 DS 0H @VA09500 02660500
  2346. B IOSNSIO FOR BMPX, LOOP UNTIL STARTED 02662000
  2347. SPACE 02663000
  2348. IOSNCC1 TM CSW+4,X'FF'-(SM+CUE+BUSY) U.C.OR IRREG STATUS? @VX04718 02664000
  2349. BNZ IOSINBAD YES,RETRY 16 TIMES @VX04718 02665000
  2350. CLI RDEVTYPC,CLASGRAF GRAF DEVICE @VA09500 02666100
  2351. BNE NOTGRAF2 NO-BRANCH @VA09500 02666200
  2352. TM RDEVTYPE,TYP3277+TYP3284 @VA09500 02666300
  2353. BM ROUT3277 @VA09500 02666400
  2354. NOTGRAF2 DS 0H @VA09500 02666500
  2355. IOSSTAT CLI CSW+4,BUSY IS IT JUST A DEVICE BUSY @VA12629 02666600
  2356. BE IOSINBAD YES USE LIMITED RETRY @VA12629 02666700
  2357. TM CSW+4,SM+CUE+BUSY CUE OR CU PENDING @VA12629 02666800
  2358. TM CSW+4,SM+CUE+BUSY NO,CUE,SM,OR BUSY? @VX04718 02668000
  2359. BNZ IOSNSIO YES UNLIMITED RETRY @VX04718 02669000
  2360. NOUN3277 EQU * @VA05088 02670000
  2361. TM CSW+5,X'FF' ANY BAD CHANNEL STATUS 02671000
  2362. BZ IOSNSIO NO, RETRY SENSE COMMAND 02672000
  2363. TM CSW+5,IFCC+CCC IS THIS A CHANNEL DATA CHECK @VA01599 02673000
  2364. BNZ IOSENFAL NO, GO INDICATE SENSE FAILED @VA01599 02674000
  2365. SPACE 02675000
  2366. IOSINBAD DS 0H RETRY FOR 'UC' OR BUSY ON SENSE @VA01350 02676000
  2367. BCT R15,IOSNSIO RETRY 16 TIMES @VA01350 02677000
  2368. SPACE 02678000
  2369. IOSENFAL DS 0H HERE IF THE SENSE HAS FAILED 02679000
  2370. MVC IOERLEN,ZEROES SENSE NOT AVAILABLE @VA10398 02679100
  2371. IOSENBAD DS 0H @VA10398 02679200
  2372. NI IOBSPEC2,X'FF'-IOBSNSIO SENSE NOT GOING -- @V407438 02680000
  2373. NI RCHSTAT,X'FF'-RCHBUSY RESET CHANNEL BUSY 02681000
  2374. NI RCUSTAT,X'FF'-RCUBUSY RESTE CU BUSY 02682000
  2375. OI IOBSTAT,IOBFATAL SENSE HAS FAILED @VA01581 02683000
  2376. B 4(,R5) TAKE ERROR EXIT - 02684000
  2377. ROUT3277 TM CSW+4,SM+CUE+BUSY @VA05088 02685000
  2378. BNZ IOSINBAD DO LIMITED RETRY @VA05088 02686000
  2379. B NOUN3277 GO CHECK OTHER CONDITIONS @VA05088 02687000
  2380. SPACE 02688000
  2381. IOSSNCCW CCW 4,IOERDATA-IOERBLOK,SILI,IOERSNSZ MDL SENSE CCW @V407438 02689000
  2382. DROP R4 02690000
  2383. CLRSNS CCW 4,*-*,SILI+SKIP,24 CLEAR CONTENTION CONNECTION @VM08622 02691000
  2384. EJECT 02692000
  2385. IOSRECER DS 0H SET UP TO RECORD IOERROR 02693000
  2386. L R0,RDEVIOER GET PRIMARY IOERBLOK 02694000
  2387. LTR R0,R0 ANY QUEUED ?? 02695000
  2388. BZ IOSGTEX NO -- USE IOBIOER 02696000
  2389. ST R0,IOBIOER AND CHAIN TO IOBLOK 02697000
  2390. SR R0,R0 CLEAR OUT 02698000
  2391. ST R0,RDEVIOER REVBLOK POINTER 02699000
  2392. IOSGTEX EQU * GET A CPEXBLOK TO STACK 02700000
  2393. BAL R2,IOSGCPEX AND SET RETURN TO THE NEXT INSTRUCTION 02701000
  2394. IOSRC1 EQU * DMKIOSRC BEGINS EXECUTION HERE @VA09587 02702000
  2395. TM IOBSPEC,IOBTIO+IOBHIO WAS IT REALLY A SIO? @VA02503 02703000
  2396. BNZ IOSERSTK NO -- JUST STACK THE IOBLOK @VA02503 02704000
  2397. CALL DMKIOERR,AFFINITY RECORD THE ERROR @V407593 02705000
  2398. ST R0,PTHSAVE RESTORE PTHSAVE VALUE IN CASE @VA07225 02706000
  2399. ST R1,PTHSAVE+4 LOST CONTROL @VA07225 02707000
  2400. TM IOBFLAG,IOBRSTRT HAS ERP REQUESTED RESTART ?? 02708000
  2401. BZ RSTIDLE NO - REMOVE IDLE COND. @VA01160 02709000
  2402. TM IOBFLAG,IOBRES HAS RESET BEEN ISSUED @VA05537 02710000
  2403. BO IOSERSTK STACK IOBLOK @VA05537 02711000
  2404. LA R0,IOERSIZE SIZE OF ONE IOERBLOK 02712000
  2405. L R1,IOBIOER GET ADDRESS OF IOERBLOK 02713000
  2406. LTR R1,R1 DO WE HAVE ONE 02714000
  2407. BZ REQIOER RESTART IOB @VA05940 02715000
  2408. USING IOERBLOK,R1 02716000
  2409. AH R0,IOEREXT ADD EXTRA SIZE (IF ANY) OF IOERBLOK 02717000
  2410. DROP R1 02718000
  2411. CALL DMKFRET YES - FRET IT 02719000
  2412. SLR R0,R0 02720000
  2413. ST R0,IOBIOER CLEAR OUT POINTER TO OLD IOERBLOK 02721000
  2414. REQIOER TM RDEVSTAT,RDEVSCED+RDEVBUSY IS DEVICE FREE? @VA05940 02722000
  2415. BZ IOSREQUE YES, RESTART OPERATION @VA05940 02723000
  2416. BAL R4,IOSQDEV OTHERWISE REQUEUE IT @VA05940 02724000
  2417. B IOSTEXIT AND FINISH UP @VA05940 02725000
  2418. RSTIDLE NI VMRSTAT,X'FF'-VMIDLE PUT USER BACK IN QUEUE @VA01160 02726000
  2419. CALL DMKSCHDL ..... @VA01160 02727000
  2420. SPACE 1 02728000
  2421. SPACE 02729000
  2422. IOSERSTK CALL DMKSTKIO STACK THE IOBLOK 02730000
  2423. SPACE 02731000
  2424. IOSERXIT GOTO DMKDSPCH AND LEAVE 02732000
  2425. SPACE 2 02733000
  2426. IOSGCPEX EQU * BUILD AND STACK CPEXBLOK 02734000
  2427. LA R0,CPEXSIZE GET A CP REQUEST BLOK 02735000
  2428. CALL DMKFREE 02736000
  2429. USING CPEXBLOK,R1 02737000
  2430. LR R15,R2 SET THE RETURN TO EXECUTION ADDRESS 02738000
  2431. * SET UP BY THE CALLER 02739000
  2432. XC CPEXR13(4),CPEXR13 ZERO OUT REG 13 (NO SAVE AREA) 02740000
  2433. STM R15,R12,CPEXADD AND SAVE REGISTERS 02741000
  2434. L R14,PTHSAVE SAVE PTHSAVE VALUE @VA07225 02742000
  2435. L R15,PTHSAVE+4 ... @VA07225 02743000
  2436. ST R14,CPEXR0 IN CASE LOSE CONTROL @VA07225 02744000
  2437. ST R15,CPEXR1 IN CASE LOSE CONTROL @VA07225 02745000
  2438. CALL DMKSTKMP STACK REQ. ON MAIN(I/O) PROC. @V407593 02746000
  2439. BR R5 AND RETURN TO CALLER 02747000
  2440. SPACE 3 02748000
  2441. AIF (NOT &TRACE(6)).IOSEND 02749000
  2442. SPACE 02750000
  2443. * SUBROUTINE TO INITIATE A CALL TO DMKTRCSI TO TRACE A VIRTUAL 02751000
  2444. * MACHINE SIO WHEN IT IS APPROPRIATE FOR CP TO DO SO 02752000
  2445. * 02753000
  2446. * AT ENTRY: 02754000
  2447. * R5 = RETURN REGISTER 02755000
  2448. * R10 = A (IOBLOK) (NOTE - CC IS STORED IN IOBLOK) 02756000
  2449. * R11 = A (USER'S VMBLOK) 02757000
  2450. * USING VMBLOK,R11 ... 02758000
  2451. * 02759000
  2452. * AT EXIT: 02760000
  2453. * A CALL TO DMKTRCSI HAS BEEN SCHEDULED 02761000
  2454. * 02762000
  2455. IOSTRACE EQU * @V407593 02763000
  2456. BAL R2,IOSGCPEX BUILD A CP EXECUTION BLOCK TO RETURN TO 02764000
  2457. * THE NEXT INSTRUCTION, AND RETURN TO 02765000
  2458. * CALLER ON REG 5. 02766000
  2459. SPACE 2 02767000
  2460. * WHEN TRIGGERED BY 'IOSTRACE' ABOVE, WE EVENTUALLY COME HERE: 02768000
  2461. * 02769000
  2462. TM VMTRCTL,VMTRSIO STILL TRACING SIO @VA07464 02770000
  2463. BZ NIVRMST NOPE - HE CHANGED HIS MIND REAL FAST 02771000
  2464. LH R1,IOBVADD YES - VIRTUAL ADDRESS IS EXPECTED IN R1 02772000
  2465. CALL DMKTRDSI NOW CALL THE SIO TRACER ENTRY @V4M0240 02773000
  2466. NIVRMST NI VMRSTAT,255-VMIOWAIT NOW TAKE HIM OUT OF IOWAIT, COACH.. 02774000
  2467. GOTO DMKDSPCH AND GO DO WHAT'S BEST. 02775000
  2468. .IOSEND ANOP 02776000
  2469. CHANOFF DC A(X'80000000') MASK FOR DISABLING CHANNEL @VA07955 02777000
  2470. SPACE 3 02778000
  2471. CCWL EQU 8 CCL LENGTH @V60B6B8 02779000
  2472. SEEKPTL EQU 3 LENGTH OF PTR TO SEEK ARG @V60B6B8 02780000
  2473. TICOFF EQU 9 OFFSET TO CCW PTR IN TIC @V60B6B8 02781000
  2474. PREL EQU 24 LENGTH OF PREFIX @V60B6B8 02782000
  2475. * CONSTANTS @V407593 02785000
  2476. SET EQU X'FF' USED TO TEST IF FLAG IS SET @V407593 02786000
  2477. IOTRCODE EQU 5 TRACE-TABLE FLAG FOR I/O INTERRUP@V407593 02787000
  2478. SKSHDR EQU 6 SEEKS HEADER LENGTH @V60BEBC 02788000
  2479. INCLUDE EQU X'80' SEEKS INCLUDE OPTION @V60BEBC 02789000
  2480. EXCLUDE EQU X'40' SEEKS EXCLUDE OPTION @V60BEBC 02790000
  2481. SEEKCL EQU X'01' SEEKS MONITOR MASK @VMI0067 02791000
  2482. SPACE 1 @V407593 02792000
  2483. LTORG @V407593 02793000
  2484. EJECT 02794000
  2485. COPY EQU 02795000
  2486. COPY DEVTYPES 02796000
  2487. PSA 02797000
  2488. COPY SAVE 02798000
  2489. COPY VMBLOK 02799000
  2490. COPY IOBLOKS 02800000
  2491. COPY RBLOKS 02801000
  2492. COPY VBLOKS 02802000
  2493. COPY IOER 02803000
  2494. END DMKIOS @V200820 02804000
ibm/vm370-lib/cp/dmkios.assemble_src.txt ยท Last modified: 2023/08/06 13:37 by Site Administrator