I'm trying to squeeze a few more cycles out of one my LPC, and I'm looking for an optimized way to divide by 10 and leave the quotient and remainder. I.e., a faster way to do this: #define DIVIDE_BY_10(D, Q, R) Q=D/10; R=D%10; // D is unsigned long [It's to support a prehistoric data collection system, writing LOTS of BCD ASCII data to a SRAM cartridge.] Any info would be appreciated. Thanks.
Message
Slightly OT -- Fast Divide By 10
2004-11-30 by James Dabbs