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.
#include "reg51.h" main() { bit k; k = ACC^7; //this instruction is right . ACC^7 = 1; // this instruction is wrong! why? } thank you !
Note: ACC^7 is an expression (its meaning already explained), it is not "left_value" (it has no address => no write is possible), therefore you can't write :
ACC^7 = 1;
#include "reg51.h" sbit ACC7 = ACC^7; // first define bit of a bitaddressable base main() { bit k; k = ACC7; // I think this was your ACC7 = 1; // primary intention ? }