Amey Deosthali wrote: > The 8x8 multiply routine given in application note AN526 by > Microchip is optimized for speed. Still it takes a stagerring 44 > instructions in the worst case. Is this the best routine for > multiplication? That depends on your definition of "best", Amey. > Is there any other routine available, requiring less number of > instructions? Of course. Try something like this: ; Enter with multiplier in W-Reg, multiplicand in "PRODLO". ; Exits with product in PRODHI:PRODLO. MPY8X8: CLRF PRODHI CLRF COUNT BSF COUNT,3 RRF PRODLO LOOP: SKPNC ADDWF PRODHI RRF PRODHI RRF PRODLO DECFSZ COUNT GOTO LOOP -Andy P.S. As usual with code that I write online, this routine hasn't even been assembled, let alone tested. Still, it's pretty simple; I'd be surprised if it didn't work. === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499