i'm sort of a newbie to assembly, but have been a C programmer for a long time, so i'm not clueless about this stuff...
that being said, i am trying to compare a value agaist -1, (that is, 4294967295). for some reason, the sign bit is not getting set when i do this. i've tried js and jl, but neither work. i've tried switching the order of the operands and using jns and jge, but they obviously don't work either.
the code is:
cmp DWORD PTR [esp + ecx], edi
jns blah
edi holds 4294967295, and [esp + ecx] holds a smaller value (during my testing it usually contains something like 25600, but that's irrelevent). but for almost any value of [esp + ecx], the sign bit should be set after the cmp instruction. is there something i'm missing here? i'm using masm 6.15 if that has anything to do with it.
that being said, i am trying to compare a value agaist -1, (that is, 4294967295). for some reason, the sign bit is not getting set when i do this. i've tried js and jl, but neither work. i've tried switching the order of the operands and using jns and jge, but they obviously don't work either.
the code is:
cmp DWORD PTR [esp + ecx], edi
jns blah
edi holds 4294967295, and [esp + ecx] holds a smaller value (during my testing it usually contains something like 25600, but that's irrelevent). but for almost any value of [esp + ecx], the sign bit should be set after the cmp instruction. is there something i'm missing here? i'm using masm 6.15 if that has anything to do with it.