flat assembler
Message board for the users of flat assembler.

Index > Main > Stupid question

Author
Thread Post new topic Reply to topic
a16b03



Joined: 24 Jan 2006
Posts: 43
Location: Riga, Latvia
a16b03 18 Feb 2007, 17:16
Whats the difference between equ and =
Post 18 Feb 2007, 17:16
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 18 Feb 2007, 17:52
RTFMC Wink

no really, "equ" defines a symbolic constant at preprocessor stage, which is done before any parsing/assembling of the actual assembler instructions. 2 important notes for "equ":
-symbolic constants are replaced with their values at preprocessor stage, so neither parser, assembler nor formatter knows about them!!!
-since symbolic constants are (basically) simple text substitutions, you can't use them for calculation like you can with numerical constants!!! (at least not that easy)

"=" defines a numerical constant at assembler stage after the preprocessing stage. Also some important notes about them:
-numerical constants are intended for 64bit integer calculations at assembler stage
-the preprocessor sees them, but doesn't know about their contents neither it can use them to do calculations!!!

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||


Last edited by MCD on 18 Feb 2007, 18:08; edited 1 time in total
Post 18 Feb 2007, 17:52
View user's profile Send private message Reply with quote
Garthower



Joined: 21 Apr 2006
Posts: 158
Location: Ukraine
Garthower 18 Feb 2007, 17:54
equ and "=" is equal opreators almost in all compilers of the assembler, including FASM.

And yes, your question is stupid. I agree with MCD, you need to read more documentation.
Post 18 Feb 2007, 17:54
View user's profile Send private message Visit poster's website MSN Messenger ICQ Number Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 18 Feb 2007, 20:30
Post 18 Feb 2007, 20:30
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.