On Tue, 17 Feb 2026 12:24:55 -0500, David Clark <[email protected]> wrote:
>USING TXTSINPT,R10 <== for scripting mode
>USING TXTINPT,TXTSINPT+2 <== for legacy mode
>
>However, both USINGs cannot be active in the same run, because the actual
>address in R10 has to always refer to the beginning of the TXTINPT legacy
>input string parameter. Even in scripting mode, the legacy code for the
>existing functions still need to use A000 and A002 displacements.
The second USING is called a "dependent using" which is documented in HLASM.
How you use it depends upon your needs, design and code. I can't tell you how
you must use it. Instead, let's consider a simple example.
USING AA,R10 establish register association
do some stuff
PUSH USING
USING BB,AA_DATA
do some stuff with AA and BB
POP USING BB is no longer available
PUSH USING
USING CC,AA_DATA
do some stuff with AA and CC
POP USING CC is no longer available
The dependent using is some sort of offset into AA. How this works into your
design is up to you. You could leave BB and CC active at the same time but the
assembler won't issue errors when the data is incorrectly referenced.