The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: anuradha on April 10, 2007, 05:01:36 PM

Title: Eqators
Post by: anuradha on April 10, 2007, 05:01:36 PM
hi people
I have 2 questions

1.What is the different between "EQU" and "="?
2.what is "IDEAL" mode?

Can any one help me please.
thanks :lol
Title: Re: Eqators
Post by: Merrick on April 10, 2007, 06:28:38 PM
just for giggles, write a small program using all "=" and another identical program replacing all "=" with "EQU". Compile and check for differences in the results.
Title: Re: Eqators
Post by: zooba on April 11, 2007, 09:46:09 AM
EQU defines a constant while = assigns a value to a compile-time variable.

IDEAL mode is an option in TASM which changes the behaviour away from MASM compatible.

Cheers,

Zooba :U
Title: Re: Eqators
Post by: Tedd on April 11, 2007, 01:00:53 PM
You can treat them as pretty much exactly the same, but for one difference - EQU can't be re-assigned a value.

So the following is fine:
blah = 10
;there's probably be some code between the two
blah = 20


..while this will cause a compiler warning:

blah EQU 10
;there's probably be some code between the two
blah EQU 20