| View previous topic :: View next topic |
| Author |
Message |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Mar 09, 2008 4:30 pm Post subject: [C++] Inline Assembly error |
|
|
| 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?
_________________
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sun Mar 09, 2008 4:33 pm Post subject: |
|
|
| Code: | | jmp [FlyAddressReturn] |
Also, __stdcall isn't needed.
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Mar 09, 2008 4:38 pm Post subject: |
|
|
| 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.. =(
_________________
|
|
| Back to top |
|
 |
Flyte Peanuts!!!!
Reputation: 6
Joined: 19 Apr 2006 Posts: 1887 Location: Canada
|
Posted: Sun Mar 09, 2008 4:47 pm Post subject: |
|
|
| 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.
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Mar 09, 2008 4:50 pm Post subject: |
|
|
| 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.  |
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.
_________________
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
GMZorita Grandmaster Cheater Supreme
Reputation: 0
Joined: 21 Mar 2007 Posts: 1361
|
Posted: Mon Mar 10, 2008 12:34 pm Post subject: Re: [C++] Inline Assembly error |
|
|
| 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 |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Mon Mar 10, 2008 2:29 pm Post subject: Re: [C++] Inline Assembly error |
|
|
| 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? |
...?
_________________
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Mon Mar 10, 2008 2:40 pm Post subject: |
|
|
| 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.
_________________
|
|
| Back to top |
|
 |
Aviram Grandmaster Cheater
Reputation: 0
Joined: 30 Jun 2006 Posts: 633
|
Posted: Wed Mar 12, 2008 2:35 pm Post subject: |
|
|
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 ,
Thank for helpers...
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
|
| Back to top |
|
 |
Aviram Grandmaster Cheater
Reputation: 0
Joined: 30 Jun 2006 Posts: 633
|
Posted: Wed Mar 12, 2008 2:51 pm Post subject: |
|
|
Thank you.
+rep u.
|
|
| Back to top |
|
 |
|