flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > macro code injection |
Author |
|
gandalf 08 Mar 2009, 10:25
For now, I emulate local with restore.
|
|||
08 Mar 2009, 10:25 |
|
revolution 08 Mar 2009, 10:27
Have you tried it? You would probably get a faster answer by trying it for yourself.
|
|||
08 Mar 2009, 10:27 |
|
gandalf 08 Mar 2009, 11:41
revolution wrote: Have you tried it? You would probably get a faster answer by trying it for yourself. ??? |
|||
08 Mar 2009, 11:41 |
|
revolution 08 Mar 2009, 12:00
But you went to all the effort to make a nice post with code tags and everything. And yet you didn't test it? I thought it was rather odd to make such an effort and stop short of taking a few seconds to run it though the assembler.
So my question still stands did you test it? What result did you get? Did it work? |
|||
08 Mar 2009, 12:00 |
|
gandalf 08 Mar 2009, 13:22
revolution wrote: So my question still stands did you test it? What result did you get? Did it work? So you weren't kidding. I did test it. It didn't work. |
|||
08 Mar 2009, 13:22 |
|
revolution 08 Mar 2009, 13:32
I think I misunderstand your question.
Macro code can be instantiated into another macro. Which it appears is what you are doing in the first post. So I thought you had already worked out that is can be done. But now you say it can't be done so I am confused? |
|||
08 Mar 2009, 13:32 |
|
Tomasz Grysztar 08 Mar 2009, 14:29
The problem here is that macro processor doesn't recognize "local" keyword generated this way, because macro processor's special directives are processed before passing the line to standard line preprocessor (which evaluates the macro). It is explained in the Understanding fasm article, but in manual in section about order of processing I have perhaps forgot to mention it - I'm adding it to my TODO list for documentation now.
In short:: it won't work this way, and it is because of design, not a bug in implementation. |
|||
08 Mar 2009, 14:29 |
|
gandalf 08 Mar 2009, 16:27
Here's a simple workaround (for a similar situation):
Code: macro test1 mode, [args] { common \macro test2 [args2] \{ mode args2 \} test2 args purge test2 } test1 forward, <mov ax,1>, <mov ax,2> test1 reverse, <mov ax,1>, <mov ax,2> |
|||
08 Mar 2009, 16:27 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.