Setcondition

ulong Setcondition(int code,ulong flags);

80x86 conditional commands have one of the following binary forms:

  0111cccc <8-bit offset> - short conditional jump commands (JNE, JC, ...)
  00001111 1000cccc <32-bit offset> -
long conditional jump commands (JNE, JC, ...)
  00001111 1001cccc r/m8 - set byte on condition (SETNE, SETC, ...)

Given cccc in the 4 least significant bits of the code and the contents of the 80x86 EFL register in flags, Setcondition() returns new combination of flags that satisfies given condition. If there are several possible solutions, it tries to make minimal possible changes.


Parameters:

code
(in) 80x86 condition code in the 4 least significant bits. All remaining bits are ignored
flags
(in) 80x86 flags register


Return values:

New contents of the flags register that meets the specified condition


See also:
Assembler and disassembler, Checkcondition()