masm32 和 masm 之间的区别?

发布于 2024-09-30 09:49:20 字数 430 浏览 3 评论 0原文

我正在尝试学习 Windows 汇编程序,发现有 2 个汇编程序:

masm : https://www.microsoft.com/downloads/en/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64

masm32 : http://masm32.com/index.htm

这些是等价的吗?我应该选择哪一门来学习 Windows 汇编?

I am trying to learn assembly for windows and see that there are 2 assemblers:

masm : https://www.microsoft.com/downloads/en/details.aspx?FamilyID=7a1c9da0-0510-44a2-b042-7ef370530c64

masm32 : http://masm32.com/index.htm

are these equivalent? which one should i choose to learn assembly for windows?

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

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

发布评论

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

评论(3

想念有你 2024-10-07 09:49:20

(显然)这都是 MASM,只是版本不同。我通常会使用官方(MS)链接。
MASM 现在也是 Windows SDK 的一部分 - 如果安装它,它会在 bin 目录中包含 ML.exe

如果你只是用它来学习汇编语言,那么使用的 MASM 版本并没有多大区别。较新版本的 MASM 添加了对 64 位 (ML64.exe) 和较新指令的支持,因为它们已添加到 x86 指令集中,但仅此而已。不同汇编器之间的主要区别是不同的方言。 x86 汇编语言有 3 种主要方言:MASM 语法、NASM 语法和 Unix 风格的 as 语法(以前也有 Borland TASM,但现在几乎已经死了)。 MASM、NASM 和 YASM 都使用相同的指令和寄存器名称,但有一些略有不同的约定(dword ptr [blah]dword [blah] 等)并且相当不同的宏语言。 MASM 还具有一些其他汇编器中不存在的高级结构,例如 .if / .endifinvoke 等。无论这是否是一个优势,都是一个品味问题,我个人更喜欢 NASM 风格的语法,因为它更规则,而且我发现宏预处理器使用起来更方便,但这是一个品味问题。

as 是另一回事。它使用完全不同的语法和指令名称,与英特尔手册中给出的内容不同。它是大多数 Unix 变体(以及来自该环境的编译器,例如 GCC)的默认值,但在该环境之外基本上不使用。当前版本的 GNU as 也支持 Intel 语法,这使得大多数语法差异消失,但 as 一般主要用作编译器的后端汇编器,而不是一个成熟的宏汇编器,因此与 MASM 或 NASM/YASM 相比,它的功能集仍然非常有限。

It's both MASM (apparently), just different versions. I'd normally use the official (MS) link.
MASM is also part of the Windows SDK now - if you install it, it contains ML.exe in the bin directory.

If you're just using it to learn assembly language, the MASM version used doesn't make much of a difference. Newer versions of MASM add support for 64 bits (ML64.exe) and newer instructions as they get added to the x86 instruction set, but that's about it. The main differences between different assemblers are the different dialects. There's 3 main dialects of x86 assembly language: MASM syntax, NASM syntax and Unix-style as syntax (there also used to be Borland TASM, but that's pretty much dead nowadays). MASM, NASM and YASM all use the same instruction and register names but have some slightly differing conventions (dword ptr [blah] vs. dword [blah] etc.) and quite different macro languages. MASM also has some higher-level constructs like .if / .endif, invoke etc. that don't exist in other Assemblers. Whether that's an advantage or not is a matter of taste, I personally prefer the NASM style syntax because it's more regular and I find the macro preprocessor more convenient to use, but that's a matter of taste.

as is a different matter. It uses a completely different syntax and instruction names that differ from what's given in the Intel manuals. It's the default on most Unix variants (and also in compilers that come from that environment, e.g. GCC) but basically unused outside that environment. Current versions of GNU as support Intel syntax too, which makes most of the syntactic differences go away, but as in general is mainly intended as a backend assembler for compilers and not a fullly-fledged macro assembler, so it still has a very limited featureset compared to MASM or NASM/YASM.

千里故人稀 2024-10-07 09:49:20

看起来,MASM32 是一个带有编辑器等的完整 SDK。您可以下载什么 这里 只是与 Visual C++ 2005 Express Edition 一起使用的汇编程序本身(请阅读“系统要求”)。因此,如果您想从零开始,请下载 MASM32 Sdk,据我猜测,它更适合初学者。只需阅读此处的页面即可获取有关 MASM 的更多信息。

As it seems, MASM32 is a whole SDK with editor etc. What you can download here is just the assembler itself for use together with Visual C++ 2005 Express Edition (read under "System requirements"). So if you wanna start just from zero, download the MASM32 Sdk which is, as far as I guess, better suited for beginners. Just read this page here to get more information about MASM.

残月升风 2024-10-07 09:49:20

正如 joni 所说,MASM32 是一个完整的 SDK。它包含一个编辑器、一些帮助文件,以及使用 MASM 语言编码所需的基本上所有内容。另外,值得注意的是,MASM32 确实包含 MASM 的版本 8;你没有遗漏任何东西。我个人推荐将 MASM32 作为一个包,它使得在 MASM 中开始变得更加容易,但是您可以从头开始,仅使用原始的 MASM 汇编器并从那里找出答案。

MASM32 is an entire SDK, like joni said. It contains an editor, some help files, and basically everything you need to code in the MASM language. Also, it's worth noting that MASM32 does indeed contain version 8 of MASM; you're not missing anything. I personally recommend MASM32 as a package, it makes starting off in MASM much easier, but you can do it all from scratch and use just the original MASM assembler and figure it out from there.

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