On Mon, 15 Feb 2010, Isaac Marino Bavaresco wrote: > There is an interesting implementation which is used by MPLAB-C18 > library (file itobcd.asm). > It is a very efficient serialized method, it uses only shifts and adds. > It is worthy a try. Hi Isaac, Thanks for the pointer but in this case I was trying to explain the fundamentals and in particular why getting to grips with 16 bit arithmatic on an 8 bit PIC is a GOOD thing. The whole thing would have been really trivial had the OP been comfortable with 16 bit arithmetic in the first place. Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist