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 do I get the bit address in Keil C

Hi,

I want to know the address of a bit variable.
For example:

bit gBit;
func()
{
  printf("%d", &gBit);
}
How do I know where the variable gBit is allocated by the linker in run time?

Parents
  • The initialization code converts the bit address into a byte.bit address and then uses and and or to mask and set the bit accordingly

    Jon, you scared me there. I had a look and
    GBvfdBusy = TRUE;
    does, indeed, compile to
    SETB GBvfdBusy

    wiping sweat off forhead

    Erik

Reply
  • The initialization code converts the bit address into a byte.bit address and then uses and and or to mask and set the bit accordingly

    Jon, you scared me there. I had a look and
    GBvfdBusy = TRUE;
    does, indeed, compile to
    SETB GBvfdBusy

    wiping sweat off forhead

    Erik

Children