flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Does FASM provides line numbers at compilation time?

Author
Thread Post new topic Reply to topic
AsmGuru62



Joined: 28 Jan 2004
Posts: 1671
Location: Toronto, Canada
AsmGuru62 24 Oct 2009, 20:18
Hi, everyone.

I am developing a class (or object, if you like) for Assertions. I hope you guys know what they are. If you aware of C/C++ - you should be familiar with these useful things. They provide run-time checks in the code, but only in _DEBUG build.

In C/C++ if compiler encounters __FILE__ - it will be replaced with a file name currently being compiled. If compiler "sees" __LINE__ - it will be replaced by the line number currently being compiled.

Anyway, I need to know the line numbers (and file names, if possible) at the assembling time. I could not find any indication that FASM provides that. Does it have any reserved keywords, like __LINE__ and __FILE__ in C/C++?

Alex.
Post 24 Oct 2009, 20:18
View user's profile Send private message Send e-mail Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 24 Oct 2009, 20:31
There is no such thing in the official releases, however you can add at least special symbol for line number quite easily, as it was discussed before in this thread: http://board.flatassembler.net/topic.php?t=1154
Post 24 Oct 2009, 20:31
View user's profile Send private message Visit poster's website Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1671
Location: Toronto, Canada
AsmGuru62 24 Oct 2009, 22:33
Tomasz! That was quick!
Thanks, I'll take a look at the thread.
Post 24 Oct 2009, 22:33
View user's profile Send private message Send e-mail 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.