George Spelvin a écrit:
The developers of the TICC time interval counter are having a problem printing 64-bit integers: https://github.com/TAPR/TICC/blob/master/TO-DO.txt
As an aside, attached is an AVR asm code (needs MUL) that transforms uint64_t to decimal string. Despite most algorithms, it starts with the highest digit and need no string reversion, and it doesn't need div or mod. The show stopper is presumably the code size because of the multiplication by 10: The value to convert is passed in regs as of extern void put64 (uint64_t val, char *buf); The algo is rather slow because it always iterates over all digits, i.e. it won't run faster for small numbers. Have fun! Code size is ~140 bytes. Johann
_______________________________________________ AVR-libc-dev mailing list AVR-libc-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/avr-libc-dev