Hi Brian, On Wed, Jan 14, 2009 at 7:45 PM, Brian <blue_eagle74@yahoo.com> wrote: > When I started in AVR's I used ASM then I learned C and found it much > easier, faster, powerful. > > What do you like most? Why would someone like ASM over C? C is so much > easier I think. > > I ask this because I hear people that like to program in ASM and I > don't know why. I like C because I can write code that works the same on AVR, ARM, PC, whatever. I still dabble in assembler when its needed, but I work with too many different processors to keep all of the different assembly languages straight in my head. Maybe this is just a sign of old age... I've been using C for over 20 years, and I've probably used it on over a dozen different architectures. I've probably handcoded assembly code for all of those platforms too. For people who are willing to put in the effort, you can get tighter faster code by developing everything in assembler. Although on some architectures the compiler will often do a much better job, unless you're really really good at the assembler stuff. This is especially true with the more advanced processors which have big pipelines, and parallel execution units, etc. Personally, I don't think C is better than assembler, nor do I think that assembler is better than C. They're different. They have different advantages and disadvantages. You have to make the trade offs and decide which one is best for you and your particular application. -- Dave Hylands Shuswap, BC, Canada http://www.DaveHylands.com/
Message
Re: [AVR-Chat] ASM vs. C
2009-01-15 by Dave Hylands
Attachments
- No local attachments were found for this message.