Dudes: As you know, I usually pose a programming challenge around this time of year... The prize is a free beer (or other beverage of your choice) at the Embedded Systems Conference. Here's this year's challenge: Write a routine to multiply two numbers, each in the range 0-100... The numbers are in two registers, called SMALL and LARGE, and your 16-bit result should be in two different registers, called PROD_HI and PROD_LO. To make it easy on you, the SMALL number is guaranteed to be less than or equal to LARGE. If it helps, you can assume that either both numbers will be odd or both will be even. Your routine may corrupt the SMALL and LARGE registers, and it may use as many registers as you like... The only restriction is that the entire routine must fit in 256 bytes and be executable on a 12-bit PIC (16C5x or 12C50x). You may assume that your routine is ORGed at address 0 and that it's NOT called as a subroutine, so you can feel free to use both levels of the stack. Entries will be judged on speed of execution only; ties will be broken by (in this order): Lack of restrictions (i.e., ability to multiply an odd by an even number, or insensitivity to SMALL being larger than LARGE), Code size, Number of registers used. I just wrote one that takes 34 cycles... I'm SURE someone can do better. -Andy P.S. As always, the prize is non-transferable and has no cash value; if you win and aren't going to be at the Embedded Systems Conference, I'll just drink your beer for you. === Andrew Warren - fastfwd@ix.netcom.com === Fast Forward Engineering - Vista, California === http://www.geocities.com/SiliconValley/2499 === For PICLIST help (including "unsubscribe" instructions), === put the single word "help" in the body of a message and === send it to: listserv@mitvma.mit.edu