Walter Banks wrote: > At high baud rates (10's of instructions per bit) might make a good > example test case. That's not "high" baud rate. I once did a 9600 baud UART in a PIC with a 160KHz clock. That comes out to 4.2 instructions per bit time. Assembly time calculations added extra NOPs as needed for correct timing, including taking care of the cumulative error. Again, I see nothing wrong with saying this is a inappropriate requirement on a HLL. I'd be impressed if you can show me a HLL that can do this. On the other hand, I'd be very reluctant to use it for this case. This kind of code is at least as easy to write in assembler, and I'd worry about compiler bugs in such a fringe feature. So I'd break even or only slightly lose (I may feel obligated to check the compiler's output) at best by using a HLL. A single compiler bug in 100 cases puts this in the solid loss column for the HLL. No thanks. This really gets back to what HLLs are good for on small systems (no OS, frequently up against resource constraints, always need to be aware or hardware details). Legitimate reasons are: - Complicated data structures. - High level relatively hardware-independent control code. - Math beyond what the native instruction set provides. Abuse of HLL reasons are: - Don't want to learn instruction set - Don't want to learn hardware peripheral details People that won't or can't learn low level details of such systems don't belong there no matter what language they use. The right answer is to tell them to find something else to do. Note that speed of implementation is not in either group above, because this is a small advantage in some areas and a hinderance in other to those with good proficiency in the low levels. It would be less of a hinderance with some better HLL than C, but that's the only real choice currently. However I understand as a compiler vendor you can't do that since I suspect the majority of your customers fall into the second catagory. And Microchip can't do that either because they like to pretend that using PICs is easy ("only 35 instructions!"), and besides even the clueless may put together projects that result in significant sales of chips. In otherwords, as in the rest of life, lazy or incompetent people are profitable to sell to. The corrolary is that the lazy and incompetent with their large purchasing power get to define the products we all end up having to use. So this is all a long winded way of saying to forget about it. The lazy or incompetent will only shoot themselves in the foot with HLL level timing and/or eat up all your profits with support costs. The experts aren't going to use it anyway. So this has been a nice theoretical discussions, but alas, pointless. ******************************************************************** Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products (978) 742-9014. Gold level PIC consultants since 2000. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist