flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 26 Oct 2017, 17:57
You will need a bit more programming to do what you need. One thing to realise is that struc is really a macro that requires a leading label. So it is not possible to use it in the operands of anything.
A couple of methods would be to use a repeat loop, or a rept loop depending upon your requirements. Code: struc cell { ;... definition goes here } cells cell rept 19 { forward local dummy_label dummy_label cell } |
|||
![]() |
|
thrawn235 26 Oct 2017, 22:03
That seems to work. thanks so far.
But, i have tried to include the array in another struct, and that failed. I think its because of the nested {} of rept and the struc I've tried "repeat" and "end repeat", but that doesn't seem to process the local label correctly. Is there something else i can try ? |
|||
![]() |
|
revolution 26 Oct 2017, 22:27
To nest macros you use the backslash.
Code: struc { ;... rept \{ ;... \} } |
|||
![]() |
|
_shura 27 Oct 2017, 08:09
Code: struc cell n: 1 repeat n, count: 0 .item#count.value db 16 .item#count.value2 db 25 end repeat end struc in fasmg, something similar should work in fasm1 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.