Whoops! Thanks for catching that.

--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר

________________________________________
From: IBM Mainframe Assembler List <[email protected]> on behalf 
of Peter Vels <[email protected]>
Sent: Wednesday, June 5, 2024 5:17 PM
To: [email protected]
Subject: Re: BXLE usage assistance

Hi Shmuel,

Your code is much better than mine (thanks!), however, you still need

LA    R7,2(R7)

to skip past the length field in the LOOP.  R8 contains the correct length,
but doesn't cater for the length field itself.

CHKOPTS1 LA    R7,TABLE1+2
         LA    R9,TABLE1+2
         AH    R9,TABLE1

LOOP1    LH    R8,0(R7)
         CLC   2(9,R7),=C'FFFFFFFFF'
         JE    FOUND
         LA    R7,2(R7)
         BXLE  R7,R8,LOOP1

Peter

On Thu, 6 Jun 2024 at 03:23, Seymour J Metz <[email protected]> wrote:

> Yes, 2(9,R7) or a symbol in the DSECT following the length field. There's
> probably processing code that has to be adjusted as well.
> ________________________________________
> From: IBM Mainframe Assembler List <[email protected]> on
> behalf of Gary Weinhold <[email protected]>
>
> I believe the CLC would be CLC 2(9,R7) although in actual code it would
> probably be executed with Rn containing R8 - 1.
>
> On 2024-06-05 11:02 a.m., Seymour J Metz wrote:
> >
> > What's wrong with
> >
> > CHKOPTS1 LA    R7,TABLE1+2             ADDRESS OF FIRST ELEMENT
> >           LA    R9,TABLE1+2             ADDRESS OF BEGINNING OF TABLE
> >           AH    R9,TABLE1               CALC ADDR OF END OF TABLE
> >
> > LOOP1   LH    R8,0(R7)                 entry length for BXLE
> >           CLC   0(9,R7),=C'FFFFFFFFF'
> >           JE    FOUND                   ENTRY FOUND = RC=0
> >           BXLE  R7,R8,LOOP1             LOOPING UNTIL OPT FOUND
> >
>
>
>

Reply via email to