SCR TITLE 'DMMSCR (IPCS) VM/370 - RELEASE 6' 00001000
* 00002000
* MODULE NAME: 00003000
* DMMSCR SUBROUTINE OF DUMPSCAN 00004000
* 00005000
* FUNCTION: 00006000
* SCROLLS THE DISPLAY UP OR DOWN FROM THE LAST ADDRESS 00007000
* 00008000
* ATTRIBUTES: 00009000
* REUSABLE 00010000
* NON-REENTRANT 00011000
* 00012000
* ENTRY POINTS: 00013000
* DMMSCR 00014000
* 00015000
* ENTRY CONDITIONS: 00016000
* R2 POINTS TO PLIST CONTAINING TOKENIZED INPUT LINE 00017000
* 00018000
* EXIT CONDITIONS: 00019000
* RETURN CODE IN R15 0 - GOOD 00020000
* 4 - WARNING 00021000
* 8 - FATAL 00022000
* 00023000
* CALLS TO OTHER ROUTINES: 00024000
* DMMGET FETCH DATA INTO CORE 00025000
* DMMDIR FORMAT AND DISPLAY 00026000
* 00027000
* EXTERNAL REFERENCES: 00028000
* HEXAD LAST DISPLAYED ADDRESS 00029000
* 00030000
* TABLES/WORKAREAS: 00031000
* PLIST 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
* R9-R2 WORK REGISTERS 00039000
* R2 ADDRESS OF PLIST 00040000
* R2 ADDRESSES PASSED TO GETREC AND DIR 00041000
* 00042000
* NOTES: 00043000
* 00044000
* 00045000
* OPERATION: 00046000
* SCR FETCHES THE LAST DISPLAYED ADDRESS 00047000
* 'HEXAD' AND CALCULATES THE NEXT ADDRESS, 00048000
* DEPENDING ON THE LAST TYPE OF DISPLAY, WHETHER 00049000
* THE REQUEST IS UP OR DOWN, AND WHETHER THE 00050000
* CURRENT DISPLAY WILL RUN OFF A SCREEN OR 00051000
* A PAGE. IT CALLS IN THE AREA VIA GETREC, 00052000
* AND FORMATS IT WITH DIR. HEXAD IS UPDATED 00053000
* AND CONTROL AND RETURN CODE PASSED BACK 00054000
* TO THE CALLER. 00055000
* 00056000
* ERROR MESSAGES: 00057000
* DMMSCR709I NO VALID SCROLL ADDRESS 00058000
* 00059000
* * * * * * * *------- -------- -------- -------- ------* 00060000
EJECT 00061000
DMMSCR CSECT @VA04250 00062000
EXTRN DMMGET DUMP DATA FETCH @VA04250 00063000
EXTRN DMMDIR FORMAT AND DISPLAY @VA04250 00064000
EXTRN HEXAD LAST ADDRESS DISPLAYED @VA04250 00065000
EXTRN CMDINFO HEADER LINE @VA04250 00066000
EXTRN PRINTONE ONE SHOT PRINT SW @V4075A2 00066500
STM R14,R12,SAVEDISP(R13) CALLER SAVE @VA04250 00067000
LR R12,R15 ADDRESSABILITY @VA04250 00068000
USING DMMSCR,R12 USE IT @VA04250 00069000
ST R13,SAVEBACK CALLER SAVE PTR @VA04250 00070000
B EYECATCH BYPASS @VA04250 00071000
DS 0D ALIGN @VA04250 00072000
DC CL8'DMMSCR' EYECATCH @VA04250 00073000
RELLEV DC C'REL4LEV0' RELEASE AND LEVEL @V4075A1 00074000
EYECATCH LA R13,SAVEAREA OUR SAVE PTR @VA04250 00075000
XC RETCODE,RETCODE CLEAR RET CODE @VA04250 00076000
L R3,HEXADADD GET ADDR OF LAST USED ADDRESS @VA04250 00077000
CLC FOXES,0(R3) IS THERE AN ADDRESS TO SCROLL? @VA04250 00078000
BNE GOTOIT YES @VA04250 00079000
LA R8,ERMSG709 ADDRESS AND @VA04250 00080000
LA R9,L'ERMSG709 LENGTH @VA04250 00081000
BAL R10,WRTERM GO WRITE IT @VA04250 00082000
MVC RETCODE,CODE4 BAD RETURN @VA04250 00083000
B RETURN GET OUT @VA04250 00084000
GOTOIT L R8,CIADD GET ADDRESS OF HEADER @VA04250 00085000
MVC 0(LINEL,R8),BLANKOUT CLEAR HEADER LINE @VA04830 00086500
L R4,0(R3) AND GET ADDRESS @VA04250 00087000
LA R4,0(R4) CLEAR OUT HIGH ORD BYTE @VA04250 00088000
************************************************************ @V4075A2 00088100
* IF THIS IS A RE-ISSUE OF THE SCROLL SUBC. DUE TO @V4075A2 00088200
* A ONE SHOT PRINT REQUEST (PRINT )AFTER A SCROLL, @V4075A2 00088300
* DONT CHANGE THE SCROLL ADDRESS. @V4075A2 00088400
************************************************************ @V4075A2 00088500
L R8,PRINT1AD ADDRESS OF 1 SHOT SWITCH @V4075A2 00088600
CLI 0(R8),OFF SWITCH OFF - IE NOT ONE SHOT ? @V4075A2 00088700
BNE STORHEX ON - BYPASS JUGGLING ADDRESSES @V4075A2 00088800
CLI 0(R3),D WAS LAST FUNCTION 'DISPLAY' @VA04250 00089000
BNE NOTDUMP NO @VA04250 00090000
* * * * * * * *------- -------- -------- -------- ------* 00091000
* * * * * * * * SINCE LAST FUNCTION WAS 'DISPLAY NNN' TYPE, 00092000
* * * * * * * * LAST LINE DISPLAYED IS DIFFERENT THAN FOR A 00093000
* * * * * * * * 'DISPLAY' TYPE. FIND OUT WHAT IT SHOULD BE. 00094000
* * * * * * * *------- -------- -------- -------- ------* 00095000
MVI 0(R3),OFF RESET 'DISPLAY' FLAG @VA04250 00096000
LA R5,PLENT(R2) 8 - FIRST BYTE, SECOND PARM @VA04250 00097000
LA R6,PLENT COUNT BACK TO 1ST PARM 2ND LTR. @VA04250 00098000
UCOMPARE CLI 0(R5),U UP REQUEST @VA04250 00099000
BE DSCUP YES - SCROLL UP @VA04250 00100000
BCTR R5,R0 LOOK AT PREVIOUS LETTER @VA04250 00101000
BCT R6,UCOMPARE TRY AGAIN @VA04250 00102000
AH R4,X80 NO - SET TO SHOW NEXT LINES @VA04250 00103000
B STORHEX BYPASS OTHER TESTING @VA04250 00104000
DSCUP SH R4,XC0 UP SCROLL - BACK UP @VA04250 00105000
B STORHEX BYPASS NEXT GYRATIONS @VA04250 00106000
NOTDUMP LR R7,R4 GET LAST ADDRESS AND REDUCE IT @VA04250 00107000
SLL R7,20 IT TO A DISPLACEMENT @VA04250 00108000
SRL R7,20 RESTORE IT @VA04250 00109000
LA R5,PLENT(R2) 8 - SAME SEQUENCE AS ABOVE @VA04250 00110000
LA R6,PLENT LOOKING FOR A 'U', EITHER @VA04250 00111000
NOTUCOMP CLI 0(R5),U TACKED ON TO THE 'SCROLL' OR @VA04250 00112000
BE SCUP ITS ABBREVIATION, OR IN THE @VA04250 00113000
BCTR R5,R0 SECOND PARAMETER. @VA04250 00114000
BCT R6,NOTUCOMP TRY AGAIN @VA04250 00115000
CH R7,XEC0 NEXT ADD GO OVER THE TOP? @VA04250 00116000
BNH ADDON NO - OK. @VA04250 00117000
SRL R4,12 CLEAR DISPLACEMENT TO ZERO @VA04250 00118000
SLL R4,12 AND RESTORE @VA04250 00119000
CH R7,XF40 IS ALL THIS PAGE ON SCREEN? @VA04250 00120000
BNL ADD1K YES - GO TO NEXT PAGE @VA04250 00121000
AH R4,XF40 DISPLAY LAST OF THIS PAGE @VA04250 00122000
B STORHEX GO PLUG IT @VA04250 00123000
ADD1K AH R4,X1000 START NEW PAGE @VA04250 00124000
B STORHEX GO PLUG IT @VA04250 00125000
ADDON AH R4,X130 SCROLL FWD @VA04250 00126000
B STORHEX GO PLUG IT @VA04250 00127000
SCUP CH R7,X130 IS AT LEAST 1 MORE SCREEN? @VA04250 00128000
BNL SCUPON YES - GO SHOW IT. @VA04250 00129000
SRL R4,12 NO - REMOVE THE DISPLACEMENT @VA04250 00130000
SLL R4,12 PART OF THE ADDRESS @VA04250 00131000
CH R7,X70 IS ALL THIS PAGE SHOWING? @VA04250 00132000
BNH SETF40 YES - GO DOWN A PAGE @VA04250 00133000
AH R4,X70 NO - SET TO 70 AND SHOW IT @VA04250 00134000
B STORHEX GO PLUG IT @VA04250 00135000
SCUPON SH R4,X130 SCROLL BACK 1 @VA04250 00136000
B STORHEX GO PLUG IT @VA04250 00137000
SETF40 SH R4,XC0 SET TO PREV PAGE - F40 @VA04250 00138000
LTR R4,R4 OFF THE BOTTOM OF THE DUMP @VA04250 00139000
BNM STORHEX NO - OK TO GO @VA04250 00140000
SR R4,R4 YES - SET TO ZERO @VA04250 00141000
AH R4,X70 AND SHOW START OF PAGE @VA04250 00142000
STORHEX LR R7,R4 GET REAL ADD FOR SCREEN @VA04250 00143000
LR R2,R4 AND ADDRESS TO FETCHDI @VA04250 00144000
* * * * * * * *------- -------- -------- -------- ------* 00145000
* * * * * * * * NOW GO TO GETREC TO GET THE REAL DATA 00146000
* * * * * * * * INTO CORE. R2 HAS THE ADDRESS 00147000
* * * * * * * *------- -------- -------- -------- ------* 00148000
L R15,GETADD GETREC TO GET THE DATA INTO COR @VA04250 00149000
BALR R14,R15 @VA04250 00150000
LTR R15,R15 HOW'D IT GO? @VA04250 00151000
BZ DIRECTIT GOOD - GO DISPLAY IT @VA04250 00152000
MVC RETCODE,CODE4 NOT GOOD - GO BACK @VA04250 00153000
B RETURN @VA04250 00154000
* * * * * * * *------- -------- -------- -------- ------* 00155000
* * * * * * * * R2 HAS THE IN CORE ADDRESS TO BE DISPLAYED 00156000
* * * * * * * * AND R7 HAS THE ADDRESS FROM THE DUMP. 00157000
* * * * * * * *------- -------- -------- -------- ------* 00158000
DIRECTIT L R15,DIRADD NOW GO TO 'DIR' TO DISPLAY IT. @VA04250 00159000
BALR R14,R15 LINK @VA04250 00160000
LTR R15,R15 TEST RETURN @VA04250 00161000
BZ RETURN GOOD RETURN @VA04250 00162000
MVC RETCODE,CODE4 BAD RETURN @VA04250 00163000
B RETURN GET OUT @VA04250 00164000
* * * * * * * * ------- -------- -------- ------- * 00165000
* * * * * * * * WRTERM COMMON 00166000
* * * * * * * * ------- -------- -------- ------- * 00167000
WRTERM ST R8,PARMLIS1 SAVE MSG TEXT PTR IN PARM LIST @V4075A2 00168100
ST R9,PARMLIS2 AND TEXT LENGTH @V4075A2 00168200
LA R1,PARMLIS1 POINTER TO PASS @V4075A2 00168300
L R15,FEDLNADD ADDRESS OF DMMFEDLN - LINE WRITER@V4075A2 00168400
BALR R14,R15 GO WRITE THE LINE @V4075A2 00168500
BR R10 AND RETURN @V4075A2 00168600
PARMLIS1 DS F PARM1 @V4075A2 00168700
PARMLIS2 DS F PARM2 @V4075A2 00168800
FEDLNADD DC V(DMMFEDLN) LINE WRITER ROUTINE @V4075A2 00168900
* * * * * * * * ------- -------- -------- ------- * 00170000
* * * * * * * * RETURN 00171000
* * * * * * * * ------- -------- -------- ------- * 00172000
RETURN L R13,SAVEBACK CALLER SAVE PTR @VA04250 00173000
MVC SAVREG15(L'RETCODE,R13),RETCODE PLUG RETCODE @VA04250 00174000
LM R14,R12,SAVEDISP(R13) RESTORE CALLER REGS @VA04250 00175000
BR R14 RETURN @VA04250 00176000
* * * * * * * *------- -------- -------- -------- ------* 00177000
* * * * * * * * CONSTANTS 'N SUCH 00178000
* * * * * * * *------- -------- -------- -------- ------* 00179000
RETCODE DS F RETURN CODE @VA04250 00180000
DIRADD DC AL4(DMMDIR) FORMAT AND DISPLAY @VA04250 00181000
GETADD DC AL4(DMMGET) DATA FETCH @VA04250 00182000
HEXADADD DC AL4(HEXAD) LAST ADDRESS DISPLAYED @VA04250 00183000
CIADD DC AL4(CMDINFO) HEADER LINE @VA04250 00184000
PRINT1AD DC AL4(PRINTONE) ONE SHOT PRINT SWITCH @V4075A2 00184500
XEC0 DC X'0EC0' SMALL PAGE @VA04250 00185000
XF40 DC X'0F40' PAGE @VA04250 00186000
X1000 DC X'1000' FULL PAGE @VA04250 00187000
X130 DC X'0130' SCREEN @VA04250 00188000
X70 DC X'0070' PAGE START @VA04250 00189000
X80 DC X'0080' PAGE END @VA04250 00190000
XC0 DC X'00C0' PAGE END @VA04250 00191000
CODE4 DC F'4' RETURN CODE @VA04250 00192000
FOXES DC XL4'FFFFFFFF' END OF PLIST @VA04250 00193000
BLANKOUT DC CL80' ' FILL CHARACTER @VA04830 00193500
* * * * * * * * ------- -------- -------- ------- * 00194000
* * * * * * * * SAVEAREA 00195000
* * * * * * * * ------- -------- -------- ------- * 00196000
SAVEAREA DS 0F THIS PROGRAM'S SAVE AREA @VA04250 00197000
SAVEUSR DS F USER WORD @VA04250 00198000
SAVEFWD DS F FORWARD POINTER @VA04250 00199000
SAVEBACK DS F BACKWARD POINTER @VA04250 00200000
SAVER14 DS F SAVE AREA FOR CALLER'S R14 @VA04250 00201000
SAVER15 DS F SAVE AREA FOR CALLER'S R15 @VA04250 00202000
SAVER0 DS F SAVE AREA FOR CALLER'S R0 @VA04250 00203000
SAVER1 DS F SAVE AREA FOR CALLER'S R1 @VA04250 00204000
SAVER2 DS F SAVE AREA FOR CALLER'S R2 @VA04250 00205000
SAVER3 DS F SAVE AREA FOR CALLER'S R3 @VA04250 00206000
SAVER4 DS F SAVE AREA FOR CALLER'S R4 @VA04250 00207000
SAVER5 DS F SAVE AREA FOR CALLER'S R5 @VA04250 00208000
SAVER6 DS F SAVE AREA FOR CALLER'S R6 @VA04250 00209000
SAVER7 DS F SAVE AREA FOR CALLER'S R7 @VA04250 00210000
SAVER8 DS F SAVE AREA FOR CALLER'S R8 @VA04250 00211000
SAVER9 DS F SAVE AREA FOR CALLER'S R9 @VA04250 00212000
SAVER10 DS F SAVE AREA FOR CALLER'S R10 @VA04250 00213000
SAVER11 DS F SAVE AREA FOR CALLER'S R11 @VA04250 00214000
SAVER12 DS F SAVE AREA FOR CALLER'S R12 @VA04250 00215000
* * * * * * * * ------- -------- -------- ------- * 00216000
ERMSG709 DC C'DMMSCR709I NO VALID SCROLL ADDRESS' @VA04250 00217000
D EQU X'C4' DISPLAY FLAG @VA04250 00218000
U EQU X'E4' UP - TYPE SCROLL @VA04250 00219000
PLENT EQU 8 LENGTH OF A PLIST ENTRY @VA04250 00220000
OFF EQU X'00' SWITCH OFF @VA04250 00221000
SAVEDISP EQU 12 REGS IN SAVE AREA @VA04250 00222000
SAVREG15 EQU 16 REG 15 IN SAVE AREA @VA04250 00223000
LINEL EQU 80 LENGTH OF HEADER LINE @VA04250 00224000
PATCH DC 50F'0' PATCH @VA04250 00225000
LTORG @VA04250 00226000
REGEQU @VA04250 00227000
END 00228000