i want use if satement, to do something for the one time, example:
main(){ char k; k=0;
while(1){
if(k==0){ printfLCD("please only one time\n"); k=1; }//end if
printfLCD("test message\n");
}//end while }//end main
but it isnt work, program enters the if statement infinite time. where is the error?, there is anyything about keilc51, which is i dont know? i use upsd3434 8051 microcontroler, sory for my nglish
maybe i can say troublesome
ok. firstly i will study on debugging , then you can see my questions later.
finally i want to write my last question;
xdata unsigned int *ptr _at_ 0x8000; is this valid? or is this useful?
for example; *(ptr) = 10;
*(ptr+1) = 11;
where are the 10 and 11 values ,in xdata
your 'condtruct is wrong, here is a "cheat sheet" extracted from my definition file
// pointer in data in #define U8DI unsigned char idata * data // data idata #define U8DX unsigned char xdata * data // data xdata #define U8IX unsigned char xdata * idata // idata xdata #define U8XX unsigned char xdata * xdata // xdata xdata #define U8IC unsigned char code * idata // idata code #define U8DC unsigned char code * data // data code #define U8XC unsigned char code * xdata // xdata code #define U8CC unsigned char code * code // code code
Erik