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

Bit fields support

Hi all

is bit fields are supported in uV3???

regards

jagmeet

Parents
  • I am sorry but my code does not require two ints to store the bits.
    flag_status.a = 1;
    flag_status.b = 1;

    This will show as two ints in the watch window but if you look at the assembly code both bits are bit ordered in one int.
    On my test the memory word was at 0x40000004 and after the first bit assignment the value was 0x00000001 and after the second bit assignment the same memory location contains 0x00000003.
    Look at actual memory location in the memory window instead of the watch window.
    Bradford

Reply
  • I am sorry but my code does not require two ints to store the bits.
    flag_status.a = 1;
    flag_status.b = 1;

    This will show as two ints in the watch window but if you look at the assembly code both bits are bit ordered in one int.
    On my test the memory word was at 0x40000004 and after the first bit assignment the value was 0x00000001 and after the second bit assignment the same memory location contains 0x00000003.
    Look at actual memory location in the memory window instead of the watch window.
    Bradford

Children