HI i am debuging a program written in C if i select 12MHz clock for the program There is a timer in the project window showing the time passed and the no of states(machine cycles). Can i rely on the timer for my time calculations???????
How did you come to the conclusion that this question isn't processor-specific?
If you want to keep track of time in your program, configure a timer.
When debugging, don't assume that the simulator knows exactly how many clock cycles every instruction take.
don't assume that the simulator knows exactly how many clock cycles every instruction take
I don't use the ide myself but I can see that some less experienced people might think it is good. During my 30 plus years of programming I have stuck with my codewrite editor version 0.1 beta for all of my programming.
Come to think of it, I've got so much experience I don't bother with the compiler much any more because it changes everything i write into worse, unpredictable and bad code.
Mallund.
I've got so much experience I don't bother with the compiler much any more because it changes everything i write into worse, unpredictable and bad code.
so what do you do, ho experienced developer? write your code directly in machine code?
Yes, that is exactly what should be done. Any other way is no good and is ru**ish. I don't understand people who have TranslateAllYourOwnCodeFromCToAssemblyPhobia.
When you do this, you can always get optimized code that is slower than the compiler but it is easier to debug. You must always consider debugging, because when you write code you always need to debug.
Obviously, you never EVER worked on large projects. You don't know anything about maintenance. you don't understand scalability. You don't know anything about compatibility. Experience my potato!
Not that you care but I have worked on projects in excess of 100.000.000 items. When I chose a derivative that cost $0.002 less, I managed to save the company more than $4, and I only had to spend 1 full day porting the code across and only 6 months debugging the code.
Lesson: Watch out for jokers and trolls and do not believe everything written on the net...
Experience my potato!
Grandparent is quite likely posting under a ... "pseudonym" (euphemism) and trolling.
Read separately, that sounds particularly painful!
Roger Mallund (nee Mary Mallund)