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 


[Asm] Dword pointers.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
spectrum
Expert Cheater
Reputation: 0

Joined: 27 Mar 2007
Posts: 143

PostPosted: Fri Mar 14, 2008 11:49 pm    Post subject: [Asm] Dword pointers. Reply with quote

I understand most of the asm functions except this one. I know that dword means double word and ptr pointer but f someone could fully explain what:
fld dword ptr [register]
fstp dword ptr [register]

thanks.
and also, whats the sintax to change the value of a pointer that has an offset in c++?

_________________
C++ {||||||||||}
ASM {||||||||||}
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sat Mar 15, 2008 12:04 am    Post subject: Reply with quote

Code:
FLD [source]               Pushes a Float Number from the source onto the top of
                           the FPU Stack.

FST [destination]          Copies a Float Number from the top of the FPU Stack
                           into the destination.

FSTP [destination]         Pops a Float Number from the top of the FPU Stack
                           into the destination.

FLDZ                       Pushes +0.0 on top of FPU Stack

FLD1                       Pushes +1.0 on top of FPU Stack

FLDPI                      Pushes PI on the top of FPU Stack

FILD [source]              Pushes an integer from the source to the top of the
                           FPU Stack.

FIST [destination]         Copies an integer from the top of the FPU Stack to
                           the destination.

FISTP [destination]        Pops an integer from the top of FPU Stack into the
                           destination.

FCHS                       Compliments the sign-bit of a float value located on
                           the top of the FPU Stack or ST(0) Register.

FNOP                       Performs no FPU Operation.[It's a 2 byte instruction
                           unlike that of NOP which is a 1 byte instruction.]

FABS                       Replaces the float value on the top of the stack with
                           it's absolute value.

FADD [operand]             Adds the value of the operand with the value located
                           on the top of the FPU Stack and store the result on
                           the top of the FPU Stack.

FCOS/FSIN                  Replaces the value on the top of the FPU Stack with
                           it's cosine/sine value.

FDIV [operand]             Divide the value on the top of the FPU Stack with the
                           operand and store the result on the top of FPU Stack.

FMUL [operand]             Multiply the value on the top of the FPU Stack with
                           the operand and store the result on top of FPU Stack.

FSUB [operand]             Subtract operand value from the value on top of FPU
                           Stack and store the result on top of FPU Stack.

FXCHST (index)             Exchanges values between top of FPU Stack and the
                           ST(index) register.

FCOM                       Compares the float value located on top if FPU Stack
                           with the operand located in memory or the FPU Stack.

FCOMP                      Same as FCOM but pops the float value from the top of
                           the FPU Stack.

FNSTSW AX                  Store FPU Status Word in AX. (Used for Conditions)

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Sat Mar 15, 2008 5:39 am    Post subject: Re: [Asm] Dword pointers. Reply with quote

spectrum wrote:
I understand most of the asm functions except this one. I know that dword means double word and ptr pointer but f someone could fully explain what:
fld dword ptr [register]
fstp dword ptr [register]

thanks.
and also, whats the sintax to change the value of a pointer that has an offset in c++?

The pointers are still the same, doesn't matters if the instruction is "mov [register+offset],eax" or "mov eax,[register+offset]" or fld dword ptr [register+offset], the value of the register + the offset will always point to the same address.

In C++ you can probably do:
Code:
mov eax,[address]
mov [eax+offset],value
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming 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