Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 05:37

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



asm - convert.

Discussion on asm - convert. within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 3
Received Thanks: 0
Arrow asm - convert.

Hi, can I ask you to rework it so that you can compile the Dev-C++

Code:
int getCharW(int Font, char* Name, int nAlign)
{
    int TextLen = strlen(Name);
    int nret = 0;
    __asm
    {
        push nAlign
        push TextLen
        push Text
        push Font
        call Addr  // Addr = 0x3ABC11
        mov nret, eax
    }
    return nret;
}
Dinitr is offline  
Old 01/15/2012, 10:39   #2
 
elite*gold: 50
Join Date: Mar 2010
Posts: 1,373
Received Thanks: 521
Look
It's a tutorial about inline asm with GNU C++ on windows
jacky919 is offline  
Old 01/15/2012, 11:54   #3
 
elite*gold: 0
Join Date: Jan 2012
Posts: 3
Received Thanks: 0
i try:

Quote:
asm("push %0" :: "g" (nAlign));
asm("push %0" :: "g" (TextLen));
asm("push %0" :: "g" (Text));
asm("push %0" :: "g" (Font));
asm("call" :: "g" (Addr));
asm("mov %eax, nret");
error: suffix or operands invalid for `call'

and

[Linker error] undefined reference to `nret'
Dinitr is offline  
Old 01/15/2012, 12:04   #4
 
elite*gold: 0
Join Date: Nov 2009
Posts: 343
Received Thanks: 45
Maybe you can use a function pointer?
yihaaa is offline  
Old 01/15/2012, 12:33   #5
 
elite*gold: 0
Join Date: Jan 2012
Posts: 3
Received Thanks: 0
to Addr ?
Dinitr is offline  
Old 01/15/2012, 12:39   #6
 
elite*gold: 0
Join Date: Nov 2009
Posts: 343
Received Thanks: 45
typedef int ( *func )( int Font, char* Text, int len, int nAlign );

func _func = reinterpret_cast< func > ( 0x3ABC11 );

int getCharW(int Font, char* Name, int nAlign)
{
int TextLen = strlen(Name);
return _func ( Font, Name, TextLen, nAlign );
}

Or so
yihaaa is offline  
Reply


Similar Threads Similar Threads
How can I convert image ?
06/05/2011 - Metin2 Private Server - 3 Replies
How can I convert an image to a 2 ? Image 1 http://s3.ifotos.pl/mini/1_hernrpq.png Image 2 http://s3.ifotos.pl/mini/2_hernrhp.png I need to create maps. With this second picture on the map is pretty neat and so is downhill so sharp mountains and terrain.
How do i convert JPG to DAT
02/23/2011 - SRO Private Server - 2 Replies
Hello, i've been editing media.pk2, i have exported some files in .DAT format from the media.pk2 and changed them to .JPG (to modify them) just by renaming .DAT to .JPG, but when i try to rename JPG back to DAT it stays as JPG file. so, how do i convert JPG to DAT?
[C++] how to convert dec to hex?
05/11/2009 - C/C++ - 1 Replies
I need to convert a decimal integer into hex. The decimal integer is the value of a pointer and i need to get in hex to use it as a address for writeprocessmemory. So is there any way to convert a dec into a hex and use the hex value as a argument for writeprocessmemory? EDIT:meeh...forgot that the value is only displayed as decimal number -.- /close plz
convert [help]
11/20/2008 - General Coding - 2 Replies
Hello guys, I'm pretty new to stuff like reading Data out of games,such as warhammer. I found out the pointer + offset for the x / y / z / heading value right now and they're correct, found the same info in a forum, but my problem is, that in cheat engine it looks like this: X = Array of Byte = 55 6F 81 49 4bytes = 1233219413 float: 1060330.625 And I was wondering, how I can convert them in C# or in any other language, to get the correct value, which is telling me the x value.



All times are GMT +1. The time now is 05:37.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.