Normally programs have a static area which requires addressability. so using literals doesn't hurt. Relative addressing allows you to avoid using base registers for code.
In your case you would need to use OPSYN for L and look for a literal operand, and change it..And instead of LRL why not use IILF and avoid the literal altogether? You could use OPSYN to unconditionally change LAE to LAEY.at the cost of 2 bytes. On Mon, 26 Aug 2024 15:50:10 +0000 Richard Zierdt <[email protected]> wrote: :>Writing code using relative addressing, as much as reasonably possible. :>Problem: some IBM macros, e.g., ATTACH(X) and STORAGE, generate L and LA(E) instructions instead of, e.g., LRL and LA(E)Y. :> :>STORAGE OBTAIN, :> Length=(0), :> Loc=(31,31) :>generates this instruction :> L 15,=AL1(B'00000000',(0*16),(0),B'01110110') :>requiring a base register :>instead of, e.g., :> LRL 15,=AL1(B'00000000',(0*16),(0),B'01110110') :>(Load Relative Long) which does not. :> :>ATTACHX EP=SUBTASK :>generates :> LAE 15,IHB0098 SET UP LIST ADDRESS :>instead of :> LAEY 15,IHB0098 SET UP LIST ADDRESS :> :>Temporary base-displacement addressing can be established prior to issuing these macros, but that defeats the purpose of relative addressing. :> :>These macros are included: :> SYSSTATE ARCHLVL=2 Support for relative addressing :> IEABRCX DEFINE :> IEABRCX ENABLE Change base-displacement to relative :>but apply to branch instructions, not load. :> :>Any perspectives would be helpful, either with an alternative solution, or that, like taxes, you live with it. :>Thanks :>Richard Zierdt :> :>Confidentiality Warning/Avertissement de confidentialité: :> :>This message is intended only for the named recipients. This message may contain information that is privileged or confidential. If you are not the named recipient, its employee or its agent, please notify us immediately and permanently destroy this message and any copies you may have. Ce message est destiné uniquement aux destinataires dûment nommés. Il peut contenir de l'information privilégiée ou confidentielle. Si vous n'êtes pas le destinataire dûment nommé, son employé ou son mandataire, veuillez nous aviser sans tarder et supprimer ce message ainsi que toute copie qui peut en avoir été faite. :> :>---------------------------------------------------------------------- :>For IBM-MAIN subscribe / signoff / archive access instructions, :>send email to [email protected] with the message: INFO IBM-MAIN -- Binyamin Dissen <[email protected]> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
