逻辑或 ||
int i, j, k;
i = 0x15;
j = 0x41;
k = i || j;
反汇编代码如下:
MOV DWORD PTR SS:[EBP-4], 15
MOV DWORD PTR SS:[EBP-C], 41
CMP DWORD PTR SS:[EBP-4], 0
JNZ SHORT asm_OR.00401029
CMP DWORD PTR SS:[EBP-C], 0
JNZ SHORT asm_OR.00401029
MOV DWORD PTR SS:[EBP-10], 0
JMP SHORT asm_OR.00401030
MOV DWORD PTR SS:[EBP-10], 1 //这条指令的地址是 00401029
MOV EAX, DWORD PTR SS:[EBP-10] //这条指令的地址是 00401030
MOV DWORD PTR SS:[EBP-8], EAX
_______________________________________________
位或 |
int i, j, k;
i = 0x15;
j = 0x41;
k = i | j;
反汇编代码如下:
MOV DWORD PTR SS:[EBP-4], 15
MOV DWORD PTR SS:[EBP-C], 41
MOV ECX, DWORD PTR SS:[EBP-4]
OR ECX, DWORD PTR SS:[EBP-C] 可见OR的两个操作数必须有一个是寄存器, 前后都可以.
MOV DWORD PTR SS:[EBP-8], ECX
时间: 2024-11-04 23:19:55