How do I compare two points to see if they are the same? If the point-struct was defined as two words it would have been easy, but it is two dwords :(

/Delight

/Delight

```
```

mov eax, a.x

mov edx, a.y

xor eax, b.x

xor edx, b.y

or eax, edx

jnz not_equal

Mirno

Thank you very much Mirno :alright:

/Delight

/Delight

how about this

or if it's 2 points in differnet structures

```
mov eax, a.x
```

mov edx, a.y

xor eax, edx

jnz Not_equal

**EDIT**or if it's 2 points in differnet structures

```
mov eax, a.x
```

mov edx, b.x

xor eax, edx

jnz Not_equal

**Kudos**you are only comparing the first element of 2 structures, rather than both elements of 2 structures.

By checking both axis of a pair of points, you know whether or not it is the same point, while you only check to see whether it is on the same plane (as your second example), or whether it is equidistant from the x axis and y axis (ie it is at an angle of 45 degrees from the origin (assuming square points)) (as your first example does).

If this is your aim, then why use a second register? It would be easier, faster, and less destructive (we'd leave edx in tact) to do this:

```
```

mov eax, a.x

sub eax, a.y ; or b.x

jnz not_equal

Mirno

aww for some reason I took "Compare two points" to mean 2 values :eek: