有谁知道如何在Vee中进行逻辑运算?
我希望能够按位,或者,xor和按位移位。
C ++中的等价物是&(和),|(或),^(xor),>> right shift,> i); aux2 =((cheSuOut& 0x8000)>> 15);
/ * --- [Xor 1] ------------- * / aux = aux ^ aux2; / * --- [Xor 2] -----------
- * / aux2 =((((cheSuOut& 0x0010)>> 4)^ aux)); / * --- [Xor 3] ------------- * / aux3 =
((((cheSuOut& 0x0800)>> 11)^ aux)); / * --- [Shift] ------------- * / cheSuOut =(cheSuOut 1); / *
--- [Inyec
tion] ------------- * / cheSuOut = cheSuOut + aux; if(aux2 == 1){cheSuOut = cheSuOut |
0x0020;} else {cheSuOut = cheSuOut&
0xFFDF;} if(aux3 == 1){cheSuOut = cheSuOut |
0x1000;} else {cheSuOut = cheSuOut&
0xEFFF;} mask =(mask1);}}谢谢!
以上来自于谷歌翻译
以下为原文
Does anybody know how can I make logic operations in Vee? I want to be able to do bitwise and, or, xor and bitwise shifting. The equivalent in C++ would be the &(and), |(or), ^(xor), >> right shift, > i ) ;
aux2 = ((cheSuOut
& 0x8000)
>>15);
/*---[ Xor 1 ]-------------*/
aux = aux
^ aux2;
/*---[ Xor 2 ]-------------*/
aux2 = (( ( (cheSuOut
& 0x0010)>>4 )
^ aux));
/*---[ Xor 3 ]-------------*/
aux3 = (( ( (cheSuOut
& 0x0800)>>11 )
^ aux));
/*---[ Shift ]-------------*/
cheSuOut = (cheSuOut
<< 1);
/*---[ Inyection]-------------*/
cheSuOut = cheSuOut + aux;
if ( aux2 == 1 ){
cheSuOut= cheSuOut
| 0x0020;
}else{
cheSuOut= cheSuOut
& 0xFFDF;
}
if ( aux3 == 1 ){
cheSuOut= cheSuOut
| 0x1000;
}else{
cheSuOut= cheSuOut
& 0xEFFF;
}
mask= (mask
<<1);
}
}
Thank you!