This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

printf problem again

my code :

#include <reg52.h>
#include <stdio.h>

#define uchar unsigned char


void main()
{
 uchar value;
 unsigned int address;
 uchar *data_buf;

	TMOD=0X20; // timer 1 mode 2
	TH1=0xFD;  // 9600 baud at 11.0592MHz
	TCON=0x40; // start baud rate clock
	SCON=0x52; // enable RX,TX

	address=0x01CF;
	value=0x66;

        *data_buf=value;
       	printf("\nAddress %04xH  Value : %02x",address,*data_buf);

    while (1);
}

result of this program

=============================

Address 01cfH Value : 6600

=============================

Why the Value = 6600 ?

0