It's my first try on C like syntax.:confused:
following lines can't be compiled.

error msg -->invalid instruction operands


.if (_MousePosX>=_ULCornerX && _MousePosY>=_ULCornerY) && (_MousePosX<=_DRCornerX && _MousePosY<=_DRCornerY)

;//some code here


;//some code here



if I change the variables into registers all compiles fine.

Here my question:

C-like-syntax code like above only works with registers?

thanks for replies:(
Posted on 2002-07-06 09:35:52 by CRYO
Don't use C-like syntax :)
Don't forget you can't compare two memory operands. If _MousePosX and _ULCornerX are in memory, you can't compare them directly. You have to move at least one in a register.
Posted on 2002-07-06 09:39:45 by Dr. Manhattan
thanks Dr.Manhatten

really fast reply:alright:

I give it a try

An advantage of this style is the good readability in the source, i think.
Posted on 2002-07-06 09:47:12 by CRYO
As far as I know, MASM doesn't like too many brackets.
Posted on 2002-07-06 09:57:50 by comrade
It might be that you need spaces around the >= and <= operators.
Posted on 2002-07-06 19:27:13 by grv575
Are you sure its <= and not =<?
Posted on 2002-07-06 19:52:38 by comrade