EX is indeed expensive, but my guess (untested) is that an EXecuted MVC for 
small lengths (not only under 256 but even less) is probably still more 
efficient than MVCL for those lengths, and *definitely* more efficient than 
MVCLE.  My prior experiences in replacing MVCL/CLCL's with multiple MVC/CLC's 
and even MVC/CLC loops for "small" areas (FSVO "small") is that MVCL/CLCL loses 
almost every time.

Somebody oughtta test that theory and publish a table of "break" points (by 
machine type) at which the more "complex" instructions become "better", and 
below which you should stick with the "old-fashioned" way to do it.  I'd do it 
but there seems to be a very serious lack of available round tuits for 
"interesting" work in my life lately.  There is far too much "required" stuff 
in the queue ahead of "interesting".

Just my USD$0.02 worth.

Peter

> -----Original Message-----
> From: IBM Mainframe Assembler List [mailto:ASSEMBLER-
> [email protected]] On Behalf Of McKown, John
> Sent: Thursday, January 12, 2012 10:32 AM
> To: [email protected]
> Subject: How bad is the EX instruction?
>
> OK, I hope I'm not becoming wearisome with my yammering. But I am not too
> busy right now. And I still really like and respect the z architecture
> (despite its horrendous price).
>
> I ask about the CPU cost of an EX because that same program that I'm
> working on uses the EX a fair amount to move "variable length" strings
> into a blank-initialized area for reporting purposes. Instead of EX of an
> MVC, I could use MVCL or MVCLE. But many have said that EX of an MVC is
> less overhead than MVCL in many cases. Especially since I know that my
> length is always no more than 255 characters. I check and report an error
> if the length is 256 or more.
>
> As an aside, to whomever it was who recommended the TROO as a way to move
> bytes from an input area to an output area, while testing for
> "unprintable" bytes - thanks! It made my code much easier to write and
> understand. I was going to use a TRT and an EX'd MVC in a loop. A TROO in
> a loop was super easy to code.
--


This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

Reply via email to