![]() 64 Bit Assembly
![]() Installing YASM
![]() Solution Structure.
![]() Assembler Options
![]() Linker Options
![]() Project Build
|
64 Bit AssemblyWhether you want to write your own programming language, or get a feel for how efficient a system is, an understanding of assembly language is useful. A great way to gain an appreciation of what a computer is actually be doing, assembly language is the ultimate in hard core, old school programming. We use YASM to do 64 bit programming, because the MASM tool that ships with Visual Studio 2008 does not work well in 64 bit land.
Installing YASMIt is fairly easy to install YASM. Download YASM from YASM Web Site. The directions for installation are also on the same site at YASM directions. We placed our yasm EXE in in C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin folder, as shown below.
Solution Structure.This is a picture of a Visual Studio 2008 solution set up for integrated assembly language. This is a heck of a mess, compared to what KDE gives you on Linux, but it works. Visual Studio made the x64 directory for us when we selected it as a build target. You can see .asm files, for assembly language, in the root folder, along with C and C++ files.
Assembler OptionsYasm lets you select which syntax you want your assembly file to use. Right click on the asm file or the proj file, like you would for C++, to select which assembler you prefer to use. Note that you do not have to do anything special to get your assembler obj files to link. They just need to wind up in the same directory as all the C and C++ obj files. So, we tell yasm that the obj output should be "$(IntDir)\$(InputName).obj", as shown below.
Linker OptionsYou do not have to do anything special with the linker to link YASM generated obj files.
Project BuildOutput from Yasm shows up in the Output tab of your build, just like everything else built in Visual Studio. For our brief experimentation, clicking on an error takes you to the correct line. |





