flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > irp-macro invalid |
Author |
|
Tomasz Grysztar 16 Jul 2016, 07:24
You need to escape "common", "forward", and "`" too. Otherwise they are processed by the "irp" macro instead of becoming part of the inner ones.
Code: irp ty, db, dw, dd, dq { macro ty a, [b] \{ \common if \`a = 'byte' db b else if \`a = 'word' dw b else if \`a = 'dword' dd b else if \`a = 'qword' dq b else ty a b end if \} macro ty [args] \{ \forward match a b, args \\{ ty a, b \\} \} } |
|||
16 Jul 2016, 07:24 |
|
Tomasz Grysztar 16 Jul 2016, 08:15
I may also suggest a bit different approach:
Code: irp ty, db, dw, dd, dq { macro ty [args] \{ if 0 match a b, args \\{ else if a eq byte db b else if a eq word dw b else if a eq dword dd b else if a eq qword dq b \\} else ty args end if \} } dd word 3, 4 |
|||
16 Jul 2016, 08:15 |
|
l4m2 25 Jul 2016, 11:04
Okay I wanted to make PUSH QWORD 3 compied into PUSH DWORD 3 DWORD 0 but even with the macro seem not so easy
|
|||
25 Jul 2016, 11:04 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.