Not sure I agree with the "coding the macro easier" comment.  IMO, it is
more likely that rather than add a label using &SYSNDX for a short jump,
they can take the time to calculate the offset (if there isn't a
preprocessor that does it for them) and change it if the code changes.

I was going to say something about adding another entry in the symbol table
but who cares :-).

MARK HAMMACK

[email protected]
214-478-0955
K2MLH

On Thu, Jul 2, 2015 at 3:21 PM, Dougie Lawson <[email protected]> wrote:

> What's the point?
>
> You've got a fully fledged assembler, why not give the DS 0H a sensible
> label and use that in the BO command? (Although these days I'd be using a
> relative branch JO rather than a base/displacement branch.)
>
> I'd consider what you're proposing as decidedly evil.
>
> IBM macros tended to use * with a positive offset because it made coding
> the macro easier, but in open code it's not going to make things any easier
> to read and it's going to be a monster pain in the tail when you add
> something between the branch and the load instruction that follows it.
>
> Of course, when it's assembled to machine code it doesn't make much
> difference.
>
> Regards, Dougie.
>
> On 2 July 2015 at 20:59, zMan <[email protected]> wrote:
>
> > I was raised to do single-instruction branches thus:
> >         TM   FLAG,BIT               Is the flag bit set?
> >         BO    *+8                        Yes, skip next instruction
> >         L      R15,SOMEVAL        No, get the value
> > *+8   DS    0H
> >
> > Yes, of course I realize that the "DS 0H" is meaningless, but it helps
> > readability.
> >
> > My question is whether folks see this as:
> > - useful
> > - common
> > - overly clever
> > - evil
> > ...or what?
> >
> > I've often wished for an assembly option that would note "*+n" branches
> and
> > warn if they were not skipping one instruction (and doing so *exactly*!).
> > --
> > zMan -- "I've got a mainframe and I'm not afraid to use it"
> >
>
>
>
> --
> http://twitter.com/DougieLawson
>

Reply via email to