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.

Share:
35,244

Related videos on Youtube

joek1975
Author by

joek1975

Like to watch baseball/football, programming, and enjoying adult beverages...

Updated on May 23, 2021

Comments

  • joek1975
    joek1975 almost 3 years

    What are the syntax differences between the NASM and MASM assemblers?

  • Admin
    Admin over 7 years
    in that section is stated: "NASM Is Case-Sensitive" However, MASM also can be case-sensitive, simply use: option casemap :none
  • Peter Cordes
    Peter Cordes almost 3 years
    GAS / 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
    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.