flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > mm0 as macro param

Author
Thread Post new topic Reply to topic
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 28 Jan 2008, 10:32
hello community, need little help from you

it is possible to pass, for example, mm0 register as macro parameter?


need something like this, but it doesn't work

Code:
macro _add_ val1,val2
{
       paddd val1,val2
}

.code

       _add_ mm0,mm1

    

_________________
[not enough memory]
Post 28 Jan 2008, 10:32
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20333
Location: In your JS exploiting you and your system
revolution 28 Jan 2008, 11:03
The code looks perfectly fine to me. What error do you get? You might get a runtime error if your CPU is old and doesn't support PADDD.
Post 28 Jan 2008, 11:03
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt 28 Jan 2008, 19:56
Are you getting a compiler error? I tried your code and don't get any errors. Or does it crash when you try to run the executable?
Post 28 Jan 2008, 19:56
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 28 Jan 2008, 20:13
Code:
mov eax,1
cpuid
bt edx,23           ; MMX
jnc no_MMX
    
Post 28 Jan 2008, 20:13
View user's profile Send private message Visit poster's website Reply with quote
Vasilev Vjacheslav



Joined: 11 Aug 2004
Posts: 392
Vasilev Vjacheslav 29 Jan 2008, 13:13
sorry guys and thanks for help, it is false alarm, porting code from gnu i forgot about brackets in fasm
Post 29 Jan 2008, 13:13
View user's profile Send private message 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.