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 


data management help : byte ptr

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Fresco
Grandmaster Cheater
Reputation: 4

Joined: 07 Nov 2010
Posts: 600

PostPosted: Thu Nov 22, 2012 10:17 am    Post subject: data management help : byte ptr Reply with quote

i have a structure, however it doesn't have a static base address.
Code:
dec [eax]

eax can be more than 4/5 addresses in the same object
i mean that for example eax ca be:
0A98B300
0A98B304
0A98B308 etc...
now for the code, instead of comparing eax's offsets eax+4, eax+8, i want to compare whether eax ends with 00 or 04 or 08.
how do i do that? or what's the instruction that returns the last byte of a register ?
byte ptr ? how do i use it ?
Code:
mov byte ptr ebx,eax

doesn't work. thanks for your help

_________________
... Fresco
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Fri Nov 23, 2012 1:29 am    Post subject: Re: data management help : byte ptr Reply with quote

Fresco wrote:
i want to compare whether eax ends with 00 or 04 or 08.
how do i do that?
Code:
cmp al,0
je WhatToDoIfEAXEndsWith0
cmp al,4
je WhatToDoIfEAXEndsWith4
cmp al,8
je WhatToDoIfEAXEndsWith8

Fresco wrote:
what's the instruction that returns the last byte of a register ?
If you wanna do it with an instruction, I suppose you could use some masking:
Code:
//here eax=12345678
and eax,FF  //eax=00000078
cmp eax,0
je WhatToDoIfEAXEndsWith0
cmp eax,4
je WhatToDoIfEAXEndsWith4
cmp eax,8
je WhatToDoIfEAXEndsWith8

Fresco wrote:
byte ptr ?
Nope
Fresco wrote:
how do i use it ?
byte prt is a modifier that you can only use in front of an address (like mov byte ptr [1000],eax). It specifies how much data to read/write at the specified memory location.
The "ptr" keyword is optional and does not change anything.
Back to top
View user's profile Send private message
Fresco
Grandmaster Cheater
Reputation: 4

Joined: 07 Nov 2010
Posts: 600

PostPosted: Fri Nov 23, 2012 12:24 pm    Post subject: Reply with quote

Thank you very much:)
_________________
... Fresco
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 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