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 


Question basis of __asm command
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Sun Sep 14, 2008 8:12 am    Post subject: Reply with quote

HawwwaH wrote:
When you use 0x for this, you have to reverse the bytes...

Lets say jmp 00112233 is 75 77 and, jne 00112233 is 74 77. We want to change the jmp to jne.
That would mean you could do:
__asm mov word ptr ds:[0x00112233], 0x 7774

OR

__asm mov word ptr ds:[0x00112233], 7477h

Someone please correct me if I am wrong...

no space betwen "0x 7774", he prolly already know that...
And he is noping it so it will always be 0x90.

_________________
Gone
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Sun Sep 14, 2008 3:46 pm    Post subject: Reply with quote

Standard terminology for OWORD would be DQWORD (Dairy Queen DoubleQuad Word), per Intel, OWORD is Microsoftese.

Also, about the original post. If you weren't patching another object's memory, you could do this:

Code:

__asm {
00500000:
push ebp
mov ebp, esp
mov eax, 5
pop ebp
ret
}

int main()
{
    int (*fptr)() = 0x00500000;
    printf("%i",(*fptr)());
}

_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
Back to top
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Sun Sep 14, 2008 10:22 pm    Post subject: Reply with quote

GMZorita wrote:
HawwwaH wrote:
When you use 0x for this, you have to reverse the bytes...

Lets say jmp 00112233 is 75 77 and, jne 00112233 is 74 77. We want to change the jmp to jne.
That would mean you could do:
__asm mov word ptr ds:[0x00112233], 0x 7774

OR

__asm mov word ptr ds:[0x00112233], 7477h

Someone please correct me if I am wrong...

no space betwen "0x 7774", he prolly already know that...
And he is noping it so it will always be 0x90.

Oops. Typo. But, I am glad that adding the h thingy has not been argued against.
Back to top
View user's profile Send private message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Mon Sep 15, 2008 1:27 am    Post subject: Reply with quote

soooooo what was wrong with DWORD address = 0x00AAAAAA; *(BYTE*)address = 0x90;?
Nothing against you personally, sylvanus, but I just don't get why all these maplefags make all these threads about converting all these AA scripts into asm because they're either too lazy or too stupid to convert it into C/++.

_________________
Back to top
View user's profile Send private message
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Mon Sep 15, 2008 11:01 am    Post subject: Reply with quote

HawwwaH wrote:
GMZorita wrote:
HawwwaH wrote:
When you use 0x for this, you have to reverse the bytes...

Lets say jmp 00112233 is 75 77 and, jne 00112233 is 74 77. We want to change the jmp to jne.
That would mean you could do:
__asm mov word ptr ds:[0x00112233], 0x 7774

OR

__asm mov word ptr ds:[0x00112233], 7477h

Someone please correct me if I am wrong...

no space betwen "0x 7774", he prolly already know that...
And he is noping it so it will always be 0x90.

Oops. Typo. But, I am glad that adding the h thingy has not been argued against.

0x / h, will make the same thing...

_________________
Gone
Back to top
View user's profile Send private message
Wintermoot
Expert Cheater
Reputation: 0

Joined: 08 Nov 2007
Posts: 198

PostPosted: Mon Sep 15, 2008 11:33 pm    Post subject: Reply with quote

Really? I always thought you didn't have to reverse the bytes if you use h...
Back to top
View user's profile Send private message
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Tue Sep 16, 2008 11:35 am    Post subject: Reply with quote

Nope, they are identical. Byte reversal is due to big/little-endianness of the processor, not some weird software thing Very Happy.
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
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
Goto page Previous  1, 2
Page 2 of 2

 
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