flat assembler
Message board for the users of flat assembler.

Index > Main > "define" vs "equ" vs "="

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
edfed



Joined: 20 Feb 2006
Posts: 4324
Location: Now
edfed 13 May 2014, 07:36
Code:
cr equ 13
lf equ 10
CR = 13
LF = 10
crlf equ cr,lf
CRLF equ CR,LF

db "hello",crlf,"world",0
    


impossible to do a CRLF = CR,LF cause = is a label/value assignation
and CR,LF is not a value, it is two values separated by comma.
etc...
Post 13 May 2014, 07:36
View user's profile Send private message Visit poster's website Reply with quote
m3ntal



Joined: 08 Dec 2013
Posts: 296
m3ntal 14 May 2014, 00:11
My response was excluded:
Quote:
Ah, I forgot! Too much pain medicine. define does the substitution but does not resolve equates
"Never use preprocessor with assembly directives" - We do it all of the time. Example:
Code:
a equ 1
b=a    
I'm not going to follow John's stupid absolute rules. I write code however I want and don't give a damn what John thinks.
Post 14 May 2014, 00:11
View user's profile Send private message Reply with quote
l_inc



Joined: 23 Oct 2009
Posts: 881
l_inc 15 May 2014, 12:58
m3ntal
JohnFound did and does a diligent and extensive job making Fresh. I would rather respect his experience and rules evolved out of it. But I try to avoid following unfounded dogmata. That is why I wanted to know the reasoning behind his statement.

_________________
Faith is a superposition of knowledge and fallacy
Post 15 May 2014, 12:58
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< 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.