LOC TITLE 'DMMLOC (IPCS) VM/370 - RELEASE 6' 00001000 * 00002000 * 00003000 * MODULE NAME: 00004000 * DMMLOC (SUBROUTINE OF DUMPSCAN) 00005000 * 00006000 * FUNCTION: 00007000 * LOCATE 'STRING' WITHIN THE LIMITS 'FROM' 'TO' 00008000 * 00009000 * ATTRIBUTES: 00010000 * REUSABLE 00011000 * NON-REENTRANT 00012000 * 00013000 * ENTRY POINTS: 00014000 * DMMLOC 00015000 * 00016000 * ENTRY CONDITIONS: 00017000 * R2 POINTS TO A PLIST CONTAINING THE COMMAND 00018000 * 00019000 * EXIT CONDITIONS: 00020000 * 00021000 * CALLS TO OTHER ROUTINES: 00022000 * DMMGET TO FETCH DATA INTO CORE 00023000 * DMMINT TO TRANSLATE HEX TO EBCDIC 00024000 * DMMHEX TO TRANSLATE EBCDIC TO HEX 00025000 * DMMFEX TO WRITE THE FOUND LOCATION TO A SCREEN 00026000 * DMMFED TO WRITE THE FOUND LOCATION TO A TYPEWRITER 00027000 * 00028000 * EXTERNAL REFERENCES: 00029000 * INPUT COMMAND INPUT LINE 00030000 * INLENGTH INPUT LINE LENGTH 00031000 * BUFF1 CURRENT HEX DATA TO BE TRANSLATED 00032000 * TYPEFLAG INDICATOR OF DEVICE TYPE 00033000 * 00034000 * TABLES/WORKAREAS: 00035000 * LOCBUFF TWO PAGE BUFFER FOR TRANSLATED HEX DATA 00036000 * 00037000 * REGISTER USAGE: 00038000 * R15 ADDRESSES OF EXTERNAL ROUTINES 00039000 * R14 RETURNS FROM EXTERNAL ROUTINES 00040000 * R13 SAVE AREA ADDRESS 00041000 * R12 BASE 00042000 * R10 INTERNAL LINKS 00043000 * R9-R2 WORK REGISTERS 00044000 * R2 POINTS TO PLIST PASSED BY CALLER 00045000 * R2 PASSES ADDRESS OF PLIST TO SUBROUTINES 00046000 * 00047000 * NOTES: 00048000 * 00049000 * OPERATION: 00050000 * 'LOCATE' ACCEPTS A COMMAND OF THE FORM:- 00051000 * 'LOCATE' 'STRING' 'FROM' 'TO' 00052000 * WHERE 'STRING' MAY BE ANY CONTIGUOUS STRING 00053000 * OF UP TO 16 HEXADECIMAL DIGITS. 'FROM' IS 00054000 * THE ADDRESS AT WHICH THE SEARCH BEGINS, 00055000 * AND 'TO' IS THE END ADDRESS. 'LOCATE' WILL 00056000 * SEARCH THAT RANGE OF THE DUMP, SEARCHING 00057000 * ON A HALF BYTE BOUNDARY, FOR THE GIVEN STRING. 00058000 * SEARCH STOPS WHEN EITHER THE 'TO' ADDRESS IS 00059000 * REACHED, OR THE STRING IS FOUND. 'LOCATE WILL 00060000 * PASS OVER PAGES NOT IN THE DUMP. 00061000 * M.O. IS AS FOLLOWS. THE INPUT STRING IS SCANNED 00062000 * FOR VALID, CONTIGUOUS HEX CHARACTERS. EACH ONE 00063000 * CAUSES A BIT TO BE SET IN A MASK HALF BYTE. 00064000 * THERE ARE FOUR MASKS, ALLOWING A STRING LENGTH 00065000 * OF 16 CHARACTERS. THEN THE PAGE CONTAINING THE 00066000 * 'FROM' ADDRESS IS BROUGHT INTO 'BUFF1' BY DMMGET. 00067000 * THE HEX DATA IS THEN XLATED INTO EBCDIC IN 'LOCBUFF' 00068000 * (IF THE 'FROM' ADDRESS IS LESS THAN 8 BYTES, 00069000 * ((16 HEX DIGITS)) FROM THE END OF THE PAGE, 00070000 * THE LAST 8 BYTES ARE TRANSLATED INTO THE 16 BYTES 00071000 * IMMEDIATELY PRECEDING 'LOCBUFF', AND THE NEXT PAGE 00072000 * IS TRANSLATED. THIS IS BECAUSE THE STRING MIGHT 00073000 * RUN ACROSS A PAGE BOUNDARY.) THE FIRST FOUR BYTES 00074000 * OF THE STRING ARE LOADED INTO R4. THE MASK IS LOADED 00075000 * INTO R2, AND R3 IS POINTED AT THE TRANSLATED 00076000 * EQUIVALENT 'TO' LOCATION IN 'LOCBUFF'. AN EXECUTE 00077000 * INSTRUCTION WITH A 'CLM' AS ITS OBJECT, IS USED 00078000 * FOR THE COMPARE. IF NO MATCH OCCURS, THE PTR IN R3 00079000 * IS UPDATED, THE LIMITS ARE CHECKED, AND ANOTHER 00080000 * COMPARISON IS MADE UNTIL THE 'TO' EQUIVALENT 00081000 * ADDRESS IS REACHED. IF THERE IS A MATCH, THE 00082000 * MASK IS REPLACED BY THE NEXT ONE, THE R3 POINTER 00083000 * IS UPDATED BY 4 AND THE NEXT WORD IN THE STRING IS 00084000 * COMPARED AGAINST THE NEXT WORD IN THE TRANSLATED 00085000 * BUFFER. THIS IS CONTINUED UNTIL ALL WORDS IN THE 00086000 * STRING AGREE WITH THE BUFFER, SUBJECT TO THE MASKING. 00087000 * THE MATCHING ADDRESS IN R3 FROM 'LOCBUFF', IS 00088000 * CONVERTED BACK TO A REAL ADDRESS FROM THE DUMP. 00089000 * THIS ADDRESS IS PASSED TO EITHER DMMFED, FOR 00090000 * A TYPEWRITER TYPE DEVICE, OR DMMFEX FOR A GRAPHICS 00091000 * DEVICE. 00092000 * 00093000 * ERROR MESSAGES: 00094000 * DMMLOC715I NON-HEX CHARACTER IN STRING 00095000 * DMMLOC716I STRING ' ' NOT FOUND. 00096000 * DMMLOC717I INVALID FORM OF INPUT. 00097000 * 00098000 * * * * * * * *------- -------- -------- -------- ------* 00099000 DMMLOC CSECT @VA04250 00100000 ENTRY PREBUFAD ADDRESS OF GOTTEN BUFFER @V4075A2 00100500 ENTRY BOUND INCREMENT PARAMETER. @V4075A2 00100600 EXTRN INPUT ADDRESS OF INPUT LINE @VA04250 00101000 EXTRN SCRNAREA SCREEN @VA04250 00102000 EXTRN INLENGTH INPUT LINE LENGTH @VA04250 00103000 EXTRN STRINGAD LOC SEARCH ARGUMENT @V4075A2 00103300 EXTRN STRINGLN LENGTH OF SEARCH ARG. @V4075A2 00103600 EXTRN HEXAD LAST DISPLAY ADDRESS FOR SCROLL @VA04250 00104000 EXTRN BUFF1 HEX BUFFER @VA04250 00105000 EXTRN DMMFED LINE WRITE @VA04250 00106000 EXTRN DMMFEX SCREEN WRITE @VA04250 00107000 EXTRN DMMGET DATA FETCH @VA04250 00108000 EXTRN DMMHEX BCD - TO - HEX @VA04250 00109000 EXTRN DMMINT HEX TO BCD @VA04250 00110000 EXTRN TYPEFLAG DEVICE TYPE @VA04250 00111000 EXTRN CONSOLE VIRT CONS ADDRESS @VA04250 00112000 STM R14,R12,SAVEDISP(R13) SAVE CALLERS REGS @VA04250 00113000 LR R12,R15 ADDRESSABILITY @VA04250 00114000 USING DMMLOC,R12 @VA04250 00115000 ST R13,SAVEBACK CALLERS SAVE AREA @VA04250 00116000 B EYECATCH BYPASS EYECATCHER @VA04250 00117000 DS 0D ALIGN @VA04250 00118000 DC CL8'DMMLOC' EYECATCHER @VA04250 00119000 RELLEV DC C'REL4LEV0' RELEASE AND LEVEL @V4075A1 00120000 EYECATCH LA R13,SAVEAREA LOC SAVEAREA @VA04250 00121000 XC RETCODE,RETCODE CLEAR RETURN CODE @VA04250 00122000 ************************************************************ @V4075A2 00122100 * WE NEED A 2 PAGE (8K) BUFFER INTO WHICH THE PAGE BEING @V4075A2 00122125 * SCANNED WILL BE TRANSLATED ( HEX INTO EBCDIC). THIS @V4075A2 00122150 * CHECK TO SEE IF IT WAS ALREADY DMSFREED, AND IF SO, @V4075A2 00122175 * BYPASSES THE DMSFREE. IF NOT, IT GETS 1030 DWORDS. @V4075A2 00122200 * THE TEST IS MADE ON THE ADDRESS OF THE FIRST BYTE @V4075A2 00122225 * PAST THE END OF THE BUFFER, WHICH IS '0' UNTIL THE @V4075A2 00122250 * DMSFREE IS DONE. @V4075A2 00122275 ************************************************************ @V4075A2 00122300 L R3,TBUFFEND TEST TO SEE IF CORE IS GOTTEN @V4075A2 00122325 LTR R3,R3 FOR THE TRANSLATED BUFF YET @V4075A2 00122350 BNZ NOFREE GOOD ADD - DONT GET CORE @V4075A2 00122375 DMSFREE DWORDS=(1030),ERR=FREEERR TRANSLATED DATA @V4075A2 00122400 ST R1,PREBUFAD ADDRESS OF GOTTEN CORE @V4075A2 00122425 LA R3,PREBUFL ADD THE LENGTH OF THE PREBUFFER @V4075A2 00122450 AR R3,R1 TO GET TO THE MAIN BUFFER @V4075A2 00122475 ST R3,BUFFADD SAVE THAT @V4075A2 00122500 L R1,DEC8176 DISPLACEMENT OF LAST BUFF LINE @V4075A2 00122525 AR R3,R1 ADD TO BUFFER ADDRESS @V4075A2 00122550 ST R3,LASTLINE AND SAVE THAT @V4075A2 00122575 LA R3,16(R3) POINT TO END OF BUFFER @V4075A2 00122600 NOFREE ST R3,TBUFFEND AND SAVE THAT @V4075A2 00122625 ********************************************************************** 00123500 * SAVE THE PLIST PTR, AND POINT TO THE START OF THE STRING 00124500 ********************************************************************** 00125500 ST R2,PLISTADD SAVE PLIST PTR @V4075A2 00126500 L R4,STRNGADD ADDRESS OF STRING @V4075A2 00127500 ST R4,STRING AND PLUG IT @V4075A2 00128500 ********************************************************************** 00129500 * NOW R4 POINTS TO THE FIRST CHAR OF THE SEARCH @V4075A2 00130500 * ARG WHOSE ADDR IS STRING. SCAN DOWN THE STRING @V4075A2 00131500 * CHECKING HEX VALIDITY AND COUNTING THE BYTES. @V4075A2 00132500 * DO THIS FOR UP TO 16 BYTES. WHEN A BLANK IS @V4075A2 00133500 * FOUND, END THE STRING. @V4075A2 00134500 ********************************************************************** 00135500 MVI BLANKSW,NOBLANK NO BLANKS YET IN STRING @VA04250 00177000 LA R2,BYTES COUNT BYTES IN A WORD - 4 @VA04250 00178000 LA R3,WORDS COUNT WORDS IN THE STRING - 4 @VA04250 00179000 * * * * * * * *------- -------- -------- -------- ------* 00180000 * * * * * * * * FIRST CHECK INPUT VALIDITY 00181000 * * * * * * * *------- -------- -------- -------- ------* 00182000 ZEROMASK LA R5,NULL ZERO MASK REGISTER @VA04250 00183000 VALID SLL R5,1 SHIFT THE MASK @VA04250 00184000 CLI BLANKSW,YESBLANK DID WE END THE STRING YET? @VA04250 00185000 BE BUMPPTR YES - KEEP GOING TO FILL MASKS @VA04250 00186000 * * * * * * * * ------- -------- -------- ------- * 00187000 * * * * * * * * ARE THESE ALL HEX CHARACTERS 00188000 * * * * * * * * ------- -------- -------- ------- * 00189000 HEXCHECK CLI 0(R4),A BELOW 'A' @VA04250 00190000 BL BLANKCHK NON HEX @VA04250 00191000 CLI 0(R4),F ABOVE 'F' @VA04250 00192000 BH HICHEK SO FAR @VA04250 00193000 B SETABIT OK - USE IT @VA04250 00194000 HICHEK CLI 0(R4),ZERO BELOW '0' @VA04250 00195000 BL BLANKCHK NON HEX @VA04250 00196000 CLI 0(R4),NINE ABOVE '9' @VA04250 00197000 BH BLANKCHK NON HEX @VA04250 00198000 SETABIT LA R5,BIT(R5) SET A BIT FOR A VALID CHAR @VA04250 00199000 B BUMPPTR GO GET NEXT @VA04250 00200000 BLANKCHK CLI 0(R4),BLANK BLANKYET? @VA04250 00201000 BNE NONHEXST NO - NON-HEX IN STRING @VA04250 00202000 ST R4,STRNGEND SAVE ADDRESS OF FIRST BYTE PAST @VA04250 00203000 MVI BLANKSW,YESBLANK SET SW ON @VA04250 00204000 BUMPPTR LA R4,ONE(R4) NEXT @VA04250 00205000 BCT R2,VALID GO DO NEXT BYTE, THIS WORD @VA04250 00206000 * * * * * * * * ------- -------- -------- ------- * 00207000 * * * * * * * * NOW WE ARE ROUND THE SMALL LOOP 00208000 * * * * * * * * AND HAVE PUT A BIT OR NOBIT FOR 00209000 * * * * * * * * EACH BYTE IN THE FIRST WORD 00210000 * * * * * * * * INTO THE MASK REG R5. NOW SAVE 00211000 * * * * * * * * THE MASK AND SET UP FOR NEXT WORD. 00212000 * * * * * * * * ------- -------- -------- ------- * 00213000 SLL R3,2 CONVERT BYTE COUNT TO WORD COUN @VA04250 00214000 ST R5,MASKS(R3) STORE IT @VA04250 00215000 SRL R3,2 RESTORE R3 @VA04250 00216000 LA R2,BYTES RESET COUNT IN R4 @VA04250 00217000 BCT R3,ZEROMASK ROUND AGAIN @VA04250 00218000 * * * * * * * * ------- -------- -------- ------- * 00219000 * * * * * * * * NOW ALL FOUR MASKS ARE STORED 00220000 * * * * * * * * TRANSLATE 'FROM' AND 'TO' ADDRESSES 00221000 * * * * * * * * IN THE PLIST TO HEX. 00222000 * * * * * * * * ------- -------- -------- ------- * 00223000 L R4,PLISTADD ADDRESS OF INPUT PLIST @VA04250 00224000 LA R4,P3(R4) 'FROM ' ADDRESS - PLIST THIRD @VA04250 00225000 CLI 0(R4),YESBLANK IS 'FROM' ADDRESS SUPPLIED? @VA04250 00226000 BE NOPARM NO, GO ISSUED MSG717 @VA04250 00227000 BAL R10,GOHEX GO HEX IT @VA04250 00228000 ST R5,FROM SAVE HEX START ADDRESS @VA04250 00229000 L R4,PLISTADD ADDRESS OF INPUT PLIST @VA04250 00230000 LA R4,P4(R4) 'TO' ADDRESS PLIST FOURTH @VA04250 00231000 CLI 0(R4),YESBLANK IS 'TO' ADDRESS SUPPLIED? @VA04250 00232000 BE NOPARM NO, GO ISSUE MSG717 @VA04250 00233000 BAL R10,GOHEX CONVERT TO HEX @VA04250 00234000 ST R5,TO SAVE IT @VA04250 00235000 ************************************************************ @V4075A2 00236100 * SET THE DEFAULT BOUND VALUE, THEN @V4075A2 00236150 * SEE IF THERE IS A 5TH PARM - THE SEARCH BOUNDARY @V4075A2 00236200 * IF THERE IS, GO TRANSLATE IT TO A HEX VALUE. @V4075A2 00236250 ************************************************************ @V4075A2 00236300 LA R4,ONE SET BOUND TO THE DEFAULT - 1 @V4075A2 00236350 ST R4,BOUND AND PLUG IT @V4075A2 00236400 L R4,PLISTADD POINT TO PLIST @V4075A2 00236450 LA R4,P5(R4) AND GET THE FIFTH PARM @V4075A2 00236500 CLC FENCE,0(R4) IS THERE A BOUNDARY PARM? @V4075A2 00236550 BE HILOCHEK NO - LET MY DEFAULT GO @V4075A2 00236600 BAL R10,GOHEX YES - GO TRANSLATE EBCD TO BIN @V4075A2 00236650 LTR R5,R5 CHECK FOR ZERO INCREMENT @VA09878 00236660 BZ NOPARM ZERO-THATS WRONG TELL THEM @VA09878 00236670 C R5,FOURK CHECK FOR MAX VALUE @V4075A2 00236700 BNH DOUBLE NOT OVER MAX - USE IT @V4075A2 00236750 L R5,FOURK SET TO MAX @V4075A2 00236800 DOUBLE SLL R5,ONE CONVERT TO BYTES @V4075A2 00236850 ST R5,BOUND AND SET THE BOUND VALUE @V4075A2 00236900 HILOCHEK CLC FROM,TO NOW SEE THAT TO IS ABOVE FROM @V4075A2 00236950 BH NOTFOUND YES - KICK IT BACK @VA04250 00237000 * * * * * * * * ------- -------- -------- ------- * 00238000 * * * * * * * * NOW GET THE FROM ADDRESS, REDUCE 00239000 * * * * * * * * IT TO A PAGE BOUNDARY AND GET IT 00240000 * * * * * * * * IT INTO CORE, TO TRANSLATE. 00241000 * * * * * * * * ------- -------- -------- ------- * 00242000 L R2,FROM GET FROM ADDRESS @VA04250 00243000 SRL R2,12 DROP OFF DISPLACEMENT @VA04250 00244000 SLL R2,12 RESTORE TO A PAGE @VA04250 00245000 REGET1 ST R2,PAGEFROM SAVE THAT @VA04250 00246000 BAL R10,GOGET GO FETCH THE PAGE INTO 'BUFF1' @VA04250 00247000 LTR R15,R15 HOW WAS IT? @VA04250 00248000 BZ GOODGET1 OK - CARRY ON @VA04250 00249000 C R15,CODE4 WARNING? @VA04250 00250000 BNE RETCODE8 NO - GET OUT @VA04250 00251000 C R2,OFFENDER OFF THE END? @VA04250 00252000 BE SAVEREG2 YES - STOP THE SEARCH @VA04250 00253000 BADGET1 L R2,PAGEFROM PAGE NOT IN DUMP - GO FOR NEXT @VA04250 00254000 A R2,FOURK ADD 4096 @VA04250 00255000 C R2,TO GONE PAST THE 'TO' ADDRESS? @VA04250 00256000 BL FROMFIX NO - GO GET NEXT PAG @VA04831 00257500 B NOTFOUND TOO FAR - QUIT @VA04250 00258000 FROMFIX L R6,FROM GET LAST 'FROM' ADDRESS @VA04831 00258200 A R6,FOURK BUMP BY A PAGE @VA04831 00258400 ST R6,FROM AND REPLACE IT @VA04831 00258600 B REGET1 CONTINUE @VA04831 00258800 GOODGET1 ST R2,PAGESTRT SAVE INCORE PAGE ADDRESS @VA04250 00259000 L R3,FROM GET FROM ADDRESS @VA04250 00260000 SLL R3,20 STRIP 'FROM' TO A DISP. ONLY @VA04250 00261000 SRL R3,20 AND RESTORE IT @VA04250 00262000 AR R2,R3 ADD TO INCORE PAGE BOUNDARY @VA04250 00263000 ST R2,START SAVE INCORE START ADDR OF HEX @VA04250 00264000 * * * * * * * * ------- -------- -------- ------- * 00265000 * * * * * * * * NOW SEE IF START IS IN LAST 8 BYTES 00266000 * * * * * * * * IF IT IS, GET THE NEXT PAGE INSTEAD 00267000 * * * * * * * * ------- -------- -------- ------- * 00268000 CLC START,LASTHEX IS START BELOW LAST HEX LINE? @VA04250 00269000 BNL STARTHI NO - GO JUGGLE PAGES @VA04250 00270000 * * * * * * * * ------- -------- -------- ------- * 00271000 * * * * * * * * NOW TRANSLATE THE PAGE INTO 00272000 * * * * * * * * EBCDIC IN 'LOCBUFF'. 00273000 * * * * * * * * ------- -------- -------- ------- * 00274000 STARTLOW CLC PAGEFROM,LASTPAGE WANTED PAGE SAME AS LAST PAG? @VA04250 00275000 BE SETSTART BYPASS TRANSLATE @VA04250 00276000 * * * * * * * * ------- -------- -------- ------- * 00277000 * * * * * * * * TRANSLATE A PAGE. 00278000 * * * * * * * * ------- -------- -------- ------- * 00279000 TRANSET LA R3,TRANINL LENGTH TO TRANSLATE @VA04250 00280000 L R4,PAGESTRT ADDRESS OF INPUT DATA @VA04250 00281000 LA R6,TRANINL SET UP A COUNT @VA04250 00282000 L R7,BUFFADD ADDRESS FOR TRANSLATED STUFF @VA04250 00283000 GOGOINT BAL R10,GOINT GO TRANSLATE @VA04250 00284000 MVC 0(TRANOUTL,R7),0(R5) PLUG TRANSLATEEE @VA04250 00285000 LA R4,TRANINL(R4) BUMP INPUT PTR @VA04250 00286000 LA R7,TRANOUTL(R7) AND OUTPUT PTR @VA04250 00287000 BCT R6,GOGOINT NEXT LINE OVER THE TOP? @VA04250 00288000 * * * * * * * * ------- -------- -------- ------- * 00289000 * * * * * * * * POINT TO THE ADDRESS IN 'LOCBUFF' 00290000 * * * * * * * * WHICH CORRESPONDS TO 'START' 00291000 * * * * * * * * ------- -------- -------- ------- * 00292000 SETSTART MVC LASTPAGE,PAGEFROM SAVE ADDR OF PAGE JUST XLATED @VA04250 00293000 L R2,FROM TRUE START ADDRESS @VA04250 00294000 L R3,PAGEFROM START OF THAT PAGE @VA04250 00295000 SR R2,R3 GET DISPLACEMENT OF START @VA04250 00296000 AR R2,R2 DOUBLE IT AS ITS TRANSLATED @VA04250 00297000 L R3,BUFFADD GET START OF TRANSLATED AREA @VA04250 00298000 AR R3,R2 AND ADD DIPLACEMENT @VA04250 00299000 ST R3,TRANSTAR PLUG IN CORE SEARCH START ADDR @VA04250 00300000 * * * * * * * * ------- -------- -------- ------- * 00301000 * * * * * * * * DO THE SAME FOR STOP 00302000 * * * * * * * * ------- -------- -------- ------- * 00303000 SETSTOP L R2,TO TRUE STOP ADDRESS IN HEX @V4075A2 00304500 L R4,PAGEFROM START OF HEX SEARCH PAGE @VA04250 00305000 SR R2,R4 GET BYTE DISPLACEMENT OF STOP @VA04250 00306000 AR R2,R2 DOUBLE IT @VA04250 00307000 L R4,BUFFADD IN CORE START OF TRANS AREA @VA04250 00308000 AR R4,R2 ADD THE DISPLACEMENT @VA04250 00309000 ST R4,TRANSTOP SAVE STOP ADDRESS @VA04250 00310000 * * * * * * * * ------- -------- -------- ------- * 00311000 * * * * * * * * R3 NOW POINTS TO 'START' IN THE 00312000 * * * * * * * * TRANSLATED BUFFER. SET UP FOR THE 00313000 * * * * * * * * COMPARE. 00314000 * * * * * * * * ------- -------- -------- ------- * 00315000 COMPSET L R2,MASK1 GET FIRST MASK @VA04250 00316000 L R4,STRING GET ADDRESS OF START OF STRING @VA04250 00317000 L R4,0(R4) GET FIRST FOUR BYTES OF STRING @VA04250 00318000 * * * * * * * * ------- -------- -------- ------- * 00319000 * * * * * * * * HERE STARTS THE COMPARE LOOP. THE 00320000 * * * * * * * * MASK REG CONTAINS IN ITS LOW 4 BITS 00321000 * * * * * * * * A 1 BIT FOR EACH NON ASTERISK 00322000 * * * * * * * * BYTE IN THE FIRST FOUR BYTES OF THE 00323000 * * * * * * * * INPUT STRING. 00324000 * * * * * * * * THE MASK REG IS USED AS THE 'OR' 00325000 * * * * * * * * REG IN AN EXECUTE INSTRUCTION. 00326000 * * * * * * * * THE OBJECT OF THE EXECUTE IS A 00327000 * * * * * * * * 'CLM' WHICH COMPARES THE FIRST FOUR 00328000 * * * * * * * * BYTES OF 'STRING' WITH SUCCESSIVE 00329000 * * * * * * * * FOUR BYTE AREAS OF THE TRANSLATED 00330000 * * * * * * * * BUFFER. IF THERE IS A MATCH, THEN 00331000 * * * * * * * * WE GO ON TO COMPARE THE OTHER 00332000 * * * * * * * * TWELVE BYTES. EACH WORD IS MAPPED BY 00333000 * * * * * * * * A DIFFERENT MASK REG. ONLY THAT 00334000 * * * * * * * * PORTION OF THE STRING WHICH IS 00335000 * * * * * * * * NON ASTERISK, AND CONTAINS NO 00336000 * * * * * * * * BLANKS, IS CONSIDERED IN THE 00337000 * * * * * * * * COMPARE. THIS ALLOWS ONE PATTERN 00338000 * * * * * * * * OF COMPARES FOR ALL STRING LENGTHS 00339000 * * * * * * * * UP TO SIXTEEN BYTES. 00340000 * * * * * * * * ------- -------- -------- ------- * 00341000 EXECUTOR EX R2,MASKOMP EXECUTE THE COMPARE UNDER MASK @VA04250 00342000 BE TRY2 GOT A HIT - TRY SECOND WORD @VA04250 00343000 BUMPTRAN L R1,BOUND GET THE INCREMENT VALUE @V4075A2 00344350 AR R3,R1 AND BUMP THE COMPARE PTR @V4075A2 00344700 C R3,TRANSTOP HAVE WE DONE IT ALL? @VA04250 00345000 BNL NOTFOUND NO MATCH HERE @VA04250 00346000 C R3,LASTLINE LAST BUFFER LINE - MAY BE O/FLO @V4075A2 00347500 BNL NEXTPAGE YES - GO FIX IT UP @VA04250 00348000 B EXECUTOR TRY NEXT COMPARE @VA04250 00349000 MASKOMP CLM R4,ZMASK,0(R3) COMPARE UNDER MASK @VA04250 00350000 * * * * * * * * ------- -------- -------- ------- * 00351000 * * * * * * * * GOT A HIT ON THE FIRST WORD 00352000 * * * * * * * * TRY SECOND ETC. 00353000 * * * * * * * * ------- -------- -------- ------- * 00354000 TRY2 L R2,MASK2 GET NEXT MASK @VA04250 00355000 LA R3,WORDS(R3) POINT TO NEXT WORD IN BUFFER @VA04250 00356000 L R4,STRING GET STRING POINTER @VA04250 00357000 L R4,WORDS(R4) AND GET THE SECOND WORD @VA04250 00358000 EX R2,MASKOMP DO THE COMPARE @VA04250 00359000 BE TRY3 GOT ANOTHER HIT - TRY THIRD @VA04250 00360000 * * * * * * * * ------- -------- -------- ------- * 00361000 * * * * * * * * MISSED - RESTORE THE COMPARE 00362000 * * * * * * * * CONDITIONS AND CONTINUE 00363000 * * * * * * * * ------- -------- -------- ------- * 00364000 L R2,MASK1 RESTORE MASK @VA04250 00365000 S R3,FOUR BACKUP DATA POINTER @VA04250 00366000 L R4,STRING AND PICK UP @VA04250 00367000 L R4,0(R4) THE FIRST STRING BYTE @VA04250 00368000 B BUMPTRAN GO TRY NEXT BYTE @VA04250 00369000 * * * * * * * * ------- -------- -------- ------- * 00370000 * * * * * * * * GOT A HIT ON FIRST TWO WORDS 00371000 * * * * * * * * TRY FOR THREE 00372000 * * * * * * * * ------- -------- -------- ------- * 00373000 TRY3 L R2,MASK3 GET NEXT MASK @VA04250 00374000 LA R3,WORDS(R3) POINT TO NEXT WORD IN BUFFER @VA04250 00375000 L R4,STRING GET STRING POINTER @VA04250 00376000 L R4,WORD3(R4) AND GET THE SECOND WORD @VA04250 00377000 EX R2,MASKOMP DO THE COMPARE @VA04250 00378000 BE TRY4 GOT ANOTHER HIT - TRY FOURTH @VA04250 00379000 * * * * * * * * ------- -------- -------- ------- * 00380000 * * * * * * * * MISSED - RESTORE THE COMPARE 00381000 * * * * * * * * CONDITIONS AND CONTINUE 00382000 * * * * * * * * ------- -------- -------- ------- * 00383000 L R2,MASK1 RESTORE MASK @VA04250 00384000 S R3,EIGHT BACKUP DATA POINTER @VA04250 00385000 L R4,STRING AND PICK UP @VA04250 00386000 L R4,0(R4) THE FIRST STRING BYTE @VA04250 00387000 B BUMPTRAN GO TRY NEXT BYTE @VA04250 00388000 * * * * * * * * ------- -------- -------- ------- * 00389000 * * * * * * * * FOURTH AND FINAL TRY 00390000 * * * * * * * * ------- -------- -------- ------- * 00391000 TRY4 L R2,MASK4 GET NEXT MASK @VA04250 00392000 LA R3,WORDS(R3) POINT TO NEXT WORD IN BUFFER @VA04250 00393000 L R4,STRING GET STRING POINTER @VA04250 00394000 L R4,WORD4(R4) AND GET THE FOURTH WORD @VA04250 00395000 EX R2,MASKOMP DO THE COMPARE @VA04250 00396000 BE MATCH GOT ANOTHER HIT - FULL MATCH @VA04250 00397000 * * * * * * * * ------- -------- -------- ------- * 00398000 * * * * * * * * MISSED - RESTORE THE COMPARE 00399000 * * * * * * * * CONDITIONS AND CONTINUE 00400000 * * * * * * * * ------- -------- -------- ------- * 00401000 L R2,MASK1 RESTORE MASK @VA04250 00402000 S R3,TWELVE BACKUP DATA POINTER @VA04250 00403000 L R4,STRING AND PICK UP @VA04250 00404000 L R4,0(R4) THE FIRST STRING BYTE @VA04250 00405000 B BUMPTRAN GO TRY NEXT BYTE @VA04250 00406000 * * * * * * * * ------- -------- -------- ------- * 00407000 * * * * * * * * WE HAVE A MATCH ON ALL FOUR WORDS 00408000 * * * * * * * * CONVERT THE INCORE ADDRESS OF 00409000 * * * * * * * * THE MATCH TO A REAL ADDRESS, 00410000 * * * * * * * * FIND OUT THE DEVICE TYPE, AND 00411000 * * * * * * * * PASS THE ADDRESS TO EITHER 00412000 * * * * * * * * 'FED' IF 2741, OR 'FEX' IF 3270 00413000 * * * * * * * * ------- -------- -------- ------- * 00414000 MATCH L R2,BUFFADD GET START OF TRAN DATA @VA04250 00415000 S R3,TWELVE POINT R3 TO START OF MATCH DATA @VA04250 00416000 SR R3,R2 GET OFFSET INTO BUFFER @VA04250 00417000 BNM DIVIDE HIT MAY BE IN LAST LINE @VA04250 00418000 * * * * * * * * ------- -------- -------- ------- * 00419000 * * * * * * * * HIT CAME IN PRE-BUFFER - LAST 00420000 * * * * * * * * 16 TRANS BYTES OF PREVIOUS PAGE 00421000 * * * * * * * * SO REAL ADDRESS IS FOUND THUS:- 00422000 * * * * * * * * ------- -------- -------- ------- * 00423000 AR R2,R3 R2 POINTS TO HIT @VA04250 00424000 L R3,BUFFADD GET BUFFER ADDRESS @VA04250 00425000 SR R3,R2 R3 HAS #BYTES BEFORE PAGE @VA04250 00426000 SRL R3,1 DIVIDE BY 2 FOR HEX @VA04250 00427000 L R2,PAGEFROM REAL ADDRESS OF PAGE @VA04250 00428000 SR R2,R3 R2 HAS REAL ADDR OF MATCH @VA04250 00429000 ST R2,MATCHADD SAVE IT @VA04250 00430000 B CONVERT @VA04250 00431000 * * * * * * * * ------- -------- -------- ------- * 00432000 * * * * * * * * THIS IS THE USUAL WAY TO GET 00433000 * * * * * * * * THE REAL ADDRESS OF THE MATCH 00434000 * * * * * * * * ------- -------- -------- ------- * 00435000 DIVIDE SRL R3,1 DIVIDE BY TWO TO GET BYTE DISP @VA04250 00436000 L R2,PAGEFROM GET REAL PAGE START @VA04250 00437000 AR R2,R3 R2 HAS REAL ADDRESS OF MATCH. @VA04250 00438000 ST R2,MATCHADD YOU JUST NEVER KNOW... @VA04250 00439000 * * * * * * * * ------- -------- -------- ------- * 00440000 * * * * * * * * CONVERT THIS HEX ADDRESS TO AN 00441000 * * * * * * * * EBCDIC ADDRESS TO PASS IN A PLIST. 00442000 * * * * * * * * ------- -------- -------- ------- * 00443000 CONVERT LA R3,ADRL GET LENGTH TO TRANSLATE @VA04250 00444000 L R4,MATCHADD GET ADDRESS AND ROUND IT @VA04250 00445000 SRL R4,4 CONVERT TO A 16 BYTE BOUND @VA04250 00446000 SLL R4,4 AND RESTORE @VA04250 00447000 ST R4,MATCHRND SAVE THE ROUNDED MATCH ADDRESS @VA04250 00448000 LA R4,MATCHRND GET ADDRESS TO TRANSLATE @VA04250 00449000 BAL R10,GOINT GO TRANSLATE IT @VA04250 00450000 MVC OUTPLADD(ADDR),TRANAD(R5) PLUG ADDRESS IN PLIST @VA04250 00451000 LA R2,OUTPLIST PASS OUR PLIST @VA04250 00452000 * * * * * * * * ------- -------- -------- ------- * 00453000 * * * * * * * * NOW FIND THE DEVICE TYPE 00454000 * * * * * * * * ------- -------- -------- ------- * 00455000 L R3,TYPEADD GO AFTER DEVICE TYPE @VA04250 00456000 CLI 0(R3),TYPER IS IT A TYPEWRITER? @VA04250 00457000 BE GOGOFED GO PASS IT TO DMMFED @VA04250 00458000 * * * * * * * * ------- -------- -------- ------- * 00459000 * * * * * * * * WE HAVE A GRAPHICS DEVICE. 00460000 * * * * * * * * PASS THE ADDRESS TO DMMFEX. 00461000 * * * * * * * * ------- -------- -------- ------- * 00462000 GOGOFEX MVC OUTPLCMD,X INSERT 'X' COMMAND @VA04250 00463000 MVC OUTPLEN,FENCE FENCE END OF PLIST @VA04250 00464000 BAL R10,GOFEX GO TO SCREEN DISPLAY @VA04250 00465000 B RETURN RETURN @VA04250 00466000 * * * * * * * * ------- -------- -------- ------- * 00467000 * * * * * * * * SET A RETCODE OF 8 00468000 * * * * * * * * ------- -------- -------- ------- * 00469000 RETCODE8 MVC RETCODE,CODE8 SET 8 @VA04250 00470000 B RETURN SEND IT BACK @VA04250 00471000 * * * * * * * * ------- -------- -------- ------- * 00472000 * * * * * * * * SAVE R2 FOR MESSAGE WRITER 00473000 * * * * * * * * ------- -------- -------- ------- * 00474000 SAVEREG2 LR R4,R2 SAVE R2 IN R4 @VA04250 00475000 B NOTFOUND GO WRITE MESSAGE @VA04250 00476000 * * * * * * * * ------- -------- -------- ------- * 00477000 * * * * * * * * GOT A 2741. SET UP FOR FED 00478000 * * * * * * * * THE FOUND STRING MAY NOT ALL LIE 00479000 * * * * * * * * ON ONE SIXTEEN BYTE LINE. CHECK 00480000 * * * * * * * * TO SEE IF THIS IS SO, AND WRITE 00481000 * * * * * * * * ONE OR TWO LINES ACCORDINGLY. 00482000 * * * * * * * * ------- -------- -------- ------- * 00483000 GOGOFED MVC OUTPLCMD,DISPLAY INSERT 'DISPLAY' COMMAND @VA04250 00484000 MVC OUTPLFEN,FENCE FENCE END @VA04250 00485000 L R3,STRNGEND GET OFF-END-OF-STRING ADDRESS @VA04250 00486000 S R3,STRING LESS START @VA04250 00487000 BCTR R3,R0 LESS 1 - BACK TO LAST BYTE @VA04250 00488000 SRL R3,1 CONVERT HALF BYTES TO BYTES @VA04250 00489000 A R3,MATCHADD ADDRESS OF LAST BYTE OF MATCH @VA04250 00490000 SRL R3,4 CONVERT IT TO A @VA04250 00491000 SLL R3,4 16 BYTE BOUNDARY. @VA04250 00492000 L R4,MATCHADD DO THE SAME FOR THE START OF @VA04250 00493000 SRL R4,4 THE STRING @VA04250 00494000 SLL R4,4 AND THEN SEE IF THEY ARE SAME @VA04250 00495000 CR R3,R4 IF NOT - PRINT TWO LINES @VA04250 00496000 BE WRITE1 BUT IF THEY ARE.... @VA04250 00497000 MVC OUTPLEN,TWENTY SHOW TWO LINES @VA04250 00498000 B GOFEDLNK GO TO THE LINK @VA04250 00499000 WRITE1 MVC OUTPLEN,TEN SHOW ONE LINE @VA04250 00500000 GOFEDLNK BAL R10,GOFED GO TO FED ROUTINE @VA04250 00501000 B RETURN RETURN @VA04250 00502000 * * * * * * * * ------- -------- -------- ------- * 00503000 * * * * * * * * COMMON BAL TO GET DATA IN CORE 00504000 * * * * * * * * ------- -------- -------- ------- * 00505000 GOGET L R15,GETADD ADDRESS @VA04250 00506000 BALR R14,R15 LINK @VA04250 00507000 C R15,CODE8 FATAL? @VA04250 00508000 BE CODECHEK YES - GO BURY IT @VA04250 00509000 BR R10 NO - LET SENDER HAVE RETURN @VA04250 00510000 * * * * * * * * ------- -------- -------- ------- * 00511000 * * * * * * * * COMMON BAL TO HEX-TO-EBCDIC CODE 00512000 * * * * * * * * ------- -------- -------- ------- * 00513000 GOINT L R15,INTADD @VA04250 00514000 BALR R14,R15 LINK @VA04250 00515000 LTR R15,R15 HOW WAS IT @VA04250 00516000 BNZ CODECHEK HOW BAD? @VA04250 00517000 BR R10 @VA04250 00518000 * * * * * * * * ------- -------- -------- ------- * 00519000 * * * * * * * * COMMON BAL TO EBCDIC-ADD-TO-HEX 00520000 * * * * * * * * ------- -------- -------- ------- * 00521000 GOHEX L R15,HEXADD ADDRESS @VA04250 00522000 BALR R14,R15 LINK @VA04250 00523000 LTR R15,R15 CHECK RETURN @VA04250 00524000 BNZ CODECHEK HOW BAD @VA04250 00525000 BR R10 BACK OK @VA04250 00526000 * * * * * * * * ------- -------- -------- ------- * 00527000 * * * * * * * * COMMON BAL TO DMMFED 00528000 * * * * * * * * ------- -------- -------- ------- * 00529000 GOFED L R15,FEDADD ADDRESS @VA04250 00530000 BALR R14,R15 LINK @VA04250 00531000 LTR R15,R15 BAD? @VA04250 00532000 BNZ CODECHEK HOW BAD? @VA04250 00533000 L R3,HEXADADD LAST DISPLAYED ADDRESS @VA04250 00534000 ST R2,0(R3) STORE LAST FED ADDRESS @VA04250 00535000 BR R10 CONTINUE @VA04250 00536000 * * * * * * * * ------- -------- -------- ------- * 00537000 * * * * * * * * COMMON BAL TO DMMFEX 00538000 * * * * * * * * ------- -------- -------- ------- * 00539000 GOFEX L R15,FEXADD ADDRESS @VA04250 00540000 BALR R14,R15 LINK @VA04250 00541000 LTR R15,R15 BAD? @VA04250 00542000 BNZ CODECHEK HOW BAD @VA04250 00543000 BR R10 RETURN @VA04250 00544000 * * * * * * * * ------- -------- -------- ------- * 00545000 * * * * * * * * POSTS RETURN CODES. 00546000 * * * * * * * * ------- -------- -------- ------- * 00547000 CODECHEK ST R15,RETCODE NO - FATAL ERROR - PASS RETURN @VA04250 00548000 B RETURN GO BACK @VA04250 00549000 * * * * * * * * ------- -------- -------- ------- * @V4075A2 00549100 * * * * * * * * NO PARMS WERE FOUND @V4075A2 00549200 * * * * * * * * ------- -------- -------- ------- * @V4075A2 00549300 NOPARM LA R8,ERMSG717 INVALID FORM OF COMMAND @V4075A2 00549400 LA R9,E717L LENGTH @V4075A2 00549500 BAL R10,WRTERM WRITE @V4075A2 00549600 MVC RETCODE,CODE4 WARNING RETURN @V4075A2 00549700 B RETURN RET @V4075A2 00549800 * * * * * * * * ------- -------- -------- ------- * 00550000 * * * * * * * * UNSUCCESSFUL SEARCH. 00551000 * * * * * * * * MOVE THE STRING INTO THE ERROR 00552000 * * * * * * * * MESSAGE AND DISPLAY IT. 00553000 * * * * * * * * FIRST GET THE LENGTH OF THE STRING 00554000 * * * * * * * * (INLENGTH-((STRING-INPUTADD))), IS 00555000 * * * * * * * * LENGTH OF STRING+(FROM AND TO) 00556000 * * * * * * * * ------- -------- -------- ------- * 00557000 NOTFOUND MVI OUTMSG,BLANK SET UP TO CLEAR MSG AREA @VA04250 00558000 MVC OUTMSG+ONE(LINEL-ONE),OUTMSG CLEAR TO BLANKS @VA04250 00559000 MVC OUTMSG,ERMSG716 MOVE MSG HEADER @VA04250 00560000 L R2,STRLNADD ADDRESS OF LENGTH OF STRING @V4075A2 00561000 L R2,0(R2) LENGTH @VA04250 00562000 L R3,STRING ADDRESS OF STRING @VA04250 00563000 C R2,FORTY MAX LENGTH @VA04250 00567000 BH FIXUP SET IT RIGHT @VA04250 00568000 EXMOVE EX R2,MOVESTR DO THE MOVE @VA04250 00570000 B MOREMSG CONTINUE WITH REST OF MESSAGE @VA04250 00571000 MOVESTR MVC OUTSTRNG(NULL),0(R3) MOVE STRING TO OUTPUT AREA @VA04250 00572000 FIXUP LA R2,DEFAULT DEFAULT LENGTH - 40 @VA04250 00573000 B EXMOVE GO MOVE IT @VA04250 00574000 MOREMSG LA R3,OUTSTRNG GET ADDRESS OF OUTSTRING @VA04250 00575000 AR R3,R2 ADD LENGTH OF STRING @VA04250 00576000 MVC 0(L'E716TEXT,R3),E716TEXT MOVE IN TEXT @VA04250 00577000 LA R8,OUTMSG ADDRESS @VA04250 00578000 C R4,OFFENDER WAS IT OFF THE END @VA04250 00579000 BNE NOTOFF NO - WRITE SHORT MESSAGE @VA04250 00580000 MVC L'E716TEXT(L'E7T2,R3),E7T2 ADD 'OFF END' MSG @VA04250 00581000 NOTOFF LA R9,LINEL LENGTH TO WRITE @VA04250 00582000 BAL R10,WRTERM GO WRITE IT @VA04250 00583000 MVC RETCODE,CODE4 WARNING @VA04250 00584000 B RETURN @VA04250 00585000 * * * * * * * * ------- -------- -------- ------- * 00586000 * * * * * * * * NON-HEX CHAR IN 'STRING' 00587000 * * * * * * * * ------- -------- -------- ------- * 00588000 NONHEXST LA R8,ERMSG715 'NON-HEX CHARACTER IN STRING @VA04250 00589000 LA R9,E715L LENGTH @VA04250 00590000 BAL R10,WRTERM GO WRITE IT @VA04250 00591000 MVC RETCODE,CODE4 WARNING RETURN @VA04250 00592000 B RETURN GO BACK @VA04250 00593000 * * * * * * * * ------- -------- -------- ------- * 00594000 * * * * * * * * THIS CLEARS THE SCREEN AND POSITIONS 00595000 * * * * * * * * THE FOLLOWING WRITE AT THE TOP 00596000 * * * * * * * * OF THE SCREEN 00597000 * * * * * * * *------- -------- -------- -------- ------* 00598000 WRTERM STM R7,R9,SAVCLR SAVE REGS @VA04250 00599000 L R8,SCRNADD GET THE ADDRESS OF THE SCREEN @VA04250 00600000 ST R8,CCWC PLUG ADDRESS IN CCW @VA04250 00601000 LA R8,CCWC CCW ADD @VA04250 00602000 L R9,CONSADD VIRT CONS ADDRESS LOCATION @VA04250 00603000 L R9,0(R9) VIRT CON CUU @VA04250 00604000 MVI CCWC,ERASE RESTORE CMD CODE @VA04250 00605000 MVI CCWCTL,ON SET ERASE BYTE @VA04250 00606000 WAITT WAIT FOR PREVIOUS I/O @VA04250 00607000 CLEAR DC X'83890058' DIAGNOSE @VA04250 00608000 RELOAD LM R7,R9,SAVCLR RESTORE REGS @VA04250 00609000 ST R8,PARMLIS1 SAVE MSG TEXT PTR IN PARM LIST @V4075A2 00610100 ST R9,PARMLIS2 AND TEXT LENGTH @V4075A2 00610200 LA R1,PARMLIS1 POINTER TO PASS @V4075A2 00610300 L R15,FEDLNADD ADDRESS OF DMMFEDLN - LINE WRITER@V4075A2 00610400 BALR R14,R15 GO WRITE THE LINE @V4075A2 00610500 BR R10 AND RETURN @V4075A2 00610600 PARMLIS1 DS F PARM1 @V4075A2 00610700 PARMLIS2 DS F PARM2 @V4075A2 00610800 FEDLNADD DC V(DMMFEDLN) LINE WRITER ROUTINE @V4075A2 00610900 * * * * * * * * ------- -------- -------- ------- * 00612000 * * * * * * * * START IS IN LAST 8 HEX BYTES 00613000 * * * * * * * * TRANSLATE ONLY THOSE EIGHT, 00614000 * * * * * * * * SET THEM IN PREBUFF, AND GET THE 00615000 * * * * * * * * NEXT PAGE INTO LOCBUFF. 00616000 * * * * * * * * ------- -------- -------- ------- * 00617000 STARTHI AR R3,R3 DOUBLE DISP AS IT IS TRANSLATED @V4075A2 00618100 A R3,BUFFADD ADD TO START OF TRANS AREA @V4075A2 00618200 S R3,EIGHTK AND POINT INTO THE PREBUFFER @V4075A2 00618300 ST R3,COMPPTR AND SAVE THE COMPARE POINTER @V4075A2 00618400 LA R3,LAST8L LENGTH OF LAST 8 - 8 BYTES @V4075A2 00618500 L R4,LASTHEX ADDRESS @VA04250 00619000 BAL R10,GOINT GO TRANSLATE LAST EIGHT BYTES @VA04250 00620000 L R3,PREBUFAD ADDRESS OF SPILL AREA @VA04250 00621000 MVC 0(PREBUFL,R3),0(R5) MOVE TRANSLATED STUFF @VA04250 00622000 * * * * * * * * ------- -------- -------- ------- * 00623000 * * * * * * * * NOW GET THE NEXT PAGE INTO CORE 00624000 * * * * * * * * ------- -------- -------- ------- * 00625000 GETNEXT L R2,PAGEFROM GET OLD REAL PAGE @VA04250 00626000 A R2,FOURK ADD 4096 @VA04250 00627000 REGET2 ST R2,PAGEFROM UPDATE FOR 'MATCH' @VA04250 00628000 ST R2,LASTPAGE UPDATE FOR NO TRANSLATE @VA04250 00629000 BAL R10,GOGET FETCH IT IN @VA04250 00630000 LTR R15,R15 CHECK RETURN @VA04250 00631000 BZ GOODGET2 OK - CONTINUE @VA04250 00632000 L R1,PREBUFAD GET THE ADDRESS OF PREBUFF @V4075A2 00633300 XC 0(PREBUFL,R1),0(R1) AND CLEAR THE PREBUFF @V4075A2 00633600 C R15,CODE4 WARNING? @VA04250 00634000 BNE RETCODE8 NO - GET OUT @VA04250 00635000 C R2,OFFENDER OFF THE END? @VA04250 00636000 BE SAVEREG2 YES - STOP THE SEARCH @VA04250 00637000 BADGET2 L R2,PAGEFROM GET PAGE @VA04250 00638000 A R2,FOURK BUMP BY 4096 @VA04250 00639000 C R2,TO PAST END OF SEARCH? @VA04250 00640000 BL REGET2 NO - ZIP AROUND AGAIN @VA04250 00641000 B NOTFOUND YES - QUIT @VA04250 00642000 GOODGET2 ST R2,PAGESTRT STORE IT @VA04250 00643000 * * * * * * * * ------- -------- -------- ------- * 00644000 * * * * * * * * NOW TRANSLATE THE NEXT PAGE 00645000 * * * * * * * * ------- -------- -------- ------- * 00646000 TRANNEXT LA R3,TRANINL LENGTH TO TRANSLATE @V4075A2 00647500 L R4,PAGESTRT ADDRESS OF INPUT DATA @VA04250 00648000 LA R6,TRANINL SET UP A COUNT @VA04250 00649000 L R7,BUFFADD ADDRESS FOR TRANSLATED STUFF @VA04250 00650000 GOTOINT BAL R10,GOINT GO TRANSLATE @VA04250 00651000 MVC 0(TRANOUTL,R7),0(R5) PLUG TRANSLATEEE @VA04250 00652000 LA R4,TRANINL(R4) BUMP INPUT PTR @VA04250 00653000 LA R7,TRANOUTL(R7) AND OUTPUT PTR @VA04250 00654000 BCT R6,GOTOINT NEXT LINE OVER THE TOP? @VA04250 00655000 * * * * * * * * ------- -------- -------- ------- * 00656000 * * * * * * * * NOW SET START AT PREBUFF AND 00657000 * * * * * * * * LET 'ER RIP. 00658000 * * * * * * * * ------- -------- -------- ------- * 00659000 SCANSET L R3,COMPPTR GET ADDR TO START COMPARE @V4075A2 00660500 B SETSTOP AND GO GET ADDRESS TO STOP @V4075A2 00661250 * * * * * * * * ------- -------- -------- ------- * 00665000 * * * * * * * * WE FELL OFF THE TOP OF THE PAGE. 00666000 * * * * * * * * GET THE NEXT PAGE . 00667000 * * * * * * * * ------- -------- -------- ------- * 00668000 NEXTPAGE S R3,EIGHTK POINT BACK INTO PREBUFF @V4075A2 00669200 ST R3,COMPPTR AND SAVE IT @V4075A2 00669400 L R7,PREBUFAD POINT TO PREBUFF @V4075A2 00669600 L R8,LASTLINE LAST TRANS LINE @VA04250 00670000 MVC 0(PREBUFL,R7),0(R8) MOVE LAST LINE @VA04250 00671000 B GETNEXT GO GET NEXT PAGE @VA04250 00672000 FREEERR LR R2,R15 SAVE THE ERROR RETURN @V4075A2 00672100 LINEDIT TEXT='ERROR ''...'' IN DMSFREE OR DMSFRET, SEE SYSTEM X00672200 PROGRAMMERS GUIDE',DOT=NO,SUB=(DEC,(2)) FRETER @V4075A2 00672300 MVC RETCODE,CODE8 SET BADNESS INDICATOR @V4075A2 00672400 B RETURN AND QUIT @V4075A2 00672500 * * * * * * * * ------- -------- -------- ------- * 00673000 * * * * * * * * CLOSE 00674000 * * * * * * * * ------- -------- -------- ------- * 00675000 RETURN L R13,SAVEBACK RESTORE CALLER SAVE PTR @VA04250 00676000 MVC SAVREG15(L'RETCODE,R13),RETCODE PLUG RETCODE @VA04250 00677000 LM R14,R12,SAVEDISP(R13) RESTORE CALLERS REGS @VA04250 00678000 BR R14 RETURN @VA04250 00679000 * * * * * * * * ------- -------- -------- ------- * 00680000 * * * * * * * * CONSTANTS FOR CLEAR 00681000 * * * * * * * * ------- -------- -------- ------- * 00682000 CCWC CCW X'19',X'0',X'20',1760 ERASE CCW @VA04250 00683000 CCWCTL EQU CCWC+5 CONTROL BYTE @VA04250 00684000 SAVCLR DS 3F SAVE FOR CLEAR SUBR. @VA04250 00685000 SCRNADD DC AL4(SCRNAREA) ADDRESS OF AREA TO BE DISPLAYED @VA04250 00686000 * * * * * * * * ------- -------- -------- ------- * 00687000 * * * * * * * * SAVEAREA 00688000 * * * * * * * * ------- -------- -------- ------- * 00689000 SAVEAREA DS 0F THIS PROGRAM'S SAVE AREA @VA04250 00690000 SAVEUSR DS F USER WORD @VA04250 00691000 SAVEFWD DS F FORWARD POINTER @VA04250 00692000 SAVEBACK DS F BACKWARD POINTER @VA04250 00693000 SAVER14 DS F SAVE AREA FOR CALLER'S R14 @VA04250 00694000 SAVER15 DS F SAVE AREA FOR CALLER'S R15 @VA04250 00695000 SAVER0 DS F SAVE AREA FOR CALLER'S R0 @VA04250 00696000 SAVER1 DS F SAVE AREA FOR CALLER'S R1 @VA04250 00697000 SAVER2 DS F SAVE AREA FOR CALLER'S R2 @VA04250 00698000 SAVER3 DS F SAVE AREA FOR CALLER'S R3 @VA04250 00699000 SAVER4 DS F SAVE AREA FOR CALLER'S R4 @VA04250 00700000 SAVER5 DS F SAVE AREA FOR CALLER'S R5 @VA04250 00701000 SAVER6 DS F SAVE AREA FOR CALLER'S R6 @VA04250 00702000 SAVER7 DS F SAVE AREA FOR CALLER'S R7 @VA04250 00703000 SAVER8 DS F SAVE AREA FOR CALLER'S R8 @VA04250 00704000 SAVER9 DS F SAVE AREA FOR CALLER'S R9 @VA04250 00705000 SAVER10 DS F SAVE AREA FOR CALLER'S R10 @VA04250 00706000 SAVER11 DS F SAVE AREA FOR CALLER'S R11 @VA04250 00707000 SAVER12 DS F SAVE AREA FOR CALLER'S R12 @VA04250 00708000 * * * * * * * * ------- -------- -------- ------- * 00709000 RETCODE DS F RETURN CODE @VA04250 00710000 PLISTADD DS F ADDRESS OF INPUT PLIST @VA04250 00711000 HEXADD DC AL4(DMMHEX) ADDRESS-TO-HEX @VA04250 00712000 GETADD DC AL4(DMMGET) FETCH INTO CORE @VA04250 00713000 FEDADD DC AL4(DMMFED) LINE WRITER @VA04250 00714000 FEXADD DC AL4(DMMFEX) SCREEN WRITER @VA04250 00715000 INTADD DC AL4(DMMINT) HEX-TO-EBCDIC @VA04250 00716000 HEXADADD DC AL4(HEXAD) LAST DISPLAY ADDRESS (SCROLL) @VA04250 00717000 INPUTADD DC AL4(INPUT) INPUT LINE @VA04250 00718000 INLENADD DC AL4(INLENGTH) INPUT LINE LENGTH @VA04250 00719000 STRNGADD DC AL4(STRINGAD) ADDRESS OF START OF STRING @V4075A2 00719300 STRLNADD DC AL4(STRINGLN) ADDRESS OF LENGTH OF STRING @V4075A2 00719600 PREBUFAD DC F'0' SPILL AREA @V4075A2 00720100 BUFFADD DC F'0' TRANSLATED BUFFER @V4075A2 00720600 LASTLINE DC F'0' LAST LINE IN TRANS BUFFER @V4075A2 00721100 TBUFFEND DC F'0' END OF TRANSLATED BUFFER @V4075A2 00721600 LASTHEX DC AL4(BUFF1+4088) LAST 8-BYTE LINE IN HEX BUFFER @VA04250 00724000 TYPEADD DC AL4(TYPEFLAG) DEVICE TYPE @VA04250 00725000 CONSADD DC AL4(CONSOLE) VIRT CONS ADDRESS @VA04250 00726000 BOUND DC F'1' DEFAULT STEP FOR SEARCH @V4075A2 00726500 CODE4 DC F'4' WARNING RETURN CODE @VA04250 00727000 CODE8 DC F'8' FATAL RETURN @VA04250 00728000 MATCHADD DS F INCORE ADDRESS OF MATCH @VA04250 00729000 MATCHRND DS F ROUNDED MATCH ADDRESS @VA04250 00730000 STRING DS F ADDRESS OF START OF 'STRING' @VA04250 00731000 STRNGEND DS F ADDR FIRST BLANK AFTER STRING @VA04250 00732000 FROM DS F REAL FROM ADD @VA04250 00733000 TO DS F REAL TO ADD @VA04250 00734000 START DS F INCORE FROM ADD @VA04250 00735000 STOP DS F INCORE TO ADD @VA04250 00736000 TRANSTAR DS F INCORE TRANSLATED FROM ADDRESS @VA04250 00737000 TRANSTOP DS F IN CORE TRANSLATED TO ADDRESS @VA04250 00738000 PAGEFROM DS F REAL PAGE START @VA04250 00739000 PAGESTRT DS F INCORE PAGE START @VA04250 00740000 COMPPTR DS F CURR PTR INTO THE TRANS BUFFER @V4075A2 00740500 OFFENDER DC X'000000FF' '0FF END OF DUMP' INDICATOR @VA04250 00741000 LASTPAGE DC XL4'FFFFFFFF' PREVIOUS TRANSLATED PAGE @VA04250 00742000 FOUR DC F'4' FOUR @VA04250 00743000 EIGHT DC F'8' EIGHT @VA04250 00744000 TWELVE DC F'12' TWELVE @VA04250 00745000 SIXTEEN DC F'16' SIXTEEN @VA04250 00746000 FORTY DC F'40' MAX FOR STRING MSG @VA04250 00747000 DEC4088 DC F'4088' 4088 @VA04250 00748000 FOURK DC F'4096' 4096 @VA04250 00749000 DEC8176 DC F'8176' 8176 @VA04250 00750000 EIGHTK DC F'8192' 8192 @VA04250 00751000 MASKS DS 5F MASKS @VA04250 00752000 ORG MASKS @VA04250 00753000 MASK DS F FILLER MASK @VA04250 00754000 MASK4 DS F LAST MASK @VA04250 00755000 MASK3 DS F MASK @VA04250 00756000 MASK2 DS F MASK @VA04250 00757000 MASK1 DS F FIRST MASK @VA04250 00758000 OUTPLIST DS 8D PLIST @VA04250 00759000 ORG OUTPLIST PLIST TO PASS TO FED OR FEX @VA04250 00760000 OUTPLCMD DS D COMMAND @VA04250 00761000 OUTPLADD DC CL8' ' ADDRESS @VA04250 00762000 OUTPLEN DS D LENGTH @VA04250 00763000 OUTPLFEN DS D FENCE @VA04250 00764000 X DC CL8'X' X COMMAND @VA04250 00765000 DISPLAY DC CL8'DISPLAY' DISPLAY COMMAND @VA04250 00766000 TEN DC CL8'10' LENGTH FOR 1 LINE TO FED @VA04250 00767000 TWENTY DC CL8'20' LENGTH FOR 2 @VA04250 00768000 FENCE DC XL8'FFFFFFFFFFFFFFFF' FENCE @VA04250 00769000 BLANKSW DC X'00' BLANK DETECTED YET? SW. @VA04250 00770000 * * * * * * * * ------- -------- -------- ------- * 00771000 * * * * * * * * MESSAGES 00772000 * * * * * * * * ------- -------- -------- ------- * 00773000 ERMSG715 DC C'DMMLOC715I NON-HEX CHARACTER IN STRING' @VA04250 00774000 E715L EQU *-ERMSG715 LENGTH @VA04250 00775000 ERMSG716 DC C'DMMLOC716I STRING ''' @VA04250 00776000 E716TEXT DC CL11''' NOT FOUND' TEXT @VA04250 00777000 E7T2 DC C' BEFORE END OF DUMP' @VA04250 00778000 ERMSG717 DC C'DMMLOC717I INVALID FORM OF LOCATE COMMAND' @VA04250 00779000 E717L EQU *-ERMSG717 LENGTH @VA04250 00780000 OUTMSG DS CL19 OUTAREA FOR VARIABLE LENGTH MSG @VA04250 00781000 OUTSTRNG DS CL61 REST OF OUTAREA @VA04250 00782000 * * * * * * * * ------- -------- -------- ------- * 00783000 * * * * * * * * EQUATES 00784000 * * * * * * * * ------- -------- -------- ------- * 00785000 ZMASK EQU X'0' MASK FOR CLM @VA04250 00786000 NULL EQU X'00' CLEAR REG @VA04250 00787000 ERASE EQU X'19' ERASE BYTE FOR CCW @VA04250 00788000 BLANK EQU X'40' BLANK SCANNER @VA04250 00789000 NOBLANK EQU X'40' BLANK SWITCHER @VA04250 00790000 YESBLANK EQU X'FF' HIT BLANKS IN STRING @VA04250 00791000 ASTERISK EQU X'5C' ASTERISK @VA04250 00792000 A EQU X'C1' A @VA04250 00793000 F EQU X'C6' F @VA04250 00794000 ZERO EQU X'F0' ZERO @VA04250 00795000 NINE EQU X'F9' NINE @VA04250 00796000 TYPER EQU X'FF' TYPEWRITER @VA04250 00797000 LOCRED EQU X'FF' READ BY LOCATE @VA04250 00798000 ON EQU X'FF' SWITCH STATUS @VA04250 00799000 ONE EQU 1 BOMP POINTER @VA04250 00800000 BIT EQU 1 BIT TO SET IN COMPARE MASK @VA04250 00801000 TRANAD EQU 2 TRANS ADDRESS @VA04250 00802000 BYTES EQU 4 FOUR BYTES TO A WORD @VA04250 00803000 WORDS EQU 4 4 WORDS TO A STRING @VA04250 00804000 ADRL EQU 4 LENGTH OF ADDRESS @VA04250 00805000 ADDR EQU 6 LENGTH OF ADDRESS IN PLIST @VA04250 00806000 WORD3 EQU 8 DISP TO THIRD WORD OF STRING @VA04250 00807000 LAST8L EQU 8 LENGTH LAST 8 IN TRANS BUFFER @VA04250 00808000 WORD4 EQU 12 DISP TO FOURTH WORD OF STRING @VA04250 00809000 SAVEDISP EQU 12 REGS IN SAVE AREA @VA04250 00810000 SAVREG15 EQU 16 REG 15 IN SAVE AREA @VA04250 00811000 PREBUFL EQU 16 LENGTH OF PRE BUFFER @V4075A2 00812500 P3 EQU 16 DISPLACEMENT OF THIRD PARM @VA04250 00813000 P4 EQU 24 DISP OF FOURTH PARM @VA04250 00814000 P5 EQU 32 DISP'MENT TO 5TH PARM - BOUNDARY @V4075A2 00814500 DEFAULT EQU 40 DEFAULT LENGTH @VA04250 00815000 TRYDIAG EQU 50 TRIES FOR DIAGNOSE @VA04250 00816000 TRANINL EQU 64 LENGTH OF INPUT TO TRANS @VA04250 00817000 LINEL EQU 80 LINE LENGTH @VA04250 00818000 TRANOUTL EQU 128 LENGTH OF A TRANSLATED BLOCK @VA04250 00819000 * * * * * * * * ------- -------- -------- ------- * 00820000 * * * * * * * * PATCH AREA 00821000 * * * * * * * * ------- -------- -------- ------- * 00822000 PATCH DC 50F'0' PATCH @VA04250 00823000 LTORG @VA04250 00824000 REGEQU @VA04250 00828000 END 00829000