Explaining how the MASM 2-pass assembler works
os2museum.com
os2museum.com
MASM also uses the syntax one finds in the Intel CPU reference manuals. This is also done in the inline assembler for my compilers.
The gnu assembler syntax reverses the operands, which reverses the operands. This drives me crazy because assembler is hard enough without all the bugs from putting the operands in the wrong order.
Besides, I much prefer to be able to compare my assembler code with the Intel CPU specification.
Never again.
But chips were simpler back then, and a programmer could often leave compiler code in the dust with small bits of assembler (esp. where Fortran was involved).
Nowadays, X86 has become so hard to reason about from a performance point of view that for critical code I just assume that GCC will emit something acceptable given a bit of sensibly-written C, and that to get a big boost beyond that is going to involves GPUs or custom silicon (depending on the application).
Yes, it still is. It's no longer supplied separately and instead is included in Visual Studio (or in the "Build Tools for Visual Studio"), but it is still there. Newer, 64-bit, version is called ML64 but still referred to as MASM/Macro Assembler.
well, it kinda/sorta is? https://www.masm32.com/
Though that's just about as unofficial as it gets!
https://docs.microsoft.com/en-us/cpp/assembler/masm/microsof...