Oops.  Don't you mean "MVC OUTBUF+1(L'OUTBUFF-1),OUTBUF"?  I'm sure you
don't want to zap the byte immediately after OUTBUF.  What is "MVC2",
another MACRO?  Why not just code the literal move "MVC OUTBUF,
=(L'OUTBUF)'this is a sample'" like it's been done for the past 40 years?
Why is there no LTORG statement in the sample?  For good practice one should
always be there.  Once another CSECT is added to the program, the coder is
in for a surprise.

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of Martin Truebner
Sent: Friday, December 09, 2011 4:50 AM
To: [email protected]
Subject: Re: ASM Program to copy a file

Rob,

I felt bad about posting it...it does waste storage under a baseregister
(which is still in most cases 4K)

Much better is the MACRO-way by Ed.J (and some extra code)

like this:

         MVI OUTBUF,C' '
         MVC OUTBUF+1(L'OUTBUF),OUTBUF
         MVC2 OUTBUF,=C'this is a sample'

Wastes instructions (but we are not into this any more), and space in
"procedure division" - (not covered by a base anyway).

>> ... Martin does not use it as often as he should (the second "="
>> should not be
there... )

For the quick and dirty I do - but the ones to be shown use either above
technique or use a next available byte point (with appropriate clearing if
required).

--
Martin

Pi_cap_CPU - all you ever need around MWLC/SCRT/CMT in z/VSE more at
http://www.picapcpu.de

Reply via email to