Yeah, I have done this in the past somehow with that kind of cleverness, but
it looks like the fancy new three-operand ORG instruction is intended for
exactly this problem.

(*+7)/8 can't be right -- you are dividing * by 8 which can't be right --
but yes, I get the idea. 

Charles

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of Alan Atkinson
Sent: Sunday, November 27, 2016 5:21 PM
To: [email protected]
Subject: Re: Using ORG like CNOP

I'm doing this from memory - I can't face logging in. 
If I mess it up let me know and I'll pull one tomorrow from a listing.

IIRC something like org (*+7)/8 will do it.


Sent from my iPad

> On Nov 27, 2016, at 8:14 PM, Charles Mills <[email protected]> wrote:
> 
> I have a DSECT where I want to define a fullword such that the next 
> address after the fullword will be on a doubleword boundary. I would 
> like the alignment to be independent of the preceding alignment (be
change-proof).
> 
> CNOP 4,8 would do exactly what I want, but CNOP seems inappropriate in 
> non-executable code.
> 
> I naively coded ORG *,8,-4. As luck would have it the existing 
> alignment was six bytes into a doubleword and so that ended up effectively
being ORG *-2.
> 
> How do I use ORG to accomplish what I want? Can I use something like 
> what I coded but always have it ORG forwards and never backwards? I 
> could probably figure this out but hoped there was someone here who 
> knew the answer right off.
> 
> Or should I shut up and use CNOP: "If it ain't broke, don't fix it."
> 
> Charles 

Reply via email to