flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > [solved] name+value

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
I want do this:
Code:
mX 1
;result 
;movd xmm1,eax
;addss xmm1,xmm2
;mulss xmm1,xmm3
mX 4
;result 
;movd xmm4,eax
;addss xmm4,xmm5
;mulss xmm4,xmm6
    


mX this is macro.
Post 27 Aug 2020, 04:29
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17624
Location: In your JS exploiting you and your system
revolution
Use the hash (#) and the rept to increment that you have in another thread.
Post 27 Aug 2020, 04:49
View user's profile Send private message Visit poster's website Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
I try do simple:
Code:
rept 1 n:0 { movss xmm#n,xmm#n+1  }
    

But get error: movss xmm0,xmm0+1
Post 27 Aug 2020, 05:13
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 814
Roman
This work:
Code:
macro mX chA {

     rept 1 n:chA,i:chA+1,d:chA+2 \{
     movss xmm\#n,xmm\#i
     addss xmm\#n,xmm\#d
     \}
      }
    
Post 27 Aug 2020, 05:26
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17624
Location: In your JS exploiting you and your system
revolution
Good job. Smile
Post 27 Aug 2020, 05:39
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.