flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > How to exit from macro

Author
Thread Post new topic Reply to topic
emil



Joined: 16 Dec 2003
Posts: 76
Location: egypt
emil
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: 7434
Location: Kraków, Poland
Tomasz Grysztar
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: 331
Location: Australia
redsock
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    eax, eax
        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


Copyright © 1999-2019, Tomasz Grysztar.

Powered by rwasa.