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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/08/01 10:04
Read: times


 
#14825 - RE: Coments field ( ;)
Comments are not like this(BTW I have not tested this program so I do not know it is syntax correct but you get the general idea):

mov a,#10h ;moves 10 hex to a
mov r1,a ;moves a to r1
add a,r1 ;adds a and r1
mov r1,a ;moves a to r1


But comments should be more to describe the idea you are doing like this:

mov a,#10h ;loads accumulator with value 10 hex
mov r1,a ;this and next three lines add a to itself and stores result in r1
add a,r1
mov r1,a


The whole idea is that some people write what the command does, not what the command is intended to do, we all look at a "mov a,r1" instruction and know that it moves the contents of r1 to a (accumulator). But the comments tell us why we did this, it could be that r1 is the number off steps a stepper motor has stepped, or the current time in seconds we just got from a time update routine....

Regards,

Kat.






List of 21 messages in thread
TopicAuthorDate
Coments field ( ;)            01/01/70 00:00      
RE: Coments field ( ;)            01/01/70 00:00      
RE: Coments field ( ;)            01/01/70 00:00      
RE: Coments field ( ;)            01/01/70 00:00      
RE: Coments field ( ;)            01/01/70 00:00      
RE: Coments field ( ;)            01/01/70 00:00      
RE: Coments field ( ;), Kathy            01/01/70 00:00      
RE: Coments field ( ;) - Kathy            01/01/70 00:00      
RE: Coments field ( ;)            01/01/70 00:00      
No Never Comment !!            01/01/70 00:00      
RE: Coments field ( ;) - Kathy            01/01/70 00:00      
RE: Still Off_Base - Kathy            01/01/70 00:00      
RE: Coments field ( ;) - Kathy            01/01/70 00:00      
RE: Coments field ( ;) - Bordyn            01/01/70 00:00      
RE: Coments field ( ;)            01/01/70 00:00      
RE: Coments field ( ;),Alfredo            01/01/70 00:00      
RE: Coments field ( ;),Gil            01/01/70 00:00      
RE: Coments field ( ;),Bordyn            01/01/70 00:00      
RE: Coments field ( ;),Bordyn            01/01/70 00:00      
RE: Coments field ( ;),Andy            01/01/70 00:00      
RE: Coments field ( ;),Andy            01/01/70 00:00      

Back to Subject List