We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I have a problem with the following code:
#pragma LARGE #include <C8051F120.H> #include <stdio.h> char add(char a) reentrant { printf("Data is %d\n",a); if(a==255) { return 0; } else { return add(a+1); } } void main() { unsigned int uiData=0; SCON0 = 0x50; TMOD |= 0x20; TH1 = 0x96; TR1 = 1; TI0 = 1; add(0); while(1); }
Data is 0 Data is 1 Data is 2 ....
Data is 0 Data is 256 Data is 512 Data is 768 ....
You should use the 'b' prefix. See: http://www.keil.com/support/man/docs/c51/c51_xf_usingprintf.htm
I Already got it. Anyway thank you keil!