Hi all,

Does anyone know how to implement the expression below in very little instructions:

if(y < 0 || (y == 0 && x >= 0)) a++;

The >= operator on the right can also be > (x cannot be zero). Obviously I want to avoid using conditional jumps. What I've come up with so far is:

But I'm sure you gurus know much faster/shorter ways to do this. 8)

Does anyone know how to implement the expression below in very little instructions:

if(y < 0 || (y == 0 && x >= 0)) a++;

The >= operator on the right can also be > (x cannot be zero). Obviously I want to avoid using conditional jumps. What I've come up with so far is:

```
```

mov eax, y

shr eax, 31

add a, eax

mov eax, x

neg eax

mov ecx, y

shr eax, cl

shr eax, 31

add a, eax

But I'm sure you gurus know much faster/shorter ways to do this. 8)

Here is one that uses 6 instructions.

```
mov eax,x
```

mov ecx,y

add eax,eax

adc ecx,-1

add ecx,ecx

adc a,0

That's truely incredible. :shock: Thank you very much Sephiroth3!