My Apologies .... Clicked send before I was done ...

SELECT BRXH R15,R15,NZ
    WHEN (16)
       something ..
     WHEN (8)
        something ..
  ENDSEL ,

If so desired, you could have IF statements with your WHEN ... e.g. let's say 
you want to check for a reason code of 200 in R0 ..

   WHEN (4)
        IF (CHI,R0,EQ,200)
             something
        ENDIF , (or, ELSEIF for another IF)
________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Jim 
Thomas <j...@thethomasresidence.us>
Sent: Sunday, June 9, 2024 2:33 PM
To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU>
Subject: Re: BXLE instruction

Seymour,

I'd use a SELECT rather than an IF (since you're looking for more than one 
possibility) but ... none the less (and using branch relative) ...

BRXH R15,R15,non_zero ....
Continue for R15 = zero ..

Kind Regards
Jim Thomas
________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Seymour J Metz <sme...@gmu.edu>
Sent: Sunday, June 9, 2024 1:25 PM
To: IBM-MAIN@LISTSERV.UA.EDU <IBM-MAIN@LISTSERV.UA.EDU>
Subject: Fw: BXLE instruction

I meant to repost this last year but it slipped through the cracks. If anyone 
can help Bill with his registration issue I'd appreciate it. Also, if anybody 
has a machine-readable copy of the TR I'd love to see it.

The trick in question relies on the use of the same odd register as the R1 and 
R3 in BXH,  BXHG, BXLE, BXLEG, JXH, JXHG, JXLE and JXLEG. You can only test 30 
consecutive bits with the 32-bit version and 62 with the 64-bit version; the 
high and low bits should be zero. The code, arbitrarily picking GR 1 as the odd 
register, looks something like:

         L     R1,STATUS
         IF    (BXH,R15,r15)
             action 1
         ENDIF
         ...
         IF    (BXH,R15,r15)
             action 30
         ENDIF
        ...
STATUS   DC    A.1(0,flag1,...,flag31,0)

Where the test is a BXH or BXLE depending on which way you want to test.

If you have to work it out with pencil and paper in order to understand what's 
going on, welcome to the club. I thought that it was slick the first time I saw 
it, and I still  think so. I think it would be a good example in PoOps.

--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר
________________________________________
From: William Collier <wwcollie...@gmail.com>
Sent: Wednesday, November 2, 2022 11:27 AM
To: Seymour J Metz
Subject: BXLE instruction


To:  Seymour J Metz <sme...@gmu.edu<mailto:sme...@gmu.edu>>

Hi,

  Last night I enjoyed reading your comment on the IBM-MAIN
listserv:

The slickest thing that I saw in OS/360 was code testing
successive bits using BXH and BXLE.

  I would like to respond with the note below.  I have followed
(I believe) all the directions for creating a password in order
to be allowed to post a note responding to your note.  It hasn't
worked (yet).  Would you, in the interest of timeliness, be
willing to post the note below on my behalf?  If not, that's OK.
I will figure it out.

    Bill Collier

==============================

Re: End of several eras

  Back in 1965 IBM Poughkeepsie our job was to write an operating
system for System/360 which would fit into 1K bytes (sic) of an
8k byte machine.  I figured out how to use a BXLE instruction to
both test and advance a bit string in a register.  It saved us
maybe 30-some bytes.  I described this in IBM TR 00.1412-1, June
22, 1966.  Thank you, Seymour Metz, for your note reminding us of
the fun we had in those days.

  Bill Collier
  coll...@acm.org<mailto:coll...@acm.org>


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to