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 


Humble beginnings and Hex Code

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
raelharris
Newbie cheater
Reputation: 0

Joined: 04 Feb 2014
Posts: 11

PostPosted: Fri Feb 07, 2014 2:20 am    Post subject: Humble beginnings and Hex Code Reply with quote

Hi All,

I hate to be a bother here, but I really want to learn more about all of this and try to do research before asking silly questions etc. in the forum. I think I need to have a better understanding of hexadecimal code. I tried looking for assembler tutorials as advised but only managed to find that Auto Assembler thingy.

I remember in the past, I always saw Hexadecimal Code written as a value between 00000000 and FFFFFFFF with 0 - F representing the numbers 0 - 15. I understand that 00000010 = 16, 00000100 = 256 etc. I have never seen it written as 0x0000 before.

I tried Googling it and searching the forum too. I didn't have much luck though. Do you know of any tutorials out there teaching how to read this number format?

Thanks for your help and patience.
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Fri Feb 07, 2014 2:33 am    Post subject: Reply with quote

If I say that a pointer has an offset of 10 does it mean 10 (decimal) or 16?
To avoid that kind of ambiguity we (often) prefix hex numbers with 0x but whatever follows is read exactly like you're used to.
Historically it comes from C/C++ where you use the 0x prefix to indicate that the number just after is in hexadecimal.

_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
raelharris
Newbie cheater
Reputation: 0

Joined: 04 Feb 2014
Posts: 11

PostPosted: Fri Feb 07, 2014 2:40 am    Post subject: Reply with quote

Oh wow that's great! Very Happy Now I fully understand what you meant by 0x800. Thanks again!
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 892

PostPosted: Tue Feb 11, 2014 10:57 pm    Post subject: Reply with quote

As an addendum, C/C++ also support the h suffix to denote base 16, eg "13h".
Back to top
View user's profile Send private message
Gniarf
Grandmaster Cheater Supreme
Reputation: 43

Joined: 12 Mar 2012
Posts: 1285

PostPosted: Wed Feb 12, 2014 5:56 am    Post subject: Reply with quote

@justa_dude: My visual studio 2008 doesn't understand 13h in C/C++ code. What compiler / VS version are you using?
_________________
DO NOT PM me if you want help on making/fixing/using a hack.
Back to top
View user's profile Send private message
justa_dude
Grandmaster Cheater
Reputation: 23

Joined: 29 Jun 2010
Posts: 892

PostPosted: Sun Feb 16, 2014 3:56 am    Post subject: Reply with quote

Gniarf wrote:
@justa_dude: My visual studio 2008 doesn't understand 13h in C/C++ code. What compiler / VS version are you using?


It seems that I was in error - the h suffix is not part of the language.

I remember using it all the time in Borland Turbo C 3, but I guess that was an anomaly. It is standard for Intel ASM, so I guess it either just snuck in as a convenience thing or I only used it with inline ASM for CGI/VGA mode switching or something.

My mistake, sorry guys.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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