flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
macomics 09 Nov 2021, 04:05
For exam,
Code: macro some_macro_arg a, b { add a, b } macro some_macro args& { local .f define .f OK match =(a=),args \{ restore .f some_macro_arg a \} match =OK, .f \{ restore .f some_macro_arg args \} } some_macro ( [rbp], ax ) some_macro ( rsi, rdi ) some_macro rax, [rbx] some_macro cl,byte [r8+65536] struc db args& { local .f define .f OK match =(a=),args \{ restore .f \. db a \} match =OK, .f \{ restore .f \. db args \} } a db( "Hello, Operator.", 0Ah, 0h ) b db "Hello, Operator.", 0Ah, 0h |
|||
![]() |
|
nasm 09 Nov 2021, 12:34
Advanced text substitution.
|
|||
![]() |
|
andurilan 09 Nov 2021, 12:50
@macomics, TY, I will try this, but I was hoping to edit the source directly, in particular PREPROCESSOR.NIC and ASSEMBLER.INC . I'll report back later to see if this works for me.
@nasm, Yes, I already have a fasm preprocesor written in rust to take the file and remove certain characters to make it fasm compilable. I was just hoping to do it directly in fasm's source files, as it is way less work than adding a third step to compilation of my frontend compiler. |
|||
![]() |
|
nasm 09 Nov 2021, 13:05
You could use fasm's internal text substitution engine or you could use the one that comes with notepad++, it's a more powerful text substitution engine than the one inside fasm. Fasm's text substitution engine will give you a mile long source and it does minimal in practice, it's the opposite with notepad++'s text substitution, it will give you a lot of result from minimal source, it's very compact. People who have studied text substitution for decades disagree which of them are the most powerful.
_________________ The most important message in the universe is that the boss is trying to get us to judge each other, to create an obsession with catching something in someone, an obsession with searching. Judgement creates obsessions. Never ever judge. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.