On Thu, Aug 07, 1997 at 06:49:04PM -0000, Stephen H Alsop wrote: > I use a 32 bit / 16 bit to 32 result divide routine (plus other routines) > taken from the Microchip application notes. > > It use 200+ bytes. Unfortunately I've now run out of space in a pic74. > > Does anyone have a 32/16->32 div routine using less than 200 bytes. Here's one that uses about 100 bytes (from our C library). It takes a 32 bit divisor, as well. Note that the jumps to "storeback" can be replaced by retlw (it's a hook for /= type operations in C). Cheers, Clyde -- Clyde Smith-Stubbs |HI-TECH Software, |Email: clyde@htsoft.com Ph: +61 7 3354 2411|P.O. Box 103, Alderley,|WWW: http://www.htsoft.com/ Fax: +61 7 3354 2422|QLD, 4051, AUSTRALIA. |PGP: finger clyde@htsoft.com --------------------------------------------------------------------------- ANSI C for the PIC! Now shipping! See www.htsoft.com for more info. Attachment converted: wonderland:ldiv.as (TEXT/MSIE) (00003C61)