-
Reverse Bit Order?
Hi Guys,
I made a cool 144 LED scroller in the last 36 hours:
http://www.youtube.com/watch?v=4it2ISHoh0k
I have definitions made up for characters that appear upside down,
so I need to reverse the order of every bit in a byte to compensate for this.
Is there a way that's better than moving bits to a new byte ?
At the moment that's taking 8 lines (one for each bit in the byte).
Cheers, Art.
-
Art,
There is the REV command/operator, does that do what you want?
/Henrik.
-
Maybe this will work for you?
Code:
BITS VAR BYTE
BITS = %10101010
START:
LCDOUT $FE,1,BIN BITS
BITS = BITS REV 8
LCDOUT $FE,$C0,BIN8 BITS
END
echo of Henrik
-
Thanks :) Ten words cheaper than handling the bits individually.