Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

targeting MASM and NASM (Developers)

posted by Rugxulo Homepage, Usono, 03.07.2021, 20:18

> 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:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 277 users online (0 registered, 277 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum