Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

64-bit windows assembler

I want to program 64 bit windows assembly (preferably using NASM). I have looked quite a but on google but it seems that I cannot find a 64 bit windows compiler. Some site mentioned ml64 but it seems like it is no longer included in VC++. I have tried with 32 bit assembly, but obviously it just crashes on my 64 bit machine. Is it possible to write, compile and run 32 bit assembly applications on a 64 bit windows machine? Or should it be written and compiled for 64 bits?

Thanks.

like image 810
Jayson Kane Avatar asked May 22 '12 19:05

Jayson Kane


People also ask

Is there x64 assembly?

For years, PC programmers used x86 assembly to write performance-critical code. However, 32- bit PCs are being replaced with 64-bit ones, and the underlying assembly code has changed. This Gem is an introduction to x64 assembly. No prior knowledge of x86 code is needed, although it makes the transition easier.

Does Windows have a built in assembler?

On Windows, the officially supported assembly compiler is known as the Microsoft Assembler. Unfortunately, its feature set is rather limited, especially in the area of macros.

What are the 64-bit registers?

A 64-bit processor uses internal registers -- temporary storage locations within the processor -- that are 64 bits wide. This typically corresponds to an address bus and data bus that are also 64 bits wide.


1 Answers

Yasm(*) is a modern, multi-platform NASM-rewritten assembler which is capable of assembling for both x86 and AMD64/x86-64 instruction sets.

However... What you probably mean is that you need a linker to link the assembled object code/file(s) to create an executable file. At least the completely free MinGW(Minimal GNU for Windows) project package ships with a linker(called ld) capable of assembling both 32- and 64-bit Windows executables from object files(ELF and PE object format, at least).

You can definitely cross-compile/build 32-bit projects in a 64-bit environment and vice versa, given that you supply correct command-line parameters to the assembler and the linker. Please refer to the documentation of the tools of your choise for more precise details.

*) http://yasm.tortall.net/

like image 74
zxcdw Avatar answered Sep 28 '22 07:09

zxcdw