On Fri, Feb 10, 2012 at 7:01 PM, Bill Fairchild
<bfairch...@rocketsoftware.com> wrote:

> E.g., if I need to put "14" in a register I might code
> "FOURTEEN EQU 14"
>      L   R4,=A(FOURTEEN)
>
> But if I code this
>     L   R4,=A(14)
> And I want to find the instruction which puts 14 into R4 and I do that with a 
> find command, then I will also find all instructions involving "R14", which 
> would likely produce far too many to skip over.

Everyone's needs are different. I rarely find myself search for the
instructions that use the number 14. More often I want to see where a
register is modified or used, so it's helpful to code R4 rather than
4. But both are in the HLASM cross reference.

When I see an EQU like  TABLESIZE EQU 14  then that suggests that you
could change the table size through just a change of the value and
would hope that all dependent values are computed from this. It's far
less helpful to see this
TABLE DS 0F
 DC ...
 DC ..
 ..
TABLESIZE EQU 14

One of my predecessors liked fancy constant expressions like  LA
R1,8+4+6+12-2 which may have been obvious the first minutes after he
wrote it...  helpful comment in this case was  "load length in R1"

PS In my "programming quality metrics" I frown upon duplicated
comments (so the same remark multiple times in a module). Either they
are trivial and describe the instruction rather than its purpose, or
it's copied code where the programmer did not bother to change the
comment accordingly...

Rob

Reply via email to