flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Interrupt preprocessing early

Author
Thread Post new topic Reply to topic
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 27 Dec 2022, 16:22
I feel it has recently been discussed but I can’t really find the topic (except for one related to repeating macro blocks).

When writing in a FASMW editor, it’s quite convenient to use plain string literals as error messages:
Code:
match =something , bad happened { 'Something bad happened.' }    

This makes FASMW show the string in the error window, without the err directive. But the preprocessing is then continued which, although will not produce any output file later, just seems to be wrong, ’cause the error condition has already been detected and there’s no need to proceed.

Is there any way to interrupt preprocessing stage early at particular point in code? (preferably without intervening what the FASMW error window will show)
Post 27 Dec 2022, 16:22
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 27 Dec 2022, 20:39
There are several kinds of faults that make the preprocessor stop, including a "too much arguments to a macro" error. You could use that one as following:
Code:
macro stop {} ; this macro now expects no arguments

match =something , bad happened { stop 'Something bad happened.' }    
Post 27 Dec 2022, 20:39
View user's profile Send private message Visit poster's website Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 27 Dec 2022, 21:41
Sadly, this one doesn’t make FASMW show the string in its error window.
Post 27 Dec 2022, 21:41
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 27 Dec 2022, 22:23
Errors that occur during preprocessing never do.
Post 27 Dec 2022, 22:23
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.