On Fri, Jan 15, 2021 at 12:34 PM Mark Henderson <[email protected]>
wrote:

> Hey Paul,
>
> Thanks for your suggestion. IEABRCX solves a part of the problem by
> dealing with the branching aspect of the macro and I'm already using it.
> Right now I've R2 set as a temporary base and, to highlight the problem,
> here's those parts of the expansion of a GETHOSTNAME that need it to
> assemble cleanly:
> 01DC 4100 20DC               00000298    740+         LA    0,E$H10008
>      Set up command                        01-EZA
> 023A D203 F000 20D8 00000000 00000294    778+         MVC
>  0(4,15),E$R20008    Move -1 to field                     01-EZA
> 0240 58F0 20D8               00000294    779+         L     15,E$R20008
>     Set R15 to -1                    @03A 01-EZA
> 0244 D203 E000 20D4 00000000 00000290    780+         MVC
>  0(4,14),E$R10008    Move error number to field           01-EZA
> 01DC 4100 20DC               00000298    740+         LA    0,E$H10008
>      Set up command                        01-EZA
> 0290 0000277E                            809+E$R10008 DC    F'10110'
>                                            01-EZA
> 0294 FFFFFFFF                            810+E$R20008 DC    F'-1'
>                                           01-EZA
> 0298 0008                                811+E$H10008 DC    H'08'
>                                           01-EZA
> I'd really like to get away from having to set the temporary base but
> don't see an easy answer.
> Cheers, Mark.
>

I  do that quite often when a macro doesn't support R&I instructions.
Something like:

        BASR R2,0
        USING R2,*
        somemacro
        J          AROUNDx
        LTORG *
AROUNDx DS  0H
        DROP R2

The use of the LTORG is to make sure that any literals that might be used
are within the range of the using. This is because my R&I (baseless)
programs can be quite large. "Nobody will need a CSECT larger than 4K" is
right up there with "Nobody will ever need more that 64K". But I don't have
anything as big as IGDZILLA. Yet.

Reply via email to