flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Fasm 1.73 how know if chA eqtype eax+value ?

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 825
Roman
I use:
Code:
macro a chR {
if chR eqtype eax
mov [chR],2
end if
}
a ebx
    

Its work.

But this not work. No asm code get. Empty.
Code:
a ebx+4
a edx+esi    
Post 31 Jul 2020, 13:32
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17714
Location: In your JS exploiting you and your system
revolution
Extend the if clause.
Code:
macro a chR {
if chR eqtype eax | chR eqtype eax+eax | chR eqtype eax+0
mov dword[chR],2
end if
}
a ebx
a eax+ebx
a eax+4    
Post 31 Jul 2020, 13:35
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 825
Roman
Thanks
Post 31 Jul 2020, 13:58
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 825
Roman
O ! Another problem
Code:
macro a chR,chB {
if chR eqtype eax | chR eqtype eax+eax | chR eqtype eax+0
      mov dword[chR],2
end if

if chR eqtype [] & chB eqtype eax | chB eqtype eax+eax | chB eqtype eax+0
      movss xmm1,[chB]
      movss chR,xmm1
end if }
a eax,ebx+ebp
    

Fasm error movss eax,xmm1
Post 31 Jul 2020, 14:14
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17714
Location: In your JS exploiting you and your system
revolution
Check your precedence of & over |

Are you sure that [] is a type? Perhaps you want [eax] or [eax+ebx] or similar?

Test each part separately to ensure you get what you really want.
Post 01 Aug 2020, 02:26
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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.