flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > causing error at certain stages of compilation

Author
Thread Post new topic Reply to topic
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
i know how to cause error at preprocess time "macro *" and during final pass ("rb -1"). But how to cause error during parsing, and during any intermediate pass that reaches code?

if there are other stages, how to cause error there?
Post 10 Sep 2006, 20:49
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
Over time I successively got rid of parser stage errors, to make the separation of this stage from assembler "transparent". The language rules, as I'm now defining the in Understanding fasm article etc. do not define parser as a separate being. It's existence is only an internal optimization of fasm that generally should not affect the visible behavior of the compiler.

The "illegal instruction" and "symbol already defined" errors are an examples of immediate-termination assembler errors. They are signalized immediatelly when they're encountered.

As for causing error during a given pass, you may try the tricks like:
Code:
if ~xxx
 display 'pass 0'
else
 if ~yyy
  display 'pass 1'
  ; for example, put some illegal instruction here
 else
  ;...
 end if
 yyy = 1
end if
xxx = 1    
Post 14 Sep 2006, 10:34
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
nice trick... hehe, implementing it as macro seems harder than i thought

Quote:
The "illegal instruction" and "symbol already defined" errors are an examples of immediate-termination assembler errors. They are signalized immediatelly when they're encountered.

thanks
Post 14 Sep 2006, 11:46
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number 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-2020, Tomasz Grysztar.

Powered by rwasa.