Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How to map bits onto a RAM variable?

Bits map RAM
0
0 Posted

How to map bits onto a RAM variable?

0
0

Q: I want to be able to access single bits in a byte, but if I try to define a bit variable using the absolute variable construct, e.g. static bit bitvar @ ((unsigned)&bytevar)*8+0; I get a compiler error. How can I do this? A: The short answer is “you can’t do this”. The absolute variable construct using @ requires an address known at compile time. The long (and more useful) answer will depend on what you’re actually trying to do.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123