Well, yes, C, C++, C# or whatsoever make a nice optimazation, however, they can't figra out what I would like to do... They will not optimize the algorithm and so on. If you are good programmer you can help your compiler to do the best, and if you are a good assembly programmer you can make a well maitinable source. C++ could be just as un-reusable as anything else. Whithout a good design it worth just nothing. Anyway, some excersices: Compile the following C samples and see what assembly / binary code come out: 1. /* problem: checking why the loop ended up? */ char *string = '"This is the test string"; int i; for ( i = 0; i < 255; i++) { if ( string[i] == 0) { break; } } if (i < 255) { printf("OK, we reached the end of the string\n"); } else { ...we need to do domething else here } 2. /* problem: you can't rotate an integer using C */ int i = 0x12345678; int j = i << 3; int k = i >> 29; printf("silly rotation: 0x%08X\n", j^k); OK, you can avoid using some extra variables, but c'mon, most CISC and even RISC CPUs have assembly rotation instructions... In addition to this most programmer will not use goto because somebody said that is bad. But without that your code it getting bigger (safe exits from a function for example). Some other people claims that try..catch..throw is very fast, but they do not know what is goin on when they do this -- there are couple of very good articles about this subject but it is completly off-topic. BTW: In the compilers area Borland is far the worth in optimazation. I like Delphi and Borland C++, but its unfortunately true. Visual C++ quite good at it actually and GNU C/C++ not bad at all. Tamas PS: I have just downloaded AsmEdit 1.50, and it is 6 MB unpacked, and when I run the setup it says I need additional package. Well, maybe ASM compiler does not do a good optimazation :-))) On 20/07/06, Olin Lathrop wrote: > > James Newton, Host wrote: > > but is open source (in MASM, Windows 32 bit assembly (yes, > > assembly)) > > While I think assembly is often a good answer for PICs and other small > processors, I think this is silly. The x86 compilers are heavily used, > very > solid, and do a very good job of optimization. This editor may be fast, > but > I seriously doubt there would be any noticeable difference if it were > competently written in C. > > > Assembly isn't just for PIC's! > > But it should be, or at least for small resource-limited processors or > otherwise very exceptional cases. There are a few cases where assembly is > used on PC systems, but they are quite rare for good reason. The only > case > I'm familiar with is a small part of the graphics driver of a major > graphics > chip vendor. This is a piece of code that really can be called 100s of > millions of times when performance is critical. Assembly allowed making > optimum use of the floating point processor and the new (at the time) MMX > instructions. Even then, assembly was limited to the 3D floating point > critical path routines. There just isn't any advantage for "normal" code > on > a PC. > > > ****************************************************************** > Embed Inc, Littleton Massachusetts, (978) 742-9014. #1 PIC > consultant in 2004 program year. http://www.embedinc.com/products > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist