? is "if", so you'd do some sort of comparison.
Code:
// SomeVar = (SomeOtherVar == 1 ? 4 : 5)
// eax = SomeVar
// ebx = SomeOtherVar
cmp ebx,1;
jne SetToFive;
mov eax,4;
jmp SomeWhereElse;
SetToFive:
mov eax,5;
jmp SomeWhereElse;
| is "or" so you'd combine comparisons.
Code:
// SomeVar == 1 | SomeOtherVar == 1 -> TheThirdVar = 1;
// eax = SomeVar
// ebx = SomeOtherVar
// ecx = TheThirdVar
cmp eax,1;
je SetThirdVarToOne; // IF eax == 1
cmp ebx,1;
je SetThirdVarToOne; // OR ebx == 1
jmp SomeWhereElse; // otherwise
SetThirdVarToOne:
mov ecx,1;
jmp SomeWhereElse;
Bookmarks