flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > macro list size,? |
Author |
|
revolution 09 Nov 2009, 01:27
Code: macro edfeds_list lable,[element] { common local .a dd lable dd .a-$-4 forward dd element common .a: } list1: edfeds_list list,element1,element2,element3 |
|||
09 Nov 2009, 01:27 |
|
edfed 09 Nov 2009, 13:18
super! genial, awesome, merci thanks.
i didn't know it was so easy. and if i want it on many lines, can i use the / or \ operator? line1: list,elem1,elem2/ elem3,elem4 edit: note it's a bit better now: Code: macro Gnode x,y,xl,yl,[element] { common local .a dd f.gnode dd x,y,xl,yl dd .a-$-4 forward dd element common .a: } bureau: Gnode 0,0,320,200,exitor,browser,chronos,clock,calendar but it needs a multiline possibility. |
|||
09 Nov 2009, 13:18 |
|
revolution 09 Nov 2009, 13:44
Use backslash for multi line:
Code: line1: list,elem1,elem2,\ elem3,elem4 |
|||
09 Nov 2009, 13:44 |
|
edfed 09 Nov 2009, 14:55
thanks!
i tryed but without the comma, that's why it didn't work! now it looks like this, Code: bureau: Gnode 0,0,320,200,\ exitor,\ browser,\ chronos,\ clock,\ calendar,\ .box .box: Box 0,0,320,200,Silver i prefer than old style, it is a bit cleaner. Code: bureau dd f.gnode, 0,0,320,200,@f-$-4 dd exitor dd browser dd chronos dd clock dd calendar dd .box @@: .box dd f.box,0,0,320,200,Silver and what can i do to ignore optional parenthesis inside the macro? line: Box (0,0,320,200,Silver) |
|||
09 Nov 2009, 14:55 |
|
revolution 09 Nov 2009, 16:24
edfed wrote: and what can i do to ignore optional parenthesis inside the macro? |
|||
09 Nov 2009, 16:24 |
|
edfed 09 Nov 2009, 18:06
of course, it is fasmw.
but it is not to replace '(' & ')' by ' ', but to permit useage of () for readability. |
|||
09 Nov 2009, 18:06 |
|
revolution 10 Nov 2009, 00:01
You could try using a meta-macro to strip the brackets.
Code: macro bracket_stripper [args] { common local params params equ args match =(nonce=),args \{params equ nonce\} edfeds_list params } |
|||
10 Nov 2009, 00:01 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.