flat assembler
Message board for the users of flat assembler.

Index > Main > double loop anonymous labels?

Author
Thread Post new topic Reply to topic
lazer1



Joined: 24 Jan 2006
Posts: 185
lazer1 09 Jun 2006, 15:02
I want a macro which has a double loop,
the outer loop first does an inner loop to waste increasing
amounts of time
and then it does something and then does
an outer loop:

Code:

macro double_wait
    {
     push ecx
     push edx
     mov edx,1
@@:
     mov ecx,edx
     add edx,edx  ; keeps doubling till becomes 0,

     @@:
            sub ecx,1
            jne @b

     some_action 
     jne @b2 ; I want to jump 2 anon labels back  Razz 

     pop edx
     pop ecx
     }

    


I think I could do this by putting the inner loop into another macro,
but I was wondering if I can do "@b2" jump 2 anon labels
back directly?

if not, could this be implemented in a future version of fasm? Very Happy
Post 09 Jun 2006, 15:02
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8367
Location: Kraków, Poland
Tomasz Grysztar 09 Jun 2006, 15:29
http://board.flatassembler.net/topic.php?t=4870 - it has a macro solution (near the end)
Post 09 Jun 2006, 15:29
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.