MASM/NASM Differences
35,244
Section 2.2 of the NASM documentation is titled Quick Start for MASM Users which lists the important differences between NASM and MASM.
Related videos on Youtube
Author by
joek1975
Like to watch baseball/football, programming, and enjoying adult beverages...
Updated on May 23, 2021Comments
-
joek1975 almost 3 years
What are the syntax differences between the NASM and MASM assemblers?
-
Peter Cordes almost 3 yearsRelated: How to know if an assembly code has particular syntax (emu8086, NASM, TASM, ...)? shows some syntax diff examples.
-
-
Admin over 7 yearsin that section is stated: "NASM Is Case-Sensitive" However, MASM also can be case-sensitive, simply use: option casemap :none
-
Peter Cordes almost 3 yearsGAS / llvm-as in
.intel_syntax noprefix
mode use syntax that's pretty much MASM for instructions, but with directives that are specific to them. -
Peter Cordes almost 3 years
nasm -felf64 foo.asm
should work the same way no matter what host you're building on. If you have some asm files that assemble on Linux but not Windows, it's probably because of building with different bitness (e.g.nasm -fwin32
vs.nasm -felf64
), or something about directives, or possibly the .asm uses%if
conditional stuff an does something different on Windows.) Without an example of the instructions, it's not useful to say that NASM on windows errors. What, on every file in general? No, of course not.