-
Notifications
You must be signed in to change notification settings - Fork 28
900_notes
test eax,eax | if eax == 0: | if !eax:
je 123456 | jump_to(123456) | jump_to(123456)
test eax,eax | if eax != 0: | if eax:
jne 123456 | jump_to(123456) | jump_to(123456)
cmp eax,8 | if eax == 8:
je 123456 | jump_to(123456)
test cl, cl ; set ZF to 1 if cl == 0 je 0x804f430 ; jump if ZF == 1
mov dword ptr ss:[ebp],eax ; store value of eax into address ebp
mov eax,dword ptr ss:[ebp] ; put value from address ebp into eax
lea edx,dword ptr ss:[ebp-20] ; edx = ebp - 20
cmp dword ptr ss:[ebx], 0 jne 0x804f430
Mnemonic Condition tested Description
jo OF = 1 overflow jno OF = 0 not overflow jc, jb, jnae CF = 1 carry / below / not above nor equal jnc, jae, jnb CF = 0 not carry / above or equal / not below je, jz ZF = 1 equal / zero jne, jnz ZF = 0 not equal / not zero jbe, jna CF or ZF = 1 below or equal / not above ja, jnbe CF and ZF = 0 above / not below or equal js SF = 1 sign jns SF = 0 not sign jp, jpe PF = 1 parity / parity even jnp, jpo PF = 0 not parity / parity odd jl, jnge SF xor OF = 1 less / not greater nor equal jge, jnl SF xor OF = 0 greater or equal / not less jle, jng (SF xor OF) or ZF = 1 less or equal / not greater jg, jnle (SF xor OF) or ZF = 0 greater / not less nor equal
MOV: does not change flags ADD: changes flags https://www.felixcloutier.com/x86/add
CALL: push return address on stack, then go to the function RET: pop return address from stack and go there (RET with arg pops that many bytes? from stack AFTER retrieving the return address)