flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Macroinstructions > How to exit from macro

Author
Thread Post new topic Reply to topic
emil



Joined: 16 Dec 2003
Posts: 70
Location: egypt
How to exit from macro
Hi All,

Suppose you have a macro and want to exit from the macro in certain position before end of macro ?
Post 02 Mar 2017, 15:03
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6179
Location: Kraków, Poland
It is not possible. Such an idea does not work well with the design of fasm's language.
Post 02 Mar 2017, 17:03
View user's profile Send private message Visit poster's website Reply with quote
redsock



Joined: 09 Oct 2009
Posts: 243
Location: Australia
If I understand the question correctly, can't you use local labels?

To "exit" from it simply means "go to the end", so I have made local labels like this (forgive the overly simple example):

Code:
macro dosomething {
        local .alldone

        test    eaxeax
        jnz     .alldone
        call    somethingelse

.alldone:
}



_________________
2 Ton Digital - https://2ton.com.au/
Post 03 Mar 2017, 03:59
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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.