In <a6cf87cbc0b60a459cb79af044a096db2227dc9...@mailccr.us.syncsort.com>, on 05/08/2013 at 08:34 PM, "Blaicher, Christopher Y." <cblaic...@syncsort.com> said:
>Item of note, unless you are working with all your own code, you >have to validate the value in R15 before just using it to branch >into a branch table with tests that the value is within limits and > the lower 2 bits are not on. Such as: What architecture level are you assuming? > BALR r14,r15 Call your routine > LR R14,R15 DON'T DISTROY R15 > CHI R15,16 CHECK HIGH LIMIT > JH BADRETURN TOO BIG? DIE WITH MESSAGE > N R14,=XL4'00000003' ANY STRAY BITS? > JNZ BADRETURN YES, DIE WITH MESSAGE > B *+4(R15) BRANCH ACCORDING TO RC BALR r14,r15 Call your routine CHI R15,16 CHECK HIGH LIMIT JH BADRETURN TOO BIG? DIE WITH MESSAGE TMLL R15,XL2'3' ANY STRAY BITS? JNZ BADRETURN YES, DIE WITH MESSAGE B *+4(R15) BRANCH ACCORDING TO RC -- Shmuel (Seymour J.) Metz, SysProg and JOAT Atid/2 <http://patriot.net/~shmuel> We don't care. We don't have to care, we're Congress. (S877: The Shut up and Eat Your spam act of 2003) ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN