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

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

问题描述

我想编写 64 位 Windows 程序集(最好使用 NASM).我在谷歌上看起来很不错,但似乎找不到 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 可执行文件.

您绝对可以在 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天全站免登陆