View previous topic :: View next topic |
Author |
Message |
Filipe_Br Master Cheater
Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Wed Feb 01, 2017 2:28 pm Post subject: How to add a double value? |
|
|
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 |
|
 |
Matze500 Expert Cheater
Reputation: 8
Joined: 25 Jan 2012 Posts: 241 Location: Germany
|
Posted: Wed Feb 01, 2017 4:14 pm Post subject: |
|
|
Code: | add [esi+10],"Your value"
movq xmm5,[esi+10]
movq [edi+00000100],xmm5 |
That should do the trick.
Geets Matze
_________________
|
|
Back to top |
|
 |
Filipe_Br Master Cheater
Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Wed Feb 01, 2017 4:45 pm Post subject: |
|
|
What if I want to directly increase 'xmm5'. You know how you do it?
_________________
... |
|
Back to top |
|
 |
Zanzer I post too much
Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Wed Feb 01, 2017 9:01 pm Post subject: |
|
|
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 |
|
 |
Filipe_Br Master Cheater
Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Thu Feb 02, 2017 4:21 am Post subject: |
|
|
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 |
|
 |
SunBeam I post too much
Reputation: 65
Joined: 25 Feb 2005 Posts: 4023 Location: Romania
|
|
Back to top |
|
 |
|