targeting MASM and NASM (Developers)
> I would like to write assembler to a common
> subset of masm + nasm, so I am very interested
> in this.
Microsoft's MASM proper is not DOS-friendly anymore and irrelevant. I wouldn't even touch it. It's not totally wrong to use older versions (even better, a more suitable clone, e.g. JWasm from last December), but I would heavily suggest NASM instead, especially after all the effort I went to for rebuilding 8086-hosted binaries.
* https://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/devel/asm/nasm/0.98.39/8086host/
N.B. Beware of licensing (as you're already mostly aware). MASM is still proprietary, and even "OSI" isn't "Free/libre" (e.g. JWasm or OpenWatcom's WASM). NASM 0.98.39 (NASM16) is LGPL and our untested 16-bit build of 2.09 is BSD.
> But can I do the "%use masm" without specifying
> that in the assembler source file, which masm
> would presumably barf on?
Presumably, you'd either use "-t" TASM mode to change "%ifdef" to "ifdef" to support both (as Scitech used to do) or "-P" preinclude a separate include file beforehand.
There might be some advantages to using MASM syntax, but for average or simple code, I wouldn't recommend straying beyond plain NASM syntax.
P.S. Here is an extremely informative MASM history website: https://bytepointer.com/masm/index.htm
Complete thread:
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 19.10.2020, 16:22 (Developers)
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - tkchia, 19.10.2020, 19:12
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - DosWorld, 21.10.2020, 13:58
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 23.10.2020, 16:47
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - marcov, 24.10.2020, 01:01
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 23.10.2020, 16:47
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 03.11.2020, 00:06
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - tkchia, 03.11.2020, 11:21
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 04.11.2020, 02:40
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 03.07.2021, 12:59
- targeting MASM and NASM - Rugxulo, 03.07.2021, 20:18
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - tkchia, 03.07.2021, 22:36
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 04.07.2021, 01:25
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 04.07.2021, 04:12
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 04.07.2021, 05:16
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 04.07.2021, 06:46
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 04.07.2021, 06:58
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 04.07.2021, 06:46
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 04.07.2021, 05:16
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - tkchia, 04.07.2021, 09:36
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 04.07.2021, 09:53
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - tkchia, 04.07.2021, 11:10
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 04.07.2021, 12:08
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - tkchia, 04.07.2021, 11:10
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 04.07.2021, 09:53
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 04.07.2021, 04:12
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 04.07.2021, 01:25
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - kerravon, 03.07.2021, 12:59
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - Rugxulo, 04.11.2020, 02:40
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - tkchia, 03.11.2020, 11:21
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - DosWorld, 21.10.2020, 13:58
- R. Swan's A72 assembler (8086, self-assembling, 8k .COM) - Rugxulo, 26.05.2021, 01:58
- R. Swan's A72 assembler (8086, self-assembling, 8k .COM) - Khusraw, 03.07.2021, 11:44
- R. Swan's A72 assembler (8086, self-assembling, 8k .COM) - Rugxulo, 04.07.2021, 03:56
- R. Swan's A72 assembler (8086, self-assembling, 8k .COM) - Khusraw, 04.07.2021, 07:55
- R. Swan's A72 assembler (8086, self-assembling, 8k .COM) - Rugxulo, 14.07.2021, 01:44
- R. Swan's A72 assembler (8086, self-assembling, 8k .COM) - Khusraw, 04.07.2021, 07:55
- R. Swan's A72 assembler (8086, self-assembling, 8k .COM) - Rugxulo, 04.07.2021, 03:56
- R. Swan's A72 assembler (8086, self-assembling, 8k .COM) - Khusraw, 03.07.2021, 11:44
- R. Swan's A72 assembler 1.04 (self-assembling, 8k .COM) - Rugxulo, 26.03.2022, 20:20
- R. Swan's A72 assembler 1.05 (self-assembling, 8k .COM) - Rugxulo, 20.11.2023, 10:44
- R. Swan's A72 assembler (8086, self-assembling, 11k .COM) - tkchia, 19.10.2020, 19:12