I gave this a little more thought. Here's a concrete code example where a
literal is clearer in meaning than an out-of-line constant. Consider
AHI R2,1 BUMP TO NEXT BYTE
Versus
A R2,BYTEBUMP BUMP TO NEXT BYTE
...
BYTEBUMP DC F'1'
Looking at the AHI there is no doubt in your mind what it does. Looking at
the A instruction leaves you wondering just what BYTEBUMP contains, and when
you find it, whether or not its value might be changed by some other
instruction. (Yes, you could solve the second flaw, but not the first, by
making BYTEBUMP an EQU and coding AHI R2,BYTEBUMP.)
I don't think the out-of-line approach gains any flexibility. We don't know
what function the increment is part of, but it seems unlikely that the
function could be changed to process some other form of input or output
simply by BLINDLY changing BYTEBUMP to 2.
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Charles Mills
Sent: Thursday, October 06, 2005 8:53 AM
To: [email protected]
Subject: Re: Order of Operands (was Re: JES2 Exit6 - Changing Class= Based
on PGM=)
> About 15 years ago I concluded that DSECTs, equates and defined constants
> are your friends when coding in Assembler.
Me too, except it was about 35 years ago. I think what you say is a
widely-held "good programming practices" manta. However, in the intervening
years, I have come to a different conclusion. Which is easier for your
successor - or you after your memory starts to fail :-) - to decipher:
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html