We can propose on the developers list that the divmod10 code (including #ifdef to select asm or C version) becomes a separate .h file within the core. I've seen " x/10 x%10" code constructs in several libs (recently - http://forum.arduino.cc//index.php?topic=190472.0 - )

what do you think?

update: the divmod.h (?) could include work discussed here - http://forum.arduino.cc//index.php?topic=172635.0 -

If you do write up a good proposal on the developer mail list and Cristian replies favorably (really, anything other than saying no or probably not), perhaps I'll adopt it for Teensyduino 1.17 or 1.18? I just posted the first release candidate today. I don't have a deadline for 1.17, but unless there's any problems or other urgent stuff to add, I'll probably release sometime next week.

I can't see the harm in placing this into a header where it can be used by libraries. There just needs to be some consensus from Arduino (where really, Cristian's voice is the only one that matters) so I don't end up publishing this in a way that will later break when/if they do it.

for negatives you would have to first negate to make them positive, then use divmod10 then negate the resulting division value (the mod value I believe would stay positive). If you are doing it multiple times in a row then you would leave the results all positive and then at the very end negate the remaining division part.

@odometerHave you seen this thread, - http://forum.arduino.cc/index.php?topic=179111.0 -it uses divmod10 to increase the speed of the print class from which display classes are derived. But also the Serial class is derived from Print.