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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/24/03 08:26
Read: times


 
#39876 - RE: About assembly programming architecture
Responding to: ???'s previous message

"Should I put all the programming procedure into subroutine rather than putting them in main loop?
"

NEITHER.

If you are going to write just this one code ( whatever you are talking about ) and after that never look back at an MCU ;

If you are 100% sure that every line of what you write will be both correct in Syntax and Logic ;

If you are a man with infinite patience to debug ;

If you have extra fingers to use the page up/down buttons;

THEN , Go ahead and write your whole code in one single routine - no problems.

ELSE

Break all tasks that are repeated; that are logically unique like your averaging process; that are too big for a single routine; and write sub routines for these. And call them from the Main.

And last resist the temptation to use too many unconditional JUMPS. Our ancestors were good at this but we have evolved. You will never know where you will Jump into finally!!

Writing good code and see it work the first time ( atleast 90%) , is addictive, to say the least.

Enjoy.

Raghu

List of 4 messages in thread
TopicAuthorDate
About assembly programming architecture            01/01/70 00:00      
   RE: About assembly programming architecture            01/01/70 00:00      
   RE: About assembly programming architecture            01/01/70 00:00      
      RE: About assembly programming architecture            01/01/70 00:00      

Back to Subject List