An odd question... -
14-08-2005
A stupid late-night idea has me trying to create a dot matrix display using '.' and 'o' characters...
I have it set up so that there are 160 bits/dots, 32 bits wide by 5 bits high.
So, each line is made up of 4 bytes ( ie. byte 2 is 16,0 to 23, 0 ).
I just can't figure out how to convert an X,Y coordinate ( say, 5,2 ) to an individual byte and bit.
There must be some kind of math to do it but I can't figure it out - unless more coffee will help.
I could post the code I have now if needed, but its not commented and only rotates the bits in every byte of the first line.
Btw, is there a standard C/C++ way to rotate bits?
I can't remember off hand so I used some x86 asm to do the rotation.
|