If you are running "sometimes" on older hardware I think you have a greater 
risk from unsupported z/OS than from unsupported instructions.

I'm not sure, but I think that IILF came along no later than the zEC12. Any 
machine older than the zEC12 only supports z/OS V2R2 and below. V2R2 went out 
of service almost four years ago. If you are running a current z/OS it won't 
run on older hardware.

I also think you are at greater risk of encountering unsupported instructions 
in optimized COBOL 6 code than in hand-built assembler.

And I would never, ever embed data in the instruction stream.

Charles


-----Original Message-----
From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On 
Behalf Of Jon Perryman
Sent: Sunday, April 14, 2024 11:09 PM
To: ASSEMBLER-LIST@LISTSERV.UGA.EDU
Subject: Re: Complex immediate fields

> On current hardware there is an IILF (LFI) instruction, and I would like to
>> use it instead of the XR/ICM sequence. 

Before using any modern instructions, ask yourself if they are worth the risk. 
Does your disaster recovery site guarantee this as a minimum machine level. 
Maybe your employer has older machines available in case of capacity problems. 
How about company acquisition. You need to consider the impact.

>Back in he Assembler XF era I would code something like
>         LA    R0,L'DEST
>         LA    R1,DEST
>         XR    R15,R15
>         ICM   R15,8,=C' '
>         MVCL  R0,R14 

Why use LFI when better alternatives for ICM =C' ' have been around forever. 
    J bydata
data   dc     A(X'40000000',0,L'dest)
bydata LM R15,R1,data 

Since the J instruction only updates the PSW, I'm guessing it will replace the 
update PSW in the previous instruction thus making this a single instruction on 
current hardware but still compatible with older hardware.

Alternatively, there is the NILH instruction which has existed for a couple 
decades.

Reply via email to