|
字节颠倒 作者:雁舞白沙 ///---***---YWBS---***---///
unsigned char invert (unsigned char YWBS)
{
unsigned char data temp=0;
if ((YWBS & 0x80) ==0x80) temp |=0x01;
if ((YWBS & 0x40) ==0x40) temp |=0x02;
if ((YWBS & 0x20) ==0x20) temp |=0x04;
if ((YWBS & 0x10) ==0x10) temp |=0x08;
if ((YWBS & 0x08) ==0x08) temp |=0x10;
if ((YWBS & 0x04) ==0x04) temp |=0x20;
if ((YWBS & 0x02) ==0x02) temp |=0x40;
if ((YWBS & 0x01) ==0x01) temp |=0x80;
return(temp);
}
///---***---YWBS---***---///
|