flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > break out early of repetition macros: rept, irp, irps, irpv? |
Author |
|
CandyMan 09 Feb 2018, 08:41
"break" is possible only in "repeat", "while"
_________________ smaller is better |
|||
09 Feb 2018, 08:41 |
|
fabbel 09 Feb 2018, 14:25
i see.. really too bad.. is there any alternative way to replicates sthg roughly simililar a while / end while loop at preprocessing stage ?
e.G. use case : 1/build a list of values using a symbolic constant, redefining it several time (multiple EQU's / DEFINEs) 2/ lookup a particular value in that list =>easy to iterate thru the values using irpv till i find the searched item, but then how can i exit the loop once the value is found ? i am forced to iterate anyway till the end of the list.... |
|||
09 Feb 2018, 14:25 |
|
revolution 09 Feb 2018, 17:04
fabbel wrote: i am forced to iterate anyway till the end of the list.... The preprocessor only runs once, unlike the assembler, so if list is very large you might notice some slowdown. |
|||
09 Feb 2018, 17:04 |
|
fabbel 09 Feb 2018, 17:22
indeed, i had devised this workaround (i.e. set some variable to say "found", and ignore future iterations based upon that variable)... but that just looks a bit silly to me. Would such feature be so tricky to add to fasm preprocessor ? i am having a hard time understanding why it would make less sense to have it in preprocessing stage loop constructs, while it was seen very sensible and implemented for assembly time loop constructs .. and after all, that looks very much like a very basic feature of any kind of automated processing...
|
|||
09 Feb 2018, 17:22 |
|
l4m2 03 Apr 2018, 03:06
Does a macro that remain input help if "break" change it into an empty one
|
|||
03 Apr 2018, 03:06 |
|
revolution 03 Apr 2018, 04:29
l4m2 wrote: Does a macro that remain input help if "break" change it into an empty one |
|||
03 Apr 2018, 04:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.