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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
12/10/09 16:31
Read: times


 
#171544 - Answer the "why" in your comments.
Responding to: ???'s previous message
I can read 8051 assembler.

I can read C.

But when I read code, I can only see what the code does (if, and only if, the code is reasonably readable).

But I can not know what the code was expected to do. If the code works, then expected and actual performance may be the same, in which case you wouldn't post the code here and ask for help.

So the source code comments should explain what the expected outcome is of the code. What problem the code is intended to solve. Then I can compare this problem description with the real code, and notice if the code in reality does something else.

So as Erik has already noted, you shouldn't explain what an OP-code does. You should try to answer "why". Why have you added your code instructions?

List of 19 messages in thread
TopicAuthorDate
Problem using Timer2 in 89S52!            01/01/70 00:00      
   not a very useful suggestion from 'Plz'            01/01/70 00:00      
      further suggestion            01/01/70 00:00      
         Message & Readable code is here...            01/01/70 00:00      
            look in the assembler manual            01/01/70 00:00      
               New Code, hope it helps!            01/01/70 00:00      
                  what You are trying to make ?            01/01/70 00:00      
                     mov T2MOD,#4            01/01/70 00:00      
                        sorry            01/01/70 00:00      
                            t2mod=0 ; t2con=4 (tr2=1) It worked!            01/01/70 00:00      
                        PSW            01/01/70 00:00      
                  that is not a comment!            01/01/70 00:00      
                     Comments OR Explaination!!!            01/01/70 00:00      
                        Comments are mainly for YOU            01/01/70 00:00      
                        WRONG!            01/01/70 00:00      
                           Answer the "why" in your comments.            01/01/70 00:00      
                              I got (I)T2 working !!!            01/01/70 00:00      
                  Clear TF2 in your service routine            01/01/70 00:00      
                     Clearing TF2 in ISR            01/01/70 00:00      

Back to Subject List