Log in

View Full Version : Jump if not below | another question to moderators


__DuDu__
February 16th, 2001, 21:46
i did a question about hash and i can't find it anymore i did +- 25 days ago and it's not on database someone deleted it ?

my other question is

add edx, 34
shl edx, 32
jnb 00404123

how can i check in what condidtion it'll jump if below ? the program is always jumping and i need to make it continue the xecution without jumping so i need to know how to find what makes it jump if below coz there's no cmp edx, eax \ jnb xxx !

of course i don't wanna patch

tnx
__DuDu__

CoDe_InSiDe
February 17th, 2001, 02:03
Hi __DuDu__

It depends that when your on the jnb xxxxxxxx the value in EDX is equal or above the value 00000000.
If it's equal or above it'll jump, otherwise it'll continue.
There's no need for a "cmp xxx, xxx" to make something jump, look at this example:

mov eax, 01
sub eax, 01
jz xxxxxxxx

In this example it'll jump because the value in EAX is 00000000 and so the "Z" flag is set when you enter the "jz xxxxxxxx".
Hope this helps.

Cya...

CoDe_InSiDe

Solomon
February 17th, 2001, 02:05
According to the "Art of ASM",

JNB: jump if Carry = 0

The SHL instruction sets the condition code bits as follows:
1. If the shift count is zero, SHL will not affect any flags.
2. The Carry flag contains the last bit shifted out of the High Order bit of the operand.

So if u want it not to jump, the following condition should be satisfied:
(edx + 0x34) & 1 = 1 => edx & 1 = 1

regards