x86 cmpl and jne

Cmpl subtracts -0x10(%ebp) from $0x7 and modifies flags: AF CF OF PF SF ZF.

  1. If memory at -0x10(%ebp) equals immediate 0x7 then the flag ZF is set. This is below EBP so it’s probably a local variable, if this is an un-optimized build using EBP as a frame pointer.
  2. jne 80484db means that if the two compared numbers are different (ZF=0), jump to 80484db

To summarize, your code is equivalent to :

compare A to 7
jump to 0x80484db if they are different.

Leave a Comment