flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > generate a symbol |
Author |
|
revolution 10 Feb 2020, 15:20
Use the rept.
Code: rept 50 x:1 { label sym1_#x at x*4 sym2_#x: mov eax,[sym1_#x] } mov ebx,[sym1_15] mov ebx,[sym2_37] |
|||
10 Feb 2020, 15:20 |
|
sts-q 10 Feb 2020, 20:01
It works,
... but not for me, because counter-variable x gets not replaced when i use it inside an other macro. Code: macro m { rept 1 x:0 \{ mysym equ sym_#x \} mysym: } it creates sym_x: and not sym_0: |
|||
10 Feb 2020, 20:01 |
|
revolution 10 Feb 2020, 20:09
You need to escape the # also.
Code: macro m { rept 1 x:0 \{ mysym equ sym_\#x \} mysym: } |
|||
10 Feb 2020, 20:09 |
|
sts-q 11 Feb 2020, 04:49
Thank you! |
|||
11 Feb 2020, 04:49 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.