Table of Contents

DMKCNS Source

References

Source Listing

DMKCNS.ASSEMBLE.txt
  1. CNS TITLE 'DMKCNS (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 00002000
  3. *. 00003000
  4. * MODULE NAME - 00004000
  5. * 00005000
  6. * DMKCNS - SLOW-SPEED TERMINAL INTERRUPT HANDLER 00006000
  7. * 00007000
  8. * FUNCTION - 00008000
  9. * 00009000
  10. * SECOND LEVEL INTERRUPT HANDLER FOR 3210, 3215, 1052, 2150, 00010000
  11. * 7412 SYSTEM CONSOLES, AND 2741, 1050, TTY TERMINALS. 00011000
  12. * PERFORMS I/O INTERRUPT HANDLING INCLUDING ERROR RECOVERY 00012000
  13. * FOR THESE DEVICES. 00013000
  14. * 00014000
  15. * ATTRIBUTES - 00015000
  16. * 00016000
  17. * RE-ENTRANT, RESIDENT, ENTERED VIA INTERRUPT OR CPEXBLOK 00017000
  18. * 00018000
  19. * ENTRY POINTS - 00019000
  20. * 00020000
  21. * DMKCNSIC - ENTRY FROM DMKQCN TO INITIALIZE CONTASK CCW'S 00021000
  22. * DMKCNSIN - INTERRUPT RETURN ADDRESS FOR START/STOP TERMINALS 00022000
  23. * DMKCNSEN - ENTRY TO ENABLE OR DISABLE A TERMINAL LINE 00023000
  24. * DMKCNSED - 'BALR' SUBROUTINE TO EDIT AN INPUT DATA LINE 00024000
  25. * 00025000
  26. * ENTRY CONDITIONS - 00026000
  27. * 00027000
  28. * GPR 8 = ADDRESS OF TERMINAL RDEVBLOK (DMKCNSIC, DMKCNSEN) 00028000
  29. * GPR 10 = ADDRESS OF IOBLOK FOR INTERRUPT (DMKCNSIN) 00029000
  30. * GPR 11 = ADDRESS OF VMBLOK FROM 'RDEVUSER' 00030000
  31. * GPR 12 = ADDRESS OF ENTRY POINT 00031000
  32. * 00032000
  33. * EXIT CONDITIONS - 00033000
  34. * 00034000
  35. * NORMAL - EXIT IS MADE VIA A GOTO TO DMKDSPCH 00035000
  36. * 00036000
  37. * CALLS TO OTHER ROUTINES - 00037000
  38. * 00038000
  39. * DMKBLDVM - TO BUILD A VMBLOK FOR A NEW USER 00039000
  40. * DMKCFMBK - TO PLACE A USER IN CP CONSOLE FUNCTION MODE 00040000
  41. * DMKCFMAT - TO SIMULATE A VIRTUAL CONSOLE ATTENTION 00041000
  42. * DMKQCNCL - TO CLEAR THE CONTASK STACK 00042000
  43. * DMKQCNET - TO PROCESS SPOOLING, ETC. OF FINISHED CONTASK'S 00043000
  44. * DMKQCNTO - TO DISCONNECT A USER IN CASE OF LINE FAILURE 00044000
  45. * DMKCVTBH - TO CONVERT A BINARY DEVICE ADDRESS TO EBCDIC 00045000
  46. * DMKSCNRU - TO LOCATE A REAL DEVICE BLOCK (RDEVBLOK) 00046000
  47. * DMKIOSQR - TO INITIATE A START I/O 00047000
  48. * DMKTRMID - TO IDENTIFY THE TRANSLATE TABLE TO BE USED 00048000
  49. * DMKIOERR - TO RECORD PERMENANT I/O ERRORS 00049000
  50. * DMKMSWR - TO SEND I/O ERROR MESSAGE TO THE OPERATOR 00050000
  51. * DMKSCNRD - TO GET THE REAL ADDRESS FROM AN RDEVBLOK 00051000
  52. * DMKCPIEM - RE-ENTRY TO DMKCPI FOR ALTERNATE CONSOLE 00052000
  53. * DMKERMSG - TO SEND ERROR MESSAGES TO THE OPERATOR 00053000
  54. * DMKIOEST - TO CAUSE THE UPDATE OF STATISTICAL DATA COUNTERS 00053100
  55. * DMKLOKSW - SWITCH TO ANOTHER VMBLOK IF SYSTEM IS AP-MODE 00053200
  56. * DMKPTRAN - TO BRING IN THE TRANSLATE TABLE 00053300
  57. * 00054000
  58. * EXTERNAL REFERENCES - 00055000
  59. * 00056000
  60. * DMKTBLUP, DMKTBLPI, DMKTBLCI, DMKTBLNI, DMKTBLTI 00057000
  61. * DMKTBLPO, DMKTBLCO, DMKTBLNO, DMKTBLTO 00058000
  62. * 00059000
  63. * TABLES / WORK AREAS - NONE 00060000
  64. * 00061000
  65. * REGISTER USAGE - 00062000
  66. * 00063000
  67. * GPR6 = ADDRESS OF CONTASK 00064000
  68. * GPR8 = ADDRESS OF RDEVBLOK 00065000
  69. * GPR10 = ADDRESS OF IOBLOK 00066000
  70. * GPR11 = ADDRESS OF VMBLOK 00067000
  71. * GPR12, GPR13 = DMKCNS BASE ADDRESS 00068000
  72. * GPR14, GPR15 = LINKAGE REGISTERS FOR SUBROUTINE CALLS 00069000
  73. * 00070000
  74. * ALL OTHER REGISTERS ARE USED AS WORK REGISTERS 00071000
  75. * 00072000
  76. * NOTES - NONE 00073000
  77. * 00074000
  78. * OPERATION - EXECUTION OF DMKCNSIC MUST BE ON THE I/O PROCESSOR 00075100
  79. * IN AP-MODE 00075200
  80. * 00076000
  81. * DMKCNSIC IS ENTERED VIA CPEXBLOK WHENEVER DMKQCN HAS ADDED 00077000
  82. * A CONTASK TO AN EMPTY CONTASK STACK, OR WHEN A PRIORITY 00078000
  83. * TASK HAS BEEN STACKED. THE CCW STRING IS BUILT IN THE 00079000
  84. * CONTASK CREATED BY DMKQCN, AS FOLLOWS: 00080000
  85. * 00081000
  86. * 1. WRITE CONTASK'S: 00082000
  87. * 3210, 3215, 1052, ETC.: 00083000
  88. * WRITE CCW FOR THE EBCDIC DATA, WITH OR WITHOUT CARRIAGE 00084000
  89. * RETURN AS SPECIFIED BY 'NOAUTO', FOLLOWED BY EITHER A NO-OP 00085000
  90. * OR AN ALARM CCW, AS SPECIFIED BY 'ALARM'. 00086000
  91. * 2741, 1050: 00087000
  92. * WRITE CCW FOR THE DATA, FOLLOWED BY READ ACKNOWLEDGMENT 00088000
  93. * FOR 1050 ONLY. A CARRIAGE RETURN CHARACTER (X'5B') IS ADDED 00089000
  94. * TO THE END OF THE DATA UNLESS 'NOAUTO' IS SPECIFIED, 00090000
  95. * AND THE NECESSARY IDLE CHARACTERS (1 IDLE PER 10 DATA CHARS) 00091000
  96. * ARE INSERTED AFTER THE CARRIAGE RETURN. AN EOB IS ALSO SET 00092000
  97. * FOR A 1050. 00093000
  98. * CPT-TWX: 00094000
  99. * WRITE CCW FOR THE DATA, FOLLOWED BY A WRITE FOR THE BELL 00095000
  100. * IF 'ALARM' WAS SPECIFIED. THE SEQUENCE 'CR,LF,XOFF,RUBOUT' 00096000
  101. * IS ADDED AT THE END OF THE DATA UNLESS 'NOAUTO' IS SET. 00097000
  102. * 00098000
  103. * 2. READ CONTASK'S: 00099000
  104. * 3210, 3215, 1052, ETC.: 00100000
  105. * READ CCW FOR THE SPECIFIED LENGTH, FOLLOWED BY A NO-OP. 00101000
  106. * 2741, 1050: 00102000
  107. * WRITE OF ADDRESSING CHARACTERS (CIRCLE-C FOR 2741, CIRCLE-C, 00103000
  108. * COMMON POLL FOR 1050), FOLLOWED BY PREPARE, FOLLOWED BY READ 00104000
  109. * OF SPECIFIED LENGTH, DATA-CHAINED TO A DUMMY READ-SKIP FOR 00105000
  110. * 4096 BYTES (TO IGNORE EXECSS DATA). 00106000
  111. * CPT-TWX: 00107000
  112. * WRITE FOR '., XON' PROMPTING SEQUENCE, FOLLOWED BY READ 00108000
  113. * OF SPECIFIED LENGTH, DATA-CHAINED TO DUMMY READ-SKIP (4K). 00109000
  114. * 00110000
  115. * IF THE 'INHIBIT' PARMATER IS SET IN THE READ CONTASK, EITHER 00111000
  116. * THE 2741, 1050 PRINT SUPPRESS FEATURE IS ENABLED TO PREVENT 00112000
  117. * DATA TYPEOUT, OR A MASKING STRING IS WRITTEN TO OBSCURE THE 00113000
  118. * INPUT DATA. A NULL LINE OR ATTENTION FOR AN INHIBIT READ 00114000
  119. * WILL FORCE THE MASKING STRING TO BE TYPED, AND FOR THE PRINT 00115000
  120. * SUPPRESS FEATURE TO BE DISABLED. 00116000
  121. * 00117000
  122. * TERMINAL I/O START-UP: 00118000
  123. * 00119000
  124. * IF THERE IS NO I/O ACTIVE FOR THE TERMINAL, THE CONTASK 00120000
  125. * IS STARTED VIA A CALL TO DMKIOSQR. IF A PREPARE IS ACTIVE 00121000
  126. * FOR A START-STOP TERMINAL, THE PREPARE IS HALTED VIA 'HIO' 00122000
  127. * AND EXIT IS TAKEN TO DMKDSPCH (START-UP ON THE INTERRUPT). 00123000
  128. * IF THERE IS AN INPUT CONTASK ACTIVE, FOLLOWED BY A WRITE 00124000
  129. * WITH 'PRIORITY' SET, THE READ IS HALTED VIA 'HIO' AND AN 00125000
  130. * EXIT IS TAKEN TO DMKDSPCH. 00126000
  131. *. 00127000
  132. EJECT 00128000
  133. COPY OPTIONS @V200820 00129000
  134. COPY LOCAL OPTIONS @V200820 00130000
  135. EJECT 00131000
  136. DMKCNS START , @V200820 00132000
  137. SPACE 2 00133000
  138. USING PSA,R0 @V200820 00134000
  139. USING CONTASK,R6 @V200820 00135000
  140. USING RDEVBLOK,R8 @V200820 00136000
  141. USING IOBLOK,R10 @V200820 00137000
  142. USING VMBLOK,R11 @V200820 00138000
  143. SPACE 00139000
  144. ENTRY DMKCNSIC,DMKCNSIN,DMKCNSEN,DMKCNSED @V200820 00140000
  145. ENTRY DMKCNSTB TRANSLATE TABLE FOR 'TRT' USE @V200820 00141000
  146. SPACE 00142000
  147. EXTRN DMKBLDVM,DMKCFMBK,DMKCFMAT @V200820 00143000
  148. EXTRN DMKQCNTO,DMKERMSG,DMKSCNRD @V200820 00144000
  149. EXTRN DMKCPIEM,DMKQCNCL,DMKQCNET,DMKIOSQR @V200820 00145000
  150. EXTRN DMKCVTBH,DMKSCNRU,DMKTRMID,DMKIOERR,DMKMSWR @V200820 00146000
  151. SPACE 00147000
  152. EXTRN DMKTBLUP @V200820 00148000
  153. EXTRN DMKTBLPI,DMKTBLCI,DMKTBMNI,DMKTBMMI,DMKTBLTI @VM03172 00149000
  154. EXTRN DMKTBLPO,DMKTBLCO,DMKTBMNO,DMKTBMMO,DMKTBLTO @VM03172 00150000
  155. EXTRN DMKIOEST STATISTICAL COUNTER UPDATE @VA03757 00150100
  156. EXTRN DMKPTRAN @V407508 00150200
  157. EXTRN DMKSTKMP @VA08275 00150210
  158. EJECT 00151000
  159. USING DMKCNSIC,R12 @V200820 00152000
  160. DMKCNSIC DS 0D ENTRY TO INITIALIZE CONTASK CCW'S@V200820 00153000
  161. LM R12,R13,CNSBASE2 @VA05903 00154000
  162. USING DMKCNS,R12,R13 @V200820 00155000
  163. SWITCH CONTINUE PROCESSING ON MAIN PROC @V407508 00155100
  164. SPACE 00156000
  165. SLR R10,R10 CLEAR IOBLOK POINTER REGISTE@V200820 00157000
  166. CLI RDEVTYPE,TYPTTY CHECK FOR SUPPORTED DEVICE @V200820 00158000
  167. BH CNSDISA NOPE -- DISABLE THE LINE @V200820 00159000
  168. L R6,RDEVCON START OF CONTASK STACK @V200820 00160000
  169. LTR R6,R6 JUST TO MAKE SURE WE'RE O.K. @V200820 00161000
  170. BNP CNSEXIT NOTHING TO DO - GO AWAY @V200820 00162000
  171. TM CONSTAT,CONESCP HAVE THE CCW'S BEEN DONE ? @V200820 00163000
  172. BO INCFINS YES - JUST CHECK START-UP @V200820 00164000
  173. SPACE 00165000
  174. INCTASK EQU * INITIALIZE CONTASK CCW'S @V200820 00166000
  175. TM CONSTAT,CONCNTL CONTROL CONTASK ? @V200820 00167000
  176. BO INCFINS YES - NO SETUP TO BE DONE @V200820 00168000
  177. L R4,CONADDR START OF DATA BUFFER @VA01217 00169000
  178. LH R3,CONCNT DATA COUNT @VA01217 00170000
  179. CLI RDEVTYPE,TYP3210 1052, 3215, 3210, 2150 ? @V200820 00171000
  180. BE INC3210 YES - BUILD CCW STRING @V200820 00172000
  181. TM CONSTAT,CONOUTPT OUTPUT CONTASK ? @V200820 00173000
  182. BZ INCDEVT NO -- CHECK FOR DEVICE TYPE @V200820 00174000
  183. SLR R1,R1 @V200820 00175000
  184. IC R1,RDEVTMCD TERMINAL LINE CODE INDEX @V200820 00176000
  185. L R1,TRANSOUT(R1) TRANSLATE TABLE ADDRESS @VA01217 00177000
  186. TRANS 2,1,OPT=(BRING,DEFER,SYSTEM),AFFINITY GET TABLE @V407508 00178100
  187. LR R1,R2 TABLE ADDRESS NEEDED IN R1 @VM03172 00179000
  188. LA R15,TRNSLAT TRANSLATION SUBROUTINE @VA01217 00180000
  189. BALR R14,R15 TRANSLATE DATA TO LINE CODE @VA01217 00181000
  190. INCDEVT EQU * SEPARATE OUT VARIOUS DEVICE TYPES@V200820 00182000
  191. CLI RDEVTYPE,TYPTTY WORLD TRADE TELEGRAPH ? @V200820 00183000
  192. BE INCWTTY YES - @V200820 00184000
  193. CLI RDEVTYPE,TYP1050 1050-TYPE, PERHAPS ? @V200820 00185000
  194. BE INC1050 YES -- @V200820 00186000
  195. * B INC2741 NO --- MUST BE A 2741 00187000
  196. SPACE 2 00188000
  197. INC2741 EQU * SETUP CCW STRING FOR 2741 @V200820 00189000
  198. TM CONSTAT,CONOUTPT OUTPUT CONTASK ? @V200820 00190000
  199. BO INW4150 YES -- COMMON WITH 1050 CODE@V200820 00191000
  200. LA R2,1(0) LENGTH FOR ADDRESS CCW @V200820 00192000
  201. B INC4150 JOIN COMMON 1050 CODE @V200820 00193000
  202. CNSBASE2 DC A(DMKCNS,DMKCNS+4096) BASE ADDRESSABILITY @VA05903 00193200
  203. EJECT 00194000
  204. INC1050 EQU * SETUP CCW STRING FOR 1050 @V200820 00195000
  205. TM CONSTAT,CONOUTPT OUTPUT CONTASK ? @V200820 00196000
  206. BO INW1050 YES -- @V200820 00197000
  207. LA R2,L'ADRS4150 FULL DATA LEN FOR FIRST CCW @V200820 00198000
  208. INC4150 EQU * COMMON 2741, 1050 READ SETUP @V200820 00199000
  209. LA R3,2(0,R3) INCREASE COUNT FOR CR, CIRCLE C @V200820 00200000
  210. ST R4,CONCCW3 START ACTUAL CCW STRING BUILDING @V200820 00201000
  211. STH R3,CONCCW3+6 ... @V200820 00202000
  212. MVC CONCCW1(16),ADR4150 WRITE ADDRESS, PREPARE @V200820 00203000
  213. STH R2,CONCNT SET COUNT IN WRITE @V200820 00204000
  214. MVI CONCCW3,X'0A' NORMALLY AN INHIBIT READ @V200820 00205000
  215. MVI CONCCW3+4,CD+SILI FLAGS... @V200820 00206000
  216. TM VMRSTAT,VMLOGON ALL THE WAY LOGGED ON ? @V200820 00207000
  217. BZ INCREAD YES--LEAVE IT AS IS @VA02192 00208000
  218. TM VMOSTAT,VMSYSOP SYSTEM OPERATOR LOGON? @VA02192 00209000
  219. BO INCREAD YES--DONT ALLOW TIMEOUT @VA02192 00210000
  220. MVI CONCCW3,X'02' TIMEOUT UNTIL HE'S LOGGED ON @V200820 00211000
  221. INCREAD EQU * @VA02192 00212000
  222. MVC CONCCW4(8),REDSKIP READ, SKIP FOR EXCESS DATA @V200820 00213000
  223. TM CONPARM,INHIBIT SUPPRESS TYPEOUT OF READ ? @V200820 00214000
  224. BZ INCFINS NO -- ALL SET TO GO NOW @V200820 00215000
  225. OI CONSTAT,CONESCP REMEMBER THAT READ IS DONE @V200820 00216000
  226. OI CONPARM,PRIORITY FLAG IT FOR SEQUENCE @V200820 00217000
  227. CLI RDEVTYPE,TYP1050 IS THIS A 1050 TERMINAL ? @VM08830 00218000
  228. BE INHMASK YES - NO PRINT SUPPRESS @VM08830 00219000
  229. TM RDEVFLAG,RDEVPSUP PRINT SUPPRESS AVAILABLE ? @V200820 00220000
  230. BO INHREAD YES - BYPASS, READ, RESTORE @V200820 00221000
  231. INHMASK EQU * TYPE MASK FOR INHIBIT READ @VM08830 00222000
  232. LA R0,CONTSIZE+(STRMSKL+11)/8 SIZE OF CONTASK @V200820 00223000
  233. BAL R7,INCOUTK BUILD AND SETUP FAKE OUTPUT TASK @V200820 00224000
  234. MVC CONDATA(STRMSKL),STRMASK MOVE MASK TO TASK @V200820 00225000
  235. LA R1,STRMSKL LENGTH OF MASKING STRING @V200820 00226000
  236. STH R1,CONCNT ... @V200820 00227000
  237. B INCTASK INITIALIZE AND START MASK WRITE @V200820 00228000
  238. SPACE 00229000
  239. INHREAD EQU * READ WITH TYPEOUT SUPPRESSION @V200820 00230000
  240. MVC RDEVCON(4),CONPNT REMOVE READ FROM CHAIN @V200820 00231000
  241. LR R5,R6 ...BUT SAVE IT'S ADDRESS @V200820 00232000
  242. LA R0,CONTSIZE+1 SMALLER CONTASK NEEDED @V200820 00233000
  243. BAL R7,INCOUTK BUILD FAKE OUTPUT TASK @V200820 00234000
  244. MVI CONCNT+1,1 DATA COUNT = ONE @V200820 00235000
  245. MVI CONDATA,X'14' DATA = RESTORE CHARACTER @V200820 00236000
  246. ST R5,RDEVCON PUT THE READ BACK ON TOP @V200820 00237000
  247. ST R6,CONPNT-CONTASK(,R5) ... @V200820 00238000
  248. BAL R7,INCOUTK BUILD ANOTHER TASK AHEAD OF READ @V200820 00239000
  249. MVI CONCNT+1,1 DATA COUNT = ONE @V200820 00240000
  250. MVI CONDATA,X'24' DATA = BYPASS PRINTING @V200820 00241000
  251. B INCTASK INITIALIZE AND START THE WRITE @V200820 00242000
  252. EJECT 00243000
  253. INW1050 EQU * OUTPUT FOR 1050 @V200820 00244000
  254. LA R3,1(0,R3) ADD ONE FOR END OF BLOCK (EOB) @V200820 00245000
  255. INW4150 EQU * COMMON 2741, 1050 WRITE SETUP @V200820 00246000
  256. AH R4,CONCNT POINT TO END OF ORIGINAL DATA @V200820 00247000
  257. SLR R1,R1 NO IDLES THAT WE KNOW OF YET @V200820 00248000
  258. TM CONPARM,NOAUTO AUTOMATIC CARRIAGE RETURN ? @V200820 00249000
  259. BO INW4151 NO -- NO IDLES REQUIRED @V200820 00250000
  260. LA R1,24(0,R3) DATA COUNT + 1.5 + ROUNDUP @VA06176 00251100
  261. SR R0,R0 CLEAR FOR DIVIDE @V200820 00252000
  262. D R0,F10 COMPUTE NUMBER OF IDLES REQUIRED @V200820 00253000
  263. C R1,F15 NEVER NEED MORE THAN THIS @V200820 00254000
  264. BL *+8 LENGTH MAY BE MORE IF BACKSPACES @V200820 00255000
  265. LA R1,15(0) THIS IS A MAXIMUM @V200820 00256000
  266. LTR R1,R1 DO WE NEED ANY AT ALL ? @V200820 00257000
  267. BNP *+8 NO -- SKIP IT @V200820 00258000
  268. EX R1,SETIDLES MOVE IN A STRING OF IDLE CHARACTE@V200820 00259000
  269. MVI 0(R4),X'5B' INSERT THE CARRIAGE RETURN CHARAC@V200820 00260000
  270. LA R1,1(0,R1) ADD ONE TO INCLUDE THE 'CR' @V200820 00261000
  271. LA R4,0(R1,R4) POINT PAST LAST IDLE @V200820 00262000
  272. INW4151 EQU * NO IDLES REQUIRED @V200820 00263000
  273. LA R3,0(R1,R3) NEW TOTAL DATA COUNT @V200820 00264000
  274. LH R1,CONCNT PICK UP ORIGINAL COUNT @V200820 00265000
  275. STH R3,CONCNT SET IN DATA TRANSFER CCW COUNT @V200820 00266000
  276. MVI CONCOMND,X'01' SET WRITE CCW COMMAND CODE @V200820 00267000
  277. MVI CONFLAG,SILI SET 'SILI' BIT IN FLAGS @V200820 00268000
  278. LTR R1,R1 CHECK FOR ZERO-LENGTH WRITE @VM08730 00269000
  279. BNP BACKSLT YES - DON'T GET INTO A LOOP @VM08730 00270000
  280. LA R5,CONDATA(R1) POINT TO LAST ORIGINAL CHARACTER @V200820 00271000
  281. BCTR R5,0 ... @V200820 00272000
  282. BACKSLP EQU * ADJUST UPPER/LOWER CASE BLANKS @V200820 00273000
  283. CLI 0(R5),X'81' IS THIS AN UPPER-CASE BLANK ? @V200820 00274000
  284. BNE BACKSLB NO -- @V200820 00275000
  285. TM 1(R5),X'80' PRECEEDING AN UPPER-CASE CHAR ? @V200820 00276000
  286. BO BACKSLB YES - LEAVE IT ALONE @V200820 00277000
  287. MVI 0(R5),X'01' L-C BLANK BEFORE L-C CHAR. @V200820 00278000
  288. BACKSLB EQU * SCAN BACKWARD THROUGH THE DATA @V200820 00279000
  289. BCTR R5,0 @V200820 00280000
  290. BCT R1,BACKSLP OPTIMIZE UPPER/LOWER CASE SHIFTS @V200820 00281000
  291. BACKSLT EQU * @VM08730 00282000
  292. TM CONPARM,LOGHOLD IS THIS A 'LOG HOLD' SITUATION? @VA04576 00282100
  293. BNO CK1050 NO..IS IT A 1050 @VA04576 00282200
  294. MVI CONFLAG,CC+SILI ADD COMMAND CHAINING @VA04576 00282300
  295. MVC CONCCW2(8),SENDC CIRCLE C AND 13 DUMMY CHARS @VA04576 00282400
  296. CK1050 EQU * @VA04576 00282500
  297. CLI RDEVTYPE,TYP1050 IS THIS A 1050 TERMINAL ? @V200820 00283000
  298. BNE INCFINS NO -- ALL READY TO GO @V200820 00284000
  299. MVI 0(R4),X'3D' SET 'EOB' FOR 1050 WRITE @V200820 00285000
  300. MVC CONCCW2(8),ACKREAD READ ACKNOWLEDGEMENT @V200820 00286000
  301. MVI CONFLAG,CC+SILI ADD CHAINING TO FIRST CCW @V200820 00287000
  302. B INCFINS ALL DONE @V200820 00288000
  303. EJECT 00289000
  304. INCWTTY EQU * SETUP CCW STRING FOR TELETYPE @V200820 00290000
  305. TM CONSTAT,CONOUTPT OUTPUT CONTASK ? @V200820 00291000
  306. BO INWWTTY YES -- @V200820 00292000
  307. LA R3,1(0,R3) ADD ONE FOR RETURN OR XOFF @V200820 00293000
  308. LA R2,CONCCW1 NORMAL PLACE FOR PROMPT CCW @V200820 00294000
  309. TM CONPARM,INHIBIT SHOULD WE TYPE A MASK FIELD @V200820 00295000
  310. BZ INCRTTY NO -- @V200820 00296000
  311. MVC CONCCW1(8),TTYMASK TYPE MASKING CHAR SEQUENCE @V200820 00297000
  312. LA R2,CONCCW2 FIRST CCW MOVES DOWN ONE @V200820 00298000
  313. SPACE 00298500
  314. INCRTTY EQU * FINISH READ CCW STRING @V200820 00299000
  315. MVC 0(8,R2),TTYREAD SETUP, PROMTPING CCW @V200820 00300000
  316. ST R4,8(0,R2) SETUP DATA TRANSFER CCW @V200820 00301000
  317. MVI 12(R2),CD+SILI FLAGS... @V200820 00302000
  318. MVI 8(R2),X'0A' NORMALLY A READ INHIBIT @V200820 00303000
  319. TM VMRSTAT,VMLOGON LOGGED ON ALL THE WAY ? @V200820 00304000
  320. BZ *+8 YES - LEAVE AS IS @V200820 00305000
  321. MVI 8(R2),X'02' READ WITH TIMEOUT UNTIL LOGGED ON@V200820 00306000
  322. STH R3,14(0,R2) PUT DATA COUNT INTO THE CCW @V200820 00307000
  323. MVC 16(8,R2),REDSKIP READ, SKIP FOR EXCESS DATA @V200820 00308000
  324. B INCFINS ALL DONE @V200820 00309000
  325. SPACE 00310000
  326. INWWTTY EQU * OUTPUT FOR TELETYPE @V200820 00311000
  327. MVI CONCOMND,X'01' WRITE CCW COMMAND CODE @V200820 00312000
  328. MVI CONFLAG,SILI @V200820 00313000
  329. LA R4,CONDATA(R3) POINT TO LAST DATA CHARACTER + 1 @V200820 00314000
  330. MVC 0(2,R4),TTYENDS+2 ADD AT LEAST XOFF, RUBOUT @V200820 00315000
  331. LA R3,2(0,R3) ...AND INCREASE THE COUNT @V200820 00316000
  332. TM CONPARM,NOAUTO SUPPRESS AUTO CARRIAGE RETURN ? @V200820 00317000
  333. BO INWTTYN YES -- LET IT GO AS IS @V200820 00318000
  334. LA R3,2(0,R3) INCREASE COUNT FOR CR, LF @V200820 00319000
  335. MVC 0(4,R4),TTYENDS MOVE IN ENDING SEQUENCE @V200820 00320000
  336. SPACE 00320500
  337. INWTTYN EQU * @V200820 00321000
  338. STH R3,CONCNT RESET DATA COUNT IN FIRST CCW @V200820 00322000
  339. TM CONPARM,ALARM RING THE ALARM ? @V200820 00323000
  340. BZ INCFINS NO -- ALL SET @V200820 00324000
  341. LA R3,4(0,R3) ADD FOUR TO COUNT FOR ALARM @VM08816 00325000
  342. STH R3,CONCNT . . . @VM08816 00326000
  343. ICM R1,15,0(R4) PICK UP CURRENT ENDING SEQUENCE @VM08816 00327000
  344. MVC 0(4,R4),TTYRING RING THE BELL FOUR TIMES @VM08816 00328000
  345. STCM R1,15,4(R4) RESET THE ENDING CHARACTERS @VM08816 00329000
  346. B INCFINS NOW WE'RE ALL DONE @V200820 00330000
  347. EJECT 00331000
  348. INC3210 EQU * SETUP CCW STRING FOR 3210 @V200820 00332000
  349. MVI CONFLAG,CC+SILI SETUP CCW FLAG BYTE @V200820 00333000
  350. MVC CONCCW2(8),NOPCCW MOVE IN NO-OP CCW AT END @V200820 00334000
  351. LTR R3,R3 CHECK CCW DATA COUNT @VM08730 00335000
  352. BP *+8 O.K. AS IS @VM08730 00336000
  353. MVI CONCNT+1,X'01' MINIMUM COUNT IS ONE @VM08730 00337000
  354. TM CONSTAT,CONOUTPT OUTPUT CONTASK ? @V200820 00338000
  355. BO INW3210 YES -- @V200820 00339000
  356. MVI CONCOMND,X'0A' 3210 READ CCW COMMAND CODE @V200820 00340000
  357. TM CONPARM,INHIBIT INHIBIT TYPEOUT OF DATA ? @V200820 00341000
  358. BZ INCFINS NO -- THEN WE'RE ALL DONE @V200820 00342000
  359. MVC CONCCW2(8),CONCCW1 MOVE DOWN THE READ CCW @V200820 00343000
  360. MVC CONCCW1(8),MSK3210 MOVE IN 3210 MASK CCW @V200820 00344000
  361. MVC CONCCW3(8),NOPCCW PUT BACK THE NO-OP @V200820 00345000
  362. B INCFINS ALL FINISHED @V200820 00346000
  363. SPACE 00347000
  364. INW3210 EQU * OUTPUT FOR 3210, ETC. @V200820 00348000
  365. MVI CONCOMND,X'09' ASSUME AUTO CARRIAGE RETURN @V200820 00349000
  366. TM CONPARM,NOAUTO+ALARM ANYTHING ELSE TO FIX UP@V200820 00350000
  367. BZ INCFINS NO -- @V200820 00351000
  368. TM CONPARM,NOAUTO AUTO CARRIAGE RETURN ? @V200820 00352000
  369. BZ *+8 YES -- LEAVE FIRST CCW AS IS@V200820 00353000
  370. MVI CONCOMND,X'01' NO --- WRITE WITHOUT C.R. @V200820 00354000
  371. TM CONPARM,ALARM SOUND THE AUDIBLE ALARM ? @V200820 00355000
  372. BZ INCFINS NO - LEAVE SECOND CCW AS IS @V200820 00356000
  373. MVI CONCCW2,X'0B' YES -- CHANGE NO-OP TO ALARM@V200820 00357000
  374. B INCFINS @V200820 00358000
  375. SPACE 00359000
  376. INCOUTK EQU * BUILD A FAKE OUTPUT TASK @V200820 00360000
  377. BAL R9,CNSGTSZ ALLOCATE THE CONTASK @V200820 00361000
  378. MVI CONSTAT,CONOUTPT THIS A REALLY OUTPUT @V200820 00362000
  379. MVI CONPARM,NOAUTO+PRIORITY NO CR, PRESERVE ORDER @V200820 00363000
  380. LA R1,CONDATA DATA ADDRESS @V200820 00364000
  381. ST R1,CONADDR ... @V200820 00365000
  382. BR R7 RETURN @V200820 00366000
  383. EJECT 00367000
  384. INCFINS EQU * START UP TERMINAL I/O IF NOT ACTIVE @V200820 00368000
  385. OI CONSTAT,CONESCP CONTASK READY FOR START I/O @V200820 00369000
  386. TM RDEVFLAG,RDEVACTV IS THERE AN ACTIVE CONTASK ?@V200820 00370000
  387. BZ INTPREP NO -- CHECK FOR PREPARE CCW @V200820 00371000
  388. TM CONSTAT,CONCNTL+CONOUTPT OUTPUT CONTASK ACTIVE ?@V200820 00372000
  389. BNZ CNSEXIT YES -- JUST WAIT FOR IT@V200820 00373000
  390. TM CONSTAT,CONACTV IS THE TASK STILL ACTIVE ? @V200820 00374000
  391. BZ CNSEXIT NO -- DON'T HALT IT TWICE @V200820 00375000
  392. L R1,CONPNT CHECK THE NEXT CONTASK IN LINE @V200820 00376000
  393. LTR R1,R1 ...THERE NORMALLY WILL BE ONE @V200820 00377000
  394. BNP CNSEXIT STRANGE - BUT JUST GOTO DMKDSPCH @V200820 00378000
  395. TM CONPARM-CONTASK(R1),PRIORITY PRIORITY TASK ? @V200820 00379000
  396. BZ CNSEXIT NO -- JUST EXIT @V200820 00380000
  397. NI CONSTAT,255-CONACTV REMEMBER THE HALT I/O @V200820 00381000
  398. L R1,RDEVAIOB ACTIVE IOB @VA13198 00382200
  399. LTR R1,R1 HAVE ONE ? @VA13198 00382400
  400. BZ CNSEXIT NO, INTERRUPT DUE @VA13198 00382600
  401. B INTHALT1 @VA13198 00382800
  402. SPACE 00383000
  403. INTPREP EQU * HALT A PREPARE IF ONE IS ACTIVE @V200820 00384000
  404. TM RDEVTFLG,RDEVCTL CONTROL OPERATION ACTIVE ? @V200820 00385000
  405. BZ CNSTART NO -- JUST START THE DEVICE @V200820 00386000
  406. TM RDEVFLAG,RDEVPREP IS IT A PREPARE CCW ? @V200820 00387000
  407. BZ CNSEXIT NO -- WAIT FOR IT TO FINISH @V200820 00388000
  408. INTHALT EQU * HALT ANY OUTSTANDING I/O @V200820 00389000
  409. LTR R10,R10 ENTRY WITHOUT IOBLOK @VA09229 00389010
  410. BZ INTHALT1 YES, JUST HALT DEVICE @VA09229 00389020
  411. TM RDEVSTA2,RDEVSYNC OUTSTANDING ATTENTION ?? @VA08275 00389050
  412. BNO INTHALT1 NO HANDLE HALT @VA08275 00389100
  413. NI RDEVSTA2,X'FF'-RDEVSYNC RESET ATTENTION @VA08275 00389150
  414. BAL R2,RESATTN THROW ATTN INTERRUPT AWAY @VA11726 00389210
  415. INTHALT1 DS 0H @VA08275 00389750
  416. CALL DMKSCNRD GET THE 'CCU' ADDRESS @V200820 00390000
  417. LA R2,256 LOAD REG 2 FOR COUNTER @VA09490 00390010
  418. INTDHIO EQU * @V200820 00391000
  419. HDV 0(R1) .......SCREEEECCCCHHHH....... @VA06378 00393000
  420. AIF (NOT &TRACE(9)).NTR1 **AIF** 00395000
  421. BAL R15,CNTRACE TRACE HALT I/O @V200820 00396000
  422. DC X'0F00' TRACE ENTRY FLAG @V200820 00397000
  423. .NTR1 ANOP 00398000
  424. BC 8,CNSEXIT CC = 0 INTRPT ALREADY PENDING @VM08581 00400000
  425. BC 2,INTDHIO CC = 2 RETRY THE HALT I/O @V200820 00401000
  426. BC 1,CNSICC3 CC = 3 PUNT @V200820 00402000
  427. TM CSW+4,SM+BUSY SHORT CONTROL UNIT BUSY ? @V200820 00403000
  428. BNO INTDHALT NO GO OUT TO RESET @VA09490 00404000
  429. BCT R2,INTDHIO YES RETRY UP TO 256 TIMES @VA09490 00404100
  430. INTDHALT OI RDEVFLAG,RDEVHIO I/O WAS ACTUALLY HALTED @VA09490 00405000
  431. B CNSEXIT WAIT FOR SOMETHING TO HAPPEN @V200820 00406000
  432. EJECT 00407000
  433. *. 00408000
  434. * ENTRY POINT - 00409000
  435. * 00410000
  436. * DMKCNSIN - MAIN INTERRUPT RETURN ADDRESS FOR TERMINAL I/O 00411000
  437. * 00412000
  438. * ATTRIBUTES - 00413000
  439. * 00414000
  440. * RE-ENTRANT, RESIDENT, ENETERED VIA IOBLOK UNSTACK 00415000
  441. * 00416000
  442. * ENTRY CONDITIONS - 00417000
  443. * 00418000
  444. * GPR 10 = ADDRESS OF THE UNSTACKED IOBLOK 00419000
  445. * GPR 11 = VMBLOK ADDRESS FROM IOBUSER OR RDEVUSER 00420000
  446. * GPR 12 = ADDRESS OF DMKCNSIN 00421000
  447. * 00422000
  448. * EXIT CONDITIONS - 00423000
  449. * 00424000
  450. * EXIT IS MADE VIA GOTO DMKDSPCH 00425000
  451. * 00426000
  452. * OPERATION - EXECUTION MUST BE ON THE I/O PROCESSOR IN AP-MODE 00427100
  453. * 00428000
  454. * FOR 3210, 3215, 1052, ETC. SYSTEM CONSOLES: 00429000
  455. * IF THE 'RDEVENAB' FLAG IS NOT SET, THE INTERRUPT IS 00430000
  456. * IGNORED. IF A CC = 3 IS RECEIVED (CONSOLE NOT OPERATIONAL), 00431000
  457. * THE MESSAGE 'DMKCNS454I LINE XXX CC=3 NOT OPERATIONAL' IS 00432000
  458. * SENT TO THE SYSTEM OPERATOR, AND AN EXIT IS TAKEN. 00433000
  459. * FOR DEVICE ERRORS (UNIT CHECK) OTHER THAN 'INTREQ', THE 00434000
  460. * TASK IS RETRIED 16 TIMES, THEN CONSIDERED PERMANENT. 00435000
  461. * FOR INTERVENTION REQUIRED, AN ATTEMPT IS MADE TO SOUND 00436000
  462. * THE CONSOLE ALARM, THE RDEVBLOK IS MARKED NOT READY, AND 00437000
  463. * AN EXIT IS TAKEN TO WAIT FOR THE DEVICE END INTERRUPT. 00438000
  464. * 00439000
  465. * OUTPUT TASK - TEST VIA 'TIO' FOR A PENDING ATTENTION, 00440000
  466. * SET RETURN CODE APPROPRIATELY, RETURN TASK TO DMKQCNET. 00441000
  467. * INPUT TASK - CALCULATE AMOUNT OF DATA ENTERED, TEST VIA 00442000
  468. * 'TIO' FOR PENDING ATTENTION, SET RETURN CODE AND CALL 00443000
  469. * DMKCNSED TO PERFORM INPUT EDITING AND TRANSLATION IF IT 00444000
  470. * WAS REQUESTED. RETURN THE TASK TO DMKQCNET. 00445000
  471. * IF THE 'CANCEL' KEY IS HIT ON A READ (UNIT EXCEPTION), 00446000
  472. * CHECK FOR CONCURRENT DEVICE END. IF YES, RETRY THE READ 00447000
  473. * IMMEDIATELY. IF NO, MARK THE DEVICE TEMPORARILY NOT READY 00448000
  474. * AND WAIT FOR THE DEVICE END TO RETRY THE READ. 00449000
  475. * 00450000
  476. * FOR 1050, 2741 CPT-TWX TERMINALS: 00451000
  477. * IF THERE IS NO ACTIVE CONTASK, CHECK FOR COMPLETION 00452000
  478. * OF THE ENABLE SEQUENCE. IF YES, TRY TO IDENTIFY THE DEVICE 00453000
  479. * (1050, 2741 ONLY) BY BUILDING A CONTROL CONTASK TO WRITE 00454000
  480. * CIRCLE-C, PADS, (SHOULD PROVOKE 1050 RESPONSE), FOLLOWED 00455000
  481. * BY A READ. IF THE RESPONSE IS CIRCLE-C OR CIRCLE-D, THE 00456000
  482. * TERMINAL IS A 2741. IF THE RESPONSE IS CIRCLE-Y, IT IS A 00457000
  483. * 1050. WRITE THE VM/370 ONLINE MESSAGE AND START A PREPARE 00458000
  484. * TO LISTEN FOR AN ATTENTION. 00459000
  485. * 00460000
  486. * IF THERE WAS AN ACTIVE PREPARE, CHECK FOR 'RDEVHIO', 00461000
  487. * SHOWING THAT THERE IS A MESSAGE TO WRITE. IF YES, RESTART 00462000
  488. * WITH THE TOP CONTASK ON THE RDEVBLOK STACK. IF NO, CHECK 00463000
  489. * FOR A UNIT CHECK ON THE PREPARE. IF 16 RETRIES DO NOT 00464000
  490. * CLEAR THE ERROR, ASSUME TERMINAL POWER-OFF AND DISCONNECT 00465000
  491. * THE USER VIA A CALL TO DMKQCNTO. IF THE PREPARE COMPLETED 00466000
  492. * NORMALLY, ASSUME UNSOLICITED ATTENTION AND PROCESS THAT. 00467000
  493. * 00468000
  494. * ACTIVE CONTASK - IF IT WAS A WRITE CONTASK, DO NORMAL ERROR 00469000
  495. * RECOVERY, RETURN THE TASK TO DMKQCNET. IF IT WAS A READ, 00470000
  496. * CALCULATE THE NUMBER OF CHARACTERS ENTERED, CHECK FOR THE 00471000
  497. * CORRECT ENDING CONTROL SEQUENCE. IF THE ENDING SEQUENCE 00472000
  498. * IS NOT CORRECT, AND IT INDICATES A DATA CHECK, SEND THE 00473000
  499. * MSG 'READ ERROR' AND RETRY THE READ CONTASK. IF A DATA 00474000
  500. * CHECK IS NOT INDICATED, ENTER ATTENTION HANDLING FOR A READ. 00475000
  501. * IF EDITING OR TRANSLATION WAS RQUESTED, CALL DMKCNSED TO 00476000
  502. * PERFORM THE SERVICES. IF EDITING REDUCES THE INPUT COUNT 00477000
  503. * TO ZERO, RETRY THE READ. RETURN THE CONTASK TO DMKQCNET. 00478000
  504. * 00479000
  505. * ATTENTION HANDLING - 00480000
  506. * IF 'TERM ATTN ON' IS SET ('RDEVATOF' NOT SET), THE 00481000
  507. * SEQUENCE 'RESTORE, EXCLAMATION, IDLES, CR, IDLES' IS SENT 00482000
  508. * TO THE TERMINAL (NO RESTORE FOR CPT-TWX). IF ANOTHER ATTN 00483000
  509. * IS HIT, THE ATTENTION COUNT 'RDEVATNC' IS SET TO TWO. IF 00484000
  510. * 16 RETIRES OF THE ATTENTION TASK DO NOT CLEAR THE STATUS, 00485000
  511. * A TERMINAL POWER-OFF IS ASSUMED AND THE USER IS DISCON- 00486000
  512. * NECTED VIA A CALL TO DMKQCNTO. OTHERWISE, THE RETURN 00487000
  513. * CODE IS SET APPROPRIATELY AND THE PREVIOUSLY-ACTIVE CONTASK 00488000
  514. * IS RETURNED TO DMKQCNET. 00489000
  515. * 00490000
  516. * WHENEVER THERE IS NO PENDING REQUEST FOR THE TERMINAL, A 00491000
  517. * PREPARE COMMAND IS ISSUED DIRECTLY (VIA START I/O) TO 00492000
  518. * LISTEN FOR AN UNSOLICITED ATTENTION. 00493000
  519. *. 00494000
  520. EJECT 00495000
  521. DROP R13 @V200820 00496000
  522. USING DMKCNSIN,R12 @V200820 00497000
  523. DMKCNSIN DS 0D MAIN INTERRUPT RETURN POINT @V200820 00498000
  524. LM R12,R13,CNSBASE ESTABLISH ADDRESSABILITY @V200820 00499000
  525. USING DMKCNS,R12,R13 @V200820 00500000
  526. SPACE 2 00501000
  527. LH R1,IOBRADD ADDRESS OF REAL DEVICE @V200820 00502000
  528. CALL DMKSCNRU LOCATE RDEVBLOK, ETC. @V200820 00503000
  529. CLI RDEVTYPE,TYPTTY IS THIS A SUPPORTED TERMINAL@V200820 00505000
  530. BH CNIGNOR NO -- IGNORE THE INTERRUPT @V200820 00506000
  531. TM IOBFLAG,IOBRES HAS THIS IOBLOK BEEN RESET ? @VM08809 00507000
  532. BO CNIGNOR YES - EXIT GRACEFULLY @VM08809 00508000
  533. SWITCH CONTINUE PROCESSING ON MAIN PROC @V407508 00508100
  534. TM IOBSTAT,IOBCC3 ENTRY VIA INTERRUPT ? @V200820 00510000
  535. BO CNSICC3 NO -- CC = 3 NOT OPERATIONAL @V200820 00511000
  536. TM IOBCSW+5,PRGC+PRTC+CHC+CCC+IFCC FATAL? @VA13158 00512100
  537. BNZ CNSICC3 YES, MSG OPERATOR - VARIED @VA13158 00512200
  538. * OFFLINE, DISABLED 00512300
  539. TM IOBCSW+5,CDC CHANNEL DATA CHECK ? @V200820 00515000
  540. BO CNSRTRY YES - RETRY 16 TIMES @V200820 00516000
  541. SPACE 00517000
  542. CNSNINT EQU * DETERMINE WHAT THE DEVICE TYPE IS@V200820 00518000
  543. SLR R0,R0 CONVENIENT CONSTANT @V200820 00519000
  544. CLI RDEVTYPE,TYP3210 IS THIS AN EBCDIC TERMINAL ?@V200820 00520000
  545. BNE CNSTERM NO -- GO HANDLE S/S TERMINAL@V200820 00521000
  546. TM RDEVFLAG,RDEVENAB IS THIS CONSOLE ENABLED ? @V200820 00523000
  547. BZ CNIGNOR NO -- IGNORE THE INTERRUPT @V200820 00524000
  548. TM IOBCSW+4,UC WAS THERE A UNIT CHECK ? @V200820 00525000
  549. BZ EBCNOUC NO -- GO CHECK FOR NOT READY @V200820 00526000
  550. TM IOBSPEC,IOBUNSL IS IT UNSOL. INTERRUPT? @VA04091 00527000
  551. BO CNIGNOR IGNORE THE INTERRUPT @VA04091 00528000
  552. L R1,IOBIOER POINTER TO THE IOERBLOK @V200820 00529000
  553. USING IOERBLOK,R1 @V200820 00530000
  554. TM IOERDATA,INTREQ INTERVENTION REQUIRED ? @V200820 00531000
  555. BZ CNSRTRY NO -- RETRY 16 TIMES @V200820 00532000
  556. DROP R1 @V200820 00533000
  557. BAL R2,SDRSTAT @VA03757 00533100
  558. OI RDEVSTAT,RDEVNRDY SET THE NOT READY FLAG BIT @V200820 00534000
  559. LA R5,ALARMCCW X'0B' = SOUND THE ALARM @V200820 00535000
  560. BAL R2,CNSTRIO ATTEMPT TO RING THE CONSOLE ALARM@V200820 00536000
  561. B CNIGNOR WAIT FOR 'DE' INTERRUPT @V200820 00537000
  562. EJECT 00538000
  563. EBCNOUC EQU * NOT A UNIT CHECK @V200820 00539000
  564. STH R0,RDEVRCNT CLEAR THE RETRY COUNT TO ZERO @V200820 00540000
  565. L R6,RDEVCON ADDRESS OF CONTASK, IF ANY @V200820 00541000
  566. TM RDEVSTAT,RDEVNRDY WAS THE CONSOLE NOT READY ? @V200820 00542000
  567. BO CNRSTRT YES - MAKE READY AND RESTART@V200820 00543000
  568. LA R2,4(0,0) SIGNAL FOR A SINGLE ATTENTION @V200820 00544000
  569. CLI IOBCSW+4,ATTN UNSOLICITED ATTENTION ? @VM08635 00545000
  570. BE CNSATTN YES - CHECK TERMINAL MODE @VM08635 00546000
  571. TM RDEVFLAG,RDEVACTV WAS THERE AN ACTIVE CONTASK @V200820 00547000
  572. BZ CNIGNOR NO -- IGNORE INTERRUPT @VM08635 00548000
  573. CLI IOBCSW+4,ATTN+BUSY STATUS CLEARED BY 'SIO' ? @VM08635 00549000
  574. BE CNRSTRT YES - JUST RETRY THE SAME TASK @VM08635 00550000
  575. TM IOBCSW+4,UE WAS THE 'CANCEL' KEY HIT ? @V200820 00551000
  576. BZ EBCNOUE NO -- @V200820 00552000
  577. TM IOBCSW+4,DE DID THE DEVICE END ALSO COME IN ?@V200820 00553000
  578. BO CNRSTRT YES - RESTART THE I/O IMMEDIATELY@V200820 00554000
  579. OI RDEVSTAT,RDEVNRDY LET THE 'DE' WAKE US UP @V200820 00555000
  580. B CNIGNOR ...TO RESTART THE CANCELLED I/O @V200820 00556000
  581. SPACE 00557000
  582. EBCNOUE EQU * @V200820 00558000
  583. CL R10,IOBLINK IS THIS THE FINAL INTERRUPT? @VA01962 00559000
  584. BNE CNIGNOR NO, EXIT & WAIT FOR FINAL INT @VA01962 00560000
  585. TM RDEVFLAG,RDEVHIO INTERRUPT DUE TO HALT I/O ? @V200820 00561000
  586. BO CNSTART YES - START AT THE TOP @V200820 00562000
  587. * CHECK FOR PENDING 'ATTN' (DOUBLE HIT ON THE 'REQUEST' KEY) 00563000
  588. SLR R2,R2 ATTENTION INDICATOR REGISTER @V200820 00564000
  589. STH R2,CSW+4 CLEAR REAL CSW STATUS AREA @V200820 00565000
  590. LH R1,IOBRADD REAL ADDRESS OF DEVICE @V200820 00566000
  591. TIO 0(R1) CLEAR PENDING STATUS, IF ANY @V200820 00567000
  592. BC 8,EBCOMPT CC = 0 -- NOTHING PENDING @V200820 00568000
  593. BC 1,CNSICC3 CC = 3 -- STRANGE.... @V200820 00569000
  594. TM CSW+4,ATTN WAS THERE AN ATTENTION PENDING ? @V200820 00570000
  595. BZ EBCOMPT NO -- COMPLETE NORMALLY @V200820 00571000
  596. LA R2,4(0,0) CODE FOR SINGLE ATTENTION @V200820 00572000
  597. TM VMMLEVEL,VMMCPENV SINGLE ATTENTION TO CP ? @V200820 00573000
  598. BZ EBCOMPT NO -- LEAVE IT FOR VIRT MACH@V200820 00574000
  599. LA R2,8(0,0) CODE FOR MULTIPLE ATTENTIONS @V200820 00575000
  600. EBCOMPT EQU * 3210-STYLE CONTASK HAS COMPLETED @V200820 00576000
  601. NI CONSTAT,255-CONACTV NO LONGER ACTIVE @V200820 00577000
  602. TM CONSTAT,CONOUTPT+CONCNTL INPUT CONTASK ? @V200820 00578000
  603. BNZ RETTASK NO -- RETURN IT @V200820 00579000
  604. * CALCULATE INPUT DATA LENGTH, DO LINE EDITING, TRANSLATION 00580000
  605. L R7,CONRETN POINTER TO CALLER'S SAVEAREA @V200820 00581000
  606. L R3,SAVER1-SAVEAREA(,R7) BUFFER ADDRESS @V200820 00582000
  607. LA R4,1(0,0) @V200820 00583000
  608. L R5,SAVER0-SAVEAREA(,R7) ORIGINAL INPUT COUNT @V200820 00584000
  609. LA R5,0(R5,R3) POINT TO END OF ORIGINAL BUFFER @V200820 00585000
  610. BCTR R5,0 ...ALMOST @V200820 00586000
  611. EBCSCAN EQU * SCAN FOR X'00' AT END OF BUFFER @V200820 00587000
  612. CLI 0(R3),X'00' END OF ACTUAL DATA ? @V200820 00588000
  613. BE EBCSCND YES - CALCULATE LENGTH READ @V200820 00589000
  614. BXLE R3,R4,EBCSCAN NO -- CONTINUE SEARCH @V200820 00590000
  615. EBCSCND EQU * @V200820 00591000
  616. S R3,SAVER1-SAVEAREA(,R7) GR3 = INPUT DATA LENGTH@V200820 00592000
  617. B RETEDIT GO CHECK FOR EDITING OR TRANSLATION @V200820 00593000
  618. EJECT 00594000
  619. *********************************************************************** 00594080
  620. * DETERMINE NATURE OF INTERRUPT, EITHER SOLICITED, UNSOLICITED, * 00594160
  621. * OR A RETURN FROM AN INTERNAL SIO (CNSTRIO). * 00594240
  622. * IF PATH WAS THROUGH CNSTRIO-->CNSNINT THE IOB IS FROM THE * 00594320
  623. * ORIGINAL INTERRUPT EXCEPT FOR THE IOBCSW WHICH WAS SET BY * 00594400
  624. * CNSTRIO FROM CSW. * 00594480
  625. * RDEVTFLG=RDEVCTL INDICATES INTERRUPT IS FROM SIO AT CNSTRIO * 00594560
  626. * RDEVTFLG=RDEVREST INDICATES PATH HAS BEEN THRU CNBKPRP. * 00594640
  627. * RDEVTFLG=RDEVPREP INDICATES PATH HAS BEEN THRU CNSIDLE OR * 00594720
  628. * CNSRTRP * 00594800
  629. *********************************************************************** 00594880
  630. CNSTERM EQU * INTERRUPT ANALYSIS FOR START/STOP@V200820 00595000
  631. CLC IOBCSW+4(2),ZEROES IS THIS A VALID CSW?? @VA10282 00595100
  632. BE CNIGNOR1 NO, THEN FORGET INTERRUPT @VA10282 00595200
  633. TM IOBSPEC,IOBUNSL DID WE ASK FOR THIS? @VA10282 00595300
  634. BNO CNSTERM1 YES, PROCESS IT @VA10282 00595400
  635. TM RDEVSTAT,RDEVBUSY+RDEVSCED SOMEONE WORKING? @VA10282 00595500
  636. BNZ CNIGNOR YES, IGNORE THIS INTERRUPT @VA13327 00595650
  637. CNSTERM1 DS 0H HERE TO PROCESS INTERRUPT @VA10282 00595700
  638. TM RDEVTFLG,RDEVCTL CONTROL FUNCTION ACTIVE ? @V200820 00596000
  639. BZ CNSTASK NO -- SHOULD BE A CONTASK @V200820 00597000
  640. NI RDEVTFLG,255-RDEVCTL CONTROL OPERATION COMPL@V200820 00598000
  641. TM RDEVFLAG,RDEVPREP WAS A PREPARE CCW ACTIVE ? @V200820 00599000
  642. BO CNSTPRP YES - CHECK THE RESULTS @V200820 00600000
  643. TM RDEVTFLG,RDEVREST ATTENTION RESET ACTIVE ? @VA01394 00601000
  644. BO CNSAPRP YES - CHECK INTRPT STATUS @VA01394 00602000
  645. * MUST HAVE BEEN THE ENABLE SEQUENCE 00604000
  646. TM RDEVFLAG,RDEVDISB+RDEVHIO 'DISABLE' COMMAND @V200820 00605000
  647. BNZ CNSNOFF YES - SIGN OFF @V200820 00606000
  648. TM IOBCSW+4,UC UNIT CHECK DURING THE ENABLE ? @V200820 00608000
  649. BZ CNSENUC NO -- IDENTIFY TERMINAL TYPE @V200820 00609000
  650. L R1,IOBIOER GET ADDR OF IOERBLOK @VA07645 00610100
  651. LTR R1,R1 IS THERE ONE ? @VA07645 00610200
  652. BZ NOCMDREJ NO, KEEP TESTING @VA07645 00610300
  653. USING IOERBLOK,R1 DECLARE BASE @VA07645 00610400
  654. TM IOERDATA,CMDREJ WAS IT COMMAND REJ ? @VA07645 00610500
  655. BO CNSRECS1 GO LOG AND DISABLE LINE @VA07645 00610600
  656. DROP R1 @VA07645 00610700
  657. SPACE 00610750
  658. NOCMDREJ L R1,IOBCSW CCW ADDR IN CSW @VA07645 00610800
  659. S R1,F8 BACK UP TO CCW (KEY IS ZERO) @V200820 00611000
  660. BP *+8 ADDRESS IS O.K. @V200820 00612000
  661. L R1,IOBCAW CHECK THE FIRST CCW @V200820 00613000
  662. CLI 0(R1),X'27' UNIT CHECK ON THE ENABLE CMD ? @V200820 00614000
  663. BE CNSRTRY YES - RETRY SIXTEEN TIMES @V200820 00615000
  664. B CNSNOFF NO -- JUST GIVE UP ON IT @V200820 00616000
  665. EJECT 00616090
  666. *********************************************************************** 00616180
  667. * THE 'ENABLE' COMMAND HAS COMPLETED, NOW WE MUST IDENTIFY THE * 00616270
  668. * DEVICE TYPE. IF RDEVTYPE=TYPTTY, THE IDENTIFICATION IS ALREADY * 00616360
  669. * CERTAIN, AND WE CAN GO DIRECTLY TO CNSIDTY AND SET UP THE TRANSLATE* 00616450
  670. * TABLE INDEX. OTHERWISE, WE MUST WRITE A CIRCLE-C AND LOOK AT THE * 00616540
  671. * RESPONSE TO DETERMINE IF THE DEVICE IS A 2741 OR A 1050. * 00616630
  672. * A 2741 WILL RESPOND WITH A CIRCLE-C OR CIRCLE-D. * 00616720
  673. * A 1050 WILL RESPOND WITH A CIRCLE-Y. * 00616810
  674. *********************************************************************** 00616900
  675. CNSENUC EQU * ENABLE HAS COMPLETED @V200820 00617000
  676. STH R0,RDEVRCNT RESET THE DEVICE RETRY COUNT @V200820 00618000
  677. NI RDEVSTA2,X'FF'-RETRYSW TURN OFF RETRY SWITCH @VA07215 00618500
  678. BAL R9,CNSGTSK BUILD A CONTROL CONTASK @VM08538 00619000
  679. CLI RDEVTYPE,TYPTTY TELEGRAPH TERMINAL ADAPTER ?@V200820 00620000
  680. BE CNSIDTY YES - ALREADY IDENTIFIED @V200820 00621000
  681. SPACE 00621500
  682. CNSITSK EQU * BUILD IDENTIFY SEQUENCE CONTASK @V200820 00622000
  683. MVI CONPARM,RDEVIDNT THIS IS AN IDENTIFY TASK @V200820 00623000
  684. MVC CONCCW1(16),INITRD START BUILDING THE CCW'S @V200820 00624000
  685. LA R1,CONCCW4 DATA ADDRESS FOR READ RESPONSE @V200820 00625000
  686. ICM R1,8,F2+3 COMMAND CODE = X'02' READ @V200820 00626000
  687. ST R1,CONCCW3 ... @V200820 00627000
  688. L R1,PREPCCW+4 FLAGS = SILI, COUNT = 1 @V200820 00628000
  689. ST R1,CONCCW3+4 ... @V200820 00629000
  690. B CNSTART START THE IDENTIFY SEQUENCE @V200820 00630000
  691. EJECT 00631000
  692. *********************************************************************** 00631100
  693. * THE INTERRUPT RESULTED FROM AN INTERNAL SIO OF A PREPARE CCW. * 00631200
  694. * IF A UNIT CHECK, GO RETRY THE PREPARE (CNSRTRP) * 00631300
  695. * OTHERWISE, TYPE AN EXCLAMATION MARK THEN GOTO ATTENTION HANDLING * 00631400
  696. *********************************************************************** 00631500
  697. CNSTPRP EQU * PREPARE CCW WAS ACTIVE @V200820 00632000
  698. NI RDEVFLAG,255-RDEVPREP PREPARE IS COMPLETE @VM08581 00633000
  699. TM RDEVFLAG,RDEVHIO INTERRUPT DUE TO HALT I/O ? @V200820 00634000
  700. BO CNSHPRP YES - CHECK NEW STATUS @VA01394 00635000
  701. TM IOBCSW+4,UC UNIT CHECK ON THE PREPARE ? @V200820 00636000
  702. BO CNSRTRP YES - RETRY PREPARE @VM08581 00637000
  703. SLR R6,R6 NO CONTASK AT THE MOMENT @V200820 00638000
  704. STH R6,RDEVRCNT CLEAR DEVICE RETRY COUNT @V200820 00639000
  705. BAL R7,CNSEXCL TYPE THE EXCLAMATION MARK @V200820 00640000
  706. SPACE 00641000
  707. *********************************************************************** 00641200
  708. * THE PREPARE WAS HALTED BY HIO. * 00641400
  709. * IF ACTIVE USER, GO START THE FIRST CONTASK ON THE RDEVCON STACK. * 00641600
  710. * IF HALTED BECAUSE OF THE DISABLE COMMAND, GO DROP THE LINE. * 00641800
  711. * OTHERWISE, GO START THE FIRST CONTASK ON THE RDEVCON STACK. * 00642000
  712. *********************************************************************** 00642200
  713. CNSHPRP EQU * PREPARE HAS BEEN HALTED @VA01394 00643000
  714. CL R11,ASYSVM IS THERE AN ACTIVE USER ? @VA01394 00644000
  715. BNE CNSTART YES - START NEW CONTASK @VA01394 00645000
  716. TM RDEVFLAG,RDEVDISB HALTED DUE TO DISABLE CMD ? @VA01394 00646000
  717. BO CNSNOFF YES - DROP THE LINE @VA01394 00647000
  718. SPACE 00648000
  719. *********************************************************************** 00648200
  720. * THIS PREPARE WAS STARTED BECAUSE OF AN INTERVENTION REQUIRED 'ATTN'* 00648400
  721. * IF UNIT CHECK, RETRY THE PREPARE. * 00648600
  722. * GET THE CONTASK THAT WAS "BROKEN" AND GOTO (CNSCATN) TO SEND AN * 00648800
  723. * EXCLAMATION MARK THEN COMPLETE THE INTERRUPTED CONTASK. * 00649000
  724. *********************************************************************** 00649200
  725. CNSAPRP EQU * PREPARE FOR ATTENTION RESET @VA01394 00650000
  726. NI RDEVFLAG,255-RDEVHIO IGNORE HALT I/O FLAG @VA01394 00651000
  727. TM IOBCSW+4,UC UNIT CHECK ON THE PREPARE ? @VA01394 00652000
  728. BO CNSRTRY1 YES - RETRY @VA12126 00653000
  729. NI RDEVTFLG,255-RDEVREST RESET IS COMPLETE @VA01394 00654000
  730. L R6,RDEVCON TOP CONTASK WAS INTERRUPTED @VA01394 00655000
  731. LH R3,CONCNT RESTORE LENGTH OF ATTN INPUT LINE@VA01882 00656000
  732. B CNSCATN GO HANDLE ATTENTION SIGNAL @VA01394 00657000
  733. EJECT 00658000
  734. ********************************************************************** 00658080
  735. * INTERRUPT DUE TO ACTIVE CONTASK OR HIO * 00658160
  736. * IF NO CONTASK IS FOUND AND HIO ACTIVE, PUT UP A PREPARE (CNSIDLE) * 00658240
  737. * IF CONTROL CONTASK, GOTO CONTROL CONTASK HANDLER (CNSCTAK) * 00658320
  738. * IF INTERRUPT DUE TO HIO, GO ISSUE BREAK SEQUENCE (CNBREAK) * 00658400
  739. * IF UNIT CHECK, GOTO I/O UC HANDLER TO FIGURE IT OUT (CNSIOUC) * 00658480
  740. * IF OUTPUT CONTASK, JUST RETURN THE CONTASK (RETTASK) * 00658560
  741. * IF INCORRECT LENGTH CHECK, GO CALCULATE INPUT LENGTH (CNSINCT) * 00658640
  742. * IF CCW ADDRESS INVALID OR CCW NOT "READ SKIP" TREAT AS DATA CHECK * 00658720
  743. * TRANSACTION SEEMS OK, GO CHECK DATA (CNSINCK) * 00658800
  744. ********************************************************************** 00658880
  745. CNSTASK EQU * INTERRUPT FROM ACTIVE CONTASK @V200820 00659000
  746. TM RDEVFLAG,RDEVACTV IS THERE AN ACTIVE TASK ? @V200820 00660000
  747. BZ CNIGNOR NOT BY US - IGNORE INTERRUPT@V200820 00661000
  748. L R6,RDEVCON ADDRESS OF THE ACTIVE CONTASK @V200820 00662000
  749. LTR R6,R6 IS THERE A CONTASK? @VA02153 00663000
  750. BNZ CNSTASK1 YES, CONTINUE @VA02153 00664000
  751. TM RDEVFLAG,RDEVHIO FROM A HIO? @VA02153 00665000
  752. BNO CNIGNOR NO, IGNORE THE INTERRUPT @VA02153 00666000
  753. NI RDEVFLAG,255-(RDEVACTV+RDEVHIO) RESET FLAGS @VA02153 00667000
  754. B CNSIDLE LET TERMINAL SIT IDLE @VA02153 00668000
  755. SPACE 00668500
  756. CNSTASK1 EQU * @VA02153 00669000
  757. NI CONSTAT,255-CONACTV NO LONGER ACTIVE @V200820 00670000
  758. TM CONSTAT,CONCNTL CONTROL CONTASK ? @V200820 00671000
  759. BO CNSCTAK YES - INTERPRET THE RESULTS @V200820 00672000
  760. TM RDEVFLAG,RDEVHIO INTERRUPT DUE TO A HALT I/O @V200820 00673000
  761. BO CNBREAK YES - ISSUE 'BREAK' SEQUENCE@V200820 00674000
  762. SPACE 00675000
  763. TM IOBCSW+4,UC UNIT CHECK ON THIS TASK ? @V200820 00676000
  764. BO CNSIOUC YES - TEST FOR ATTN, READ ERROR @V200820 00677000
  765. SLR R2,R2 CLEAR THE ATTENTION COUNT @V200820 00678000
  766. STH R2,RDEVRCNT RESET DEVICE RETRY COUNT @V200820 00679000
  767. TM CONSTAT,CONOUTPT WAS THIS AN OUTPUT TASK ? @V200820 00680000
  768. BO RETTASK YES - ALL DONE ALREADY @V200820 00681000
  769. SPACE 00681500
  770. CNSINRD EQU * PROCESS COMPLETED READ CONTASK @V200820 00682000
  771. L R1,IOBCSW CCW ADDRESS FROM THE CSW @V200820 00683000
  772. S R1,F8 BACK UP TO ENDING CCW (ZERO KEY) @V200820 00684000
  773. BNP CNSDTCK ASSUME DATA CHECK @VA11780 00685100
  774. TM IOBCSW+5,IL STOP ON THE DATA-CHAINED CCW ? @V200820 00686000
  775. BO CNSINCT YES - CALCULATE INPUT LENGTH @V200820 00687000
  776. CLI 0(R1),X'00' READ SKIP?? @VM08804 00688000
  777. BNE CNSDTCK NO -- @VM08804 00689000
  778. S R1,F8 BACK UP TO ACTUAL READ CCW @V200820 00690000
  779. LH R3,6(0,R1) USE FULL ORIGINAL COUNT @V200820 00691000
  780. B CNSINCK ... @V200820 00692000
  781. EJECT 00693000
  782. CNSINCT EQU * @V200820 00694000
  783. LH R3,6(0,R1) COUNT FROM THE READ CCW @V200820 00695000
  784. SH R3,IOBCSW+6 ...MINUS THE RESIDUAL COUNT @V200820 00696000
  785. BM CNSDTCK ASSUME DATA CHECK IF NEGATIVE @V200820 00697000
  786. BP CNSINCK CONTINUE ONLY IF POSITIVE COUNT @V200820 00698000
  787. CLI RDEVTYPE,TYP2741 WHAT TYPE OF TERMINAL ? @V200820 00699000
  788. BE CNSDTCK 2741 - ZERO COUNT = DATA CHECK @V200820 00700000
  789. BH CNSRTTY TTY -- ZERO COUNT = GO TYPE CR,LF@V200820 00701000
  790. B CNSRT50 1050 - ZERO COUNT = NORMAL RESET @V200820 00702000
  791. SPACE 00703000
  792. CNSINCK EQU * CHECK INPUT DATA VALIDITY @V200820 00704000
  793. L R4,0(0,R1) DATA START ADDRESS FROM CCW @V200820 00705000
  794. LA R4,0(0,R4) STRIP OFF THE COMMAND CODE @V200820 00706000
  795. BCTR R3,0 DECREMENT COUNT FOR CONTROL CHAR @V200820 00707000
  796. LA R5,0(R3,R4) POINT AT LAST INPUT CHARACTER @V200820 00708000
  797. CLI RDEVTYPE,TYP2741 IS THIS A 2741 TERMINAL ? @V200820 00709000
  798. BNE CNSINTR NO -- GO TRANSLATE INPUT @V200820 00710000
  799. LTR R0,R3 COUNT IN GR0, TEST FOR ZERO @V200820 00711000
  800. BNP CNSINTR ZERO COUNT - DON'T TRY IDENTIFY @V200820 00712000
  801. TM RDEVFLAG,RDEVIDNT CODE IDENTIFIED ALREADY ? @V200820 00713000
  802. BO CNSINTR YES - JUST CONTINUE AS IS @V200820 00714000
  803. BCTR R0,0 DECREMENT TO LEAVE OFF 'CR' @V200820 00715000
  804. LR R1,R4 START ADDRESS TO GR1 @V200820 00716000
  805. CALL DMKTRMID TRY TO IDENTIFY TERMINAL CODE @V200820 00717000
  806. TM RDEVFLAG,RDEVIDNT DID TRMID IDENTIFY 2741 CODE? @VA02313 00718000
  807. BO CNSINTR YES -- GO TRANSLATE TO EBCDIC @VA02313 00719000
  808. NI CONPARM,255-EDIT NO -- FORCE CFM TO REJECT CMD @VA02313 00720000
  809. SPACE 00721000
  810. CNSINTR EQU * TRANSLATE INPUT DATA TO EBCDIC @V200820 00722000
  811. SLR R1,R1 @V200820 00723000
  812. IC R1,RDEVTMCD TERMINAL CODE INDEX @V200820 00724000
  813. L R1,TRANSIN(R1) INPUT TRANSLATE TABLE @V200820 00725000
  814. LR R9,R2 SAVE R2 ACROSS CALL @VM03172 00726000
  815. TRANS 2,1,OPT=(BRING,DEFER,SYSTEM),AFFINITY GET TABLE @V407508 00727100
  816. LR R1,R2 TABLE ADDRESS NEEDED IN R1 @VM03172 00728000
  817. LR R2,R9 RESTORE FROM TRANS CALL @VM03172 00729000
  818. A R3,F1 RESTORE FULL DATA COUNT @VA06313 00729100
  819. LA R15,TRNSLAT TRANSLATION SUBROUTINE @VA01217 00730000
  820. BALR R14,R15 TRANSLATE INPUT TO EBCDIC @VA01217 00731000
  821. BCTR R3,0 SUBTRACT ONE FROM DATA COUNT @VA06313 00731100
  822. CLI RDEVTYPE,TYP2741 SEPARATE THE DEVICE TYPES @V200820 00732000
  823. BL CNSIN50 1050 -- @V200820 00733000
  824. BE CNSIN41 2741 -- @V200820 00734000
  825. * BH CNSINTY TTY -- 00735000
  826. CLI 0(R5),XOFFI IS THIS 'XOFF' @VA10263 00736100
  827. BE CNSRTTY YES - SEND NEW-LINE SEQUENCE @V200820 00737000
  828. CLI 0(R5),X'0D' LAST CHAR = 'CR' ? @V200820 00738000
  829. BE CNSRTTY YES - SEND NEW-LINE SEQUENCE @V200820 00739000
  830. BAL R7,CNSEXCL PROCESS ATTENTION OCCURRENCE @V200820 00740000
  831. SPACE 00740500
  832. CNSRTTY EQU * SEND TELETYPE NEW-LINE SEQUENCE @V200820 00741000
  833. LA R7,TTYENDS CR, LF, XOFF SEQUENCE @V200820 00742000
  834. LA R4,3(0) ...LENGTH @V200820 00743000
  835. B CNSRT41 GO BUILD CONTROL TASK FOR WRITE @V200820 00744000
  836. SPACE 00745000
  837. CNSIN41 EQU * READ COMPLETION FOR 2741 TERMINAL@V200820 00746000
  838. LA R7,EOA2741 POINT TO ENDING SEQ. @VA06314 00747100
  839. LA R1,2(R3) COMPUTE NO. OF IDLES NEEDED @VA06314 00747200
  840. SR R0,R0 CLEAR REG @VA06314 00747300
  841. D R0,F10 COMPUTE NO. OF IDLES @VA06314 00747400
  842. C R1,F15 IDLES EXCEED MAX. ?? @VA06314 00747500
  843. BNH CNSIN41A NO, NO FURTHER CALC. @VA06314 00747600
  844. L R1,F15 SET IDLES TO MAX. @VA07609 00747700
  845. SPACE 00747750
  846. CNSIN41A EQU * @VA06314 00747800
  847. LA R4,2(,R1) ADD CIRCLE D AND ONE MORE IDLE @VA06314 00747900
  848. SPACE 00748400
  849. CNSRT41 EQU * BUILD CONTROL TASK FOR READ RESET@V200820 00749000
  850. OI CONPARM,PRIORITY MAINTAIN CONTASK SEQUENCE @VA03983 00750000
  851. OI CONSTAT,CONACTV READ HAS ALREADY COMPLETED @VM08581 00751000
  852. BAL R9,CNSGTSK BUILD AND INITIALIZE CONTROL TASK@V200820 00752000
  853. ST R7,CONADDR DATA ADDRESS @V200820 00753000
  854. MVI CONCOMND,X'01' COMMAND CODE = X'01' WRITE @V200820 00754000
  855. MVI CONFLAG,SILI @V200820 00755000
  856. STH R4,CONCNT SET DATA COUNT @V200820 00756000
  857. CLI RDEVTYPE,TYP2741 HAVE WE HANDLED THE COUNT ? @V200820 00757000
  858. BNE CNSREND YES - SETUP TO WRITE 'XOFF' @V200820 00758000
  859. LTR R3,R3 2741 MUST SEND AT LEAST ONE CHAR @V200820 00759000
  860. BNP CNSIA41 ONLY ONE -- MUST BE ATTENTION @V200820 00760000
  861. BCTR R3,0 DECREMENT COUNT FOR NEW-LINE @V200820 00761000
  862. BCTR R5,0 POINT AT NEW-LINE (IF IT'S THERE)@V200820 00762000
  863. CLI 0(R5),X'15' TRANSLATED CARRIAGE RETURN ? @V200820 00763000
  864. BE CNSREND YES - READ COMPLETED NORMALLY @V200820 00764000
  865. LA R3,1(0,R3) RESTORE THE INPUT COUNT @V200820 00765000
  866. SPACE 00765500
  867. CNSIA41 EQU * PROCESS ATTENTION ON INPUT LINE @V200820 00766000
  868. MVI CONPARM,RDEVPSUP+RDEVPREP CIRCLE-D PLUS ATTN@V200820 00767000
  869. ST R3,CONRETN SAVE THE INPUT COUNT FOR LATER @V200820 00768000
  870. B CNSTART START THE WRITE CIRCLE-D @V200820 00769000
  871. SPACE 00770000
  872. CNSIN50 EQU * READ COMPLETION FOR 1050 TERMINAL@V200820 00771000
  873. LTR R3,R3 COUNT ZERO RIGHT NOW ? @V200820 00772000
  874. BNP CNSRT50 YES - NORMAL RESET SEQUENCE @V200820 00773000
  875. BCTR R5,0 IGNORE CIRCLE C AT END @V200820 00774000
  876. CLI 0(R5),X'15' LAST CHAR = TRANSLATED 'CR' ? @V200820 00775000
  877. BNE CNSRT50 NO -- RESET WITH NEW-LINE @V200820 00776000
  878. BCTR R3,0 IGNORE THE 'CR', ALSO @V200820 00777000
  879. LA R5,1(0,0) LENGTH FOR RE-ADDRESSING @V200820 00778000
  880. B CNSRS50 GO BUILD RE-ADDRESS CONTASK @V200820 00779000
  881. SPACE 00780000
  882. CNSRT50 EQU * RE-ADDRESS WITH NEW-LINE @V200820 00781000
  883. LA R5,4(0,0) INCLUDE 'CR', 3 IDLES @V200820 00782000
  884. CNSRS50 EQU * @V200820 00783000
  885. LTR R2,R2 WERE ANY ATTENTIONS PROCESSED ? @V200820 00784000
  886. BP RETEDIT YES - NO RE-ADDRESS REQUIRED @V200820 00785000
  887. OI CONSTAT,CONACTV READ HAS ALREADY COMPLETED @VM08581 00786000
  888. OI CONPARM,PRIORITY MAINTAIN CONTASK SEQUENCE @VA03983 00787000
  889. BAL R9,CNSGTSK BUILD AND INITIALIZE CONTROL TASK@V200820 00788000
  890. MVC CONCCW1(8*3),RAD1050 RE-ADDRESSING CCW'S @V200820 00789000
  891. STH R5,CONCCW3+6 SET LENGTH IN LAST CCW @V200820 00790000
  892. SPACE 00791000
  893. CNSREND EQU * EXECUTE ENDING TASK AFTER READ @V200820 00792000
  894. MVI CONPARM,RDEVPSUP FLAG THIS AS WRITE CIRCLE-D @V200820 00793000
  895. L R1,CONPNT GR1 = COMPLETED READ CONTASK @VM08581 00794000
  896. STH R3,CONCNT-CONTASK(,R1) SAVE INPUT COUNT @VM08581 00795000
  897. L R1,CONRETN-CONTASK(,R1) RESPONSE SAVEAREA @VM08643 00796000
  898. ST R2,SAVER2-SAVEAREA(,R1) PASS BACK RETURN CODE @VM08643 00797000
  899. B CNSTART START UP THE WRITE CIRCLE-D @VM08581 00798000
  900. EJECT 00799000
  901. *********************************************************************** 00799030
  902. * A UNIT CHECK HAS BEEN DETECTED ON THE CONTASK I/O. DETERMINE * 00799060
  903. * THE TYPE OF ERROR BY EXAMINING THE SENSE DATA IN THE IOERBLOK * 00799090
  904. * THE PRESENCE OF A SECOND SENSE BYTE (IOERDATA+1) INDICATES * 00799120
  905. * A 4331 COMMUNICATIONS ADAPTER. * 00799150
  906. * * 00799180
  907. * INTERVENTION REQUIRED * 00799210
  908. * WITH NO SECOND SENSE BYTE -->GOTO A * 00799240
  909. * WITH SECOND SENSE BYTE * 00799270
  910. * AND "BREAK SIGNAL" -->GOTO A * 00799300
  911. * OTHERWISE -->GO DISABLE AND ENABLE THE LINE * 00799330
  912. * * 00799360
  913. * ->A IF THIS IS OUTPUT CONTASK -->GO SETUP PREPARE * 00799390
  914. * IF DEVICE NOT A 2741 ASSUME "ATTN" -->GO HANDLE ATTENTION * 00799420
  915. * * 00799450
  916. * TIMEOUT -->GO DISABLE AND ENABLE THE LINE * 00799480
  917. * * 00799510
  918. * NOT DATA CHECK -->GO RETRY THE TASK * 00799540
  919. * NOT INPUT CONTASK -->GO RETRY THE TASK * 00799570
  920. * * 00799600
  921. * ASSUME READ CHECK * 00799630
  922. * SET UP THE "READ ERROR" MESSAGE AND CCW'S FOR THE TYPE * 00799660
  923. * DEVICE AND GO START CONTASK * 00799690
  924. *********************************************************************** 00799720
  925. CNSIOUC EQU * UNIT CHECK ON CONTASK I/O @V200820 00800000
  926. L R3,IOBIOER IOERBLOK POINTER FROM THE IOBLOK @V200820 00801000
  927. USING IOERBLOK,R3 @V200820 00802000
  928. NI RDEVSTA2,X'FF'-RDEVNOHD ASSUME HALT DEVICE @VA12126 00802070
  929. TM IOERDATA,INTREQ INTERVENTION REQUIRED ? @V200820 00803000
  930. BZ CNSIODC NO -- TEST FOR DATA CHECK @V200820 00804000
  931. CLI IOERDATA+1,X'00' IS THERE A SECOND SENSE BYTE @VA12126 00804010
  932. BE NOT4331A NO - TREAT IT AS BEFORE @VA12126 00804020
  933. CLI IOERDATA+1,X'26' IS IT A D/T4331 BREAK KEY? @VA12126 00804030
  934. BE BRK4331 YES - HANDLE IT @VA12126 00804040
  935. CLI IOERDATA+1,X'28' THIS TYPE OF BREAK? @VA12126 00804050
  936. BNE CNSLOGF NO, LOG HIM OFF @VA12126 00804060
  937. BRK4331 DS 0H @VA12126 00804070
  938. OI RDEVSTA2,RDEVNOHD NO HALT DEV AFTER PREP @VA12126 00804080
  939. NOT4331A DS 0H @VA12126 00804090
  940. TM CONSTAT,CONOUTPT OUTPUT TASK ? @V200820 00805000
  941. BO CNBKPRP YES - SETUP FOR PREPARE CCW @V200820 00806000
  942. CLI RDEVTYPE,TYP2741 2741 TERMINAL TYPE ? @V200820 00807000
  943. BNE CNSATINP NO -- MUST BE AN ATTENTION @VA01882 00808000
  944. SPACE 00808500
  945. CNSIODC EQU * @V200820 00809000
  946. TM IOERDATA,TIMEOUT LINE TIME-OUT ? @V200820 00810000
  947. BO CNSLOGF YES - DROP THE LINE @V200820 00811000
  948. TM IOERDATA,DATACHK DATA CHECK ? @V200820 00812000
  949. BZ CNSRTRY NO -- RETRY SIXTEEN TIMES @V200820 00813000
  950. DROP R3 @V200820 00814000
  951. SPACE 00814500
  952. CNSDTCK EQU * DATA CHECK @V200820 00815000
  953. TM CONSTAT,CONOUTPT+CONCNTL INPUT CONTASK ? @V200820 00816000
  954. BNZ CNSRTRY NO, RETRY SIXTEEN TIMES @VA03757 00817000
  955. BAL R9,CNSGTSK GET A CONTASK FOR 'READ ERROR' @V200820 00818000
  956. CLI RDEVTYPE,TYP2741 SPEARATE THE DEVICE TYPES @V200820 00819000
  957. BH CNSDTTY TTY -- @V200820 00820000
  958. BL CNSDT50 1050 -- @V200820 00821000
  959. * BE CNSDT41 2741 -- 00822000
  960. MVC CONCCW1(16),RDERR41 READ ERROR CCW'S FOR 2741 @V200820 00823000
  961. TM RDEVTMCD,RDEVCORR CORRESPONDENCE TERMINAL ? @V200820 00824000
  962. BZ CNSDTSK NO -- O.K. AS IS (PTTC/EBCD)@V200820 00825000
  963. LA R5,RDERRCOR CORRESPONDENCE MESSAGE @V200820 00826000
  964. STCM R5,B'0111',CONADDR+9 RESET CCW DATA ADDRESS @VA01586 00827000
  965. B CNSDTSK @V200820 00828000
  966. SPACE 00828500
  967. CNSDT50 EQU * 1050 DATA CHECK MESSAGE @V200820 00829000
  968. MVC CONCCW1(16),RDERR50 ... @V200820 00830000
  969. B CNSDTSK @V200820 00831000
  970. SPACE 00831500
  971. CNSDTTY EQU * TELETYPE READ ERROR @V200820 00832000
  972. MVC CONCCW1(8),RDERRTY ... @V200820 00833000
  973. SPACE 00834000
  974. CNSDTSK EQU * SETUP FOR MESSAGE, READ REPEAT @V200820 00835000
  975. MVI CONPARM,RDEVPSUP READ-ENDING CONTROL TASK @V200820 00836000
  976. L R6,CONPNT RE-ACCESS READ CONTASK @V200820 00837000
  977. BAL R9,CNCLEAR CLEAR INPUT BUFFER FOR NEXT TIME @V200820 00838000
  978. TM RDEVRCNT+1,X'FF' COUNT ONE OR LARGER ??? @VA03757 00838100
  979. BM NOTFST YES, FORGET ABOUT UPDATING @VA03757 00838200
  980. OI RDEVRCNT+1,X'01' MAKE IT AT LEAST ONE @VA03757 00838300
  981. BAL R2,SDRSTAT PREPARE FOR UPDATE @VA03757 00838400
  982. SPACE 00838450
  983. NOTFST EQU * @VA03757 00838500
  984. B CNSTART START UP THE ERROR MESSAGE TASK @V200820 00839000
  985. EJECT 00840000
  986. CNSATINP EQU * CALCULATE LENGTH OF ATTN INPUT @VA01882 00841000
  987. * LINE (TTY, 1050) 00842000
  988. L R1,IOBCSW CCW ADDRESS FROM THE CSW @VA01882 00843000
  989. S R1,F8 BACK UP TO ENDING CCW (ZERO KEY) @VA01882 00844000
  990. BNP CNRSTRT INVALID CSW - RETRY THE TASK @VA01882 00845000
  991. TM IOBCSW+5,IL STOP ON THE DATA-CHAINED CSW ? @VA01882 00846000
  992. BO CNSATIN1 YES - CALCULATE INPUT LENGTH @VA01882 00847000
  993. CLI 0(R1),X'00' READ SKIP?? @VA01882 00848000
  994. BNE CNSDTCK NO -- @VA01882 00849000
  995. S R1,F8 BACK UP TO ACTUAL READ CCW @VA01882 00850000
  996. LH R3,6(0,R1) USE FULL ORIGINAL COUNT @VA01882 00851000
  997. B CNSATIN2 ... @VA01882 00852000
  998. SPACE 00853000
  999. CNSATIN1 EQU * COMPUTE NUMBER OF BYTES @VA01882 00854000
  1000. * ACTUALLY READ 00855000
  1001. LH R3,6(0,R1) COUNT FROM THE READ CCW @VA01882 00856000
  1002. SH R3,IOBCSW+6 ...MINUS THE RESIDUAL COUNT @VA01882 00857000
  1003. BM CNSDTCK ASSUME DATA CHECK IF NEGATIVE @VA01882 00858000
  1004. SPACE 00859000
  1005. CNSATIN2 EQU * SAVE NUMBER OF BYTES READ (TTY, @VA01882 00860000
  1006. * 1050) 00861000
  1007. STH R3,CONCNT STASH AWAY FOR LATER USE @VA01882 00862000
  1008. LTR R3,R3 ANY DATA TO TRANSLATE? @VA05903 00862020
  1009. BNP CNBKPRP NO...NO NEED TO TRANSLATE TO @VA05903 00862030
  1010. * EBCDID 00862040
  1011. L R4,0(,R1) GET DATA ADDR FROM CCW. @VA05903 00862050
  1012. LA R4,0(,R4) REMOVE COMMAND CODE FROM ADDR. @VA05903 00862060
  1013. SLR R1,R1 @VA05903 00862070
  1014. IC R1,RDEVTMCD GET TERM CODE. @VA05903 00862080
  1015. L R1,TRANSIN(R1) GET VIRT ADDR OF TRANSLATE TBL. @VA05903 00862090
  1016. TRANS 2,1,OPT=(BRING,DEFER,SYSTEM) BRING IN TR TBL. @VA05903 00862100
  1017. LR R1,R2 REAL ADDR IN GPR1. @VA05903 00862110
  1018. LA R15,TRNSLAT GO TRANSLATE @VA05903 00862130
  1019. BALR R14,R15 ASCII TO EBCDIC. @VA05903 00862140
  1020. SPACE 00863000
  1021. CNBKPRP EQU * SETUP PREPARE FOR 'ATTN' SIGNAL @V200820 00864000
  1022. OI RDEVTFLG,RDEVREST ATTENTION RESET IN PROGRESS @VA01394 00865000
  1023. LA R5,PREPCCW START UP A PREPARE COMMAND @VA01394 00866000
  1024. BAL R2,CNSTRIO . . . @VA01394 00867000
  1025. BNZ CNSLOGF CC = 1 IS NOT VALID @VA01394 00868000
  1026. BAL R9,FRETIOB RELEASE IOBLOK AND IOERBLOK @VA01394 00869000
  1027. * IF RDEVNOHD IS ON - DO NOT ISSUE THE HALT DEVICE 00870000
  1028. TM RDEVSTA2,RDEVNOHD SHOULD WE DO A HALT DEV @VA12126 00870100
  1029. BNO INTHALT YES, GO HALT THE DEVICE @VA12126 00870200
  1030. NI RDEVSTA2,X'FF'-RDEVNOHD RESET THE FLAG @VA12126 00870300
  1031. B CNSEXIT WAIT FOR PREP TO END @VA12126 00870400
  1032. EJECT 00870500
  1033. *********************************************************************** 00870600
  1034. * THE CONTROL CONTASK HAS COMPLETED * 00870700
  1035. * IF READ COMPLETION FLAG NOT ON, GO SEE IF IDENTIFY TASK (CNSCTID) * 00870800
  1036. * IF UNIT CHECK, RETRY THE TASK (CNSRTRY) * 00870900
  1037. * IF UNIT EXCEPTION, GOTO CNSCDRT TO FIGURE IT OUT * 00871000
  1038. * IF PREPARE CONTASK, GO TAKE CARE OF ATTENTION (CNSPRP) * 00871100
  1039. * RELEASE THE CONTROL CONTASK (BAL CNSRETN) * 00871200
  1040. * IF NEXT CONTASK UNFINISHED READ, GO START IT (CNSTART) * 00871300
  1041. * CONTINUE HANDLING READ CONTASK (RETEDIT) * 00871400
  1042. *********************************************************************** 00871500
  1043. CNSCTAK EQU * CONTROL TASK HAS COMPLETED @V200820 00872000
  1044. TM CONPARM,RDEVPSUP READ COMPLETION TASK ? @V200820 00873000
  1045. BZ CNSCTID NO -- CHECK FOR IDENTIFY @V200820 00874000
  1046. TM IOBCSW+4,UC UNIT CHECK ON RE-ADDRESS ? @V200820 00875000
  1047. BO CNSRTRY YES - RETRY @V200820 00876000
  1048. TM IOBCSW+4,UE UNIT EXCEPTION ? @V200820 00877000
  1049. BO CNSCDRT YES - RETRY THE CIRCLE-D @V200820 00878000
  1050. TM CONPARM,RDEVPREP ATTN-LOGIC TASK ALSO ? @V200820 00879000
  1051. BO CNSCPRP YES - GO HANDLE ATTENTION @VA01394 00880000
  1052. BAL R7,CNSRETN DISPOSE OF CONTROL CONTASK @VM08581 00881000
  1053. TM CONSTAT,CONACTV HAS THE READ FINISHED ? @VM08581 00882000
  1054. BZ CNSTART NO -- START IT UP @VM08581 00883000
  1055. LH R3,CONCNT PICK UP INPUT COUNT @VM08581 00884000
  1056. L R1,CONRETN ADDRESS OF RESPONSE SAVEAREA @VM08643 00885000
  1057. L R2,SAVER2-SAVEAREA(,R1) PICK UP RETURN CODE @VM08643 00886000
  1058. B RETEDIT GO HANDLE EDITING, ETC. @VM08581 00887000
  1059. SPACE 00888000
  1060. *********************************************************************** 00888100
  1061. * UNIT EXECPTION ON CONTROL CONTASK * 00888200
  1062. * IF TTY DEVICE RETRY THE SAME CONTASK CCW'S (CNSRTRY) * 00888300
  1063. * BUILD CCW'S TO WRITE A "BREAK SEQUENCE" AND RETRY THE TASK(CNSRTRY)* 00888400
  1064. *********************************************************************** 00888500
  1065. CNSCDRT EQU * RETRY WRITE OF CIRCLE-D @V200820 00889000
  1066. CLI RDEVTYPE,TYPTTY WAS 'BREAK' ALREADY DONE ? @V200820 00890000
  1067. BNE CNSRTRY YES - JUST RETRY @V200820 00891000
  1068. TM CONSTAT,CONRTRY HAVE WE BEEN HERE BEFORE ? @V200820 00892000
  1069. BO CNSRTRY YES - JUST RETRY @V200820 00893000
  1070. MVC CONCCW2(8),CONCCW1 MOVE DOWN THE SINGLE CCW @V200820 00894000
  1071. MVC CONCCW1(8),BRK2741 MOVE IN A WRITE BREAK @V200820 00895000
  1072. OI CONSTAT,CONRTRY DO THIS ONLY ONCE @V200820 00896000
  1073. B CNSRTRY RETRY SIXTEEN TIMES @V200820 00897000
  1074. EJECT 00898000
  1075. *********************************************************************** 00898100
  1076. * A CONTROL TASK HAS COMPLETED, IF CONPARM=RDEVIDNT AN ATTEMPT * 00898200
  1077. * IS BEING MADE TO IDENTIFY THE DEVICE TYPE (1050 OR 2741). * 00898300
  1078. * SET RDEVTYPE (DEVICE TYPE) AND RDEVTMCD (TRANSLATE TABLE * 00898400
  1079. * INDEX) AT CNSID50 FOR 1050 AND CNSID41 FOR 2741. THEN WRITE * 00898500
  1080. * THE "VM/370 ONLINE" MESSAGE TO THE DEVICE. * 00898600
  1081. *********************************************************************** 00898700
  1082. CNSCTID EQU * @V200820 00899000
  1083. TM CONPARM,RDEVIDNT TASK TO IDENTIFY THE DEVICE @V200820 00900000
  1084. BZ CNSCTPR NO -- @V200820 00901000
  1085. CLI IOBCSW+4,CE+DE CLEAN ENDING STATUS ? @V200820 00902000
  1086. BNE CNSCIDD NO -- TEST FOR UNIT CHECK @V200820 00903000
  1087. CLI CONCCW4,X'1F' CIRCLE C RESPONSE ? (2741) @V200820 00904000
  1088. BE CNSID41 YES -- @V200820 00905000
  1089. CLI CONCCW4,X'16' CIRCLE D RESPONSE ? (2741) @V200820 00906000
  1090. BE CNSID41 YES -- @V200820 00907000
  1091. CLI CONCCW4,X'76' CIRCLE Y RESPONSE ? (1050) @V200820 00908000
  1092. BNE CNSRTRY NO --- RETRY THE SEQUENCE @V200820 00909000
  1093. SPACE 00909500
  1094. CNSID50 EQU * IDENTIFY FOR 1050 TERMINALS @V200820 00910000
  1095. MVI RDEVTYPE,TYP1050 SET THE DEVICE TYPE @V200820 00911000
  1096. MVI RDEVTMCD,RDEVPTTC ...TERMINAL CODE @V200820 00912000
  1097. NI RDEVFLAG,255-RDEVPSUP NO 1050 PRINT-SUPPRESS @VM08830 00913000
  1098. LA R5,RESET50 'VM/370 ONLINE' MESSAGE FOR 1050 @V200820 00914000
  1099. B CNSONLN GO SETUP TO TYPE IT OUT @V200820 00915000
  1100. SPACE 00915500
  1101. CNSIDTY EQU * IDENTIFY FOR TELEGRAPH TERMINALS @V200820 00916000
  1102. MVI RDEVTMCD,RDEVUSC8 SET TERMINAL CODE @V200820 00917000
  1103. LA R5,RESETTY 'VM/370 ONLINE' MESSAGE FOR TTY @V200820 00918000
  1104. B CNSONLN SETUP TO TYPE IT OUT @V200820 00919000
  1105. SPACE 00919500
  1106. CNSID41 EQU * IDENTIFY FOR 2741 TERMINAL @V200820 00920000
  1107. MVI RDEVTYPE,TYP2741 SET THE DEVICE TYPE @V200820 00921000
  1108. NI RDEVFLAG,255-RDEVIDNT CODE NOT YET IDENTIFIED@V200820 00922000
  1109. OI RDEVTFLG,RDEVATOF SUPPRESS ATTN UNTIL IT IS @V200820 00923000
  1110. LA R5,RESET41 'VM/370 ONLINE' MESSAGE FOR 2741 @V200820 00924000
  1111. SPACE 00924500
  1112. CNSONLN EQU * WRITE 'VM/370 ONLINE' MESSAGE @V200820 00925000
  1113. XC CONCCW1(4*8),CONCCW1 RE-USE THE SAME CONTASK@V200820 00926000
  1114. MVC CONCCW1(8),0(R5) MOVE IN THE CORRECT CCW @V200820 00927000
  1115. MVI CONPARM,RDEVENAB THIS IS AN ONLINE MESSAGE @V200820 00928000
  1116. CLI RDEVTYPE,TYP2741 IS THIS A 2741 ? @V200820 00929000
  1117. BNE CNSTART NO -- WE'RE ALL SET @V200820 00930000
  1118. MVC CONCCW2(8),8(R5) MOVE IN THE SECOND CCW @V200820 00931000
  1119. B CNSTART START UP THE CONTASK I/O @V200820 00932000
  1120. EJECT 00933000
  1121. *********************************************************************** 00933090
  1122. * THE ATTEMPT TO IDENTIFY THE DEVICE DID NOT END WITH CE+DE * 00933180
  1123. * IF NOT A UNIT CHECK, RETRY THE CONTASK. * 00933270
  1124. * IOERDATA=SENSE BYTE 0 * 00933360
  1125. * IF TIMEOUT (X'01'), IDENTIFY THE DEVICE AS A 2741 * 00933450
  1126. * IF COMMAND REJECT (X'80'), DISABLE THE LINE * 00933540
  1127. * IF DATACHECK (X'08') OR LOST DATA (X'02'), RETRY CONTASK * 00933630
  1128. * IF NOT INTERVENTION REQUIRED (X'40'), DISABLE + RE-ENABLE * 00933720
  1129. * IF NONE OF THE ABOVE, PUT UP A "PREPARE" AND JUST LISTEN * 00933810
  1130. *********************************************************************** 00933900
  1131. CNSCIDD EQU * UNCLEAN FINISH ON IDENTIFY TASK @V200820 00934000
  1132. TM IOBCSW+4,UC WAS IT A UNIT CHECK ? @V200820 00935000
  1133. BZ CNSRTRY NO -- JUST RETRY THE TASK @V200820 00936000
  1134. L R3,IOBIOER IOERBLOK POINTER FROM THE IOBLOK @V200820 00937000
  1135. USING IOERBLOK,R3 @V200820 00938000
  1136. TM IOERDATA,TIMEOUT WAS IT A LINE TIME-OUT ? @V200820 00939000
  1137. BO CNSID41 YES - THAT'S A 2741 FOR YOU @V200820 00940000
  1138. TM IOERDATA,CMDREJ COMMAND REJECT ON 'BREAK' ? @V200820 00941000
  1139. BO CNSDISA YES - DISABLE THE LINE @V200820 00942000
  1140. TM IOERDATA,X'0A' DATA CHECK OR LOST DATA @VA05612 00942100
  1141. BNZ CNSRTRY YES - GO RETRY @VA05612 00942200
  1142. TM IOERDATA,INTREQ INTERVENTION REQUIRED ? @V200820 00943000
  1143. BZ CNSLOGF NO -- DISABLE AND RE-ENABLE @V200820 00944000
  1144. DROP R3 @V200820 00945000
  1145. MVC CONCCW1(8),PREPCCW MOVE IN A PREPARE CCW @V200820 00946000
  1146. MVI CONPARM,RDEVACTV RETRY FOR IDENTIFY @V200820 00947000
  1147. XC CONCCW2(3*8),CONCCW2 CLEAR REST OF CCW AREA @V200820 00948000
  1148. B CNSTART START UP THE PREPARE @V200820 00949000
  1149. EJECT 00950000
  1150. *********************************************************************** 00950100
  1151. * A CONTROL TASK HAS COMPLETED, IF COMPARM=RDEVHIO, THIS IS AN * 00950200
  1152. * ATTENTION PROCESSING TASK. IF INTERVENTION REQUIRED - "BREAK * 00950300
  1153. * SIGNAL" - IS DETECTED, GO RESTART THE CONTASK AT THE TOP OF * 00950400
  1154. * THE CONTASK CHAIN, OTHERWISE GO PROCESS THE ATTENTION * 00950500
  1155. *********************************************************************** 00950600
  1156. CNSCTPR EQU * CHECK OTHER CONTROL TASK ENDINGS @V200820 00951000
  1157. TM CONPARM,RDEVHIO ATTENTION-PROCESSING TASK ? @V200820 00952000
  1158. BNO NOTHIO NO, CONTINUE NORMALLY @VA12111 00953050
  1159. TM IOBSTAT,IOBCC1 CSW STORED CONDITION VA13019 00953100
  1160. BZ CNSEXRT NO, PROCESS NORMAL ATTENTION VA13019 00953110
  1161. L R3,IOBIOER IOERBLOK PTR FROM IOBLOK VA13019 00953120
  1162. USING IOERBLOK,R3 VA13019 00953130
  1163. TM IOERDATA,INTREQ INTERVENTION REQUIRED VA13019 00953140
  1164. BZ CNSEXRT NO, PROCESS NORMAL ATTENTION VA13019 00953150
  1165. CLI IOERDATA+1,X'00' IS THERE A SECOND SENSE BYTE VA13019 00953160
  1166. BE CNSEXRT YES, PROCESS NORMAL ATTENTION @VA14789 00953170
  1167. CLI IOERDATA+1,X'26' BREAK SIGNAL - CONTINUOUS VA13019 00953180
  1168. BE RETRYATN YES, RETRY ATTENTION VA13019 00953190
  1169. CLI IOERDATA+1,X'28' BREAK SIGNAL VA13019 00953200
  1170. BNE CNSEXRT NO, PROCESS NORMAL ATTENTION VA13019 00953210
  1171. SPACE 00953215
  1172. RETRYATN DS 0H VA13019 00953220
  1173. MVI CONPARM,RDEVHIO REMEMBER WE'RE HANDLING BREAK VA13019 00953230
  1174. B CNRSTRT RESTART THE CONTASK VA13019 00953240
  1175. SPACE 00953270
  1176. NOTHIO DS 0H @VA12111 00953300
  1177. TM CONPARM,RDEVDISB DISABLE-LINE TASK ? @V200820 00955000
  1178. BO CNSNOFC YES -- @V200820 00956000
  1179. TM CONPARM,RDEVACTV RETRY AFTER IDENTIFY FAILURE@V200820 00958000
  1180. BO CNSIDNT YES -- @V200820 00959000
  1181. * MUST BE THE VM/370 ONLINE MESSAGE . . . 00961000
  1182. TM IOBSTAT,IOBCC1 COND CODE ONE ON START I/O ?@V200820 00962000
  1183. BO CNSLOGF YES - DROP THE LINE @V200820 00963000
  1184. TM RDEVFLAG,RDEVDISB DISABLE THIS LINE NOW ? @V200820 00964000
  1185. BO CNSNOFF YES - STOP SHORT OF LOGON @V200820 00965000
  1186. B RETCNTL RETURN TASK AND SET IDLE @V200820 00966000
  1187. SPACE 00967000
  1188. CNSIDNT EQU * IDENTIFY FAILED, PREPARE HAS COMPLETED @V200820 00968000
  1189. TM IOBCSW+4,UC UNIT CHECK ON THE PREPARE ? @V200820 00969000
  1190. BO CNSRTRY YES - RETRY SIXTEEN TIMES @VA15227 00970000
  1191. B CNSITSK GO RESET FOR IDENTIFY SEQUENCE @VA15227 00971000
  1192. SPACE 00972000
  1193. CNSCPRP EQU * PREPARE LOGIC FOR INPUT ATTN @VA01394 00973000
  1194. L R3,CONRETN SAVED INPUT COUNT (IF ANY) @V200820 00974000
  1195. BAL R7,CNSRETN RETURN FINISHED CONTASK @V200820 00975000
  1196. SPACE 00975500
  1197. CNSCATN EQU * PROCESS AFTER ATTENTION RESET @VA01394 00976000
  1198. BAL R7,CNSEXCL PROCESS ATTENTION SIGNAL @V200820 00977000
  1199. TM CONSTAT,CONOUTPT+CONCNTL INPUT CONTASK ? @V200820 00978000
  1200. BNZ RETTASK NO -- JUST RETURN IT @V200820 00979000
  1201. B RETEDIT PROCESS COMPLETED INPUT TASK @V200820 00980000
  1202. EJECT 00981000
  1203. CNSEXCL EQU * PROCESS ATTENTION SIGNAL @V200820 00982000
  1204. LTR R6,R6 IS THERE AN ACTIVE CONTASK ? @V200820 00983000
  1205. BNP CNSEXC1 NO -- DON'T SAVE COUNT, ETC. @V200820 00984000
  1206. STH R3,CONCNT SAVE INPUT DATA COUNT @V200820 00985000
  1207. OI CONPARM,PRIORITY MAINTAIN SEQUENCE ORDER FOR @VA02785 00986000
  1208. * STACKING CONTASKS 00987000
  1209. NI CONSTAT,255-CONESCP CCW STRING CLOBBERED @V200820 00988000
  1210. CNSEXC1 EQU * BUILD CONTROL TASK FOR EXCLAMATION WRITE @V200820 00989000
  1211. MVI RDEVATNC,X'00' CLEAR DEVICE ATTENTION COUNT @V200820 00990000
  1212. LA R0,CONTSIZE+2 GET A LARGE CONTROL TASK @V200820 00991000
  1213. BAL R9,CNSGTSZ ... @V200820 00992000
  1214. ST R7,CONRETN SAVE INTERNAL RETURN ADDRESS @V200820 00993000
  1215. SPACE 00993500
  1216. CNSEXC2 EQU * RE-ENTER TO REBUILD CCW STRING @V200820 00994000
  1217. MVI CONPARM,RDEVHIO IDENTIFY THIS CONTROL TASK @V200820 00995000
  1218. SLR R1,R1 CLEAR A WORK REGISTER @V200820 00996000
  1219. IC R1,RDEVTMCD TERMINAL CODE SPECIFICATION @V200820 00997000
  1220. L R1,TRANSOUT(R1) GR1 = OUTPUT TRANSLATE TABLE@V200820 00998000
  1221. TRANS 2,1,OPT=(BRING,DEFER,SYSTEM),AFFINITY GET TABLE @V407508 00999100
  1222. LR R1,R2 TABLE ADDRESS NEEDED IN R1 @VM03172 01000000
  1223. TM RDEVTFLG,RDEVATOF SUPPRESS ATTENTION SIGNAL ? @V200820 01001000
  1224. BO CNSEXNO YES - JUST SEND IDLES @V200820 01002000
  1225. IC R2,X'5A'(0,R1) GR2 = EXCLAMATION POINT CHARACTER@V200820 01003000
  1226. LA R3,10(0,0) LENGTH OF WRITE CHARACTER STRING @V200820 01004000
  1227. CLI RDEVTYPE,TYPTTY TELEGRAPH TERMINAL TYPE ? @V200820 01005000
  1228. BE CNSEXC3 YES - SETUP FOR EXCLAMATION @V200820 01006000
  1229. ICM R2,B'0010',X'14'(R1) ADD RESTORE CHARACTER @V200820 01007000
  1230. STH R2,CONDATA SET DATA IN CONTASK BUFFER @V200820 01008000
  1231. MVC CONDATA+2(8),EXMSG45 MOVE IN IDLES, NEW-LINE@V200820 01009000
  1232. B CNSEXCW GO BUILD WRITE CCW STRING @V200820 01010000
  1233. SPACE 01010500
  1234. CNSEXC3 EQU * @V200820 01011000
  1235. STC R2,CONDATA USE ONLY EXCLAMATION FOR TELETYPE@V200820 01012000
  1236. MVC CONDATA+1(9),EXMSGTY MOVE IN IDLES, NEW-LINE@V200820 01013000
  1237. B CNSEXCW GO BUILD WRITE CCW STRING @V200820 01014000
  1238. SPACE 01014500
  1239. CNSEXNO EQU * SUPPRESS EXCLAMATION AND NEW-LINE@V200820 01015000
  1240. LA R3,6(0,0) LENGTH OF IDLES STRING @V200820 01016000
  1241. MVC CONDATA(6),FFS TTY IDLES = X'FF' @V200820 01017000
  1242. CLI RDEVTYPE,TYPTTY DID WE GUESS RIGHT ? @V200820 01018000
  1243. BE CNSEXCW YES -- @V200820 01019000
  1244. MVC CONDATA(6),IDLCHAR 2741, 1050 IDLES = X'5E' @V200820 01020000
  1245. IC R2,X'14'(0,R1) RESTORE CHARACTER @V200820 01021000
  1246. STC R2,CONDATA SET TO RESTORE TYPING @V200820 01022000
  1247. SPACE 01022500
  1248. CNSEXCW EQU * @V200820 01023000
  1249. LA R1,CONCCW1 WHERE TO PUT THE WRITE CCW @V200820 01024000
  1250. CLI RDEVTYPE,TYP1050 IS THIS A 1050 ? @V200820 01025000
  1251. BNE CNSEXCB NO -- JUST BUILD WRITE CCW @V200820 01026000
  1252. MVC CONCCW1(3*8),BRK1050 RE-ADDRESSING SEQUENCE @V200820 01027000
  1253. OI CONCCW3+4,CC ADD CHAINING TO LAST CCW @V200820 01028000
  1254. LA R1,CONCCW4 NEW PLACE FOR THE WRITE CCW @V200820 01029000
  1255. SPACE 01029500
  1256. CNSEXCB EQU * @V200820 01030000
  1257. LA R4,CONDATA DATA ADDRESS FOR WRITE @V200820 01031000
  1258. ST R4,0(0,R1) SET IN CCW ADDRESS FIELD @V200820 01032000
  1259. MVI 0(R1),X'01' COMMAND CODE = X'01' WRITE @V200820 01033000
  1260. MVI 4(R1),SILI CCW FLAGS = SILI @V200820 01034000
  1261. STH R3,6(0,R1) SET THE DATA COUNT @V200820 01035000
  1262. B CNSTART GO WRITE EXCLAMATION POINT, ETC. @V200820 01036000
  1263. SPACE 01037000
  1264. CNSEXRT EQU * ATTENTION TASK HAS COMPLETED @V200820 01038000
  1265. TM CONPARM,RDEVPREP MULTIPLE-ATTENTION RESET ? @V200820 01039000
  1266. BZ CNSEXR1 NO -- @V200820 01040000
  1267. TM IOBCSW+4,UC UNIT CHECK ON THE PREPARE ? @V200820 01041000
  1268. BO CNSRTRY1 RETRY PREPARE @VA12126 01042000
  1269. B CNSEXC2 REBUILD CCW STRING FOR EXCLAMATIO@V200820 01043000
  1270. SPACE 01043500
  1271. CNSEXR1 EQU * RETURN FROM EXCLAMATION WRITE @V200820 01044000
  1272. SLR R0,R0 CONSTANT @V200820 01045000
  1273. SLR R1,R1 @V200820 01046000
  1274. IC R1,RDEVATNC PICK UP ATTENTION COUNT @V200820 01047000
  1275. LA R1,1(0,R1) INCREMENT....... @V200820 01048000
  1276. CL R1,F2 MORE THAN TWO ATTENTIONS ? @V200820 01049000
  1277. BH *+8 YES - REMEMBER ONLY TWO @V200820 01050000
  1278. STC R1,RDEVATNC RESET FOR NEXT TIME THROUGH @V200820 01051000
  1279. TM IOBCSW+4,UC UNIT CHECK (SECOND ATTENTION) ? @V200820 01052000
  1280. BZ CNSEXR2 NO -- CHECK OUT THE RESULTS @V200820 01053000
  1281. MVC CONCCW1(8),PREPCCW THROW UP A PREPARE CCW @V200820 01054000
  1282. OI CONPARM,RDEVPREP FLAG IT... @V200820 01055000
  1283. B CNSRTRY1 RETRY @VA12126 01056000
  1284. SPACE 01056500
  1285. CNSEXR2 EQU * FIGURE OUT ATTENTION HANDLING @V200820 01057000
  1286. L R3,CONRETN RECOVER INTERNAL RETURN ADDRESS @V200820 01058000
  1287. BAL R7,CNSRETN RETURN FINISHED TASK @V200820 01059000
  1288. LR R7,R3 RETURN ADDRESS TO GR7 @V200820 01060000
  1289. LTR R6,R6 IS THERE ANOTHER CONTASK ? @V200820 01061000
  1290. BNP *+8 NO -- DON'T BOTHER WITH GR3 @V200820 01062000
  1291. LH R3,CONCNT RECOVER INPUT DATA COUNT @V200820 01063000
  1292. LA R2,8(0,0) MULTIPLE ATTENTION INDICATOR @V200820 01064000
  1293. TM VMMLEVEL,VMMCPENV FORCE MULTIPLE ATTENTIONS ? @V200820 01065000
  1294. BCR 1,R7 YES - RETURN AS IS @V200820 01066000
  1295. CLI RDEVATNC,1 MORE THAN ONE ATTENTION ? @V200820 01067000
  1296. BCR 7,R7 YES - RETURN AS IS @V200820 01068000
  1297. LA R2,4(0,0) SINGLE ATTENTION INDICATOR @V200820 01069000
  1298. BR R7 RETURN... @V200820 01070000
  1299. EJECT 01071000
  1300. CNBREAK EQU * PRIORITY WRITE KNOCKED DOWN READ @V200820 01072000
  1301. BAL R9,CNCLEAR CLEAR THE READ INPUT BUFFER @V200820 01073000
  1302. L R1,CONPNT POINTER TO NEXT TASK (WRITE) @V200820 01074000
  1303. ST R1,RDEVCON MOVE IT TO THE CHAIN TOP @V200820 01075000
  1304. SPACE 01075500
  1305. CNBRKLP EQU * MOVE READ TASK DOWN THE LIST @V200820 01076000
  1306. L R14,CONPNT-CONTASK(,R1) NEXT TASK @V200820 01077000
  1307. LTR R14,R14 HAVE WE HIT THE END ? @V200820 01078000
  1308. BNP CNBRKFN YES - PUT THE READ HERE @V200820 01079000
  1309. TM CONPARM-CONTASK(R14),PRIORITY PRIORITY TASK ? @V200820 01080000
  1310. BZ CNBRKFN NO -- PUT THE READ HERE @V200820 01081000
  1311. LR R1,R14 PROGRESS ALONG THE CHAIN @V200820 01082000
  1312. B CNBRKLP ... @V200820 01083000
  1313. SPACE 01084000
  1314. CNBRKFN EQU * RE-CHAIN READ TASK AFTER WRITES @V200820 01085000
  1315. ST R6,CONPNT-CONTASK(,R1) INSERT THE READ @V200820 01086000
  1316. ST R14,CONPNT ... @V200820 01087000
  1317. BAL R9,CNSGTSK BUILD A CONTROL CONTASK @V200820 01088000
  1318. MVI CONPARM,RDEVPSUP READ-COMPLETION CONTROL TASK@V200820 01089000
  1319. MVC CONCCW1(8),BRKTTYS WRITE 'XOFF' FOR TTY BREAK @V200820 01090000
  1320. CLI RDEVTYPE,TYP2741 SEPARATE THE DEVICE TYPES @V200820 01091000
  1321. BH CNSTART GOT IT - START THE TASK @V200820 01092000
  1322. MVC CONCCW1(16),BRK2741 WRITE BREAK, EOADDR FOR 2741@V200820 01093000
  1323. BE CNSTART GOT IT -- @V200820 01094000
  1324. MVC CONCCW2(24),BRK1050 RE-ADDRESSING FOR 1050 @V200820 01095000
  1325. B CNSTART @V200820 01096000
  1326. EJECT 01097000
  1327. CNSATTN EQU * LOGON NEW USER, OR ENTER C.F. MODE @V200820 01098000
  1328. TM RDEVSTA2,RDEVSYNC IS THIS 3RD TASK (2ND ATTN) @VA08275 01098250
  1329. BO CNIGNOR1 YES, WE ONLY HANDLE 2 AT A TIME @VA08275 01098500
  1330. TM RDEVSTA3,RDEVATSW ARE WE STILL IN RECONN? @VA10462 01098650
  1331. BO CNIGNOR1 YES....BRANCH. @VA10462 01098800
  1332. CL R11,ASYSVM IS RDEVUSER = SYSTEM VMBLOK ? @V200820 01099000
  1333. BNE CNSCFMD NO -- CALL DMKCFMBK FOR C.F. MODE@V200820 01100000
  1334. CLC CPID(4),=C'CPCP' RUNNING SYSTEM YET ? @V200820 01101000
  1335. BE CNSLOGN YES - LOGON A NEW USER @V200820 01102000
  1336. BAL R9,FRETIOB RELEASE IOBLOK, IOERBLOK @V200820 01103000
  1337. NI RDEVFLAG,255-RDEVACTV LET THE CONSOLE START @V200820 01104000
  1338. GOTO DMKCPIEM BACK TO DMKCPI FOR ALTERNATE CONS@V200820 01105000
  1339. SPACE 01106000
  1340. CNSLOGN EQU * LOGON A NEW USER @V200820 01107000
  1341. TM RDEVFLAG,RDEVDISB SHOULD WE LET HIM ON ? @V200820 01108000
  1342. BO CNSNOFF NO -- DISABLE THE LINE @V200820 01109000
  1343. TM RDEVTFLG,RDEVLOG ALREADY IN LOGON PROCESS ? @V200820 01110000
  1344. BO CNIGNOR YES - CLEAN UP AND GET OUT @V200820 01111000
  1345. OI RDEVTFLG,RDEVLOG ENTERING LOGON PROCESS @V200820 01112000
  1346. CALL DMKBLDVM,AFFINITY BUILD A VMBLOK AROUND RDEVBLOK@V407508 01113100
  1347. NI RDEVTFLG,255-RDEVLOG LOGON COMPLETE @V200820 01114000
  1348. B CNSCFMB GO ENTER C.F. MODE FOR LOGON @V200820 01115000
  1349. SPACE 01116000
  1350. CNSCFMD EQU * PUT V.M. INTO CONSOLE FUNCTION MO@V200820 01117000
  1351. L R3,RDEVAIOB GET ACTIVE IOBLOK @VA08275 01117050
  1352. LTR R3,R3 IS THERE REALLY ONE THERE ?? @VA08275 01117100
  1353. BZ CNSCFMD1 NO, CONTINUE @VA08275 01117150
  1354. OI RDEVSTA2,RDEVSYNC TELL ACTIVE I/O ABOUT ATTN @VA08275 01117200
  1355. LA R0,CPEXSIZE GET A CPEXBLOK FOR ATTENTION @VA08275 01117250
  1356. CALL DMKFREE @VA08275 01117300
  1357. ST R1,IOBMISC-IOBLOK(R3) SAVE ADDRESS OF ATTN CPEX @VA08275 01117350
  1358. USING CPEXBLOK,R1 TELL THE ASSEMBLER @VA08275 01117400
  1359. XC CPEXBLOK(16),CPEXBLOK ZERO 2 DOUBLEWORDS @VA08275 01117450
  1360. STM R0,R15,CPEXREGS SAVE REGS @VA08275 01117500
  1361. LA R15,CNSCFMD1 ESTABLISH AN IRA @VA08275 01117550
  1362. ST R15,CPEXADD AND SAVE IT @VA08275 01117600
  1363. B CNSEXIT WAIT FOR ACTIVE I/O COMPLETE @VA08275 01117650
  1364. DROP R1 @VA08275 01117700
  1365. SPACE 01117720
  1366. CNSCFMD1 DS 0H @VA08275 01117750
  1367. TM VMOSTAT,VMDISC USER DISC SINCE ATTN CAME IN @VA09229 01117755
  1368. BNO CNSCFMD2 NO, CONTINUE @VA09229 01117760
  1369. NI RDEVSTA2,X'FF'-RDEVSYNC RESET ATTN FLAG @VA09229 01117765
  1370. B CNIGNOR1 FRET IOBLOK AND EXIT @VA09229 01117770
  1371. SPACE 01117772
  1372. CNSCFMD2 DS 0H CONTINUE PROCESSING ATTN @VA09229 01117775
  1373. TM VMMLEVEL,VMMCPENV ATTENTION TO CP ? @V200820 01118000
  1374. BO CNSCFMB YES - CALL DMKCFMBK @V200820 01119000
  1375. TM VMRSTAT,VMCFWAIT IN CONSOLE FUNCTION WAIT ? @V200820 01120000
  1376. BO CNSCFMB YES - CALL DMKCFMBK @V200820 01121000
  1377. CL R2,F4 MORE THAN ONE ATTENTION ? @V200820 01122000
  1378. BH CNSCFMB YES - ENTER C.F. MODE @V200820 01123000
  1379. CALL DMKCFMAT POST ATTENTION FOR THE VIRT MACH @V200820 01124000
  1380. BNZ CNSCFMB VIRT. MACH. TO C.F.MODE @VA06283 01125100
  1381. SPACE 01125150
  1382. CNS3210 CLI RDEVTYPE,TYP3210 EBCDIC TYPE CONSOLE ?? @VA06283 01125200
  1383. BE CNS3210A YES, CONTINUE @VA07396 01125310
  1384. CLI RDEVTYPE,TYP2741 EBCDIC TYPE CONSOLE ? @VA07396 01125320
  1385. BNE CNSTART NOT 3210 OR 2741 START NEXT TASK @VA07396 01125330
  1386. SPACE 01125335
  1387. CNS3210A EQU * CONTINUE FOR 3210 2741 ONLY @VA07396 01125340
  1388. L R1,IOBCAW GET CAW ADDRESS. @VA06283 01125400
  1389. LTR R1,R1 IS IT ZERO ?? (UNSOL. ?? ) @VA06283 01125500
  1390. BZ CNIGNOR NO, THROW AWAY THE INTERUPT @VA06283 01125600
  1391. B CNSTART YES, START NEXT CONTASK @VA06283 01125700
  1392. SPACE 01125800
  1393. CNSCFMB EQU * PUT VIRTUAL MACHINE IN C.F. MODE @V200820 01126000
  1394. NI RDEVFLAG,255-RDEVACTV DEVICE IS NOT ACTIVE @V200820 01127000
  1395. TM VMOSTAT,VMCF IS CONSOLE FUNCTION RUNNING ? @VA01782 01128000
  1396. BO CNS3210 YES, CHECK FOR TYPE 3210 @VA06283 01129500
  1397. TM VMRSTAT,VMLOGOFF IS USER IN LOGOFF ? @VA01782 01130000
  1398. BO CNS3210 YES, GO CHECK FOR TYPE 3210 @VA06283 01131500
  1399. L R3,RDEVCON PICK UP CURRENT CONTASK CHAIN @V200820 01132000
  1400. SLR R0,R0 CLEAR RDEVCON POINTER (PUT BREAK @V200820 01133000
  1401. ST R0,RDEVCON TASKS AT THE HEAD OF THE CHAIN) @V200820 01134000
  1402. CALL DMKCFMBK,AFFINITY ENTER CONSOLE FUNCTION MODE @V407508 01135100
  1403. L R6,RDEVCON GET NEW TOP OF STACK @VA03287 01136000
  1404. LTR R6,R6 ANYTHING THERE? @VA03287 01137000
  1405. BNZ CNSCFML YES--A CPEXBLOK WILL WAKE US @VA03287 01138000
  1406. ST R3,RDEVCON NO--PUT BACK OLD TOP @VA03287 01139000
  1407. B CNS3210 GO CHECK FOR TYPE 3210 @VA06283 01140500
  1408. SPACE 01140700
  1409. CNSCFML EQU * PUT OLD CHAIN ON END OF NEW ONE @V200820 01141000
  1410. L R2,CONPNT POINTER TO NEXT CONTASK, IF ANY @V200820 01142000
  1411. LTR R2,R2 HAVE WE REACHED THE END ? @V200820 01143000
  1412. BNP CNSCFMN YES - PUT BACK THE OLD CONTASKS @V200820 01144000
  1413. LR R6,R2 KEEP LOOKING FOR THE END @V200820 01145000
  1414. B CNSCFML ... @V200820 01146000
  1415. SPACE 01146500
  1416. CNSCFMN EQU * RESTORE PREVIOUS CONTASK CHAIN @V200820 01147000
  1417. ST R3,CONPNT CHAIN THIS TO LAST NEW CONTASK @V200820 01148000
  1418. B CNIGNOR EXIT - RE-ENTER VIA CPEXBLOK @V200820 01149000
  1419. EJECT 01150000
  1420. RETEDIT EQU * CHECK FOR INPUT EDITING OR TRANSLATION @V200820 01151000
  1421. STH R3,CONCNT COUNT IN CONTASK FOR EDIT ROUTINE @V200820 01152000
  1422. NI CONSTAT,255-CONESCP NO LONGER READY FOR 'SIO' @V200820 01153000
  1423. L R1,CONRETN POINTER TO CALLER'S SAVE-AREA @V200820 01154000
  1424. L R1,SAVER1-SAVEAREA(,R1) PICK UP ORIGINAL BUFFER@V200820 01155000
  1425. ST R1,CONADDR PUT BACK IN CONTASK FOR DMKQCN @V200820 01156000
  1426. LTR R3,R3 WAS THIS A NULL LINE INPUT ? @V200820 01157000
  1427. BZ RETNULL YES -- CHECK FOR SPECIAL HANDLING@V200820 01158000
  1428. TM CONPARM,UCASE+EDIT EDIT OR TRANSLATE DESIRED ? @V200820 01159000
  1429. BZ RETTASK NO -- LET IT GO AS IS @V200820 01160000
  1430. CALL DMKCNSED EDIT AND/OR TRANSLATE THE INPUT @V200820 01161000
  1431. LTR R2,R2 IS THERE AN ATTN STATUS PENDING ?@V200820 01162000
  1432. BNZ RETTASK YES - RETURN IT WITHOUT RETRY @V200820 01163000
  1433. LTR R3,R3 NULL INPUT LINE AFTER EDITING ? @V200820 01164000
  1434. BZ CNRSTRT YES - RE-ISSUE THE SAME CONTASK @VM08581 01165000
  1435. SPACE 01167000
  1436. RETTASK EQU * RETURN COMPLETED CONTASK TO DMKQC@V200820 01168000
  1437. TM CONSTAT,CONCNTL IS THIS A CONTROL CONTASK ? @V200820 01169000
  1438. BO RETCNTL YES - NO RESPONSE POSSIBLE @V200820 01170000
  1439. LTR R2,R2 ANY STATUS RETURNED ? @VA03982 01171000
  1440. BZ RETNORM NO, PROCEED NORMALLY @VA03982 01172000
  1441. B RETSPLT @VA08275 01172200
  1442. RETSPLTA DS 0H @VA08275 01172400
  1443. LTR R6,R6 ANY MORE CONTASKS ?? @VA08275 01172600
  1444. BZ CNSIDLE NO, DONE WITH FRETS (RBH) @VA08275 01172800
  1445. RETSPLT TM CONSTAT,CONSPLT SPLIT CONTASK ? @VA03982 01173000
  1446. BZ RETNORM NO, PROCEED NORMALLY @VA03982 01174000
  1447. BAL R7,CNSRETN YES, RELEASE IT @VA03982 01175000
  1448. B RETSPLTA NEXT CONTASK, IF ONE EXISTS @VA08275 01176050
  1449. RETNORM EQU * @VA03982 01177000
  1450. TM CONSTAT,CONRESP RESPONSE EXPECTED ? @V200820 01178000
  1451. BZ RETCHEK NO -- START UP NEXT TASK @V200820 01179000
  1452. L R1,CONRETN POINTER TO RETURN SAVEAREA @V200820 01180000
  1453. ST R2,SAVER2-SAVEAREA(,R1) SET RETURN CODE IN GR2 @V200820 01181000
  1454. RETCHEK EQU * @V200820 01182000
  1455. TM CONPARM,LOGDROP+LOGHOLD LOGOFF VIA MSG ? @V200820 01183000
  1456. BNZ CNSTLOG YES - GO RE-ENABLE@V200820 01184000
  1457. RETCNTL EQU * @V200820 01185000
  1458. SLR R0,R0 @V200820 01186000
  1459. STH R0,RDEVRCNT RESET DEVICE RETRY COUNT @V200820 01187000
  1460. BAL R7,CNSRETN RETURN FINISHED TASK TO DMKQCN @V200820 01188000
  1461. B CNSTART START UP NEXT CONTASK @V200820 01189000
  1462. SPACE 01190000
  1463. RETNULL EQU * NULL LINE ON INPUT CONTASK @V200820 01191000
  1464. TM CONPARM,INHIBIT PRINT-SUPPRESS LINE ? @V200820 01192000
  1465. BZ RETTASK NO -- PASS ON NULL LINE @V200820 01193000
  1466. NI RDEVFLAG,255-RDEVPSUP NO PRINT SUPPRESS @V200820 01194000
  1467. B CNRSTRT RETRY THE READ CONTASK @VA12111 01195050
  1468. EJECT 01196000
  1469. CNRSTRT EQU * RESTART CONTASK AT TOP OF CHAIN @V200820 01197000
  1470. NI RDEVSTAT,255-RDEVNRDY DEVICE IS NOW READY @V200820 01198000
  1471. NI RDEVFLAG,255-(RDEVHIO+RDEVPREP+RDEVACTV) @V200820 01199000
  1472. NI RDEVTFLG,255-RDEVCTL RESET TERMINAL FLAGS @V200820 01200000
  1473. L R6,RDEVCON CONTASK TO BE RESTARTED @V200820 01201000
  1474. LTR R6,R6 MAKE SURE THERE IS ONE @V200820 01202000
  1475. BZ CNSIDLE NO -- LET TERMINAL SIT IDLE @V200820 01203000
  1476. OI CONSTAT,CONRTRY THIS IS A RETRY OPERATION @V200820 01204000
  1477. TM CONSTAT,CONOUTPT+CONCNTL INPUT OPERATION ? @V200820 01205000
  1478. BNZ CNSTARK NO -- START IT @V200820 01206000
  1479. BAL R9,CNCLEAR CLEAR THE INPUT BUFFER TO ZEROES @V200820 01207000
  1480. B INCTASK GO RE-PROCESS THE CCW STRING @V200820 01208000
  1481. SPACE 01209000
  1482. CNSTART EQU * START NEXT CONTASK FOR THIS DEVIC@V200820 01210000
  1483. NI RDEVFLAG,255-(RDEVACTV+RDEVHIO) RESET FLAGS @V200820 01211000
  1484. L R6,RDEVCON NEXT CONTASK ON CHAIN @V200820 01212000
  1485. LTR R6,R6 IS THERE ANY WORK TO DO ? @V200820 01213000
  1486. BZ CNSIDLE NO -- LET THE TERMINAL SIT IDLE @V200820 01214000
  1487. CNSTARK EQU * START CONTASK ON THE REAL DEVICE @V200820 01215000
  1488. TM CONSTAT,CONSYNC SYNCHRONIZATION TASK ? @V200820 01216000
  1489. BO RETCNTL YES - JUST RETURN IT NOW @V200820 01217000
  1490. TM CONSTAT,CONESCP HAVE THE CCW'S BEEN BUILT ? @V200820 01218000
  1491. BZ INCTASK NO -- GO PROCESS THEM NOW @V200820 01219000
  1492. LTR R10,R10 DO WE ALREADY HAVE AN IOBLOK ? @V200820 01220000
  1493. BNZ CNSETIO YES - SETUP FOR NEW CONTASK @V200820 01221000
  1494. TM RDEVSTAT,RDEVDISA IS DEVICE OFFLINE? @VA02672 01222000
  1495. BO CNSLOGF TREAT AS FATAL TERMINAL ERROR @VA02672 01223000
  1496. LA R0,IOBSIZE @V200820 01224000
  1497. CALL DMKFREE GET AN IOBLOK FROM FREE STORAGE @V200820 01225000
  1498. LR R10,R1 @V200820 01226000
  1499. XC IOBLOK(IOBSIZE*8),IOBLOK CLEAR ENTIRE BLOCK @V200820 01227000
  1500. CNSETIO EQU * RESET FIELDS IN IOBLOK @V200820 01228000
  1501. ST R11,IOBUSER VMBLOK ADDRESS OF CONTASK OWNER @V200820 01229000
  1502. LA R1,DMKCNSIN INTERRUPT RETURN POINT @V200820 01230000
  1503. ST R1,IOBIRA ... @V200820 01231000
  1504. LA R1,CONCCW1 START OF CONTASK CCW STRING @V200820 01232000
  1505. ST R1,IOBCAW ... @V200820 01233000
  1506. XC IOBRADD(8),IOBRADD CLEAR FIRST DOUBLE-WORD @V200820 01234000
  1507. CNSIOSR EQU * @V200820 01235000
  1508. OI CONSTAT,CONACTV CONTASK ACTIVE ON REAL DEVIC@V200820 01236000
  1509. OI RDEVFLAG,RDEVACTV DEVICE IS CURRENTLY ACTIVE @V200820 01237000
  1510. NI IOBSPEC,X'FF'-IOBUNSL TURN OFF UNSOL. INT FLAG @VA04091 01238000
  1511. BAL R9,FRETIOER FRET ANY OLD IOERBLOK @V200820 01239000
  1512. TM RDEVSTA2,RDEVSYNC ATTN DURING ACTIVE I/O ?? @VA08275 01239250
  1513. BO CNSSYNC BETTER SYNC IT PROPERLY @VA08275 01239500
  1514. CNSIOSR1 EQU * @VA11726 01239550
  1515. CALL DMKIOSQR QUEUE REAL I/O FOR EXECUTION @V200820 01240000
  1516. EJECT 01241000
  1517. CNSEXIT EQU * RETURN TO THE DISPATCHER @V200820 01242000
  1518. GOTO DMKDSPCH @V200820 01243000
  1519. SPACE 01244000
  1520. CNSIDLE EQU * NO CONTASK'S TO BE PROCESSED @V200820 01245000
  1521. CLI RDEVTYPE,TYP3210 EBCDIC-TYPE CONSOLE ? @V200820 01246000
  1522. BE CNIGNOR YES - JUST GO AWAY AND WAIT @V200820 01247000
  1523. OI RDEVFLAG,RDEVPREP LISTEN FOR 'ATTN' @V200820 01248000
  1524. LA R5,PREPCCW ... @V200820 01249000
  1525. BAL R2,CNSTRIO START UP THE PREPARE @V200820 01250000
  1526. BNZ CNSLOGF FATAL ERROR IF NOT CC = 0 @V200820 01251000
  1527. B CNIGNOR RELEASE THE IOBLOK AND GO AWAY @V200820 01252000
  1528. EJECT 01253000
  1529. *********************************************************************** 01257000
  1530. * A UNIT CHECK WAS DISCOVERED ON A 'PREPARE' AND IT MUST BE * 01261000
  1531. * RETRIED (UP TO 16 TIMES). * 01265000
  1532. * A SECOND SENSE BYTE (IOERDATA+1) INDICATES A 4331 COMM. ADAPT * 01269000
  1533. * WHEN THE UC OCCURRS DURING INITIATION OF THE PREPARE, THE * 01273000
  1534. * LINE IS DISABLED THEN RE-ENABLED. * 01277000
  1535. *********************************************************************** 01281000
  1536. CNSRTRP EQU * PREPARE MUST BE RETRIED @VM08581 01287000
  1537. OI RDEVFLAG,RDEVPREP TURN PREPARE FLAG BACK ON @VM08581 01288000
  1538. CNSRTRY1 DS 0H RETRY PREPARE AFTER UNIT CHECK @VA12126 01289000
  1539. L R1,IOBIOER GET IOERBLOK @VA12126 01289050
  1540. USING IOERBLOK,R1 @VA12126 01289100
  1541. LTR R1,R1 DO WE HAVE AN IOERBLOK @VA12126 01289150
  1542. BZ NOT4331 NO, TREAT IT AS BEFORE @VA12126 01289200
  1543. CLI IOERDATA+1,X'00' DO WE HAVE A 2ND SENSE BYTE @VA12126 01289250
  1544. BE NOT4331 NO, NOT A 4331 @VA12126 01289300
  1545. CLI IOERDATA+1,X'20' UNIT CHECK ON A PREPARE? @VA12126 01289350
  1546. BE CNSLOGF YES, DISABLE - RE-ENABLE LINE @VA12126 01289400
  1547. CLI IOERDATA+1,X'21' UNIT CHECK INITIATING PREPARE @VA12126 01289450
  1548. BE CNSLOGF YES, DISABLE - RE-ENABLE LINE @VA12126 01289500
  1549. NOT4331 DS 0H @VA12126 01289550
  1550. DROP R1 DISCONNECT ASSEMBLER @VA12126 01289600
  1551. SPACE 01289650
  1552. *********************************************************************** 01289700
  1553. * AN ERROR HAS OCCURRED WHICH IS EITHER RECOVERABLE OR WHICH * 01289750
  1554. * CAN NOT BE POSITIVELY IDENTIFIED AND MAY BE RECOVERABLE. IN * 01289800
  1555. * EITHER CASE THE TASK CAUSING THE ERROR WILL BE RETRIED UP TO * 01289850
  1556. * 16 TIMES BEFORE THE LINE IS DISABLED. * 01289900
  1557. *********************************************************************** 01289950
  1558. CNSRTRY EQU * RETRY FAILING I/O OPERATION @V200820 01290000
  1559. LH R1,RDEVRCNT RETRY COUNT ACCUMULATION @V200820 01291000
  1560. LA R1,1(0,R1) INCREMENT.. @V200820 01292000
  1561. STH R1,RDEVRCNT RESET FOR NEXT TIME THROUGH @V200820 01293000
  1562. CL R1,F16 HAVE WE TRIED ENOUGH TIMES ? @V200820 01294000
  1563. BH CNSRECR YES - SEE ABOUT RECORDING ERROR @V200820 01295000
  1564. L R6,RDEVCON POINTER TO FIRST CONTASK ON CHAIN@V200820 01296000
  1565. CL R1,F1 FIRST ERROR ?? @VA03757 01296100
  1566. BNE SDRDONE NO, CONTINUE PROCESS @VA03757 01296200
  1567. BAL R2,SDRSTAT YES, PREPARE TO UPDATE COUNTERS @VA03757 01296300
  1568. SDRDONE EQU * @VA03757 01296400
  1569. TM RDEVFLAG,RDEVACTV CONTASK ACTIVE NOW ? @V200820 01297000
  1570. BO CNRSTRT YES - RESTART THE TASK @V200820 01298000
  1571. TM RDEVFLAG,RDEVPREP EXECUTING PREPARE CCW ? @V200820 01299000
  1572. BO CNSIDLE YES - RE-ISSUE THE PREPARE @V200820 01300000
  1573. TM RDEVTFLG,RDEVREST ATTENTION RESET PROCESS ? @VA01394 01301000
  1574. BO CNBKPRP YES - RETRY THE PREPARE @VA01394 01302000
  1575. B CNSLOGF DISABLE THE LINE @VA03993 01303000
  1576. EJECT 01304000
  1577. CNSTLOG EQU * LOGHOLD OR LOGDROP PARM SPECIFIED@V200820 01305000
  1578. L R15,CONPNT NEXT CONTASK PTR @VA05049 01305050
  1579. LTR R15,R15 ANY CONTASK STACKED? @VA05049 01305100
  1580. BZ RTNCON NO--SIMPLE CASE @VA05049 01305150
  1581. ST R15,RDEVCON NEXT ONE ON TOP @VA05049 01305200
  1582. FINDEND L R3,CONPNT-CONTASK(,R15) LOOK FOR END @VA05049 01305250
  1583. LTR R3,R3 END OF CHAIN? @VA05049 01305300
  1584. BZ FOUND YES--QUE TO THE END @VA05049 01305350
  1585. LR R15,R3 SAVE THIS ONE @VA05049 01305400
  1586. B FINDEND CONTINUE SEARCH @VA05049 01305450
  1587. FOUND ST R6,CONPNT-CONTASK(,R15) PUT THE ONE LAST @VA05049 01305500
  1588. ST R3,CONPNT CLEAR THE LAST PTR @VA05049 01305550
  1589. RTNCON EQU * @VA05049 01305600
  1590. SLR R3,R3 CLEAR REG3 @VA05049 01305650
  1591. MVI RDEVPCNT,X'00' RESET RETRY COUNT @VA08988 01305655
  1592. IC R3,CONPARM SAVE THE PARAMETER BYTE @V200820 01306000
  1593. CALL DMKQCNCL CLEAR ANY CONTASK STACK @V200820 01307000
  1594. STC R3,TEMPSAVE PUT THE PARMS DOWN @V200820 01308000
  1595. TM TEMPSAVE,LOGDROP DROP THE LINE ? @V200820 01309000
  1596. BO CNSNOFF YES - DISBABLE AND RE-ENABLE@V200820 01310000
  1597. TM RDEVFLAG,RDEVDISB SHOULD WE DISABLE THE LINE ?@V200820 01311000
  1598. BO CNSNOFF YES - GO DO THAT @V200820 01312000
  1599. L R1,ASYSVM GET ADDRESS OF SYSTEM VMBLOK @V407508 01313100
  1600. SWTCHVM OPT=UNLOCK SWITCH TO THE SYSTEM VMBLOK @V407508 01313200
  1601. ST R11,RDEVUSER RESET REAL DEVICE USER @V200820 01316000
  1602. B CNSENAB GO RE-ENABLE THE DEVICE @V200820 01317000
  1603. SPACE 2 01318000
  1604. CNSRECR EQU * PERMANENT I/O ERROR - RECORD IT @V200820 01319000
  1605. LTR R10,R10 DO WE HAVE AN IOBLOK ? @V200820 01320000
  1606. BNP CNSLOGF NO -- JUST DISABLE THE LINE @V200820 01321000
  1607. L R1,IOBIOER IOERBLOK POINTER IN THE IOBLOK @V200820 01322000
  1608. LTR R1,R1 IS THERE AN IOERBLOK ? @V200820 01323000
  1609. BNP CNSLOGF NO -- @V200820 01324000
  1610. USING IOERBLOK,R1 @V200820 01325000
  1611. TM IOERDATA,INTREQ WAS IT INTERVENTION REQUIRED@V200820 01326000
  1612. BZ CNSRECS NO, GO ISSUE MESSAGE @VA06352 01327150
  1613. CLI RDEVPCNT,X'10' CHNL PGM RETRIED 16 TIMES? @VA08988 01332100
  1614. BH CNSRECS1 YES, JUST DISABLE THE LINE @VA08988 01332200
  1615. SR R1,R1 CLEAR REGISTER @VA08988 01332300
  1616. IC R1,RDEVPCNT INCREMENT... @VA08988 01332400
  1617. LA R1,1(0,R1) THE RETRY... @VA08988 01332500
  1618. STC R1,RDEVPCNT COUNT. @VA08988 01332600
  1619. B CNSLOGF DISABLE THEN RE-ENABLE LINE @VA08988 01332700
  1620. EJECT 01333700
  1621. CNSRECS EQU * @VA03616 01335000
  1622. TM VMOSTAT,VMSYSOP ERROR ON THE OPERATOR'S LINE@V200820 01336000
  1623. BO CNSRERR YES - SKIP THE MESSAGE @V200820 01337000
  1624. SPACE 01337500
  1625. CNSRECS1 SLR R2,R2 CLEAR A WORK AREA @VA06352 01338100
  1626. ICM R2,8,IOERDATA PICK UP THE SENSE BYTE @V200820 01339000
  1627. BZ CNSLOGF STRANGE - NO BITS ARE SET @V200820 01340000
  1628. SLR R3,R3 CLEAR MESSAGE NUMBER INDEX @V200820 01341000
  1629. SPACE 01341500
  1630. CNSRETR EQU * DETERMINE WHICH ERROR MESSAGE @V200820 01342000
  1631. LA R3,1(0,R3) INCREMENT MESSAGE NUMBER INDEX @V200820 01343000
  1632. ALR R2,R2 SHIFT BIT TO LEFT AND SET CC @VA02588 01344000
  1633. BC 12,CNSRETR LOOP IF NO CARRY @VA02588 01345000
  1634. IC R2,MSGNUM-1(R3) SET GR2 = MESSAGE NUMBER @V200820 01346000
  1635. STC R2,IOERNUM SET IN IOERBLOK FOR DMKMSWR @V200820 01347000
  1636. ST R1,RDEVIOER POINTER TO IOERBLOK IN RDEVBLOK @V200820 01348000
  1637. L R0,=C'CNS ' MODULE IDENTIFIER TO GR0 @V200820 01349000
  1638. CALL DMKMSWR,AFFINITY FORMAT AND TYPE MESSAGE @V407508 01350100
  1639. SLR R0,R0 @V200820 01351000
  1640. ST R0,RDEVIOER CLEAR OUT IOERBLOK POINTER @V200820 01352000
  1641. TM IOERDATA,INTREQ IS THIS INTERVENTION REQ??? @VA06352 01352100
  1642. BO CNSDISA NOW DISABLE LINE @VA06352 01352200
  1643. SPACE 01352600
  1644. CNSRERR EQU * RECORD ERROR ON LOGREC CYLINDER @V200820 01353000
  1645. OI IOBSTAT,IOBFATAL SET PERMANENT I/O ERROR FLAG @VA03358 01354000
  1646. CALL DMKIOERR,AFFINITY RECORDING SUPERVISOR @V407508 01355100
  1647. NI IOBSTAT,X'FF'-IOBFATAL CLEAR PERMANENT FLAG @VA03358 01356000
  1648. B CNSDISA DISABLE THE LINE ONCE AND FOR ALL@V200820 01357000
  1649. DROP R1 @V200820 01358000
  1650. EJECT 01440000
  1651. *. 01441000
  1652. * SUBROUTINE NAME - 01442000
  1653. * 01443000
  1654. * DMKCNSEN - ENABLE OR DISABLE A SLOW-SPEED TERMINAL LINE 01444000
  1655. * 01445000
  1656. * ATTRIBUTES - 01446000
  1657. * 01447000
  1658. * RE-ENTRANT, RESIDENT, ENTERED VIA GOTO OR CPEXBLOK 01448000
  1659. * 01449000
  1660. * ENTRY CONDITIONS - 01450000
  1661. * 01451000
  1662. * GPR 8 = RDEVBLOK OF THE LINE TO BE ENABLED OR DISABLED 01452000
  1663. * GPR 12 = ADDRESS OF DMKCNSEN 01453000
  1664. * 01454000
  1665. * EXIT CONDITIONS - 01455000
  1666. * 01456000
  1667. * EXIT IS MADE VIA A GOTO DMKDSPCH 01457000
  1668. * 01458000
  1669. * OPERATION - EXECUTION MUST BE ON THE I/O PROCESSOR IN AP-MODE 01459100
  1670. * 01460000
  1671. * 1. IF THE LOGON PROCESS HAS BEEN INITIATED, EXIT. 01461000
  1672. * 2. IF THIS IS A DISABLE REQUEST, ('RDEVDISB' SET IN 01462000
  1673. * 'RDEVFLAG') RESET RDEVUSER TO THE SYSTEM VMBLOK, 01463000
  1674. * HALT AN ACTIVE ENABLE OR PREPARE, AND DISABLE THE 01464000
  1675. * LINE VIA A CONTROL CONTASK. 01465000
  1676. * 3. IF THIS IS AN ENABLE REQUEST, RESET THE RDEVBLOK FLAGS 01466000
  1677. * AND CHECK THE TERMINAL DEVICE TYPE. 01467000
  1678. * 4. FOR 2741, 1050, TWX, ISSUE THE APPROPRIATE ENABLE CCW 01468000
  1679. * SEQUENCE (SAD, FOLLOWED BY ENABLE). 01469000
  1680. * 5. FOR 3210, 3215, ETC., WRITE THE 'VM/370 ONLINE' MESSAGE 01470000
  1681. * AND SOUND THE CONSOLE ALARM. 01471000
  1682. *. 01472000
  1683. EJECT 01473000
  1684. DROP R13 @V200820 01474000
  1685. USING DMKCNSEN,R12 @V200820 01475000
  1686. DMKCNSEN DS 0D ENTRY TO ENABLE OR DISABLE A LINE@V200820 01476000
  1687. LM R12,R13,CNSBASE ESTABLISH ADDRESSABILITY @V200820 01477000
  1688. USING DMKCNS,R12,R13 @V200820 01478000
  1689. SPACE 01479000
  1690. SLR R0,R0 CONSTANT @V200820 01480000
  1691. MVI RDEVPCNT,X'00' RESET RETRY COUNT @VA08988 01480100
  1692. STH R0,RDEVRCNT CLEAR THE REAL DEVICE RETRY COUNT@V200820 01481000
  1693. SLR R10,R10 CLEAR THE IOBLOK REGISTER @V200820 01482000
  1694. TM RDEVTFLG,RDEVLOG HAS LOGON BEEN INITIATED ? @V200820 01483000
  1695. BO CNSEXIT YES - EXIT IMMEDIATELY @V200820 01484000
  1696. TM RDEVFLAG,RDEVACTV IS THERE AN ACTIVE TASK ? @VM08581 01485000
  1697. BO CNSEXIT YES - EXIT FORTHWITH @VM08581 01486000
  1698. SWITCH CONTINUE PROCESSING ON MAIN PROC @V407508 01486100
  1699. TM RDEVFLAG,RDEVDISB IS THIS A DISABLE REQUEST ? @V200820 01487000
  1700. BO CNSDISB YES - DISABLE AND CLEAN UP @V200820 01488000
  1701. TM RDEVTFLG,RDEVCTL I/O ACTIVE ON THIS LINE ? @V200820 01489000
  1702. BO CNSEXIT YES - GOTO DMKDSPCH @V200820 01490000
  1703. L R1,RDEVUSER GET ADDRESS OF CORRECT VMBLOK @V407508 01491100
  1704. SWTCHVM OPT=STAY SWITCH TO THE CORRECT VMBLOK @V407508 01491200
  1705. B CNSENAB @VA04576 01493250
  1706. CNSBASE DC A(DMKCNS,DMKCNS+4096) BASE ADDRESSABILITY @VA04576 01493500
  1707. SPACE 01494000
  1708. CNSENAB EQU * ENABLE TP LINE FOR USER LOGON @V200820 01495000
  1709. TM RDEVSTA2,RETRYSW IS RETRY SWITCH ON ? @VA07215 01495200
  1710. BO CNSARND YES, DON'T CLEAR RETRY COUNT @VA07215 01495400
  1711. XC RDEVRCNT(2),RDEVRCNT CLEAR RETRY COUNT @VA07215 01495600
  1712. CNSARND OI RDEVSTA2,RETRYSW TURN ON RETRY SWITCH @VA07215 01495800
  1713. NI RDEVFLAG,RDEVEPMD LEAVE ONLY THIS FLAG SET @V200820 01496000
  1714. OI RDEVFLAG,RDEVPSUP+RDEVENAB PRINT SUPPRESS, EN@V200820 01497000
  1715. NI RDEVTFLG,255-(RDEVLOG+RDEVATOF) RESET THESE @V200820 01498000
  1716. NI RDEVSTA2,255-RDEVDROP CLEAR LOGDROP FLAG @VA04688 01498500
  1717. CLI RDEVTYPE,TYP3210 EBCDIC SYSTEM CONSOLE ? @V200820 01499000
  1718. BE EBCONLN YES - WRITE 'VM/370 ONLINE' @V200820 01500000
  1719. SLR R1,R1 @V200820 01501000
  1720. IC R1,RDEVSADN PICK UP SAD INDICATOR (0,1,2,3,4)@V200820 01502000
  1721. SLL R1,4(0) CONVERT TO CCW STRING INDEX @V200820 01503000
  1722. LA R5,ENABLE0(R1) GR5 = ADDRESS OF ENABLE SEQUENCE @V200820 01504000
  1723. CNSIOEN EQU * @VA02518 01505000
  1724. BAL R2,CNSTRIO ISSUE A HARD START I/O @V200820 01506000
  1725. BZ CNIGNOR O.K. - WAIT FOR THE INTERRUPT @VM08575 01507000
  1726. TM CSW+4,CE+DE PENDING INTERRUPT CLEARED ? @VA02518 01508000
  1727. BO CNSIOEN YES - RETRY ONE MORE TIME @VA02518 01509000
  1728. CLI 0(R5),X'27' FINISH ON THE ENABLE ITSELF ? @V200820 01510000
  1729. BE CNSRTRY YES - USE REGULAR RETRY LOGIC @V200820 01511000
  1730. B CNSNOFF DISABLE AND RE-ENABLE THE LINE @V200820 01512000
  1731. SPACE 01513000
  1732. EJECT 01515000
  1733. CNSDISB EQU * DISABLE COMMAND WAS ISSUED @V200820 01516000
  1734. CLI RDEVTYPE,TYP3210 EBCDIC SYSTEM CONSOLE ? @V200820 01517000
  1735. BE CNSNOFF YES - CLEAN UP FLAGS, EXIT @V200820 01518000
  1736. TM RDEVTFLG,RDEVCTL CONTROL I/O IN PROGRESS ? @V200820 01519000
  1737. BZ CNSNOFF NO -- UNUSUAL, BUT FIX IT @V200820 01520000
  1738. B INTHALT KNOCK DOWN ENABLE OR PREPARE @VM08581 01521000
  1739. SPACE 2 01522000
  1740. EBCONLN EQU * WRITE 'VM/370 ONLINE' FOR 3215 @V200820 01523000
  1741. MVC EBCLMSG+8(1),INSTWRD1 indicate VM/370 or VM/380 HRC370DK 01523100
  1742. LA R0,CONTSIZE+(EBCLMSGL+7)/8 CONTASK SIZE @V200820 01524000
  1743. BAL R9,CNSGTSZ GET A CONTASK FOR THE WRITE @V200820 01525000
  1744. MVI CONSTAT,CONOUTPT THIS IS REALLY OUTPUT @V200820 01526000
  1745. MVI CONPARM,ALARM SOUND THE ALARM @V200820 01527000
  1746. MVC CONDATA(EBCLMSGL),EBCLMSG MOVE IN MSG @V200820 01528000
  1747. LA R1,CONDATA START OF DATA FOR WRITE @V200820 01529000
  1748. ST R1,CONADDR SET FOR INITIALIZATION @V200820 01530000
  1749. LA R0,EBCLMSGL DATA LENGTH @V200820 01531000
  1750. STH R0,CONCNT . . . @V200820 01532000
  1751. B INCTASK INITIALIZE AND START THE TASK @V200820 01533000
  1752. SPACE 01533500
  1753. CNSSYNC DS 0H @VA11726 01534050
  1754. NI RDEVSTA2,X'FF'-RDEVSYNC RESET SYNC FLAG @VA11726 01534100
  1755. TM VMOSTAT,VMCF IS CONSOLE FUNCTION RUNNING? @VA11726 01534150
  1756. BZ CNSSYNC1 NO, PROCESS ATTENTION @VA11726 01534200
  1757. BAL R2,RESATTN THROW ATTN INTERRUPT AWAY @VA11726 01534250
  1758. B CNSIOSR1 RETURN TO IOS CALL @VA11726 01534300
  1759. SPACE 01534350
  1760. CNIGNOR EQU * FRET IOBLOK, EXIT TO DMKDSPCH @V200820 01535000
  1761. TM RDEVSTA2,RDEVSYNC ATTN WITH ACTIVE I/O ?? @VA08275 01535100
  1762. BZ CNIGNOR1 NO, DON'T SYNC THEN @VA08275 01535200
  1763. NI RDEVSTA2,X'FF'-RDEVSYNC RESET SYNC FLAG @VA08275 01535400
  1764. SPACE 01535420
  1765. CNSSYNC1 DS 0H @VA11726 01535450
  1766. USING CPEXBLOK,R5 @VA11261 01535510
  1767. LTR R10,R10 @VA13993 01535520
  1768. BZ CNIGNOR1 @VA13993 01535525
  1769. L R5,IOBMISC GET ATTENTION CPEXBLOK @VA11261 01535530
  1770. LTR R5,R5 DO WE HAVE ONE ? @VA12345 01535535
  1771. BZ CNIGNOR1 NO THEN IGNORE @VA12345 01535540
  1772. BAL R9,FRETIOB RETURN IOBLOK, IOERBLOK @VA11261 01535550
  1773. LM R0,R15,CPEXR0 GET ORIGINATOR REGISTERS @VA11261 01535570
  1774. CALL DMKFRET FRET CPEXBLOK @VA11261 01535590
  1775. DROP R5 @VA11261 01535610
  1776. B CNSCFMD1 THIS IS CPEXADD (RETURN ADDRESS) @VA11261 01535630
  1777. SPACE 01535660
  1778. CNIGNOR1 DS 0H @VA08275 01535700
  1779. BAL R9,FRETIOB RETURN IOBLOK, IOERBLOK @V200820 01536000
  1780. GOTO DMKDSPCH GET OUT OF HERE @V200820 01537000
  1781. EJECT 01537020
  1782. SDRSTAT EQU * @VA05194 01537050
  1783. LTR R10,R10 DOES IOBLOK EXISTS? @VA05194 01537100
  1784. BZR R2 NO--FORGET SDR UPDATE @VA05194 01537150
  1785. ICM R1,15,IOBIOER GET IOERBLOK @VA05194 01537200
  1786. BZR R2 NO IOERBLOK--RETURN @VA05194 01537250
  1787. USING IOERBLOK,R1 @VA05194 01537300
  1788. NI IOERFLG3,X'FF'-IOERREAD RESET FLAG @VA05194 01537350
  1789. ST R1,RDEVIOER POINTER TO IOERBLOK IN RDEVBLOK @VA05194 01537400
  1790. LTR R6,R6 IS THERE A CONTASK? @VA05194 01537450
  1791. BZ NORDFLAG NO--DO NOT SET READ FLAG @VA05194 01537500
  1792. TM CONSTAT,CONOUTPT+CONCNTL INPUT CONTASK? @VA05194 01537550
  1793. BNZ NORDFLAG NO--DO NOT SET READ FLAG @VA05194 01537600
  1794. OI IOERFLG3,IOERREAD TURN ON READ FLAG @VA05194 01537650
  1795. DROP R1 @VA05194 01537700
  1796. SPACE 01537720
  1797. NORDFLAG EQU * @VA05194 01537750
  1798. SLR R1,R1 CLEAR PARAMETER REG @VA05194 01537800
  1799. CALL DMKIOEST,AFFINITY UPDATE STATISTICAL COUNTERS @V407508 01537860
  1800. ST R1,RDEVIOER CLEAR OUT IOERBLOK PTR @VA05194 01537900
  1801. BR R2 RETURN TO IN LINE CODE @VA05194 01537950
  1802. SPACE 2 01538050
  1803. RESATTN EQU * ROUTINE TO IGNORE ATTN INTERRUPT @VA11726 01538060
  1804. LR R4,R10 REMEMBER CURRENT IOBLOK ADDR @VA11726 01538070
  1805. L R3,IOBMISC GET ATTENTION CPEXBLOK @VA11726 01538080
  1806. LTR R3,R3 WE GOT ONE @VA12345 01538081
  1807. BZR R2 NO... THEN RETURN @VA12345 01538082
  1808. USING CPEXBLOK,R3 SET ADDRESSABILITY TO CPEXBLOK @VA11726 01538090
  1809. L R10,CPEXR10 GET ATTENTION IOBLOK @VA11726 01538100
  1810. BAL R9,FRETIOB FRET ATTN IOBLOK @VA11726 01538110
  1811. LA R0,CPEXSIZE GET SIZE OF CPEXBLOK IN DW @VA11726 01538120
  1812. LR R1,R3 GET CPEXBLOK ADDR IN R1 @VA11726 01538130
  1813. CALL DMKFRET FRET ATTENTION CPEXBLOK @VA11726 01538140
  1814. LR R10,R4 RESTORE CURRENT IOBLOK ADDR @VA11726 01538150
  1815. BR R2 RETURN TO THE CALLER @VA11726 01538160
  1816. EJECT 01538170
  1817. FRETIOER EQU * @V200820 01539000
  1818. L R1,IOBIOER GET IOERBLOK @V200820 01540000
  1819. LTR R1,R1 IS THERE ONE ? @V200820 01541000
  1820. BCR 8,R9 NO -- RETURN @V200820 01542000
  1821. USING IOERBLOK,R1 @V200820 01543000
  1822. LA R0,IOERSIZE GET SIZE OF IOERBLOK IN DBL-WDS @V200820 01544000
  1823. AH R0,IOEREXT ADD EXTRA SIZE OF IOERBLOK @V200820 01545000
  1824. DROP R1 @V200820 01546000
  1825. CALL DMKFRET RETURN IT TO FREE STORAGE @V200820 01547000
  1826. SLR R1,R1 CLEAR @V200820 01548000
  1827. ST R1,IOBIOER IOERBLOK PTR @V200820 01549000
  1828. NI IOBFLAG,X'FF'-IOBERP IND ERP NOT IN CTL @VA03381 01550000
  1829. BR R9 @V200820 01551000
  1830. SPACE 2 01552000
  1831. FRETIOB EQU * RETURN IOBLOK TO FREE STORAGE @V200820 01553000
  1832. LTR R10,R10 DO WE HAVE AN IOBLOK ? @V200820 01554000
  1833. BCR 8,R9 NO -- JUST RETURN @V200820 01555000
  1834. ST R9,BALR9 SAVE GR9 FOR A MINUTE @V200820 01556000
  1835. BAL R9,FRETIOER RELEASE IOERBLOK, IF ANY @V200820 01557000
  1836. LA R0,IOBSIZE SIZE OF IOBLOK @V200820 01558000
  1837. LR R1,R10 @V200820 01559000
  1838. CALL DMKFRET RETURN THE IOBLOK TO FREE STORAGE@V200820 01560000
  1839. SLR R10,R10 NO MORE IOBLOK @V200820 01561000
  1840. L R9,BALR9 RESTORE RETURN REGISTER @V200820 01562000
  1841. BR R9 . . . @V200820 01563000
  1842. SPACE 2 01564000
  1843. CNSGTSK EQU * BUILD AND INITIALIZE CONTROL CONTASK @V200820 01565000
  1844. LA R0,CONTSIZE SIZE OF A MINIMUM CONTASK @V200820 01566000
  1845. CNSGTSZ EQU * BUILD A LARGER CONTROL TASK @V200820 01567000
  1846. CALL DMKFREE @V200820 01568000
  1847. XC 0(CONTSIZE*8,R1),0(R1) CLEAR CONTASK TO ZEROES@V200820 01569000
  1848. LR R6,R1 USE STANDARD GR6 ADDRESSABILITY @V200820 01570000
  1849. L R1,RDEVCON CURRENT CONTASK STACK, IF ANY @V200820 01571000
  1850. ST R6,RDEVCON CONTROL TASK TO HEAD OF CHAIN @V200820 01572000
  1851. ST R1,CONPNT ...RECONNECT OLD CONTASK CHAIN @V200820 01573000
  1852. STH R0,CONTSKSZ SAVE CONTASK SIZE IN DOUBLE-WORDS@V200820 01574000
  1853. MVI CONSTAT,CONCNTL+CONESCP CONTROL CONTASK @V200820 01575000
  1854. ST R11,CONUSER SET VMBLOK ADDRESS @V200820 01576000
  1855. BR R9 RETURN @V200820 01577000
  1856. EJECT 01578000
  1857. AIF (NOT &TRACE(9)).NTR3 **AIF** 01579000
  1858. CNTRACE EQU * CP TRACE TABLE ENTRY FOR SIO, HIO@V200820 01580000
  1859. TM TRACFLG2,TRACBEF I/O TRACING ACTIVE ? @V200820 01581000
  1860. BZ CNNOTRC NO -- RESTORE CC AND RETURN @V200820 01582000
  1861. STM R2,R4,TEMPSAVE SAVE TRACE WORK REGS @V407508 01583100
  1862. SLR R4,R4 CLEAR REG4 FOR ENTRY FLAG @V407508 01583600
  1863. IC R4,0(,R15) LOAD ENTRY TYPE FLAG @V407508 01584100
  1864. TRACE CODE=(R4),R14,R2,R3 GET CURRENT TRACE ENTRY @V407508 01584600
  1865. STCM R15,8,1(R14) MOVE IN THE CONDITION CODE @V200820 01585000
  1866. NI 1(R14),X'30' ...AND ONLY THE COND CODE @V200820 01586000
  1867. STH R1,2(0,R14) SAVE THE REAL DEVICE ADDRESS @V200820 01587000
  1868. ST R10,4(0,R14) IOBLOK ADDRESS, IF ANY @V200820 01588000
  1869. MVC 8(4,R14),CAW CHANNEL ADDRESS WORD @V200820 01589000
  1870. XC 12(4,R14),12(R14) CLEAR LAST WORD @V200820 01590000
  1871. CLI 1(R14),X'10' CONDITION CODE ONE ? @V200820 01591000
  1872. BNE *+10 NO -- DO NOT MOVE IN CSW @V200820 01592000
  1873. MVC 12(4,R14),CSW+4 MOVE IN CSW STATUS @V200820 01593000
  1874. LM R2,R4,TEMPSAVE RESTORE REGS USED BY TRACE @V407508 01594100
  1875. CNNOTRC EQU * RESTORE CONDITION CODE, RETURN @V200820 01599000
  1876. SPM R15 RESET COND. CODE @V200820 01600000
  1877. B 2(0,R15) SKIP OVER TRACE FLAG ON RETURN @V200820 01601000
  1878. .NTR3 ANOP 01602000
  1879. SPACE 01603000
  1880. CNCLEAR EQU * SUBROUTINE TO CLEAR READ INPUT BUFFER @V200820 01604000
  1881. L R1,CONRETN POINTER TO ORIGINAL SAVEAREA @V200820 01605000
  1882. USING SAVEAREA,R1 @V200820 01606000
  1883. L R0,SAVER1 ADDRESS OF READ BUFFER @V200820 01607000
  1884. L R1,SAVER0 LENGTH OF BUFFER @V200820 01608000
  1885. DROP R1 @V200820 01609000
  1886. ST R0,CONADDR RESET BUFFER ADDRESS @V200820 01610000
  1887. STH R1,CONCNT . . . BUFFER LENGTH @V200820 01611000
  1888. NI CONSTAT,255-CONESCP CCW STRING CLOBBERED @V200820 01612000
  1889. SR R3,R3 ZERO ADDRESS, ZERO PAD @V200820 01613000
  1890. MVCL R0,R2 CLEAR INPUT BUFFER TO ZEROES @V200820 01614000
  1891. BR R9 RETURN TO CALLER @V200820 01615000
  1892. EJECT 01616000
  1893. CNSRETN EQU * RETURN FINISHED TASK TO DMKQCNET @V200820 01617000
  1894. L R15,CONPNT REMOVE TOP CONTASK FROM CHAIN @V200820 01618000
  1895. ST R15,RDEVCON . . . @V200820 01619000
  1896. SLR R15,R15 @V200820 01620000
  1897. ST R15,CONPNT CLEAR FORWARD POINTER FOR DMKQCN @V200820 01621000
  1898. CALL DMKQCNET DISPOSE OF THIS TASK @V200820 01622000
  1899. L R6,RDEVCON GR6 = NEW TOP CONTASK @V200820 01623000
  1900. BR R7 RETURN @V200820 01624000
  1901. SPACE 01624007
  1902. WRITERM EQU * WRITE ERROR MESSAGE TO OPERATOR @V200820 01624014
  1903. CALL DMKSCNRD GET 'CCU' DEVICE ADDR IN GR1 @VM08561 01624021
  1904. CALL DMKCVTBH CONVERT FOR OUTPUT @VM08561 01624028
  1905. ICM R1,8,BLANKS INSERT HIGH-ORDER BLANK @VM08561 01624035
  1906. L R0,MSGHEAD PUT 'CNS', X'00' IN GR0 @V200820 01624042
  1907. O R2,MSGPARM PARMS FOR DMKERMSG @V200820 01624049
  1908. CALL DMKERMSG,AFFINITY SEND MSG, RETURN HERE @V407508 01624056
  1909. BR R9 INTERNAL RETURN @V200820 01624063
  1910. EJECT 01624070
  1911. CNSTRIO EQU * START UP I/O WITHOUT DMKIOS @V200820 01624077
  1912. CALL DMKSCNRD GET 'CCU' DEVICE ADDRESS IN GR1 @V200820 01624084
  1913. ST R5,CAW SET THE CHANNEL ADDRESS WORD @V200820 01624091
  1914. OI RDEVTFLG,RDEVCTL CONTROL OPERATION ACTIVE @V200820 01624098
  1915. NI RDEVFLAG,255-RDEVACTV CONTASK NOT ACTIVE NOW @V200820 01624105
  1916. SPACE 01624112
  1917. RETRY EQU * @VA06281 01624119
  1918. LA R15,500 RETRY SIO COUNT @VA03542 01624126
  1919. CNSTSIO EQU * @V200820 01624133
  1920. XC CSW(8),CSW CLEAR THE CSW BEFORE START I/O @VA02518 01624140
  1921. SIO 0(R1) ATTEMPT TO START THE I/O @V200820 01624147
  1922. BC 13,CNSTSIO1 @VA03542 01624154
  1923. CLI RDEVTYPC,CLASTERM DEVICE A TERMINAL? @VA03542 01624161
  1924. BNE CNSTSIO NO...RETRY @VA03542 01624168
  1925. CLI RDEVTYPE,TYPTTY SUPPORTED TYPE? @VA03542 01624175
  1926. BH CNSTSIO NO...RETRY (BRANCH HIGH) @VA03542 01624182
  1927. BCT R15,CNSTSIO LOOP ON SIO @VA03542 01624189
  1928. HIO 0(R1) CLEAR UCW @VA03542 01624196
  1929. CLRIO 0(R1) CLEAR CC=3 CONDITION @VA03542 01624203
  1930. SPACE 01624210
  1931. CNSTSIO1 EQU * @VA03542 01624217
  1932. AIF (NOT &TRACE(9)).NTR2 **AIF** 01624224
  1933. BAL R15,CNTRACE TRACE THE START I/O @V200820 01624231
  1934. DC X'0B00' TRACE ENTRY FLAG @V200820 01624238
  1935. .NTR2 ANOP 01624245
  1936. BCR 8,R2 CC = 0 => RETURN @V200820 01624252
  1937. BC 1,CNSICC3 CC = 3 => NOT OPERATIONAL @V200820 01624259
  1938. * CC = 1 => CSW STATUS STORED 01624266
  1939. TM CSW+5,PRGC+PRTC+CHC+CCC+IFCC FATAL? @VA13158 01624268
  1940. BO CNSICC3 YES, MSG OPERATOR - VARIED @VA13158 01624270
  1941. * OFFLINE, DISABLED 01624272
  1942. TM CSW+4,SM+BUSY SHORT CONTROL UNIT BUSY ? @V200820 01624273
  1943. BO RETRY YES RETRY THE OPERATION @VA06281 01624280
  1944. TM CSW+4,BUSY+CE UNSTACKED INTERRUPT @VA11780 01624287
  1945. BO CC1RET YES, JUST RETURN @VA11780 01624294
  1946. LTR R10,R10 IOBLOK STILL AVAILABLE @VA11780 01624301
  1947. BZ CC1RET NO, RETURN @VA11780 01624308
  1948. SPACE 1 01624310
  1949. CLI RDEVTYPE,TYP3210 3215 TYPE? @VA12733 01624312
  1950. BER R2 YES,RETURN TO CALLER @VA12733 01624314
  1951. MVC IOBCSW,CSW SAVE CSW FROM INTERRUPT @VA11780 01624315
  1952. OI IOBCSW+4,CE+DE INSURE CE AND DE @VA11780 01624322
  1953. B CNSNINT PERFORM NORMAL INTERRUPT PROCESS @VA11780 01624329
  1954. EJECT 01624336
  1955. CC1RET DS 0H @VA11780 01624343
  1956. CLI *,X'00' NO - SET COND. CODE NON-ZERO @VA01826 01624350
  1957. BR R2 RETURN TO THE CALLER @VA13158 01624358
  1958. SPACE 01624364
  1959. CNSICC3 EQU * CONDITION CODE THREE - NOT OPERATIONAL @V200820 01624371
  1960. TM VMOSTAT,VMSYSOP THE OPERATOR'S CONSOLE ? @V200820 01624378
  1961. BO CNSLOGF YES - DO NOT TRY TO SEND MSG@V200820 01624385
  1962. TM RDEVSTAT,RDEVDISA IS THIS ONE ALREADY OFFLINE @V200820 01624392
  1963. BO CNIGNOR YES - DO NOT GET INTO A LOOP@V200820 01624399
  1964. OI RDEVSTAT,RDEVDISA VARY THE TERMINAL OFFLINE @V200820 01624406
  1965. NI RDEVFLAG,255-RDEVENAB DO NOT TRY DISABLE @VM08561 01624413
  1966. TM IOBSTAT,IOBCC3 IS THIS A CC3? @VA13158 01624415
  1967. BNO CNSDISA NO - DON'T SEND NOT OPERATIONAL @VA13158 01624417
  1968. * MESSAGE 01624419
  1969. LA R2,455(0) ERROR MESSAGE NUMBER @V200820 01624420
  1970. BAL R9,WRITERM SEND MESSAGE TO THE OPERATOR @V200820 01624427
  1971. SPACE 01624434
  1972. CNSDISA EQU * LINE TO BE DISABLED @V200820 01624441
  1973. OI RDEVFLAG,RDEVDISB DISABLE THIS LINE A.S.A.P. @V200820 01624448
  1974. LA R2,454(0) ERROR MESSAGE NUMBER @V200820 01624455
  1975. BAL R9,WRITERM SEND MESSAGE TO THE OPERATOR @V200820 01624462
  1976. SPACE 01624469
  1977. CNSLOGF EQU * FATAL TERMINAL ERROR, OR SOME SUC@V200820 01624476
  1978. L R1,RDEVUSER GET ADDRESS OF CORRECT VMBLOK @V407508 01624483
  1979. SWTCHVM OPT=STAY SWITCH TO THE CORRECT VMBLOK @V407508 01624490
  1980. CALL DMKQCNCL CLEAR ANY TERMINAL CONTASK STACK @V200820 01624497
  1981. CL R11,ASYSVM IS THERE AN ACTIVE MACHINE ? @V200820 01624504
  1982. BE CNSNOFF NO -- JUST DISABLE THE LINE @V200820 01624511
  1983. TM RDEVSTA2,RDEVDROP USER WILL LOGOFF? @VA04688 01624518
  1984. BO CNSNOFF YES--PREVENT DOUBLE FRET VMBLOK @VA04688 01624525
  1985. C R8,VMTERM IS THIS THE VIRTUAL CONSOLE? @VA07735 01624527
  1986. BNE CNSNOFF NO, DON'T LOGOFF V.M. FOR I/O ERR@VA07735 01624529
  1987. * INITIATE THE DISCONNECT WITH TIMEOUT PROCEDURE 01624531
  1988. LTR R10,R10 IOB IN R10 ? @VA13198 01624533
  1989. BNZ NOIOB YES @VA13198 01624535
  1990. L R10,RDEVAIOB ACTIVE IOB @VA13198 01624537
  1991. LTR R10,R10 HAVE ONE ? @VA13198 01624539
  1992. BZ NOIOB NO @VA13198 01624541
  1993. LR R9,R7 SAVE R7 @VA13198 01624543
  1994. ST R6,IOBMISC2 SAVE R6 @VA13198 01624545
  1995. LH R1,IOBRADD DEVICE ADDRESS @VA13198 01624547
  1996. CALL DMKSCNRU @VA13198 01624549
  1997. BZ HAVEBL HAVE ALL BLOKS @VA13198 01624551
  1998. L R8,VMTERM RDEVICE @VA13198 01624553
  1999. B DEV RESET DEVICE @VA13198 01624555
  2000. HAVEBL EQU * @VA13198 01624557
  2001. NI RCHSTAT-RCHBLOK(R6),X'FF'-RCHBUSY BUSY OFF @VA13198 01624559
  2002. NI RCUSTAT-RCUBLOK(R7),X'FF'-(RCUBUSY+RCUSCED) OFF @VA13198 01624561
  2003. DEV EQU * @VA13198 01624563
  2004. NI RDEVSTAT,X'FF'-(RDEVBUSY+RDEVSCED) TURN OFF @VA13198 01624565
  2005. LR R7,R9 RESTORE @VA13198 01624567
  2006. L R6,IOBMISC2 RESTORE @VA13198 01624569
  2007. SR R15,R15 ZERO @VA13198 01624571
  2008. ST R15,RDEVAIOB CLEAR ACTIVE IOB @VA13198 01624573
  2009. BAL R9,FRETIOB @VA13198 01624575
  2010. NOIOB EQU * @VA13198 01624577
  2011. CALL DMKQCNTO,AFFINITY PUT THIS MACHINE TO SLEEP @V407508 01624579
  2012. EJECT 01624581
  2013. CNSNOFF EQU * DISABLE THE LINE , POSSIBLY RE-ENABLE @V200820 01624583
  2014. * STOP CHARGING A SPECIFIC USER , SYSTEM NOW OWNS LINE 01624585
  2015. L R1,ASYSVM GET ADDRESS OF SYSTEM VMBLOK @V407508 01624588
  2016. SWTCHVM OPT=UNLOCK SWITCH TO THE SYSTEM VMBLOK @V407508 01624595
  2017. ST R11,RDEVUSER ... @V200820 01624602
  2018. NI RDEVFLAG,255-(RDEVIDNT+RDEVACTV+RDEVPREP) @V200820 01624609
  2019. NI RDEVSTA2,255-RDEVDROP CLEAR LOGDROP FLAG @VA04688 01624616
  2020. OI RDEVFLAG,RDEVPSUP ASSUME PRINT SUPPRESS @V200820 01624623
  2021. MVI RDEVTFLG,X'00' CLEAR THE TERMINAL FLAG BYTE@V200820 01624630
  2022. CLI RDEVTYPE,TYP3210 IS THIS AN EBCDIC CONSOLE ? @V200820 01624637
  2023. BE CNSNOFN YES - GO TEST RDEVDISB FLAG @V200820 01624644
  2024. TM RDEVFLAG,RDEVENAB IS THE LINE ENABLED NOW ? @V200820 01624651
  2025. BZ CNIGNOR NO -- DO NOT REISSUE DISABLE@V200820 01624658
  2026. BAL R9,CNSGTSK GET A CONTROL CONTASK @V200820 01624665
  2027. MVC CONCCW1(8),DISABLED MOVE IN DISABLE CCW @V200820 01624672
  2028. CLI RDEVTYPE,TYPTTY TELEGRAPH-TYPE TERMINAL ? @V200820 01624679
  2029. BE CNSNOFS YES - JUST ISSUE THE DISABLE@V200820 01624686
  2030. MVI RDEVTYPE,TYPUNDEF DEVICE TYPE UNDEFINED @V200820 01624693
  2031. MVI RDEVTMCD,RDEVPTTC RESET TERMINAL LINE CODE @V200820 01624700
  2032. MVC CONCCW1(3*8),DISABLEC WRITE CIRCLE-C, DISABLE@V200820 01624707
  2033. CNSNOFS EQU * @V200820 01624714
  2034. MVI CONPARM,RDEVDISB FLAG THIS AS DISABLE TASK @V200820 01624721
  2035. B CNSTART START UP THE DISABLE @V200820 01624728
  2036. SPACE 01624735
  2037. CNSNOFC EQU * HERE WHEN THE DISABLE COMPLETES @V200820 01624742
  2038. TM IOBSTAT,IOBCC3 CONDITION CODE ON START I/O @V200820 01624749
  2039. BZ CNSNOFL NO -- @V200820 01624756
  2040. BM CNSNOFTX GO ISSUE DISABLE @VA11780 01624763
  2041. NI RDEVFLAG,255-RDEVENAB DON'T REISSUE DISABLE @V200820 01624770
  2042. B CNSDISA SEND OPERATOR MSG, DISABLE LINE @V200820 01624777
  2043. CNSNOFL EQU * @V200820 01624784
  2044. L R1,IOBCSW MAKE SURE WE STOPPED ON DISABLE @V200820 01624791
  2045. S R1,F8 BACK OFF TO CCW @VA04162 01624798
  2046. BNP CNIGNOR THROW IT AWAY (3705 EP) @VA04162 01624805
  2047. CLI 0(R1),X'2F' WAS THIS THE DISABLE ITSELF ? @V200820 01624812
  2048. BE CNSNOFT YES - NOW WE CAN RE-ENABLE @V200820 01624819
  2049. CNSNOFTX DS 0H NON ZERO COND CODE ON DISABLE @VA11780 01624826
  2050. MVC CONCCW1(8),DISABLED MOVE IN STAND-ALONE DISABLE @V200820 01624833
  2051. XC CONCCW2(3*8),CONCCW2 CLEAN UP THE CONTASK @V200820 01624840
  2052. B CNSTART . . .AND RE-ISSUE IT @V200820 01624847
  2053. CNSNOFT EQU * CLEAN UP RDEVBLOK, RE-ENABLE @V200820 01624854
  2054. CALL DMKQCNCL FLUSH THE LAST CONTASK @V200820 01624861
  2055. NI RDEVFLAG,255-RDEVACTV NOT ACTIVE ANY MORE @V200820 01624868
  2056. CNSNOFN EQU * @V200820 01624875
  2057. TM RDEVFLAG,RDEVDISB SHOULD WE RE-ENABLE THE LINE@V200820 01624882
  2058. BZ CNSENAB YES - GO DO JUST THAT @V200820 01624889
  2059. NI RDEVFLAG,255-(RDEVENAB+RDEVDISB) DISABLED @V200820 01624896
  2060. B CNIGNOR CLEAN UP AND EXIT FORTHWITH @V200820 01624903
  2061. EJECT 01625000
  2062. DS 0D @V200820 01626000
  2063. *---------------------------------------------------------------------* 01627000
  2064. * THE ENABLE CCW STRINGS ARE INDEXED BY 'RDEVSADN' * 01628000
  2065. ENABLE0 CCW X'13',0,CC+SILI,1 SETADDR ZERO @V200820 01629000
  2066. CCW X'27',0,SILI,1 ENABLE @V200820 01630000
  2067. ENABLE1 CCW X'17',0,CC+SILI,1 SETADDR ONE @V200820 01631000
  2068. CCW X'27',0,SILI,1 ENABLE @V200820 01632000
  2069. ENABLE2 CCW X'1B',0,CC+SILI,1 SETADDR TWO @V200820 01633000
  2070. CCW X'27',0,SILI,1 ENABLE @V200820 01634000
  2071. ENABLE3 CCW X'1F',0,CC+SILI,1 SETADDR THREE @V200820 01635000
  2072. CCW X'27',0,SILI,1 ENABLE @V200820 01636000
  2073. ENABLE4 CCW X'27',0,SILI,1 ENABLE ( RDEVSADN = 4 )@V200820 01637000
  2074. *---------------------------------------------------------------------* 01638000
  2075. SPACE 01639000
  2076. DISABLEC CCW X'01',ADDR50,CC+SILI,4 WRITE ADDRESS CHARACTER@V200820 01640000
  2077. CCW X'0D',BREAKCHR,CC+SILI,3 FORCE CONTROL MODE @V200820 01641000
  2078. DISABLED CCW X'2F',0,SILI,1 DISABLE THE LINE @V200820 01642000
  2079. SPACE 01643000
  2080. RESETTY CCW X'01',TTYSTMSG,SILI,L'TTYSTMSG @V200820 01644000
  2081. RESET41 CCW X'0D',BREAKCHR,CC+SILI,3 @V200820 01645000
  2082. RESET50 CCW X'01',STMSG,SILI,STMSGL @V200820 01646000
  2083. SPACE 01647000
  2084. INITRD CCW X'0D',BREAKCHR,CC+SILI,3 @V200820 01648000
  2085. CCW X'01',ADDR50,CC+SILI,L'ADDR50 @V200820 01649000
  2086. SPACE 01650000
  2087. RDERR50 CCW X'01',RDERR150,SILI+CD,L'RDERR150 HEADER CHARS @V200820 01651000
  2088. CCW X'00',RDERRBCD+1,SILI,L'RDERRBCD-1 'READ ERROR' @V200820 01652000
  2089. RDERR41 CCW X'0D',BREAKCHR,CC+SILI,3 'READ ERROR' @V200820 01653000
  2090. CCW X'01',RDERRBCD,SILI,L'RDERRBCD @V200820 01654000
  2091. RDERRTY CCW X'01',RDERRTTY,SILI,L'RDERRTTY 'READ ERROR' @V200820 01655000
  2092. SPACE 1 01656000
  2093. PREPCCW CCW X'06',0,SILI,1 WAIT FOR ATTENTION SIGNAL @V200820 01657000
  2094. SPACE 01658000
  2095. SENDC CCW X'01',ADDR50,SILI,14 @VA04576 01658500
  2096. BRK2741 CCW X'0D',BREAKCHR,CC+SILI,3 BREAK FOR 2741 @V200820 01659000
  2097. CCW X'01',EOADDR,SILI,1 @V200820 01660000
  2098. BRK1050 CCW X'01',AD50,CC+SILI,3 BREAK FOR 1050 @V200820 01661000
  2099. CCW X'06',0,CC+SILI,1 @V200820 01662000
  2100. CCW X'01',EOADDR,SILI,1 @V200820 01663000
  2101. BRKTTYS CCW X'01',XOFF,SILI,1 BREAK FOR TTY @V200820 01664000
  2102. SPACE 01665000
  2103. RAD1050 CCW X'01',ADREST50,CC+SILI,4 READ END FOR 1050 @V200820 01666000
  2104. CCW X'06',0,CC+SILI,1 @V200820 01667000
  2105. CCW X'01',EOADDR,SILI,*-* @V200820 01668000
  2106. SPACE 01669000
  2107. ALARMCCW CCW X'0B',0,SILI,1 RING THE CONSOLE ALARM @V200820 01670000
  2108. ADR4150 CCW X'01',ADRS4150,SILI+CC,*-* 1050, 2741 READ @V200820 01671000
  2109. CCW X'06',0,SILI+CC,1 @V200820 01672000
  2110. ACKREAD CCW X'0A',0,SKIP+SILI,1 READ ACK FROM 1050 @V200820 01673000
  2111. TTYREAD CCW X'01',TTYREDY,SILI+CC,2 READ PROMPTING FOR TTY @V200820 01674000
  2112. TTYMASK CCW X'01',TTYHIDE,SILI+CC,TTYHIDN MASK FOR TTY @V200820 01675000
  2113. REDSKIP CCW X'00',0,SKIP+SILI,4096 IGNORE EVERYTHING READ @V200820 01676000
  2114. NOPCCW CCW X'03',0,SILI,1 STANDARD NO-OP @V200820 01677000
  2115. MSK3210 CCW X'09',MASKCON,SILI+CC,8 WRITE MASK STRING @V200820 01678000
  2116. SPACE 01679000
  2117. TRANSIN DS 0F INPUT TRANSLATE TABLE ANCHORS @V200820 01680000
  2118. DC A(DMKTBLPI) PTTC/EBCD -> EBCDIC @VM03172 01681000
  2119. DC A(DMKTBLCI) CORRESPONDENCE -> EBCDIC @VM03172 01682000
  2120. DC A(DMKTBMNI) APL PTTC/EBCD -> EBCDIC @VM03172 01683000
  2121. DC A(DMKTBMMI) APL CORRESPONDENCE -> EBCDIC @VM03172 01684000
  2122. DC A(DMKTBLTI) USACII-8 -> EBCDIC @VM03172 01685000
  2123. SPACE 01686000
  2124. TRANSOUT DS 0F OUTPUT TRANSLATE TABLE ANCHORS @V200820 01687000
  2125. DC A(DMKTBLPO) EBCDIC -> PTTC/EBCD @VM03172 01688000
  2126. DC A(DMKTBLCO) EBCDIC -> CORRESPONDENCE @VM03172 01689000
  2127. DC A(DMKTBMNO) EBCDIC -> APL PTTC/EBCD @VM03172 01690000
  2128. DC A(DMKTBMMO) EBCDIC -> APL CORRESPONDENCE @VM03172 01691000
  2129. DC A(DMKTBLTO) EBCDIC -> USAII-8 LEVEL @VM03172 01692000
  2130. SPACE 01693000
  2131. MSGHEAD DC C'CNS',X'00' GR0 VALUES FOR CALL TO DMKERMSG @V200820 01694000
  2132. MSGPARM DC X'A0C90000' RETURN, OPERATOR, LETTER 'I' @V200820 01695000
  2133. SPACE 01696000
  2134. SETIDLES MVC 0(*-*,R4),IDLCHAR MOVE IDLES TO CONTASK @V200820 01697000
  2135. SPACE 01698000
  2136. * "VM/370 ONLINE" MESSAGES FOR TTY, 3210, 1050, 2741: 01699000
  2137. TTYSTMSG DC X'FFFFB1516BB3F5CDED0D05F373339373A3B151' @V200820 01700000
  2138. EBCLMSG DC X'151515',C' VM/370 Online ' HRC370DK 01701000
  2139. EBCLMSGL EQU *-EBCLMSG @V200820 01702000
  2140. STMSG DC X'165B5E5E2A4923070E15014C4A46734A6B' @V200820 01703000
  2141. BREAKCHR DC X'01010101464370070B13015125314C25295B5E5E5E' @V200820 01704000
  2142. STMSGL EQU *-STMSG @V200820 01705000
  2143. SPACE 1 01706000
  2144. RDERRCOR DC X'164A294F2A01294A4A514A5B' CORR LINE ERROR@V200820 01707000
  2145. RDERR150 DC X'165B5E5E5E5E5E5E5E5E5E5E' 1050 LINE ERROR@V200820 01708000
  2146. EOADDR EQU RDERR150 END OF ADDRESS (1050,2741) @V200820 01709000
  2147. EOA2741 DC X'16',16X'5E' 2741 READ ENDING SEQUENCE @VA06314 01709100
  2148. RDERRBCD DC X'16526B6268016B52524C525B' PTTC LINE ERROR@V200820 01710000
  2149. RDERRTTY DC X'B1514BA3832305A34B4BF34BB151' TTY LINE ERROR @VA01576 01711000
  2150. SPACE 01712000
  2151. ADDR50 DC X'1FDFDFDFDFDFDFDFDFDFDFDFDFDFE202' 1050 ADDRESS@VA08899 01713000
  2152. EXMSG45 DC X'DEDEDEDB5E5E5E5E' 3 IDLES, NEW-LINE, 4 IDLES @V200820 01714000
  2153. EXMSGTY DC X'FFFFFFB151FFFFFFFF' 3 IDLES, NEW-LINE, 4 IDLES@V200820 01715000
  2154. STRMASK DC X'14',C'********',8X'16' 2741, 1050 MASK @VM08679 01716000
  2155. DC C'HHHHHHHH',8X'16' . . . @VM08679 01717000
  2156. DC C'SSSSSSSS',8X'16' . . . @VM08679 01718000
  2157. STRMSKL EQU *-STRMASK @V200820 01719000
  2158. TTYREDY DC X'7589' . , XON @V200820 01720000
  2159. TTYHIDE DC X'05',8X'55',X'B1',X'05',8X'13',X'B1',X'05' @VA01833 01721000
  2160. DC 8X'CB',X'B1' @VA01833 01722000
  2161. TTYHIDN EQU *-TTYHIDE @V200820 01723000
  2162. TTYENDS DC X'B151C9FF' CR, LF, XOFF, RUBOUT @V200820 01724000
  2163. TTYRING DC X'E1E1E1E1' RING THE TELETYPE ALARM (BELL) @VM08679 01725000
  2164. ADRS4150 DC X'1FDFDFDF1F2315' CIRCLE C, CIRCLE C, /, 0 @V200820 01726000
  2165. IDLCHAR DC 16X'5E' IDLE STRING FOR INSERTION @V200820 01727000
  2166. MASKCON DC C'XXXXXXXX' MASK STRING FOR 3210-TYPE CONSOLE@V200820 01728000
  2167. XOFFI EQU X'13' XOFF INPUT CHARACTER FOR TTY @VA10263 01728100
  2168. XOFF DC X'C9' TELEGRAPH 'XOFF' CHARACTER @V200820 01729000
  2169. ADREST50 DC X'16' CIRCLE D - POSITIVE RESPONSE @VM08830 01730000
  2170. AD50 DC X'1FE202' CIRCLE C, A ,1 @VA08899 01731000
  2171. SPACE 1 01732000
  2172. MSGNUM DC AL1(0,1,2,3,4,5,27,28) @V200820 01733000
  2173. EJECT 01734000
  2174. LTORG @V200820 01735000
  2175. EJECT 01736000
  2176. *. 01737000
  2177. * OPERATION OF DMKCNSED SUBROUTINE - 01738000
  2178. * 01739000
  2179. * 2. CLEAR TRANSLATE TABLE TO BINARY ZEROS AND STORE CODE BYTES 01740000
  2180. * FOR EDIT CHARACTERS AT APPROIATE DISPLACEMENTS INTO THE 01741000
  2181. * TRANSLATE TABLE. 01742000
  2182. * 3. EXECUTE A TRT INSTRUCTION TO SCAN INPUT SOURCE FOR AN 01743000
  2183. * EDIT CHARACTER. AN ADDITIONAL PASS OF THE INPUT SOURCE 01744000
  2184. * IS REQUIRED IF A LINE DELETE CHARACTER OR EDIT ESCAPE 01745000
  2185. * IS FOUND ON PASS 1. AT THE END OF PASS 1 CHECK TO SEE 01746000
  2186. * IF PASS 2 IS REQUIRED. IF NOT, RETURN. IF 01747000
  2187. * PASS 2 IS REQUIRED, REMOVE THE CHARACTER DELETE 01748000
  2188. * AND EDIT ESCAPE CHARACTER CODE BYTES FROM THE TRANSLATE 01749000
  2189. * TABLE AND RESTART THE SCAN. AT THE END OF PASS 2 01750000
  2190. * CALL DMKFRET TO RETURN THE TRANSLATE TABLE TO FREE 01751000
  2191. * STORAGE AND RETURN. 01752000
  2192. * 01753000
  2193. * WHEN AN EDIT CHARACTER IS FOUND CONTINUE WITH THE 01754000
  2194. * RESPECTIVE SECTION BELOW: 01755000
  2195. * 01756000
  2196. * LINE END CHARACTER (#) - CHANGE THE LINE END CHARACTER TO 01757000
  2197. * A X'15' AND RESTART SCAN AT THE NEXT SOURCE CHARACTER. 01758000
  2198. * 01759000
  2199. * LINE DELETE CHARACTER (ยข) - IF THIS IS THE FIRST PASS 01760000
  2200. * INDICATE THAT A SECOND PASS IS REQUIRED AND RESTART SCAN 01761000
  2201. * AT THE NEXT SOURCE CHARACTER; OTHERWISE MOVE ALL SOURCE 01762000
  2202. * CHARACTERS TO THE RIGHT OF THE LINE DELETE CHARACTER 01763000
  2203. * TO EITHER THE BEGINNING OF THE LINE OR TO THE PREVIOUS 01764000
  2204. * LINE END CHARACTER, WHICHEVER OCCURS FIRST. ADJUST 01765000
  2205. * INPUT COUNT TO REFLECT THE NUMBER OF CHARACTERS DELETED. 01766000
  2206. * RESTART SCAN AT BEGINNING OF INPUT LINE. 01767000
  2207. * 01768000
  2208. * CHARACTER DELETE CHARACTER (@) - MOVE ALL SOURCE 01769000
  2209. * CHARACTERS TO THE RIGHT OF THE CHARACTER DELETE CHARACTER 01770000
  2210. * ONE CHARACTER TO THE LEFT. ADJUST INPUT COUNT. RESTART 01771000
  2211. * SCAN AT THE NEXT INPUT SOURCE CHARACTER. 01772000
  2212. * 01773000
  2213. * ESCAPE CHARACTER (") - IF THIS IS THE FIRST PASS 01774000
  2214. * INDICATE THAT A SECOND PASS IF REQUIRED AND RESTART SCAN 01775000
  2215. * AT THE NEXT SOURCE CHARACTER; OTHERWISE MOVE ALL 01776000
  2216. * SOURCE CHARACTERS TO THE RIGHT OF THE ESCAPE CHARACTER 01777000
  2217. * ONE CHARACTER TO THE LEFT. ADJUST INPUT COUNT. RESTART 01778000
  2218. * SCAN AT THE NEXT INPUT SOURCE CHARACTER. 01779000
  2219. * 01780000
  2220. *. 01781000
  2221. EJECT 01782000
  2222. DROP R13 @VA01217 01783000
  2223. DMKCNSED DS 0D ENTRY FOR INPUT EDITING OR TRANSLATIO@V200820 01784000
  2224. STM R0,R15,BALRSAVE SAVE REGISTERS @V200820 01785000
  2225. LR R12,R15 @V200820 01786000
  2226. USING DMKCNSED,R12 @V200820 01787000
  2227. L R4,CONADDR PICK UP DATA ADDRESS @V200820 01788000
  2228. LA R4,0(0,R4) @V200820 01789000
  2229. LH R3,CONCNT PICK UP FULL INPUT DATA LENGTH @V200820 01790000
  2230. TM CONPARM,EDIT IS EDITING DESIRED ? @V200820 01791000
  2231. BZ ENDEDIT NO -- GO CHECK FOR TRANSLATION @V200820 01792000
  2232. LA R9,DMKCNSTB SET TABLE ADDRESS IN R9 @V200820 01793000
  2233. XC 0(256,R9),0(R9) CLEAR TO ZEROS @V200820 01794000
  2234. LA R2,4 SET LOOP COUNT @V200820 01795000
  2235. SPACE 1 01796000
  2236. INITRTBL EQU * @V200820 01797000
  2237. LA R1,VMTLEND-1(R2) POINTER TO EDIT CHARACTER @V200820 01798000
  2238. SLR R7,R7 CLEAR @V200820 01799000
  2239. IC R7,0(,R1) GET EDIT CHARACTER @V200820 01800000
  2240. LTR R7,R7 IS IT A VALID CHARACTER? @VA04219 01800300
  2241. BZ NOTVALID NO, CHECK NEXT @VA04219 01800600
  2242. LA R7,0(R9,R7) GET TRT TABLE PTR + EDIT CHARACTE@V200820 01801000
  2243. LR R5,R2 GET INDEX @V200820 01802000
  2244. SLL R5,2 * 4 @V200820 01803000
  2245. EX R5,SETFUNC PLACE FUNCTION BYTE IN TRT TABLE @V200820 01804000
  2246. NOTVALID BCT R2,INITRTBL LOOP THROUGH ALL EDIT CHARS. @VA04219 01805500
  2247. SPACE 1 01806000
  2248. MVI TEMPR0,@1STPASS CLEAR FLAG, SET FIRST PASS @V200820 01807000
  2249. EDSTRT1 EQU * @V200820 01808000
  2250. LR R1,R4 GR1 = POINTER TO FIRST DATA CHAR @V200820 01809000
  2251. EDSTRT2 EQU * @V200820 01810000
  2252. LA R13,0(R3,R4) GR13 = PTR TO LAST DATA CHAR + 1 @V200820 01811000
  2253. EDSTRT3 EQU * @V200820 01812000
  2254. LR R5,R13 GET LENGTH FOR EXECUTE INSTR @V200820 01813000
  2255. SR R5,R1 ... @V200820 01814000
  2256. BNP ENDPASS END OF LINE @V200820 01815000
  2257. C R5,F256 .GT. 256 ? @V200820 01816000
  2258. BNH *+8 NO @V200820 01817000
  2259. L R5,F256 USE 256 AS THE MAXIMUM LENGTH @V200820 01818000
  2260. BCTR R5,0 DECREMENT FOR EX @V200820 01819000
  2261. EX R5,EDSEARCH LOOK FOR AN EDIT CHARACTER @V200820 01820000
  2262. BC 4+2,EDFUNC-4(R2) FUNCTION BYTE FOUND - GO EDIT @V200820 01821000
  2263. LA R1,1(R1,R5) SET REG 1 TO NEXT INPUT BYTE @V200820 01822000
  2264. B EDSTRT3 CHECK FOR ANY MORE CHARS IN INPUT@V200820 01823000
  2265. SPACE 1 01824000
  2266. EDFUNC B LINEEND CODE X'04' - LINE END CHARACTER @V200820 01825000
  2267. B LINEDEL CODE X'08' - LINE DEL CHARACTER @V200820 01826000
  2268. B CHARDEL CODE X'0C' - CHARACTER DELETE @V200820 01827000
  2269. B ESCAPE CODE X'10' - ESCAPE CHARACTER @V200820 01828000
  2270. EJECT 01829000
  2271. ENDPASS EQU * HERE AT END OF PASS @V200820 01830000
  2272. TM TEMPR0,@1STPASS+NEED2ND IN FIRST AND NEED 2ND ?@V200820 01831000
  2273. BNO ENDEDIT NO @V200820 01832000
  2274. NI TEMPR0,X'FF'-@1STPASS INDICATE FIRST PASS DONE @V200820 01833000
  2275. SLR R7,R7 CLEAR @V200820 01834000
  2276. IC R7,VMTCDEL CHARACTER DELETE CHARACTER @V200820 01835000
  2277. LA R7,0(R9,R7) GET TRT TABLE + CHARACTER DELETE @V200820 01836000
  2278. MVI 0(R7),0 REMOVE FUNCTION BYTE FROM TABLE @V200820 01837000
  2279. SLR R7,R7 CLEAR @V200820 01838000
  2280. IC R7,VMTLEND LOGICAL LINE END CHARACTER @V200820 01839000
  2281. LA R7,0(R9,R7) GET TRT TABLE + LOGICAL LINE END @V200820 01840000
  2282. MVI 0(R7),0 REMOVE FUNCTION BYTE FROM TABLE @V200820 01841000
  2283. B EDSTRT1 START PASS 2 @V200820 01842000
  2284. SPACE 1 01843000
  2285. LINEEND EQU * HERE WHEN A LINE END CHARACTER IS FOUND @V200820 01844000
  2286. MVI 0(R1),X'15' CHANGE THE LOGICAL LINE END CHAR @V200820 01845000
  2287. LA R1,1(,R1) SET LINE PTR PAST THIS CHARACTER @V200820 01846000
  2288. B EDSTRT3 RESTART SCAN @V200820 01847000
  2289. SPACE 1 01848000
  2290. LINEDEL EQU * HERE WHEN A LINE DELETE CHARACTER IS FOUND @V200820 01849000
  2291. TM TEMPR0,@1STPASS FIRST PASS ? @V200820 01850000
  2292. BNO LINEDEL2 NO @V200820 01851000
  2293. OI TEMPR0,NEED2ND INDICATE 2ND PASS NEEDED @V200820 01852000
  2294. LA R1,1(,R1) SET LINE PTR PAST THIS CHARACTER @V200820 01853000
  2295. B EDSTRT3 RESTART SCAN @V200820 01854000
  2296. SPACE 1 01855000
  2297. LINEDEL2 EQU * @V200820 01856000
  2298. LR R6,R1 GET CURRENT CHARACTER PTR @V200820 01857000
  2299. LINEDELL CLR R6,R4 AT BEGINNING OF LINE ? @V200820 01858000
  2300. BE LINEBEG YES @V200820 01859000
  2301. CLI 0(R6),X'15' AT LOGICAL LINE END ? @V200820 01860000
  2302. BE LINEBEG YES @V200820 01861000
  2303. MVI 0(R6),X'00' ZERO CHARACTERS DELETED @VA03519 01862000
  2304. BCTR R6,0 DECREMENT @V200820 01863000
  2305. B LINEDELL @V200820 01864000
  2306. SPACE 1 01865000
  2307. LINEBEG EQU * @V200820 01866000
  2308. LA R14,1(,R1) GET START OF DATA TO BE MOVED @V200820 01867000
  2309. LR R1,R6 SET NEW LINE PTR @V200820 01868000
  2310. LR R7,R13 GET END OF LINE PTR @V200820 01869000
  2311. SR R7,R14 GET NUMBER OF CHARS TO MOVE @V200820 01870000
  2312. BZ LINESZCL NOTHING TO MOVE, LINE DELETE LAST@V200820 01871000
  2313. LR R15,R7 GET COUNT HERE TOO @V200820 01872000
  2314. MVCL R6,R14 COMPRESS LINE @V200820 01873000
  2315. LINESZCL SR R14,R6 GET DISPLACEMENT OF MOVE @V200820 01874000
  2316. SR R3,R14 ADJUST INPUT COUNT @V200820 01875000
  2317. B EDSTRT2 RESTART SCAN WITH ADJUSTED COUNT @V200820 01876000
  2318. SPACE 1 01877000
  2319. CHARDEL EQU * HERE WHEN A CHARACTER DELETE IS FOUND @V200820 01878000
  2320. LR R6,R1 GET CURRENT CHARACTER PTR @V200820 01879000
  2321. LR R7,R13 GET END OF LINE PTR @V200820 01880000
  2322. BCTR R3,0 REDUCE INPUT COUNT BY 1 @V200820 01881000
  2323. LA R14,1(,R6) GET FROM PTR @V200820 01882000
  2324. CLR R1,R4 IS CHAR DELETE FIRST CHAR IN LINE@V200820 01883000
  2325. BE CHARMOVE YES @V200820 01884000
  2326. BCTR R3,0 REDUCE INPUT COUNT BY 1 @V200820 01885000
  2327. BCTR R6,0 REDUCE TO PTR BY 1 @V200820 01886000
  2328. CHARMOVE SR R7,R14 GET NUMBER OF CHARS TO MOVE @V200820 01887000
  2329. BZ ENDPASS NOTHING TO MOVE, CHAR DELETE LAST@V200820 01888000
  2330. LR R15,R7 GET COUNT HERE TOO @V200820 01889000
  2331. LR R1,R6 SET NEW LINE PTR @V200820 01890000
  2332. MVCL R6,R14 COMPRESS LINE @V200820 01891000
  2333. B EDSTRT2 RESTART SCAN WITH ADJUSTED COUNT @V200820 01892000
  2334. SPACE 1 01893000
  2335. ESCAPE EQU * HERE WHEN AN ESCAPE CHARACTER IS FOUND @V200820 01894000
  2336. TM TEMPR0,@1STPASS FIRST PASS ? @V200820 01895000
  2337. BNO ESCAPE2 NO @V200820 01896000
  2338. LA R1,1(,R1) SET LINE PTR PAST THIS CHARACTER @V200820 01897000
  2339. CLR R1,R13 IS ESCAPE THE LAST CHAR IN LINE ?@V200820 01898000
  2340. BNE ESCAPET NO @V200820 01899000
  2341. BCTR R3,0 REDUCE INPUT COUNT BY 1 @V200820 01900000
  2342. B ENDPASS @V200820 01901000
  2343. SPACE 1 01902000
  2344. ESCAPET EQU * @V200820 01903000
  2345. OI TEMPR0,NEED2ND INDICATE 2ND PASS NEEDED @V200820 01904000
  2346. LA R1,1(,R1) SET LINE PTR PAST THIS CHARACTER @V200820 01905000
  2347. B EDSTRT3 RESTART SCAN @V200820 01906000
  2348. SPACE 1 01907000
  2349. ESCAPE2 EQU * @V200820 01908000
  2350. LR R6,R1 GET TO PTR @V200820 01909000
  2351. LA R14,1(,R6) GET FROM PTR @V200820 01910000
  2352. LR R7,R13 GET END OF LINE PTR @V200820 01911000
  2353. SR R7,R14 GET NUMBER OF CHARS TO MOVE @V200820 01912000
  2354. LR R15,R7 GET COUNT HERE TOO @V200820 01913000
  2355. MVCL R6,R14 COMPRESS LINE @V200820 01914000
  2356. LA R1,1(,R1) SET LINE PTR PAST THIS CHARACTER @V200820 01915000
  2357. BCTR R3,0 REDUCE INPUT COUNT BY 1 @V200820 01916000
  2358. B EDSTRT2 RESTART SCAN WITH ADJUSTED COUNT @V200820 01917000
  2359. SPACE 1 01918000
  2360. ENDEDIT EQU * HERE WHEN INPUT EDITING IS FINISHED @V200820 01919000
  2361. L R6,BALR6 PICK UP CONTASK ADDRESS @V200820 01920000
  2362. STH R3,CONCNT RESET ADJUSTED COUNT IN CONTASK @V200820 01921000
  2363. ST R3,BALR3 STORE REVISED SOURCE COUNT @V200820 01922000
  2364. TM CONPARM,UCASE TRANSLATE INPUT TO UPPER CASE ? @V200820 01923000
  2365. BZ EDTEXIT NO -- ALL FINISHED AS IS @V200820 01924000
  2366. L R1,=A(DMKTBLUP) UPPER CASE TRANSLATE TABLE @V200820 01925000
  2367. LA R15,TRNSLAT TRANSLATION SUBROUTINE @VA01217 01926000
  2368. BALR R14,R15 TRANSLATE DATA TO UPPER-CASE @VA01217 01927000
  2369. EDTEXIT EQU * @V200820 01928000
  2370. LM R0,R15,BALRSAVE RESTORE REGISTERS @V200820 01929000
  2371. BR R14 RETURN @V200820 01930000
  2372. SPACE 2 01931000
  2373. DMKCNSTB DC 256X'00' LINE EDITING TRANSLATE TABLE @V200820 01932000
  2374. SPACE 01933000
  2375. SETFUNC MVI 0(R7),0 EXECUTED MVI @V200820 01934000
  2376. EDSEARCH TRT 0(0,R1),0(R9) EXECUTED TRT @V200820 01935000
  2377. LTORG @V200820 01936000
  2378. EJECT 01937000
  2379. DROP R12 @VA01217 01938000
  2380. USING TRNSLAT,R15 USE LOCAL ADDRESSABILITY HERE @VA01217 01939000
  2381. TRNSLAT DS 0H CONSOLE TRANSLATION ROUTINE @VA01217 01940000
  2382. STM R3,R4,TEMPSAVE SAVE ORIGINAL REGISTERS @VA01217 01941000
  2383. LA R0,256(0,0) LENGTH FOR ONE TRANSLATE @VA01217 01942000
  2384. TRNSONE EQU * TRANSLATE IN 256-BYTE BLOCKS @VA01217 01943000
  2385. SR R3,R0 DECREMENT COUNT BY 256 BYTES @VA01217 01944000
  2386. BNP TRNSTWO GO TRANSLATE REMAINDER @VA06313 01945100
  2387. TR 0(256,R4),0(R1) TRANSLATE SUPPLIED DATA @VA01217 01946000
  2388. ALR R4,R0 BUMP DATA POINTER BY 256 BYTES @VA01217 01947000
  2389. B TRNSONE . . . @VA01217 01948000
  2390. SPACE 01949000
  2391. TRNSTWO EQU * TRANSLATE LAST PART OF DATA @VA01217 01950000
  2392. AR R3,R0 MAKE THE COUNT POSITIVE AGAIN @VA01217 01951000
  2393. BZ TRNSEXIT DO NOT TRANSLATE ZERO BYTES @VA06313 01951300
  2394. BCTR R3,0 REDUCE DATA COUNT FOR EXECUTE @VA06313 01951600
  2395. EX R3,TRNSLATE TRANSLATE LESS THAN 256 BYTES @VA01217 01952000
  2396. TRNSEXIT DS 0H @VA06313 01952100
  2397. LM R3,R4,TEMPSAVE RESTORE ORIGINAL VALUES @VA01217 01953000
  2398. BR R14 RETURN @VA01217 01954000
  2399. SPACE 01955000
  2400. TRNSLATE TR 0(*-*,R4),0(R1) EXECUTED TRANSLATE @VA01217 01956000
  2401. EJECT 01957000
  2402. TIMEOUT EQU X'01' @V200820 01958000
  2403. EJECT 01959000
  2404. PSA , @V306638 01960000
  2405. COPY EQU @V306638 01961000
  2406. COPY DEVTYPES @V306638 01962000
  2407. * BITS DEFINED IN BALR0 FOR EDITING 01963000
  2408. @1STPASS EQU X'80' ON MEANS EXECUTING FIRST PASS @V200820 01964000
  2409. NEED2ND EQU X'40' ON MEANS 2ND PASS NEEDED @V200820 01965000
  2410. EJECT 01966000
  2411. COPY IOBLOKS @V306638 01967000
  2412. COPY IOER @V306638 01968000
  2413. COPY RBLOKS @V306638 01969000
  2414. COPY SAVE @V306638 01970000
  2415. COPY VMBLOK @V306638 01971000
  2416. END DMKCNS 01972000