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