On 16 December 2015 at 11:55, Mark Boonie <[email protected]> wrote:
> Is it possible to branch to a location in low storage (say, location x'1234') 
> using a relative-branch instruction where the target is a symbol defined in a 
> DSECT for which a USING is established at location 0?  If so, I can't seem to 
> discover the proper incantation.  Any ideas?  Thanks.

Generally it's not possible for a couple of reasons. First, because
it's unlikely that your program, i.e. your relative-branch
instruction, will be loaded within relative-branch range of low
storage. This is  +-64kB for 16-bit displacement branch (BRC). But for
long displacement branch (BRCL), this is unlikely to be a problem
(+-4GB range).

So second, the assembler and Binder have no knowledge of where your
program will be loaded at run time. While it is possible to generate a
relative-branch relocation entry in the ESD, I'm not aware of any
facility to have the Binder and IEWFETCH resolve this offset to a
fixed low-storage address at run time. But it is conceptually
possible, and there may indeed be such an incantation. (I see from a
later update that you are running on TPF. I know nothing about Binding
on that OS, but I have strong doubts that it supports this kind of
binding and program loading any more than z/OS.)

It must surely be rare to have a routine itself at a fixed,
low-storage location above the X'1000' mark. You're sure it's not the
address of a routine? There are any number of simple two instruction
sequences that can accomplish what you want, but they would use a
"normal" base-displacement branch.

Tony H.

Reply via email to