The PICs I am working on have limited (1Mhz to 4Mhz clock) cycles, and I am wondering if C is going to waste a substantial amount of time executing. Has anyone ever had experience with both and could share some thoughts on the comparison?
C
The PICs I am working on have limited (1Mhz to 4Mhz clock) cycles, and I am wondering if C is going to waste a substantial amount of time executing. Has anyone ever had experience with both and could share some thoughts on the comparison?
C
A good C compiler will produce code nearly as good as a good assembly language programmer for a lot of common programming structures, but not all C compilers are that "good" (especially for architectures like the PIC that are not very C-friendly), and there are a few common assembler techniques that don't seem to translate well to C:
But the simpe truth is that most code doesn't need to be "as fast as possible", and being able to create it sooner, with less likelyhood of bugs, is a really good excuse for using a higher-level language.
I completely agree with Bill,
If a source program is well developed, I mean write flow-chart first, and then the real program, I believe assembly is the best way to write the source code.
Writing a good flow-chart will help you in understanding what you need, Subs, functions, and tables.
So, the first step in writing source code, will be to write own subs, functions, and tables.
Then, you have only to follow the flow-chart.
Alberto.
I completely agree with Bill,
If a source program is well developed, I mean write flow-chart first, and then the real program, I believe assembly is the best way to write the source code.
Writing a good flow-chart will help you in understanding what you need, Subs, functions, and tables.
So, the first step in writing source code, will be to write own subs, functions, and tables.
Then, you have only to follow the flow-chart.
Alberto.
Did you say assembly is the best way to write source code? Unless it has to be mega fast I doubt it (even on a Sharc where the assy code is at least sensible). Is this 2010 or what?. Why not move to a modern processor with a decent register set & use C and get your code written faster with fewer bugs and more readable etc??
R