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
If it's a different problem, you should start a new thread for it - not least because the title "How The sbit keyword works" is no longer relevant to the content!
You can always include a link(s) to other thread(s) if you think they are helpful...
And before you start a new thread - make sure that your main has an infinite loop so that it doesn't end - there is no operating system to catch you.