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 


[C++] Inline Assembly error

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sun Mar 09, 2008 4:30 pm    Post subject: [C++] Inline Assembly error Reply with quote

Code:

void _declspec(naked) __stdcall FlyCave()
{
   __asm
   {
      push eax
           lea eax, [eax+34]
      mov eax, [dwFlyCaveOption]
      pop eax
           cmp dword ptr [eax+34],01 //this and line below are original code
           je 0x0040a167
           jmp FlyAddressReturn //go back to the address--a = in hex
   }
}


That gives me the error

Code:

inline assembler syntax error in 'first operand'; found ')'


at the instruction "jmp FlyAddressReturn"

Help?

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Mar 09, 2008 4:33 pm    Post subject: Reply with quote

Code:
jmp [FlyAddressReturn]


Also, __stdcall isn't needed.
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sun Mar 09, 2008 4:38 pm    Post subject: Reply with quote

Flyte wrote:
Code:
jmp [FlyAddressReturn]


Also, __stdcall isn't needed.


Thanks, again!

I just saw _stdcall in Wicc's dll tutorial, so I'm gonna leave it there for safe-keeping.

Edit

Same error.. =(

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Flyte
Peanuts!!!!
Reputation: 6

Joined: 19 Apr 2006
Posts: 1887
Location: Canada

PostPosted: Sun Mar 09, 2008 4:47 pm    Post subject: Reply with quote

samuri25404 wrote:
Thanks, again!

I just saw _stdcall in Wicc's dll tutorial, so I'm gonna leave it there for safe-keeping.

Edit

Same error.. =(


Compiles fine using VC05 with no warnings at /W4. I don't know what the problem could be with yours. Confused
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sun Mar 09, 2008 4:50 pm    Post subject: Reply with quote

Flyte wrote:
samuri25404 wrote:
Thanks, again!

I just saw _stdcall in Wicc's dll tutorial, so I'm gonna leave it there for safe-keeping.

Edit

Same error.. =(


Compiles fine using VC05 with no warnings at /W4. I don't know what the problem could be with yours. Confused


I'ma go screw around with the settings, and see if that helps at all.

Edit:

-.-;

I'm using VS 2005 Professional, with the settings that Wicc mentioned in his tutorial, and I have no idea what's wrong.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Mar 09, 2008 9:50 pm    Post subject: Reply with quote

This is solved as far as I know, helped Sam with it over MSN, he had declared FlyAddressReturn as a define and not a DWORD so the inline was catching part of the macro and not what he was intending it to be. Mad

What he had it originally as:

Code:
#define FlyAddressReturn (FlyAddress + 0x0a)


(Incase people were wondering.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Mon Mar 10, 2008 12:34 pm    Post subject: Re: [C++] Inline Assembly error Reply with quote

samuri25404 wrote:
Code:

void _declspec(naked) __stdcall FlyCave()
{
   __asm
   {
      push eax
           lea eax, [eax+34]
      mov eax, [dwFlyCaveOption]
      pop eax
           cmp dword ptr [eax+34],01 //this and line below are original code
           je 0x0040a167
           jmp FlyAddressReturn //go back to the address--a = in hex
   }
}


That gives me the error

Code:

inline assembler syntax error in 'first operand'; found ')'


at the instruction "jmp FlyAddressReturn"

Help?


LOL you are cybar?

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

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Mar 10, 2008 2:29 pm    Post subject: Re: [C++] Inline Assembly error Reply with quote

GMZorita wrote:
samuri25404 wrote:
Code:

void _declspec(naked) __stdcall FlyCave()
{
   __asm
   {
      push eax
           lea eax, [eax+34]
      mov eax, [dwFlyCaveOption]
      pop eax
           cmp dword ptr [eax+34],01 //this and line below are original code
           je 0x0040a167
           jmp FlyAddressReturn //go back to the address--a = in hex
   }
}


That gives me the error

Code:

inline assembler syntax error in 'first operand'; found ')'


at the instruction "jmp FlyAddressReturn"

Help?


LOL you are cybar?


...?

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Mon Mar 10, 2008 2:40 pm    Post subject: Reply with quote

x0r wrote:
I'm assuming you're trying to jump to a constant as opposed to the value of a variable which holds the jump address.

Just try the following:

Code:
DWORD dwJMP = 0x00400000;

_asm jmp [dwJMP]


Yeah, I was using a macro for it, but Wicc helped me fix it; thanks though.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Aviram
Grandmaster Cheater
Reputation: 0

Joined: 30 Jun 2006
Posts: 633

PostPosted: Wed Mar 12, 2008 2:35 pm    Post subject: Reply with quote

Sorry for bumping but,
I wonder where's the tut of wicc?
I was messing around with dlls but,
I didnt notice that wicc had a tut Razz,
Thank for helpers...
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Mar 12, 2008 2:51 pm    Post subject: Reply with quote

It's posted on Extalia here:
http://www.extalia.com/forums/viewtopic.php?f=32&t=2795

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Aviram
Grandmaster Cheater
Reputation: 0

Joined: 30 Jun 2006
Posts: 633

PostPosted: Wed Mar 12, 2008 2:51 pm    Post subject: Reply with quote

Thank you.
+rep u.
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