On Thu, Oct 09, 1997 at 06:14:27PM +0100, Jorge Ferreira wrote: > Its a long way from PDP-11 to a PIC, don't you think. Nope, all processors have their little subtleties. That's just a nice example that I trot out from time to time. I should probably come up with one for the PIC, I guess. > So fire me ;-). I've doing such things since I can remenber, its a > matter of exploring the darkest aspects of your hardware (by the way The point is that using such tricks in hand-coded assembler greatly increases the chances that later on you will change something that breaks your clever optimization. A compiler on the other other hand rewrites the assember code each time it compiles the source, so it can check the validity of such clever tricks each time - you have to remember to do it. > By the way compilers are made by programmers, aren't they, so I think > all this discussion as no point at all, because the code a compiler Exactly my point; the limiting case of both hand-written and automatically generated code is the same. It's just a matter of how much time you have to spend to get there, and how much time you have to spend later maintaining it. On a small project (say < 1K of code) it's not hard to make a case for using assembler. As the project gets larger it gets harder and harder to make that case. At some point the growing complexity of the project makes it impossible to write in assembler (the time required to write code grows exponentially with the size of the project). It is true that a good compiler can routinely out-code an average assembler programmer. The difference between an average programmer and a hot one is an order of magnitude or so. Of course no-one on this list is merely average :-) Cheers. -- Clyde Smith-Stubbs | HI-TECH Software Email: clyde@htsoft.com | Phone Fax WWW: http://www.htsoft.com/ | USA: (408) 490 2885 (408) 490 2885 PGP: finger clyde@htsoft.com | AUS: +61 7 3354 2411 +61 7 3354 2422 --------------------------------------------------------------------------- ANSI C for the PIC! Now shipping! See www.htsoft.com for more info.