CFM TITLE 'DMKCFM (CP) VM/370 - RELEASE 6' 00001000
ISEQ 73,80 VALIDATE SEQUENCING OF INPUT 00002000
SPACE 3 00003000
*. 00004000
* MODULE NAME - 00005000
* 00006000
* DMKCFM 00007000
* 00008000
* FUNCTION - 00009000
* 00010000
* TO READ CP REQUESTS FROM THE USER'S TERMINAL AND DIRECT THEM 00011000
* TO THE APPROPRIATE CONSOLE FUNCTION ROUTINE FOR PROCESSING. 00012000
* 00013000
* ATTRIBUTES- 00014000
* 00015000
* REENTRANT, RESIDENT, CALLED VIA SVC 00016000
* 00017000
* 00018000
* ENTRY POINTS - 00019000
* 00020000
* DMKCFMBK - ENTERED WHEN ATTENTION IS HIT TWICE AT A TERMINAL 00021000
* DMKCFMEN - ENTERED WHEN A DIAGNOSE CODE 8 IS EXECUTED 00022000
* OR FROM DMKGRF TO PROCESS IMMEDIATE COMMANDS 00022500
* DMKCFMAT - ENTERED TO POST ATTN INT PENDING 00023000
* DMKCFMWU - ENTERED WHEN SLEEP TIME EXPIRES 00024000
* 00025000
* ENTRY CONDITIONS - 00026000
* 00027000
* DMKCFMBK - 00028000
* GPR 11 CONTAINS THE USER'S VMBLOK ADDRESS 00029000
* 00030000
* DMKCFMEN - 00031000
* GPR 0 CONTAINS THE MESSAGE CHARACTER COUNT 00032000
* GPR 1 POINTS TO AN 18 DOUBLE WORD INPUT MESSAGE BUFFER 00033000
* GPR 11 CONTAINS THE USER'S VMBLOK ADDRESS 00034000
* 00035000
* EXIT CONDITIONS - 00036000
* 00037000
* GPR 2 CONTAINS A RETURN CODE IF ENTERED AT VIRCF. 00038000
* 00039000
* CALLS TO OTHER ROUTINES - 00040000
* 00041000
* DMKCFCMD - TO RETURN THE ADDRESS OF THE ROUTINE THAT 00042000
* WILL PROCESS THE COMMAND. 00043000
* 00044000
* TABLES / WORK AREAS - 00045000
* 00046000
* VMBLOK 00047000
* 00048000
* 00049000
* 00050000
* REGISTER USAGE - 00051000
* 00052000
* GPR 0 = PARAMETER 00053000
* GPR 1 = PARAMETER 00054000
* GPR 2 = SCRATCH 00055000
* GPR 3 = SCRATCH 00056000
* GPR 4 = SCRATCH 00057000
* GPR 5 = SCRATCH 00058000
* GPR 9 = INPUT MESSAGE BASE 00059000
* GPR 11 = VMBLOK BASE 00060000
* GPR 12 = MODULE BASE 00061000
* GPR 13 = SAVE AREA BASE 00062000
* GPR 14 = LINKAGE 00063000
* GPR 15 = LINKAGE 00064000
* 00065000
* 00066000
* 00067000
* NOTES - 00068000
* NONE 00069000
* 00070000
* 00071000
* OPERATION - 00072000
* 00073000
* 1. DMKCFMBK - BREAK ENTRY-CALL DMKFREE TO OBTAIN AN INPUT 00074000
* BUFFER. 00075000
* 2. IF SYSTEM OPERATOR, CALL DMKQCNWT TO SEND A NULL LINE. 00076000
* IF NOT, SET UP 'CP' MESSAGE AND CALL DMKQCNWT TO 00077000
* SEND IT. THEN GO TO STEP 4. 00078000
* 3. CONTROL IS GIVEN HERE TO READ THE SECOND AND SUBSEQUENT 00079000
* LINES. SET UP FOR NULL LINE AND IF THIS IS THE SYSTEM 00080000
* OPERATOR, CALL DMKQCNWT TO SEND IT AND THEN GO TO NEXT 00081000
* STEP. IF NOT SYSTEM OPERATOR, JUST GO TO NEXT STEP. 00082000
* 4. CALL DMKQCNRD TO READ THE NEXT COMMAND. CONTROL WILL BE 00083000
* RETURNED TO STEP 6 WHEN A COMMAND IS READ. IF THIS IS THE 00084000
* FIRST READ GO TO STEP 18. IF NOT, GO TO STEP 17. 00085000
* 5. DMKCFMEN - ENTRY FROM A DIAGNOSE RECEIVED FROM CMS OR 00086500
* FROM DMKGRF. SAVE THE REGS AND GO TO STEP 10. 00087500
* 6. CONFRRTN - RETURN FROM LINE READ. IF GPR 2 IS EQUAL TO 00088000
* ZERO, GO TO STEP 7. IF EQUAL TO 4 OR 8, GO TO STEP 8. 00089000
* IF EQUAL TO 12, GO TO STEP 9. 00090000
* 7. IF INPUT COUNT IS NON-ZERO, GO TO STEP 10. IF ZERO, CALL 00091000
* DMKQCNWT TO SEND 'CP' MESSAGE. THEN GO TO STEP 20. 00092000
* 8. IF INPUT COUNT IS ZERO GO TO CALL DMKCFMAT TO 00093000
* SIMULATE AN ATTENTION INTERRUPT. THEN GO TO STEP 14. 00094000
* ELSE- GO TO STEP 4 TO REISSUE THE READ. 00095000
* 9. THIS IS A 'LINE BREAK'. GO TO STEP 15. 00096000
* 10. STORE COUNT OF CHARACTERS IN LINE AND ADDRESS OF THE 00097000
* FIRST CHARACTER IN THE COMMAND LINE FOR USE BY DMKSCNFD. 00098000
* 11. CALL DMKSCNFD TO LOCATE THE COMMAND ARGUMENT. IF NONE IS 00099000
* FOUND GO TO STEP 19. IF HAVE ONE, CALL DMKCFCMD TO GET 00100000
* THE ROUTINES ADDRESS AND TO INSURE THAT THE ABREVIATION 00101000
* AND CLASS ARE VALID. 00102000
* 12. IF GET A VALID HIT, CALL THE APPROPRIATE ROUTINE TO 00103000
* HANDLE THE REQUEST VIA AN SVC 8. 00104000
* 13. IF GET A NORMAL RETURN FROM THE CALLED ROUTINE, GO TO 00105000
* STEP 19 TO CONTINUE PROCESSING. 00106000
* 14. IF GET A RETURN+4, TURN OFF CONSOLE FUNCTION WAIT 00107000
* TO ALLOW VIRTUAL MACHINE TO RUN. THEN CONTINUE WITH NEXT 00108000
* STEP. 00109000
* 15. IF RETURN IS+8, TURN OFF ONLY THE CONSOLE FUNCTION FLAG. 00110000
* IF BOTH STEPS 14 AND 15 ARE EXECUTED, THE VIRTUAL MACHINE 00111000
* IS ALLOWED TO RUN AND DO CONSOLE FUNCTIONS. IF ONLY 00112000
* STEP 15 IS EXECUTED, THE ONLY FUNCTION THE USER MAY 00113000
* DO IS HIT THE ATTENTION. 00114000
* 16. CALL DMKFRET TO RETURN THE LINE BUFFER TO STORAGE. 00115000
* 17. IF ENTRY WAS VIA A DIAGNOSE,CONTINUE--ELSE GO TO 00116000
* DMKDSPCH(DISPATCH). 00117000
* 18. STORE RETURN CODE IN SAVER2 AND RETURN VIA SVC 12. 00118000
* 19. IF ENTRY WAS VIA DIAGNOSE, STORE RETURN CODE IN SAVER2. 00119000
* THEN CALL DMKSCNFD TO SCAN DOWN LINE . IF A LOGICAL 00120000
* LINE END IS ENCOUNTERED, GO TO STEP 11 TO CHECK COMMAND. 00121000
* 20. IF GET TO THE END OF THE LINE AND ENTERED VIA A DIAGNOSE, 00122000
* GO TO STEP 14. IF VIRTUAL MACHINE IS TO BE RUN, GO TO 00123000
* STEP 14---ELSE GOT TO STEP 3 TO READ NEXT LINE. 00124000
* 00125000
* ERROR MESSAGES - NONE 00126000
*. 00127000
EJECT 00128000
COPY OPTIONS 00129000
COPY LOCAL 00130000
SPACE 3 00131000
DMKCFM START 0 00132000
SPACE 00133000
MODID DC CL8'DMKCFM' 00134000
SPACE 00135000
USING PSA,R0 00136000
USING VMBLOK,R11 00137000
USING SAVEAREA,R13 00138000
SPACE 00139000
ENTRY DMKCFMAT @V200820 00140000
ENTRY DMKCFMBK,DMKCFMEN,DMKCFMWU @VM03169 00141000
SPACE 00142000
AIF (NOT &TRACE(6)).TR1 00143000
EXTRN DMKTRCPB,DMKTRCIT 00144000
.TR1 ANOP 00145000
EXTRN DMKERMSG 00146000
EXTRN DMKSTKCP 00147000
EXTRN DMKCFCMD @VM03169 00148000
EXTRN DMKQCNRD @VM03169 00149000
EXTRN DMKSCNFD @VM03169 00150000
EXTRN DMKSCHRT @VM03169 00151000
EXTRN DMKVIOMK @VM03169 00152000
EXTRN DMKDSPB @VM03257 00153000
EJECT 00154000
USING DMKCFMBK,R12 @V200820 00155000
DMKCFMBK DS 0D @V200820 00156000
ENTER @V200820 00157000
L R12,=A(DMKCFM) @V200820 00158000
USING DMKCFM,R12 @V200820 00159000
SPACE 1 @V407594 00159100
TM APSTAT1,CPINITD CP READY FOR COMMANDS @VA07615 00159200
BZ CONFEXIT NO- IGNORE OPERATOR FOR NOW @V407594 00159300
SPACE 00160000
TM VMRSTAT,VMLOGOFF USER IN LOGOFF PROCESS NOW @V200820 00161000
BO CONFEXIT YES, GET OUT @V200930 00162000
TM VMOSTAT,VMCF+VMKILL EXECUTING CONSOLE FUNC OR @V200930 00163000
* DYING ?? 00164000
BNZ CONFEXIT YES, EXIT NOW @V200930 00165000
TM VMOSTAT,VMSLEEP IS MACHINE SLEEPING ?? @V200930 00166000
BZ NOTSLP NO, CONT @V200930 00167000
SPACE 00168000
L R1,VMDELAY CHECK FOR DELAYED SLEEP @V200820 00169000
LTR R1,R1 ??? @V200820 00170000
BZ GOSLEEP NOPE -- LET HIM GO AS IS @V200820 00171000
CALL DMKSCHRT RESET THE REQUEST @V200820 00172000
SLPFRET EQU * @V200820 00173000
USING TRQBLOK,R1 ADDRESSIBILITY FOR TIMER BLOK @V408246 00173100
LA R3,8 8 SECONDS @V408246 00173200
AL R3,TRQBTOD TOD AT SLEEP ENTER + 8 SECONDS @V408246 00173300
CL R3,TRQBVAL MINIMAL SLEEP INTERVAL @V408246 00173400
BNL *+8 ... FOR PRIORITY SCHEDULING @V408246 00173500
OI VMQSTAT,VMPRIDSP SET PRIORITY SCHEDULING @V408246 00173600
LA R0,TRQBSIZE @V200820 00174000
CALL DMKFRET RETURN TRQBLOK TO FREE STORAGE @V200820 00175000
SLR R1,R1 @V200820 00176000
ST R1,VMDELAY CLEAR OUT THE VMBLOK POINTER @V200820 00177000
GOSLEEP EQU * @V200820 00178000
NI VMOSTAT,X'FF'-VMSLEEP TURN OFF SLEEP FLAG @V200930 00179000
NI VMRSTAT,X'FF'-VMCFWAIT ALLOW TO RUN AGAIN @V200930 00180000
TM VMOSTAT,VMVIRCF DIAGNOSE CONS FUNC SLEEP ?? @V200930 00181000
BZ NOTSLP NO, CONT @V200930 00182000
NI VMOSTAT,X'FF'-VMVIRCF RESET DIAG CONS FUNC @V200930 00183000
B CONFTEXT @V200820 00184000
EJECT 00185000
NOTSLP DS 0H @V200930 00186000
BAL R9,CKTRA GO CHECK IF TRACING @VA01078 00187000
OI VMRSTAT,VMCFWAIT PUT USER IN CONSOLE FUNCTION WAIT 00188000
OI VMOSTAT,VMCF INDICATE THAT A CF IS IN PROGRESS 00189000
LA R0,BUFSIZE LOAD BUFFER SIZE 00190000
CALL DMKFREE GET A BUFFER FOR THE INPUT MESSAGE 00191000
LR R9,R1 LOAD BUFFER BASE REGISTER 00192000
USING BUFFER,R9 00193000
SLR R0,R0 CLEAR TO FORCE TIME STAMP @V200820 00194000
LA R2,NOAUTO ...IF THIS IS THE OPERATOR @V200820 00195000
TM VMOSTAT,VMSYSOP IS THIS THE SYSTEM OPERATOR @V200820 00196000
BO CONFWRIT YES - ZERO-LENGTH WRITE = TIME STAMP 00197000
TM VMMLEVEL,VMMSTMP IS USER TIME STAMPING MSGS ?@V200820 00198000
BO CONFWRIT YES - SAME LOGIC FOR HIM @V200820 00199000
SLR R2,R2 WRITE WITH C.R. FOR OTHER PROMPT @V200820 00200000
LA R1,CPCHAR POINT TO 'CP' CHARACTERS @V200820 00201000
LA R0,L'CPCHAR ... @V200820 00202000
TM VMRSTAT,VMLOGON IS THIS GUY LOGGED ON YET ? @V200820 00203000
BZ CONFWRIT YES - JUST WRITE 'CP' @V200820 00204000
LA R0,1 @V200820 00205000
LA R1,BLANKS WRITE A SINGLE BLANK @V200820 00206000
CONFWRIT L R3,VMTERM POINTER TO TERMINAL RDEVBLOK @V200820 00207000
CLI RDEVTYPC-RDEVBLOK(R3),CLASGRAF GRAPHIC DEV ?@V200820 00208000
BE CONFREAD YES - SKIP IT@V200820 00209000
CLI RDEVTYPC-RDEVBLOK(R3),CLASTERM IS THIS A @V2D3931 00210000
* TERMINAL CLAS 00211000
BNE *+12 NO, WRITE PROMPT CHARACTERS @V2D3931 00212000
CLI RDEVTYPE-RDEVBLOK(R3),TYPBSC IS THIS A BISYNC @V2D3931 00213000
* LINE 00214000
BE CONFREAD YES, READ A CONSOLE FUNCTION @V2D3931 00215000
* COMMAND 00216000
CALL DMKQCNWT,PARM=NORET(,R2) WRITE PROMPT CHARS@V200820 00217000
B CONFREAD READ A CONSOLE FUNCTION COMMAND @V200820 00218000
EJECT 00219000
USING DMKCFMEN,R12 @V200820 00220000
DMKCFMEN DS 0D ENTRY FOR CONSOLE FUNCTION DIAGNOSE @V200820 00221000
ENTER @V200820 00222000
L R12,=A(DMKCFM) @V200820 00223000
USING DMKCFM,R12 @V200820 00224000
LR R9,R1 LOAD INPUT BUFFER BASE @VA09084 00224100
TM VMRSTAT,VMLOGOFF IN LOGOFF? @VA09084 00224200
BO CONFRBF YES, FRET CMD BUFFER AND LEAVE @VA09084 00224300
TM VMOSTAT,VMKILL ARE WE BEING FORCED? @VA09084 00224400
BO CONFRBF YES, FRET CMD BUFFER AND LEAVE @VA09084 00224500
SPACE 00225000
BAL R9,CKTRA GO CHECK IF TRACING @VA01078 00226000
OI VMOSTAT,VMCF EXECUTING CONSOLE FUNCTION @V200930 00227000
OI VMRSTAT,VMCFWAIT PUT USER IN CONSOLE FUNCTION WAIT 00228000
LR R9,R1 LOAD INPUT BUFFER BASE 00229000
SLR R2,R2 @V200820 00230000
ST R2,SAVER2 SET RETURN CODE ZERO INITIALLY @V200820 00231000
B CONFSAVE CONTINUE 00232000
SPACE 2 00233000
CKTRA SR R3,R3 @VA01078 00234000
ST R3,SAVEWRK6 INITIALIZE TRACE DATA @VA01078 00235000
L R2,VMTREXT GET TRACE EXTENSION @VA01078 00236000
LTR R2,R2 ARE WE TRACING @VA01078 00237000
BZ NOTRACE NO @VA01078 00238000
USING TREXT,R2 @VA01078 00239000
CH R3,TREXTERM TRACING TO CONSOLE @VA01078 00240000
BZ NOTRACE NO @VA01078 00241000
TM TREXLOCK,X'FF' IS TRACE LOCKED NOW @VA01078 00242000
BZ NOTRACE NO, NOT EXECUTING NOW @VA01078 00243000
TM VMRSTAT,VMCFWAIT IS TRACE WAITING @VA01078 00244000
BNO NOTRACE NO @VA01078 00245000
IC R3,VMRSTAT GET TRACE RUN STATUS FLAGS @VA01078 00246000
STC R3,SAVEWRK6 SAVE FOR EXIT TIME @VA01078 00247000
NOTRACE EQU * @VA01078 00248000
DROP R2 @VA01078 00249000
BR R9 @VA01078 00250000
EJECT 00251000
CONFREAD EQU * READ COMMAND IN CONSOLE FUNCTION @V200820 00252000
LTR R13,R13 IS THIS THE FIRST READ ? @V200820 00253000
BZ CONREAD NO -- NO EXIT TO WORRY ABOUT @V200820 00254000
LA R0,CPEXSIZE @V200820 00255000
CALL DMKFREE GET FREE STORAGE FOR A CPEXBLOK @V200820 00256000
USING CPEXBLOK,R1 @V200820 00257000
XC CPEXBLOK(16),CPEXBLOK CLEAR THE HEADER SECTIO@V200820 00258000
STM R0,R15,CPEXREGS SET MY OWN REGISTERS @V200820 00259000
LA R15,CKTRACE ALL WE NEED IS AN 'EXIT' @V200820 00260000
ST R15,CPEXADD ... @V200820 00261000
CALL DMKSTKCP STACK THE CPEXBLOK FOR A LATER EX@V200820 00262000
DROP R1 @V200820 00263000
SLR R13,R13 SHOW THAT NO 'EXIT' IS REQUIRED @V200820 00264000
SPACE 00265000
CONREAD EQU * @V200820 00266000
TM VMOSTAT,VMCFRUN RUN MACHINE WHILE READING ? @V200820 00267000
BZ *+8 NO -- LET HIM WAIT @V200820 00268000
NI VMRSTAT,255-VMCFWAIT MAKE MACHINE RUNNABLE @V200820 00269000
OI VMQSTAT,VMCFREAD SET CF READ FLAG @VA01989 00270000
OI VMSPMFLG,VMCFRD1 SET CF READ BACK-UP @VA13025 00270500
LR R1,R9 BUFFER START ADDRESS TO GR1 @V200820 00271000
LA R0,BUFINLTH-2 MAXIMUM READ DATA LENGTH @V200820 00272000
CALL DMKQCNRD,PARM=UCASE+EDIT READ THE NEXT COMMAND @V200820 00273000
NI VMQSTAT,255-VMCFREAD RESET CF READ FLAG @VA01989 00274000
NI VMSPMFLG,255-VMCFRD1 RESET CF READ BACK-UP @VA13025 00274500
SPACE 00275000
OI VMRSTAT,VMCFWAIT MAKE SURE THE USER IS IN CF WAIT 00276000
TM VMOSTAT,VMKILL IS THE USER DEAD ON ARRIVAL @VM08908 00277000
BO CONFBGN3 YES - JUST BAIL OUT FAST @VM08908 00278000
B *+4(R2) 00279000
B CONNATTN NO ATTENTIONS HIT 00280000
B CONATTN SINGLE ATTENTION HIT 00281000
B CONATTN MULTIPLE ATTENTIONS HIT 00282000
B CONFBGN3 LINE BREAK 00283000
SPACE 2 00284000
CONATTN LTR R0,R0 INPUT COUNT ZERO? 00285000
BNZ CONFREAD NO, REISSUE READ 00286000
TM VMRSTAT,VMLOGON IS USER NOT LOGGED ON ??? 00287000
BO CONFREAD NO ---- 00288000
CALL DMKCFMAT SIMULATE AN ATTENTION 00289000
B CONFBGN2 00290000
SPACE 2 00291000
CONNATTN LTR R0,R0 INPUT COUNT ZERO? 00292000
BNZ CONFSAVE NO 00293000
TM VMRSTAT,VMLOGON IS USER NOT LOGGED ON ??? 00294000
BO CONFLEND NO --- 00295000
LA R0,2 SET MESSAGE LENGTH 00296000
LA R1,CPCHAR GET MESSAGE 00297000
CALL DMKQCNWT,PARM=NORET 00298000
B CONFLEND 00299000
SPACE 2 00300000
CONFSAVE ST R0,BUFCNT SAVE COUNT FOR SCANFLD 00301000
ST R1,BUFNXT SAVE FIRST CHARACTER LOCATION 00302000
CONFSCAN CALL DMKSCNFD SCAN FOR COMMAND CODE 00303000
BNZ CONFRETN NONE FOUND, READ THE NEXT LINE 00304000
SLR R2,R2 CLEAR ERROR RETURN CODE @VM03169 00305000
CALL DMKCFCMD PROCESS THIS COMMAND @VM03169 00306000
LTR R15,R1 WAS ROUTINE ADDRESS FOUND @VM03169 00307000
BZ CONFRETN NO @VM03169 00308000
BM CONFSCAN YES - BUT IT WAS 'CP' PREFIXED @VM03169 00309000
TM VMRSTAT,VMLOGOFF USER BEING LOGGED OFF? @VA08501 00309500
BO CONFRBF YES, FRET CMD BUFFER AND LEAVE @VA08501 00309600
TM VMOSTAT,VMKILL USER BEING FORCED? @VA08501 00309700
BO CONFRBF YES, FRET CMD BUFFER AND LEAVE @VA08501 00309800
CALL (15) CALL ROUTINE TO PROCESS COMMAND @VM03169 00310000
* NOTE THAT IF WE ARE CALLING DMKUSO TO PROCESS LOGOFF OR FORCE WE 00310500
* WILL NOT RETURN HERE. DMKUSO WILL RETURN DIRECTLY TO OUR CALLER. 00310600
* NORMAL RETURN WILL CAUSE NEXT COMMAND TO BE PROCESSED 00311000
* RETURN TO *+4 WILL CAUSE VIRTUAL MACHINE TO BE RUN 00312000
* RETURN TO *+8 WILL CAUSE CF WAIT FLAG TO BE LEFT ON 00313000
* RETURN TO *+12 TO FRET BUFFER AND NOT RUN 00314000
CONFBGN1 B CONFRETN READ THE NEXT LINE 00315000
CONFBGN2 NI VMRSTAT,255-VMCFWAIT ALLOW VIRTUAL MACHINE TO RUN 00316000
CONFBGN3 NI VMOSTAT,255-VMCF-VMSLEEP ALLOW ATTN, NOT SLEEP @V200930 00317000
CONFRBF LA R0,BUFSIZE SET BUFFER SIZE @V200930 00318000
LR R1,R9 LOAD BUFFER ADDRESS 00319000
CALL DMKFRET RELEASE THE INPUT BUFFER 00320000
CONFTEXT EQU * @V200820 00321000
NI VMHRCFLG,255-VMTRMOFF RESTORE TERM OUTPUT HRC021DK 00321050
TM VMOSTAT,VMVIRCF VIRTUAL CONSOLE FUNCTION? @V408246 00321100
BO *+8 YES, BYPASS Q1 @V408246 00321600
OI VMQSTAT,VMPRIDSP NO, GIVE QUIKIE Q1 @V408246 00322100
LTR R13,R13 RETURN BY EXIT ?? @V200930 00323000
BNZ CONFEXIT YES, EXIT TO CALLER @V200930 00324000
CONFDISP EQU * @VA03804 00325000
TM VMRSTAT,VMCPWAIT IS USER RUNNABLE ? @VA03804 00326000
BZ CONDISPB YES..CHECK OUT HIS PSW.. @VA03804 00327000
GOTO DMKDSPCH GOTO DISPATCH @VA03804 00328000
CONDISPB GOTO DMKDSPB NEW PSW ENTRY TO DISPATCH @VA03804 00329000
EJECT 00330000
CKTRACE L R2,VMTREXT GET TRACE EXTENSION @VA01078 00331000
LTR R2,R2 TRACING NOW @VA01078 00332000
BZ CONFEXIT NO @VA01078 00333000
L R3,SAVEWRK6 GET TRACE ENTRY DATA @VA01078 00334000
LTR R3,R3 TRACING ON ENTRY @VA01078 00335000
BZ CONFEXIT NO @VA01078 00336000
STCM R3,8,VMRSTAT RESTORE DMKTRC RUN STATUS FLAGS @VA01078 00337000
CONFEXIT ST R11,SAVER11 MIGHT HAVE CHANGED @V200930 00338000
EXIT RETURN TO CALLER @V200930 00339000
SPACE 3 00340000
CONFNEWL EQU * HERE TO SCAN FOR NEXT COMMAND 00341000
CONFRETN LR R5,R2 SAVE RETURN CODE @V200930 00342000
SLR R2,R2 CLEAR R2 @V407466 00343000
SLR R4,R4 CLEAR R4 @V407466 00343100
ICM R4,B'0111',VMSTKO+1 GET OUTPUT STACK @V407466 00343200
BZ NOSTK NONE ON STACK FOR OUTPUT @V200930 00345000
TM VMOSTAT,VMCFRUN IS SET RUN ON? @VA01836 00346000
BZ *+8 NOPE, OK AS IS @VA01836 00347000
NI VMRSTAT,255-VMCFWAIT LET HIM RUN DURING OUTPUT @VA01836 00348000
TM 0(R4),QRYERR STACKED ERROR MESSAGE? @V407466 00348100
BO QCNERR CALL QCN WITH ERRMSG PARM @V407466 00348200
CLRSTK SLR R1,R1 CLEAR O/P STACK @V407466 00349000
ST R1,VMSTKO POINTER... @VA03691 00350000
NXTWRT LA R1,8(R4) POINT TO DATA TO WRITE @V200930 00351000
LH R0,4(R4) GET LENGTH TO WRITE @V200930 00352000
CH R0,=H'72' TEST FOR LONG LINE ON SCREEN @V200930 00354000
BL *+8 < 72, WRITE WITH 'TIME' @V407466 00355000
LA R2,NOTIME(,R2) > 71, WRITE WITH 'NOTIME' @V407466 00355100
CALL DMKQCNWT WRITE WITH RETURN AND TIME IF SET@V200930 00358000
NXTSTK LR R1,R4 POINT TO STACK BUFFER @V200930 00359000
LH R0,6(R4) GET SIZE OF BUFFER IN DBL WORDS @V200930 00360000
L R6,0(R4) PTR TO NEXT BUFFER @V407466 00360800
LA R6,0(R6) CLEAN OFF HI BYTE @V407466 00361200
CALL DMKFRET RELEASE BUFFER @V200930 00362000
LTR R6,R6 TEST FOR MORE IN STACK @V407466 00363000
BZ NOSTK NO, ALL DONE @V200930 00364000
LR R4,R6 PTR TO NEXT BUFFER IN R4 @V407466 00364100
LTR R2,R2 TEST RETURN FROM WRITE @V200930 00365000
BNZ NXTSTK DELETE ALL ITEMS ON STACK @V407466 00366000
TM 0(R4),QRYERR STACKED ERROR MESSAGE @V407466 00366100
BZ NXTWRT DO NEXT LINE ON STACK @V407466 00366200
LA R2,ERRMSG ISSUE UNDER CTL OF ERROR FLAGS @V407466 00366300
B NXTWRT DO NEXT LINE ON STACK @V407466 00366400
QCNERR LA R2,ERRMSG ISSUE UNDER CTL OF ERROR FLAGS @V407466 00366500
B CLRSTK CLEAR STACK @V407466 00366600
SPACE 00366700
QRYERR EQU X'80' QUERY ERROR MESSAGE @V407466 00366800
EJECT 00368000
NOSTK LR R2,R5 RESTORE RETURN CODE @V200930 00369000
NI VMHRCFLG,255-VMTRMOFF RESTORE TERM OUTPUT HRC021DK 00369500
TM VMOSTAT,VMKILL PENDING LOGOFF FOR THIS USER ?? 00370000
BO CONFBGN2 YES .. GO CLEAN UP AND RETURN TO USO 00371000
TM VMOSTAT,VMVIRCF DIAGNOSE CONSOLE FUNCTION ?? @V200930 00372000
BZ CONFNXT NO, CONT @V200930 00373000
LTR R2,R2 TEST RETURN FROM FUNCTION @V200930 00374000
BZ CONFNXT COMMAND OK, CONT @V200930 00375000
ST R2,SAVER2 SET RETURN CODE @V200930 00376000
B CONFBGN2 RUN MACHINE @V200930 00377000
CONFNXT DS 0H @V200930 00378000
CALL DMKSCNFD OTHERWISE, SCAN FOR NEXT COMMAND ON LINE 00379000
BZ CONFNXT LOOP TIL END OF LOGICAL LINE @V200930 00380000
BP CONFLEND BRANCH IF END OF BUFFER 00381000
LM R2,R3,BUFNXT LOAD BUFFER COUNT AND POINTER 00382000
LA R2,1(,R2) BUMP THE POINTER BY ONE 00383000
BCTR R3,0 SUBTRACT ONE FROM THE COUNT 00384000
STM R2,R3,BUFNXT STORE BACK 00385000
SR R2,R2 ZERO RETURN CODE @VA09486 00385010
B CONFSCAN FIND THE NEXT COMMAND 00386000
SPACE 2 00387000
CONFLEND TM VMOSTAT,VMSLEEP SLEEPING MACHINE ?? @V200930 00388000
BZ TSTCFRUN NO, TEST FOR RUN MACHINE @V200930 00389000
NI VMOSTAT,X'FF'-VMCF ALLOW ATTN BUT DONT RUN @V200930 00390000
B CONFRBF FRET BUFFER @V200930 00391000
TSTCFRUN TM VMOSTAT,VMVIRCF+VMCFRUN RUN THIS USER ?? @V200930 00392000
BNZ CONFBGN2 YES @V200930 00393000
LTR R13,R13 WAS IT A DMKCFMEN ENTRY ?? @V200930 00394000
BNZ CONFBGN2 YES, RUN USER @V200930 00395000
TM VMOSTAT,VMSYSOP SYSTEM OPERATOR ?? @V200930 00396000
LA R2,NOAUTO PARMS FOR DMKQCNWT @V200820 00397000
BZ CONFREAD NO, READ NEXT COMMAND @V200930 00398000
SR R0,R0 CLEAR FOR CONFWRIT @V200930 00399000
TM VMPSW+1,WAIT WAIT STATE PSW ?? @V200930 00400000
BZ CONFWRIT NO, READ NEXT COMMAND @V200930 00401000
TM VMPSW,IOMASK EXT CH ENABLED, OR CHAN 6 ?? @V200930 00402000
BO CONFWRIT YES, READ NEXT COMMAND @V200930 00403000
B CONFBGN2 NO, RUN USER @V200930 00404000
EJECT 00405000
SPACE 2 00406000
CPCHAR DC C'CP ' REASSURANCE MESSAGE @V200820 00407000
SPACE 00408000
EJECT 00409000
*. 00410000
* ENTRY NAME - 00411000
* DMKCFMAT 00412000
* 00413000
* FUNCTION - 00414000
* TO SIMULATE AN ATTENTION INTERRUPT TO A VIRTUAL MACHINE. 00415000
* 00416000
* 0PERATION - 00417000
* 1. CALL DMKSCNVU TO GET THE VIRTUAL DEVICE BLOKS. IF NONE 00418000
* FOUND-EXIT. 00419000
* 2. SET UP THE INTERRUPT PENDING FLAGS IN THE VCHBLOK,VCUBLOK, 00420000
* AND VDEVBLOKS FOR AN ATTENTION INTERRUPT AND EXIT. 00421000
* 3. SET CONDITION CODE FOR CALLER 00422000
* CODE 0 - ATTENTION SET 00423000
* CODE NOT 0 - NO CONSOLE OR ATTN ALREADY PEND 00424000
* RESPONSES - 00425000
* NONE 00426000
* 00427000
* ERROR MESSAGES - 00428000
* NONE 00429000
* 00430000
*. 00431000
SPACE 2 00432000
DS 0D @V200820 00433000
DMKCFMAT STM R0,R14,BALRSAVE SAVE REGS @V200930 00434000
LR R12,R15 BASE REGISTER 00435000
USING DMKCFMAT,R12 00436000
LH R8,VMVTERM DISP TO VIRTUAL CONSOLE VDEVBLOK @V200820 00437000
LTR R8,R8 IS THERE A VIRTUAL CONSOLE ? @V200820 00438000
BM ATRETURN NO -- JUST EXIT FORTHWITH @V200820 00439000
AL R8,VMDVSTRT GET THE VDEVBLOK ADDRESS @V200820 00440000
USING VDEVBLOK,R8 @V200820 00441000
LH R3,VDEVADD VIRTUAL DEVICE ADDR BITS INTO R3,@V200820 00442000
ALR R3,R3 DOUBLE IT TO FORM CU/DEV INDEX @V200820 00443000
LA R4,2 LOAD INDEX INCREMENT @V200820 00444000
LA R5,30 LOAD INDEX COMPARAND @V200820 00445000
SR R1,R1 ZERO VMCHTBL INDEX @V200820 00446000
SCNNCH LH R6,VMCHTBL(R1) LOAD NEXT CHANNEL BLOK INDEX @V200820 00447000
LTR R6,R6 DOES CHANNEL EXIST ? @V200820 00448000
BM SCNXCH NO, INDEX TO NEXT ONE @V200820 00449000
A R6,VMCHSTRT POINT TO VCHBLOK @V200820 00450000
USING VCHBLOK,R6 @V200820 00451000
SR R2,R2 ZERO VCHCUTBL INDEX @V200820 00452000
SCNNCU LH R7,VCHCUTBL(R2) LOAD NEXT CU BLOK INDEX @V200820 00453000
LTR R7,R7 DOES CONTROL UNIT EXIST @V200820 00454000
BM SCNXCU NO, INDEX TO NEXT ONE @V200820 00455000
A R7,VMCUSTRT POINT TO VCUBLOK @V200820 00456000
USING VCUBLOK,R7 @V200820 00457000
LH R0,VCUDVTBL(R3) LOAD DEVICE BLOCK INDEX @V200820 00458000
LTR R0,R0 DOES DEVICE EXIST ? @V200820 00459000
BM SCNXCU NO, INDEX TO NEXT CONTROL UNIT @V200820 00460000
A R0,VMDVSTRT POINT TO VDEVBLOK @V200820 00461000
CLR R0,R8 IS IT THE ONE WE WERE LOOKING FOR@V200820 00462000
BE SCNDFND YES - GOOD SHOW. @V200820 00463000
SCNXCU BXLE R2,R4,SCNNCU BRANCH IF MORE CONTROL UNITS @V200820 00464000
SCNXCH BXLE R1,R4,SCNNCH BRANCH IF MORE CHANNELS @V200820 00465000
TM *+1,X'FF' SET CONDITION CODE THREE @V200820 00466000
B ATRETURN DEVICE DOES NOT REALLY EXIST @V200820 00467000
SCNDFND EQU * NOW HAVE ALL THREE VIRTUAL BLOCKS@V200820 00468000
TM VDEVINTS,ATTN IS ATTN PENDING NOW ?? @V200930 00469000
BO ATRETURN YES, RETURN NON ZERO COND @V200930 00470000
OI VDEVINTS,ATTN SET ATTN INT. IN VDEVBLOK 00471000
OI VDEVSTAT,VDEVPEND SET DEVICE CLASS INT. PENDING 00472000
TM VDEVSTAT,VDEVBUSY+VDEVCHBS DEVICE BUSY ? 00473000
BO ATZERO RETURN COND ZERO @V200930 00474000
L R2,=A(DMKVIOMK) POINT TO INT. PENDING MASK TABLE 00475000
LH R1,VDEVADD GET VIRTUAL DEVICE ADDRESS 00476000
AR R1,R1 DEVICE ADDRESS TIMES TWO 00477000
LA R1,0(R2,R1) POINT TO CORRECT PENDING MASK 00478000
OC VCUDVINT,0(R1) SET PENDING FLAGS IN VCUBLOK 00479000
LH R1,VCUADD GET ADDRESS OF CONTROL UNIT 00480000
SRL R1,3 TIMES TWO 00481000
LA R1,0(R2,R1) POINT TO CORRECT PENDING MASK 00482000
OC VCHCUINT,0(R1) SET PENDING FLAGS 00483000
LH R1,VCHADD CHANNEL ADDRESS 00484000
SRL R1,7 TIMES TWO 00485000
LA R1,0(R2,R1) POINT TO CORRECT PENDING MASK 00486000
OC VMIOINT,0(R1) FLAG PENDING CHANNEL 00487000
OI VMPEND,VMIOPND FLAG SUMMARY IO PENDING FLAG 00488000
TM VMOSTAT,VMVIRCF+VMCF @V408246 00489100
BNZ *+8 @V408246 00489200
OI VMQSTAT,VMPRIDSP @V408246 00489300
ATZERO TM *,0 SET COND ZERO RETURN @V200930 00490000
ATRETURN LM R0,R14,BALRSAVE RESTORE REGS @V200930 00491000
BR R14 RETURN 00492000
DROP R6,R7,R8 00493000
SPACE 00494000
SETPEND OI VMPEND,0 EXECUTE TO SET PENDING FLAG IN VMBLOK 00495000
EJECT 00496000
USING DMKCFMWU,R12 @VM03169 00497000
DMKCFMWU EQU * @VM03169 00498000
L R12,=A(DMKCFM) @V200820 00499000
USING DMKCFM,R12 USE COMMON ADDRESSABILITY @V200820 00500000
SLR R13,R13 NO SAVE AREA AT THE MOMENT @V200820 00501000
L R1,VMDELAY POINTER TO THE TRQBLOK @V200820 00502000
B SLPFRET REMOVE FROM SLEEP, FRET TRQBLOK @V200820 00503000
EJECT 00504000
LTORG @V200820 00505000
EJECT 00506000
PSA , @V306638 00507000
COPY CONBUF @V306638 00508000
COPY DEVTYPES @V306638 00509000
COPY EQU @V306638 00510000
COPY RBLOKS @V306638 00511000
COPY SAVE @V306638 00512000
COPY TIMER @V306638 00513000
COPY TREXT @V306638 00514000
COPY VBLOKS @V306638 00515000
COPY VMBLOK @V306638 00516000
* COMMAND CLASS EQUATES 00517000
A EQU VMCLASSA 00518000
B EQU VMCLASSB 00519000
C EQU VMCLASSC 00520000
D EQU VMCLASSD 00521000
E EQU VMCLASSE 00522000
F EQU VMCLASSF 00523000
G EQU VMCLASSG 00524000
H EQU VMCLASSH 00525000
NOCLASS EQU X'01' 00526000
END 00527000