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 can i do it

I need some bits in bit segment;

so,how can declare a bit array,and how can i access it?

Parents
  • When looking for support for bit arrays, I think you should probably start by looking at the manuals for the processor. Does your current processor support any instructions for indexed addressing of bits?

    If the processor can't support something linke

    my_bits[idx] = 1;
    


    Then your compiler will also have a problem to produce code for such a feature, in which case you may have to settle for a different solution, such as masking bits in bytes.

    In this case, you did post a generic question without mentioning any toolset or processor, so I can only deduce that you are not really interested in any answers.

Reply
  • When looking for support for bit arrays, I think you should probably start by looking at the manuals for the processor. Does your current processor support any instructions for indexed addressing of bits?

    If the processor can't support something linke

    my_bits[idx] = 1;
    


    Then your compiler will also have a problem to produce code for such a feature, in which case you may have to settle for a different solution, such as masking bits in bytes.

    In this case, you did post a generic question without mentioning any toolset or processor, so I can only deduce that you are not really interested in any answers.

Children
No data