如何在64位操作系统上执行汇编程序?

发布于 2024-12-12 04:17:06 字数 165 浏览 3 评论 0原文

我刚刚开始学习汇编语言。有人告诉我“MASM”用于编写代码。所以我下载了 MASM 6.15。

现在我尝试在“CMD”中编译后运行一个程序,但它显示“此文件的版本与您正在运行的 Windows 版本不兼容...您需要 32 位版本...”

请告诉我如何在 64 位系统上运行这些程序?

I've just started assembly language. I was told that 'MASM' is used for writing code. So I downloaded MASM 6.15.

Now I am trying to run a program after the compilation in 'CMD' but it says "The version of this file is not compatible with the version of Windows you are running... you need 32-bit version..."

Please tell me how can I run these programs on my 64-bit system?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

茶色山野 2024-12-19 04:17:06

16 位程序无法在 64 位 Windows 上执行。显然您正在编译和链接 16 位程序。如果您希望执行这些(因为您正在阅读一本书或教程),您可以在运行 32 位 Windows 或 DOS 的 VM 中运行它们,或者您可以使用 DosBox 等 DOS 模拟器。如果您希望为现代 Windows 版本开发汇编程序,则必须使用较新版本的 MASM 并学习如何为 32 位或 64 位 Windows 进行开发,Jason Evans 提供的链接将引导您访问较新版本的 MASM并拥有您所需的所有其他信息。

16-bit programs will not execute on a 64-bit Windows. So apparently you are compiling and linking 16-bit programs. If you wish to execute those (because you're following a book or tutorial) you can run them inside a VM running an 32-bit windows or DOS or you can use a DOS emulator like DosBox. If you wish to develop programs in assembly for modern Windows versions you'll have to use a newer version of MASM and learn how to develop for 32- or 64-bit Windows, the link Jason Evans provided will lead you to newer versions of MASM and has all other information you need for that.

无法言说的痛 2024-12-19 04:17:06

你需要下载 masm64 (google)

但是 masm 并不是制作 64 位程序的方法。

人们开始越来越多地使用 JWASM 因为它可以输出到 elf 以及 coff 等。

最简单的似乎仍然是 goasm。网上有很多教程和示例。

You need to download masm64 (google)

However masm is not the way to go to make 64bit programs.

People start more and more using JWASM as it can output to elf as well as coff and others.

The easiest seems to still be goasm. Lots of tutorials and examples online.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文