Thanks all. I don't find any of the solutions totally obvious ("intuitive,"
simple to grasp) but I do have to agree with @Gil that "taking it one step
at a time" with a series of DS's comes closer to obvious.
I took Gil's solution and commented it with the potential offsets relative
to 8 of the location counter following each instruction, and it seems to do
the job.
* Initial 0 1 2 3 4 5 6 7
DS 1F 4 8 8 8 8 12 12 12
DS 0D 8 8 8 8 8 16 16 16
ORG *-4 4 4 4 4 4 12 12 12
But I do want to thank @Jonathan who did answer exactly the question I did
ask.
@Gil, the "new-fangled ORG" supports alignment to 5 or another "odd"
(strange!) boundary, but the offset must be relative to a power of 2. (You
can't effectively CNOP 2,5 but you can CNOP 5,8 or 5,16 etc.)
Charles
-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]]
On Behalf Of Paul Gilmartin
Sent: Monday, November 28, 2016 6:33 AM
To: [email protected]
Subject: Re: Using ORG like CNOP
On 2016-11-28, at 06:46, [email protected] wrote:
> Ds 0d is sufficient in data area.
>
But it doesn't leave room for the fullword.
On 2016-11-28, at 06:39, Jonathan Scott wrote:
>
>
> Here's a general solution which I mentioned on this list earlier this
> year (in the thread "Friday Puzzle: CNOP 1,2"), which shows how to use
> ORG for the general case:
>
> MACRO
> &LABEL ALIGN &BOUNDARY,&OFFSET
> ORG *+&BOUNDARY-(&OFFSET),&BOUNDARY,&OFFSET-(&BOUNDARY)
> &LABEL DS 0X
> MEND ,
>
> Note that unlike CNOP this macro expects boundary first then offset,
> but you can of course invent your own macro the other way round. In
> many cases, the ORG can be simplified a little, but this rather
> complicated form works even when the current location counter is less
> than the specified offset from the start of the section or LOCTR.
>
Does a transitory negative offset from LOCCTR cause problems?
Even if no code is generated there?
But I'll persist in preferring my:
DS 1F
DS 0D
ORG *-4
o Fewer keystrokes
o Easier (for me) to understand.
But does the new-fangled ORG support something really fancy, such as
alignment to a multiple of 5 bytes?
-- gil