The late-model assembler is vastly superior to previous editions, but there's 
always room for improvement.

In this particular case of MVC, the assembler, if it were so designed, could 
assume the length of the source in

    MVC   Target(),=C'A literal'

This would be no different than

    MVC   Target(L'Source),Source
   . . .
Source  DC   C'A literal'

except that the first is less cumbersome to code.

The first case currently causes an assembly error, so an "upgrade" is possible 
without affecting existing programs.
[MVC  0(,R8),=C'A literal"  does not cause an error, so this specification 
could not changed without some other indications.]

The danger in either case is that there's no length checking between the Target 
and Source. The code, in either case, can "run off the end of the page."  Use 
of labeled fields does not buy such protection.

Now perhaps the assembler could make some attempt to check the lengths (there's 
an improvement), but avoiding literals does not alleviate that danger.

As applications move away from assembly language, one of the reasons cited is 
the (perceived, at least) difficulty in writing assembly-language programs.
As good as the assembler is, this anxiety could be reduced if the assembler 
were more "user friendly."
There is room for improvement.

Richard Zierdt

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of [email protected]
Sent: Wednesday, May 16, 2012 12:37 PM
To: [email protected]
Subject: Re: OT? Assembler "enhancements"?

On Wed May 16 16:26:58 2012 [email protected] wrote:

> But most of all would be some way to imply the length of the second
> operand on SS format instructions. I cant begin to imagine how much
> time I have spent counting the length of some second operand and
> having to manually code its length in the first operand. This is time
> consuming and error prone and should be done by the Assembler.

Well the reason it's not is to stop people from trying to stuff 10 pounds of 
data in a 5 pound bag. The length, if not specified explictly, has to be the 
length of the receiving field. And this has its problems too when you run off 
the end of the page or move garbage because the receiving field is shorter than 
the sending field. Bottom line, you really should be s pecifying lengths 
explicitly and it's very easy to do. And you shouldn't be using literals in 
code.

What about something like this (sorry for any line wrap):

PRINTLINE  DS CL133

SOME-FIELD DS 8

           .
           .
           MVI  PRINTLINE,X'40'         SET FIRST CHAR BLANK
           MVC  PRINTLINE+1(L'PRINTLINE-1),PRINTLINE BLANK REMAINDER OF 
PRINTLINE

           MVC  PRINTLINE(L'SOME-FIELD),SOME-FIELD    MOVE THE RIGHT LENGTH!


As far as the original post goes, call me easy to please, but I have been 
coding in assembler since MFT (and this is not bragging on this list because I 
know guys older and more experienced than I hang out here) and I really don't 
have anything that bothers me enough to file and RFE on the assembler. If 
anything it has more than enough good stuff and very little bad.

Reply via email to