I'm sorry, I'm wrong..........
but you can use puts ("string") instead of putchar, because puts is a procedure, in stdio.h, which it's used to send a string in serial and putchar is a send character procedure.
#include <AT89x52.h>
#include <stdio.h>
void InitUART(void)
{
TMOD=0x20;//Timer 1,Mode 2
TH1 = -3;// 9600 baud rate at 11.059 MHz
TR1=1; // Start Timer1
SCON=0x52;// 8-bit UART mode 1
}
void main (void)
{
unsigned char AT[] = "AT";
InitUART();
puts(AT);// or //puts("AT");
putchar(0x0D);
}