// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // D E F I N E S // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #define LTOA_LIMITER (1<<1) // limit the output number the a specified ammount. // using the flags: // LTOA_Normal (0x123455, LTOA_LIMITER|3<<8); // would meat that you wish the output a number limited // to three numbers. // the ammount has to be shifted by 8 and ORed with the flags. // the range of the ammount should be: (1 < n <10). // if the ammount is out of range the flag is ignored. #define LTOA_CUTZEROS (1<<2) // the flag cuts the leading zeros in a number. // this flag has higher priority than LTOA_LIMITER #define LTOA_TIME_H (1<<3) #define LTOA_TIME_M (1<<4) #define LTOA_TIME_S (1<<5) // this flags signal what output of time string you wish // LTOA_Time (0x12314, LTOA_TIME_M|LTOA_TIME_S, 50, ':'); // would cause the OutString to be: // OutString[]="xx:xx"; // // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // P R O T O T Y P E S // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - extern asm void LTOA_Normal(char *destbuf, unsigned long n, unsigned short flags); extern asm void LTOA_Formated(char *destbuf, unsigned long n, unsigned short flags, char seperator); extern asm void LTOA_Time(char *destbuf, unsigned long n, unsigned short flags, unsigned short framerate, char seperator); asm void LTOA_Convert(unsigned long n); volatile static unsigned long pot[10] = {1000000000, 100000000, 10000000, 1000000, 100000,10000,1000,100,10,1}; volatile static char asciinumb[10];