On 7/7/2022 9:59 AM, C. Masloch wrote:
On at 2022-07-07 09:39 -0700, Ralf Quint wrote:
Similar with NASM, where for some weird reasons, they made the assembler case-sensitive, which I would consider utter nonsense (also among my griefs with C(++)). And it really bites you if you are trying to link assembler modules with other programming languages. It also (deliberately) doesn't support some assembler instructions (as per Intel specs) just because it doesn't fit into their parser (LODS, MOVS, ...),

Fair enough on all the other points, but the support for string instructions is actually there. It just isn't done with explicit operands to the instruction to indicate the operand size and segment override (whereas I believe the symbol offset address you can specify to MASM is ignored). Instead, NASM supports eg lodsb / lodsw / lodsd, as well as segment override and a16 or a32 as prefixes. So for example you could have "a32 es lodsd". This syntax used to be documented in their instruction set reference, as forked by me. [1]

As I mentioned, this is one of those changes that pretty much prevent you from assembling A LOT of older x86 source code from the early days of DOS (and x86).

Microsoft's MASM maintained full compatibility with Intel's own assembler, ASM86. And after all, Intel is the one entity that designed/defined x86. At least NASM  did not follow the stupid idea of AT&T (and gas, to me a typical Stallman idiosyncrasy, but apparently AT&T got on that trip before he got involved) to use a complete different syntax...

I would much rather use one of those Open Source assemblers (btw, which A86 is not!) like WASM/JWASM that stick to the Intel/Microsoft syntax and compatibility than to start converting each and every piece of assembly language source for DOS...

Ralf




_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to