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 


small dude using instructions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Xblade Of Heaven
Master Cheater
Reputation: 0

Joined: 16 Oct 2005
Posts: 395
Location: DEAD

PostPosted: Thu Oct 13, 2016 12:17 pm    Post subject: small dude using instructions Reply with quote

Hi all guys, to see if anyone can help

i have a problem using 2 instrucions.

For example i ca use this

Code:
fild dword ptr [eax+44]//load a integer value
fstp dword ptr [eax+40]//store a float value


is corret, but now i try this:

Code:
fild dword ptr [eax+44]//load a integer value
fistp dword ptr [eax+40]//store a integer value


and in this second case the loaded value change to a wrong value, anyone can explain me why? thanks!

_________________
Welcome to the Hell.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Thu Oct 13, 2016 12:23 pm    Post subject: Reply with quote

Could you be more specific and say what the values are?
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Xblade Of Heaven
Master Cheater
Reputation: 0

Joined: 16 Oct 2005
Posts: 395
Location: DEAD

PostPosted: Thu Oct 13, 2016 12:33 pm    Post subject: Reply with quote

yep

are the hp values, max and current values

100 in 4bytes

eax+44 store max hp 100 and eax+40 is current HP

_________________
Welcome to the Hell.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Thu Oct 13, 2016 12:40 pm    Post subject: Reply with quote

Works perfectly fine for me. fild converts the 4-byte value to extended and loads it onto the FPU stack, and fistp converts the extended value back to 4-byte, stores it at that address, and pops the FPU stack.

By asking that question, I meant more so what value fistp was storing and what value you intended for it to store.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Xblade Of Heaven
Master Cheater
Reputation: 0

Joined: 16 Oct 2005
Posts: 395
Location: DEAD

PostPosted: Thu Oct 13, 2016 1:14 pm    Post subject: Reply with quote

yeah, is working fine... is my fault wrong instruction position...

thanks man, regards

_________________
Welcome to the Hell.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Thu Oct 13, 2016 1:18 pm    Post subject: Reply with quote

Code:
fild dword ptr [eax+44]
Loads integer 100 (hex 00000064) as float 100 (hex 42C80000) to FPU stack.

Code:
fstp dword ptr [eax+40]
Pops float 100 (hex 42C80000) as float 100 (hex 42C80000) from FPU stack.

Code:
fistp dword ptr [eax+40]
Pops float 100 (hex 42C80000) as integer 100 (hex 00000064) from FPU stack.
Back to top
View user's profile Send private message
Xblade Of Heaven
Master Cheater
Reputation: 0

Joined: 16 Oct 2005
Posts: 395
Location: DEAD

PostPosted: Thu Oct 13, 2016 2:29 pm    Post subject: Reply with quote

thanks Very Happy
_________________
Welcome to the Hell.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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