In the Keil installation directory, where there are STDIO.H several print functions are as follows:
extern int printf (const char *, ...);
extern int sprintf (char *, const char *, ...);
extern int vprintf (const char *, char *);
extern int vsprintf (char *, const char *, char *);
vprintf corresponds to printf, which prints the data in ASCII format to the serial port
The vsprintf corresponds to sprintf, which prints the data in ASCII format to buffer.
The sprintf function formats a series of strings and numeric values and stores the resulting string in buffer.
This function was similar to the printf routine, but it stores the formatted output in buffer rather than sending it to the Output stream.
The principle of printf is to start from the serial port from the "character pointer variable" (single-byte pointer), and if it encounters a '/' (0x00) stop sending, note that this 0x00 is not sent.
buffer[0]=0x00;
buffer[2]=0x00; buffer[2]=0x01;
TI = 1;
ES = 0;
printf (buffer);
ES = 1;
This will not send any data, because the first byte of buffer points to the data is 0x00, then the data will not be sent.
However, if BUFFER[0] is a non-0x00 data, it can be sent, but Buffer[1] is not initialized by default, so only the first data is sent.
So if you want to send an array that includes 0x00, then you can't use the printf function. You want to use a for loop to send data through the entire array.