sakr22 Posted July 9, 2009 Posted July 9, 2009 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 assemblerthnx in advance
GamingMasteR Posted July 9, 2009 Posted July 9, 2009 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 .
sakr22 Posted July 19, 2009 Author Posted July 19, 2009 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 .asmdo any one what is the solution for this
mudlord Posted July 19, 2009 Posted July 19, 2009 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....
sakr22 Posted July 19, 2009 Author Posted July 19, 2009 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
human Posted July 19, 2009 Posted July 19, 2009 (edited) there are 2 version of masm,masm x86 and masm x64.ml.exe and ml64.exeMicrosoft ® Macro Assembler (x64) Version 9.00.21022.08maybe use proper one. Edited July 19, 2009 by human
sakr22 Posted July 19, 2009 Author Posted July 19, 2009 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 i figured the solution at last 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now