#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 ? }