flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
fasmFUN
hey all.
are macros that can do expression evaluation supported ? maybe something like this http://masm32.com/board/index.php?topic=94.0 ? |
|||
![]() |
|
bitRAKE
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.
|
|||
![]() |
|
fasmFUN
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.' |
|||
![]() |
|
bitRAKE
I'm glad you are able to get around to what you are trying to say.
|
|||
![]() |
|
revolution
Expression evaluation is native in the assembler. No need for a macro to do it.
Code: mov eax, 1 + 2 * (3 + 4) |
|||
![]() |
|
fasmFUN
revolution wrote: Expression evaluation is native in the assembler. No need for a macro to do it. and with variables ? |
|||
![]() |
|
revolution
fasmFUN wrote:
|
|||
![]() |
|
fasmFUN
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 |
|||
![]() |
|
DimonSoft
Example required.
|
|||
![]() |
|
fasmFUN
DimonSoft wrote: Example required. yes. do you have one ? |
|||
![]() |
|
Furs
fasmFUN wrote: i found that it can not do complex expression that evaluate to more than one instruction |
|||
![]() |
|
DimonSoft
fasmFUN wrote:
Example of what you were looking for. |
|||
![]() |
|
fasmFUN
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 |
|||
![]() |
|
revolution
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. |
|||
![]() |
|
Tomasz Grysztar
Correct me if I'm wrong, but I suspect this thread is actually about inline macros.
|
|||
![]() |
|
fasmFUN
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 ... |
|||
![]() |
|
fasmFUN
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. |
|||
![]() |
|
DimonSoft
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. |
|||
![]() |
|
Furs
fasmFUN wrote:
|
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.