View previous topic :: View next topic |
Author |
Message |
fjfc Advanced Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 91
|
Posted: Fri Jul 10, 2009 12:30 am Post subject: Driver compiling on X64 OS |
|
|
Here's the thing, i'm trying to compile one of my drivers to use on XP X64 edition.
So compiling it with the WDK for Windows server 2008 (microsoft website tolt us to compile drivers to use on xp x64 with this environment)
i realized that i cannot use __asm...
so i need help because i use one of the famous
__asm
{
cli
mov eax, cr0
mov _cr0, eax
and eax, 0fffeffffh
mov cr0, eax
}
on my driver and i don't know how to make it w/out the __asm statemente. someone can help me? thanks |
|
Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Fri Jul 10, 2009 1:20 am Post subject: |
|
|
intrinsics? |
|
Back to top |
|
 |
fjfc Advanced Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 91
|
Posted: Fri Jul 10, 2009 8:53 am Post subject: |
|
|
how? |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
|
Posted: Fri Jul 10, 2009 9:36 am Post subject: |
|
|
64-bit microsoft c compilers, do not support inline assembler.
If you want to use assembler, then create a separate assembler file compile that in, and call the functions of the assembler file from your c-code _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
fjfc Advanced Cheater
Reputation: 0
Joined: 21 Sep 2006 Posts: 91
|
Posted: Fri Jul 10, 2009 11:04 am Post subject: |
|
|
I've tried that DB... i've included one func.asm in my sources, like:
TARGETNAME=x
TARGETPATH=obj
TARGETTYPE=DRIVER
SOURCES=x.c y.c func.asm
but then i get this error:
BUILD: Examining d:\x directory for files to compile.
skipping post pass 0 command
Compiling and Linking d:\x *************
'nmake.exe /nologo BUILDMSG=Stop. -i /nologo /f d:\winddk\6001.18001\bin\makefile.def BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR='
d:\x: TARGETPATH is obj
NMAKE : fatal error U1073: don't know how to make 'd:\x\objfre_wlh_ia64\ia64\func.obj'
errors in directory d:\bypass
NMAKE : fatal error U1073: don't know how to make 'd:\x\objfre_wlh_ia64\ia64\func.obj'
Stop.
errors in directory d:\x
nmake.exe /nologo BUILDMSG=Stop. -i /nologo /f d:\winddk\6001.18001\bin\makefile.def BUILD_PASS=PASS2 LINKONLY=1 NOPASS0=1 MAKEDIR_RELATIVE_TO_BASEDIR= failed - rc = 2 |
|
Back to top |
|
 |
Zerith Master Cheater
Reputation: 1
Joined: 07 Oct 2007 Posts: 468
|
Posted: Sat Jul 11, 2009 2:24 am Post subject: |
|
|
Microsoft C compiler isn't suppose to know how to compile ASM files..
I would suggest making the functions extern and linking an object file generated from these asm files (keep note that i have no knowledge at 64bit microsoft compilers) |
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
|
Posted: Wed Sep 09, 2009 11:56 am Post subject: |
|
|
bump for those that have the same question but don't know the answer
Code: |
TARGETNAME=x
TARGETPATH=obj
TARGETTYPE=DRIVER
AMD64_SOURCES=func.asm
SOURCES=x.c y.c
|
and func.asm needs to be in the amd64 folder
while i'm at it:
Quote: |
NMAKE : fatal error U1073: don't know how to make 'd:\x\objfre_wlh_ia64\ia64\func.obj'
|
That's the wrong build environment. Should have picked amd64 or x64 (depending on which wdk you use), not ia64 _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
Guy Expert Cheater
Reputation: 0
Joined: 30 May 2009 Posts: 187
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25796 Location: The netherlands
|
Posted: Wed Sep 09, 2009 9:20 pm Post subject: |
|
|
of course, there's still some reasons to use assembler.
e.g: the intrinsic to get the GDT address and limit (sgdt) is missing. _________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
|