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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/03/04 17:15
Read: times


 
#80320 - RE: Commenting
Responding to: ???'s previous message
commented thoroughly the most obvious sections of the code, while those obscure 3 lines that make the key of the program are left uncommented

That is true, but a more often seen problem is worthless comments. As an example of worthless commenting:
hello:
         push acc;             save accumulator
         mov a, step;          move step to a
         cjne step,#4,hello1;  branch if step is not 4
         mov a,#18;            move 18 to acc
         mov step,a 18;        step to acc value
hello1:  pop acc;              restore accumulator
         ret;                  return from subroutine


The above would be so much better served with one line of comment above the routine
; if step = 4, set it to 18, otherwise leave untouched.

or - even better
: if step = NEW_MAIL, set step = CHECK_MAIL

Erik

List of 27 messages in thread
TopicAuthorDate
Elevators logic            01/01/70 00:00      
   RE: Elevators logic            01/01/70 00:00      
   RE: Elevators logic            01/01/70 00:00      
      RE: Elevators logic            01/01/70 00:00      
         But            01/01/70 00:00      
         RE: Elevators logic            01/01/70 00:00      
      RE: Elevators logic            01/01/70 00:00      
   RE: Elevators logic            01/01/70 00:00      
      RE: Elevators logic - Bartosz            01/01/70 00:00      
      VINDICATION!            01/01/70 00:00      
         Repeated pushes...Joseph            01/01/70 00:00      
            RE: Repeated pushes...Joseph            01/01/70 00:00      
               RE: Repeated pushes...Joseph            01/01/70 00:00      
                  RE: Repeated pushes...Joseph            01/01/70 00:00      
   Elevators and women            01/01/70 00:00      
      RE: Elevators and women            01/01/70 00:00      
      Up or Down - thats the question!            01/01/70 00:00      
         RE: Up or Down - thats the question!            01/01/70 00:00      
            Commenting            01/01/70 00:00      
               RE: Commenting            01/01/70 00:00      
               RE: Commenting            01/01/70 00:00      
                  Good advice - Erik            01/01/70 00:00      
                  RE: Commenting            01/01/70 00:00      
                  RE: Commenting            01/01/70 00:00      
                     RE: Commenting            01/01/70 00:00      
   RE: Elevators logic            01/01/70 00:00      
   RE: Elevators logic            01/01/70 00:00      

Back to Subject List