The MASM Forum

General => The Campus => Topic started by: Ficko on December 29, 2012, 04:40:34 AM

Title: Macro compare to -1
Post by: Ficko on December 29, 2012, 04:40:34 AM
Hi!
Is there a better - "more elegant" - way to decide a macro parameter is (-1) than:  ::)


Pilot MACRO M1, M2
IF (M2 EQ -1) OR (M2 EQ 0FFFFFFFFh)
%ECHO DEBUG
ENDIF
ENDM
Title: Re: Macro compare to -1
Post by: qWord on December 29, 2012, 04:53:08 AM
IFE M2 XOR -1
Title: Re: Macro compare to -1
Post by: Ficko on December 29, 2012, 05:28:18 AM
Thanks qWord,

You rock. ;)
Title: Re: Macro compare to -1
Post by: dedndave on December 29, 2012, 07:55:42 AM
IFE M2+1

:P
Title: Re: Macro compare to -1
Post by: Ficko on December 29, 2012, 09:02:02 AM
That works too Dave tk. :t