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]Calculating Jumps

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
dnsi0
I post too much
Reputation: 0

Joined: 04 Jan 2007
Posts: 2674

PostPosted: Tue Aug 12, 2008 11:17 am    Post subject: [asm]Calculating Jumps Reply with quote

Well. I am having some trouble with calculating jumps.

Heres what I know so far:
To calculate a jmp that goes later on into the memory you would use:
Like from 00401000 to 00402000.
Inverse These Bytes:
TheAddressToTheJump-(TheAddressYouAreAt+5)

Now my question is how do jump back?
Like from 00402000 to 00401000
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Tue Aug 12, 2008 1:59 pm    Post subject: Reply with quote

Code:
#define JmpOffset( to, from )    ( (INT)to - (INT)from - 5 )

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

Joined: 27 Jul 2007
Posts: 367

PostPosted: Thu Aug 14, 2008 11:06 pm    Post subject: Re: [asm]Calculating Jumps Reply with quote

dnsi0 wrote:
Well. I am having some trouble with calculating jumps.

Heres what I know so far:
To calculate a jmp that goes later on into the memory you would use:
Like from 00401000 to 00402000.
Inverse These Bytes:
TheAddressToTheJump-(TheAddressYouAreAt+5)

Now my question is how do jump back?
Like from 00402000 to 00401000

the same way.
you somehow have to store the address though (stack, var).

_________________

armed with this small butterfly net
i will face the world alone
& never be lonely.
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