On Mon, 6 Nov 2006 13:37:50 +0100, Chris Mason <[EMAIL PROTECTED]> wrote:
>I was commenting on the following instruction: > > MVC M1CC-1(L'M1CC+1),=X'402120202020' MOVE IN EDIT MASK > >I will now make my point "in words of one syllable" so it cannot be >misunderstood. Now there's a challenge. Unnecessary personal attack > >The task is to move a 6-character string into a storage area.... > >What I am taking issue with is going to the trouble of using a symbolic >expression for the length. That is, the use of the length attribute - albeit >modified because of the fancy footwork with the starting location - when the >instruction contains a literal which necessarily indicates the length. Are you saying that the assembler should be using the length of the literal for the length to move? Perhaps it would be nice if the assembler would flag the statement (as a warning) if the length that was used didn't match the literal. Would you have objected to the use of the length attribute if M1CC was a 6 byte field and it was coded as follows? MVC M1CC,=X'402120202020' MOVE IN EDIT MASK >And, >being a literal, it would be crass stupidity to be relying on data in a >following field in the case that the length used by the instruction didn't >precisely match the length of the literal. Maybe you'll think I'm stupid too. I've read the last sentence five times and I still don't understand what you're trying to say. >Sure, the Assembler uses the >length of the first operand if it is not specified explicitly but that's >not what I consider stupid. What I consider stupid is that the number 6, >consisting of one simple character, was not specified but something which >the Assembler has to work out is 6, consisting of 8 complicated characters. 8 complicated characters? L'M1CC+1? Complicated? Not to an assembler programmer. Indeed, I think it is as clear as can be, especially given the context of M1CC-1(L'M1CC+1). To me, the use of the length attribute is far preferable. >I'm not complaining on behalf of the Assembler, of course, but on behalf of >anyone looking at the source coding in times to come who will be slowed down >trying to work out what subtle benefit there might be in using "the length >attribute of M1CC + 1" rather than simply specifying "6". There is no >benefit; it's just stupid. I disagree. It is not stupid at all. I say that as someone who has recently had to modify some similar code to convert larger values to hex. Tom Marchant ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

