Jump to content
Tuts 4 You

x64 assembly


sakr22

Recommended Posts

Posted

in visual c++ 2005 x64 it doesn't support the inline assembly __asm

so to write assembly i must write it in a .asm file then call it from my code

i need a tutorials for writing x64 assembly and how to call it as a function from c++

or at least i nead an x64 IDE assembler

thnx in advance

GamingMasteR
Posted

Hi,

You can use fasm for x64 asm coding .

Or you can code x64 asm in masm and link the generated .obj file with your application, i don't have x64 compiler to test but i think it's the same as linking x86 .obj files .

  • 2 weeks later...
Posted

thanx for ur reply

I have added a file .asm to my x64 VS2005 project it compiles well using masm compiler

but when linking it gives me this error

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

even the project build well (previous error didn't appear)in x64 without the file .asm

do any one what is the solution for this

Posted

Hi,

You can use fasm for x64 asm coding .

Or you can code x64 asm in masm and link the generated .obj file with your application, i don't have x64 compiler to test but i think it's the same as linking x86 .obj files .

Last time I compiled a x64 app, it is. You just select the x64 building option in your project settings, if you have the x64 compile set installed.

Though, I use MSVC2008, which supports x64 fully, and even when cross-compiling....

Posted

Hi,

You can use fasm for x64 asm coding .

Or you can code x64 asm in masm and link the generated .obj file with your application, i don't have x64 compiler to test but i think it's the same as linking x86 .obj files .

Last time I compiled a x64 app, it is. You just select the x64 building option in your project settings, if you have the x64 compile set installed.

Though, I use MSVC2008, which supports x64 fully, and even when cross-compiling....

i had done all what u said but it still give me the same error

fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'

even the assembly file i added in the project is in another project which compile & link (Build) successfully

Posted (edited)

there are 2 version of masm,masm x86 and masm x64.

ml.exe and ml64.exe

Microsoft ® Macro Assembler (x64) Version 9.00.21022.08

maybe use proper one.

Edited by human
Posted

there are 2 version of masm,masm x86 and masm x64.

ml.exe and ml64.exe

Microsoft ® Macro Assembler (x64) Version 9.00.21022.08

maybe use proper one.

Great thanks to all of you :flowers:

i figured the solution at last :thumbsup:

right click on the asm file - properties

in the custom build step write this in the command line

ml64.exe /DWIN_X64 /Zi /c /Fl /Fo $(IntDir)\$(InputName).obj $(InputName).asm

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...