Use an appropriate linker.
If you really insist on throwing perfectly good linkers into the unemployment lines... you can use "-f bin" and "just" stuff the appropriate bytes into the appropriate places. For an MZ header, there are macros in the "misc" directory of the Nasm source code to assist. The NaGoA includes have macros for a PE header...
http://home.myfairpoint.net/fbkotler/nagoa20120202.zip(a somewhat "updated" version) There MAY be something for NE in there (too much sun on my monitor to read it comfortably at the moment). As I think you know, NE is rather "rare" these days...
I'd go with the "linker" option, if you can...
Best,
Frank