nimm

Hi,
i have assembly code in my vc6 project.
I want to compare two DWORD valued

i tried the following code



DWORD dwValue1,dwValue2
.......
.......
__asm
{
mov eax dwValue1
cmp eax dwValue2 // problem.
jl L1

.....
.....

L1:
.....
.....
}

For large values I am not getting the expected results. I think its due to CMP instruction performing a signed comparison.

please tell me a method to compare unsigned integer (DWORD) values.

Regards




Re: Visual C++ General x86 asm code doubt - comparing 32 bit unsigned integers

Viorel.

The jl and jg instructions are for signed comparison. For unsigned, use jb and ja.





Re: Visual C++ General x86 asm code doubt - comparing 32 bit unsigned integers

nimm

thanks. It worked