I noticed the new COBOL compiler was generating: MVHHI target,0 MVHHI target+2,48000
instead of: MVC target,=F'48000' and I thought I'd look into using 2 MVHHI's instead of a MVC with a literal even when the top half of the value is non-zero. The assembler happily accepts: MVHHI target+2,C'abcd' truncating the leading 'ab', but I gave up since I could not determine how to consistently obtain the top half of the value when it is a general (resolvable at assembly) expression, except by doing: MVHHI target,0 ORG *-2 DC A(expression) ORG *-2 MVHHI target+2,expression HLASM need logical shift operations to avoid requiring ORG/DC/ORG in the generate code. Robert Ngan -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of Paul Gilmartin Sent: Wednesday, March 01, 2017 11:54 To: [email protected] Subject: Re: HLASM anomaly On 2017-03-01, at 10:00, Charles Mills wrote: > For sure! It's not a problem I lose sleep over -- perhaps because my > primary language is now C++, no longer assembler. > > I don't recall ever thinking about the issue until it came up on this list. > > I'm a "design elegance" guy. It would please me if there were a single > expression processor such that the syntax of immediate operands and of > DC's of the same length were the same. > What lengths do you want? There are: DC AL1(expression) 1 byte; unsigned DC Y(expression) 2 bytes; signed DC A(expression) 4 bytes; signed Does HLASM issue any operand range warnings for any of LLI[HL][FHL]? Is this implied by the PoOps "The condition code is unchanged." Or, does HLASM simply ignore bits 0-15 of the immediate operand expression? Is this documented? -- gil CSC - This is a PRIVATE message - If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind the Company to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose.
