flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > .while macros

Author
Thread Post new topic Reply to topic
Crinan



Joined: 05 Dec 2006
Posts: 28
Location: New Zealand
Crinan
I have a couple of simple macros that I use a lot and that may be useful to others. They extend the use of .while -- .endw

.break This macro within a .while loop breaks the loop and resumes at the instruction following .endw
Note that .while is happy with no parameters.
.cont This macro stops processing and loops back to the .while instruction.

The macros are:
macro .break { jmp __ENDW }
macro .cont { jmp __WHILE }
Post 12 Jan 2012, 20:17
View user's profile Send private message Reply with quote
Mike Gonta



Joined: 26 Dec 2010
Posts: 240
Location: the-ideom
Mike Gonta
See also fasmx - .while with .break .and continue
Also includes .break .if and .continue .if


Last edited by Mike Gonta on 29 Apr 2013, 23:02; edited 2 times in total
Post 12 Jan 2012, 22:51
View user's profile Send private message Visit poster's website Reply with quote
Crinan



Joined: 05 Dec 2006
Posts: 28
Location: New Zealand
Crinan
Thanks for that info, I was not aware of them.
Are they documented anywhere?
(I wonder if the wheel was invented more than once ...)
Post 13 Jan 2012, 19:27
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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.