none
64-bit assembly language? RRS feed

  • Question

  • I am a Windows newbie, so I don't know anything about Windows development environments.

    I have written an x86-64 assembly language book based on Linux. It's a real textbook that has been used at three colleges. It even got excellent reviews from Prentice-Hall, but they decided the market is too limited for them to publish it. (I'm looking into print-on-demand publishing.)

    I have recently installed 64-bit Windows 7 and would like to create a Windows version of my book. My approach in the book is not to teach how to create applications in assembly language, but to show how the machine is working at the assembly language level when you write in C/C++. So I give almost all my examples first in C/C++. Then I use (Linux) gcc to generate assembly language and explain that. I then show how an assembly language programmer would write the same code. All my examples run in a terminal window, using printf and scanf for user I/O.

    Will Windows SDK allow me to do this? That is, can I write C/C++ code and compile it just to the point of assembly language? Does the SDK include an assembler?

    I know that Windows assemblers exist, but I don't know of any that are integrated with a C/C++ compiler like gcc is. And so far, they all seem to be 32-bit.

    Any pointers you can provide me will be greatly appreciated.

    BTW, after 25 years of Mac and 10 of Linux, I'm enjoying my Windows 7 experience.

    --Bob

    Friday, February 12, 2010 5:13 AM

All replies

  • The Windows SDK has all of the x64 tools. If you look under its install directory you should be able to find an application named ml64.exe and this is what you want. The 32 bit version is ml.exe btw.


    Visit my (not very good) blog at http://c2kblog.blogspot.com/
    • Proposed as answer by Nevin Janzen Tuesday, April 24, 2012 10:44 PM
    Friday, February 12, 2010 1:00 PM
  • As an avid disassemblerer(if that's a word), your book sounds very interesting.  The microsoft C/C++ compiler cl.exe allows you to output assembly "listing" files via the /FA command-line switch. 

    As crescens2k mentioned, look at ml.exe and ml64.exe which are the Microsoft MASM compilers. 

    You may also want to check out JWasm.

    Good luck!
    Friday, February 12, 2010 4:48 PM
  • Thank you, crescens2k and Eric. I have successfully compiled a C program into 64-bit assembly language with cl. Then I used ml64 to assembly it and create an executable. I did this in SDK v7.0 CMD Shell.

    I had to delete a couple of asm directives from cl's assembly language. My next step is to learn more about MASM. Then I need to figure out exactly what I installed is required.

    Much fun! Good think I'm retired and have the time to do this.

    --Bob

    Tuesday, February 16, 2010 4:13 AM