flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Repeat instruction in macro, according to macro parameter |
Author |
|
revolution 28 Apr 2017, 16:13
Code: macro MY_MACRO x { repeat x push eax end repeat } |
|||
28 Apr 2017, 16:13 |
|
alorent 28 Apr 2017, 16:59
Thanks revolution! You made my day again!
|
|||
28 Apr 2017, 16:59 |
|
revolution 28 Apr 2017, 17:19
You're welcome. Macros in fasm can be tricky things. But one thing to realise here is that repeat is executed at assembly time. There is another option using rept for preprocessor time execution.
|
|||
28 Apr 2017, 17:19 |
|
rugxulo 02 May 2017, 00:36
revolution wrote: repeat is executed at assembly time, rept at preprocessor time So which stage is times? Code: times 3 movsb times 4 : shr ax,1 It's mentioned right before repeat in the manual, so I assume they are similar. |
|||
02 May 2017, 00:36 |
|
revolution 02 May 2017, 04:02
times is assembly time evaluation.
|
|||
02 May 2017, 04:02 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.