• 汇编 OR运算


    知识点:
    
     OR运算
     逻辑或
     按位或
    
    
    一、OR运算
      12||1=1;   1||01=1;
      0||0=0;
       ||   //逻辑或
       |    //按位或
    
    int _tmain(int argc, _TCHAR* argv[])
    {
    	int i,j,k;
    	/*i=21;
    	j=65;*/
    	i=0x33; //0110011
    	j=0x66; //1100110
    	        //1110111
    	        //i|j=0x77;
    	k=i||j;//逻辑或0,1
    	__asm mov eax,eax
    
    	k=i|j; //按位或
    //00401006  |.  C745 FC 33000>MOV DWORD PTR SS:[EBP-4],33              ;  i=0x15=0010101
    //0040100D  |.  C745 F4 66000>MOV DWORD PTR SS:[EBP-C],66              ;  j=0x41=1000001
    //00401014  |.  837D FC 00    CMP DWORD PTR SS:[EBP-4],0               ;  i Or j=1010101
    //00401018  |.  75 0F         JNZ SHORT asm_OR.00401029
    //0040101A  |.  837D F4 00    CMP DWORD PTR SS:[EBP-C],0
    //0040101E  |.  75 09         JNZ SHORT asm_OR.00401029
    //00401020  |.  C745 F0 00000>MOV DWORD PTR SS:[EBP-10],0              ;  t=0;
    //00401027  |.  EB 07         JMP SHORT asm_OR.00401030
    //00401029  |>  C745 F0 01000>MOV DWORD PTR SS:[EBP-10],1              ;  t=1;
    //00401030  |>  8B45 F0       MOV EAX,DWORD PTR SS:[EBP-10]
    //00401033  |.  8945 F8       MOV DWORD PTR SS:[EBP-8],EAX             ;  k=t=i||j;
    //00401036  |.  8BC0          MOV EAX,EAX                              ;  __asm mov eax,eax
    //00401038  |.  8B4D FC       MOV ECX,DWORD PTR SS:[EBP-4]
    //0040103B  |.  0B4D F4       OR ECX,DWORD PTR SS:[EBP-C]              ;  ecx=i OR j
    //0040103E  |.  894D F8       MOV DWORD PTR SS:[EBP-8],ECX             ;  k=ecx
    
    
    
    
    	return 0;
    }
    
  • 相关阅读:
    Unity Shader 之 uv动画
    c++源文件后缀名问题
    Unity Shader 之 透明效果
    正则表达式
    Unity Shader基础
    Unity Shader 之 渲染流水线
    2017/11/22 Leetcode 日记
    2017/11/21 Leetcode 日记
    2017/11/13 Leetcode 日记
    2017/11/20 Leetcode 日记
  • 原文地址:https://www.cnblogs.com/whzym111/p/6371294.html
Copyright © 2020-2023  润新知