At 04:02 PM 8/11/04 -0700, you wrote:
>i need to get every bit of every character and transfer it to the previous
>character. nokia phones only need 7-bits for a character. the 8th bit is
>taken from the next byte of the next character. for example in the first
>element of a string, the 8th bit of is masked, 0x7F, and the 8th bit will
>be occupied by the least significant bit of the next character. so the 2nd
>character will only have 6 bits remaining (since the 8th bit of it is,
>again, masked). to complete its 8 bits, the 7th and 8th bit of the second
>character will be occupied by the last two least significant bit of the
>3rd character. and the third character will only have 5 bits remaining (1
>masked, 2 shifted to the previous byte). this is done until the last
>character that will be send. so we a right shifting bits in every data
>that will be sent.
Hmm. I would think off hand you would want to do both right and left
shifting but in any case it should be quite doable with appropriate use of
multiply and divide by 2 and little masking with and and or (VB does
support binary and and or doesn't it?).
IE a right shift by 3 would be a/8 or maybe a/(2^3)
Robert
" 'Freedom' has no meaning of itself. There are always restrictions,
be they legal, genetic, or physical. If you don't believe me, try to
chew a radio signal. "
Kelvin Throop, IIIMessage
Re: [AVR-Chat] OT: .DLL coded in Visual C++, called in VB6; HELP!
2004-08-11 by Robert Adsett
Attachments
- No local attachments were found for this message.