This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How The sbit keyword works

how can an sbit variable be assigned an address which is intrinsically assigned to something else.
e.g will the following code work on an 8051?

sfr SCON = 0x98; // declare SCON
sbit SM0 = 0x9F; // declare sbit members of SCON
sbit SM1 = 0x9E;
sbit SM2 = 0x9D;
sbit REN = 0x9C;
sbit TB8 = 0x9B;
sbit RB8 = 0x9A;
sbit TI = 0x99;
sbit RI = 0x98;

Address 0x9A is the address for a special function register. IEN2. Won't the RB8 and this SFR conflict?
I'm especially interested in how the compiler interprets the "sbit" keyword.

Thanks in advance