Hi Ruud,
I'm really impressed by Agner Fog's "objconv":
http://www.agner.org/optimize/#objconvHowever, it works with 32- and 64-bit object and executables for OMF, PE/COFF, ELF, and Macho formats. I don't think it will do anything useful with a .com file or a BIOS. Might be worth a try, and source code is available if you wanted to make a "project" out of it. If you've got anything to disassemble that it will work with, give it a try - I think you'll like it.
As you observe, Ndisasm doesn't even try to figure out what it's disassembling. Agner's "objconv" knows how to recognize and parse headers, to see where code starts, and data. It can pick out variable names, and even observe that "this lea esi, [esi + 0] is for alignment padding". Without a header, like a .com file or (I assume) a BIOS, there's a lot less information to work with. A bit of a paradox that a "simpler" file is more complicated to disassemble!
I've written a little program that blindly strips off the first 20(?) bytes of Ndisasm's output. In some cases, this will assemble. Not very useful - we had the binary! Something that could be modified and still reassemble (correctly) would be nice.
There used to be a thing called "sourcer" that would do it, and IDE Pro (there's a free trial version) but I don't think they produce Nasm syntax. Jeff Owens has a thing that will do it for ELF. I'm not familiar with what's available recently for dos/doze...
That's a long way of saying, "No, I don't know what would help you" I guess.
Anyone?
(again, I see Rob and I have posted at nearly the same time...
)
Best,
Frank