flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > are macros that can do expression evaluation supported ?

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17716
Location: In your JS exploiting you and your system
revolution
fasmFUN wrote:
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
That is a stdcall in disguise. With the standard fasm macro set you can do it like this:
Code:
stdcall bb,3,2,n ; note the reversed push order to match your code sample
inc eax
mov [a],eax    
Post 20 Oct 2020, 08:31
View user's profile Send private message Visit poster's website Reply with quote
fasmFUN



Joined: 25 May 2019
Posts: 14
fasmFUN
DimonSoft wrote:
fasmFUN 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 ...

So, why are you asking low-level language to be a high-level language?

i quess you still don't understand , keep looking
clue: look at the link on top
good luck
Post 22 Oct 2020, 01:11
View user's profile Send private message Reply with quote
fasmFUN



Joined: 25 May 2019
Posts: 14
fasmFUN
revolution wrote:
note the reversed push order to match your code sample

thank you
Post 22 Oct 2020, 01:14
View user's profile Send private message Reply with quote
fasmFUN



Joined: 25 May 2019
Posts: 14
fasmFUN
revolution wrote:
stdcall bb,3,2,n ; note the reversed push order to match your code sample
inc eax
mov [a],eax


revolution thanks again for trying, this helps in some way
but not to this thread.
because what i'm looking
is for macros (general prefered)
to emit this series of instructions.

it would be very helpfull if some one could show an example of general
single macro
that can emit this (for example)
a=bb(n1,n2,n3+n2)-cc(n1,n2,n3-n2)

to a series of fasm instructions

instead of trying to teach me how to break this to the desired instructions MYSELF
Post 23 Oct 2020, 07:12
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.