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.
Dear sir I have declared in my program BIT bit flag=0; but when linking it is giving error then if I make it xdata BYTE then it will work . but it will be losing 7 bits . Since I am using more than 10 flags in my projects .I am losing more bits. How can solve this problem. Please give some suggestion Regards girish
What is "BIT" ? "but when linking it is giving error" There are over 50 different error messages that the Linker can report! Precisely what error do you get - quote the full text of the message. The manual contains full descriptions of all the error messages - check to see if that answers your question. Also, if you click the error in uVision, then press F1 you should get the help on the specific error,. If you also get other build errors, be sure to fix the first error first before addressing any susequent errors (which may well result from the earlier errors).
If you want a bit variable declare it properly. You can add the space qualifier to be complete. Try this:
void main(void) { bit data flag; flag = 0; while (!flag) { if (/* some condition */) { flag = 1; } } for (;;); }