OVR TITLE 'DMSOVR (CMS) VM/370 - RELEASE 6' 00001000
SPACE 2 00002000
*. 00003000
* MODULE NAME - 00008000
* 00009000
* DMSOVR (OVERRIDE) 00010000
* 00011000
* FUNCTION - 00012000
* 00013000
* TO ANALYZE THE THE 'SVCTRACE' COMMAND PLIST, AND 00014000
* TO BOOTSTRAP-LOAD THE DMSOVS (OVERSUB) TRACING ROUTINE. 00015000
* 00016000
* ATTRIBUTES - 00017000
* 00018000
* DISK-RESIDENT (TRANSIENT), RE-USABLE 00019000
* NOTE: SVCTRACE MUST BE GENMOD'D WITH THE SYSTEM OPTION 00019100
* 00020000
* ENTRY POINTS - 00021000
* 00022000
* DMSOVR 00023000
* 00024000
* ENTRY CONDITIONS - 00025000
* 00026000
* R1 -> SVCTRACE PLIST 00027000
* 00028000
* EXIT CONDITIONS - 00029000
* 00030000
* NORMAL - 00031000
* RETURN CODE = 0 00032000
* 00033000
* ERROR - 00034000
* DMSOVS003E INVALID OPTION 'OPTION' (RC = 24) 00035000
* DMSOVS047E NO FUNCTION SPECIFIED. (RC = 24) 00036000
* DMSOVS104S ERROR READING FILE DMSOVR MODULE FROM DISK. (RC = 00037000
* 100) 00038000
* 00039000
* CALLS TO OTHER ROUTINES - 00040000
* 00041000
* RDBUF -- TO READ FILE DMSOVR MODULE FROM DISK. 00042000
* DMSERR -- TO TYPE OUT ERROR MESSAGES. 00043000
* 00044000
* EXTERNAL REFERENCES - 00045000
* 00046000
* NONE 00047000
* 00048000
* TABLES / WORKAREAS - 00049000
* 00050000
* SETS FLAG BITS IN SVCSECT, TO BE INTERROGATED BY 00051000
* DMSOVS. 00052000
* 00053000
* REGISTER USAGE - 00054000
* 00055000
* R3 -> CURRENT PAIR OF FLAG BYTES 00056000
* R4 = INTERNAL SUBROUTINE LINK REGISTER 00057000
* R5 -> 'SVCTRACE' PLIST 00058000
* R6 -> SVCSECT 00059000
* 00060000
* NOTES - 00061000
* 00062000
* NONE 00063000
* 00064000
* OPERATION - 00065000
* 00066000
* THE 'SVCTRACE' PLIST IS EXAMINED, AND BITS ARE SET IN SVCSECT 00067000
* CORRESPONDING TO EACH OF THE OPTIONS SPECIFIED. 00068000
* AFTER THE PLIST HAS BEEN PROCESSED, THEN DMSOVS MODULE IS 00069000
* LOADED INTO FREE STORAGE IF TRACING IS 'ON', AND IT WAS NOT 00070000
* ALREADY IN CORE; OR ELSE, FREE STORAGE USED BY DMSOVS IS 00071000
* RELEASED, IF IT IS IN FREE STORAGE, AND TRACING IS 00072000
* NOW 'OFF'. 00073000
* 00074000
* P3071 00075000
* P3071 00076000
* P3071 00077000
*. P3071 00078000
EJECT P3071 00079000
MACRO 00083000
CKBYTE &N,&B , .... 00084000
LCLA &I 00085000
LCLC &L 00086000
.LOOP ANOP 00087000
&I SETA &I+2 00088000
AIF (&I GT N'&SYSLIST).MEND 00089000
&L SETC 'CKB&SYSLIST(&I).E' 00090000
CLC =CL8'&SYSLIST(&I-1)',0(PR) 00091000
BNE &L 00092000
LA FLR,OV&SYSLIST(&I).F 00093000
OI 0(FLR),OVF1ON 00094000
B PARMLOOP 00095000
&L EQU * 00096000
AGO .LOOP 00097000
.MEND MEND 00098000
EJECT 00099000
MACRO 00100000
TON &OP,&N,&BIT 00101000
LCLC &S 00102000
&S SETC '&SYSNDX' 00103000
CLC =CL8'&OP',0(PR) 00104000
BNE ON&S 00105000
OI &N-1(FLR),OVF&N.&BIT 00106000
B PARMLOOP GO FOR NEXT TOKEN 00107000
ON&S EQU * 00108000
MEND 00109000
SPACE 5 00110000
MACRO 00111000
TOFF &OP,&N,&BIT 00112000
LCLC &S 00113000
&S SETC '&SYSNDX' 00114000
CLC =CL8'&OP',0(PR) 00115000
BNE OFF&S 00116000
NI &N-1(FLR),X'FF'-(OVF&N.&BIT) 00117000
B PARMLOOP 00118000
OFF&S EQU * 00119000
MEND 00120000
EJECT 00121000
MACRO 00122000
TONOFF &OP,&N,&BIT 00123000
LCLA &I 00124000
.LOOP ANOP 00125000
&I SETA &I+3 00126000
AIF (&I GT N'&SYSLIST).MEND 00127000
TON &SYSLIST(&I-2),&SYSLIST(&I-1),&SYSLIST(&I) 00128000
TOFF NO&SYSLIST(&I-2),&SYSLIST(&I-1),&SYSLIST(&I) 00129000
AGO .LOOP 00130000
.MEND MEND 00131000
* REGISTER DEFINITIONS 00133000
DMSOVR START X'E000' 00134000
REGEQU 00135000
SPACE 5 00136000
BR EQU R12 BASE REGISTER 00137000
FLR EQU R3 FLAG BYTE PAIR POINTER 00138000
RR EQU R4 SUBROUTINE RETURN REGISTER 00139000
PR EQU R5 PLIST POINTER 00140000
SVCR EQU R6 POINTER TO SVCSECT 00141000
OVSR EQU R7 POINTER TO OVSECT 00142000
XR EQU R8 SCRATCH REG 00143000
SPACE 5 00144000
USING DMSOVR,BR 00145000
USING SVCSECT,SVCR 00146000
USING NUCON,R0 00147000
USING OVSECT,OVSR 00148000
DMSOVR CSECT 00150000
SAVE (14,12),,* SAVE REGISTERS 00151000
LR BR,R15 COPY OVER BASE REGISTER 00152000
L SVCR,ASVCSECT POINT TO SVCSECT 00153000
LA PR,8(,R1) POINT TO FIRST PARM IN PLIST 00154000
MVI RC,0 ZERO RETURN CODE SO FAR 00156000
SR FLR,FLR NO FLAG BYTE POINTER YET 00157000
CLI 0(PR),X'FF' ANY PARAMETERS?? 00158000
BE ERNOPARM ERROR IF NONE 00159000
CLC =CL8'OFF',0(PR) SVCTRACE OFF? 00160000
BE OFF TURN OFF IF SO 00161000
CLC =CL8'ON',0(PR) SVCTRACE ON SPECIFIED? 00162000
BE ON GO HANDLE IT 00163000
B ERPARM NOT A PROPER PARAMETER @VA02088 00165500
EJECT 00206000
* RELEASE DMSOVS, IF IT IS IN CORE. 00207000
OFF EQU * 00208000
NI OVSTAT,X'FF'-(OVSON+OVSHO+OVSSO) TURN OFF FLAGS 00209000
CLC ADMSOVS,=F'0' DMSOVS IN STORAGE? 00210000
BE OFFN NOTHING TO DO IF NOT 00211000
L OVSR,ADMSOVS POINT TO DMSOVS 00212000
L R0,LENOVS GET ITS LENGTH 00213000
LR R1,OVSR R1 -> DMSOVS 00214000
DMSFRET DWORDS=(0),LOC=(1) RELEASE IT 00215000
MVC ADMSOVS,=F'0' ZERO OUT THE POINTER 00216000
SPACE 00217000
OFFE EQU * 00218000
TM OVBPF,OVF1ON WAS 'BEFORE PRINT' FLAG ON? 00219000
BO OFFP PRINT OFF MESSAGE IF IT WAS 00220000
TM OVAPF,OVF1ON WAS 'AFTER PRINT' FLAG ON? 00221000
BNO OFFN DON'T PRINT IF IT WASN'T 00222000
SPACE 00223000
OFFP EQU * 00224000
LINEDIT DISP=PRINT,COMP=NO,DOT=NO, *00225000
TEXT='0 SVCTRACE OFF' 00226000
LINEDIT TEXT='CLOSE PRT',DISP=CPCOMM,DOT=NO 00227000
SPACE 00228000
OFFN EQU * 00229000
CLI RC,0 ZERO RETURN CODE? 00230000
BE RETURN CHECK FOR ERROR IF SO 00231000
B RETOFF OTHERWISE, JUST RETURN 00232000
EJECT 00233000
* SVCTRACE ON 00234000
ON EQU * 00235000
MVC OVBPF(8),ONF SET 'ON' FLAGS 00236000
B LOADOVS GO LOAD DMSOVS INTO MEMORY 00237000
SPACE 00238000
* FLAGS FOR 'ON' 00239000
ONF DC AL1(OVF1ON,OVF2CM+OVF2NR+OVF2OS+OVF2WA) 00240000
DC AL1(0,0) 00241000
DC AL1(OVF1ON+OVF1GB+OVF1GA+OVF1GS+OVF1PA+OVF1F+OVF1FS) 00242000
DC AL1(OVF2CM+OVF2NR+OVF2OS+OVF2WA) 00243000
DC AL1(0,0) 00244000
EJECT 00245000
* LOAD DMSOVS INTO STORAGE 00246000
LOADOVS EQU * 00247000
TM OVBPF,OVF1ON 'BEFORE PRINT' FLAG ON? 00248000
BO LOADMSG PRINT MESSAGE IF ON 00249000
TM OVAPF,OVF1ON 'AFTER PRINT' FLAG ON? 00250000
BNO LOADOVS1 DON'T PRINT IF NOT 00251000
SPACE 00252000
LOADMSG EQU * 00253000
LINEDIT DISP=PRINT,COMP=NO,DOT=NO, *00254000
TEXT='1 SVCTRACE ON' 00255000
SPACE 00256000
LOADOVS1 EQU * 00257000
CLC ADMSOVS,=F'0' IS IT IN STORAGE? 00258000
BNE RETURN NORMAL RETURN IF SO 00259000
FSSTATE FSCB=OVFSCB,ERROR=ERREAD STATE 'DMSOVS MODULE *' 00260000
L XR,32(R1) GET SIZE OF CORE IMAGE 00261000
LA XR,7(,XR) ROUND IT UP 00262000
SRL XR,3 AND CONVERT TO DOUBLEWORDS 00263000
LR R0,XR PUT SIZE IN R0 00264000
DMSFREE TYPE=NUCLEUS,DWORDS=(0),ERR=ERCORE ALLOCATE STORAGE 00265000
LR OVSR,R1 OVSR -> DMSOVS 00266000
LR R14,XR SIZE OF BUFFER IN DWORDS 00267000
SLL R14,3 CONVERT TO BYTES 00268000
FSREAD FSCB=OVFSCB,BUFFER=(OVSR),RECNO=2,ERROR=LOADFRET, *00269000
BSIZE=(R14) READ IN DMSOVS 00270000
ST XR,LENOVS SAVE LENGTH 00271000
ST OVSR,ADMSOVS STORE POINTER TO DMSOVS 00272000
OI OVSTAT,OVSON TURN ON FLAG AGAIN 00273000
B RETURN NORMAL RETURN 00274000
SPACE 3 00275000
* COME HERE ON AN ERROR ON FSREAD. WE MUST FRET THE BUFFER THAT 00276000
* WE ALLOCATED. 00277000
LOADFRET EQU * 00278000
LR R1,OVSR ADDRESS OF BUFFER 00279000
LR R0,XR SIZE OF BUFFER 00280000
DMSFRET LOC=(1),DWORDS=(0) FRET THE BUFFER 00281000
B ERREAD GO TYPE AN ERROR MESSAGE 00282000
SPACE 5 00283000
OVFSCB FSCB 'DMSOVS MODULE *',RECFM=V 00284000
EJECT 00285000
* COME HERE TO RETURN TO CALLER. 00287000
RETURN EQU * 00288000
CLI RC,0 ERROR RETURN? 00289000
BNE OFF RELEASE DMSOVS IF SO 00290000
SPACE 00291000
* IF THERE ARE ANY PARMS LEFT OVER, THEN THEY MUST BE ILLEGAL 00292000
CLI 0(PR),X'FF' IS CURRENT PARM AT END? 00293000
BE RETOFF WE'RE THRU IF SO 00294000
LA PR,8(,PR) POINT TO NEXT PARM 00295000
CLI 0(PR),X'FF' IS IT THE END? 00296000
BNE ERPARM ILLEGAL IF NOT 00297000
SPACE 00298000
* OFF RETURNS HERE 00299000
RETOFF EQU * 00300000
SR R15,R15 CLEAR RETURN CODE REGISTER @V305614 00300100
IC R15,RC GET CORRECT RETURN CODE 00302000
RETURN (14,12),RC=(15) 00303000
ERNOPARM EQU * 00305000
DMSERR LET=E,NUM=47,TEXT='NO FUNCTION SPECIFIED' 00306000
MVI RC,24 00307000
B RETURN 00308000
SPACE 5 00309000
ERPARM EQU * 00310000
DMSERR LET=E,NUM=14,TEXT='INVALID FUNCTION ''........''', *00311000
SUB=(CHARA,(PR)) 00312000
MVI RC,24 00313000
B RETURN 00314000
SPACE 5 00315000
ERREAD EQU * 00316000
LR R7,R15 SAVE ERROR CODE V0314 00316100
DMSERR LET=S,NUM=104,SUB=(DEC,(R7)), *00317000
TEXT='ERROR ''..'' READING ''DMSOVS MODULE'' FROM DISK' 00317100
* V0314 00317200
* V0314 00317300
MVI RC,100 00319000
B RETURN 00320000
EJECT 00321000
ERCORE EQU * 00322000
DMSERR NUM=109,LET=S,TEXT='INSUFFICIENT FREE STORAGE AVAILABLE*00323000
' 00324000
MVI RC,104 00325000
B RETURN 00326000
RC DS X RETURN CODE 00328000
SPACE 2 00329000
LTORG 00330000
OVSECT 00332000
NUCON 00333000
SVCSECT 00334000
END 00335000