Table of Contents

DMKRNH Source

References

Source Listing

DMKRNH.ASSEMBLE.txt
  1. RNH TITLE 'DMKRNH (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT @V200820 00002000
  3. COPY OPTIONS @V200820 00003000
  4. COPY LOCAL OPTIONS @V200820 00004000
  5. SPACE 2 00005000
  6. *. 00006000
  7. * MODULE NAME - 00007000
  8. * 00008000
  9. * DMKRNH 00009000
  10. * 00010000
  11. * CONTENTS - 00011000
  12. * 00012000
  13. * DMKRNHIN - SECOND LEVEL INTERRUPT HANDLER FOR 3704, 3705 00013000
  14. * DMKRNHIC - CONTASK INITIALIZATION AND SCHEDULING 00014000
  15. * DMKRNHND - SCHEDULE CONTROL AND/OR RESET FUNCTIONS 00015000
  16. *. 00016000
  17. SPACE 2 00017000
  18. DMKRNH START 00018000
  19. SPACE 00019000
  20. USING PSA,0 @V200820 00020000
  21. USING CONTASK,R6 @V200820 00021000
  22. USING RDEVBLOK,R8 @V200820 00022000
  23. USING NICBLOK,R9 @V200820 00023000
  24. USING IOBLOK,R10 @V200820 00024000
  25. USING VMBLOK,R11 @V200820 00025000
  26. SPACE 00026000
  27. EXTRN DMKIOSQR,DMKSTKCP,DMKCVTBH @V200820 00027000
  28. EXTRN DMKQCNCL,DMKQCNET,DMKQCNTO @V200820 00028000
  29. EXTRN DMKCNSED,DMKSCNRU,DMKERMSG @V200820 00029000
  30. EXTRN DMKSCNAU,DMKVSPRT,DMKCVTDT @V200820 00030000
  31. EXTRN DMKCFMBK,DMKCFMAT,DMKBLDVM @V200820 00031000
  32. EXTRN DMKIOERN,DMKNLEMP,DMKNLDR @V407508 00032100
  33. EXTRN DMKCPVAE,DMKRIORN @VM01040 00033000
  34. EXTRN DMKQCNWT @V407508 00033100
  35. SPACE 00034000
  36. ENTRY DMKRNHIC,DMKRNHIN,DMKRNHND @V200820 00035000
  37. ENTRY DMKRNHTG REQUEST TAG SOURCE FIELD @V200820 00036000
  38. ENTRY DMKRNHTR USERID FOR BTU TRACE OUTPUT @V200820 00037000
  39. ENTRY DMKRNHCT STATISTICAL COUNTER BLOCK @V200820 00038000
  40. EJECT 00039000
  41. *. 00040000
  42. * SUBROUTINE NAME - 00041000
  43. * 00042000
  44. * DMKRNHIC 00043000
  45. * 00044000
  46. * FUNCTION - 00045000
  47. * 00046000
  48. * TO INITIALIZE THE CONTASK FIELDS WHICH COMPRISE THE 00047000
  49. * 370X NETWORK CONTROL PROGRAM BASIC TRANSMISSION HEADER 00048000
  50. * 00049000
  51. * ATTRIBUTES - 00050000
  52. * 00051000
  53. * SERIALLY REUSEABLE, RESIDENT, ENTERED VIA GOTO 00052000
  54. * 00053000
  55. * ENTRY CONDITIONS - 00054000
  56. * 00055000
  57. * GR 12 = ADDRESS OF DMKRNHIC 00056000
  58. * GR 11 = ADDRESS OF A VALID VMBLOK 00057000
  59. * GR 8 = ADDRESS OF THE 370X RDEVBLOK 00058000
  60. * 00059000
  61. * EXIT CONDITIONS - 00060000
  62. * 00061000
  63. * EXIT IS MADE VIA GOTO DMKDSPCH 00062000
  64. * 00063000
  65. * CALLS TO OTHER ROUTINES - 00064000
  66. * 00065000
  67. * DMKFREE - TO ALLOCATE FREE STORAGE FOR CONTASK'S 00066000
  68. * 00067000
  69. * EXTERNAL REFERENCES - NONE 00068000
  70. * 00069000
  71. * TABLES / WORK AREAS - NONE 00070000
  72. * 00071000
  73. * NOTES - 00072000
  74. * 00073000
  75. * DMKRNHIC IS ENTERED VIA CPEXBLOK OR GOTO WHENEVER 00074000
  76. * DMKQCN HAS STACKED A CONTASK ON THE 370X RDEVBLOK, 00075000
  77. * AND THE CONTASK CHAIN WAS PREVIOUSLY EMPTY, OR IF 00076000
  78. * THE CONTASK HAD THE 'PRIORITY' FLAG SET. 00077000
  79. * 00078000
  80. * REGISTER USAGE - 00079000
  81. * 00080000
  82. * GR14,15 LINKAGE REGISTERS 00081000
  83. * GR12,13 MODULE BASE REGISTERS 00082000
  84. * GR11 = VMBLOK ADDRESSABILITY 00083000
  85. * GR10 = IOBLOK ADDRESSABILITY 00084000
  86. * GR 9 = NICBLOK ADDRESSABILITY 00085000
  87. * GR 8 = RDEVBLOK ADDRESSABILITY 00086000
  88. * GR 7 = INTERNAL LINKAGE REGISTER 00087000
  89. * GR 6 = CONTASK ADDRESSABILITY 00088000
  90. * GR0-5= WORK REGISTERS 00089000
  91. * 00090000
  92. EJECT 00091000
  93. * OPERATION - 00092000
  94. * 00093000
  95. * 1. IF THE 370X IS NOT AVAILABLE, EXIT. 00094000
  96. * 00095000
  97. * 2. IF THERE ARE NO MORE CONTASK'S TO BE PROCESSED, 00096000
  98. * ATTEMPT TO START OUTPUT TO THE 370X VIA RNSTART. 00097000
  99. * 00098000
  100. * 3. IF THE RESOURCE SPECIFIED BY THE VMTRMID FIELD IN 00099000
  101. * THE VMBLOK (FROM 'CONUSER') IS NOT AVAILABLE, SET 00100000
  102. * RETURN CODE 12 IN THE RESPONSE SAVEAREA (IF ANY), 00101000
  103. * AND RETURN THE CONTASK VIA CALL DMKQCNET. 00102000
  104. * 00103000
  105. * 4. WRITE TASK - SET CONTCMD TO WRITNRM, SET WRTSTPR 00104000
  106. * IN CONDFLG. IF LOGDROP OR LOGHOLD SPECIFIED, OR IF 00105000
  107. * CONRESP OR CONSPLT IS SET, TURN OFF WRTSTPR. IF 00106000
  108. * LOGDROP IS SET, CHANGE COMMAND TO WRITEOT. FOR 00107000
  109. * LOGHOLD, SET COMMAND TO WRITDSC. 00108000
  110. * 00109000
  111. * 5. READ TASK - SET CONTCMD TO READNRM. IF INHIBIT 00110000
  112. * WAS SPECIFIED, AND NICPSUP IS NOT SET, OR NICTYPE 00111000
  113. * IS NICTELE, BUILD A CONTASK TO WRITE A MASKING 00112000
  114. * STRING PRIOR TO ISSUING THE READ. INITIALIZE BOTH 00113000
  115. * THE READ TASK AND THE WRITE MASK TASK. 00114000
  116. * IF NICPSUP IS SET, BUILD A CONTASK TO SEND BYPASS 00115000
  117. * CHARACTER (X'24'), THEN READ, THEN SEND RESTORE 00116000
  118. * CHARACTER (X'14'). INITIALIZE ALL THREE TASKS. 00117000
  119. * 00118000
  120. * 6. ATTEMPT TO START OUTPUT TO THE 370X. IF THE 370X 00119000
  121. * IS EITHER NOT READY OR ALREADY BUSY, EXIT. 00120000
  122. * OTHERWISE, SCAN THE ENTIRE NICLIST LOOKING FOR 00121000
  123. * CONTASK'S TO BE SENT TO THE 370X. AS MANY CONTASK'S 00122000
  124. * AS POSSIBLE ARE SENT WITH A SINGLE CALL TO DMKIOSQR. 00123000
  125. *. 00124000
  126. EJECT 00125000
  127. USING DMKRNHIC,R12 @V200820 00126000
  128. DMKRNHIC DS 0D WAKE-UP ENTRY FROM DMKQCN @V200820 00127000
  129. LM R12,R13,RNHBASE SETUP MODULE ADDRESSABILITY @V200820 00128000
  130. USING DMKRNH,R12,R13 @V200820 00129000
  131. SPACE 00130000
  132. TM RDEVSTAT,RDEVDED+RDEVDISA+RDEVNRDY AVAILABLE ?@V200820 00131000
  133. BNZ GODSPCH NO -- JUST GO AWAY FOR NOW @V200820 00132000
  134. SLR R10,R10 CLEAR IOBLOK REGISTER (NO IOBLOK)@V200820 00133000
  135. NEXTASK EQU * PROCESS ONE OR MORE CONTASK'S @V200820 00134000
  136. L R6,RDEVCON PICK UP POINTER TO CONTASK @V200820 00135000
  137. LTR R6,R6 ANYTHING THERE ? @V200820 00136000
  138. BZ RNSTART NO -- TRY TO START THE DEVICE @V200820 00137000
  139. L R1,CONPNT REMOVE FIRST CONTASK FROM CHAIN @V200820 00138000
  140. ST R1,RDEVCON ... @V200820 00139000
  141. SPACE 00140000
  142. L R1,CONUSER GET ADDRESS OF CONTASK OWNER @V407508 00141100
  143. BAL R7,SWITCHVM SWITCH TO THIS VMBLOK @V407508 00142100
  144. SPACE 00144000
  145. LA R7,NEXTASK RETURN ADDRESS IF LINE BREAK @V200820 00145000
  146. LH R9,VMTRMID GET RESOURCE ID OF USER TERMINAL @V200820 00146000
  147. N R9,F4095 CLEAR THE DEVICE CODE PORTION @V200820 00147000
  148. CH R9,RDEVMAX VALIDATE IT FOR SAFETY @V200820 00148000
  149. BH LINEBRK ASSUME HIS TERMINAL DIED @V200820 00149000
  150. LTR R9,R9 CHECK THE LOWER BOUND ALSO @V200820 00150000
  151. BNP LINEBRK RESOURCE ZERO IS SPECIAL @V200820 00151000
  152. SPACE 00152000
  153. MH R9,=AL2(NICSIZE*8) COMPUTE NICBLOK LIST INDEX @V200820 00153000
  154. AL R9,RDEVNICL INDEX TO THE ACTUAL NICBLOK @V200820 00154000
  155. TM NICSTAT,NICDISA+NICDED+NICEPMD AVAILABLE ? @V200820 00155000
  156. BNZ LINEBRK NO -- LINE BREAK @V200820 00156000
  157. L R1,NCONTSK NUMBER OF TASKS FROM DMKQCN @V200820 00157000
  158. AL R1,F1 INCREMENT . . . @V200820 00158000
  159. ST R1,NCONTSK . . . @V200820 00159000
  160. TM CONSTAT,CONCNTL IS THIS A CONTROL TASK ? @V200820 00160000
  161. BO RNCNTRL YES - SHOULD BE ALL SET @V200820 00161000
  162. TM CONSTAT,CONOUTPT IS THIS AN OUTPUT CONTASK ? @V200820 00162000
  163. BO RNWRITE YES - GO FIGURE OUT COMMAND @V200820 00163000
  164. SLR R0,R0 @V200820 00164000
  165. STH R0,CONDCNT NO DATA SENT WITH READ REQUEST @V200820 00165000
  166. LA R1,READNRM NORMAL READ COMMAND + MODIFIER @V200820 00166000
  167. TM CONPARM,INHIBIT SUPPRESS TYPEOUT ? @V200820 00167000
  168. BZ RNCOMND NO -- JUST LET IT GO AS IS @V200820 00168000
  169. STH R1,CONTCMD SET THE COMMAND FOR THIS TASK @V200820 00169000
  170. LA R5,NEXTASK BRANCH ADDRESS AFTER MASK SETUP @VM08679 00170000
  171. MASKING EQU * HERE TO RETRY AN INHIBIT READ @VM08679 00171000
  172. BAL R7,TAGTASK FILL IN OTHER BTU FIELDS @V200820 00172000
  173. LR R4,R6 CONTASK ADDRESS TO GR4 @V200820 00173000
  174. TM NICTYPE,NICTELE TELEGRAPH TERMINAL ? @V200820 00174000
  175. BO MASKTTY YES - TYPE A MASK FIRST @V200820 00175000
  176. TM NICFLAG,NICPSUP PRINT SUPPRESS AVAILABLE ? @V200820 00176000
  177. BZ MASKIBM NO -- TYPE 1050, 2741 MASK @V200820 00177000
  178. EJECT 00178000
  179. BYPREST EQU * SEND BYPASS, READ, SEND RESTORE @V200820 00179000
  180. LA R0,CONTSIZE+1 GET ANOTHER CONTASK @V200820 00180000
  181. BAL R3,INHTASK ...WITHOUT CHAINING IT @V200820 00181000
  182. MVI CONDCNT+1,1 DATA COUNT = ONE @V200820 00182000
  183. MVC CONDATA(8),ZEROES CLEAR THE BUFFER @V200820 00183000
  184. MVI CONDATA,X'24' BYPASS CHARACTER @V200820 00184000
  185. BAL R7,TAGTASK FILL IN THE BTU @V200820 00185000
  186. BAL R7,TASKENQ CHAIN THE WRITE BYPASS TASK @V200820 00186000
  187. LR R6,R4 ORIGINAL READ CONTASK TO GR6 @V200820 00187000
  188. BAL R7,TASKENQ CHAIN IN THE READ SECOND @V200820 00188000
  189. LA R0,CONTSIZE+1 GET A THIRD CONTASK @V200820 00189000
  190. BAL R3,INHTASK . . . @V200820 00190000
  191. MVI CONDCNT+1,1 DATA COUNT = ONE @V200820 00191000
  192. MVC CONDATA(8),ZEROES CLEAR THE BUFFER @V200820 00192000
  193. MVI CONDATA,X'14' RESTORE CHARACTER @V200820 00193000
  194. LA R1,WRITNRM WRITE COMMAND @V200820 00194000
  195. B RNCOMND USE THE NORMAL PATH NOW @V200820 00195000
  196. SPACE 00196000
  197. MASKTTY EQU * TYPE READ MASK FOR TELETYPE @V200820 00197000
  198. LA R0,CONTSIZE+(TTYMASL+7)/8 TASK SIZE NEEDED @V200820 00198000
  199. BAL R3,INHTASK GET AN ISOLATED CONTASK @V200820 00199000
  200. MVI CONDCNT+1,TTYMASL DATA LENGTH @V200820 00200000
  201. MVC CONDATA(TTYMASL),TTYMASK MOVE IN THE MASK @V200820 00201000
  202. B MASKWRT GO QUEUE THE TASKS FOR EXECUTION @V200820 00202000
  203. SPACE 00203000
  204. MASKIBM EQU * TYPE MASK FOR 1050, 2741 @V200820 00204000
  205. LA R0,CONTSIZE+(IBMMASL+7)/8 CONTASK SIZE @V200820 00205000
  206. BAL R3,INHTASK GET AN ISOLATED CONTASK @V200820 00206000
  207. MVI CONDCNT+1,IBMMASL DATA LENGTH @V200820 00207000
  208. MVC CONDATA(IBMMASL),IBMMASK MOVE IN THE MASK @V200820 00208000
  209. MASKWRT EQU * QUEUE THE TASKS FOR EXECUTION @V200820 00209000
  210. BAL R7,TAGTASK FILL IN THE BTU @V200820 00210000
  211. TM CONSTAT-CONTASK(R4),CONRTRY RETRY OPERATION ? @VM08679 00211000
  212. BZ *+8 NO -- O.K. AS IS @VM08679 00212000
  213. OI CONSTAT,CONRTRY SET RETRY IN MASK WRITE @VM08679 00213000
  214. BAL R7,TASKENQ QUEUE THE MASK WRITE FIRST @V200820 00214000
  215. LR R6,R4 @V200820 00215000
  216. BAL R7,TASKENQ THEN QUEUE IN THE READ @V200820 00216000
  217. L R4,CONRETN RESPONSE SAVEAREA ADDRESS @VM08679 00217000
  218. SLR R0,R0 @VM08679 00218000
  219. ST R0,SAVER2-SAVEAREA(,R4) SET RETURN CODE ZERO @VM08679 00219000
  220. BR R5 RETURN AND CONTINUE @VM08679 00220000
  221. EJECT 00221000
  222. INHTASK EQU * ALLOCATE CONTASK FOR READ INHIBIT@V200820 00222000
  223. BAL R7,CTLTASZ GET A CONTROL CONTASK @V200820 00223000
  224. L R1,CONPNT PULL IT BACK OFF THE CHAIN @V200820 00224000
  225. ST R1,NICQPNT . . . @V200820 00225000
  226. MVI CONSTAT,CONOUTPT THIS IS REALLY OUTPUT @V200820 00226000
  227. MVI CONPARM,NOAUTO+INHIBIT SET IDENTITY FLAGS @V200820 00227000
  228. LA R0,WRITNRM NORMAL WRITE COMMAND @V200820 00228000
  229. STH R0,CONTCMD SET FOR THE NCP @V200820 00229000
  230. BR R3 RETURN @V200820 00230000
  231. SPACE 2 00231000
  232. RNWRITE EQU * FIGURE OUT COMMAND FOR OUTPUT @V200820 00232000
  233. LH R1,CONCNT MESSAGE DATA LENGTH @V200820 00233000
  234. LA R14,CONDATA(R1) POINT PAST LAST CHARACTER @VM08816 00234000
  235. TM CONPARM,NOAUTO AUTO CARRIAGE RETURN ? @VM08816 00235000
  236. BZ RNWRTAU YES - INSERT CORRECT CHARS @VM08816 00236000
  237. TM NICTYPE,NICTELE TELEGRAPH TERMINAL ? @VM08816 00237000
  238. BO RNTBELL YES - CHECK FOR ALARM @VM08816 00238000
  239. B RNWRTNA WRITE WITHOUT CARRIAGE RETURN @VM08816 00239000
  240. RNWRTAU EQU * INSERT CHARS FOR NEW-LINE @VM08816 00240000
  241. MVI 0(R14),X'15' MOVE IN NEW-LINE CHARACTER @V200820 00241000
  242. LA R1,1(0,R1) INCLUDE 'CR' IN DATA COUNT @V200820 00242000
  243. TM NICTYPE,NICTELE TELEGRAPH TERMINAL ? @VM08772 00243000
  244. BZ RNWRTNA NO -- ALL SET @VM08772 00244000
  245. MVC 0(2,R14),=X'0D25' SEPARATE 'CR,LF' FOR TWX @VM08772 00245000
  246. LA R1,1(0,R1) ADD ONE MORE TO THE COUNT @VM08772 00246000
  247. LA R14,2(0,R14) POINT PAST NEW LAST CHARACTER @VM08816 00247000
  248. RNTBELL EQU * CHECK FOR TELEGRAPH ALARM @VM08816 00248000
  249. TM CONPARM,ALARM SHOULD WE RING THE BELL ? @VM08816 00249000
  250. BZ RNWRTNA NO -- O.K. AS IS @VM08816 00250000
  251. LA R1,4(0,R1) ADD FOUR TO THE COUNT @VM08816 00251000
  252. MVC 0(4,R14),=X'2F2F2F2F' FOUR RINGS ON THE BELL @VM08816 00252000
  253. RNWRTNA EQU * @V200820 00253000
  254. STH R1,CONDCNT SET IN BTU TEXT LENGTH FIELD @V200820 00254000
  255. LA R1,WRITNRM NORMAL WRITE COMMAND @V200820 00255000
  256. TM CONPARM,LOGHOLD+LOGDROP IF EITHER IS ON... @V200820 00256000
  257. BZ RNCOMND ...WE NEED A DISCONNECT@V200820 00257000
  258. LA R1,WRITEOT WRITE END OF TRANSMISSION @V200820 00258000
  259. RNCOMND EQU * @V200820 00259000
  260. STH R1,CONTCMD SET BTU COMMAND AND MODIFIER @V200820 00260000
  261. BAL R7,TAGTASK FINISH SETTING UP CONTASK BTU @V200820 00261000
  262. RNCNTRL EQU * ENQUEUE CONTROL CONTASK @V200820 00262000
  263. BAL R7,TASKENQ QUEUE CONTASK ON THE NICBLOK @V200820 00263000
  264. B NEXTASK PROCESS NEXT CONTASK, IF ANY @V200820 00264000
  265. EJECT 00265000
  266. *. 00266000
  267. * SUBROUTINE NAME - 00267000
  268. * 00268000
  269. * DMKRNHND 00269000
  270. * 00270000
  271. * FUNCTION - 00271000
  272. * 00272000
  273. * TO EXECUTE CONTROL FUNCTIONS FOR THE 370X NCP. 00273000
  274. * 00274000
  275. * ATTRIBUTES - 00275000
  276. * 00276000
  277. * SERIALLY REUSEABLE, RESIDENT, CALLED VIA SVC 00277000
  278. * 00278000
  279. * ENTRY CONDITIONS - 00279000
  280. * 00280000
  281. * GR13 = ADDRESS OF A STANDARD SAVEAREA 00281000
  282. * GR12 = ADDRESS OF DMKRNHND 00282000
  283. * GR11 = ADDRESS OF A USER VMBLOK 00283000
  284. * GR 9 = ADDRESS OF THE NICBLOK 00284000
  285. * GR 8 = ADDRESS OF THE 370X RDEVBLOK 00285000
  286. * GR 2 = BTU DATA FIELD LENGTH, AND 'NORET' PARAMETER 00286000
  287. * GR 1 = ADDRESS OF DATA ASSOCIATED WITH THE BTU (IF ANY) 00287000
  288. * GR 0 = COMMAND AND MODIFIER TO BE EXECUTED 00288000
  289. * 00289000
  290. * EXIT CONDITIONS - 00290000
  291. * 00291000
  292. * CC = 0 -> REQUEST WAS SUCCESSFUL 00292000
  293. * 00293000
  294. * IF NORET NOT SPECIFIED, GR1 CONTAINS THE ADDRESS OF 00294000
  295. * A MINI-CONTASK CONTAINING THE RESPONSE BTU RETURNED 00295000
  296. * BY THE 370X NCP. THIS BLOCK IS IN THE FORMAT OF THE 00296000
  297. * CONTASK FIELDS CONCCW3 THRU CONDATA. THE FIRST HALFWORD 00297000
  298. * (CONCCW3) CONTAINS THE SIZE OF THE BLOCK IN DOUBLE-WORDS. 00298000
  299. * 00299000
  300. * CC = 2 -> EITHER THE SPECIFIED RESOURCE WAS INVALID, 00300000
  301. * THE 370X WAS NOT AVAILABLE, THE RESOURCE WAS 00301000
  302. * NOT AVAILABLE, OR A 370X FAILURE OCCURRED. 00302000
  303. * 00303000
  304. * CALLS TO OTHER ROUTINES - 00304000
  305. * 00305000
  306. * DMKSTKCP - TO STACK A CPEXBLOK FOR A LATER EXIT. 00306000
  307. * DMKFREE - TO ALLOCATE STORAGE FOR THE CONTASK. 00307000
  308. * DMKRNHIC - TO INITIATE I/O TO THE 370X. 00308000
  309. * 00309000
  310. * EXTERNAL REFERENCES - NONE 00310000
  311. * 00311000
  312. * TABLES / WORK AREAS - NONE 00312000
  313. * 00313000
  314. * NOTES - NONE 00314000
  315. * 00315000
  316. EJECT 00316000
  317. * REGISTER USAGE - 00317000
  318. * 00318000
  319. * GR14,15 LINKAGE REGISTERS 00319000
  320. * GR13 = SAVEAREA ADDRESSABILITY 00320000
  321. * GR12 = DMKRNH BASE REGISTER (HALF-MODULE LIMIT) 00321000
  322. * GR11 = VMBLOK ADDRESSABILITY 00322000
  323. * GR10 = IOBLOK ADDRESSABILITY (NOT USED) 00323000
  324. * GR 9 = NICBLOK ADDRESSABILITY 00324000
  325. * GR 8 = RDEVBLOK ADDRESSABILITY 00325000
  326. * GR 7 = INTERNAL LINKAGE REGISTER 00326000
  327. * GR 6 = CONTASK ADDRESSABILITY 00327000
  328. * GR0-5= WORK REGISTERS 00328000
  329. * 00329000
  330. * OPERATION - 00330000
  331. * 00331000
  332. * 1. IF THE 370X IS NOT AVAILABLE, OR IF THE RESOURCE 00332000
  333. * SPECIFIED IS NOT VALID, SET R2 = 12, CC = 2, EXIT. 00333000
  334. * 00334000
  335. * 2. IF THE COMMAND IS CDISPLY, ALLOCATE A CONTASK WITH 00335000
  336. * ONE EXTRA DBL-WD FOR DATA, STORE CALLER'S GR3 AS 00336000
  337. * THE DATA, SET THE DATA LENGTH TO FOUR. 00337000
  338. * 00338000
  339. * 3. BUILD A CONTROL CONTASK, FILL IN THE BTU FIELDS, 00339000
  340. * USING CALLER'S COMMAND, MODIFIER, AND DESTINATION 00340000
  341. * RESOURCE I.D. 00341000
  342. * 00342000
  343. * 4. IF NORET WAS NOT SPECIFIED, SET CONRESP AND PUT THE 00343000
  344. * ADDRESS OF THE SAVEAREA IN CONRETN FOR A LATER EXIT. 00344000
  345. * 00345000
  346. * 5. IF NORET WAS SPECIFIED, AND THE 370X IS ALREADY 00346000
  347. * ACTIVE, EXIT. IF THE 370X IS NOT ACTIVE, BUILD AND 00347000
  348. * STACK A CPEXBLOK TO RETURN TO CALLER AS SOON AS 00348000
  349. * POSSIBLE, AND THEN ATTEMPT TO START THE 370X. 00349000
  350. *. 00350000
  351. EJECT 00351000
  352. USING SAVEAREA,R13 @V200820 00352000
  353. USING DMKRNHND,R12 @V200820 00353000
  354. DMKRNHND DS 0D ENTRY TO SCHEDULE A CONTROL CONTASK @V200820 00354000
  355. ENTER , @V200820 00355000
  356. L R12,RNHBASE USE HALF-STANDARD ADDRESSABILITY @V200820 00356000
  357. USING DMKRNH,R12 ... @V200820 00357000
  358. SPACE 00358000
  359. USING RDEVBLOK,R8 @V200820 00359000
  360. LA R2,12(0) RETURN CODE IF INVALID CALL @V200820 00360000
  361. TM RDEVSTAT,RDEVDED+RDEVDISA+RDEVNRDY O.K. TO USE ?@V200820 00361000
  362. BNZ RNDEXIT NO -- SET CC = 2 @V200820 00362000
  363. TM RDEVFLAG,RDEVLNCP IS THERE AN ACTIVE NCP ? @V200820 00363000
  364. BZ RNDEXIT NO -- CALLER MADE AN ERROR @V200820 00364000
  365. SWITCH CONTINUE ON THE I/O PROCESSOR @V407593 00364500
  366. OI RDEVSTAT,RDEVRSVD 370X IN USE BY THE SYSTEM @V200820 00365000
  367. SPACE 00366000
  368. SLR R10,R10 CLEAR IOBLOK REGISTER (NO IOBLOK)@V200820 00367000
  369. SLR R2,R2 @V240820 00368000
  370. IC R2,SAVER2+3 GR2 = BTU DATA LENGTH (IF ANY) @V240820 00369000
  371. LA R0,CONTSIZE*8+7(0,R2) CONTASK SIZE IN BYTES @V240820 00370000
  372. SRL R0,3(0) CONVERT TO DOUBLE-WORDS @V240820 00371000
  373. BAL R7,CTLTASZ ALLOCATE AND INITIALIZE CONTASK @V240820 00372000
  374. STH R2,CONDCNT SET BTU DATA LENGTH IN CONTASK @V240820 00373000
  375. LTR R2,R2 WAS ANY DATA PROVIDED ? @V240820 00374000
  376. BNP RNHNDTK NO -- ALL SET AS IS @V240820 00375000
  377. BCTR R2,0 DECREMENT LENGTH FOR MOVE @V240820 00376000
  378. L R1,SAVER1 POINTER TO CALLER'S DATA FIELD @V240820 00377000
  379. EX R2,MOVECTL MOVE DATA INTO THE CONTASK @V240820 00378000
  380. SPACE 00379000
  381. RNHNDTK EQU * COMPLETE CONTASK INITIALIZATION @V240820 00380000
  382. NI NICSTAT,255-NICNTRL LET THIS TASK EXECUTE @V240820 00381000
  383. L R1,SAVER0 CALLER'S COMMAND, MODIFIER @V200820 00382000
  384. STH R1,CONTCMD SET IN THE CONTASK BTU @V200820 00383000
  385. L R1,NTSKCTL NUMBER OF CALLS TO DMKRNHND @V200820 00384000
  386. AL R1,F1 INCREMENT . . . @V200820 00385000
  387. ST R1,NTSKCTL . . . @V200820 00386000
  388. TM SAVER2+2,NORET/256 IS A RESPONSE DESIRED ? @V200820 00387000
  389. BO RNHNDST NO -- SCHEDULE TASK AND EXIT@V200820 00388000
  390. SLR R2,R2 CLEAR RETURN CODE IN SAVE-AREA @V200820 00389000
  391. ST R2,SAVER2 ... @V200820 00390000
  392. OI CONSTAT,CONRESP RESPONSE IS REQUESTED @V200820 00391000
  393. ST R13,CONRETN ...VIA A LATER EXIT @V200820 00392000
  394. BAL R7,TAGTASK COMPLETE FILLING IN THE BTU @V200820 00393000
  395. B RNSTART START UP THE NCP WITH A BTU @VM01034 00394000
  396. SPACE 2 00395000
  397. MOVECTL MVC CONDATA(*-*),0(R1) EXECUTED MOVE @V240820 00396000
  398. EJECT 00397000
  399. RNHNDST EQU * EXIT IS REQUIRED AFTER START @V200820 00398000
  400. BAL R7,TAGTASK FILL IN BTU FIELDS FOR LATER @V200820 00399000
  401. SLR R2,R2 SET RETURN CODE ZERO @V200820 00400000
  402. TM RDEVFLAG,RDEVWAIT+RDEVSLOW ALREADY BUSY ? @V200820 00401000
  403. BNZ RNDEXIT YES - JUST EXIT @V200820 00402000
  404. LA R4,RNDEXIT EXECUTION ADDRESS @V200820 00403000
  405. BAL R7,STKCPEX STACK A CPEXBLOK TO DO THE 'EXIT'@V200820 00404000
  406. B RNSTART START UP THE NCP @VM01034 00405000
  407. SPACE 2 00406000
  408. RNDEXIT EQU * @V200820 00407000
  409. ST R2,SAVER2 PASS BACK RETURN CODE IN GR2 @V200820 00408000
  410. LTR R2,R2 SET CONDITION CODE ACCORDINGLY @V200820 00409000
  411. EXIT , RETURN TO CALLER @V200820 00410000
  412. DROP R13 @V200820 00411000
  413. SPACE 3 00412000
  414. *---------------------------------------------------------------------* 00413000
  415. * THE THREE SUBROUTINES 'CTLTASK', 'STKCPEX', AND 'TAGTASK' * 00414000
  416. * MUST NOT ADDRESS ANY FIELDS IN THE SECOND 4096 BYTES OF * 00415000
  417. * DMKRNH. THESE ARE USED BY 'DMKRNHND' WHICH HAS LIMITED * 00416000
  418. * ADDRESSABILITY RANGE DUE TO THE SAVEAREA REGISTER, GR13. * 00417000
  419. *---------------------------------------------------------------------* 00418000
  420. SPACE 00419000
  421. CTLTASK EQU * ALLOCATE AND QUEUE CONTROL TASK @V200820 00420000
  422. LA R0,CONTSIZE SIZE OF A BASIC CONTASK @V200820 00421000
  423. CTLTASZ EQU * ENTER HERE FOR A LARGER TASK @V200820 00422000
  424. CALL DMKFREE GET SOME FREE STORAGE @V200820 00423000
  425. XC 0(CONTSIZE*8,R1),0(R1) CLEAR THE HEADER @V200820 00424000
  426. LR R6,R1 ADDRESS VIA GR6 @V200820 00425000
  427. STH R0,CONTSKSZ SET THE TASK SIZE FOR LATER FRET @V200820 00426000
  428. L R1,NICUSER VMBLOK OF RESOURCE OWNER @V200820 00427000
  429. ST R1,CONUSER . . . @V200820 00428000
  430. MVI CONSTAT,CONCNTL THIS IS A CONTROL TASK @V200820 00429000
  431. L R1,NICQPNT CURRENT CONTASK CHAIN @V200820 00430000
  432. ST R6,NICQPNT PUT THIS TASK FIRST @V200820 00431000
  433. ST R1,CONPNT . . . @V200820 00432000
  434. BR R7 RETURN @V200820 00433000
  435. EJECT 00434000
  436. TAGTASK EQU * FILL IN CONRTAG, CONSRID FIELDS @V200820 00435000
  437. LH R1,CONSTAT PICK UP STATUS AND PARM FLAGS @V200820 00436000
  438. STH R1,CONSRID RECORD THEM IN THE BTU ITSELF @V200820 00437000
  439. LA R1,CONSRID START FOR DATA TRANSFER @V200820 00438000
  440. ST R1,CONADDR SET FOR CCW BUILD @V200820 00439000
  441. LH R1,NICNAME RESOURCE I.D. FROM NICBLOK @V200820 00440000
  442. STH R1,CONDEST ...SET FOR THE NCP @V200820 00441000
  443. LH R1,CONDCNT DATA LENGTH . . . @V200820 00442000
  444. LA R1,CONDATA-CONSRID(,R1) ADD LENGTH OF THE BTU @V200820 00443000
  445. STH R1,CONCNT SET FOR CCW BUILD @V200820 00444000
  446. L R1,DMKRNHTG REQUEST TAG FOR RESPONSE BTU'S @V200820 00445000
  447. LA R1,1(0,R1) @V200820 00446000
  448. N R1,XRIGHT16 USE ONLY 16 BITS @V200820 00447000
  449. BNZ *+8 NEVER LET THE TAG BE ZERO @V200820 00448000
  450. LA R1,1(0,0) ... @V200820 00449000
  451. ST R1,DMKRNHTG @V200820 00450000
  452. STH R1,CONRTAG TAG CONTASK FOR LATER RETRIEVAL @V200820 00451000
  453. BR R7 @V200820 00452000
  454. SPACE 2 00453000
  455. STKCPEX EQU * BUILD AND STACK A CPEXBLOK @V200820 00454000
  456. LA R0,CPEXSIZE @V200820 00455000
  457. CALL DMKFREE GET SOME FREE STORAGE @V200820 00456000
  458. USING CPEXBLOK,R1 @V200820 00457000
  459. XC CPEXBLOK(16),CPEXBLOK CLEAR THE HEADER @V200820 00458000
  460. LR R15,R4 EXECUTION ADDRESS TO GR15 @V200820 00459000
  461. STM R15,R14,CPEXADD SET CPEXADD, REGISTERS @V200820 00460000
  462. CALL DMKSTKCP STACK THE BLOCK FOR LATER @V200820 00461000
  463. BR R7 RETURN @V200820 00462000
  464. ********************************************************************* 00463100
  465. * SUBROUTINE TO SWITCH FROM VMBLOK(R11) TO VMBLOK(R1) 00463200
  466. * INCLUDES VMTTIME AND VMBLOK-LOCK MANIPULATION FOR APU-SUPPORT 00463300
  467. * CALLED BY BAL R7 AND MODIFIES R-0,14, AND 15 00463400
  468. ********************************************************************* 00463500
  469. SWITCHVM EQU * @V407593 00463600
  470. SWTCHVM @V407593 00463700
  471. BR R7 AND RETURN TO CALLER. @V407593 00463800
  472. SWITCH2 DS 0H @V407508 00463900
  473. SWTCHVM OPT=UNLOCK @V407508 00464000
  474. BR R7 RETURN TO CALLER @V407508 00464100
  475. DMKRNHTG DC F'0' BTU REQUEST TAG SOURCE FIELD @V200820 00466000
  476. LTORG LOCAL LITERAL POOL FOR DMKRNHND @V200820 00467000
  477. EJECT 00468000
  478. USING DMKRNH,R12,R13 RE-ESTABLISH ADDRESSABILITY @V200820 00469000
  479. RNSTART DS 0H SEND REQUESTS TO THE 370X NCP @VM01034 00470000
  480. LM R12,R13,RNHBASE GET FULL ADDRESSABILITY @VM01034 00471000
  481. TM RDEVSTAT,RDEVNRDY+RDEVBUSY+RDEVSCED O.K. ? @VM01034 00472000
  482. BNZ STARTED NO -- @VM01034 00473000
  483. TM RDEVFLAG,RDEVWAIT+RDEVSLOW ACTIVE OR SLOW ? @VM01034 00474000
  484. BNZ STARTED YES -- EXIT NOW @VM01034 00475000
  485. L R9,RDEVNICL START OF NICBLOK LIST @V200820 00476000
  486. LA R2,NICSIZE*8 INCREMENT @V200820 00477000
  487. LH R3,RDEVMAX HIGHEST VALID RESOURCE I.D. @V200820 00478000
  488. MH R3,=AL2(NICSIZE*8) HIGHEST INDEX @V200820 00479000
  489. ALR R3,R9 GR3 = END ADDRESS LIMIT @V200820 00480000
  490. RNICLST EQU * SEARCH FOR WAITING CONTASK'S @V200820 00481000
  491. L R6,NICQPNT POINTER TO CONTASK CHAIN @V200820 00482000
  492. LTR R6,R6 ARE THERE ANY ? @V200820 00483000
  493. BNP RNEXLST NO -- @V200820 00484000
  494. TM NICSTAT,NICNTRL CONTROL OPERATION ACTIVE ? @V200820 00485000
  495. BZ RNCHAIN NO -- CHECK ACTIVE CONTASK @V200820 00486000
  496. RNEXLST EQU * ADVANCE THROUGH THE NICLIST @V200820 00487000
  497. BXLE R9,R2,RNICLST . . . @V200820 00488000
  498. SPACE 00489000
  499. LTR R10,R10 DO WE HAVE AN IOBLOK ? @V200820 00490000
  500. BZ STARTED NO -- OBVIOUSLY NOTHING TO DO @VM01034 00491000
  501. LH R1,IOBRCNT COUNT OF TASKS ON THIS IOBLOK @V200820 00492000
  502. AL R1,NTSKOUT ADD TO NUMBER OF TASKS SENT @V200820 00493000
  503. ST R1,NTSKOUT . . . @V200820 00494000
  504. SLR R9,R9 NO IOBLOK AFTER THE START @V200820 00495000
  505. STH R9,IOBRCNT CLEAR THE RETRY COUNT FOR I/O @V200820 00496000
  506. BAL R7,RNGORED START I/O VIA DMKIOSQR @VM01034 00497000
  507. STARTED EQU * EXIT TO THE DISPATCHER @VM01034 00498000
  508. GOTO DMKDSPCH . . . @VM01034 00499000
  509. SPACE 00500000
  510. RNGORED EQU * @V200820 00501000
  511. LR R2,R7 SAVE RETURN ACROSS NEXT CALL @V200820 00502000
  512. BAL R7,FRETIOER RELEASE ANY EXISTING IOERBLOK @V200820 00503000
  513. LR R7,R2 RECOVER RETURN ADDRESS @V200820 00504000
  514. LA R2,DMKRNHIN INTERRUPT RETURN ADDRESS @V200820 00505000
  515. ST R2,IOBIRA SET IN IOBLOK @V200820 00506000
  516. L R2,ASYSVM SYSTEM VMBLOK IS THE USER @V200820 00507000
  517. ST R2,IOBUSER ... @V200820 00508000
  518. MVI IOBSTAT,X'00' CLEAR OUT IOBLOK STATUS BYTE @V200820 00509000
  519. MVI IOBSPEC,X'00' NO SPECIAL REQUESTS @V240820 00510000
  520. NI IOBFLAG,IOBCP+IOBRSTRT LEAVE ONLY THESE BITS @V200820 00511000
  521. SWITCH CONTINUE ON I/O PROCESSOR @V407508 00511100
  522. OI RDEVFLAG,RDEVWAIT DEVICE IS NOW ACTIVE @V200820 00512000
  523. CALL DMKIOSQR QUEUE REAL I/O FOR SYSTEM @V200820 00513000
  524. LR R10,R9 SET IOBLOK REG FROM GR9 @V200820 00514000
  525. BR R7 RETURN @V200820 00515000
  526. EJECT 00516000
  527. RNCHAIN EQU * CHECK FOR ACTIVE TASKS @V200820 00517000
  528. TM NICSTAT,NICERLK IS THE ERROR LOCK SET ? @V200820 00518000
  529. BZ RNICHN0 NO -- CHECK FOR ACTIVE TASKS@V200820 00519000
  530. NI NICSTAT,255-NICERLK ERROR LOCK WILL BE RESET @VA01914 00520000
  531. TM NICTYPE,NICTERM IS THIS A DEVICE RESOURCE ? @VA01914 00521000
  532. BZ RNICHN0 NO -- NO BTU IS REQUIRED @VA01914 00522000
  533. BAL R7,CTLTASK GET A CONTASK @V200820 00523000
  534. LA R0,CRESERL ...TO RESET THE ERROR LOCK @V200820 00524000
  535. STH R0,CONTCMD . . . @V200820 00525000
  536. BAL R7,TAGTASK FILL IT IN. . . @V200820 00526000
  537. B RNICHN1 CHAIN IT IN RIGHT NOW @V200820 00527000
  538. SPACE 00528000
  539. RNICHN0 EQU * @V200820 00529000
  540. TM CONSTAT,CONACTV IS THE TOP TASK ACTIVE ? @V200820 00530000
  541. BZ RNICHN1 NO -- SEND IT OVER NOW @V200820 00531000
  542. TM CONSTAT,CONOUTPT+CONCNTL INPUT TASK ACTIVE ? @V200820 00532000
  543. BNZ RNEXLST NO -- SKIP THIS LINE @V200820 00533000
  544. L R1,CONPNT CHECK THE NEXT TASK @V200820 00534000
  545. LTR R1,R1 MAKE SURE THERE IS ONE @V200820 00535000
  546. BNP RNEXLST NO -- CONTINUE @V200820 00536000
  547. TM CONPARM-CONTASK(R1),PRIORITY BREAK NEEDED ? @V200820 00537000
  548. BZ RNEXLST NO -- SKIP @V200820 00538000
  549. BAL R7,CTLTASK GET A CONTROL TASK @V200820 00539000
  550. LA R0,CRESCND RESET CONDITIONAL @V200820 00540000
  551. STH R0,CONTCMD ...TO FORCE TERMINAL BREAK @V200820 00541000
  552. BAL R7,TAGTASK ...SEND IT OVER NOW @V200820 00542000
  553. B RNICHN2 ... @V200820 00543000
  554. SPACE 00544000
  555. RNICHN1 EQU * CHAIN CONTASK'S VIA CCW STRING @V200820 00545000
  556. TM CONSTAT,CONSYNC SYNCHRONIZATION CONTASK ? @V200820 00546000
  557. BZ RNICHN2 NO -- @V200820 00547000
  558. L R1,CONPNT REMOVE IT FROM THE CHAIN @V200820 00548000
  559. ST R1,NICQPNT . . . @V200820 00549000
  560. XC CONPNT(4),CONPNT CLEAR THE FORWARD POINTER @V200820 00550000
  561. CALL DMKQCNET RETURN IT TO DMKQCN @V200820 00551000
  562. B RNICLST RETRY FROM THE TOP @V200820 00552000
  563. SPACE 00553000
  564. RNICHN2 EQU * @V200820 00554000
  565. LTR R10,R10 DO WE ALREADY HAVE AN IOBLOK ? @V200820 00555000
  566. BP RNICHN3 YES -- @V200820 00556000
  567. LA R0,IOBSIZE @V200820 00557000
  568. CALL DMKFREE GET FREE STORAGE FOR AN IOBLOK @V200820 00558000
  569. LR R10,R1 @V200820 00559000
  570. XC 0(IOBSIZE*8,R10),0(R10) CLEAR IT @V200820 00560000
  571. L R1,NWRITES NUMBER OF WRITE IOBLOK'S BUILT @V200820 00561000
  572. AL R1,F1 INCREMENT . . . @V200820 00562000
  573. ST R1,NWRITES . . . @V200820 00563000
  574. * B RNICHN3 @V200820 00564000
  575. EJECT 00565000
  576. RNICHN3 EQU * BUILD CCW STRING FOR WRITE @V200820 00566000
  577. MVI IOBMISC2,X'01' FLAG IOBLOK AS WRITE STRING @V200820 00567000
  578. MVI CONCOMND,WRITBRK USE WRITBRK FOR LAST TASK @V200820 00568000
  579. MVI CONFLAG,CC+SILI CHAIN, NO IL @V200820 00569000
  580. MVC CONCCW2(8),NOPCCW END WITH A NO-OP @V200820 00570000
  581. OI CONSTAT,CONACTV THIS TASK IS ACTIVE @V200820 00571000
  582. LA R1,CONCCW1 START OF CCW STRING @V200820 00572000
  583. L R4,IOBMISC POINTER TO LAST TASK, IF ANY @V200820 00573000
  584. LTR R4,R4 ARE THERE ANY ? @V200820 00574000
  585. BP RNICHN4 YES -- ADD TO THE STRING @V200820 00575000
  586. ST R1,IOBCAW SET THE CAW @V200820 00576000
  587. MVI IOBRCNT+1,1 ...AND THE TASK COUNT @V200820 00577000
  588. B RNICHN5 CONTINUE WITH THIS NICBLOK @V200820 00578000
  589. SPACE 2 00579000
  590. RNICHN4 EQU * ADD TO EXISTING CCW STRING @V200820 00580000
  591. MVI CONCOMND-CONTASK(R4),X'01' WRITBRK TO WRITE @V200820 00581000
  592. ST R1,CONCCW2-CONTASK(,R4) DATA ADDRESS TO NO-OP @V200820 00582000
  593. MVI CONCCW2-CONTASK(R4),X'08' MAKE IT A 'TIC' @V200820 00583000
  594. LH R1,IOBRCNT ADJUST THE TASK COUNT @V200820 00584000
  595. LA R1,1(0,R1) . . . @V200820 00585000
  596. STH R1,IOBRCNT RESET TASK COUNTER @V200820 00586000
  597. SPACE 00587000
  598. RNICHN5 EQU * CHECK FOR OTHERS ON THIS BLOCK @V200820 00588000
  599. ST R6,IOBMISC THIS IS NOW THE LAST TASK @V200820 00589000
  600. B RNEXLST . . . @VM08791 00590000
  601. EJECT 00591000
  602. *. 00592000
  603. * SUBROUTINE NAME - 00593000
  604. * 00594000
  605. * DMKRNHIN 00595000
  606. * 00596000
  607. * FUNCTION - 00597000
  608. * 00598000
  609. * DMKRNHIN IS THE SECONDARY INTERRUPT HANDLER FOR THE 00599000
  610. * 3704 AND 3705 COMMUNICATIONS CONTROLLERS, PRIMARILY 00600000
  611. * WHEN THEY ARE OPERATING IN NETWORK CONTROL PROGRAM 00601000
  612. * OR PARTITIONED EMULATION PROGRAM MODE. 00602000
  613. * 00603000
  614. * ATTRIBUTES - 00604000
  615. * 00605000
  616. * RE-ENTRANT, RESIDENT, ENTERED VIA IOBLOK UNSTACK 00606000
  617. * 00607000
  618. * ENTRY CONDITIONS - 00608000
  619. * 00609000
  620. * GR12 = ADDRESS OF DMKRNHIN 00610000
  621. * GR11 = ADDRESS OF THE SYSTEM VMBLOK 00611000
  622. * GR10 = ADDRESS OF THE UNSTACKED IOBLOK 00612000
  623. * 00613000
  624. * EXIT CONDITIONS - 00614000
  625. * 00615000
  626. * EXIT IS MADE VIA GOTO DMKDSPCH 00616000
  627. * 00617000
  628. * CALLS TO OTHER ROUTINES - 00618000
  629. * 00619000
  630. * DMKFREE - TO ALLOCATE FREE STORAGE FOR CONTASK'S 00620000
  631. * DMKFRET - TO RETURN PREVIOUSLY ALLOCATED STORAGE 00621000
  632. * DMKIOSQR - TO INITIATE I/O TO THE 370X 00622000
  633. * DMKCVTBH - TO CONVERT REAL ADDRESSES FOR MESSAGES 00623000
  634. * DMKSCNRU - TO LOCATE RCHBLOK, RCUBLOK, RDEVBLOK 00624000
  635. * DMKQCNCL - TO FLUSH CONTASK STACK IN CASE OF ERROR 00625000
  636. * DMKQCNET - TO RETURN COMPLETED CONTASK'S TO DMKQCN 00626000
  637. * DMKQCNTO - TO FORCE A DISCONNECT IN CASE OF LINE ERROR 00627000
  638. * DMKQCNWT - TO WRITE ERROR MESSAGES TO THE OPERATOR 00628000
  639. * DMKCNSED - TO PERFORM EDITING AND TRANSLATION ON INPUT 00629000
  640. * DMKERMSG - TO SEND ERROR MESSAGES TO THE OPERATOR 00630000
  641. * DMKCVTDT - TO TIME-STAMP TRACE OUTPUT 00631000
  642. * DMKVSPRT - TO SPOOL TRACE OUTPUT TO A VIRTUAL PRINTER 00632000
  643. * DMKSCNAU - TO INSURE THAT THE TRACING USER IS CORRECT 00633000
  644. * DMKCFMBK - TO PLACE A V.M. IN CONSOLE FUNCTION MODE 00634000
  645. * DMKCFMAT - TO SIMULATE A VIRTUAL CONSOLE STTENTION 00635000
  646. * DMKBLDVM - TO BUILD A VMBLOK FOR A NEW USER 00636000
  647. * DMKNLEMP - TO TAKE A STORAGE DUMP OF THE 370X 00637100
  648. * DMKNLDR - TO RE-LOAD THE 370X FOLLOWING THE DUMP 00638000
  649. * DMKIOERN - TO RECORD ERROR RECORDS FROM THE 370X NCP 00639000
  650. * DMKSTKCP - TO STACK CPEXBLOK'S FOR SERIALIZING REQUESTS 00640000
  651. * 00641000
  652. * EXTERNAL REFERENCES - 00642000
  653. * 00643000
  654. * DMKSYSVM - ADDRESS OF THE SYSTEM VMBLOK 00644000
  655. * DMKRIORN - TABLE OF 370X CONTROLLER'S 00645000
  656. * 00646000
  657. * TABLES / WORK AREAS - NONE 00647000
  658. * 00648000
  659. * NOTES - 00649000
  660. * 00650000
  661. * THIS MODULE HAS BEEN CREATED TO SUPPORT THE NETWORK 00651000
  662. * CONTROL PROGRAM FOR OS/VS, RELEASE 2.1, AS WELL AS 00652000
  663. * THE NETWORK CONTROL PROGRAM INTERFACE OF THE PARTITIONED 00653000
  664. * EMULATION PROGRAM OF THE SAME LEVEL. ANY OTHER LEVEL 00654000
  665. * OF THE 370X CONTROL PROGRAM WILL NOT OPERATE CORRECTLY. 00655000
  666. * 00656000
  667. * REGISTER USAGE - 00657000
  668. * 00658000
  669. * GR14,15 LINKAGE REGISTERS 00659000
  670. * GR12,13 MODULE BASE REGISTERS 00660000
  671. * GR11 = ADDRESS OF THE SYSTEM VMBLOK (DMKSYSVM) 00661000
  672. * GR10 = ADDRESS OF THE ACTIVE IOBLOK 00662000
  673. * GR 9 = ADDRESS OF THE AFFECTED NICBLOK (IF ANY) 00663000
  674. * GR 8 = RDEVBLOK ADDRESSABILITY 00664000
  675. * GR 7 = INTERNAL LINKAGE REGISTER 00665000
  676. * GR 6 = CONTASK ADDRESSABILITY 00666000
  677. * GR0-5= WORK REGISTERS 00667000
  678. * 00668000
  679. * OPERATION - 00669000
  680. * 00670000
  681. * 1. IF THE INTERRUPTING DEVICE IS NOT A 370X, EXIT. 00671000
  682. * 00672000
  683. * 2. IF ANY CHANNEL-LEVEL ERRORS WERE INCLUDED IN THE 00673000
  684. * STATUS, DO THE FOLLOWING: 00674000
  685. * PCI, IL, PRGC, PRTC, CHC -> RNH001 ABEND 00675000
  686. * CDC - READ - RETRY SIXTEEN TIMES, THEN: 00676000
  687. * ALL OTHERS - ATTEMPT TO DUMP AND RE-LOAD THE 370X 00677000
  688. * 00678000
  689. * 3. IF A UNIT CHECK WAS PRESENTED, AND IPLREQ OR INTREQ 00679000
  690. * WAS INCLUDED IN THE STATUS, ATTEMPT TO DUMP AND/OR 00680000
  691. * RE-LOAD THE 370X CONTROL PROGRAM. 00681000
  692. * 00682000
  693. * 4. IF THE 370X WAS NOT LOADED BY VM/370 (I.E. IF 00683000
  694. * 'RDEVRSVD' IS NOT SET), IGNORE THE INTERRUPT AND EXIT. 00684000
  695. * 00685000
  696. * 5. IF ATTENTION WAS INCLUDED IN THE STATUS, SCHEDULE 00686000
  697. * AND START A READ CHANNEL PROGRAM. 00687000
  698. * 00688000
  699. * 6. WRITE ENDING - IF UNIT EXCEPTION, RE-QUEUE REJECTED 00689000
  700. * CONTASK'S FOR LATER RE-SEND, SET RDEVSLOW (BUFFER 00690000
  701. * SLOWDOWN MODE), AND RETURN AND FINISHED TASKS TO 00691000
  702. * DMKQCNET, AS BELOW. 00692000
  703. * 00693000
  704. * IF WRITE COMPLETED O.K., RETURN TO DMKQCNET ALL 00694000
  705. * CONTASK'S WHICH DO NOT HAVE LOGDROP, LOGHOLD, 00695000
  706. * CONSPLT, OR CONRESP SET. RETAIN OTHERS ON THE NICBLOK. 00696000
  707. * 00697000
  708. EJECT 00698000
  709. * 7. READ ENDING - IF NO BTU RESPONSES WERE RECEIVED, 00699000
  710. * RELEASE THE BUFFERS AND EXIT. 00700000
  711. * 00701000
  712. * FOR EACH RESPONSE BTU, DECODE ACCORDING TO THE 00702000
  713. * COMMAND VALUE, AS FOLLOWS: 00703000
  714. * 00704000
  715. * READ - X'01' - FINAL RESPONSE, MOVE DATA FROM THE INPUT 00705000
  716. * BUFFERS TO CALLER'S BUFFER (SPECIFIED IN SAVER0, 00706000
  717. * SAVER1 OF THE RESPONSE SAVEAREA). IF ATTENTION HIT 00707000
  718. * DURING READ, PERFORM ATTENTION HANDLING BEFORE 00708000
  719. * RETURNING THE TASK TO DMKQCNET. CALL DMKCNSED TO 00709000
  720. * PERFORM ANY EDITING OR TRANSLATION ON THE INPUT DATA. 00710000
  721. * IF EDITING REDUCES THE INPUT COUNT TO ZERO, RETRY 00711000
  722. * THE READ OPERATION. IF A NULL LINE IS ENTERED IN 00712000
  723. * RESPONSE TO AN INHIBIT READ, TURN OFF NICPSUP, TYPE 00713000
  724. * A MASKING STRING, AND RE-ISSUE THE READ TASK. 00714000
  725. * 00715000
  726. * WRITE - X'02' - FINAL RESPONSE, RETURN THE TASK TO 00716000
  727. * DMKQCNET. IF ATTENTION WAS HIT DURING THE WRITE, 00717000
  728. * PERFORM ATTENTION HANDLING FIRST, SETTING THE 00718000
  729. * APPROPRIATE RETURN CODE IN THE SAVEAREA (IN ANY). 00719000
  730. * IF THE COMMAND MODIFIER WAS WRITEOT, BUILD A CONTROL 00720000
  731. * CONTASK TO ISSUE DISCEOC COMMAND. IF THE MODIFIER 00721000
  732. * WAS WRITDSC, BUILD A CONTROL TASK TO RE-ENABLE THE 00722000
  733. * TERMINAL. 00723000
  734. * 00724000
  735. * TEST, RESTART, INVITE - NOT USED -> RNH002 ABEND 00725000
  736. * 00726000
  737. * CONTACT - X'06' - INITIAL RESPONSE (MTA DEVICE IDEN- 00727000
  738. * TIFIED), SET NICTYPE ACCORDING TO FLAG RETURNED, 00728000
  739. * WAIT FOR FINAL RESPONSE. FINAL RESPONSE, BUILD A 00729000
  740. * CONTROL CONTASK TO WRITE 'VM/370 ONLINE' MESSAGE. 00730000
  741. * BUILD ANOTHER CONTROL TASK AHEAD OF THE WRITE TO 00731000
  742. * ISSUE CCDESMD COMMAND. 00732000
  743. * 00733000
  744. * DISCONNECT - X'07' - FINAL RESPONSE, RE-ENABLE THE 00734000
  745. * DEVICE UNLESS NICDISB IS SET. 00735000
  746. * 00736000
  747. * CONTROL - X'08' - DECODE ACCORDING TO MODIFIER: 00737000
  748. * CRESERL - TURN OFF NICERLK, CONTINUE. 00738000
  749. * CCDESMD - BUILD CONTASK TO ISSUE CSETDSM TO ENABLE 00739000
  750. * MONITOR MODE HANDLING (ATTENTIONS). 00740000
  751. * CACTDEV - IF NICENAB IS SET, ISSUE RE-ENABLE. 00741000
  752. * ALL OTHERS - ASSUME COMMAND IS COMPLETE. 00742000
  753. * 00743000
  754. EJECT 00744000
  755. * UNSOLICITED RESPONSES - COMMAND = X'77': 00745000
  756. * 00746000
  757. * ENTER SLOWDOWN MODE - TURN ON RDEVSLOW. 00747000
  758. * EXIT SLOWDOWN MODE - TURN OFF RDEVSLOW. 00748000
  759. * DEVICE ASSOCIATION - IGNORE 00749000
  760. * HOST LOGGING - IGNORE 00750000
  761. * MISC. DATA RECORD - STACK CPEXBLOK TO CALL DMKIOERN. 00751000
  762. * IPL COMPLETE - TURN OFF RDEVRSVD, RDEVNRDY, RDEVRCVY, 00752000
  763. * RDEVSLOW, RDEVWAIT. IF A CKPBLOK EXISTS, RE-ENABLE 00753000
  764. * ALL DEVICES WHICH WERE PREVIOUSLY ENABLED. 00754000
  765. * ATTENTION - EITHER CALL DMKCFMBK, DMKCFMAT, OR DMKBLDVM 00755000
  766. * ACCORDING TO SETTINGS IN VMMLEVEL OR NICUSER. 00756000
  767. * TERMINAL POWER-OFF - CLEAN UP CONTASK CHAIN, CALL 00757000
  768. * DMKQCNTO TO DISCONNECT ANY ACTIVE USER, RE-ENABLE. 00758000
  769. * ALL OTHERS - CONSIDERED FATAL - DUMP AND RE-LOAD 370X. 00759000
  770. * 00760000
  771. * ERROR MESSAGES - 00761000
  772. * 00762000
  773. * DMKRNH454I DEV XXXX DISABLED 00763000
  774. * DMKRNH462I CTLR XXX UNIT CHECK; IPL REQUIRED 00764000
  775. * DMKRNH463I CTLR XXX UNIT CHECK; RESTART IN PROGRESS 00765000
  776. * DMKRNH464I CTLR XXX CC = 3; DEPRESS 370X "LOAD" BUTTON 00766000
  777. * DMKRNH465I LINE TRACE TERMINATED DUE TO ERROR 00767000
  778. * DMKRNH468I CTLR XXX COMMUNICATIONS SCANNER FAILURE 00768000
  779. *. 00769000
  780. EJECT 00770000
  781. DROP R13 @V200820 00771000
  782. USING DMKRNHIN,R12 @V200820 00772000
  783. DMKRNHIN DS 0D INTERRUPT ENTRY FOR 3704/3705 I/O@V200820 00773000
  784. LM R12,R13,RNHBASE SETUP MODULE ADDRESSABILITY @V200820 00774000
  785. USING DMKRNH,R12,R13 @V200820 00775000
  786. SPACE 00776000
  787. LH R1,IOBRADD REAL DEVICE ADDRESS OF 3705 @V200820 00777000
  788. CALL DMKSCNRU GET THE RDEVBLOK ADDRESS @V200820 00778000
  789. LA R1,CLASSPEC*256+TYP3705 DEVICE CLASS, TYPE @V200820 00779000
  790. CH R1,RDEVTYPC IS THIS A 3705 ? @V200820 00780000
  791. BNE RNIGNOR NO -- THROW AWAY INTERRUPT @V200820 00781000
  792. SPACE 00782000
  793. SWITCH CONTINUE ON I/O PROCESSOR @V407508 00782100
  794. CLI IOBCSW+5,X'00' ANY CHANNEL STATUS PRESENT ?@V200820 00783000
  795. BNE RNIOERR YES - THAT IS UNUSUAL @V200820 00784000
  796. TM IOBCSW+4,UC WAS THERE A UNIT CHECK ? @V200820 00785000
  797. BZ RNOUNIT NO -- THAT'S JUST AS WELL @V200820 00786000
  798. L R1,IOBIOER PICK UP THE IOERBLOK ADDRESS @V200820 00787000
  799. USING IOERBLOK,R1 @V200820 00788000
  800. TM IOERDATA,INTREQ+IPLREQ IS NCP STILL ALIVE ? @V200820 00789000
  801. BNZ RNFATAL NO -- CONVULSE A BIT @V200820 00790000
  802. TM IOERDATA,ABORT THIS SHOULD BE IT @V200820 00791000
  803. BZ RNIOEUC OOPS -- GO TAKE ANOTHER LOOK@V200820 00792000
  804. CLI IOBMISC2,X'01' WAS THIS A WRITE STRING ? @V200820 00793000
  805. BNE RNFATAL NO -- FATAL FOR A READ @V200820 00794000
  806. TM IOBCSW+4,ATTN ATTENTION INCLUDED WITH WRITE ? @V200820 00795000
  807. BZ RNSLOWDN NO -- JUST ENTER SLOWDOWN MODE @VM01040 00796000
  808. BAL R7,SCHREAD SCHEDULE A READ SEQUENCE FIRST @V200820 00797000
  809. B RNSLOWDN THEN ENTER BUFFER SLOWDOWN MODE @V200820 00798000
  810. DROP R1 @V200820 00799000
  811. EJECT 00800000
  812. RNOUNIT EQU * NO UNIT CHECK PRESENT @V200820 00801000
  813. TM RDEVSTAT,RDEVRSVD 370X IN USE BY VM/370 ? @VM08593 00802000
  814. BZ RNCLEAN NO -- CLEAN UP AND EXIT @VM08593 00803000
  815. TM IOBCSW+4,ATTN READ REQUESTED BY THE NCP ? @V200820 00804000
  816. BZ RNOREAD NO -- JUST CONTINUE @V200820 00805000
  817. LA R7,GODSPCH RETURN FROM READ IF UNSOLICITED @V200820 00806000
  818. TM IOBSPEC,IOBUNSL UNSOLICITED ATTENTION ? @V200820 00807000
  819. BO SCHRCCW YES - RE-USE THIS IOBLOK @V200820 00808000
  820. BAL R7,SCHREAD BUILD SEPARATE IOBLOK FOR READ @V200820 00809000
  821. SPACE 2 00810000
  822. RNOREAD EQU * INTERPRET INTERRUPT STATUS @V200820 00811000
  823. CL R10,IOBLINK IS THIS A COPIED IOBLOK ? @VM08788 00812000
  824. BNE RNIGNOR YES - WAIT FOR FINAL INTERRUPT @VM08788 00813000
  825. TM IOBSPEC,IOBUNSL UNSOLICITED INTERRUPT ? @V240820 00814000
  826. BO RNIGNOR YES - FORGET IT @V240820 00815000
  827. CLI IOBMISC2,X'02' IS THIS A READ CCW STRING ? @V200820 00816000
  828. BE PROCREAD YES - PROCESS FINAL STATUS @V200820 00817000
  829. TM IOBCSW+4,UE HAS 3705 ENTERED SLOWDOWN MODE ? @V200820 00818000
  830. BO RNSLOWDN YES - REQUEUE CONTASK'S FOR LATER@V200820 00819000
  831. TM IOBSTAT,IOBCC1 CC = 1 ON THE START I/O ? @V200820 00820000
  832. BZ RNWRTOK NO -- SHOULD BE NORMAL END @V200820 00821000
  833. CLI IOBCSW+4,ATTN+BUSY ATTN CLEARED BY START I/O ? @V200820 00822000
  834. BNE RNIOERR NO -- I DON'T UNDERSTAND @V200820 00823000
  835. B RNABORT RE-QUEUE CONTASKS FOR LATER @VM08809 00824000
  836. EJECT 00825000
  837. RNSLOWDN EQU * RE-QUEUE CONTASK'S FOR RETRY @V200820 00826000
  838. OI RDEVFLAG,RDEVSLOW NOW IN SLOWDOWN MODE @V200820 00827000
  839. RNABORT EQU * @VM08809 00828000
  840. L R2,IOBCAW INITIALIZE JUST IN CASE @V200820 00829000
  841. SLR R6,R6 . . . @V200820 00830000
  842. TM IOBSTAT,IOBCC1 STATUS ON THE START I/O ? @V200820 00831000
  843. BO RNRETRY YES - REQUEUE ALL OF THEM @V200820 00832000
  844. L R1,IOBCSW CCW ADDRESS FROM CSW @V200820 00833000
  845. SL R1,F8 BACK UP ONE CCW (KEY IS ZERO) @V200820 00834000
  846. CL R1,IOBCAW STOP ON THE FIRST TASK ? @V200820 00835000
  847. BE RNRETRY YES - RESET ALL OF THE TASKS @V200820 00836000
  848. * NOTE: CSW WILL ALWAYS POINT TO EITHER 'TIC' OR 'NO-OP' CCW 00837000
  849. LA R6,IOBCAW-(CONCCW2-CONCCW1) SEARCH START @V200820 00838000
  850. RNPARTL EQU * CHECK FOR SOME ACCEPTED, SOME NOT@V200820 00839000
  851. CLM R1,B'0111',CONCCW2+1-CONCCW1(R6) NEXT REJECTED ?@V200820 00840000
  852. BE RNPARTS YES --- @V200820 00841000
  853. ICM R6,B'0111',CONCCW2+1-CONCCW1(R6) NEXT TASK @V200820 00842000
  854. B RNPARTL CHAIN VIA THE TIC CCW'S @VM08809 00843000
  855. RNPARTS EQU * FOUND THE END OF ACCEPTED TASKS @V200820 00844000
  856. SH R6,=AL2(CONCCW1-CONTASK) BACK UP TO TASK START @V200820 00845000
  857. L R2,CONCCW2 POINTER TO NEXT CONTASK CCW @V200820 00846000
  858. MVC CONCCW2(8),NOPCCW MAKE THIS THE END @V200820 00847000
  859. LA R2,0(0,R2) STRIP OFF THE OP-CODE @V200820 00848000
  860. RNRETRY EQU * ALLOW RE-SCHEDULE FOR REJECTED TASKS @V200820 00849000
  861. L R0,NTSKREJ NUMBER OF TASKS REJECTED @V200820 00850000
  862. AL R0,F1 INCREMENT . . . @V200820 00851000
  863. ST R0,NTSKREJ . . . @V200820 00852000
  864. SH R2,=AL2(CONCCW1-CONTASK) BACK UP TO START @V200820 00853000
  865. NI CONSTAT-CONTASK(R2),255-CONACTV NOT ACTIVE @V200820 00854000
  866. ICM R2,B'0111',CONCCW2+1-CONTASK(R2) NEXT TASK @V200820 00855000
  867. BNZ RNRETRY CONTINUE UNTIL WE HIT 'NO-OP' CCW@V200820 00856000
  868. LTR R6,R6 WERE ANY ACCEPTED ? @V200820 00857000
  869. BP RNWRTOK YES - PROCESS FINISHED WRITE @VM08788 00858000
  870. SPACE 2 00859000
  871. RNIGNOR EQU * HERE TO IGNORE AN INTERRUPT @V200820 00860000
  872. BAL R7,FRETIOB RELEASE IOBLOK, IOERBLOK @V200820 00861000
  873. SPACE 00862000
  874. GODSPCH EQU * EXIT TO THE VM/370 DISPATCHER @V200820 00863000
  875. GOTO DMKDSPCH GO AWAY @V200820 00864000
  876. SPACE 2 00865000
  877. RNHBASE DS 0F MODULE BASE REGISTER VALUES @V200820 00866000
  878. DC A(DMKRNH,DMKRNH+4096) @V200820 00867000
  879. EJECT 00868000
  880. RNWRTOK EQU * WRITE HAS BEEN ACCEPTED BY 3705 @V200820 00869000
  881. NI RDEVFLAG,255-RDEVWAIT LET 370X START UP AGAIN@V200820 00870000
  882. SLR R0,R0 @V200820 00871000
  883. ST R0,IOBMISC USE IOBMISC FOR CHAIN ANCHOR @VM08809 00872000
  884. LA R7,IOBMISC-(CONPNT-CONTASK) . . . @VM08809 00873000
  885. L R6,IOBCAW START FOR CONTASK CHAIN SEARCH @V200820 00874000
  886. RNOUTPT EQU * PROCESS HALF-DONE CONTASK'S @V200820 00875000
  887. SH R6,=AL2(CONCCW1-CONTASK) BACK UP TO TASK START @V200820 00876000
  888. LH R9,CONDEST RESOURCE I.D. FOR THIS TASK @V200820 00877000
  889. MH R9,=AL2(NICSIZE*8) NICLIST INDEX @V200820 00878000
  890. AL R9,RDEVNICL GR9 = NICBLOK ADDRESS @V200820 00879000
  891. BAL R14,RNTRACE CHECK TRACING STATUS FOR THE BTU @VM01040 00880000
  892. TM CONSTAT,CONCNTL CONTROL CONTASK ? @VM08791 00881000
  893. BZ RNREQUE NO -- HANG ONTO ORIGINAL @VM08791 00882000
  894. OI NICSTAT,NICNTRL CONTROL TASK IS ACTIVE @VM01000 00883000
  895. TM CONSTAT,CONRESP+CONSPLT LEAVE IT ON NICBLOK ? @V200820 00884000
  896. BNZ RNREQUE YES --- @V200820 00885000
  897. L R1,CONPNT NEXT CONTASK FOR THIS INTERFACE @V200820 00886000
  898. ST R1,NICQPNT TAKE FIRST ONE OFF CHAIN @V200820 00887000
  899. ST R0,CONPNT CLEAR THE FORWARD TASK POINTER @V200820 00888000
  900. ST R6,CONPNT-CONTASK(,R7) CHAIN FOR RETURN @V200820 00889000
  901. LR R7,R6 . . . @V200820 00890000
  902. RNREQUE EQU * FOLLOW 'TIC' CHAIN FROM IOBCAW @V200820 00891000
  903. ICM R6,B'0111',CONCCW2+1 ADDRESS OF NEXT TASK @V200820 00892000
  904. BNZ RNOUTPT CONTINUE UNTIL WE HIT 'NO-OP' @V200820 00893000
  905. L R6,IOBMISC START OF RETURN CHAIN @VM08809 00894000
  906. RNRETRN EQU * RETURN FINISHED TASKS TO DMKQCN @V200820 00895000
  907. LTR R6,R6 WERE THERE ANY AT ALL ? @V200820 00896000
  908. BZ RNRESTR NO -- JUST TRY RESTART @V200820 00897000
  909. CALL DMKQCNET PROCESS FINISHED CONTASK'S @V200820 00898000
  910. RNRESTR EQU * RESTART WITH NEXT BATCH @V200820 00899000
  911. BAL R7,FRETIOB RELEASE THE CURRENT IOBLOK @VM01020 00900000
  912. B RNSTART START UP THE NCP AND EXIT @VM01034 00901000
  913. EJECT 00902000
  914. SCHREAD EQU * BUILD A READ PROGRAM AND START IT UP @V200820 00903000
  915. LR R9,R10 SAVE CURRENT GR10 VALUE @V200820 00904000
  916. LA R0,IOBSIZE @V200820 00905000
  917. CALL DMKFREE GET FREE STORAGE FOR AN IOBLOK @V200820 00906000
  918. LR R10,R1 @V200820 00907000
  919. SCHRCCW EQU * BUILD CCW BUFFER AND STRING @V200820 00908000
  920. XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR IT @V200820 00909000
  921. LA R0,RDBUFNO+1 GET SPACE FOR READS + NO-OP @V200820 00910000
  922. CALL DMKFREE ... @V200820 00911000
  923. ST R1,IOBCAW SET CCW STRING START IN IOBLOK @V200820 00912000
  924. LA R0,(RDBUFLN/8)*RDBUFNO SIZE OF BUFFER BLOCK @VM08790 00913000
  925. CALL DMKFREE GET CONTIGUOUS BUFFER SPACE @VM08790 00914000
  926. L R2,IOBCAW START OF CCW BUFFER TO GR2 @VM08790 00915000
  927. L R3,=AL1(SILI+CC,0,0,RDBUFLN) SECOND CCW WORD @V200820 00916000
  928. LA R4,RDBUFNO GET THE RIGHT NO. OF BUFFERS @V200820 00917000
  929. SCHRBUF EQU * GET BUFFERS AND CONNECT TO CCW'S @V200820 00918000
  930. ST R1,0(0,R2) SET FIRST CCW DATA ADDRESS @V200820 00919000
  931. ST R3,4(0,R2) SET FLAGS, COUNT @V200820 00920000
  932. MVI 0(R2),X'02' SET OP-CODE @V200820 00921000
  933. LA R2,8(0,R2) NEXT CCW POSITION @V200820 00922000
  934. LA R1,RDBUFLN(0,R1) POINT TO NEXT BUFFER SLOT @VM08790 00923000
  935. BCT R4,SCHRBUF DO IT FOR SIX BUFFERS TOTAL @V200820 00924000
  936. MVC 0(8,R2),NOPCCW MOVE IN THE NO-OP CCW @V200820 00925000
  937. MVI IOBMISC2,X'02' FLAG THIS AS A READ IOBLOK @V200820 00926000
  938. L R1,NMREADS NUMBER OF READ IOBLOK'S BUILT @V200820 00927000
  939. AL R1,F1 INCREMENT . . . @V200820 00928000
  940. ST R1,NMREADS . . . @V200820 00929000
  941. B RNGORED SET IOBIRA, IOBUSER, START I/O @V200820 00930000
  942. EJECT 00931000
  943. PROCREAD EQU * PROCESS INCOMING BTU'S @V200820 00932000
  944. L R7,IOBCAW PICK UP POINTER TO CCW PACKAGE @V200820 00933000
  945. ST R7,IOBRCAW ...SET FOR LOOP PROCESSING @V200820 00934000
  946. LA R9,RNFATAL VECTOR IN CASE OF ERROR @V200820 00935000
  947. TM IOBSTAT,IOBCC3 IF THIS IS INITIAL STATUS...@V200820 00936000
  948. BNZ READFRT ...WE DID SOMETHING WRONG @V200820 00937000
  949. TM IOBCSW+4,UE+DE END OF READ SEQUENCE ? @V200820 00938000
  950. BO PROCRFIN YES - PROCESS INCOMING BTU'S@V200820 00939000
  951. TM IOBCSW+4,ATTN IF NOT THOSE, MUST BE AN ATTN @V200820 00940000
  952. BZ RNIOERR NO -- I DON'T UNDERSTAND @V200820 00941000
  953. PROCRFIN EQU * @V200820 00942000
  954. ICM R2,15,IOBCSW LOAD AND TEST FOR CCW ADDRESS @VM01034 00943000
  955. BZ RNIGNOR NO -- IGNORE THIS INTERRUPT @V200820 00944000
  956. SLR R2,R2 CLEAR COMPLETED TASK POINTER @V200820 00945000
  957. ST R2,IOBMISC ... @V200820 00946000
  958. LA R1,IOBMISC-(CONPNT-CONTASK) MAKE CHAINING EASY@V200820 00947000
  959. ST R1,IOBMISC2 ... @V200820 00948000
  960. SPACE 00949000
  961. READBUF EQU * HANDLE BTU'S INDIVIDUALLY @V200820 00950000
  962. LA R9,RNRETRN RETURN FROM 'READFRT' @V200820 00951000
  963. L R7,IOBRCAW PTR TO NEXT CCW FOR PROCESSING @V200820 00952000
  964. CLM R7,B'0111',IOBCSW+1 REACHED END OF CHAIN ? @V200820 00953000
  965. BNL READFRT YES - RELEASE BUFFERS @V200820 00954000
  966. L R1,NTASKRD NUMBER OF RESPONSES RECEIVED @V200820 00955000
  967. AL R1,F1 INCREMENT . . . @V200820 00956000
  968. ST R1,NTASKRD . . . @V200820 00957000
  969. L R6,0(0,R7) LOAD POINTER TO DUMMY CONTASK @V200820 00958000
  970. LA R6,0(0,R6) STRIP OFF THE CCW OP-CODE @VM01034 00959000
  971. LH R9,CONDEST RESOURCE ID FROM RETURNED BTU @V200820 00960000
  972. MH R9,=AL2(NICSIZE*8) COMPUTE NICLIST INDEX @V200820 00961000
  973. AL R9,RDEVNICL INDEX TO THE NICBLOK ITSELF @V200820 00962000
  974. TM CONSYSR,ERROR IS THIS AN ERROR RESPONSE ? @VM01040 00963000
  975. BZ *+8 NO -- CONTINUE @VM01040 00964000
  976. OI NICSTAT,NICERLK ERROR LOCK IS NOW SET @VM01040 00965000
  977. TM CONSRID,CONCNTL CONTROL TASK RESPONSE ? @VM01040 00966000
  978. BZ *+8 NO -- CONTINUE @VM01040 00967000
  979. NI NICSTAT,255-NICNTRL ASSUME TASK IS COMPLETE@VM01040 00968000
  980. BAL R14,RNTRACE CHECK TRACING STATUS FOR THE BTU @VM01040 00969000
  981. SPACE 00970000
  982. SLR R5,R5 CLEAR ORIGINAL CONTASK POINTER @VM01040 00971000
  983. CLI CONTCMD,X'77' UNSOLICITED RESPONSE FROM NCP ? @V200820 00972000
  984. BE UNSOLIT YES - PROCESS IT DIRECTLY @V200820 00973000
  985. LH R0,CONRTAG GET REQUEST TAG OF RETURNED TASK @V200820 00974000
  986. LA R2,NICQPNT-(CONPNT-CONTASK) SETUP FOR SEARCH @V200820 00975000
  987. L R5,NICQPNT FOR ORIGINAL TASK @V200820 00976000
  988. SPACE 00977000
  989. READRCV EQU * SEARCH NICBLOK LIST FOR MATCHING TASK @V200820 00978000
  990. LTR R5,R5 HAVE WE REACHED THE END ? @V200820 00979000
  991. BZ READNOM YES - THERE IS NO MATCH @V200820 00980000
  992. CH R0,CONRTAG-CONTASK(,R5) IS THIS THE ONE ? @V200820 00981000
  993. BE READCHN YES - PROCESS @V200820 00982000
  994. LR R2,R5 SAVE A BACK POINTER @V200820 00983000
  995. L R5,CONPNT-CONTASK(,R2) PICK UP NEXT TASK @V200820 00984000
  996. B READRCV @V200820 00985000
  997. EJECT 00986000
  998. READCHN EQU * @V200820 00987000
  999. L R1,CONPNT-CONTASK(,R5) REMOVE IT FROM CHAIN @V200820 00988000
  1000. ST R1,CONPNT-CONTASK(,R2) ... @V200820 00989000
  1001. NI CONSTAT-CONTASK(R5),255-(CONACTV+CONRTRY) @V200820 00990000
  1002. SPACE 00991000
  1003. *---------------------------------------------------------------------* 00992000
  1004. * AT THIS POINT IN TIME: * 00993000
  1005. * GR5 = ORIGINAL CONTASK BLOCK (IF AVAILABLE) * 00994000
  1006. * GR6 = DUMMY CONTASK CONTAINING RESPONSE BTU * 00995000
  1007. * GR7 = READ CCW FOR THIS BUFFER * 00996000
  1008. * GR8 = RDEVBLOK ADDRESS * 00997000
  1009. * GR9 = NICBLOK ADDRESS * 00998000
  1010. *---------------------------------------------------------------------* 00999000
  1011. SPACE 01000000
  1012. READNOM EQU * PROCESS BTU ACCORDING TO COMMAND @V200820 01001000
  1013. SLR R1,R1 @V200820 01002000
  1014. IC R1,CONTCMD PICK UP BTU COMMAND FIELD @V200820 01003000
  1015. SLL R1,2(0) CONVERT TO FULL-WORD INDEX @V200820 01004000
  1016. ACTIONS B ACTIONS(R1) PROCESS ACCORDING TO COMMAND TYPE@V200820 01005000
  1017. B CMPREAD '01' -- READ @V200820 01006000
  1018. B CMPWRIT '02' -- WRITE @V200820 01007000
  1019. B RNH2 '03' -- TEST - NOT USED @V200820 01008000
  1020. B RNH2 '04' -- RESTART - NOT USED @V200820 01009000
  1021. B RNH2 '05' -- INVITE - NOT USED @V200820 01010000
  1022. B CMPCONT '06' -- CONTACT @V200820 01011000
  1023. B DVCENAB '07' -- DISCONNECT @VM01040 01012000
  1024. B CMPCNTL '08' -- CONTROL @V200820 01013000
  1025. SPACE 3 01014000
  1026. DMKRNHCT DS 0D STATISTICAL COUNTER BLOCK @V200820 01015000
  1027. NWRITES DC F'0' NUMBER OF WRITE IOBLOK'S BUILT @V200820 01016000
  1028. NTSKOUT DC F'0' NUMBER OF CONTASKS SENT TO 370X @V200820 01017000
  1029. NTSKREJ DC F'0' NUMBER OF CONTASKS REJECTED @V200820 01018000
  1030. NCONTSK DC F'0' NUMBER OF CONTASKS FROM DMKQCN @V200820 01019000
  1031. NMREADS DC F'0' NUMBER OF READ IOBLOK'S BUILT @V200820 01020000
  1032. NTASKRD DC F'0' NUMBER OF BTU RESPONSES READ @V200820 01021000
  1033. NTSKCTL DC F'0' NUMBER OF CALLS TO DMKRNHND @V200820 01022000
  1034. NMDRCRD DC F'0' NUMBER OF MDR RECORDS RECEIVED @V200820 01023000
  1035. EJECT 01024000
  1036. READFRT EQU * RELEASE READ BUFFERS, CCW'S @V200820 01025000
  1037. L R7,IOBCAW FIRST CCW IN STRING @V200820 01026000
  1038. L R1,0(0,R7) ADDRESS OF BUFFER BLOCK @VM08790 01027000
  1039. LA R1,0(0,R1) ...MINUS THE OP-CODE @VM08790 01028000
  1040. LA R0,(RDBUFLN/8)*RDBUFNO SIZE OF THE BLOCK @VM08790 01029000
  1041. CALL DMKFRET RELEASE THE BUFFERS @VM08790 01030000
  1042. LA R0,RDBUFNO+1 SIZE OF CCW PACKAGE @V200820 01031000
  1043. LR R1,R7 START OF CCW PACKAGE FOR FRET @VM08790 01032000
  1044. CALL DMKFRET @V200820 01033000
  1045. L R6,IOBMISC PICK UP COMPLETED TASK POINTER @V200820 01034000
  1046. NI RDEVFLAG,255-RDEVWAIT LET THE 3705 START NOW @V200820 01035000
  1047. BR R9 GO WHERE INDICATED @V200820 01036000
  1048. SPACE 2 01037000
  1049. *>>>>>>>> INVALID I/O STATUS RECEIVED FROM THE 3705 01038000
  1050. ABEND 1 DIVE ! DIVE ! DIVE ! @V200820 01039000
  1051. *>>>>>>>> 01040000
  1052. SPACE 2 01041000
  1053. *>>>>>>>> INVALID OR IMPOSSIBLE BTU RESPONSE 01042000
  1054. ABEND 2 YOU HAVE BEEN ASSESSED FOR STREET REPAIRS @V200820 01043000
  1055. *>>>>>>>> 01044000
  1056. SPACE 2 01045000
  1057. BTUFRET EQU * IGNORE THIS BTU ENTIRELY @V200820 01046000
  1058. L R7,IOBRCAW POINTER TO CURRENT CCW @V200820 01047000
  1059. L R6,0(0,R7) ADDRESS OF FIRST BUFFER @V200820 01048000
  1060. LA R7,8(0,R7) SKIP AT LEAST ONE CCW @V200820 01049000
  1061. ST R7,IOBRCAW . . . @V200820 01050000
  1062. LA R3,RDBUFLN-(CONDATA-CONTASK) FIRST DATA LENGTH @V200820 01051000
  1063. BTUFREE EQU * @V200820 01052000
  1064. CH R3,CONDCNT WAS MORE THAN ONE BUFFER USED ? @V200820 01053000
  1065. BNL READBUF NO -- THIS ONE WILL BE FRET'ED LATER@V200820 01054000
  1066. LA R3,RDBUFLN(0,R3) KEEP ADDING UNTIL WE HIT IT @V200820 01055000
  1067. LA R7,8(0,R7) KEEP SKIPPING, ALSO @V200820 01056000
  1068. ST R7,IOBRCAW . . . @V200820 01057000
  1069. B BTUFREE @V200820 01058000
  1070. EJECT 01059000
  1071. CMPREAD EQU * PROCESS READ RESPONSES @V200820 01060000
  1072. TM CONSRID,CONCNTL CONTROL READ (2741 BYPASS) ?@VM01034 01061000
  1073. BO CTLREAD YES - SPECIAL HANDLING @VM01034 01062000
  1074. LTR R5,R5 IS THERE AN ORIGINAL CONTASK ? @VA01977 01063000
  1075. BNP BTUFRET NO -- IGNORE INVALID RESPONSE @VA01977 01064000
  1076. TM CONSYSR,ERROR ERROR RESPONSE INDICATED ? @V200820 01065000
  1077. BO READERR YES - CHECK IT OUT @V200820 01066000
  1078. SLR R4,R4 SET ATTENTION COUNT TO ZERO @V200820 01067000
  1079. BAL R14,CMPMOVE MOVE DATA, SET RETURN CODE @V200820 01068000
  1080. OI CONSTAT,CONACTV+CONESCP SET FLAGS FOR CR,LF @VM08772 01069000
  1081. LTR R0,R0 WERE ANY CHARACTERS RECEIVED ? @VM08772 01070000
  1082. BNP CMPRD06A NO -- SEND NEW-LINE SEQUENCE @VM08809 01071000
  1083. CLI 0(R1),X'15' LAST CHARACTER = NEW-LINE ? @VM08772 01072000
  1084. BNE CMPRD04 NO -- CHECK FOR TWX ENDING CHARS @VM08772 01073000
  1085. MVI 0(R1),X'00' CLEAR OUT THE NEW-LINE CHAR @VM08772 01074000
  1086. BCTR R0,0 DECREMENT THE COUNT @VM08772 01075000
  1087. NI CONSTAT,255-(CONACTV+CONESCP) CR,LF BOTH SEEN @VM08772 01076000
  1088. B CMPRD06A GO SETUP FOR EDITING, ETC. @VM08772 01077000
  1089. SPACE 01078000
  1090. CMPRD04 EQU * CHECK FOR CR OR LF (CPT-TWX) @VM08772 01079000
  1091. CLI 0(R1),X'25' LAST CHARACTER = LINE FEED ? @VM08772 01080000
  1092. BNE CMPRD05 NO -- CHECK FOR 'CR' @VM08772 01081000
  1093. NI CONSTAT,255-CONESCP LINE FEED PRESENT @VM08772 01082000
  1094. MVI 0(R1),X'00' CLEAR IT FROM THE BUFFER @VM08772 01083000
  1095. BCTR R1,0 BACK UP IN THE BUFFER @VM08772 01084000
  1096. BCT R0,CMPRD05 DECREMENT AND TEST COUNT @VM08772 01085000
  1097. B CMPRD06A ALL DONE IF COUNT = ZERO @VM08772 01086000
  1098. SPACE 01087000
  1099. CMPRD05 EQU * CHECK FOR STAND-ALONE 'CR' @VM08772 01088000
  1100. CLI 0(R1),X'0D' LAST CHARACTER = CARRIER RETURN @VM08772 01089000
  1101. BNE CMPRD06 NO -- GO SEE WHERE WE STAND @VM08772 01090000
  1102. NI CONSTAT,255-CONACTV CARRIER RETURN DONE @VM08772 01091000
  1103. MVI 0(R1),X'00' CLEAR IT FROM THE BUFFER @VM08772 01092000
  1104. BCTR R1,0 BACK UP IN THE BUFFER @VM08772 01093000
  1105. BCT R0,CMPRD04 SEARCH FOR 'CR,LF' OR 'LF,CR' @VM08772 01094000
  1106. B CMPRD06A ALL DONE IF ZERO COUNT @VM08772 01095000
  1107. SPACE 01096000
  1108. CMPRD06 EQU * SEND ENDING CHARS IF NEEDED @VM08772 01097000
  1109. CLI 0(R1),X'3C' TRANSLATED 'XOFF' CHARACTER ? @VM08772 01098000
  1110. BNE CMPRD06A NO -- @VM08772 01099000
  1111. MVI 0(R1),X'00' REMOVE CHARACTER FROM BUFFER @VM08772 01100000
  1112. BCTR R1,0 BACK UP ONE IN THE BUFFER @VM08772 01101000
  1113. BCT R0,CMPRD04 DECREMENT AND TEST COUNT @VM08772 01102000
  1114. EJECT 01103000
  1115. CMPRD06A EQU * FINAL SUMMARY OF ENDING CHARS @VM08772 01104000
  1116. STH R0,CONCNT RESET INPUT DATA COUNT @VM08772 01105000
  1117. TM CONSTAT,CONACTV+CONESCP ANYTHING EXTRA TO DO ? @VM08772 01106000
  1118. BZ CMPEDIT NO -- JUST DO EDITING @VM08772 01107000
  1119. LR R5,R6 SAVE READ CONTASK ADDRESS @VM08772 01108000
  1120. LA R0,CONTSIZE+1 CONTROL CONTASK WITH DATA @VM08772 01109000
  1121. BAL R7,CTLTASZ . . . @VM08772 01110000
  1122. MVI CONSTAT,CONOUTPT+CONRTRY FIXED ORDER OUTPUT@VM08772 01111000
  1123. LA R0,WRITNRM NORMAL WRITE COMMAND @VM08772 01112000
  1124. STH R0,CONTCMD . . . @VM08772 01113000
  1125. MVI CONDCNT+1,2 ASSUME BOTH CR,LF NEEDED @VM08772 01114000
  1126. MVC CONDATA(2),=X'0D25' CPT-TWX 'CR', 'LF' @VM08772 01115000
  1127. TM CONSTAT-CONTASK(R5),CONACTV+CONESCP BOTH ? @VM08772 01116000
  1128. BO CMPRD07 YES - O.K. @VM08772 01117000
  1129. MVI CONDCNT+1,1 ONLY ONE IS REQUIRED @VM08772 01118000
  1130. TM CONSTAT-CONTASK(R5),CONACTV 'CR' NEEDED ? @VM08772 01119000
  1131. BO CMPRD08 YES - IT'S FIRST @VM08772 01120000
  1132. MVI CONDATA,X'25' SEND ONLY A LINE-FEED @VM08772 01121000
  1133. B CMPRD08 @VM08772 01122000
  1134. SPACE 01123000
  1135. CMPRD07 EQU * @VM08772 01124000
  1136. TM NICTYPE,NICTELE TELEGRAPH TERMINAL ? @VM08772 01125000
  1137. BO CMPRD08 YES - CORRECT AS IS @VM08772 01126000
  1138. MVI CONDCNT+1,1 ONLY ONE CHARACTER NEEDED @VM08772 01127000
  1139. MVI CONDATA,X'15' SELECTRIC CARRIAGE RETURN @VM08772 01128000
  1140. SPACE 01129000
  1141. CMPRD08 EQU * SETUP FOR EDITING, ETC. @VM08772 01130000
  1142. BAL R7,TAGTASK FILL IN BTU FIELDS, CCW DATA @VM08772 01131000
  1143. LR R6,R5 READ TASK TO GR6 AGAIN @VM08772 01132000
  1144. NI CONSTAT,255-(CONACTV+CONESCP) RESET FLAG BITS @VM08772 01133000
  1145. B CMPEDIT GO HANDLE EDITING & TRANSLATION @VM08772 01134000
  1146. SPACE 2 01135000
  1147. CTLREAD EQU * CONTROL READ FOR NON-MTA LINES @VM01034 01136000
  1148. CLI CONSYSR,X'F3' ATTENTION HIT ON INPUT ? @VM01034 01137000
  1149. BE CMPCON2 YES - THAT'S FINE BY ME @VM01034 01138000
  1150. TM CONSYSR,ERROR ANY OTHER ERROR RESPONSE ? @VM01034 01139000
  1151. BO PWROFFS YES - DISCONNECT AND TRY AGAIN @VM01034 01140000
  1152. TM CONSYSR,PHASE3 IS THIS THE LAST RESPONSE ? @VM01034 01141000
  1153. BO CMPCON2 YES - CONTINUE WITH 'VM/370' MSG @VM01034 01142000
  1154. B BTUFRET WAIT FOR THE FINAL RESPONSE @VM01034 01143000
  1155. EJECT 01144000
  1156. CMPMOVE EQU * MOVE READ DATA TO CALLER'S BUFFER@V200820 01145000
  1157. * SINCE IT IS A READ, THERE IS A SAVE-AREA @V200820 01146000
  1158. L R15,CONRETN-CONTASK(,R5) SAVEAREA ADDRESS @VM08790 01147000
  1159. USING SAVEAREA,R15 @VM08790 01148000
  1160. L R0,SAVER1 CALLER'S BUFFER ADDRESS @VM08790 01149000
  1161. L R1,SAVER0 CALLER'S BUFFER LENGTH @VM08790 01150000
  1162. ST R4,SAVER2 PASS BACK RETURN CODE @VM08790 01151000
  1163. LA R2,CONDATA START OF RECEIVED DATA @VM08790 01152000
  1164. LH R3,CONDCNT COUNT OF RECEIVED DATA @VM08790 01153000
  1165. TM CONSTAT-CONTASK(R5),CONSPLT SUB-BLOCKED READ? @VM08790 01154000
  1166. BZ CMPMOVA NO -- O.K. @VM01040 01155000
  1167. L R0,CONADDR-CONTASK(,R5) LOAD RESIDUAL POINTER @VA04714 01156100
  1168. LH R1,CONCNT-CONTASK(,R5) LOAD RESIDUAL LENGTH @VA04714 01156200
  1169. CMPMOVA EQU * @VM01040 01158000
  1170. LR R7,R1 SAVE DESTINATION COUNT @VM08790 01159000
  1171. CR R1,R3 SOURCE OR DESTINATION CONTROL ? @VM08790 01160000
  1172. BNH *+6 DESTINATION -- O.K. @VM08790 01161000
  1173. LR R1,R3 USE THE SMALLER COUNT @VM08790 01162000
  1174. MVCL R0,R2 MOVE DATA TO CALLER'S BUFFER @VM08790 01163000
  1175. TM CONSYSR,PHASE3 WAS THAT THE LAST RESPONSE? @VM08790 01164000
  1176. BO CMPMOVR YES - FILL IN CONTASK @VM08790 01165000
  1177. SH R7,CONDCNT COMPUTE RESIDUAL COUNT @VM08790 01166000
  1178. BP *+6 O.K. IF NOT NEGATIVE @VM08790 01167000
  1179. SLR R7,R7 FORCE RESIDUAL COUNT TO ZERO @VM08790 01168000
  1180. LR R6,R5 ORIGINAL CONTASK TO GR6 @VM08790 01169000
  1181. STH R7,CONCNT SAVE THE RESIDUAL BUFFER COUNT @VM08790 01170000
  1182. ST R0,CONADDR SAVE NEXT BUFFER POSITION @VM08790 01171000
  1183. OI CONSTAT,CONACTV+CONRTRY+CONSPLT SUB-BLOCKING @VM08790 01172000
  1184. BAL R7,TASKENQ RE-QUEUE THE ORIGINAL CONTASK @VM08790 01173000
  1185. B BTUFRET WAIT FOR FINAL RESPONSE @VM08790 01174000
  1186. SPACE 01175000
  1187. CMPMOVR EQU * FINAL RESPONSE RECEIVED @VM08790 01176000
  1188. LR R6,R5 ORIGINAL CONTASK TO GR6 @VM08790 01177000
  1189. NI CONSTAT,255-CONSPLT TURN OFF SUB-BLOCKING @VM08790 01178000
  1190. L R2,SAVER1 START OF USER'S BUFFER @VM08790 01179000
  1191. ST R2,CONADDR PASS BACK FOR EDITING AND DMKQCN @VM08790 01180000
  1192. LR R1,R0 GR1 = RESIDUAL BUFFER POINTER @VM08790 01181000
  1193. SR R0,R2 GR0 = TOTAL COUNT RECEIVED @VM08790 01182000
  1194. STH R0,CONCNT RETURN INPUT COUNT IN CONTASK @VM08790 01183000
  1195. BNPR R14 RETURN IF NO DATA RECEIVED @VM08790 01184000
  1196. BCTR R1,0 BACK UP TO LAST CHARACTER READ @VM08790 01185000
  1197. BR R14 RETURN @V200820 01186000
  1198. DROP R15 @VM08790 01187000
  1199. EJECT 01188000
  1200. CMPEDIT EQU * EDIT AND TRANSLATE IF DESIRED @V200820 01189000
  1201. TM CONPARM,EDIT+UCASE ANY EDIT-TYPE STUFF TO DO ? @V200820 01190000
  1202. BZ CMPRETN NO -- JUST RETURN TO DMKQCN @V200820 01191000
  1203. LH R1,CONCNT CHECK FOR ZERO COUNT @V200820 01192000
  1204. LTR R1,R1 ? ? ? @V200820 01193000
  1205. BNP CMPEDIN YES - CHECK SPECIAL HANDLING @VM08679 01194000
  1206. L R1,CONUSER SWITCH TO CONTASK OWNER VMBLOK @V407593 01195500
  1207. BAL R7,SWITCH2 GO SWITCH IT @V407593 01196500
  1208. CALL DMKCNSED EDIT THE TASK, AND/OR TRANSLATE @V200820 01198000
  1209. CHARGE SWITCH,ASYSVM SWITCH TO THE SYSTEM VMBLOK @V407508 01199500
  1210. TM CONSTAT,CONACTV ATTENTION HIT ON READ ? @VM08679 01202000
  1211. BO CMPRETN YES - JUST RETURN THE TASK @VM08679 01203000
  1212. LTR R3,R3 ZERO COUNT AFTER EDITING ? @VM08679 01204000
  1213. BNZ CMPRETN NO -- RETURN TASK TO DMKQCN @V200820 01205000
  1214. SPACE 01206000
  1215. REPETRD EQU * REPEAT THE READ OPERATION @V200820 01207000
  1216. BAL R7,TAGTASK REFRESH BTU FIELDS IN CONTASK @V200820 01208000
  1217. OI CONSTAT,CONRTRY THIS IS A RETRY OPERATION @V200820 01209000
  1218. BAL R7,TASKENQ RE-QUEUE THE CONTASK @V200820 01210000
  1219. B BTUFRET PROCESS NEXT BTU, IF ANY @VM08790 01211000
  1220. SPACE 2 01212000
  1221. CMPEDIN EQU * TEST FOR INHIBIT MASK REQUEST @VM08679 01213000
  1222. TM CONPARM,INHIBIT READ WITH INHIBIT ? @VM08679 01214000
  1223. BZ CMPRETN NO -- JUST RETURN THE TASK @VM08679 01215000
  1224. NI NICFLAG,255-NICPSUP PRINT SUPPRESS UNAVAILABLE @VM08679 01216000
  1225. BAL R5,MASKING REBUILD TASKS FOR MASK WRITE @VM08679 01217000
  1226. B BTUFRET CONTINUE . . . @VM08790 01218000
  1227. SPACE 2 01219000
  1228. READERR EQU * ERROR RESPONSE FROM READ COMMAND @V200820 01220000
  1229. CLI CONSYSR,X'F3' ATTENTION ON THE READ ? @V200820 01221000
  1230. BE READATN YES - SAVE THE INPUT DATA @V240820 01222000
  1231. NI CONSTAT-CONTASK(R5),255-CONSPLT RESET FLAG @VA01913 01223000
  1232. B BTUERRS CHECK OUT ERROR RESPONSE CODES @V240820 01224000
  1233. SPACE 01225000
  1234. READATN EQU * PROCESS ATTENTION ON INPUT @V240820 01226000
  1235. BAL R14,TESTENV SET GR4 FOR ATTN HANDLING @V200820 01227000
  1236. BAL R14,CMPMOVE MOVE ANY DATA TO CALLER'S BUFFER @V200820 01228000
  1237. * B NCPATTN GO TYPE EXCLAMATION POINT, ETC. @V200820 01229000
  1238. EJECT 01230000
  1239. NCPATTN EQU * GENERAL ATTENTION PROCESSING @V200820 01231000
  1240. OI NICFLAG,NICATTN NOW IN ATTENTION HANDLING @V200820 01232000
  1241. LA R4,WRITNRM ASSUME NORMAL WRITE COMMAND @VM01015 01233000
  1242. LTR R6,R5 IS THERE AN ORIGINAL TASK ? @V200820 01234000
  1243. BNP NCPATTL NO -- JUST CONTINUE @V200820 01235000
  1244. L R1,NICQPNT PUT THE ORIGINAL ON THE TOP @V200820 01236000
  1245. ST R6,NICQPNT . . . @V200820 01237000
  1246. ST R1,CONPNT WE WILL NEED THE TASK LATER @V200820 01238000
  1247. OI CONSTAT,CONACTV IDENTIFY IT AS INTERRUPTED @V200820 01239000
  1248. TM CONPARM,LOGDROP+LOGHOLD ATTN ON LAST WRITE ? @VM08673 01240000
  1249. BZ NCPATTL NO -- O.K. @VM08673 01241000
  1250. LA R4,WRITEOT WRITE END OF TRANSMISSION @VM01015 01242000
  1251. NCPATTL EQU * BUILD TASK TO WRITE EXCLAMATION @V200820 01243000
  1252. LA R0,CONTSIZE+1 SIZE NEEDED FOR CONTASK @VM01040 01244000
  1253. BAL R7,CTLTASZ GET A CONTASK @V200820 01245000
  1254. OI CONSTAT,CONSPLT HANG ONTO THE ORIGINAL @V200820 01246000
  1255. STH R4,CONTCMD SET APPROPRIATE COMMAND @VM01015 01247000
  1256. BAL R14,TESTENV SET ATTENTION CODE IN GR4 @VM08844 01248000
  1257. STH R4,CONCCW3 SAVE THE ATTENTION CODE @V200820 01249000
  1258. MVI CONDCNT+1,6 LENGTH FOR IDLES ONLY @V200820 01250000
  1259. MVC CONDATA(6),=X'171717171717' SIX IDLES @V200820 01251000
  1260. TM NICFLAG,NICATOF IS THIS STRING CORRECT ? @V200820 01252000
  1261. BO NCPATTM YES - SET IT UP @V200820 01253000
  1262. TM NICFLAG,NICSESN IS USER LOGGED ON YET ? @VM08593 01254000
  1263. BZ NCPATTM NO -- SUPPRESS EXCLAMATION @VM08593 01255000
  1264. MVI CONDCNT+1,8 LONGER STRING NEEDED @VM01040 01256000
  1265. MVC CONDATA(8),=X'145A171717171517' @VM01040 01257000
  1266. TM NICTYPE,NICTELE TELEGRAPH TERMINAL ? @V200820 01258000
  1267. BZ NCPATTM NO -- O.K. AS IS @V200820 01259000
  1268. MVC CONDATA(8),=X'5A171717170D2517' @VM01040 01260000
  1269. NCPATTM EQU * @V200820 01261000
  1270. BAL R7,TAGTASK FILL OUT THE TASK FOR LATER @V200820 01262000
  1271. B BTUFRET CONTINUE FOR NOW @VM08790 01263000
  1272. EJECT 01264000
  1273. CMPWRIT EQU * OUTPUT TASK HAS COMPLETED @V200820 01265000
  1274. TM CONSYSR,ERROR ERROR RESPONSE INDICATED ? @V200820 01266000
  1275. BO WRITERR YES - CHECK IT OUT @V200820 01267000
  1276. LTR R6,R5 WAS THERE AN ORIGINAL TASK ? @VM08790 01268000
  1277. BNP BTUFRET NO -- @VM08790 01269000
  1278. TM NICFLAG,NICATTN ATTENTION HANDLING NOW ? @V200820 01270000
  1279. BZ CMPWRT1 NO -- CHECK FOR LOGDROP @VM08673 01271000
  1280. NI NICFLAG,255-NICATTN ATTN HANDLING COMPLETE @V200820 01272000
  1281. LH R4,CONCCW3 PICK UP ATTENTION CODE (4 OR 8) @V200820 01273000
  1282. BAL R14,RETTASK DISPOSE OF THE ATTENTION TASK @V200820 01274000
  1283. L R6,NICQPNT NEXT TASK ON THE CHAIN @V200820 01275000
  1284. TM CONSTAT,CONACTV WAS A TASK INTERRUPTED ? @V200820 01276000
  1285. BZ CNSATTN NO -- CHECK PROCEDURE @V200820 01277000
  1286. L R1,CONPNT NEXT TASK AFTER INTERRUPTED ONE @V200820 01278000
  1287. ST R1,NICQPNT REMOVE THE FINISHED TASK @V200820 01279000
  1288. L R1,CONRETN THERE WILL BE A SAVEAREA @V200820 01280000
  1289. ST R4,SAVER2-SAVEAREA(,R1) SET RETURN CODE @V200820 01281000
  1290. TM CONSTAT,CONOUTPT+CONCNTL INPUT CONTASK ? @VM08679 01282000
  1291. BZ CMPEDIT YES - CHECK FOR EDITING @VM08679 01283000
  1292. LR R5,R6 MAKE SURE GR5 IS CORRECT @VM08809 01284000
  1293. SPACE 01285000
  1294. CMPWRT1 EQU * SCHEDULE DISCONNECT FOR LOGOFF @VM08673 01286000
  1295. TM CONPARM,LOGDROP+LOGHOLD LAST WRITE MESSAGE ? @VM08673 01287000
  1296. BZ CMPRETN NO -- JUST COMPLETE @VM08673 01288000
  1297. LA R4,DISCEOC DISCON, END OF CALL (LOGDROP) @VM08673 01289000
  1298. TM CONPARM,LOGDROP DROP THE PHONE LINE ? @VM08673 01290000
  1299. BO CMPWRT2 YES - ALL SET @VM08673 01291000
  1300. TM NICFLAG,NICDISB DROP THE LINE ANYWAY ? @VM08673 01292000
  1301. BO CMPWRT2 YES -- @VM08673 01293000
  1302. LA R4,DISCNCT SIMPLE DISCONNECT (LOGHOLD) @VM08673 01294000
  1303. CMPWRT2 EQU * USER IS LOGGING OFF @VM08673 01295000
  1304. L R7,RDEVCON GET CURRENT STACK POINTER @VA04253 01295100
  1305. ST R5,RDEVCON LOGOFF CONTASK @VA04253 01295200
  1306. L R1,NICQPNT ... REMAINING CONTASKS @VA04253 01295300
  1307. ST R1,CONPNT-CONTASK(,R5) @VA04253 01295400
  1308. SLR R1,R1 @VA04253 01295500
  1309. ST R1,NICQPNT CLEAR NICBLOK STACK @VA04253 01295600
  1310. CALL DMKQCNCL CLEAR CONTASKS @VA04253 01295700
  1311. ST R7,RDEVCON RESTORE OLD STACK @VA04253 01295800
  1312. ST R11,NICUSER RESET NICUSER TO SYSTEM VMBLOK @VM08673 01296000
  1313. NI NICFLAG,255-(NICSESN+NICATOF+NICATTN) RESET @VA04272 01297500
  1314. BAL R7,CTLTASK GET A CONTROL CONTASK @VM08673 01298000
  1315. STH R4,CONTCMD SET DISCONNECT COMMAND @VM08673 01299000
  1316. BAL R7,TAGTASK SETUP FOR EXECUTION @VM08673 01300000
  1317. B BTUFRET @VA04253 01301500
  1318. SPACE 01302000
  1319. CMPRETN EQU * RETURN FINISHED TASK, CONTINUE @V200820 01303000
  1320. BAL R14,RETTASK DISPOSE OF THE TASK @V200820 01304000
  1321. XC NICRCNT(2),NICRCNT CLEAR NICBLOK RETRY COUNT @VM01003 01305000
  1322. B BTUFRET @VM08790 01306000
  1323. EJECT 01307000
  1324. WRITERR EQU * ERROR RESPONSE ON OUTPUT @V200820 01308000
  1325. CLI CONSYSR,X'F3' ATTENTION ? @V200820 01309000
  1326. BNE BTUERRS NO -- FIGURE OUT THE OTHERS @V200820 01310000
  1327. TM NICFLAG,NICATTN IN ATTENTION HANDLING NOW ? @V200820 01311000
  1328. BO WRITATN YES -- PROCESS DIFFERENTLY @V200820 01312000
  1329. LTR R6,R5 IS THERE AN ORIGINAL TASK ? @V200820 01313000
  1330. BNP NCPATTN NO -- JUST DO ATTENTION LOGIC @V200820 01314000
  1331. TM CONSTAT,CONRESP IS A RESPONSE EXPECTED ? @VM08809 01315000
  1332. BO NCPATTN YES - PROCESS ATTENTION @VM01015 01316000
  1333. BAL R14,RETTASK RETURN THE FIRST TASK @V200820 01317000
  1334. SLR R5,R5 ASSUME NO INTERRUPTED TASK @VM08809 01318000
  1335. TM CONSTAT,CONSPLT SPLIT TASKS TO FLUSH ? @VM08809 01319000
  1336. BZ NCPATTN NO -- GO HANDLE ATTENTION @VM08809 01320000
  1337. WRITER1 EQU * FLUSH ALL SPLIT TASKS @V200820 01321000
  1338. L R6,NICQPNT NEXT TASK ON CHAIN @V200820 01322000
  1339. LTR R5,R6 KEEP R5 CORRECT, STILL HAVE ONE? @VA04487 01322700
  1340. BNP NCPATTN NOPE, BR. @VA04487 01323400
  1341. L R2,CONPNT . . . @V200820 01324000
  1342. ST R2,NICQPNT REMOVE THE NEXT TASK @V200820 01325000
  1343. TM CONSTAT,CONRESP RESPONSE EXPECTED ? @V200820 01326000
  1344. BO NCPATTN YES - STOP FLUSHING HERE @VM01015 01327000
  1345. BAL R14,RETTASK RETURN THE SPLIT TASK @V200820 01328000
  1346. SLR R5,R5 DONT PUT THIS BACK ON CHAIN @VA03582 01329000
  1347. TM CONSTAT,CONSPLT WAS THAT THE LAST ONE ? @V200820 01330000
  1348. BO WRITER1 NO -- KEEP FLUSHING @V200820 01331000
  1349. B NCPATTN GO HANDLE ATTENTIONS @V200820 01332000
  1350. SPACE 01333000
  1351. WRITATN EQU * MULTIPLE ATTENTIONS @V200820 01334000
  1352. LR R6,R5 RECOVER ORIGINAL TASK @V200820 01335000
  1353. MVI CONCCW3+1,X'08' CODE FOR MULTIPLE ATTN'S @V200820 01336000
  1354. B BTUEREQ RE-QUEUE FOR ANOTHER GO @V200820 01337000
  1355. EJECT 01338000
  1356. BTUERRS EQU * ERROR RESPONSE FROM I/O CONTASK @V200820 01339000
  1357. TM CONSYSR,PHASE3 PHASE ZERO ERROR ? @V200820 01340000
  1358. BNZ BTUERR5 NO -- CHECK FOR OTHERS @V200820 01341000
  1359. NI CONSYSR,255-ERROR TURN OFF ERROR BIT @V200820 01342000
  1360. CLI CONSYSR,X'05' INACTIVE DEVICE ? @V200820 01343000
  1361. BNE BTUERR3 NO -- @V200820 01344000
  1362. BAL R7,CTLTASK GET A CONTROL TASK @V200820 01345000
  1363. LA R0,CACTDEV ACTIVATE THE DEVICE @V200820 01346000
  1364. STH R0,CONTCMD . . . @V200820 01347000
  1365. BAL R7,TAGTASK @V200820 01348000
  1366. B BTUEREQ GO RE-QUEUE ERROR TASK FOR LATER @V200820 01349000
  1367. SPACE 01350000
  1368. BTUERR3 EQU * @V200820 01351000
  1369. CLI CONSYSR,X'1A' BUFFER DEPLETION CONDITION ? @V200820 01352000
  1370. BNE BTUERR4 NO -- @V200820 01353000
  1371. OI RDEVFLAG,RDEVSLOW GO TO SLOWDOWN MODE @V200820 01354000
  1372. SPACE 01355000
  1373. BTUEREQ EQU * RE-QUEUE FAILING CONTASK @V200820 01356000
  1374. LTR R6,R5 WAS THERE AN ORIGINAL TASK ? @V200820 01357000
  1375. BNP BTUFRET NO -- DON'T WORRY ABOUT IT @V200820 01358000
  1376. LH R1,NICRCNT RETRY COUNT FOR ERRORS @VM01003 01359000
  1377. LA R1,1(0,R1) . . . @VM01003 01360000
  1378. STH R1,NICRCNT . . . @VM01003 01361000
  1379. CL R1,F16 HAVE WE RETRIED ENOUGH ? @VM01003 01362000
  1380. BH PWROFFL YES - DROP THE CONNECTION @VM01034 01363000
  1381. B REPETRD SETUP TO RETRY THE CONTASK @VM01040 01364000
  1382. SPACE 01365000
  1383. BTUERR4 EQU * @V200820 01366000
  1384. CLI CONSYSR,X'1E' COMMAND RESET ? @V200820 01367000
  1385. BNE PWROFFL NO - ALL OTHERS => DROP THE LINE @VM01034 01368000
  1386. CLI CONTCMD,READNRM/256 INPUT REQUEST ? @VM01034 01369000
  1387. BE BTUERR7 YES - CHECK FOR 'WNG', ETC. @VM01034 01370000
  1388. LTR R6,R5 ORIGINAL STILL AROUND @VM08513 01371000
  1389. BNZ CMPRETN YES - CALL IT COMPLETE @VM08513 01372000
  1390. B BTUFRET NO - IGNORE RESPONSE @VM08513 01373000
  1391. SPACE 01374000
  1392. BTUERR7 EQU * CHECK FOR PRIORITY WRITE @VM08513 01375000
  1393. ICM R1,15,NICQPNT IS THERE ANOTHER CONTASK ? @VM01040 01376000
  1394. BZ PWROFFL NO -- NOT BREAK - DROP THE LINE @VM01034 01377000
  1395. TM CONPARM-CONTASK(R1),PRIORITY BREAK-IN ? @VM01040 01378000
  1396. BZ PWROFFL NO -- LINE DROP @VM01034 01379000
  1397. LTR R6,R5 MAKE SURE WE HAVE THE ORIGINAL @VM01034 01380000
  1398. BNP RNH2 THEORETICALLY IMPOSSIBLE (SIC) @VM01034 01381000
  1399. BAL R7,TAGTASK REFRESH BTU FIELDS IN CONTASK @VM01040 01382000
  1400. BAL R7,TASKENQ LET QUEUEING SORT THIS OUT @V200820 01383000
  1401. B BTUFRET . . . @V200820 01384000
  1402. EJECT 01385000
  1403. BTUERR5 EQU * PHASE 1, 2, OR 3 ERRORS @V200820 01386000
  1404. NI CONSYSR,255-(ERROR+PHASE3) TURN OFF BITS @V200820 01387000
  1405. CLI CONSYSR,X'01' DATA CHECK OR POSSIBLE INTREQ ? @V240820 01388000
  1406. BH BTUERR6 NO -- CHECK OTHER RESPONSES @V240820 01389000
  1407. TM CONSRID,CONOUTPT OUTPUT CONTASK ? @V200820 01390000
  1408. BO BTUEREQ YES - JUST RETRY @V200820 01391000
  1409. LA R0,CONTSIZE+(DATCHKL+7)/8 TASK SIZE @VM08772 01392000
  1410. BAL R7,CTLTASZ @V200820 01393000
  1411. MVI CONSTAT,CONOUTPT+CONRTRY OUTPUT, FIXED ORDER @VM01034 01394000
  1412. MVC CONDATA(DATCHKL),DATCHKM 'READ ERROR' MSG @VM08772 01395000
  1413. MVI CONDCNT+1,DATCHKL SET BTU DATA COUNT @VM08772 01396000
  1414. LA R0,WRITNRM NORMAL WRITE COMMAND @VM08737 01397000
  1415. STH R0,CONTCMD ... @V200820 01398000
  1416. BAL R7,TAGTASK FILL IN THE CONTASK @V200820 01399000
  1417. TM NICTYPE,NICTELE TELEGRAPH TERMINAL ? @VM08772 01400000
  1418. BZ BTUEREQ NO -- ALL READY TO GO @VM01034 01401000
  1419. MVC CONDATA(DATCHKL),DATCHKT TWX 'READ ERROR' MSG @VM08772 01402000
  1420. B BTUEREQ RE-QUEUE THE READ CONTASK @VM01034 01403000
  1421. SPACE 01404000
  1422. BTUERR6 EQU * CHECK FOR LINE FAILURE @V200820 01405000
  1423. CLI CONSYSR,X'02' INTERVENTION REQUIRED ? @V200820 01406000
  1424. BNE BTUERR3 NO -- CONTINUE CHECKING @V240820 01407000
  1425. CLI CONEXTR,X'8A' LOST DATA ? 01408000
  1426. BE BTUEREQ YES..RETRY OR IGNORE... 01409000
  1427. B PWROFFL DROP THE CONNECTION @VM01034 01410000
  1428. EJECT 01411000
  1429. CNSATTN EQU * ATTENTION HANDLING LOGIC @V200820 01412000
  1430. OI NICSTAT,NICNTRL DO NOT START THIS INTERFACE @V200820 01413000
  1431. TM NICFLAG,NICSESN ANYONE LOGGED ON? @VA07851 01414250
  1432. BO CNSATN2 YES - CHECK HIM OUT @VA07851 01414500
  1433. CALL DMKBLDVM CREATE A VMBLOK FOR THIS LINE @V200820 01416000
  1434. OI NICFLAG,NICSESN USER IS NOW LOGGED ON @VM08593 01417000
  1435. B CNSATN3 GO PUT HIM IN C.F. MODE @V200820 01418000
  1436. SPACE 01419000
  1437. CNSATN2 EQU * FIGURE OUT CORRECT APPROACH @V200820 01420000
  1438. L R1,NICUSER SWITCH TO NICUSERS VM-BLOK @V407593 01421500
  1439. BAL R7,SWITCHVM GO SWITCH IT @V407593 01422500
  1440. TM VMRSTAT,VMCFWAIT+VMLOGON IN LOGON OR SLEEPING ? @V240820 01424000
  1441. BNZ CNSATN3 YES - MUST CALL BREAK @V240820 01425000
  1442. CL R4,F4 SINGLE OR MULTIPLE CODE ? @V200820 01426000
  1443. BH CNSATN3 MULTIPLE -- @V200820 01427000
  1444. CALL DMKCFMAT ATTENTION TO THE VIRTUAL MACHINE @V200820 01428000
  1445. BZ CNSATNR TOOK O.K. - CONTINUE @V200820 01429000
  1446. SPACE 01430000
  1447. CNSATN3 EQU * PUT VIRTUAL MACHINE IN C.F. MODE @V200820 01431000
  1448. TM VMOSTAT,VMSLEEP+VMVIRCF COMING OUT OF SLEEP? @VA04784 01431100
  1449. BNO CNSATN3A NO, NORMAL PROCESSING @VA04784 01431200
  1450. CL R4,F4 SINGLE OR MULT. ATTN ?? @VA04784 01431300
  1451. BH CNSATN3A MULTIPLE, DON'T DISPATCH @VA04784 01431400
  1452. LA R4,GODSPCH CPEXBLOK RETURN ADDRESS @VA04784 01431500
  1453. BAL R7,STKCPEX BUILD AND STACK CPEXBLOK @VA04784 01431600
  1454. CNSATN3A EQU * @VA04784 01431700
  1455. L R4,NICQPNT PICK UP THE CONTASK CHAIN @V200820 01432000
  1456. SLR R0,R0 @V200820 01433000
  1457. ST R0,NICQPNT CLEAR THE CHAIN FOR A MOMENT @V200820 01434000
  1458. CALL DMKCFMBK LET CFM GET HIS TASKS IN FIRST @V200820 01435000
  1459. LA R1,NICQPNT-(CONPNT-CONTASK) CHAIN START @V200820 01436000
  1460. CNSATN4 EQU * FIND THE END OF THE CHAIN @V200820 01437000
  1461. L R2,CONPNT-CONTASK(,R1) NEXT CONTASK @V200820 01438000
  1462. LTR R2,R2 IS THERE ONE ? @V200820 01439000
  1463. BNP CNSATN5 NO -- PUT OLD CHAIN HERE @V200820 01440000
  1464. LR R1,R2 CONTINUE UNTIL WE FIND THE END @V200820 01441000
  1465. B CNSATN4 . . . @V200820 01442000
  1466. SPACE 01443000
  1467. CNSATN5 EQU * RE-CONNECT OLD CONTASK CHAIN @V200820 01444000
  1468. ST R4,CONPNT-CONTASK(,R1) . . . @V200820 01445000
  1469. CNSATNR EQU * RESET TO SYSTEM VMBLOK, CONTINUE @V200820 01446000
  1470. L R1,ASYSVM SWITCH BACK TO SYSTEM VM-0BLOCK @V407593 01447500
  1471. BAL R7,SWITCH2 GO SWITCH IT @V407593 01448500
  1472. SWITCH CONTINUE ON THE I/O PROCESSOR @V407508 01449500
  1473. NI NICFLAG,255-NICATTN ATTN HANDLING COMPLETE @V200820 01450000
  1474. NI NICSTAT,255-NICNTRL CONTROL TASK COMPLETE @V200820 01451000
  1475. B BTUFRET @VM08790 01452000
  1476. EJECT 01453000
  1477. CMPCONT EQU * PROCESS RESPONSE FROM 'CONTACT' COMMAN@V200820 01454000
  1478. CLI CONSYSR,X'04' MTA DEVICE IDENTIFIED ? @V200820 01455000
  1479. BNE CMPCON1 NO -- CHECK FOR COMPLETION @V200820 01456000
  1480. OI NICSTAT,NICNTRL CONTROL TASK STILL ACTIVE @VM01040 01457000
  1481. MVI NICTYPE,NICTERM+NICCIBM ASSUME NOT TELETYPE @V200820 01458000
  1482. OI NICFLAG,NICPSUP+NICMTA MTA LINE, PRT INHIBIT @VM01034 01459000
  1483. CLI CONDATA,MTA1050 1050 TERMINAL ? @VM08830 01460000
  1484. BNE *+8 NO -- O.K. @VM08830 01461000
  1485. NI NICFLAG,255-NICPSUP MASK REQUIRED FOR 1050 @VM08830 01462000
  1486. CLI CONDATA,MTATELE TELEGRAPH TERMINAL ? @V200820 01463000
  1487. BNE BTUFRET NO -- ALL SET AS IS @V200820 01464000
  1488. MVI NICTYPE,NICTERM+NICTELE SET TYPE ACCORDINGLY @V200820 01465000
  1489. NI NICFLAG,255-NICPSUP NO PRINT SUPPRESS @V200820 01466000
  1490. B BTUFRET CONTINUE @V200820 01467000
  1491. SPACE 01468000
  1492. CMPCON1 EQU * WRITE 'VM/370 ONLINE' MESSAGE @V200820 01469000
  1493. CLI CONSYSR,X'A9' SESSION NOT STARTED (HDW) ? @VM01040 01470000
  1494. BE DVCENAB THAT'S RIGHT - RETRY THE CONTACT @VM01040 01471000
  1495. CLI CONSYSR,X'9E' WAS THE CONTACT COMMAND RESET ? @VM01034 01472000
  1496. BE DVCENAB YES - GO AND CLEAN UP @VM01034 01473000
  1497. TM CONSYSR,ERROR IS THIS AN ERROR RESPONSE ? @VM01040 01474000
  1498. BO PWROFFS YES - DISCONNECT AND RETRY IT @VM01040 01475000
  1499. TM NICFLAG,NICMTA IS THIS AN MTA TERMINAL ? @VM01034 01476000
  1500. BO CMPCON2 YES - PROCEED IMMEDIATELY @VM01034 01477000
  1501. BAL R7,CTLTASK BUILD A CONTROL CONTASK @VM01034 01478000
  1502. LA R0,READNRM CONTROL READ FOR 2741 BYPASS @VM01034 01479000
  1503. STH R0,CONTCMD . . . @VM01034 01480000
  1504. BAL R7,TAGTASK . . . @VM01034 01481000
  1505. B BTUFRET LET THE READ EXECUTE FIRST @VM01034 01482000
  1506. SPACE 01483000
  1507. CMPCON2 EQU * WRITE 'VM/370 ONLINE' MESSAGE @VM01034 01484000
  1508. XC NICRCNT(2),NICRCNT CLEAR THE RETRY COUNT @VM01034 01485000
  1509. LA R0,CONTSIZE+(ONLINEL+7)/8 SIZE NEEDED FOR TASK @V200820 01486000
  1510. BAL R7,CTLTASZ GET A LARGE 'CONTROL' CONTASK @V200820 01487000
  1511. MVI CONSTAT,CONOUTPT MAKE IT LOOK LIKE OUTPUT @V200820 01488000
  1512. MVI CONPARM,PRIORITY FORCE CHAINING ORDER @VM01040 01489000
  1513. MVC CONDATA(ONLINEL),ONLINEM MOVE IN MSG @V200820 01490000
  1514. MVI CONDCNT+1,ONLINEL SET BTU DATA COUNT @VM08772 01491000
  1515. TM NICTYPE,NICTELE TELEGRAPH TERMINAL ? @VM08772 01492000
  1516. BZ CMPCON3 NO -- ALL SET @VM08772 01493000
  1517. MVC CONDATA(ONLINEL),ONLINET TWX VM/370 ONLINE @VM08772 01494000
  1518. CMPCON3 EQU * @VM08772 01495000
  1519. LA R1,WRITNRM COMMAND = WRITE @V200820 01496000
  1520. STH R1,CONTCMD ... @V200820 01497000
  1521. BAL R7,TAGTASK FILL OUT THE CONTASK @V200820 01498000
  1522. BAL R7,CTLTASK STICK A CONTROL TASK ON TOP @V200820 01499000
  1523. LA R0,CCDESMD COPY DESTINATION MODE COMMAND @V200820 01500000
  1524. STH R0,CONTCMD . . . @V200820 01501000
  1525. BAL R7,TAGTASK FILL OUT THIS TASK @V200820 01502000
  1526. B BTUFRET CONTINUE - WILL WORK OUT @V200820 01503000
  1527. EJECT 01504000
  1528. CMPCNTL EQU * PROCESS FINISHED CONTROL TASKS @V200820 01505000
  1529. TM CONSRID,CONRESP IS A RESPONSE EXPECTED ? @V200820 01506000
  1530. BZ CMPCTL1 NO -- CHECK COMMAND MODIFIER@V200820 01507000
  1531. LTR R5,R5 WAS ORIGINAL TASK RECOVERED ? @V200820 01508000
  1532. BNP RNH2 NO -- THEORETICALLY IMPOSSIBLE @V200820 01509000
  1533. BAL R7,PASSBTU BUILD SMALL BUFFER AND MOVE DATA @V200820 01510000
  1534. L R2,CONRETN-CONTASK(,R5) SAVEAREA POINTER @V200820 01511000
  1535. ST R1,SAVER1-SAVEAREA(,R2) PASS BTU VIA GR1 @V200820 01512000
  1536. LR R6,R5 ORIGINAL TASK TO GR6 @V200820 01513000
  1537. BAL R14,RETTASK CHAIN IT FOR RETURN TO DMKQCN @V200820 01514000
  1538. B BTUFRET SKIP OVER BUFFER FOR THIS TASK @V200820 01515000
  1539. SPACE 01516000
  1540. CMPCTL1 EQU * CONTROL TASK - NO RESPONSE @V200820 01517000
  1541. CLI CONTCMD+1,CRESERL-CNTLBTU RESET ERROR LOCK ?@V200820 01518000
  1542. BE CMPCTLK YES -- RESET NICBLOK FLAGS @V200820 01519000
  1543. CLI CONTCMD+1,CCDESMD-CNTLBTU COPY DEST MODE ? @V200820 01520000
  1544. BE CMPCDES YES - SETUP FOR 'ATTN' @V200820 01521000
  1545. CLI CONTCMD+1,CRESIMD-CNTLBTU RESET IMMEDIATE ? @VM01016 01522000
  1546. BE CMPCRIM YES -- @VM01016 01523000
  1547. CLI CONTCMD+1,CACTLTR-CNTLBTU ACTIVATE TRACE ? @VM01016 01524000
  1548. BNE *+8 IF YES, IT MUST HAVE FAILED @VM01016 01525000
  1549. NI NICSTAT,255-NICLTRC TURN OFF TRACING FLAG @VM01016 01526000
  1550. CLI CONTCMD+1,CACTDEV-CNTLBTU ACTIVATE DEVICE ? @V200820 01527000
  1551. BNE BTUFRET NO -- JUST IGNORE OTHERS @V200820 01528000
  1552. TM NICFLAG,NICENAB IS THE INTERFACE ENABLED ? @V200820 01529000
  1553. BZ BTUFRET NO -- JUST IGNORE RESPONSE @V200820 01530000
  1554. B DVCENAB GO ISSUE THE 'CONTACT' @V200820 01531000
  1555. EJECT 01532000
  1556. CMPCRIM EQU * NETWORK HALT COMMAND WAS ISSUED @VM08788 01533000
  1557. NI NICSTAT,255-(NICNTRL+NICERLK+NICDISA+NICLTRC) @VM08788 01534000
  1558. NI NICFLAG,255-NICATTN RESET INTERFACE FLAGS @VM08788 01535000
  1559. L R1,NICQPNT CHECK THE FIRST CONTASK @VM08788 01536000
  1560. LTR R1,R1 . . .IF THERE IS ONE @VM08788 01537000
  1561. BNP BTUFRET . . .NONE - CONTINUE @VM08788 01538000
  1562. NI CONSTAT-CONTASK(R1),CONACTV NOT ACTIVE @VM08788 01539000
  1563. B BTUFRET CONTINUE PROCESSING @VM08788 01540000
  1564. SPACE 2 01541000
  1565. CMPCDES EQU * COPY DESTINATION MODE FOR 'ATTN' @V200820 01542000
  1566. L R4,CONDATA PICK UP THREE BYTES OF FLAGS @V200820 01543000
  1567. LA R0,CONTSIZE+1 GET A CONTROL CONTASK @V200820 01544000
  1568. BAL R7,CTLTASZ ...WITH ROOM FOR DATA @V200820 01545000
  1569. STCM R4,B'1110',CONDATA DESTINATION MODE IN NEW TASK @V200820 01546000
  1570. OI CONDATA+1,X'02' SET BIT 14 FOR MONITOR @V200820 01547000
  1571. MVI CONDCNT+1,3 DATA COUNT = THREE @V200820 01548000
  1572. LA R1,CSETDSM SET DESTINATION MODE @V200820 01549000
  1573. STH R1,CONTCMD . . . @V200820 01550000
  1574. BAL R7,TAGTASK FILL OUT THE TASK FIELDS @V200820 01551000
  1575. B BTUFRET WILL BE EXECUTED WHEN POSSIBLE @V200820 01552000
  1576. EJECT 01553000
  1577. CMPCTLK EQU * RESET DEVICE ERROR LOCK @V200820 01554000
  1578. CLI CONSYSR,X'EC' POWER OFF AFTER ATTENTION ? @V200820 01555000
  1579. BNE BTUFRET NO -- ASSUME EVERYTHING IS O.K. @V200820 01556000
  1580. PWROFFL EQU * TERMINAL HAS DIED - CLEAN UP @V200820 01557000
  1581. LTR R6,R5 IS THERE AN ORIGINAL CONTASK ? @VM01034 01558000
  1582. BNP PWROFFT NO -- NOTHING EXTRA TO DO @VM01034 01559000
  1583. MVC CONPNT(4),NICQPNT RE-CHAIN THE ORIGINAL TASK @VM01034 01560000
  1584. ST R6,NICQPNT . . .SO WE DON'T LOSE IT @VM01034 01561000
  1585. PWROFFT EQU * FLUSH ANY PENDING CONTASK'S @VM01034 01562000
  1586. L R5,RDEVCON CURRENT RDEVBLOK CONTASK CHAIN @V200820 01563000
  1587. L R2,NICQPNT CONTASK CHAIN FROM THE NICBLOK @V200820 01564000
  1588. ST R2,RDEVCON MOVE IT TO THE RDEVBLOK @V200820 01565000
  1589. SLR R0,R0 @V200820 01566000
  1590. ST R0,NICQPNT CLEAR THE NICBLOK CHAIN @V200820 01567000
  1591. L R1,NICUSER SWITCH TO NICUSERS VMBLOK @V407593 01568050
  1592. SWTCHVM OPT=STAY SWITCH TO THIS VMBLOK @V407508 01569050
  1593. CALL DMKQCNCL CLEAR THE CONTASK CHAIN @V200820 01571000
  1594. ST R5,RDEVCON RESTORE PREVIOUS CHAIN, IF ANY @V200820 01572000
  1595. CL R11,ASYSVM IS THERE AN ACTIVE USER ? @V200820 01573000
  1596. BE PWROFFS NO -- JUST RE-CONTACT TERMINAL @VM01040 01574000
  1597. CALL DMKQCNTO,AFFINITY FORCE DISC. FOR THIS USER @V407593 01575050
  1598. PWROFFS EQU * CLEAN UP AND DISCONNECT @VM01040 01576000
  1599. L R1,ASYSVM SWITCH BACK TO SYSTEM VM-BLOK @V407593 01577050
  1600. BAL R7,SWITCH2 GO SWITCH IT @V407593 01578050
  1601. ST R11,NICUSER MAKE SYSTEM EQUAL OWNER @VA07851 01579400
  1602. NI NICSTAT,255-(NICNTRL+NICLTRC+NICDISA) RESET @V200820 01581000
  1603. NI NICFLAG,255-(NICSESN+NICATOF+NICATTN) FLAGS @V200820 01582000
  1604. BAL R7,CTLTASK BUILD A CONTROL TASK @VM01040 01583000
  1605. LA R0,DISCEOC DISCONNECT END OF CALL @VM01040 01584000
  1606. STH R0,CONTCMD . . . @VM01040 01585000
  1607. BAL R7,TAGTASK . . . @VM01040 01586000
  1608. B BTUFRET GO LET IT HAPPEN @VM01040 01587000
  1609. EJECT 01588000
  1610. DVCENAB EQU * RE-ESTABLISH TERMINAL SESSION @VM01040 01589000
  1611. TM NICFLAG,NICDISB DISABLE THIS INTERFACE ? @V200820 01590000
  1612. BZ DVCENB1 NO -- SETUP TO ISSUE CONTACT@V200820 01591000
  1613. NI NICFLAG,255-(NICENAB+NICDISB) LEAVE IT IDLE @V200820 01592000
  1614. XC NICRCNT(2),NICRCNT CLEAR THE RETRY COUNT @VM01040 01593000
  1615. B BTUFRET @V200820 01594000
  1616. SPACE 2 01595000
  1617. DVCENB1 EQU * RE-ENABLE THE LINE @V200820 01596000
  1618. TM NICFLAG,NICENAB IS IT ENABLED NOW ? @V200820 01597000
  1619. BZ BTUFRET NO -- LEAVE IT IDLE @V200820 01598000
  1620. LH R1,NICRCNT PICK UP ENABLE RETRY COUNT @VM01040 01599000
  1621. LA R1,1(0,R1) INCREMENT . . . @VM01040 01600000
  1622. STH R1,NICRCNT . . . @VM01040 01601000
  1623. CL R1,F16 ARE WE READY TO LOOP ON IT ? @VM01040 01602000
  1624. BH DVCDISA YES -- BUT DON'T @VM01040 01603000
  1625. BAL R7,CTLTASK GET A CONTROL CONTASK @V200820 01604000
  1626. LA R0,CONTACT @V200820 01605000
  1627. STH R0,CONTCMD @V200820 01606000
  1628. BAL R7,TAGTASK SETUP FOR LATER EXECUTION @V200820 01607000
  1629. B BTUFRET @V200820 01608000
  1630. EJECT 01609000
  1631. DVCDISA EQU * DMKRNH454I DEV XXXX DISABLED @VM01040 01610000
  1632. NI NICFLAG,255-(NICENAB+NICDISB) LEAVE IT IDLE @VM01040 01611000
  1633. XC NICRCNT(2),NICRCNT CLEAR FOR THE NEXT TIME @VM01040 01612000
  1634. LH R1,IOBRADD REAL ADDRESS OF THE 370X @VM01040 01613000
  1635. L R2,=A(DMKRIORN) ADDRESS OF THE CTLR TABLE @VM01040 01614000
  1636. L R3,0(0,R2) NUMBER OF TABLE ENTRIES @VM01040 01615000
  1637. DVCDISB EQU * FIND THIS CTLR IN THE TABLE @VM01040 01616000
  1638. CH R1,6(0,R2) IS THIS THE RIGHT ENTRY ? @VM01040 01617000
  1639. BE DVCDISC YES -- @VM01040 01618000
  1640. LA R2,4(0,R2) NEXT ENTRY @VM01040 01619000
  1641. BCT R3,DVCDISB CONTINUE @VM01040 01620000
  1642. DVCDISC EQU * COMPUTE RESOURCE REFERENCE @VM01040 01621000
  1643. S R2,=A(DMKRIORN) ZERO-BASED DISPLACEMENT @VM01040 01622000
  1644. SLL R2,10(0) ENTRY NUMBER TIMES 4096 @VM01040 01623000
  1645. LH R1,NICNAME RESOURCE I.D. FROM THE NICBLOK @VM01040 01624000
  1646. OR R2,R1 GR2 = RESOURCE REF. IN BINARY @VM01040 01625000
  1647. LA R0,4(0) GET A MESSAGE BUFFER @VM01040 01626000
  1648. CALL DMKFREE . . . @VM01040 01627000
  1649. MVC 24(8,R1),BLANKS CLEAR THE TAIL END OF IT @VM01040 01628000
  1650. MVC 0(28,R1),=C'DMKRNH454I DEV .... DISABLED' @VM01040 01629000
  1651. LR R3,R1 SAVE THE BUFFER ADDRESS @VM01040 01630000
  1652. LR R1,R2 RESOURCE REFERENCE TO GR1 @VM01040 01631000
  1653. CALL DMKCVTBH CONVERT IT FOR OUTPUT @VM01040 01632000
  1654. STCM R1,15,15(R3) STUFF IT INTO THE MESSAGE @VM01040 01633000
  1655. LR R1,R3 BUFFER BACK INTO GR1 FOR QCNWT @VM01040 01634000
  1656. LA R0,28(0) MESSAGE LENGTH @VM01040 01635000
  1657. LA R3,4(0) NO. DBL-WDS FOR 'DFRET' @VM01040 01636000
  1658. CALL DMKQCNWT,PARM=NORET+DFRET+OPERATOR+ALARM,AFFINITY 01637050
  1659. B BTUFRET CONTINUE PROCESSING @VM01040 01638000
  1660. EJECT 01639000
  1661. UNSOLIT EQU * UNSOLICITED RESPONSE FROM NCP @V200820 01640000
  1662. CLI CONSYSR,X'03' DEVICE ASSOCIATION RESPONSE ? @V200820 01641000
  1663. BL RNFATAL NO -- FATAL SITUATION @V200820 01642000
  1664. BE BTUFRET YES - IGNORE IT @V200820 01643000
  1665. CLI CONSYSR,X'07' ENTERING SLOWDOWN MODE ? @V200820 01644000
  1666. BL RNFATAL NO -- FATAL SITUATION @V200820 01645000
  1667. BE BTUSLOW YES - DO IT @V200820 01646000
  1668. CLI CONSYSR,X'09' INITIALIZATION COMPLETE RESPONSE @V200820 01647000
  1669. BE IPLCOMP YES - CHECK SCANNER BITS @V200820 01648000
  1670. BL BTUFAST NO -- EXIT FROM SLOWDOWN MODE @V200820 01649000
  1671. CLI CONSYSR,X'0A' MISC DATA RECORDING RECORD ? @V200820 01650000
  1672. BE MDRECRD YES - PASS IT TO ERROR RECORDING @V200820 01651000
  1673. CLI CONSYSR,X'1E' HOST LOGGING RESPONSE ? @V200820 01652000
  1674. BE BTUFRET YES - ****** TEMPORARILY IGNORE @V200820 01653000
  1675. TM CONSYSR,ERROR IS THIS AN ERROR RESPONSE ? @VM01013 01654000
  1676. BZ RNH2 NO -- OTHERS ARE FATAL @VM01013 01655000
  1677. CLI CONSYSR,X'F3' ATTENTION TO IDLE TERMINAL ? @VM01013 01656000
  1678. BNE BTUERRS NO -- SORT OUT THE OTHERS @VM01013 01657000
  1679. B NCPATTN PROCESS UNSOLICITED ATTENTION @V200820 01658000
  1680. SPACE 2 01659000
  1681. BTUSLOW EQU * ENTER NCP BUFFER SLOWDOWN MODE @V200820 01660000
  1682. OI RDEVFLAG,RDEVSLOW ENTER BUFFER SLOWDOWN MODE @V200820 01661000
  1683. B BTUFRET RELEASE THIS BTU, CONTINUE @V200820 01662000
  1684. SPACE 01663000
  1685. BTUFAST EQU * EXIT FROM NCP BUFFER SLOWDOWN @V200820 01664000
  1686. NI RDEVFLAG,255-RDEVSLOW EXIT BUFFER SLOWDOWN @V200820 01665000
  1687. B BTUFRET RELEASE THIS BTU, CONTINUE @V200820 01666000
  1688. SPACE 01667000
  1689. IPLCOMP EQU * NCP INITIALIZATION COMPLETE @V200820 01668000
  1690. TM CONDATA,X'F8' DID THE SCANNERS ENABLE O.K. ? @V200820 01669000
  1691. BNZ SCNFAIL NO -- WARN THE OPERATOR @V200820 01670000
  1692. NI RDEVSTAT,255-(RDEVNRDY+RDEVRSVD) 370X IS READY@V200820 01671000
  1693. NI RDEVFLAG,255-(RDEVSLOW+RDEVRCVY+RDEVWAIT) @V200820 01672000
  1694. B CHECKPT GO TRY TO RE-ENABLE DEVICES @V200820 01673000
  1695. SPACE 2 01674000
  1696. SCNFAIL EQU * COMMUNICATIONS SCANNER FAILURE @V200820 01675000
  1697. LA R2,468(0) MSG= DMKRNH468I SCANNER FAILURE @V200820 01676000
  1698. BAL R7,CALLERM GO SETUP AND TYPE ERROR MESSAGE @V200820 01677000
  1699. B BTUFRET LEAVE THE DEVICE NOT READY @V200820 01678000
  1700. EJECT 01679000
  1701. RNIOERR EQU * STANDARD 370X ERROR RECOVERY @V200820 01680000
  1702. TM IOBCSW+5,PCI+IL+PRGC+PRTC+CHC PROGRAM ERROR? @V200820 01681000
  1703. BNZ RNH1 YES - CRASH CP @V200820 01682000
  1704. TM IOBCSW+5,CDC CHANNEL DATA CHECK ? @V200820 01683000
  1705. BZ RNIOERD NO -- CHECK DEVICE STATUS @V200820 01684000
  1706. CLI IOBMISC2,X'02' IS THIS A READ ? @V200820 01685000
  1707. BNE RNFATAL NO -- CDC IS FATAL FOR WRITE @V200820 01686000
  1708. RNIOERT EQU * RETRY THE OPERATION 16 TIMES @V200820 01687000
  1709. LH R1,IOBRCNT COUNT OF PREVIOUS RETRIES @V200820 01688000
  1710. LA R1,1(0,R1) INCREMENT @V200820 01689000
  1711. STH R1,IOBRCNT . . . @V200820 01690000
  1712. CL R1,F16 CHECK FOR A RESONABLE LIMIT @V200820 01691000
  1713. BH RNFATAL NOPE - BOUNCE THE NCP @V200820 01692000
  1714. BAL R7,RNGORED RESTART THIS IOBLOK @V200820 01693000
  1715. B GODSPCH EXIT TO DMKDSPCH @V200820 01694000
  1716. SPACE 01695000
  1717. RNIOERD EQU * CHECK FOR DEVICE-LEVEL ERRORS @V200820 01696000
  1718. TM IOBCSW+4,UC WAS IT A UNIT CHECK ? @V200820 01697000
  1719. BZ RNFATAL NO -- BOUNCE IT @V200820 01698000
  1720. RNIOEUC EQU * @V200820 01699000
  1721. L R1,IOBIOER ADDRESS OF THE IOERBLOK @V200820 01700000
  1722. USING IOERBLOK,R1 @V200820 01701000
  1723. TM IOERDATA,CMDREJ WAS IT MY FAULT ? @V200820 01702000
  1724. BO RNH1 APPARENTLY - DIE @V200820 01703000
  1725. TM IOERDATA,BUSOUT BUS-OUT CHECK ? @V200820 01704000
  1726. BZ RNFATAL NO -- OTHERS = BOUNCE NCP @V200820 01705000
  1727. CLI IOBMISC2,X'02' WAS THIS A READ STRING ? @V200820 01706000
  1728. BE RNIOERT YES - RETRY FROM THE BEGINNING @V200820 01707000
  1729. CLI IOBMISC2,X'01' WAS THIS A WRITE STRING ? @V200820 01708000
  1730. BNE RNFATAL NO -- VERY STRANGE STATUS @V200820 01709000
  1731. L R1,IOBCSW BACK UP TO FAILING CCW @V200820 01710000
  1732. S R1,F8 (KEY IS ZERO) @V200820 01711000
  1733. BNP RNIOERT RETRY FROM THE BEGINNING @V200820 01712000
  1734. ST R1,IOBRCAW SET THE IOBLOK RESTART CAW @V200820 01713000
  1735. OI IOBFLAG,IOBRSTRT RESTART IN THE MIDDLE @V200820 01714000
  1736. B RNIOERT . . . @V200820 01715000
  1737. EJECT 01716000
  1738. MDRECRD EQU * MISCELLANEOUS DATA RECORDING BTU @V200820 01717000
  1739. L R1,NMDRCRD NUMBER OF MDR RECORDS RECEIVED @V200820 01718000
  1740. AL R1,F1 INCREMENT . . . @V200820 01719000
  1741. ST R1,NMDRCRD . . . @V200820 01720000
  1742. LH R2,CONDCNT LENGTH OF THE MDR DATA @V240820 01721000
  1743. LA R2,12(0,R2) ALLOW FOR ACCESS METHOD DATA @V240820 01722000
  1744. BAL R7,PASTBTU BUILD A MINI-CONTASK FOR DMKIOE @V240820 01723000
  1745. LR R5,R1 MINI-CONTASK ADDRESS TO GR5 @V240820 01724000
  1746. DROP R6 TEMPORARILY @V240820 01725000
  1747. USING CONCCW3,R5 . . . @V240820 01726000
  1748. LH R1,IOBRADD 370X NATIVE SUBCHANNEL ADDRESS @V240820 01727000
  1749. STH R1,CONDATA PASS IT ALONG FOR CPEREP @V240820 01728000
  1750. L R1,NICUSER VMBLOK POINTER FOR THIS RESOURCE @V240820 01729000
  1751. MVC CONDATA+2(8),VMUSER-VMBLOK(R1) USERID @V240820 01730000
  1752. LH R1,CONDEST FAILING RESOURCE I.D. @V240820 01731000
  1753. STH R1,CONDATA+10 PASS IT ALONG IN THE RECORD @V240820 01732000
  1754. LA R1,CONDATA+12 POINT TO LOCATION OF MDR DATA @V240820 01733000
  1755. DROP R5 @V240820 01734000
  1756. USING CONTASK,R6 NORMAL ADDRESSABILITY @V240820 01735000
  1757. LH R2,CONDCNT ORIGINAL MDR DATA LENGTH @V240820 01736000
  1758. BCTR R2,0 DECREMENT FOR EXECUTE @V240820 01737000
  1759. LA R3,CONDATA POINT TO SOURCE OF THE DATA @V240820 01738000
  1760. EX R2,MVCR1R3 MOVE MDR DATA INTO THE BUFFER @V240820 01739000
  1761. LA R2,13(0,R2) RESTORE LENGTH + ADD HEADER @V240820 01740000
  1762. STH R2,CONDCNT-CONCCW3(,R5) . . . @V240820 01741000
  1763. LR R6,R5 PASS BTU ADDRESS IN GR6 @V240820 01742000
  1764. LA R4,CALLIOER CPEXADD FOR LATER CALL TO DMKIOE @V200820 01743000
  1765. BAL R7,STKCPEX STACK CPEXBLOK FOR LATER @V200820 01744000
  1766. B BTUFRET CONTINUE NORMALLY FOR NOW @V200820 01745000
  1767. EJECT 01746000
  1768. CHECKPT EQU * RE-ENABLE LINES AFTER 370X BOUNCE@V200820 01747000
  1769. BAL R9,READFRT RELEASE READ BUFFERS, CCW STRING @V200820 01748000
  1770. ICM R5,15,RDEVCKPT LOAD AND TEST FOR CKPBLOK @VM01034 01749000
  1771. BZ RNIGNOR NOT THERE - JUST EXIT @VM01034 01750000
  1772. BAL R7,FRETIOB RELEASE THE IOBLOK ANYWAY @V200820 01751000
  1773. USING CKPBLOK,R5 @V200820 01752000
  1774. CLC CKPNAME(8),RDEVNCP SAME CONTROL PROGRAM NOW ? @V200820 01753000
  1775. BNE CHEKFRT NO -- EXIT GRACEFULLY @V200820 01754000
  1776. L R9,RDEVNICL START OF THE NICBLOK LIST @V200820 01755000
  1777. LH R7,RDEVMAX SETUP TO BXLE THROUGH IT @V200820 01756000
  1778. MH R7,=AL2(NICSIZE*8) . . . @V200820 01757000
  1779. ALR R7,R9 . . . @V200820 01758000
  1780. LA R6,NICSIZE*8 . . . @V200820 01759000
  1781. LA R10,CKPBITS START OF THE CKPBLOK BIT MAP @V200820 01760000
  1782. LA R3,1(0,0) START WITH A SINGLE SHIFT @V200820 01761000
  1783. LR R4,R3 ...INCREMENT @V200820 01762000
  1784. LA R5,8(0,0) ...LIMIT @V200820 01763000
  1785. DROP R5 @V200820 01764000
  1786. SPACE 2 01765000
  1787. CHECKEM EQU * CHECK FOR ACTIVE OR ENABLED @V200820 01766000
  1788. L R1,F256 GET A SINGLE BIT @V200820 01767000
  1789. SRL R1,0(R3) SHIFT APPROPRIATELY @V200820 01768000
  1790. EX R1,TESTBIT SEE IF THE BIT IS SET @V200820 01769000
  1791. BZ CHECKNX NO -- SKIP THIS NICBLOK ENTIRELY @V200820 01770000
  1792. TM NICTYPE,NICLINE IS THIS A LINE ? @V200820 01771000
  1793. BZ CHECKDV NO -- CHECK FOR TERMINALS @V200820 01772000
  1794. TM NICSTAT,NICDISA IS IT ALREADY ACTIVE ? @V200820 01773000
  1795. BZ CHECKNX YES - NOTHING MORE TO DO @V200820 01774000
  1796. NI NICSTAT,255-NICDISA WILL BE ACTIVE SOON @V200820 01775000
  1797. LH R1,NICNAME RESOURCE I.D. @V200820 01776000
  1798. LA R0,CACTLIN ACTIVATE LINE @V200820 01777000
  1799. CALL DMKRNHND,PARM=0 *** WAIT FOR THE RESPONSE **@V200820 01778000
  1800. BNZ GODSPCH EXIT IMMEDIATELY IF BAD RETURN @VM01034 01779000
  1801. LH R0,0(0,R1) NO. OF DBL-WDS FOR FRET @V200820 01780000
  1802. CALL DMKFRET RELEASE THE "MINI-CONTASK" @V200820 01781000
  1803. B CHECKNX ADVANCE THRU THE BLOCKS @V200820 01782000
  1804. EJECT 01783000
  1805. CHECKDV EQU * TEST FOR ENABLED TERMINALS @V200820 01784000
  1806. TM NICTYPE,NICTERM IS THIS A TERMINAL ? @V200820 01785000
  1807. BZ CHECKNX NO -- IGNORE THE ONE BIT @V200820 01786000
  1808. TM NICFLAG,NICENAB ALREADY ENABLED ? @V200820 01787000
  1809. BO CHECKNX YES - SKIP IT @V200820 01788000
  1810. OI NICFLAG,NICENAB WILL BE ENABLED @V200820 01789000
  1811. LH R1,NICNAME RESOURCE I.D. @V200820 01790000
  1812. LA R0,CONTACT CONTACT COMMAND @V200820 01791000
  1813. CALL DMKRNHND,PARM=NORET DON'T WAIT FOR THIS ONE@V200820 01792000
  1814. BNZ GODSPCH QUIT FAST IF BAD RETURN CODE @VM01034 01793000
  1815. CHECKNX EQU * @V200820 01794000
  1816. BXLE R3,R4,CHECKNC BUMP THE SHIFT COUNT @V200820 01795000
  1817. LR R3,R4 RESTART AT ONE @V200820 01796000
  1818. LA R10,1(0,R10) NEXT BYTE IN THE BIT MAP @V200820 01797000
  1819. CHECKNC EQU * ADVANCE THROUGH THE NICBLOK'S @V200820 01798000
  1820. BXLE R9,R6,CHECKEM . . . @V200820 01799000
  1821. SPACE 01800000
  1822. CHEKFRT EQU * RELEASE THE CKPBLOK ITSELF @V200820 01801000
  1823. L R1,RDEVCKPT @V200820 01802000
  1824. LH R0,CKPSIZE-CKPBLOK(,R1) SIZE IN DBL-WDS @V200820 01803000
  1825. CALL DMKFRET RETURN CKPBLOK TO FREE STORAGE @V200820 01804000
  1826. SLR R1,R1 @V200820 01805000
  1827. ST R1,RDEVCKPT CLEAR OUT THE RDEVBLOK @V200820 01806000
  1828. B GODSPCH EXIT @V200820 01807000
  1829. SPACE 2 01808000
  1830. RNCLEAN EQU * CLEAN UP IOBLOK, EXIT @VM08593 01809000
  1831. TM IOBSPEC,IOBUNSL UNSOLICITED INTERRUPT ? @VM08593 01810000
  1832. BO RNIGNOR YES - FRET IOBLOK + EXIT @VM08593 01811000
  1833. CLI IOBMISC2,X'02' IS THIS A READ CHANNEL PROGRAM @VM08593 01812000
  1834. BNE RNIGNOR NO --- @VM08593 01813000
  1835. BAL R9,READFRT RELEASE BUFFERS, CCW STRING @VM08593 01814000
  1836. B RNIGNOR FRET IOBLOK + EXIT @VM08593 01815000
  1837. EJECT 01816000
  1838. RNFATAL EQU * THE 3705 IS GOING TO BOUNCE @V200820 01817000
  1839. TM RDEVFLAG,RDEVRCVY ALREADY IN RECOVERY ? @V200820 01818000
  1840. BO RNIGNOR YES - GET OUT OF HERE @V200820 01819000
  1841. TM RDEVFLAG,RDEVLNCP IS THERE AN NCP ACTIVE ? @VM08838 01820000
  1842. BZ RNRDUMP NO -- JUST DUMP + RE-LOAD @VM08838 01821000
  1843. TM RDEVFLAG,RDEVWAIT WAS I BUSY JUST NOW ? @V200820 01822000
  1844. BZ RNFDISC NO -- @V200820 01823000
  1845. CLI IOBMISC2,X'02' READ CCW STRING ? @V200820 01824000
  1846. BNE RNFDISC NO -- NOTHING TO CLEAN UP @V200820 01825000
  1847. BAL R9,READFRT RELEASE READ BUFFERS, ETC. @V200820 01826000
  1848. RNFDISC EQU * @V200820 01827000
  1849. TM RDEVSTAT,RDEVNRDY WAS THE DEVICE BUSY YET ? @V200820 01828000
  1850. BO RNRDUMP NO -- JUST TRY THE RE-LOAD @V200820 01829000
  1851. OI RDEVSTAT,RDEVNRDY SET THE DEVICE NOT READY @V200820 01830000
  1852. L R9,RDEVNICL START OF THE NICBLOK LIST @V200820 01831000
  1853. LH R7,RDEVMAX SETUP TO BXLE THROUGH IT @V200820 01832000
  1854. MH R7,=AL2(NICSIZE*8) . . . @V200820 01833000
  1855. ALR R7,R9 . . . @V200820 01834000
  1856. LA R6,NICSIZE*8 . . . @V200820 01835000
  1857. ICM R1,15,RDEVCKPT DO WE ALREADY HAVE A CKPBLOK ? @VM01034 01836000
  1858. BNZ RNFNICS YES - DON'T BUILD ANOTHER ONE @V200820 01837000
  1859. LH R2,RDEVMAX MAX RESOURCE I.D. AGAIN @V200820 01838000
  1860. LA R2,1(0,R2) BUMP ONE FOR RESOURCE COUNT @V200820 01839000
  1861. LA R3,7(0,R2) ROUND UP TO EIGHT-BIT BOUNDARY @V200820 01840000
  1862. SRL R3,3(0) . . . @V200820 01841000
  1863. LA R3,7(0,R3) ROUND UP TO EIGHT-BYTE BOUNDARY @V200820 01842000
  1864. SRL R3,3(0) . . . @V200820 01843000
  1865. LA R0,CKPBKSZ(0,R3) ADD LENGTH OF CKPBLOK HEADER@V200820 01844000
  1866. CALL DMKFREE ALLOCATE CKPBLOK @V200820 01845000
  1867. ST R1,RDEVCKPT CONNECT IT TO THE RDEVBLOK @V200820 01846000
  1868. USING CKPBLOK,R1 @V200820 01847000
  1869. STH R0,CKPSIZE SAVE BLOCK SIZE IN DBL-WDS @V200820 01848000
  1870. STH R2,CKPRMAX SAVE NUMBER OF RESOURCES @V200820 01849000
  1871. LA R2,CKPBITS POINT TO START OF BIT MAP @V200820 01850000
  1872. SLL R3,3(0) GR3 = LENGTH OF BIT MAP @V200820 01851000
  1873. SR R15,R15 ZERO LENGTH, ZERO PAD @V200820 01852000
  1874. MVCL R2,R14 CLEAR THE BIT MAP @V200820 01853000
  1875. MVC CKPNAME(8),RDEVNCP SAVE THE CONTROL PROGRAM NAM@V200820 01854000
  1876. LA R2,CKPBITS START OF BIT MAP AGAIN @V200820 01855000
  1877. DROP R1 @V200820 01856000
  1878. LA R3,1(0,0) SHIFT COUNT START @V200820 01857000
  1879. LR R4,R3 . . .AND INCREMENT @V200820 01858000
  1880. LA R5,8(0,0) . . .AND LIMIT @V200820 01859000
  1881. EJECT 01860000
  1882. RNFBITS EQU * SETUP TO REMEMBER STATUS @V200820 01861000
  1883. TM NICTYPE,NICLINE IS THIS A LINE ? @V200820 01862000
  1884. BZ RNLBITS NO -- CHECK ENABLED @V200820 01863000
  1885. TM NICSTAT,NICDISA IS THE LINE ACTIVE ? @V200820 01864000
  1886. BZ RNSBITS YES - SET THE BIT @V200820 01865000
  1887. B RNDBITS MOVE TO NEXT BIT + NICBLOK @V200820 01866000
  1888. RNLBITS EQU * @V200820 01867000
  1889. TM NICFLAG,NICENAB IS THE DEVICE ENABLED ? @V200820 01868000
  1890. BZ RNDBITS NO -- NEXT BIT + NICBLOK @V200820 01869000
  1891. RNSBITS EQU * SET A BIT IN THE MAP @V200820 01870000
  1892. L R1,F256 GET A SINGLE BIT @V200820 01871000
  1893. SRL R1,0(R3) SHIFT APPROPRIATELY @V200820 01872000
  1894. EX R1,SETCBIT OR IT INTO THE MAP @V200820 01873000
  1895. RNDBITS EQU * @V200820 01874000
  1896. BXLE R3,R4,RNNBITS BUMP THE SHIFT COUNT @V200820 01875000
  1897. LR R3,R4 RESTART AT ONE @V200820 01876000
  1898. LA R2,1(0,R2) NEXT BYTE IN THE BIT MAP @V200820 01877000
  1899. RNNBITS EQU * @V200820 01878000
  1900. BXLE R9,R6,RNFBITS CONTINUE @V200820 01879000
  1901. L R9,RDEVNICL RESET TO START OF NICBLOK LIST @V200820 01880000
  1902. RNFNICS EQU * START FORCED DISCONNECTS @V200820 01881000
  1903. CALL DMKQCNCL CLEAR ANY 'RDEVCON' STACK @V200820 01882000
  1904. L R5,ASYSVM SYSTEM VMBLOK WILL BE NEEDED @V200820 01883000
  1905. RNFNICB EQU * @V200820 01884000
  1906. L R1,NICQPNT CONTASK CHAIN @V200820 01885000
  1907. LTR R1,R1 ANYTHING THERE ? @V200820 01886000
  1908. BNP RNFNICC NO -- @V200820 01887000
  1909. ST R1,RDEVCON PUT IT ON THE RDEVBLOK @V200820 01888000
  1910. CALL DMKQCNCL GET RID OF THE CONTASK'S @V200820 01889000
  1911. SLR R1,R1 @V200820 01890000
  1912. ST R1,NICQPNT CLEAR NICBLOK CHAIN ANCHOR @V200820 01891000
  1913. RNFNICC EQU * @V200820 01892000
  1914. CL R5,NICUSER IS THERE AN ACTIVE USER ? @V200820 01893000
  1915. BE RNFNNIC NO -- @V200820 01894000
  1916. L R1,NICUSER SWITCH TO HIS VMBLOK @V407593 01895050
  1917. SWTCHVM OPT=STAY @V407508 01896050
  1918. CALL DMKQCNTO,AFFINITY FORCE DISCONNECT @V407593 01897050
  1919. CALL DMKQCNTO FORCED DISCONNECT @V200820 01898000
  1920. ST R5,NICUSER SET NICUSER = A(DMKSYSVM) @V200820 01899000
  1921. RNFNNIC EQU * @V200820 01900000
  1922. BXLE R9,R6,RNFNICB DO THEM ALL @V200820 01901000
  1923. LR R1,R5 BACK TO THE SYSTEM VMBLOK @V407593 01902050
  1924. BAL R7,SWITCH2 GO SWITCH IT @V407593 01903050
  1925. EJECT 01905000
  1926. RNRDUMP EQU * START RECOVERY PROCESS @V200820 01906000
  1927. NI RDEVSTAT,255-RDEVRSVD NO LONGER IN USE @VM08809 01907000
  1928. TM IOBSTAT,IOBCC3 WAS THAT A HARD-STOP ? @V200820 01908000
  1929. BO HARDSTP YES - OPERATOR MESSAGE @V200820 01909000
  1930. TM RDEVFLAG,RDEVAUTO AUTOMATIC DUMP/LOAD ? @V200820 01910000
  1931. BZ OPMSGAC NO -- GIVE ACTION MESSAGE @V200820 01911000
  1932. LA R2,463(0) DMKRNH463I RESTART IN PROGRESS @V200820 01912000
  1933. BAL R7,CALLERM SETUP AND TYPE ERROR MESSAGE @V200820 01913000
  1934. TM RDEVFLAG,RDEVLNCP+RDEVLCEP LOADED NOW ? @VM08809 01914000
  1935. BZ RNRLOAD NO -- JUST RE-LOAD IT @V200820 01915000
  1936. CALL DMKNLEMP,PARM=SYSTEM DUMP THE 370X @V407508 01916100
  1937. LTR R2,R2 WAS THE DUMP SUCCESSFUL ? @VM01005 01917000
  1938. BNZ RNIGNOR NO -- DON'T TRY TO RE-LOAD @VM01005 01918000
  1939. RNRLOAD EQU * RE-LOAD AFTER SUCCESSFUL DUMP @V200820 01919000
  1940. CALL DMKNLDR,PARM=SYSTEM RE-LOAD @V200820 01920000
  1941. TM RDEVFLAG,RDEVLCEP EMULATOR LINES DEFINED ? @VM08809 01921000
  1942. BZ RNIGNOR NO -- CLEAN UP & EXIT @VM08809 01922000
  1943. CALL DMKCPVAE AUTOMATIC RE-ENABLE OF LINES @VM08809 01923000
  1944. B RNIGNOR CLEAN UP AND EXIT @VM08838 01924000
  1945. SPACE 2 01925000
  1946. HARDSTP EQU * SEND OPERATOR PANIC MESSAGE @V200820 01926000
  1947. LA R2,464(0) DMKRNH464I MUST HIT 370X "LOAD" @V200820 01927000
  1948. BAL R7,CALLERM FORMAT AND TYPE MESSAGE @V200820 01928000
  1949. B RNIGNOR WAIT FOR SOMETHING TO HAPPEN @V200820 01929000
  1950. SPACE 2 01930000
  1951. OPMSGAC EQU * SEND OPERATOR ACTION MESSAGE @V200820 01931000
  1952. LA R2,462(0) DMKRNH462I IPL REQUIRED @V200820 01932000
  1953. BAL R7,CALLERM SETUP AND TYPE ERROR MESSAGE @V200820 01933000
  1954. B RNIGNOR FRET THE IOBLOK, EXIT @V200820 01934000
  1955. EJECT 01935000
  1956. RNTRACE EQU * TRACE FILTER FOR 370X ACTIVITY @VM01040 01936000
  1957. AIF (NOT &TRACE(9)).RNOTRAC **AIF** 01937000
  1958. TM TRACFLG2,TRAC11 TRACING ACTIVE FOR BTU'S ? @VA01914 01938000
  1959. BZ RNOTRAC NO -- CHECK NETWORK TRACE @VA01914 01939000
  1960. TRACE CODE=TRCNCP,R15,R1,R2 GET CURRENT TRACE ENTRY @V407508 01940100
  1961. MVI 1(R15),X'00' CLEAR THE SECOND BYTE @VA01914 01942000
  1962. MVC 2(14,R15),CONSRID MOVE IN THE ENTIRE BTU @VA01914 01943000
  1963. RNOTRAC EQU * TEST FOR NETWORK TRACE @VA01914 01949000
  1964. .RNOTRAC ANOP **ANOP** 01950000
  1965. TM RDEVFLAG,RDEVTBTU BTU TRACING ACTIVE ? @VM01040 01951000
  1966. BO RNTRAC1 YES - SAVE THE BTU @VM01040 01952000
  1967. TM NICSTAT,NICLTRC RESOURCE TRACING ACTIVE ? @VM01040 01953000
  1968. BZR R14 NO -- JUST RETURN @VM01040 01954000
  1969. RNTRAC1 EQU * COPY THE BTU FOR LATER TRACING @VM01040 01955000
  1970. STM R0,R15,BALRSAVE SAVE THE CURRENT REGISTERS @VM01040 01956000
  1971. LH R2,CONDCNT DATA COUNT ON THE RESPONSE @VM01040 01957000
  1972. CLI CONTCMD,X'77' UNSOLICITED BTU RESPONSE ? @VM01040 01958000
  1973. BE RNTRAC2 YES - PASS ALL THE DATA @VM01040 01959000
  1974. TM CONSYSR,X'07' LINE TRACE RESPONSE ? @VM01040 01960000
  1975. BO RNTRAC2 YES - PASS ALL THE DATA @VM01040 01961000
  1976. LA R2,4(0,0) PASS A MAXIMUM OF FOUR BYTES @VM01040 01962000
  1977. RNTRAC2 EQU * BUILD SMALL BTU BUFFER @VM01040 01963000
  1978. LA R0,6+7+CONDATA-CONSRID(,R2) PTR+SIZE+BTU+DATA @VM01040 01964000
  1979. SRL R0,3(0) CONVERT TO DOUBLE-WORDS @VM01040 01965000
  1980. CALL DMKFREE GET SOME FREE STORAGE @VM01040 01966000
  1981. LR R3,R1 SAVE THE BUFFER ADDRESS @VM01040 01967000
  1982. STH R0,4(0,R3) SAVE THE BUFFER SIZE FOR LATER @VM01040 01968000
  1983. XC 0(4,R3),0(R3) CLEAR THE POINTER WORD @VM01040 01969000
  1984. LA R2,CONDATA-CONSRID-1(0,R2) SIZE OF MOVE @VM01040 01970000
  1985. LA R1,4(0,R3) POINT TO 'MINI-CONTASK' START @VM01040 01971000
  1986. EX R2,MVCNTRL MOVE THE BTU AND DATA @VM01040 01972000
  1987. LA R2,TRACENQ POINT TO QUEUE OF TRACE REQUESTS @VM01040 01973000
  1988. RNTRAC3 EQU * QUEUE FOR LATER TRACING @VM01040 01974000
  1989. ICM R1,15,0(R2) NEXT ONE ON THE CHAIN @VM01040 01975000
  1990. BZ RNTRAC4 FOUND THE END @VM01040 01976000
  1991. LR R2,R1 CONTINUE SEARCH @VM01040 01977000
  1992. B RNTRAC3 . . . @VM01040 01978000
  1993. RNTRAC4 EQU * @VM01040 01979000
  1994. ST R3,0(0,R2) ENQUEUE FOR TRACING LATER ON @VM01040 01980000
  1995. CL R3,TRACENQ WAS THE QUEUE EMPTY ? @VM01040 01981000
  1996. BNE RNTRAC5 NO -- TRACER IS ALREADY ACTIVE @VM01040 01982000
  1997. LA R4,TRACERS TRACER SUBROUTINE ENTRY @VM01040 01983000
  1998. BAL R7,STKCPEX BUILD + STACK A CPEXBLOK @VM01040 01984000
  1999. RNTRAC5 EQU * RESTORE REGS AND CONTINUE @VM01040 01985000
  2000. LM R0,R15,BALRSAVE . . . @VM01040 01986000
  2001. CLI CONTCMD,X'77' UNSOLICITED BTU RESPONSE ? @VM01040 01987000
  2002. BER R14 YES - CONTINUE NORMALLY @VM01040 01988000
  2003. TM CONSYSR,X'07' LINE TRACE RESPONSE ? @VM01040 01989000
  2004. BO BTUFRET YES - PROCESSING COMPLETE @VM01040 01990000
  2005. BR R14 RETURN @VM01040 01991000
  2006. SPACE 2 01992000
  2007. CALLIOER EQU * INDEPENDENT ERROR RECORDING CALL @V200820 01993000
  2008. * POINTER TO "MINI-CONTASK" IS GR6 @V200820 01994000
  2009. LR R1,R6 PASS MDR RECORD TO DMKIOERN @V200820 01995000
  2010. CALL DMKIOERN RECORD THE DATA FROM THE NCP @V200820 01996000
  2011. GOTO DMKDSPCH EXIT TO THE DISPATCHER @V200820 01997000
  2012. EJECT 01998000
  2013. TRACERS EQU * INDEPENDENT TRACING SUBROUTINE @V200820 01999000
  2014. USING CONCCW2+4,R6 ADDRESSABILITY FOR BTU BUFFER @VM01040 02000000
  2015. ICM R6,15,TRACENQ PICK UP NEXT BUFFER ADDRESS @VM01040 02001000
  2016. BZ TRACEXT ALL DONE - EXIT TO DMKDSPCH @VM01040 02002000
  2017. MVC TRACENQ(4),0(R6) DEQUEUE THE FIRST BUFFER @VM01040 02003000
  2018. CLC DMKRNHTR(8),BLANKS IS TRACING STILL ACTIVE ? @V200820 02004000
  2019. BE TRACFIN NO -- CLEAN UP AND EXIT @V200820 02005000
  2020. LA R1,DMKRNHTR POINT TO THE RECEVIER'S USERID @V200820 02006000
  2021. LA R0,8 . . . LENGTH @V200820 02007000
  2022. CALL DMKSCNAU MAKE SURE HE'S STILL AROUND @V200820 02008000
  2023. BNZ TRACFIN NOPE - FORCED TRACE END @V200820 02009000
  2024. BAL R7,SWITCHVM @V407508 02010050
  2025. LA R0,TRBUFSZ SIZE OF MY OUTPUT BUFFER @V200820 02013000
  2026. CALL DMKFREE . . . @V200820 02014000
  2027. LR R7,R1 ADDRESS THE BUFFER BY GR7 @V200820 02015000
  2028. MVC 0(8,R7),BLANKS @V200820 02016000
  2029. MVC 8((TRBUFSZ-1)*8,R7),0(R7) CLEAR THE BUFFER @V200820 02017000
  2030. LR R2,R7 POINT TO LOCATION FOR TIME-STAMP @V200820 02018000
  2031. SLR R1,R1 WE DON'T WANT THE DATE @V200820 02019000
  2032. CALL DMKCVTDT TIME-STAMP THIS OUTPUT LINE @V200820 02020000
  2033. MVC 9(4,R7),=C'READ' ASSUME IT'S A RESPONSE @VM01040 02021000
  2034. CLI CONSYSR,X'00' IS THIS AN OUTPUT TRACE ? @VM01040 02022000
  2035. BNE *+10 NO -- ALL SET @VM01040 02023000
  2036. MVC 9(4,R7),=C'SENT' THIS WAS SENT TO THE NCP @VM01040 02024000
  2037. MVI 13(R7),C'=' MINOR FRILL CHARACTER @V200820 02025000
  2038. LA R4,15(0,R7) LOCATION FOR FIRST HALFWORD @V200820 02026000
  2039. LA R3,7(0,0) NUMBER OF HALFWORDS IN BTU HDR @V200820 02027000
  2040. LA R2,CONSRID FIRST HEADER HALFWORD @V200820 02028000
  2041. EJECT 02029000
  2042. TRACEHD EQU * FORMAT BTU HEADER FOR OUTPUT@V200820 02030000
  2043. SLR R1,R1 @V200820 02031000
  2044. ICM R1,2+1,0(R2) LOAD TWO BYTES OF DATA @V200820 02032000
  2045. CALL DMKCVTBH CONVERT @V200820 02033000
  2046. STCM R1,15,0(R4) MOVE INTO THE OUTPUT BUFFER @V200820 02034000
  2047. LA R2,2(0,R2) NEXT DATA HALFWORD @V200820 02035000
  2048. LA R4,5(0,R4) NEXT OUTPUT SLOT @V200820 02036000
  2049. BCT R3,TRACEHD FORMAT THE ENTIRE HEADER @VA04487 02036100
  2050. LH R2,CONDCNT DATA COUNT FROM THE BTU @V200820 02037000
  2051. LTR R2,R2 IS THERE ANY ? @VA04487 02037100
  2052. BNP TRACECK NO -- LEAVE DATA FIELD BLANK @VM01040 02038000
  2053. TM CONSRID+1,INHIBIT PROTECTED READ DATA ? @VA04487 02038100
  2054. BO TRACEIT YES - DO NOT TRACE THE DATA @V240820 02039000
  2055. L R1,CONDATA FIRST WORD OF BTU DATA @VA04487 02039100
  2056. CALL DMKCVTBH CONVERT @V200820 02040000
  2057. STCM R0,15,51(R7) FIXED PLACE IN THE BUFFER @VA04487 02040100
  2058. STCM R1,15,55(R7) . . . @V200820 02041000
  2059. S R2,F4 FORMATTED THIS MUCH SO FAR @VA04487 02041100
  2060. BNP TRACEIT NO MORE TO DO - PRINT THE LINE @V200820 02042000
  2061. TM CONSYSR,X'07' LINE TRACE RESPONSE BTU ? @VA04487 02042100
  2062. BNO TRACEIT NO -- ONLY FOUR BYTES AVAILABLE @V200820 02043000
  2063. SRL R2,2(0) CONVERT DATA COUNT TO WORD COUNT @VA04487 02043100
  2064. CH R2,TRACMAX MORE THAN ONE LINE WORTH ? @V200820 02044000
  2065. BNH *+8 NO -- FORMAT ALL OF IT @VA04487 02044100
  2066. LH R2,TRACMAX YES - FORMAT ONLY EIGHT WORDS @V200820 02045000
  2067. LA R4,61(0,R7) START FOR SECOND DATA WORD @VA04487 02045100
  2068. LA R3,CONDATA+4 . . . @V200820 02046000
  2069. TRACELN EQU * FORMAT LINE TRACE RESPONSE DATA @V200820 02047000
  2070. L R1,0(0,R3) NEXT DATA WORD @V200820 02048000
  2071. CALL DMKCVTBH CONVERT @V200820 02049000
  2072. STCM R0,15,0(R4) . . . @V200820 02050000
  2073. STCM R1,15,4(R4) . . . @V200820 02051000
  2074. LA R3,4(0,R3) NEXT DATA WORD @V200820 02052000
  2075. LA R4,10(0,R4) NEXT OUTPUT SLOT @V200820 02053000
  2076. BCT R2,TRACELN CONTINUE . . . @V200820 02054000
  2077. B TRACEIT GO PRINT THE OUTPUT LINE @VM01040 02055000
  2078. EJECT 02056000
  2079. TRACECK EQU * NO DATA RETURNED WITH THE BTU @VM01040 02057000
  2080. TM CONSYSR,X'47' LINE TRACE RESPONSE ? @VM01040 02058000
  2081. BO TRACEFT YES - DON'T TRACE EMPTY ONES @VM01040 02059000
  2082. TRACEIT EQU * PRINT TRACE DATA FOR CLASS F USER@V200820 02060000
  2083. SR R0,R0 @V200820 02061000
  2084. LH R2,TRCLNCT LINE COUNT FOR PAGE-EJECT @V200820 02062000
  2085. LA R2,1(0,R2) . . . @V200820 02063000
  2086. STH R2,TRCLNCT SAVE COUNT FOR NEXT TIME THROUGH @V200820 02064000
  2087. C R2,F60 DO WE SKIP A PAGE ? @V200820 02065000
  2088. BNH TRACEWR NO -- @V200820 02066000
  2089. STH R0,TRCLNCT RESET LINE COUNT TO ZERO @V200820 02067000
  2090. CALL DMKVSPRT GR0 = 0 MEANS PAGE EJECT @V200820 02068000
  2091. TRACEWR EQU * @V200820 02069000
  2092. LR R1,R7 BUFFER ADDRESS TO GR1 @V200820 02070000
  2093. LA R0,TRACLLN LINE LENGTH FOR PRINT @V200820 02071000
  2094. CALL DMKVSPRT PRINT THE TRACE OUTPUT @V200820 02072000
  2095. TRACEFT EQU * @VM01040 02073000
  2096. LR R1,R7 BUFFER AGAIN @V200820 02074000
  2097. LA R0,TRBUFSZ SIZE FOR DMKFRET @V200820 02075000
  2098. CALL DMKFRET RETURN BUFFER TO FREE STORAGE @V200820 02076000
  2099. NI CONSYSR,255-PHASE3 TURN OFF PHASE BITS @V200820 02077000
  2100. CLI CONSYSR,X'87' LINE TRACE TERMINATED ? @V200820 02078000
  2101. BNE TRACEPR NO -- O.K. AS IS @V200820 02079000
  2102. NI NICSTAT,255-NICLTRC TURN OFF LINE TRACE FLAG @V200820 02080000
  2103. MSG 'DMKRNH465I LINE TRACE TERMINATED DUE TO ERROR' @V200820 02081000
  2104. CALL DMKQCNWT,PARM=NORET+ERRMSG TELL THE USER @V200820 02082000
  2105. B TRACFIN DISABLE TRACING @V200820 02083000
  2106. EJECT 02084000
  2107. TRACEPR EQU * @V200820 02085000
  2108. CL R2,F8 FATAL ERROR FROM DMKVSPRT ? @V200820 02086000
  2109. BNE TRACEFR NO -- FRET MINI-CONTASK + EXIT @V200820 02087000
  2110. TRACFIN EQU * TRACE HAS BEEN TERMINATED @V200820 02088000
  2111. SWITCH SWITCH CONTROL TO I/O PROCESSOR @V407593 02088500
  2112. NI RDEVFLAG,255-RDEVTBTU TURN OFF BTU TRACE @V200820 02089000
  2113. MVC DMKRNHTR(8),BLANKS CLEAR OUT USERID @V200820 02090000
  2114. MVC TRACEAD(4),ZEROES CLEAR OUT ADDRESS FIELDS @VM01040 02091000
  2115. L R0,F60 RESET LINE COUNT FOR NEXT TIME @V200820 02092000
  2116. STH R0,TRCLNCT . . .(PAGE EJECT FIRST TIME) @V200820 02093000
  2117. TM NICSTAT,NICLTRC LINE TRACE ACTIVE ? @V200820 02094000
  2118. BZ TRACEFR NO -- JUST FRET MIN-CONTASK @V200820 02095000
  2119. NI NICSTAT,255-NICLTRC TURN OFF TRACING FLAG @V200820 02096000
  2120. TM NICTYPE,NICLINE IS THIS A LINE RESOURCE ? @VM01040 02097000
  2121. BZ TRACEFR NO -- NO NEED TO RESET IT @VM01040 02098000
  2122. LH R1,NICNAME RESOURCE I.D. @V200820 02099000
  2123. LA R0,CTRMLTR TERMINATE LINE TRACE @V200820 02100000
  2124. CALL DMKRNHND,PARM=NORET TURN OFF NCP TRACE @V200820 02101000
  2125. TRACEFR EQU * @V200820 02102000
  2126. LH R0,CONCCW3 SIZE OF "MINI-CONTASK" @V200820 02103000
  2127. LR R1,R6 . . . @V200820 02104000
  2128. CALL DMKFRET RETURN BUFFER TO FREE STORAGE @V200820 02105000
  2129. B TRACERS LOOP BACK FOR ANOTHER BUFFER @VM01040 02106000
  2130. SPACE 02107000
  2131. TRACEXT EQU * RETURN TO THE DISPATCHER @VM01040 02108000
  2132. GOTO DMKDSPCH EXIT TO THE DISPATCHER @V200820 02109000
  2133. SPACE 2 02110000
  2134. TRBUFSZ EQU 17 BUFFER = 136 BYTES TOTAL @V200820 02111000
  2135. TRACLLN EQU 132 OUTPUT LENGTH = 132 BYTES @V200820 02112000
  2136. SPACE 02113000
  2137. TRACMAX DC H'7' MAX = 32 BYTES LINE TRACE OUTPUT @V200820 02114000
  2138. TRCLNCT DC H'60' LINE COUNT ACCUMULATION @V200820 02115000
  2139. TRACENQ DC F'0' QUEUE OF TRACE BUFFERS @VM01040 02116000
  2140. DS 0D @V200820 02117000
  2141. DMKRNHTR DC CL8' ' USERID RECEIVING TRACE OUTPUT @V200820 02118000
  2142. TRACEAD DC H'0' ADDRESS OF 370X BEING TRACED @VM01040 02119000
  2143. TRACRID DC H'0' RESOURCE I.D. BEING TRACED @VM01040 02120000
  2144. USING CONTASK,R6 RESET NORMAL ADDRESSABILITY @V200820 02121000
  2145. EJECT 02122000
  2146. PASSBTU EQU * MOVE BTU RESPONSE TO FREE STORAGE@V200820 02123000
  2147. LH R2,CONDCNT NUMBER OF BYTES OF DATA @V200820 02124000
  2148. PASTBTU EQU * MOVE BTU WITH FIXED DATA LENGTH @V200820 02125000
  2149. LA R0,CONDATA-CONCCW3+7(,R2) ALLOW FOR BTU, ALSO @V200820 02126000
  2150. SRL R0,3(0) SHIFT FOR DOUBLE-WORD COUNT @V200820 02127000
  2151. CALL DMKFREE GET A SMALL BUFFER FOR CALLER @V200820 02128000
  2152. STH R0,0(0,R1) INCLUDE THE BUFFER SIZE FOR FRET @V200820 02129000
  2153. LA R2,CONDATA-CONSRID-1(,R2) LENGTH FOR MOVE @V200820 02130000
  2154. EX R2,MVCNTRL MOVE BTU AND DATA TO SMALL BUFFER@V200820 02131000
  2155. BR R7 RETURN @V200820 02132000
  2156. SPACE 2 02133000
  2157. CALLERM EQU * SETUP FOR OPERATOR MESSAGE @V200820 02134000
  2158. LH R1,IOBRADD REAL ADDRESS FROM IOBLOK @V200820 02135000
  2159. CALL DMKCVTBH GET EBCDIC DATA IN GR1 @V200820 02136000
  2160. ICM R1,8,BLANKS . . .PLUS A HIGH-ORDER BLANK @V200820 02137000
  2161. L R0,MSGHEAD MODULE I.D., LENGTH = ZERO @V200820 02138000
  2162. O R2,=X'B8C90000' OPERATOR, ALARM, RETURN @V200820 02139000
  2163. CALL DMKERMSG,AFFINITY SEND MSG. WITH THE HEADER @V407593 02140100
  2164. BR R7 RETURN @V200820 02141000
  2165. EJECT 02142000
  2166. LINEBRK EQU * LINE CONNECTION FAILURE @V200820 02143000
  2167. TM CONSTAT,CONRESP IS THERE A SAVE-AREA ? @V200820 02144000
  2168. BZ LINERTN NO -- RETURN TASK TO DMKQCN @V200820 02145000
  2169. L R1,CONRETN PICK UP SAVE-AREA ADDRESS @V200820 02146000
  2170. LA R2,12(0) LINE BREAK RETURN CODE @V200820 02147000
  2171. ST R2,SAVER2-SAVEAREA(0,R1) SET IN CALLER'S GR2 @V200820 02148000
  2172. LINERTN EQU * RETURN FINISHED CONTASK TO DMKQCN@V200820 02149000
  2173. SLR R1,R1 CLEAR CONTASK FORWARD POINTER @V200820 02150000
  2174. ST R1,CONPNT ...TO AVOID TROUBLE WITH DMKQCN @V200820 02151000
  2175. CALL DMKQCNET RETURN TASK FOR PROCESSING @V200820 02152000
  2176. BR R7 RETURN @V200820 02153000
  2177. SPACE 1 02154000
  2178. FRETIOER EQU * FRET AN IOERBLOK FROM AN IOBLOK @V200820 02155000
  2179. L R1,IOBIOER PICK UP IOERBLOK @V200820 02156000
  2180. LTR R1,R1 MAKE SURE THERE IS ONE @V200820 02157000
  2181. BCR 8,R7 NOPE - JUST RETURN @V200820 02158000
  2182. LA R0,IOERSIZE @V200820 02159000
  2183. AH R0,IOEREXT-IOERBLOK(,R1) EXTENSION, IF ANY @V200820 02160000
  2184. CALL DMKFRET RETURN THE BLOCK TO FREE STORAGE @V200820 02161000
  2185. SLR R1,R1 @V200820 02162000
  2186. ST R1,IOBIOER CLEAR OUT THE IOBLOK FIELD @V200820 02163000
  2187. BR R7 ...AND RETURN @V200820 02164000
  2188. SPACE 02165000
  2189. FRETIOB EQU * FRET AN IOBLOK @V200820 02166000
  2190. LTR R10,R10 DO WE HAVE AN IOBLOK NOW ? @V200820 02167000
  2191. BCR 8,R7 NO -- JUST RETURN @V200820 02168000
  2192. ST R7,TEMPSAVE SAVE THIS FOR A MOMENT @V200820 02169000
  2193. BAL R7,FRETIOER RELEASE IOERBLOK, IF ANY @V200820 02170000
  2194. L R7,TEMPSAVE ... @V200820 02171000
  2195. LR R1,R10 @V200820 02172000
  2196. LA R0,IOBSIZE @V200820 02173000
  2197. CALL DMKFRET RETURN IOBLOK TO FREE STORAGE @V200820 02174000
  2198. SLR R10,R10 CLEAR FOR LATER TESTS @VM08513 02175000
  2199. BR R7 RETURN @V200820 02176000
  2200. EJECT 02177000
  2201. TASKENQ EQU * QUEUE CONTASK FOR LATER EXECUTION@V200820 02178000
  2202. LA R1,NICQPNT-(CONPNT-CONTASK) INITIAL BACK PTR @V200820 02179000
  2203. TASKCHN EQU * FIND WHERE TO PUT THIS CONTASK @V200820 02180000
  2204. LR R2,R1 SAVE A BACK POINTER @V200820 02181000
  2205. L R1,CONPNT-CONTASK(,R2) NEXT CONTASK, IF ANY @V200820 02182000
  2206. LTR R1,R1 HIT THE END OF THE CHAIN ? @V200820 02183000
  2207. BNP TASKINS YES - INSERT HERE @V200820 02184000
  2208. TM CONSTAT-CONTASK(R1),CONRTRY FIXED TASK ? @V200820 02185000
  2209. BNZ TASKCHN YES - CANNOT INSERT HER@V200820 02186000
  2210. TM CONSTAT,CONRTRY NEW TASK = RETRY ? @V200820 02187000
  2211. BO TASKINS YES - PUT IT HERE @V200820 02188000
  2212. TM CONSTAT-CONTASK(R1),CONSPLT SPLIT TASK ? @V200820 02189000
  2213. BO TASKCHN YES - CANNOT INSERT HER@V200820 02190000
  2214. TM CONPARM-CONTASK(R1),PRIORITY+INHIBIT FIXED ? @V200820 02191000
  2215. BNZ TASKCHN YES -- @V240820 02192000
  2216. TM CONPARM,PRIORITY NEW TASK = PRIORITY ? @V200820 02193000
  2217. BZ TASKCHN NO -- CONTINUE SEARCH @V200820 02194000
  2218. CL R1,NICQPNT AT THE BEGINNING NOW ? @V200820 02195000
  2219. BE TASKCHN YES - DO NOT PREEMPT FIRST TASK @V200820 02196000
  2220. TASKINS EQU * INSERT NEW TASK IN CHAIN @V200820 02197000
  2221. ST R6,CONPNT-CONTASK(,R2) PATCH INTO THE CHAIN @V200820 02198000
  2222. ST R1,CONPNT . . . @V200820 02199000
  2223. BR R7 RETURN @V200820 02200000
  2224. SPACE 2 02201000
  2225. TESTENV EQU * SET GR4 FOR ATTENTION HANDLING @V200820 02202000
  2226. LA R4,4(0,0) ASSUME SINGLE-ATTENTION CODE @V200820 02203000
  2227. L R1,NICUSER VMBLOK OF INTERFACE OWNER @V200820 02204000
  2228. TM VMMLEVEL-VMBLOK(R1),VMMCPENV CP MODE ? @V200820 02205000
  2229. BCR 8,R14 NO -- ALL SET AS IS @V200820 02206000
  2230. LA R4,8(0,0) MULTIPLE ATTENTION CODE @V200820 02207000
  2231. BR R14 ...RETURN @V200820 02208000
  2232. SPACE 2 02209000
  2233. RETTASK EQU * CHAIN TASK FOR RETURN TO DMKQCN @V200820 02210000
  2234. L R1,IOBMISC2 LAST TASK ON RETURN CHAIN NOW @V200820 02211000
  2235. ST R6,CONPNT-CONTASK(,R1) ADD THIS ONE TO CHAIN @V200820 02212000
  2236. ST R6,IOBMISC2 THIS IS NOW THE LAST ONE @V200820 02213000
  2237. SLR R1,R1 @V200820 02214000
  2238. ST R1,CONPNT CLEAR THE FORWARD POINTER @V200820 02215000
  2239. BR R14 RETURN @V200820 02216000
  2240. EJECT 02217000
  2241. * EQUATES USED FOR RESPONSE CHECKING FROM THE NCP: 02218000
  2242. * 02219000
  2243. ERROR EQU B'10000000' ERROR RESPONSE INDICATION @V200820 02220000
  2244. PHASE3 EQU B'01100000' PHASE 3 (FINAL) RESPONSE @V200820 02221000
  2245. MTA2741 EQU X'00' MTA RESPONSE FOR 2741 @V200820 02222000
  2246. MTATELE EQU X'22' MTA RESPONSE FOR CPT-TWX @VM08772 02223000
  2247. MTA2740T EQU X'06' MTA RESPONSE FOR 2740 XMIT CTL @VM08772 02224000
  2248. MTA1050 EQU X'1C' MTA RESPONSE FOR 1050 @VM08772 02225000
  2249. MTA2740B EQU X'02' MTA RESPONSE FOR 2740 BASIC @VM08772 02226000
  2250. SPACE 02227000
  2251. MVCNTRL MVC 2(*-*,R1),CONSRID EXECUTED FOR CONTROL DATA @V200820 02228000
  2252. MVCR1R3 MVC 0(*-*,R1),0(R3) EXECUTED MOVE CHARACTERS @V200820 02229000
  2253. SETCBIT OI 0(R2),*-* EXECUTED FOR BUILDING CKPBLOK @V200820 02230000
  2254. TESTBIT TM 0(R10),*-* EXECUTED FOR READING CKPBLOK @V200820 02231000
  2255. DS 0F @V200820 02232000
  2256. MSGHEAD DC C'RNH',X'00' GR0 HEADER INFO FOR DMKERMSG @V200820 02233000
  2257. SPACE 02234000
  2258. NOPCCW DC X'0300000020000001' UTILITY NO-OP CCW @V200820 02235000
  2259. SPACE 02236000
  2260. TTYMASK DC C'HHHHHHHH',X'0D' @V200820 02237000
  2261. DC C'SSSSSSSS',X'0D' @V200820 02238000
  2262. DC C'********',X'0D' @V200820 02239000
  2263. TTYMASL EQU *-TTYMASK LENGTH OF MASKING STRING @V200820 02240000
  2264. SPACE 02241000
  2265. IBMMASK DC X'14',C'HHHHHHHH',8X'16' @VM08679 02242000
  2266. DC C'SSSSSSSS',4X'1616' @V200820 02243000
  2267. DC C'********',4X'1616' @V200820 02244000
  2268. IBMMASL EQU *-IBMMASK LENGTH OF MASKING STRING @V200820 02245000
  2269. SPACE 02246000
  2270. ONLINET DC X'0D25E5D461F3F7F040D6D5D3C9D5C5400D2517' @VM08772 02247000
  2271. ONLINEM DC X'1517A59461F3F7F04096959389958540151717' @V200820 02248000
  2272. ONLINEL EQU *-ONLINEM MESSAGE LENGTH @V200820 02249000
  2273. SPACE 02250000
  2274. DATCHKT DC X'0D2517D9C5C1C440C5D9D9D6D90D2517' @VM08772 02251000
  2275. DATCHKM DC X'15171799858184408599999699151717' @VM08772 02252000
  2276. DATCHKL EQU *-DATCHKM LENGTH OF READ ERROR MESSAGE @VM08772 02253000
  2277. EJECT 02254000
  2278. LTORG @V200820 02255000
  2279. COPY NETWORK @V200820 02257000
  2280. COPY IOBLOKS @V200820 02259000
  2281. COPY IOER @V200820 02261000
  2282. COPY RBLOKS @V200820 02263000
  2283. COPY VMBLOK @V200820 02265000
  2284. COPY SAVE @V200820 02267000
  2285. COPY BTUCMD @V200820 02269000
  2286. COPY EQU @V200820 02271000
  2287. COPY DEVTYPES @V200820 02273000
  2288. PSA @V200820 02275000
  2289. SPACE 2 02276000
  2290. END DMKRNH @V200820 02277000