??? 12/05/06 18:04 Read: times |
#129020 - Overkill Responding to: ???'s previous message |
Andy Neil said:
Ralph Sack said:
comment this program with comments What else?! ;-) But he already knows: http://www.8052.com/forum/read.phtml?id=128965 Hi Andy: Ok I over did it but Dan K. has three changes in program so comments in group of changes should not be to much. I am only doing what I read in "8051 Microcontroller and Embedded Systems by Mazidi you should comment on each line code. Remember he trying teach us good habits in programming code. Here's example what I mean. Write program to (a)load the accumulator with the value 55H, and (b)complement the ACC 700 times. MOV A,#55 ;A=55H MOV R3,#10 ;R3=10, THE OUTER LOOP COUNT NEXT: MOV R2,#70 ;R2=70, THE INNER LOOP COUNT AGAIN: CPL A ;COMPLEMENT A REGISTER DJNZ R2,AGAIN ;REPEAT IT 70 TIMES (INNER LOOP) DJNZ R3,NEXT Maybe this is too many coments but it has to help newbie to better understand the program. comments please be nice I have so much to learn and will except your opinions. Best reguards, Ralph Sack |