Getting multiple bits from variable by alias.
CuriousOne
Posts: 931
The topic title is a bit strange, but I have no words to describe otherwise what I need.
Quote from help:
But what if I want eye variable to be a byte, which bits start from BIT2 to BIT9 of variable rhino ?
How should I ?
Quote from help:
rhino [COLOR=#000000][B]VAR[/B][/COLOR] Word ' A 16-bit variable eye [COLOR=#000000][B]VAR[/B][/COLOR] rhino.BIT9 ' A bit
But what if I want eye variable to be a byte, which bits start from BIT2 to BIT9 of variable rhino ?
How should I ?
Comments
If you align the bits you want to be from 0 to 7 you could use:
Likewise you could use a nibble if needed for 4-bits at a time. If you really need them offset like you mentioned then you would have to do it the way Hal and Mike described.