64位Windows汇编器 [英] 64-bit windows assembler

查看:267
本文介绍了64位Windows汇编器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想对64位Windows程序集进行编程(最好使用NASM)。我已经看了很多,但是在google上却似乎找不到64位Windows编译器。某些站点提到了ml64,但似乎它不再包含在VC ++中。我尝试使用32位汇编,但是显然它在我的64位计算机上崩溃了。是否可以在64位Windows计算机上编写,编译和运行32位汇编应用程序?还是应该为64位编写和编译它?



谢谢。

解决方案

Yasm(*)是一种现代的,多平台的,由NASM重写的汇编程序,能够对x86和AMD64 / x86-64指令集进行汇编。



但是...您可能的意思是,您需要一个链接器来链接汇编的目标代码/文件以创建可执行文件。至少完全免费的MinGW(Windows最小GNU)项目软件包附带一个链接器(称为ld),该链接器能够从目标文件(至少为ELF和PE对象格式)组装32位和64位Windows可执行文件。 p>

只要为汇编器和链接器提供正确的命令行参数,您绝对可以在64位环境中交叉编译/构建32位项目,反之亦然。请参考您所选择工具的文档以获取更多详细信息。



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


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.

解决方案

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/

这篇关于64位Windows汇编器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆