Language for the ages
Chuck Guzis
cclist at sydex.com
Thu Oct 20 07:38:59 CDT 2005
On 10/20/2005 at 11:10 AM David Cantrell wrote:
>> PSHR R2 ; Push R2 onto the stack
>> MVII 10,R1 ; Move 10 to R1
>Grargh! When I wrote our coding guidelines at work, I made it very
>clear that comments shuold describe the algorithm, not just each line of
>code. So, for example, instead of "Push R2 onto the stack" it would say
>"squirrel R2 away because it's gonna get clobbered in a minute and we'll
>need it again", followed later by "retrieve the value we saved earlier,
>so that now we can ...".
...or "I'm saving all of the registers by habit because I've been burned
too many times when I forgot to save one. Besides, what's a few wasted
cycles between friends?"
Anyone recognize the system for which the above assembly code is written?
Cheers,
Chuck
More information about the cctalk
mailing list