Why Hanging ???

Regards all,

This codes generates a hang on cpu .
Please kindly take this & guid me :

#include <w78e65.H>
#include <stdio.h>
main()
{
unsigned char i;
TMOD=0x20;
SCON=0x52;
TH1=0xfa;
TR1=1;
for(i=0;i<=255;i++)
{
printf("%bd",i);
P2=i;
}
}
/**************************************/

More questions in this forum