At 01:55 PM 2/23/2006 -0800, you wrote: >James Newton, Host wrote: > >>I want a 8 bit number divide by 10 (ten). > >>I need the quotient and the remain. > >> > >>Which is the fastest ASM code for pic 16f877? > > > > > > Multiply by 1/10 > > > >What about the remainder? Peter's solution has a similar problem. > >Scott Scott's method gives the exact quotient and remainder packed in a single byte in just 18 cycles. I suspect that's unbeatable (without a LUT). And it is just a special case of his routine in the piclist source code library. Best regards, Spehro Pefhany --"it's the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com ->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist