Table of Contents

DMKCFM Source

References

Source Listing

DMKCFM.ASSEMBLE.txt
  1. CFM TITLE 'DMKCFM (CP) VM/370 - RELEASE 6' 00001000
  2. ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
  3. SPACE 3 00003000
  4. *. 00004000
  5. * MODULE NAME - 00005000
  6. * 00006000
  7. * DMKCFM 00007000
  8. * 00008000
  9. * FUNCTION - 00009000
  10. * 00010000
  11. * TO READ CP REQUESTS FROM THE USER'S TERMINAL AND DIRECT THEM 00011000
  12. * TO THE APPROPRIATE CONSOLE FUNCTION ROUTINE FOR PROCESSING. 00012000
  13. * 00013000
  14. * ATTRIBUTES- 00014000
  15. * 00015000
  16. * REENTRANT, RESIDENT, CALLED VIA SVC 00016000
  17. * 00017000
  18. * 00018000
  19. * ENTRY POINTS - 00019000
  20. * 00020000
  21. * DMKCFMBK - ENTERED WHEN ATTENTION IS HIT TWICE AT A TERMINAL 00021000
  22. * DMKCFMEN - ENTERED WHEN A DIAGNOSE CODE 8 IS EXECUTED 00022000
  23. * OR FROM DMKGRF TO PROCESS IMMEDIATE COMMANDS 00022500
  24. * DMKCFMAT - ENTERED TO POST ATTN INT PENDING 00023000
  25. * DMKCFMWU - ENTERED WHEN SLEEP TIME EXPIRES 00024000
  26. * 00025000
  27. * ENTRY CONDITIONS - 00026000
  28. * 00027000
  29. * DMKCFMBK - 00028000
  30. * GPR 11 CONTAINS THE USER'S VMBLOK ADDRESS 00029000
  31. * 00030000
  32. * DMKCFMEN - 00031000
  33. * GPR 0 CONTAINS THE MESSAGE CHARACTER COUNT 00032000
  34. * GPR 1 POINTS TO AN 18 DOUBLE WORD INPUT MESSAGE BUFFER 00033000
  35. * GPR 11 CONTAINS THE USER'S VMBLOK ADDRESS 00034000
  36. * 00035000
  37. * EXIT CONDITIONS - 00036000
  38. * 00037000
  39. * GPR 2 CONTAINS A RETURN CODE IF ENTERED AT VIRCF. 00038000
  40. * 00039000
  41. * CALLS TO OTHER ROUTINES - 00040000
  42. * 00041000
  43. * DMKCFCMD - TO RETURN THE ADDRESS OF THE ROUTINE THAT 00042000
  44. * WILL PROCESS THE COMMAND. 00043000
  45. * 00044000
  46. * TABLES / WORK AREAS - 00045000
  47. * 00046000
  48. * VMBLOK 00047000
  49. * 00048000
  50. * 00049000
  51. * 00050000
  52. * REGISTER USAGE - 00051000
  53. * 00052000
  54. * GPR 0 = PARAMETER 00053000
  55. * GPR 1 = PARAMETER 00054000
  56. * GPR 2 = SCRATCH 00055000
  57. * GPR 3 = SCRATCH 00056000
  58. * GPR 4 = SCRATCH 00057000
  59. * GPR 5 = SCRATCH 00058000
  60. * GPR 9 = INPUT MESSAGE BASE 00059000
  61. * GPR 11 = VMBLOK BASE 00060000
  62. * GPR 12 = MODULE BASE 00061000
  63. * GPR 13 = SAVE AREA BASE 00062000
  64. * GPR 14 = LINKAGE 00063000
  65. * GPR 15 = LINKAGE 00064000
  66. * 00065000
  67. * 00066000
  68. * 00067000
  69. * NOTES - 00068000
  70. * NONE 00069000
  71. * 00070000
  72. * 00071000
  73. * OPERATION - 00072000
  74. * 00073000
  75. * 1. DMKCFMBK - BREAK ENTRY-CALL DMKFREE TO OBTAIN AN INPUT 00074000
  76. * BUFFER. 00075000
  77. * 2. IF SYSTEM OPERATOR, CALL DMKQCNWT TO SEND A NULL LINE. 00076000
  78. * IF NOT, SET UP 'CP' MESSAGE AND CALL DMKQCNWT TO 00077000
  79. * SEND IT. THEN GO TO STEP 4. 00078000
  80. * 3. CONTROL IS GIVEN HERE TO READ THE SECOND AND SUBSEQUENT 00079000
  81. * LINES. SET UP FOR NULL LINE AND IF THIS IS THE SYSTEM 00080000
  82. * OPERATOR, CALL DMKQCNWT TO SEND IT AND THEN GO TO NEXT 00081000
  83. * STEP. IF NOT SYSTEM OPERATOR, JUST GO TO NEXT STEP. 00082000
  84. * 4. CALL DMKQCNRD TO READ THE NEXT COMMAND. CONTROL WILL BE 00083000
  85. * RETURNED TO STEP 6 WHEN A COMMAND IS READ. IF THIS IS THE 00084000
  86. * FIRST READ GO TO STEP 18. IF NOT, GO TO STEP 17. 00085000
  87. * 5. DMKCFMEN - ENTRY FROM A DIAGNOSE RECEIVED FROM CMS OR 00086500
  88. * FROM DMKGRF. SAVE THE REGS AND GO TO STEP 10. 00087500
  89. * 6. CONFRRTN - RETURN FROM LINE READ. IF GPR 2 IS EQUAL TO 00088000
  90. * ZERO, GO TO STEP 7. IF EQUAL TO 4 OR 8, GO TO STEP 8. 00089000
  91. * IF EQUAL TO 12, GO TO STEP 9. 00090000
  92. * 7. IF INPUT COUNT IS NON-ZERO, GO TO STEP 10. IF ZERO, CALL 00091000
  93. * DMKQCNWT TO SEND 'CP' MESSAGE. THEN GO TO STEP 20. 00092000
  94. * 8. IF INPUT COUNT IS ZERO GO TO CALL DMKCFMAT TO 00093000
  95. * SIMULATE AN ATTENTION INTERRUPT. THEN GO TO STEP 14. 00094000
  96. * ELSE- GO TO STEP 4 TO REISSUE THE READ. 00095000
  97. * 9. THIS IS A 'LINE BREAK'. GO TO STEP 15. 00096000
  98. * 10. STORE COUNT OF CHARACTERS IN LINE AND ADDRESS OF THE 00097000
  99. * FIRST CHARACTER IN THE COMMAND LINE FOR USE BY DMKSCNFD. 00098000
  100. * 11. CALL DMKSCNFD TO LOCATE THE COMMAND ARGUMENT. IF NONE IS 00099000
  101. * FOUND GO TO STEP 19. IF HAVE ONE, CALL DMKCFCMD TO GET 00100000
  102. * THE ROUTINES ADDRESS AND TO INSURE THAT THE ABREVIATION 00101000
  103. * AND CLASS ARE VALID. 00102000
  104. * 12. IF GET A VALID HIT, CALL THE APPROPRIATE ROUTINE TO 00103000
  105. * HANDLE THE REQUEST VIA AN SVC 8. 00104000
  106. * 13. IF GET A NORMAL RETURN FROM THE CALLED ROUTINE, GO TO 00105000
  107. * STEP 19 TO CONTINUE PROCESSING. 00106000
  108. * 14. IF GET A RETURN+4, TURN OFF CONSOLE FUNCTION WAIT 00107000
  109. * TO ALLOW VIRTUAL MACHINE TO RUN. THEN CONTINUE WITH NEXT 00108000
  110. * STEP. 00109000
  111. * 15. IF RETURN IS+8, TURN OFF ONLY THE CONSOLE FUNCTION FLAG. 00110000
  112. * IF BOTH STEPS 14 AND 15 ARE EXECUTED, THE VIRTUAL MACHINE 00111000
  113. * IS ALLOWED TO RUN AND DO CONSOLE FUNCTIONS. IF ONLY 00112000
  114. * STEP 15 IS EXECUTED, THE ONLY FUNCTION THE USER MAY 00113000
  115. * DO IS HIT THE ATTENTION. 00114000
  116. * 16. CALL DMKFRET TO RETURN THE LINE BUFFER TO STORAGE. 00115000
  117. * 17. IF ENTRY WAS VIA A DIAGNOSE,CONTINUE--ELSE GO TO 00116000
  118. * DMKDSPCH(DISPATCH). 00117000
  119. * 18. STORE RETURN CODE IN SAVER2 AND RETURN VIA SVC 12. 00118000
  120. * 19. IF ENTRY WAS VIA DIAGNOSE, STORE RETURN CODE IN SAVER2. 00119000
  121. * THEN CALL DMKSCNFD TO SCAN DOWN LINE . IF A LOGICAL 00120000
  122. * LINE END IS ENCOUNTERED, GO TO STEP 11 TO CHECK COMMAND. 00121000
  123. * 20. IF GET TO THE END OF THE LINE AND ENTERED VIA A DIAGNOSE, 00122000
  124. * GO TO STEP 14. IF VIRTUAL MACHINE IS TO BE RUN, GO TO 00123000
  125. * STEP 14---ELSE GOT TO STEP 3 TO READ NEXT LINE. 00124000
  126. * 00125000
  127. * ERROR MESSAGES - NONE 00126000
  128. *. 00127000
  129. EJECT 00128000
  130. COPY OPTIONS 00129000
  131. COPY LOCAL 00130000
  132. SPACE 3 00131000
  133. DMKCFM START 0 00132000
  134. SPACE 00133000
  135. MODID DC CL8'DMKCFM' 00134000
  136. SPACE 00135000
  137. USING PSA,R0 00136000
  138. USING VMBLOK,R11 00137000
  139. USING SAVEAREA,R13 00138000
  140. SPACE 00139000
  141. ENTRY DMKCFMAT @V200820 00140000
  142. ENTRY DMKCFMBK,DMKCFMEN,DMKCFMWU @VM03169 00141000
  143. SPACE 00142000
  144. AIF (NOT &TRACE(6)).TR1 00143000
  145. EXTRN DMKTRCPB,DMKTRCIT 00144000
  146. .TR1 ANOP 00145000
  147. EXTRN DMKERMSG 00146000
  148. EXTRN DMKSTKCP 00147000
  149. EXTRN DMKCFCMD @VM03169 00148000
  150. EXTRN DMKQCNRD @VM03169 00149000
  151. EXTRN DMKSCNFD @VM03169 00150000
  152. EXTRN DMKSCHRT @VM03169 00151000
  153. EXTRN DMKVIOMK @VM03169 00152000
  154. EXTRN DMKDSPB @VM03257 00153000
  155. EJECT 00154000
  156. USING DMKCFMBK,R12 @V200820 00155000
  157. DMKCFMBK DS 0D @V200820 00156000
  158. ENTER @V200820 00157000
  159. L R12,=A(DMKCFM) @V200820 00158000
  160. USING DMKCFM,R12 @V200820 00159000
  161. SPACE 1 @V407594 00159100
  162. TM APSTAT1,CPINITD CP READY FOR COMMANDS @VA07615 00159200
  163. BZ CONFEXIT NO- IGNORE OPERATOR FOR NOW @V407594 00159300
  164. SPACE 00160000
  165. TM VMRSTAT,VMLOGOFF USER IN LOGOFF PROCESS NOW @V200820 00161000
  166. BO CONFEXIT YES, GET OUT @V200930 00162000
  167. TM VMOSTAT,VMCF+VMKILL EXECUTING CONSOLE FUNC OR @V200930 00163000
  168. * DYING ?? 00164000
  169. BNZ CONFEXIT YES, EXIT NOW @V200930 00165000
  170. TM VMOSTAT,VMSLEEP IS MACHINE SLEEPING ?? @V200930 00166000
  171. BZ NOTSLP NO, CONT @V200930 00167000
  172. SPACE 00168000
  173. L R1,VMDELAY CHECK FOR DELAYED SLEEP @V200820 00169000
  174. LTR R1,R1 ??? @V200820 00170000
  175. BZ GOSLEEP NOPE -- LET HIM GO AS IS @V200820 00171000
  176. CALL DMKSCHRT RESET THE REQUEST @V200820 00172000
  177. SLPFRET EQU * @V200820 00173000
  178. USING TRQBLOK,R1 ADDRESSIBILITY FOR TIMER BLOK @V408246 00173100
  179. LA R3,8 8 SECONDS @V408246 00173200
  180. AL R3,TRQBTOD TOD AT SLEEP ENTER + 8 SECONDS @V408246 00173300
  181. CL R3,TRQBVAL MINIMAL SLEEP INTERVAL @V408246 00173400
  182. BNL *+8 ... FOR PRIORITY SCHEDULING @V408246 00173500
  183. OI VMQSTAT,VMPRIDSP SET PRIORITY SCHEDULING @V408246 00173600
  184. LA R0,TRQBSIZE @V200820 00174000
  185. CALL DMKFRET RETURN TRQBLOK TO FREE STORAGE @V200820 00175000
  186. SLR R1,R1 @V200820 00176000
  187. ST R1,VMDELAY CLEAR OUT THE VMBLOK POINTER @V200820 00177000
  188. GOSLEEP EQU * @V200820 00178000
  189. NI VMOSTAT,X'FF'-VMSLEEP TURN OFF SLEEP FLAG @V200930 00179000
  190. NI VMRSTAT,X'FF'-VMCFWAIT ALLOW TO RUN AGAIN @V200930 00180000
  191. TM VMOSTAT,VMVIRCF DIAGNOSE CONS FUNC SLEEP ?? @V200930 00181000
  192. BZ NOTSLP NO, CONT @V200930 00182000
  193. NI VMOSTAT,X'FF'-VMVIRCF RESET DIAG CONS FUNC @V200930 00183000
  194. B CONFTEXT @V200820 00184000
  195. EJECT 00185000
  196. NOTSLP DS 0H @V200930 00186000
  197. BAL R9,CKTRA GO CHECK IF TRACING @VA01078 00187000
  198. OI VMRSTAT,VMCFWAIT PUT USER IN CONSOLE FUNCTION WAIT 00188000
  199. OI VMOSTAT,VMCF INDICATE THAT A CF IS IN PROGRESS 00189000
  200. LA R0,BUFSIZE LOAD BUFFER SIZE 00190000
  201. CALL DMKFREE GET A BUFFER FOR THE INPUT MESSAGE 00191000
  202. LR R9,R1 LOAD BUFFER BASE REGISTER 00192000
  203. USING BUFFER,R9 00193000
  204. SLR R0,R0 CLEAR TO FORCE TIME STAMP @V200820 00194000
  205. LA R2,NOAUTO ...IF THIS IS THE OPERATOR @V200820 00195000
  206. TM VMOSTAT,VMSYSOP IS THIS THE SYSTEM OPERATOR @V200820 00196000
  207. BO CONFWRIT YES - ZERO-LENGTH WRITE = TIME STAMP 00197000
  208. TM VMMLEVEL,VMMSTMP IS USER TIME STAMPING MSGS ?@V200820 00198000
  209. BO CONFWRIT YES - SAME LOGIC FOR HIM @V200820 00199000
  210. SLR R2,R2 WRITE WITH C.R. FOR OTHER PROMPT @V200820 00200000
  211. LA R1,CPCHAR POINT TO 'CP' CHARACTERS @V200820 00201000
  212. LA R0,L'CPCHAR ... @V200820 00202000
  213. TM VMRSTAT,VMLOGON IS THIS GUY LOGGED ON YET ? @V200820 00203000
  214. BZ CONFWRIT YES - JUST WRITE 'CP' @V200820 00204000
  215. LA R0,1 @V200820 00205000
  216. LA R1,BLANKS WRITE A SINGLE BLANK @V200820 00206000
  217. CONFWRIT L R3,VMTERM POINTER TO TERMINAL RDEVBLOK @V200820 00207000
  218. CLI RDEVTYPC-RDEVBLOK(R3),CLASGRAF GRAPHIC DEV ?@V200820 00208000
  219. BE CONFREAD YES - SKIP IT@V200820 00209000
  220. CLI RDEVTYPC-RDEVBLOK(R3),CLASTERM IS THIS A @V2D3931 00210000
  221. * TERMINAL CLAS 00211000
  222. BNE *+12 NO, WRITE PROMPT CHARACTERS @V2D3931 00212000
  223. CLI RDEVTYPE-RDEVBLOK(R3),TYPBSC IS THIS A BISYNC @V2D3931 00213000
  224. * LINE 00214000
  225. BE CONFREAD YES, READ A CONSOLE FUNCTION @V2D3931 00215000
  226. * COMMAND 00216000
  227. CALL DMKQCNWT,PARM=NORET(,R2) WRITE PROMPT CHARS@V200820 00217000
  228. B CONFREAD READ A CONSOLE FUNCTION COMMAND @V200820 00218000
  229. EJECT 00219000
  230. USING DMKCFMEN,R12 @V200820 00220000
  231. DMKCFMEN DS 0D ENTRY FOR CONSOLE FUNCTION DIAGNOSE @V200820 00221000
  232. ENTER @V200820 00222000
  233. L R12,=A(DMKCFM) @V200820 00223000
  234. USING DMKCFM,R12 @V200820 00224000
  235. LR R9,R1 LOAD INPUT BUFFER BASE @VA09084 00224100
  236. TM VMRSTAT,VMLOGOFF IN LOGOFF? @VA09084 00224200
  237. BO CONFRBF YES, FRET CMD BUFFER AND LEAVE @VA09084 00224300
  238. TM VMOSTAT,VMKILL ARE WE BEING FORCED? @VA09084 00224400
  239. BO CONFRBF YES, FRET CMD BUFFER AND LEAVE @VA09084 00224500
  240. SPACE 00225000
  241. BAL R9,CKTRA GO CHECK IF TRACING @VA01078 00226000
  242. OI VMOSTAT,VMCF EXECUTING CONSOLE FUNCTION @V200930 00227000
  243. OI VMRSTAT,VMCFWAIT PUT USER IN CONSOLE FUNCTION WAIT 00228000
  244. LR R9,R1 LOAD INPUT BUFFER BASE 00229000
  245. SLR R2,R2 @V200820 00230000
  246. ST R2,SAVER2 SET RETURN CODE ZERO INITIALLY @V200820 00231000
  247. B CONFSAVE CONTINUE 00232000
  248. SPACE 2 00233000
  249. CKTRA SR R3,R3 @VA01078 00234000
  250. ST R3,SAVEWRK6 INITIALIZE TRACE DATA @VA01078 00235000
  251. L R2,VMTREXT GET TRACE EXTENSION @VA01078 00236000
  252. LTR R2,R2 ARE WE TRACING @VA01078 00237000
  253. BZ NOTRACE NO @VA01078 00238000
  254. USING TREXT,R2 @VA01078 00239000
  255. CH R3,TREXTERM TRACING TO CONSOLE @VA01078 00240000
  256. BZ NOTRACE NO @VA01078 00241000
  257. TM TREXLOCK,X'FF' IS TRACE LOCKED NOW @VA01078 00242000
  258. BZ NOTRACE NO, NOT EXECUTING NOW @VA01078 00243000
  259. TM VMRSTAT,VMCFWAIT IS TRACE WAITING @VA01078 00244000
  260. BNO NOTRACE NO @VA01078 00245000
  261. IC R3,VMRSTAT GET TRACE RUN STATUS FLAGS @VA01078 00246000
  262. STC R3,SAVEWRK6 SAVE FOR EXIT TIME @VA01078 00247000
  263. NOTRACE EQU * @VA01078 00248000
  264. DROP R2 @VA01078 00249000
  265. BR R9 @VA01078 00250000
  266. EJECT 00251000
  267. CONFREAD EQU * READ COMMAND IN CONSOLE FUNCTION @V200820 00252000
  268. LTR R13,R13 IS THIS THE FIRST READ ? @V200820 00253000
  269. BZ CONREAD NO -- NO EXIT TO WORRY ABOUT @V200820 00254000
  270. LA R0,CPEXSIZE @V200820 00255000
  271. CALL DMKFREE GET FREE STORAGE FOR A CPEXBLOK @V200820 00256000
  272. USING CPEXBLOK,R1 @V200820 00257000
  273. XC CPEXBLOK(16),CPEXBLOK CLEAR THE HEADER SECTIO@V200820 00258000
  274. STM R0,R15,CPEXREGS SET MY OWN REGISTERS @V200820 00259000
  275. LA R15,CKTRACE ALL WE NEED IS AN 'EXIT' @V200820 00260000
  276. ST R15,CPEXADD ... @V200820 00261000
  277. CALL DMKSTKCP STACK THE CPEXBLOK FOR A LATER EX@V200820 00262000
  278. DROP R1 @V200820 00263000
  279. SLR R13,R13 SHOW THAT NO 'EXIT' IS REQUIRED @V200820 00264000
  280. SPACE 00265000
  281. CONREAD EQU * @V200820 00266000
  282. TM VMOSTAT,VMCFRUN RUN MACHINE WHILE READING ? @V200820 00267000
  283. BZ *+8 NO -- LET HIM WAIT @V200820 00268000
  284. NI VMRSTAT,255-VMCFWAIT MAKE MACHINE RUNNABLE @V200820 00269000
  285. OI VMQSTAT,VMCFREAD SET CF READ FLAG @VA01989 00270000
  286. OI VMSPMFLG,VMCFRD1 SET CF READ BACK-UP @VA13025 00270500
  287. LR R1,R9 BUFFER START ADDRESS TO GR1 @V200820 00271000
  288. LA R0,BUFINLTH-2 MAXIMUM READ DATA LENGTH @V200820 00272000
  289. CALL DMKQCNRD,PARM=UCASE+EDIT READ THE NEXT COMMAND @V200820 00273000
  290. NI VMQSTAT,255-VMCFREAD RESET CF READ FLAG @VA01989 00274000
  291. NI VMSPMFLG,255-VMCFRD1 RESET CF READ BACK-UP @VA13025 00274500
  292. SPACE 00275000
  293. OI VMRSTAT,VMCFWAIT MAKE SURE THE USER IS IN CF WAIT 00276000
  294. TM VMOSTAT,VMKILL IS THE USER DEAD ON ARRIVAL @VM08908 00277000
  295. BO CONFBGN3 YES - JUST BAIL OUT FAST @VM08908 00278000
  296. B *+4(R2) 00279000
  297. B CONNATTN NO ATTENTIONS HIT 00280000
  298. B CONATTN SINGLE ATTENTION HIT 00281000
  299. B CONATTN MULTIPLE ATTENTIONS HIT 00282000
  300. B CONFBGN3 LINE BREAK 00283000
  301. SPACE 2 00284000
  302. CONATTN LTR R0,R0 INPUT COUNT ZERO? 00285000
  303. BNZ CONFREAD NO, REISSUE READ 00286000
  304. TM VMRSTAT,VMLOGON IS USER NOT LOGGED ON ??? 00287000
  305. BO CONFREAD NO ---- 00288000
  306. CALL DMKCFMAT SIMULATE AN ATTENTION 00289000
  307. B CONFBGN2 00290000
  308. SPACE 2 00291000
  309. CONNATTN LTR R0,R0 INPUT COUNT ZERO? 00292000
  310. BNZ CONFSAVE NO 00293000
  311. TM VMRSTAT,VMLOGON IS USER NOT LOGGED ON ??? 00294000
  312. BO CONFLEND NO --- 00295000
  313. LA R0,2 SET MESSAGE LENGTH 00296000
  314. LA R1,CPCHAR GET MESSAGE 00297000
  315. CALL DMKQCNWT,PARM=NORET 00298000
  316. B CONFLEND 00299000
  317. SPACE 2 00300000
  318. CONFSAVE ST R0,BUFCNT SAVE COUNT FOR SCANFLD 00301000
  319. ST R1,BUFNXT SAVE FIRST CHARACTER LOCATION 00302000
  320. CONFSCAN CALL DMKSCNFD SCAN FOR COMMAND CODE 00303000
  321. BNZ CONFRETN NONE FOUND, READ THE NEXT LINE 00304000
  322. SLR R2,R2 CLEAR ERROR RETURN CODE @VM03169 00305000
  323. CALL DMKCFCMD PROCESS THIS COMMAND @VM03169 00306000
  324. LTR R15,R1 WAS ROUTINE ADDRESS FOUND @VM03169 00307000
  325. BZ CONFRETN NO @VM03169 00308000
  326. BM CONFSCAN YES - BUT IT WAS 'CP' PREFIXED @VM03169 00309000
  327. TM VMRSTAT,VMLOGOFF USER BEING LOGGED OFF? @VA08501 00309500
  328. BO CONFRBF YES, FRET CMD BUFFER AND LEAVE @VA08501 00309600
  329. TM VMOSTAT,VMKILL USER BEING FORCED? @VA08501 00309700
  330. BO CONFRBF YES, FRET CMD BUFFER AND LEAVE @VA08501 00309800
  331. CALL (15) CALL ROUTINE TO PROCESS COMMAND @VM03169 00310000
  332. * NOTE THAT IF WE ARE CALLING DMKUSO TO PROCESS LOGOFF OR FORCE WE 00310500
  333. * WILL NOT RETURN HERE. DMKUSO WILL RETURN DIRECTLY TO OUR CALLER. 00310600
  334. * NORMAL RETURN WILL CAUSE NEXT COMMAND TO BE PROCESSED 00311000
  335. * RETURN TO *+4 WILL CAUSE VIRTUAL MACHINE TO BE RUN 00312000
  336. * RETURN TO *+8 WILL CAUSE CF WAIT FLAG TO BE LEFT ON 00313000
  337. * RETURN TO *+12 TO FRET BUFFER AND NOT RUN 00314000
  338. CONFBGN1 B CONFRETN READ THE NEXT LINE 00315000
  339. CONFBGN2 NI VMRSTAT,255-VMCFWAIT ALLOW VIRTUAL MACHINE TO RUN 00316000
  340. CONFBGN3 NI VMOSTAT,255-VMCF-VMSLEEP ALLOW ATTN, NOT SLEEP @V200930 00317000
  341. CONFRBF LA R0,BUFSIZE SET BUFFER SIZE @V200930 00318000
  342. LR R1,R9 LOAD BUFFER ADDRESS 00319000
  343. CALL DMKFRET RELEASE THE INPUT BUFFER 00320000
  344. CONFTEXT EQU * @V200820 00321000
  345. NI VMHRCFLG,255-VMTRMOFF RESTORE TERM OUTPUT HRC021DK 00321050
  346. TM VMOSTAT,VMVIRCF VIRTUAL CONSOLE FUNCTION? @V408246 00321100
  347. BO *+8 YES, BYPASS Q1 @V408246 00321600
  348. OI VMQSTAT,VMPRIDSP NO, GIVE QUIKIE Q1 @V408246 00322100
  349. LTR R13,R13 RETURN BY EXIT ?? @V200930 00323000
  350. BNZ CONFEXIT YES, EXIT TO CALLER @V200930 00324000
  351. CONFDISP EQU * @VA03804 00325000
  352. TM VMRSTAT,VMCPWAIT IS USER RUNNABLE ? @VA03804 00326000
  353. BZ CONDISPB YES..CHECK OUT HIS PSW.. @VA03804 00327000
  354. GOTO DMKDSPCH GOTO DISPATCH @VA03804 00328000
  355. CONDISPB GOTO DMKDSPB NEW PSW ENTRY TO DISPATCH @VA03804 00329000
  356. EJECT 00330000
  357. CKTRACE L R2,VMTREXT GET TRACE EXTENSION @VA01078 00331000
  358. LTR R2,R2 TRACING NOW @VA01078 00332000
  359. BZ CONFEXIT NO @VA01078 00333000
  360. L R3,SAVEWRK6 GET TRACE ENTRY DATA @VA01078 00334000
  361. LTR R3,R3 TRACING ON ENTRY @VA01078 00335000
  362. BZ CONFEXIT NO @VA01078 00336000
  363. STCM R3,8,VMRSTAT RESTORE DMKTRC RUN STATUS FLAGS @VA01078 00337000
  364. CONFEXIT ST R11,SAVER11 MIGHT HAVE CHANGED @V200930 00338000
  365. EXIT RETURN TO CALLER @V200930 00339000
  366. SPACE 3 00340000
  367. CONFNEWL EQU * HERE TO SCAN FOR NEXT COMMAND 00341000
  368. CONFRETN LR R5,R2 SAVE RETURN CODE @V200930 00342000
  369. SLR R2,R2 CLEAR R2 @V407466 00343000
  370. SLR R4,R4 CLEAR R4 @V407466 00343100
  371. ICM R4,B'0111',VMSTKO+1 GET OUTPUT STACK @V407466 00343200
  372. BZ NOSTK NONE ON STACK FOR OUTPUT @V200930 00345000
  373. TM VMOSTAT,VMCFRUN IS SET RUN ON? @VA01836 00346000
  374. BZ *+8 NOPE, OK AS IS @VA01836 00347000
  375. NI VMRSTAT,255-VMCFWAIT LET HIM RUN DURING OUTPUT @VA01836 00348000
  376. TM 0(R4),QRYERR STACKED ERROR MESSAGE? @V407466 00348100
  377. BO QCNERR CALL QCN WITH ERRMSG PARM @V407466 00348200
  378. CLRSTK SLR R1,R1 CLEAR O/P STACK @V407466 00349000
  379. ST R1,VMSTKO POINTER... @VA03691 00350000
  380. NXTWRT LA R1,8(R4) POINT TO DATA TO WRITE @V200930 00351000
  381. LH R0,4(R4) GET LENGTH TO WRITE @V200930 00352000
  382. CH R0,=H'72' TEST FOR LONG LINE ON SCREEN @V200930 00354000
  383. BL *+8 < 72, WRITE WITH 'TIME' @V407466 00355000
  384. LA R2,NOTIME(,R2) > 71, WRITE WITH 'NOTIME' @V407466 00355100
  385. CALL DMKQCNWT WRITE WITH RETURN AND TIME IF SET@V200930 00358000
  386. NXTSTK LR R1,R4 POINT TO STACK BUFFER @V200930 00359000
  387. LH R0,6(R4) GET SIZE OF BUFFER IN DBL WORDS @V200930 00360000
  388. L R6,0(R4) PTR TO NEXT BUFFER @V407466 00360800
  389. LA R6,0(R6) CLEAN OFF HI BYTE @V407466 00361200
  390. CALL DMKFRET RELEASE BUFFER @V200930 00362000
  391. LTR R6,R6 TEST FOR MORE IN STACK @V407466 00363000
  392. BZ NOSTK NO, ALL DONE @V200930 00364000
  393. LR R4,R6 PTR TO NEXT BUFFER IN R4 @V407466 00364100
  394. LTR R2,R2 TEST RETURN FROM WRITE @V200930 00365000
  395. BNZ NXTSTK DELETE ALL ITEMS ON STACK @V407466 00366000
  396. TM 0(R4),QRYERR STACKED ERROR MESSAGE @V407466 00366100
  397. BZ NXTWRT DO NEXT LINE ON STACK @V407466 00366200
  398. LA R2,ERRMSG ISSUE UNDER CTL OF ERROR FLAGS @V407466 00366300
  399. B NXTWRT DO NEXT LINE ON STACK @V407466 00366400
  400. QCNERR LA R2,ERRMSG ISSUE UNDER CTL OF ERROR FLAGS @V407466 00366500
  401. B CLRSTK CLEAR STACK @V407466 00366600
  402. SPACE 00366700
  403. QRYERR EQU X'80' QUERY ERROR MESSAGE @V407466 00366800
  404. EJECT 00368000
  405. NOSTK LR R2,R5 RESTORE RETURN CODE @V200930 00369000
  406. NI VMHRCFLG,255-VMTRMOFF RESTORE TERM OUTPUT HRC021DK 00369500
  407. TM VMOSTAT,VMKILL PENDING LOGOFF FOR THIS USER ?? 00370000
  408. BO CONFBGN2 YES .. GO CLEAN UP AND RETURN TO USO 00371000
  409. TM VMOSTAT,VMVIRCF DIAGNOSE CONSOLE FUNCTION ?? @V200930 00372000
  410. BZ CONFNXT NO, CONT @V200930 00373000
  411. LTR R2,R2 TEST RETURN FROM FUNCTION @V200930 00374000
  412. BZ CONFNXT COMMAND OK, CONT @V200930 00375000
  413. ST R2,SAVER2 SET RETURN CODE @V200930 00376000
  414. B CONFBGN2 RUN MACHINE @V200930 00377000
  415. CONFNXT DS 0H @V200930 00378000
  416. CALL DMKSCNFD OTHERWISE, SCAN FOR NEXT COMMAND ON LINE 00379000
  417. BZ CONFNXT LOOP TIL END OF LOGICAL LINE @V200930 00380000
  418. BP CONFLEND BRANCH IF END OF BUFFER 00381000
  419. LM R2,R3,BUFNXT LOAD BUFFER COUNT AND POINTER 00382000
  420. LA R2,1(,R2) BUMP THE POINTER BY ONE 00383000
  421. BCTR R3,0 SUBTRACT ONE FROM THE COUNT 00384000
  422. STM R2,R3,BUFNXT STORE BACK 00385000
  423. SR R2,R2 ZERO RETURN CODE @VA09486 00385010
  424. B CONFSCAN FIND THE NEXT COMMAND 00386000
  425. SPACE 2 00387000
  426. CONFLEND TM VMOSTAT,VMSLEEP SLEEPING MACHINE ?? @V200930 00388000
  427. BZ TSTCFRUN NO, TEST FOR RUN MACHINE @V200930 00389000
  428. NI VMOSTAT,X'FF'-VMCF ALLOW ATTN BUT DONT RUN @V200930 00390000
  429. B CONFRBF FRET BUFFER @V200930 00391000
  430. TSTCFRUN TM VMOSTAT,VMVIRCF+VMCFRUN RUN THIS USER ?? @V200930 00392000
  431. BNZ CONFBGN2 YES @V200930 00393000
  432. LTR R13,R13 WAS IT A DMKCFMEN ENTRY ?? @V200930 00394000
  433. BNZ CONFBGN2 YES, RUN USER @V200930 00395000
  434. TM VMOSTAT,VMSYSOP SYSTEM OPERATOR ?? @V200930 00396000
  435. LA R2,NOAUTO PARMS FOR DMKQCNWT @V200820 00397000
  436. BZ CONFREAD NO, READ NEXT COMMAND @V200930 00398000
  437. SR R0,R0 CLEAR FOR CONFWRIT @V200930 00399000
  438. TM VMPSW+1,WAIT WAIT STATE PSW ?? @V200930 00400000
  439. BZ CONFWRIT NO, READ NEXT COMMAND @V200930 00401000
  440. TM VMPSW,IOMASK EXT CH ENABLED, OR CHAN 6 ?? @V200930 00402000
  441. BO CONFWRIT YES, READ NEXT COMMAND @V200930 00403000
  442. B CONFBGN2 NO, RUN USER @V200930 00404000
  443. EJECT 00405000
  444. SPACE 2 00406000
  445. CPCHAR DC C'CP ' REASSURANCE MESSAGE @V200820 00407000
  446. SPACE 00408000
  447. EJECT 00409000
  448. *. 00410000
  449. * ENTRY NAME - 00411000
  450. * DMKCFMAT 00412000
  451. * 00413000
  452. * FUNCTION - 00414000
  453. * TO SIMULATE AN ATTENTION INTERRUPT TO A VIRTUAL MACHINE. 00415000
  454. * 00416000
  455. * 0PERATION - 00417000
  456. * 1. CALL DMKSCNVU TO GET THE VIRTUAL DEVICE BLOKS. IF NONE 00418000
  457. * FOUND-EXIT. 00419000
  458. * 2. SET UP THE INTERRUPT PENDING FLAGS IN THE VCHBLOK,VCUBLOK, 00420000
  459. * AND VDEVBLOKS FOR AN ATTENTION INTERRUPT AND EXIT. 00421000
  460. * 3. SET CONDITION CODE FOR CALLER 00422000
  461. * CODE 0 - ATTENTION SET 00423000
  462. * CODE NOT 0 - NO CONSOLE OR ATTN ALREADY PEND 00424000
  463. * RESPONSES - 00425000
  464. * NONE 00426000
  465. * 00427000
  466. * ERROR MESSAGES - 00428000
  467. * NONE 00429000
  468. * 00430000
  469. *. 00431000
  470. SPACE 2 00432000
  471. DS 0D @V200820 00433000
  472. DMKCFMAT STM R0,R14,BALRSAVE SAVE REGS @V200930 00434000
  473. LR R12,R15 BASE REGISTER 00435000
  474. USING DMKCFMAT,R12 00436000
  475. LH R8,VMVTERM DISP TO VIRTUAL CONSOLE VDEVBLOK @V200820 00437000
  476. LTR R8,R8 IS THERE A VIRTUAL CONSOLE ? @V200820 00438000
  477. BM ATRETURN NO -- JUST EXIT FORTHWITH @V200820 00439000
  478. AL R8,VMDVSTRT GET THE VDEVBLOK ADDRESS @V200820 00440000
  479. USING VDEVBLOK,R8 @V200820 00441000
  480. LH R3,VDEVADD VIRTUAL DEVICE ADDR BITS INTO R3,@V200820 00442000
  481. ALR R3,R3 DOUBLE IT TO FORM CU/DEV INDEX @V200820 00443000
  482. LA R4,2 LOAD INDEX INCREMENT @V200820 00444000
  483. LA R5,30 LOAD INDEX COMPARAND @V200820 00445000
  484. SR R1,R1 ZERO VMCHTBL INDEX @V200820 00446000
  485. SCNNCH LH R6,VMCHTBL(R1) LOAD NEXT CHANNEL BLOK INDEX @V200820 00447000
  486. LTR R6,R6 DOES CHANNEL EXIST ? @V200820 00448000
  487. BM SCNXCH NO, INDEX TO NEXT ONE @V200820 00449000
  488. A R6,VMCHSTRT POINT TO VCHBLOK @V200820 00450000
  489. USING VCHBLOK,R6 @V200820 00451000
  490. SR R2,R2 ZERO VCHCUTBL INDEX @V200820 00452000
  491. SCNNCU LH R7,VCHCUTBL(R2) LOAD NEXT CU BLOK INDEX @V200820 00453000
  492. LTR R7,R7 DOES CONTROL UNIT EXIST @V200820 00454000
  493. BM SCNXCU NO, INDEX TO NEXT ONE @V200820 00455000
  494. A R7,VMCUSTRT POINT TO VCUBLOK @V200820 00456000
  495. USING VCUBLOK,R7 @V200820 00457000
  496. LH R0,VCUDVTBL(R3) LOAD DEVICE BLOCK INDEX @V200820 00458000
  497. LTR R0,R0 DOES DEVICE EXIST ? @V200820 00459000
  498. BM SCNXCU NO, INDEX TO NEXT CONTROL UNIT @V200820 00460000
  499. A R0,VMDVSTRT POINT TO VDEVBLOK @V200820 00461000
  500. CLR R0,R8 IS IT THE ONE WE WERE LOOKING FOR@V200820 00462000
  501. BE SCNDFND YES - GOOD SHOW. @V200820 00463000
  502. SCNXCU BXLE R2,R4,SCNNCU BRANCH IF MORE CONTROL UNITS @V200820 00464000
  503. SCNXCH BXLE R1,R4,SCNNCH BRANCH IF MORE CHANNELS @V200820 00465000
  504. TM *+1,X'FF' SET CONDITION CODE THREE @V200820 00466000
  505. B ATRETURN DEVICE DOES NOT REALLY EXIST @V200820 00467000
  506. SCNDFND EQU * NOW HAVE ALL THREE VIRTUAL BLOCKS@V200820 00468000
  507. TM VDEVINTS,ATTN IS ATTN PENDING NOW ?? @V200930 00469000
  508. BO ATRETURN YES, RETURN NON ZERO COND @V200930 00470000
  509. OI VDEVINTS,ATTN SET ATTN INT. IN VDEVBLOK 00471000
  510. OI VDEVSTAT,VDEVPEND SET DEVICE CLASS INT. PENDING 00472000
  511. TM VDEVSTAT,VDEVBUSY+VDEVCHBS DEVICE BUSY ? 00473000
  512. BO ATZERO RETURN COND ZERO @V200930 00474000
  513. L R2,=A(DMKVIOMK) POINT TO INT. PENDING MASK TABLE 00475000
  514. LH R1,VDEVADD GET VIRTUAL DEVICE ADDRESS 00476000
  515. AR R1,R1 DEVICE ADDRESS TIMES TWO 00477000
  516. LA R1,0(R2,R1) POINT TO CORRECT PENDING MASK 00478000
  517. OC VCUDVINT,0(R1) SET PENDING FLAGS IN VCUBLOK 00479000
  518. LH R1,VCUADD GET ADDRESS OF CONTROL UNIT 00480000
  519. SRL R1,3 TIMES TWO 00481000
  520. LA R1,0(R2,R1) POINT TO CORRECT PENDING MASK 00482000
  521. OC VCHCUINT,0(R1) SET PENDING FLAGS 00483000
  522. LH R1,VCHADD CHANNEL ADDRESS 00484000
  523. SRL R1,7 TIMES TWO 00485000
  524. LA R1,0(R2,R1) POINT TO CORRECT PENDING MASK 00486000
  525. OC VMIOINT,0(R1) FLAG PENDING CHANNEL 00487000
  526. OI VMPEND,VMIOPND FLAG SUMMARY IO PENDING FLAG 00488000
  527. TM VMOSTAT,VMVIRCF+VMCF @V408246 00489100
  528. BNZ *+8 @V408246 00489200
  529. OI VMQSTAT,VMPRIDSP @V408246 00489300
  530. ATZERO TM *,0 SET COND ZERO RETURN @V200930 00490000
  531. ATRETURN LM R0,R14,BALRSAVE RESTORE REGS @V200930 00491000
  532. BR R14 RETURN 00492000
  533. DROP R6,R7,R8 00493000
  534. SPACE 00494000
  535. SETPEND OI VMPEND,0 EXECUTE TO SET PENDING FLAG IN VMBLOK 00495000
  536. EJECT 00496000
  537. USING DMKCFMWU,R12 @VM03169 00497000
  538. DMKCFMWU EQU * @VM03169 00498000
  539. L R12,=A(DMKCFM) @V200820 00499000
  540. USING DMKCFM,R12 USE COMMON ADDRESSABILITY @V200820 00500000
  541. SLR R13,R13 NO SAVE AREA AT THE MOMENT @V200820 00501000
  542. L R1,VMDELAY POINTER TO THE TRQBLOK @V200820 00502000
  543. B SLPFRET REMOVE FROM SLEEP, FRET TRQBLOK @V200820 00503000
  544. EJECT 00504000
  545. LTORG @V200820 00505000
  546. EJECT 00506000
  547. PSA , @V306638 00507000
  548. COPY CONBUF @V306638 00508000
  549. COPY DEVTYPES @V306638 00509000
  550. COPY EQU @V306638 00510000
  551. COPY RBLOKS @V306638 00511000
  552. COPY SAVE @V306638 00512000
  553. COPY TIMER @V306638 00513000
  554. COPY TREXT @V306638 00514000
  555. COPY VBLOKS @V306638 00515000
  556. COPY VMBLOK @V306638 00516000
  557. * COMMAND CLASS EQUATES 00517000
  558. A EQU VMCLASSA 00518000
  559. B EQU VMCLASSB 00519000
  560. C EQU VMCLASSC 00520000
  561. D EQU VMCLASSD 00521000
  562. E EQU VMCLASSE 00522000
  563. F EQU VMCLASSF 00523000
  564. G EQU VMCLASSG 00524000
  565. H EQU VMCLASSH 00525000
  566. NOCLASS EQU X'01' 00526000
  567. END 00527000