On October 26, 2005 12:30 am, William Chops Westfield wrote: > On Oct 25, 2005, at 8:34 AM, Sam wrote: > > Some say that using assembler your are more "in control" of how > > code will be placed in memory after building and that generally > > assembler is faster. Is it true? If your complete program is smaller due to coding in assembler vs C, you can look at it in a few ways: * fewer instructions to get from pointA to resultB * you can run the MCU slower to do the same work (power saving aspect), or alternately, your program runs faster if you choose to use the same clock speed (faster response time). * possibly use a smaller MCU (due to assembler) versus a bigger MCU (due to C). You can look at it as cheaper, or also less power hungry if you are trying to save energy (because what is not needed is not there, and therefore not consuming power). * you bypass the possibility of bugs introduced due to not completely bullet-proof compiler. Most people on this list has heard at one point or another to avoid certain C instructions used in certain ways with whichever C compiler it is because what they coded in C did not come out correctly in MCU instructions. This means, you can't blame the C compiler for any bugs introduced due to the compiler. * there is a bit more flexibility, but less portability using assembler, but if you generally code for the smaller PICs, your code is generally portable or reusable with the more powerful PICs. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist