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.
There is a BUG in the compilation of a bit definition:
unsigned int bdata my_int; sbit bit15 = my_int ^ 15; sbit bit7 = my_int ^ 7; void main() { my_int = 0x8000; if(bit15) { // Here we shall not appear,as compiller // will be erroneous to check 7-bit of // a variable my_int instead of 15-bit // (as this variable place in memory in // little endian order) // ... } if(bit7) { // oops! we here! // ... } }
Bits in data of any width are always 0 - LSB, etc. up to MSB. And realization in hardware is only consequence. So attempt to invent something other looks absurdity. And to speak about linear addressing in general it is impossible - you in fact cannot declare a array of sbit[].