Jonathan,

OK so where I currently have coded the following (where STR_RETN is a
negative offset equate):

IF    TXTREQU,NE,REQU_SCRIPTED   IF NOT SCRIPTING MODE
 MVI  TXTRETN,STR_NFND    INITIAL SETTING FOR "NOT FOUND"
ELSE
 MVIY STR_RETN,S_STR_NFND INITIAL SETTING FOR "NOT FOUND"
ENDIF


Are you saying that I can remove the negative offset equates and just
specify the following?

IF    TXTREQU,NE,REQU_SCRIPTED   IF NOT SCRIPTING MODE      <== R8 base+0
 MVI  TXTRETN,STR_NFND    INITIAL SETTING FOR "NOT FOUND"   <== R8 base+1
ELSE
 MVIY TXTSRETN,S_STR_NFND INITIAL SETTING FOR "NOT FOUND"   <== R10 base-1
ENDIF


Sincerely,

Dave Clark
--
int.ext: 91078
direct: (937) 531-6378
home: (937) 751-3300

Winsupply Group Services
3110 Kettering Boulevard
Dayton, Ohio  45439  USA
(937) 294-5331


On Tue, Feb 17, 2026 at 9:34 AM Jonathan Scott <
[email protected]> wrote:

> Instructions which use a long displacement, such as CLIY, MVIY and LAY,
> can refer directly to fields which have a negative displacement from the
> base register, in a similar way to your proposed use of fields with
> negative offsets.  If you find that the scripting prefix is present on
> entry, you can then save some internal indicator that this has been done
> (or merely use the fact that the base register is no longer equal to the
> pointer from which it was loaded) and adjust the base register past the
> prefix.  In either case you can then issue a USING for the base register
> with the start of the legacy string parameters (for which I've moved the
> name TXTINPT below) to process as for the legacy case.  If you know (from
> the saved indicator) that the scripting parameters are present, you can
> then reference them directly provided that you use long-displacement
> instructions.  So your revised DSECT would be something like the following.
>
> TXTSINPT  DSECT        PARAMETERS WITH SCRIPTING PREFIX
> TXTSREQU DS    CL1   SCRIPTING REQUEST CODE
> TXTSRETN DS    CL1   SCRIPTING RETURN CODE
> TXTINPT  DS    0H     LEGACY STRING PARAMETERS
> TXTSTRL  DS    H      LEGACY INPUT/OUTPUT STRING LENGTH
> TXTSTRG  DS    256CL1  LEGACY INPUT/OUTPUT STRING
>
> Jonathan Scott
>

Reply via email to