flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > are macros that can do expression evaluation supported ? Goto page 1, 2 Next |
Author |
|
fasmFUN 19 Aug 2020, 13:39
hey all.
are macros that can do expression evaluation supported ? maybe something like this http://masm32.com/board/index.php?topic=94.0 ? |
|||
19 Aug 2020, 13:39 |
|
bitRAKE 20 Aug 2020, 01:32
fasm can solve basic algebra at assemble-time. And fasmg even more powerful. Given the 35 page post at the forum, it seems like you are looking for a code generator, though. If that is the case, why not just use a compiler then? A far more powerful tool for code generation.
|
|||
20 Aug 2020, 01:32 |
|
fasmFUN 22 Aug 2020, 17:35
bitRAKE wrote: it seems like you are looking for a code generator, though. why not just use a compiler then? SO from your question i GUESS that the answer is: 'NO it's NOT possible. look for a better assembler.' |
|||
22 Aug 2020, 17:35 |
|
bitRAKE 22 Aug 2020, 19:38
I'm glad you are able to get around to what you are trying to say.
_________________ ¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup |
|||
22 Aug 2020, 19:38 |
|
revolution 22 Aug 2020, 23:42
Expression evaluation is native in the assembler. No need for a macro to do it.
Code: mov eax, 1 + 2 * (3 + 4) |
|||
22 Aug 2020, 23:42 |
|
fasmFUN 26 Aug 2020, 21:18
revolution wrote: Expression evaluation is native in the assembler. No need for a macro to do it. and with variables ? |
|||
26 Aug 2020, 21:18 |
|
revolution 26 Aug 2020, 22:50
fasmFUN wrote:
|
|||
26 Aug 2020, 22:50 |
|
fasmFUN 03 Oct 2020, 18:06
Quote: Yes. fasm is multi-pass and it can solve many expressions with variables or constants. Try it. i found that it can not do complex expression that evaluate to more than one instruction |
|||
03 Oct 2020, 18:06 |
|
DimonSoft 03 Oct 2020, 19:49
Example required.
|
|||
03 Oct 2020, 19:49 |
|
fasmFUN 10 Oct 2020, 20:01
DimonSoft wrote: Example required. yes. do you have one ? |
|||
10 Oct 2020, 20:01 |
|
Furs 11 Oct 2020, 16:55
fasmFUN wrote: i found that it can not do complex expression that evaluate to more than one instruction |
|||
11 Oct 2020, 16:55 |
|
DimonSoft 11 Oct 2020, 17:24
fasmFUN wrote:
Example of what you were looking for. |
|||
11 Oct 2020, 17:24 |
|
fasmFUN 15 Oct 2020, 01:12
Furs wrote:
but first they evaluate to asm instruction anyway the meaning is that the compiler can handle only simple expressions for examples: mov eax,1*2+(3/4) is a very simple expression because it evaluate to single asm instruction this one: mov eax, bb(n,2,3) is complex because it should be evaluated to several instructions which what i'm looking for from the compiler at least with macros as in the example link on top of thread |
|||
15 Oct 2020, 01:12 |
|
revolution 15 Oct 2020, 03:19
fasmFUN wrote: this one: This? Code: mov eax,bbn mov eax,bb2 mov eax,bb3 Code: irp v,n,2,3 { mov eax,bb#v } Show us what you want to do and it can probably be done. |
|||
15 Oct 2020, 03:19 |
|
Tomasz Grysztar 15 Oct 2020, 09:50
Correct me if I'm wrong, but I suspect this thread is actually about inline macros.
|
|||
15 Oct 2020, 09:50 |
|
fasmFUN 17 Oct 2020, 16:29
revolution wrote:
no , very SIMPLE example from this-> mov [a],bb(n,2,3)+1 to this-> push n,2,3 call bb add eax,1 mov [a], eax and even more HL a = bb(n,2,3)+1 also in if statement if bb(n,2,3)+1>1 then ... |
|||
17 Oct 2020, 16:29 |
|
fasmFUN 17 Oct 2020, 16:37
Tomasz Grysztar wrote: Correct me if I'm wrong, but I suspect this thread is actually about inline macros. thank you very much very interesting. now i need to look for such examples. |
|||
17 Oct 2020, 16:37 |
|
DimonSoft 17 Oct 2020, 19:04
fasmFUN wrote: no , So, why are you asking low-level language to be a high-level language? I guess, choosing the right tool for each set of requirements is the way to go. |
|||
17 Oct 2020, 19:04 |
|
Furs 18 Oct 2020, 12:26
fasmFUN wrote:
|
|||
18 Oct 2020, 12:26 |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.