FEX TITLE 'DMMFEX (IPCS) VM/370 - RELEASE 6' 00001000
* 00002000
* MODULE NAME: 00003000
* DMMFEX SUBROUTINE OF DUMPSCAN 00004000
* 00005000
* FUNCTION: 00006000
* DISPLAY X'130' BYTES OF THE DUMP IN RESPONSE 00007000
* TO A REQUEST OF THE FORM 'DISPLAY HEXLOC' 00008000
* 00009000
* ATTRIBUTES: 00010000
* REUSABLE 00011000
* NON-REENTRANT 00012000
* 00013000
* ENTRY POINTS: 00014000
* DMMFEX 00015000
* 00016000
* ENTRY CONDITIONS: 00017000
* R2 POINTS TO PLIST CONTAINING TOKENIZED INPUT 00018000
* 00019000
* EXIT CONDITIONS: 00020000
* RETURN CODE IN R15 0 - GOOD 00021000
* 4 - WARNING 00022000
* 8 - FATAL 00023000
* 00024000
* CALLS TO OTHER ROUTINES: 00025000
* DMMDIR TO FORMAT AND DISPLAY THE DATA 00026000
* 00027000
* EXTERNAL REFERENCES: 00028000
* BUFF1 DMMGET'S BUFFER 00029000
* 00030000
* TABLES/WORKAREAS: 00031000
* 00032000
* 00033000
* REGISTER USAGE: 00034000
* R15 ADDRESSES OF EXTERNAL ROUTINES 00035000
* R14 RETURNS FROM EXTERNAL ROUTINES 00036000
* R13 SAVE AREA ADDRESS 00037000
* R12 BASE 00038000
* R10-R8 NOT USED 00039000
* R7-R2 WORK REGISTERS 00040000
* R2 POINTS TO PLIST 00041000
* 00042000
* NOTES: 00043000
* 00044000
* 00045000
* OPERATION: 00046000
* 00047000
* THE PLIST ADDRESS IS PASSED IN R2 00048000
* THIS ROUTINE MOVES THE EBCDIC ADDRESS FROM THE 00049000
* THE PLIST, TRANSLATES IT TO HEX, CHECKING 00050000
* FOR INDIRECT REQUESTS. IT FETCHES THE 00051000
* NEEDED RECORD INTO CORE AND FORMATS AND 00052000
* DISPLAYS IT USING GETREC AND DIR. 00053000
* ERROR MESSAGES: 00054000
* 00055000
* 00056000
DMMFEX CSECT @VA04250 00057000
EXTRN DMMDIR FORMAT AND DISPLAY @VA04250 00058000
EXTRN DMMGET FETCH THE DUMP INTO CORE @VA04250 00059000
EXTRN CMDINFO HEADER @VA04250 00060000
EXTRN INPUT INPUT LINE @VA04250 00061000
STM R14,R12,SAVEDISP(R13) CALLERS REGS @VA04250 00062000
LR R12,R15 ADDRESSABILITY @VA04250 00063000
USING DMMFEX,R12 ADDRESSABILITY @VA04250 00064000
ST R13,SAVEBACK CALLERS SAVE AREA PTR @VA04250 00065000
B EYECATCH SKIP EYECATCHER @VA04250 00066000
DS 0D ALIGN @VA04250 00067000
DC CL8'DMMFEX' EYECATCHER @VA04250 00068000
RELLEV DC C'REL4LEV0' RELEASE AND LEVEL @V4075A1 00069000
EYECATCH LA R13,SAVEAREA OUR SAVE PTR @VA04250 00070000
XC RETCODE,RETCODE CLEAR RETURN CODE @VA04250 00071000
MVC ADDRESS,CZEROS SET ADRESS TO ZEROS @VA04250 00072000
LA R4,PLENT COUNT BYTES OF INPUT @VA04250 00073000
LA R2,PL2L(R2) LAST BYTE OF INPUT @VA04250 00074000
LA R3,ADDRESS+5 LAST BYTE OF OUTPUT @VA04250 00075000
COMPR CLI 0(R2),BLANK IS IT BLANK @VA04250 00076000
BE BUMP YES - TRY NEXT @VA04250 00077000
CLI 0(R2),T AS IN 'D T1000...' @VA04250 00078000
BNE PCCHECK NO - CHECK FOR INDIRECT @VA04250 00079000
MVI 0(R2),ZERO REPLACE IT WITH A ZERO @VA04250 00080000
B VALID GO PLUG IT @VA04250 00081000
PCCHECK CLI 0(R2),HEXPC IS IT A %? @VA04250 00082000
BNE MOVEIT NO ITS A CHARACTER @VA04250 00083000
MVI PCSW,ON TURN ON INDIRECT SW @VA04250 00084000
B BUMP AND TRY NEXT @VA04250 00085000
* * * * * * * *------- -------- -------- -------- ------* 00086000
* * * * * * * * FIRST CHECK INPUT VALIDITY 00087000
* * * * * * * *------- -------- -------- -------- ------* 00088000
MOVEIT CLI 0(R2),A IS BELOW 'A' @VA04250 00089000
BL BADIN NON HEX @VA04250 00090000
CLI 0(R2),F ABOVE 'F' @VA04250 00091000
BH HICHEK SO FAR @VA04250 00092000
B VALID OK - USE IT @VA04250 00093000
HICHEK CLI 0(R2),ZERO BELOW '0' @VA04250 00094000
BL BADIN NON HEX @VA04250 00095000
CLI 0(R2),I9 ABOVE '9' @VA04250 00096000
BH BADIN NON HEX @VA04250 00097000
VALID MVC 0(ONE,R3),0(R2) MOVE THE CHAR @VA04250 00098000
BCTR R3,R0 BACK UP OUTPUT PTR @VA04250 00099000
BUMP BCTR R2,R0 BACK UP INPUT PTR @VA04250 00100000
BCT R4,COMPR TRY ANOTHER @VA04250 00101000
B TRANADD GOT EM - NOW TRANSLATE EM @VA04250 00102000
* * * * * * * * ------- -------- -------- ------- * 00103000
* * * * * * * * BAD INPUT WAS DETECTED 00104000
* * * * * * * * ------- -------- -------- ------- * 00105000
BADIN LA R8,ERMSG704 ADDRESS @VA04250 00106000
LA R9,L'ERMSG704 AND LENGTH @VA04250 00107000
BAL R10,WRTERM NON-HEX CHARACTER IN ADDRESS @VA04250 00108000
MVC RETCODE,CODE4 RETURN CODE 4 AFTER ERMSG @VA04422 00108500
B RETURN GIVE IT BACK @VA04250 00109000
* * * * * * * *------- -------- -------- -------- ------* 00110000
* * * * * * * * NOW THE ADDRESS IS RIGHT JUSTIFIED IN THE 00111000
* * * * * * * * 'ADDRESS' FIELD, AND WILL BE TRANSLATED 00112000
* * * * * * * * TO HEX FOR THE GETREC ROUTINE. 00113000
* * * * * * * *------- -------- -------- -------- ------* 00114000
TRANADD LA R4,ADDRESS SET UP FOR CONVERT @VA04250 00115000
LA R6,L'ADDRESS COUNT ADDRESS BYTES @VA04250 00116000
TEST TM 0(R4),ZERO NUMERIC? @VA04250 00117000
BNO ADDNINE NO - FIX IT UP @VA04250 00118000
LA R4,ONE(R4) NEXT BYTE @VA04250 00119000
BCT R6,TEST IF NOT ALL DONE @VA04250 00120000
B ALLDONE GO PACK EM @VA04250 00121000
ADDNINE MVC REGLOAD+LORD(ONE),0(R4) ADD A BINARY @VA04250 00122000
L R7,REGLOAD NINE TO ANY @VA04250 00123000
AH R7,NINE ALPHA DIGIT @VA04250 00124000
ST R7,REGLOAD PLUG IT BACK INTO ADDRESS @VA04250 00125000
MVC 0(ONE,R4),REGLOAD+LORD INTO ADDRESS @VA04250 00126000
LA R4,ONE(R4) GET NEXT BYTE @VA04250 00127000
BCT R6,TEST NEXT BYTE @VA04250 00128000
ALLDONE PACK HEXAD(HEXL),ADDRESS(ADL) STRIP OFF ZONES @VA04250 00129000
SCROLL L R2,HEXAD GET THE REAL ADDRESS @VA04250 00130000
CLI PCSW,INDIRECT INDIRECT REQ? @VA04250 00131000
BE NOROUND YES - DONT ROUND IT @VA04250 00132000
SRL R2,4 NO - ROUND TO 16 BYTE BOUND @VA04250 00133000
SLL R2,4 AND RESTORE @VA04250 00134000
NOROUND SRL R2,2 ROUND ONLY TO A WORD FOR INDIR. @VA04250 00135000
SLL R2,2 AND RESTORE @VA04250 00136000
LR R7,R2 GET THE DISPLAY ADDRESS @VA04250 00137000
L R15,GETADD GETREC @VA04250 00138000
BALR R14,R15 GO GET RECORD INTO CORE @VA04250 00139000
LTR R15,R15 HOW WAS IT? @VA04250 00140000
BZ INDIR OK @VA04250 00141000
ST R15,RETCODE SAVE THE RETURN @VA04250 00142000
B RETURN BACK TO DX @VA04250 00143000
INDIR CLI PCSW,INDIRECT INDIRECT REQUEST ? @VA04250 00144000
BNE DIRECT NO @VA04250 00145000
L R2,0(R2) YES, GO AROUND AGAIN. @VA04250 00146000
LA R2,0(R2) CLEAR HI-ORDER BYTE @VA04250 00147000
SRL R2,4 NOW ROUND THE ADDRESS @VA04250 00148000
SLL R2,4 TO A QUAD WORD @VA04250 00149000
ST R2,HEXAD SAVE THE ADDRESS FOR SCROLL @VA04250 00150000
LR R7,R2 GET REAL ADDRESS FOR SCREEN. @VA04250 00151000
MVI PCSW,OFF TURN OFF INDIRECT SW. @VA04250 00152000
L R15,GETADD GET READY TO GO AGAIN. @VA04250 00153000
BALR R14,R15 GO @VA04250 00154000
LTR R15,R15 HOW WAS IT? @VA04250 00155000
BZ DIRECT OK @VA04250 00156000
ST R15,RETCODE SAVE BAD RETURN @VA04250 00157000
B RETURN BACK TO CALLER @VA04250 00158000
* * * * * * * *-----------------------------------------* 00159000
* * * * * * * * NOW THE CORRECT RECORD IS IN CORE 00160000
* * * * * * * * THIS CODE FORMATS THE REQUIRED PORTION OF 00161000
* * * * * * * * THE DUMP WITH ADDRESSES 00162000
* * * * * * * *-----------------------------------------* 00163000
DIRECT L R3,CIADD HEADER @VA04250 00164000
L R4,INPUTADD INPUT LINE @VA04250 00165000
MVC 0(LINEL,R3),0(R4) PLUG INPUT LINE @VA04250 00166000
L R15,DIRADD FORMAT AND DISPLAY @VA04250 00167000
BALR R14,R15 GO @VA04250 00168000
ST R15,RETCODE PASS IT TO DSC @VA04250 00169000
B RETURN AND GO BACK @VA04250 00170000
* * * * * * * * ------- -------- -------- ------- * 00171000
* * * * * * * * WRTERM ROUTINE 00172000
* * * * * * * * ------- -------- -------- ------- * 00173000
WRTERM ST R8,PARMLIS1 SAVE MSG TEXT PTR IN PARM LIST @V4075A2 00174100
ST R9,PARMLIS2 AND TEXT LENGTH @V4075A2 00174200
LA R1,PARMLIS1 POINTER TO PASS @V4075A2 00174300
L R15,FEDLNADD ADDRESS OF DMMFEDLN - LINE WRITER@V4075A2 00174400
BALR R14,R15 GO WRITE THE LINE @V4075A2 00174500
BR R10 AND RETURN @V4075A2 00174600
PARMLIS1 DS F PARM1 @V4075A2 00174700
PARMLIS2 DS F PARM2 @V4075A2 00174800
FEDLNADD DC V(DMMFEDLN) LINE WRITER ROUTINE @V4075A2 00174900
* * * * * * * * ------- -------- -------- ------- * 00176000
* * * * * * * * RETURN 00177000
* * * * * * * * ------- -------- -------- ------- * 00178000
RETURN L R13,SAVEBACK HIS PTR @VA04250 00179000
MVC SAVREG15(L'RETCODE,R13),RETCODE RETCODE IN R15 @VA04250 00180000
LM R14,R12,SAVEDISP(R13) AND HIS REGS @VA04250 00181000
BR R14 RETURN @VA04250 00182000
* * * * * * * * ------- -------- -------- ------- * 00183000
* * * * * * * * CONSTANTS 00184000
* * * * * * * * ------- -------- -------- ------- * 00185000
REGLOAD DS F WORK AREA TO ADD 9 TO ALPH DIGI @VA04250 00186000
HEXAD DS 2F ADDRESS CONVERTED TO HEX @VA04250 00187000
RETCODE DS F RETURN CODE @VA04250 00188000
* * * * * * * * ------- -------- -------- ------- * 00189000
* * * * * * * * SAVEAREA 00190000
* * * * * * * * ------- -------- -------- ------- * 00191000
SAVEAREA DS 0F THIS PROGRAM'S SAVE AREA @VA04250 00192000
SAVEUSR DS F USER WORD @VA04250 00193000
SAVEFWD DS F FORWARD POINTER @VA04250 00194000
SAVEBACK DS F BACKWARD POINTER @VA04250 00195000
SAVER14 DS F SAVE AREA FOR CALLER'S R14 @VA04250 00196000
SAVER15 DS F SAVE AREA FOR CALLER'S R15 @VA04250 00197000
SAVER0 DS F SAVE AREA FOR CALLER'S R0 @VA04250 00198000
SAVER1 DS F SAVE AREA FOR CALLER'S R1 @VA04250 00199000
SAVER2 DS F SAVE AREA FOR CALLER'S R2 @VA04250 00200000
SAVER3 DS F SAVE AREA FOR CALLER'S R3 @VA04250 00201000
SAVER4 DS F SAVE AREA FOR CALLER'S R4 @VA04250 00202000
SAVER5 DS F SAVE AREA FOR CALLER'S R5 @VA04250 00203000
SAVER6 DS F SAVE AREA FOR CALLER'S R6 @VA04250 00204000
SAVER7 DS F SAVE AREA FOR CALLER'S R7 @VA04250 00205000
SAVER8 DS F SAVE AREA FOR CALLER'S R8 @VA04250 00206000
SAVER9 DS F SAVE AREA FOR CALLER'S R9 @VA04250 00207000
SAVER10 DS F SAVE AREA FOR CALLER'S R10 @VA04250 00208000
SAVER11 DS F SAVE AREA FOR CALLER'S R11 @VA04250 00209000
SAVER12 DS F SAVE AREA FOR CALLER'S R12 @VA04250 00210000
* * * * * * * * ------- -------- -------- ------- * 00211000
DIRADD DC AL4(DMMDIR) FORMAT AND DISPLAY ROUTINE @VA04250 00212000
GETADD DC AL4(DMMGET) FETCH DUMP INTO CORE @VA04250 00213000
CIADD DC AL4(CMDINFO) HEADER @VA04250 00214000
INPUTADD DC AL4(INPUT) INPUT LINE @VA04250 00215000
* * * * * * * * ------- -------- -------- ------- * 00216000
* * * * * * * * STANDARDS EQUATES 00217000
* * * * * * * * ------- -------- -------- ------- * 00218000
PCSW DC X'00' INDIRECT REQUEST SWITCH @VA04250 00219000
INDIRECT EQU X'FF' INDIRECT REQUEST @VA04250 00220000
ON EQU X'FF' SWITCH ON STATUS @VA04250 00221000
OFF EQU X'00' OFF STATUS @VA04250 00222000
BLANK EQU X'40' BLANK @VA04250 00223000
T EQU X'E3' ALPHA 'T' @VA04250 00224000
ZERO EQU X'F0' NUMERIC '0' @VA04250 00225000
HEXPC EQU X'6C' PERCENT @VA04250 00226000
A EQU X'C1' ALPHA 'A' @VA04250 00227000
F EQU X'C6' ALPHA 'F' @VA04250 00228000
ONE EQU X'01' LENGTH OF ONE BYTE @VA04250 00229000
LORD EQU 3 LO ORD BYTE OF ADDRESS @VA04250 00230000
HEXL EQU 5 FIVE @VA04250 00231000
ADL EQU 7 SEVEN @VA04250 00232000
PLENT EQU 8 LENGTH OF A PLIST ENTRY @VA04250 00233000
SAVEDISP EQU 12 REGS IN SAVE AREA @VA04250 00234000
PL2L EQU 15 DISP TO LAST BYTE 2ND ENTRY @VA04250 00235000
SAVREG15 EQU 16 REG 15 IN SAVE AREA @VA04250 00236000
LINEL EQU 80 LENGTH OF THE LINE @VA04250 00237000
I9 EQU X'F9' ONE BYTE OF '9' FOR IMMEDIATES @VA04250 00238000
CODE4 DC F'4' WARNING RET CODE @VA04422 00238500
NINE DC H'9' ADD TO ALPHA DIGITS TO PRINT EM @VA04250 00239000
PADADD DS H PADD FOR ADDRESS SPILL @VA04250 00240000
ADDRESS DS CL6 WORK AREA TO CONVERT TO HEX @VA04250 00241000
CZEROS DC 6C'0' ZEROS FOR ADDRESS @VA04250 00242000
ERMSG704 DC C'DMMFEX704I NON-HEX CHARACTER IN ADDRESS - RETRY' 00243000
PATCH DC 50F'0' PATCH @VA04250 00244000
LTORG @VA04250 00245000
REGEQU @VA04250 00246000
END 00247000