flat assembler
Message board for the users of flat assembler.

Index > Main > is it possible to generate conditional error for fasm?

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 501
Location: Belarus
zhak 26 Jul 2008, 19:39
hi everyone!
for example, I have one variable DELAY_TIME = N, where N may be from 1 to 9. if this requirement is met, then source code should be compiled, but if DELAY_TIME is set to 12, for example, then fasm should abort compilation and raise an error. is it possible to do such a thing? thanks
Post 26 Jul 2008, 19:39
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 27 Jul 2008, 03:07
Code:
DELAY_TIME=11

org 100h

if DELAY_TIME > 9
you_are_stupid
end if

mov ax,9
mov dx,msg
int 21h
ret

msg db 'Hello, world!$'
    


Quote:

C:\cmtsolit\tmp>fasm test.asm
flat assembler version 1.67.26 (413557 kilobytes memory)
test.asm [6]:
you_are_stupid
error: illegal instruction.


Laughing
Post 27 Jul 2008, 03:07
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.