flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > Stop macro and continue. |
Author |
|
Overclick 21 Mar 2023, 06:09
It is not clear what exactly you want.
If you want to insert some string into middle of macro-body then you can do it by a lot of different ways: equ, macro, .stream(multisection) |
|||
21 Mar 2023, 06:09 |
|
Roman 21 Mar 2023, 10:14
Not only string.
Any asm commands or any macros. |
|||
21 Mar 2023, 10:14 |
|
Overclick 21 Mar 2023, 20:58
Quote:
So why not? Code: macro ee ... { ... inject ... } .data ... macro inject { db 'Tom address',0 db 10 dup(5,3) } ee ... Code: macro ee ... { ... inject1 inject2 inject3 inject4 inject5 ... } inject1 equ inject2 equ inject3 equ inject4 equ inject5 equ .data ... inject1 equ db 'Tom address',0 inject2 equ db 10 dup(5,3) ee ... .stream solution is better when you need to combine peaces into the block from different parts of project Code: macro ee ... { ... .stream Inject ... } .data ... .frame Inject db 'Tom address',0 db 10 dup(5,3) .data ee ... |
|||
21 Mar 2023, 20:58 |
|
Roman 22 Mar 2023, 02:23
Quote:
For any other case I needed write another inject macro. Not handful. Easy have macro ee and ee_ |
|||
22 Mar 2023, 02:23 |
|
Overclick 24 Mar 2023, 14:57
Redefine "continue" then
Code: macro ee { msg db 'One ' purge continue macro continue \{ db 'Three ' \} } ee db 'Two ' continue db 'Four',0 |
|||
24 Mar 2023, 14:57 |
|
Roman 25 Mar 2023, 06:59
Any macro must redefined continue.
|
|||
25 Mar 2023, 06:59 |
|
Overclick 25 Mar 2023, 07:16
Yes. That means universal directive for your purpose to continue the job ee-like macros begins. Exactly the solution you asked at first post
|
|||
25 Mar 2023, 07:16 |
|
macomics 25 Mar 2023, 07:17
That's better
Code: macro continue { } macro ee { msg db 'One ' macro continue \{ db 'Three ' \purge continue \} } continue ee db 'Two ' continue db 'Four',0 continue continue continue ; 'One Two Three Four', 0 |
|||
25 Mar 2023, 07:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.