How about stating it this way:  "Comments describe what you, the programmer, 
originally intended that the instructions do."
I have seen a comment like this:
       LA       R1,5          Put 5 into R1

I have also seen plenty of statements like this:
       LA       R1,5          [no comment at all]

I prefer to write something like this:
[First comes a line of two describing the overall function of the next several 
instructions.]
* Multiply the number of thinges per widget to obtain the total number of * * 
thingies in all the widgets.
       LA       R1,5         Get the number of thingies per widget
.......MR       R0,R2        Get total number of thingies in all widgets
Blah blah blah whatever etc.

Bill Fairchild
Rocket Software

-----Original Message-----
From: IBM Mainframe Assembler List [mailto:[email protected]] On 
Behalf Of McKown, John
Sent: Thursday, September 09, 2010 9:22 AM
To: [email protected]
Subject: Re: instruction set architecture

Total agreement! Comments are not to explain what the instructions __do__. The 
instructions do what they do. If that is desired, just have a "pointer" to the 
Principles of Operation. The comments should explain what is desired and 
perhaps the algorithm. The reader can then evaluate if the instructions 
actually accomplish the objective or do so efficiently.

Reply via email to