Posts

Showing posts with the label Mnemonics

Assembly JLE Jmp Instruction Example

Answer : The jump itself checks the flags in the EFL register. These are usually set with TEST or CMP(or as a side effect of many other instructions). CMP ebx,10 JLE there CMP corresponds to calculating the difference of the operands, updating the flags and discarding the result. Typically used for greater/smaller checks TEST corresponds to calculating the binary AND of the operands, updating the flags and discarding the result. Typically used for equality checks. See also: The art of assembly language on CMP As a sidenote: You should get the Intel reference manuals. In particular the two part "Intel® 64 and IA-32 Architectures Software Developer's Manual Volume 2: Instruction Set Reference" which describes all x86 instructions. JLE instruction conducts two tests: Signed Flag ( SF ) != Overflow Flag ( OF ) Zero flag ( ZF ) == 1 If Zero flags is 1 and Signed Flag and Overflow Flag are not equal, then the short relative jump will be executed. Maybe...