This isn't strictly baseless, but assuming that you return from the CALL
to the address in R14:

        CALL    SOMEFUNC
        USING   *,14
        B       JUMPTABLE(15)
        DROP    14
JUMPTABLE DS    0H
        J       RC0
        J       RC4
        J       RC8
        J       RC12

-----Original Message-----
From: IBM Mainframe Assembler List
[mailto:[email protected]] On Behalf Of McKown, John
Sent: Friday, October 29, 2010 10:05 AM
To: [email protected]
Subject: Re: Modernizing code

The one place where I have found that I cannot replace a branch with a
branch relative is in a construct based on a return code:

        CALL    SOMEFUNC
        B       *+4(15)
        J       RC0
        J       RC4
        J       RC8
        J       RC12

and so on. The closest I can  come, in baseless code, is:

        CALL    SOMEFUNC
        LARL    R10,JUMPTABLE
        ALR     R10,R15
        L       R10,0(,R10)
        BR      R10
JUMPTABLE DS 0F
        DC      A(RC0,RC4,RC8,RC12)

And if I understand it correctly, this will perform poorly due to
Address Generation Interlock.


This e-mail transmission contains information that is confidential and may be 
privileged.   It is intended only for the addressee(s) named above. If you 
receive this e-mail in error, please do not read, copy or disseminate it in any 
manner. If you are not the intended recipient, any disclosure, copying, 
distribution or use of the contents of this information is prohibited. Please 
reply to the message immediately by informing the sender that the message was 
misdirected. After replying, please erase it from your computer system. Your 
assistance in correcting this error is appreciated.

Reply via email to