This CCS project contains three assembler functions that can be called from C / C ++ programs:
- char * itoa32 (char* strBuf, int32_t val)
- char * uitoa32 (char* strBuf, int32_t val>)
- void strrev (char* strBuf)
The way it works is that of the "char * itoa (char strBuf, int16_t val)" function known from C.
The main.c file contains a sample code to demonstrate the itoa32 function.
A serial console (9600,8,N,1) is required through which the letter "a" must be entered.
If the input is recognized, the program outputs a number converted by itoa32
into an ASCII string on the serial console.
The strrev function reverses the order of the characters in a char array and is
required by the two functions itoa32 / uitoa32. However, it can also be used
independently of the two functions.