Hi Vasile, --- Vasile Surducan wrote: > hi John, > > On 3/10/07, John Chung wrote: > > > > Reasons why I choose assembly: > > > > 1) Depends on architecture. AVR with the bigger > MCU > > have an architecture tuned for high level language > > like C. GCC support is VERY good for this MCU so I > > choose C. > > Microchip C compilers cost plenty and the > compilers > > aren't so great for PIC midrange due to it's > limited > > unsupportive arch. for HLL. > > > > 2) Assembly documentation is plenty for MCHIP. > Plus > > code samples in assembly. Here is basically the > > support for the given language. > > Exactly the same support is available in HLL I was refering to Microchip site. Support for HLL does exist at the product site and sometimes the Microchip site. So you are right here. > > > > 3) USE less memory. Regardless of the language for > HLL > > it use plenty of memory of the MCU. Assembly is > > compact in size therefore and USE less memory and > ADD > > in more features. > > Debatable. An asm beginner may use more memory than > an beginner using > a good compiler. I agree. > > 4) Speed... Depends on the req. of the > application. > > Very debatable. A HLL with all tricks already known > will be faster than any asm > I agree. I have seen some VERY good programmers that can squeeze out every clock cycles. This unfortunately requires knowledge more than just assembly therefore it really depends on the programmer. C can squeeze more performance but with assembly we can squeeze more. It is more of diminishing returns. How much time and effort do we take to get what we want. > > > > 5) Debugging. One ought to know the target's > assembly > > for debugging the problem which includes the > compiler > > output and tracing the problem using some sort of > > debugger. You write in Pascal but use gdb to debug > the > > problem. You know how it feels.... > > Here you have right if debugging is made using > MPLAB. However there > are built in simulators and external devices for > debugging as well. > Some of them like LED or serial console are well > known. I agree. > > > > 6) Knowledge. I learn something new all the time. > > Assembly is more expressive in it's language. > Unlike > > C++ and C I am able to do all the above and more > due > > to it's LAX rules. > > Depends of your age and if you're programming for > living or just for > fun. I have doubts who is designing with PICs for > living is so happy > with asm every day... > Just take a look to the old people reaction from > this list. > -- This is something personal so I rather not go there :) Personally it depends on what I need to do. On PC I try to use C if possible. Okay I do use C++ due to the amount of libraries written..... I try to keep a balance between all the languages. Assembly if useful for hardware manipulation. The instruction OUT for x86 is not naturally supported in C so I use macro or functions that use embedded assembly. Intel C compiler tends to use ALL those funny assembly stuff internally. So I learn from there to embed assembly into my C programs from time to time... For PIC I use assembly which is for the MID range only. Once again this is choice. John. ____________________________________________________________________________________ We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist