Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How to add a double value?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Wed Feb 01, 2017 2:28 pm    Post subject: How to add a double value? Reply with quote

I have the following opcode.
Code:

movq xmm5,[esi+10]
movq [edi+00000100],xmm5

I'd like to increase the 'xmm5' value before its value is written to '[edi + 00000100]'.
It would be something like that.
Code:

add xmm5,(double)10

Only in a way that works.

_________________
...
Back to top
View user's profile Send private message
Matze500
Expert Cheater
Reputation: 8

Joined: 25 Jan 2012
Posts: 241
Location: Germany

PostPosted: Wed Feb 01, 2017 4:14 pm    Post subject: Reply with quote

Code:
add [esi+10],"Your value"
movq xmm5,[esi+10]
movq [edi+00000100],xmm5


That should do the trick.

Geets Matze

_________________
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Wed Feb 01, 2017 4:45 pm    Post subject: Reply with quote

What if I want to directly increase 'xmm5'. You know how you do it?
_________________
...
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Wed Feb 01, 2017 9:01 pm    Post subject: Reply with quote

Code:
label(myvar)

// ... other stuff

code:
  addsd xmm5,[myvar]
  // ... original code
  jmp return

// between jump and injection
myvar:
  dq (double)10

INJECT:
Back to top
View user's profile Send private message
Filipe_Br
Master Cheater
Reputation: 3

Joined: 07 Jan 2016
Posts: 272
Location: My house

PostPosted: Thu Feb 02, 2017 4:21 am    Post subject: Reply with quote

Zanzer wrote:
Code:
label(myvar)

// ... other stuff

code:
  addsd xmm5,[myvar]
  // ... original code
  jmp return

// between jump and injection
myvar:
  dq (double)10

INJECT:

That's exactly what I needed.

_________________
...
Back to top
View user's profile Send private message
SunBeam
I post too much
Reputation: 65

Joined: 25 Feb 2005
Posts: 4023
Location: Romania

PostPosted: Thu Feb 02, 2017 8:09 am    Post subject: This post has 1 review(s) Reply with quote

See this as well (they're under SSE2 instructions, not MMX): http://docs.oracle.com/cd/E19253-01/817-5477/epmpv/index.html OR here: http://softpixel.com/~cwright/programming/simd/sse2.php (navigate left tree).
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites