flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Conditional Macro

Author
Thread Post new topic Reply to topic
kidscracker



Joined: 29 Oct 2004
Posts: 46
kidscracker 20 Sep 2005, 21:52
I want to use differents macros depending on a constant in that way:
Code:
IF UNICODE
display "Use UNICODE",0Dh,0Ah
macro   Text NLabel, Texto
{
        local   ..jm
        jmp     @F
        #NLabel:
        du      Texto,0
..jm:
}
ELSE
display "Use ANSI",0Dh,0Ah
macro   Text NLabel, Texto
{
local   ..jm
jmp     ..jm
#NLabel:
        db      Texto,0
..jm:
}
END IF    

But as I can see the last definition is used, no matter if UNICODE is or not defined.
Thnx in advance.
Post 20 Sep 2005, 21:52
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 20 Sep 2005, 22:01
Use "match" directive for conditional preprocessing - see the manual.
Post 20 Sep 2005, 22:01
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.