Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/06/05 04:25
Read: times


 
#104744 - Yes they are Comments
Responding to: ???'s previous message
Erik Malund said:
that is not comments, that is "explanations".

If anyone need a comment like
mov b,#64h ; Mply by 100
mul ab
they should not even attempt to look at this.

Why not? Use of comment is to explain...
Erik Malund said:

It is quite common to call things like the above "comments" they are not.

Yes they are. The comment is for that perticular instruction only.
We usually write code as follows
-----------------------------------------------------------
Label---Mnemonic---Opcode---Operand---Comment
-----------------------------------------------------------
Here the comment is the explanation for that perticular instruction.
Erik Malund said:
A comment explain what the routoine does and why, not how the instructions work.

Well not necessary always (not atleast in this case, as it is reverse engineering. And the one who is doing it does not know what the whole code is doing and thats why reverse engineering!) By reading all the explanations one can come to know what the whole routine is going to do.
And yes, it is better to write a big comment for the whole routine as what it is going to do at the starting of routine.
Erik Malund said:
A comment explain what the routoine does and why, not how the instructions work.

An explanation like this is doing the same thing for each instruction level, which is precisely telling every reader how the routine is going to achieve the given task.
The comment for the whole routine may confuse some times...

Regards
Sarang




List of 30 messages in thread
TopicAuthorDate
week puzzle V            01/01/70 00:00      
   that would be intersating only to codebr            01/01/70 00:00      
      codebreakers            01/01/70 00:00      
         busted            01/01/70 00:00      
   having a guess            01/01/70 00:00      
   Hmm,isn't it demotivating to reengineer?            01/01/70 00:00      
      Cool algorithm            01/01/70 00:00      
      maybe            01/01/70 00:00      
   Looks like BCD to binary routine            01/01/70 00:00      
   My assumption            01/01/70 00:00      
   The source with comments !            01/01/70 00:00      
      thanks            01/01/70 00:00      
         Seems more elegant ...            01/01/70 00:00      
            optimized=ugly            01/01/70 00:00      
         why "xrl a,#0F0h" ?            01/01/70 00:00      
            Wow!            01/01/70 00:00      
         A bit shorter ...            01/01/70 00:00      
            za Slobodana Mandarica            01/01/70 00:00      
      another approach            01/01/70 00:00      
         optimizing further            01/01/70 00:00      
            packed bcd            01/01/70 00:00      
               packed bcd... by specification :-)            01/01/70 00:00      
      that is not comments, that is "explanati            01/01/70 00:00      
         true if            01/01/70 00:00      
         Yes they are Comments            01/01/70 00:00      
            Exactly !            01/01/70 00:00      
            I have seen such called "comments" way t            01/01/70 00:00      
               more on comments            01/01/70 00:00      
                  the point            01/01/70 00:00      
                     "anyone" and the point            01/01/70 00:00      

Back to Subject List