flat assembler
Message board for the users of flat assembler.

Index > Main > How to use a C-like preprocessor order like #warning???

Author
Thread Post new topic Reply to topic
jhonny6721



Joined: 07 Aug 2014
Posts: 26
jhonny6721 10 Sep 2014, 21:42
Hello, I am writing a program. I want to display a message in the compiler output when it reads that line. For example:

Code:
#warning "You are compiled a deprecated version of the source!!"
    


In C compilers, this displays a message in the compiler window. Have FASM its own #warning directive like C has it??? Can you tell me how to use it???

_________________
Мне нравится программирование.
Post 10 Sep 2014, 21:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20518
Location: In your JS exploiting you and your system
revolution 10 Sep 2014, 21:46
Try with display
Code:
display 'All your byte are belong to us'    
Post 10 Sep 2014, 21:46
View user's profile Send private message Visit poster's website Reply with quote
jhonny6721



Joined: 07 Aug 2014
Posts: 26
jhonny6721 11 Sep 2014, 02:48
Thanks you, revolution. Your help has solved my problem. Do you know if I can use the conditional compilation in FASM???

How Can I make this in Assembler??? (A conditional compilation)

Code:
#ifndef ASM_MODULE
#define ASM_MODULE

;Your code goes here

#endif

#ifdef COMPILE_THIS

;Your code here

#endif

    


Please, if you know a site where I can get a equivalent C-like directives, tell me

_________________
Мне нравится программирование.
Post 11 Sep 2014, 02:48
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20518
Location: In your JS exploiting you and your system
revolution 11 Sep 2014, 10:42
Post 11 Sep 2014, 10:42
View user's profile Send private message Visit poster's website Reply with quote
shutdownall



Joined: 02 Apr 2010
Posts: 517
Location: Munich
shutdownall 11 Sep 2014, 11:07
jhonny6721 wrote:

How Can I make this in Assembler??? (A conditional compilation)


You may take a look in the documentation

http://flatassembler.net/docs.php?article=manual

for conditional assembly AND conditional preprocessing
which is also helpful on preprocessing level (match directive).
Post 11 Sep 2014, 11:07
View user's profile Send private message Send e-mail Reply with quote
jhonny6721



Joined: 07 Aug 2014
Posts: 26
jhonny6721 11 Sep 2014, 23:16
Thanks for your help, revolution and shutdownall. Your links were very useful to solve my problems.

_________________
Мне нравится программирование.
Post 11 Sep 2014, 23:16
View user's profile Send private message 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.