flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Parsing complex DUP with fasmg |
Author |
|
Tomasz Grysztar 08 Apr 2019, 09:41
And now a faster implementation that uses a less general approach and only starts counting brackets when it actually sees the DUP:
Code: macro withdup: instr, data& local a,c,tmp a = 0 iterate el, data if a <> 0 match prev, tmp redefine tmp prev,el end match a rnbalance el else match count =dup? val, el c = count redefine tmp val a rnbalance val else c = 0 instr el end match if c > 0 & (a = 0 | % = %%) match (val), tmp repeat c withdup instr, val end repeat else match val, tmp repeat c withdup instr, val end repeat end match end if end iterate end macro |
|||
08 Apr 2019, 09:41 |
|
ProMiNick 08 Apr 2019, 14:20
Fasm in no more needed to be compatibable with others dead assemblers (that were mainstream teen yars ago) - now fasm is mainstream - and increasing clearity of syntax (removing alien elements) is good.
(...) encapsulation looks alien to fasm1 syntax, while <...> is native. May be replace this? Why fasmg should suffer with dead assemblers compatibility too? |
|||
08 Apr 2019, 14:20 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.